Skip to contentSkip to conversation

os-release: add more variables to list

PATCH In review Armin Kuster 2 participants 6 messages Oct 25, 2018 – Oct 29, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 os-release: add more variables to list

If someone extends the OS_RELEASE_FIELDS in a bbappend, it will cause the hash to change which is caught by the yocto-check-layer

---
 meta/recipes-core/os-release/os-release.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/os-release/os-release.bb +1 -1
index 7f3d9cb..88bf8f8 100644
@@ -12,7 +12,7 @@ do_configure[noexec] = "1"
 
 # Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
 #                     HOME_URL SUPPORT_URL BUG_REPORT_URL
-OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME"
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME BUILD_ID HOME_URL BUG_REPORT_URL SUPPORT_URL CPE_NAME"
 
 ID = "${DISTRO}"
 NAME = "${DISTRO_NAME}"
Signature · 1 line
2.7.4
#1 lore raw
Quoted 15 lines · Armin Kuster

If someone extends the OS_RELEASE_FIELDS in a bbappend, it will cause the hash to change which is
caught by the yocto-check-layer

---
 meta/recipes-core/os-release/os-release.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/os-release/os-release.bb +0 -0
index 7f3d9cb..88bf8f8 100644

meta/recipes-core/os-release/os-release.bb do_configure[noexec] = "1" · line 15

Quoted 5 lines
meta/recipes-core/os-release/os-release.bb +1 -1
@@ -12,7 +12,7 @@ do_configure[noexec] = "1"
 
 # Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
 #                     HOME_URL SUPPORT_URL BUG_REPORT_URL
-OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME"
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME BUILD_ID HOME_URL BUG_REPORT_URL SUPPORT_URL CPE_NAME"

I'm not sure I agree with this. It would usually be a policy decision, e.g. a ditro config which would change this and you'd not be doing this with a bbappend?

Cheers,

Richard

author
#2 lore raw
Quoted 17 lines · Richard Purdie
Quoted 16 lines · Armin Kuster

If someone extends the OS_RELEASE_FIELDS in a bbappend, it will cause the hash to change which is
caught by the yocto-check-layer

---
 meta/recipes-core/os-release/os-release.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/os-release/os-release.bb +0 -0
index 7f3d9cb..88bf8f8 100644
@@ -12,7 +12,7 @@ do_configure[noexec] = "1"
 
Quoted 7 lines

meta/recipes-core/os-release/os-release.bb do_configure[noexec] = "1" · line 15

Quoted 4 lines
meta/recipes-core/os-release/os-release.bb +1 -1
 # Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
 #                     HOME_URL SUPPORT_URL BUG_REPORT_URL
-OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME"
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME BUILD_ID HOME_URL BUG_REPORT_URL SUPPORT_URL CPE_NAME"

I'm not sure I agree with this. It would usually be a policy decision, e.g. a ditro config which would change this and you'd not be doing this with a bbappend?

Yeah,  its the feedback I was looking for. Isn't OE  core "NoDistro" and I will be wanting to have the CPE_NAME available with out having to define DISTRO. I am jet lagged so I am not seeing how to fix this for meta-secruity.

- Armin

Quoted 5 lines

Cheers,

Richard

#3 lore raw
Quoted 31 lines · On Sun, 2018-10-28 at 18:24 +0000, akuster808 wrote:
Quoted 18 lines · Richard Purdie
Quoted 17 lines · Armin Kuster

If someone extends the OS_RELEASE_FIELDS in a bbappend, it will cause
the hash to change which is
caught by the yocto-check-layer

---
 meta/recipes-core/os-release/os-release.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/os-release/os-release.bb +0 -0
index 7f3d9cb..88bf8f8 100644
@@ -12,7 +12,7 @@ do_configure[noexec] = "1"
 
Quoted 11 lines
Quoted 7 lines
meta/recipes-core/os-release/os-release.bb +0 -1
 # Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
 #                     HOME_URL SUPPORT_URL BUG_REPORT_URL
-OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID

PRETTY_NAME"
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME BUILD_ID HOME_URL BUG_REPORT_URL SUPPORT_URL CPE_NAME"

I'm not sure I agree with this. It would usually be a policy decision, e.g. a ditro config which would change this and you'd not be doing this with a bbappend?

Quoted 4 lines

Yeah, its the feedback I was looking for. Isn't OE core "NoDistro" and I will be wanting to have the CPE_NAME available with out having to define DISTRO. I am jet lagged so I am not seeing how to fix this for meta-secruity.

This sounds very much like "I want to be a distro but I don't want to be a distro".

Changing os-release just because a layer was included is a really bad idea. Its distro policy what would be included there, including what the cpe name might be.

Whether the nodistro defaults are right is a different question but meta-security should not be poking there.

Cheers,

Richard

author
#4 lore raw
Quoted 34 lines · On 10/29/18 10:12 AM, [email protected] wrote:
Quoted 29 lines · On Sun, 2018-10-28 at 18:24 +0000, akuster808 wrote:
Quoted 18 lines · Richard Purdie
Quoted 17 lines · Armin Kuster

If someone extends the OS_RELEASE_FIELDS in a bbappend, it will cause
the hash to change which is
caught by the yocto-check-layer

---
 meta/recipes-core/os-release/os-release.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-core/os-release/os-release.bb +0 -0
index 7f3d9cb..88bf8f8 100644
@@ -12,7 +12,7 @@ do_configure[noexec] = "1"
 
Quoted 10 lines
Quoted 7 lines
meta/recipes-core/os-release/os-release.bb +0 -1
 # Other valid fields: BUILD_ID ID_LIKE ANSI_COLOR CPE_NAME
 #                     HOME_URL SUPPORT_URL BUG_REPORT_URL
-OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID

PRETTY_NAME"
+OS_RELEASE_FIELDS = "ID ID_LIKE NAME VERSION VERSION_ID PRETTY_NAME BUILD_ID HOME_URL BUG_REPORT_URL SUPPORT_URL CPE_NAME"

I'm not sure I agree with this. It would usually be a policy decision, e.g. a ditro config which would change this and you'd not be doing this with a bbappend?

Quoted 4 lines

Yeah, its the feedback I was looking for. Isn't OE core "NoDistro" and I will be wanting to have the CPE_NAME available with out having to define DISTRO. I am jet lagged so I am not seeing how to fix this for meta-secruity.

Quoted 6 lines

This sounds very much like "I want to be a distro but I don't want to be a distro".

Changing os-release just because a layer was included is a really bad idea. Its distro policy what would be included there, including what the cpe name might be.

This is why I think its appropriate to have at least  "CPE_NAME" added.

Quoted 3 lines

Whether the nodistro defaults are right is a different question but meta-security should not be poking there.

I really didn't want to do another layer for something as simple as "CPE_NAME" but why not.

thanks for the feedback as always.

Kind regards,

Armin

Quoted 7 lines

Cheers,

Richard

#5 lore raw
Quoted 11 lines · On Mon, 2018-10-29 at 12:36 -0700, akuster808 wrote:
Quoted 9 lines · On 10/29/18 10:12 AM, [email protected] wrote:

This sounds very much like "I want to be a distro but I don't want to
be a distro".

Changing os-release just because a layer was included is a really bad
idea. Its distro policy what would be included there, including what
the cpe name might be.

Quoted 8 lines

This is why I think its appropriate to have at least "CPE_NAME" added.

Quoted 3 lines

Whether the nodistro defaults are right is a different question but meta-security should not be poking there.

I really didn't want to do another layer for something as simple as "CPE_NAME" but why not.

Does OE have a standard "CPE_NAME" which works for everything/everyone? Should it have?

I get the feeling I'm missing something here but you're not giving me much to work with and the original patch didn't just add CPE_NAME...

Cheers,

Richard