systemd: make predictable name mac policy opt-out
PATCH 1/1 systemd: make predictable name mac policy opt-out
From: Peter Marko <[email protected]>
Even the patch says it's inappropriate for upstream, and it's also inappropriate for some downstream projects, too. So make it possible to opt-out on it.
--- meta/recipes-core/systemd/systemd_255.4.bb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-core/systemd/systemd_255.4.bb +3 -1
@@ -28,7 +28,7 @@ SRC_URI += " \ file://systemd-pager.sh \ file://0002-binfmt-Don-t-install-dependency-links-at-install-tim.patch \ file://0008-implment-systemd-sysv-install-for-OE.patch \ - file://0001-NamePolicy.patch \ + ${@bb.utils.contains('PACKAGECONFIG', 'predictable-if-mac', 'file://0001-NamePolicy.patch', '', d)} \ " # patches needed by musl
@@ -88,6 +88,7 @@ PACKAGECONFIG ??= " \ nss \ nss-mymachines \ nss-resolve \ + predictable-if-mac \ quotacheck \ randomseed \ resolved \
@@ -197,6 +198,7 @@ PACKAGECONFIG[polkit] = "-Dpolkit=true,-Dpolkit=false" PACKAGECONFIG[polkit_hostnamed_fallback] = ",,,,dbus-broker,polkit" PACKAGECONFIG[portabled] = "-Dportabled=true,-Dportabled=false" PACKAGECONFIG[pstore] = "-Dpstore=true,-Dpstore=false" +PACKAGECONFIG[predictable-if-mac] = ",,," PACKAGECONFIG[qrencode] = "-Dqrencode=true,-Dqrencode=false,qrencode,,qrencode" PACKAGECONFIG[quotacheck] = "-Dquotacheck=true,-Dquotacheck=false" PACKAGECONFIG[randomseed] = "-Drandomseed=true,-Drandomseed=false"
Signature · 1 line
2.30.2
meta/recipes-core/systemd/systemd_255.4.bb SRC_URI += " \ · line 31
Quoted 2 lines · Peter Marko via lists.openembedded.org
meta/recipes-core/systemd/systemd_255.4.bb +1
-1- file://0001-NamePolicy.patch \ + ${@bb.utils.contains('PACKAGECONFIG', 'predictable-if-mac', 'file://0001-NamePolicy.patch', '', d)} \
Conditional patches are terrible for maintainability. Please make it a proper meson option, and submit upstream.
Alex
-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Tuesday, April 9, 2024 11:16
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
Quoted 8 lines · Peter Marko via lists.openembedded.org
Review
Quoted 3 lines
(quoted diff) +2
-1- file://0001-NamePolicy.patch \ + ${@bb.utils.contains('PACKAGECONFIG', + 'predictable-if-mac', 'file://0001-NamePolicy.patch', '', d)} \Conditional patches are terrible for maintainability. Please make it a proper meson option, and submit upstream.
Alex
This patch has status upstream inappropriate.
Pushing something like that to upstream doesn't sound like a good plan.
What about reverting the inappropriate patch completely instead?
Peter
Quoted 13 lines · Peter
-----Original Message-----
From: Alexander Kanavin <[email protected]>
Sent: Tuesday, April 9, 2024 11:16
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-outQuoted 5 lines · Peter Marko via lists.openembedded.org
Quoted 3 lines
(quoted diff) +2
-1- file://0001-NamePolicy.patch \ + ${@bb.utils.contains('PACKAGECONFIG', + 'predictable-if-mac', 'file://0001-NamePolicy.patch', '', d)} \
Quoted 6 lines
Quoted 3 lines
Conditional patches are terrible for maintainability. Please make it a proper meson option, and submit upstream.
Alex
This patch has status upstream inappropriate.
Pushing something like that to upstream doesn't sound like a good plan.
It's inappropriate as it is now, but with a meson option it would be very appropriate.
Quoted 1 line
What about reverting the inappropriate patch completely instead?
I'm okay with that too. Please work this out with the patch author.
Alex
Quoted 1 line · Peter Marko via lists.openembedded.org
+ ${@bb.utils.contains('PACKAGECONFIG', 'predictable-if-mac', 'file://0001-NamePolicy.patch', '', d)} \
There’s a few other places which use the pni-names DISTRO_FEATURE (which probably needs to be documented), this should respect that I guess.
Ross
-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Wednesday, April 10, 2024 18:00
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
Quoted 4 lines · Peter Marko via lists.openembedded.org
Quoted 1 line
+ ${@bb.utils.contains('PACKAGECONFIG', 'predictable-if-mac', 'file://0001-NamePolicy.patch', '', d)} \
There’s a few other places which use the pni-names
DISTRO_FEATURE(which probably needs to be documented), this should respect that I guess.
Sent a v2, maybe it's more acceptable as it uses distro feature and does not conditionally patch the sources.
Note that I have added the pni-names condition only to the systemd part. If this is accepted, the components from the other 4 patches should follow this.
Peter
Quoted 2 lines
Ross
Quoted 13 lines · Peter
-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Wednesday, April 10, 2024 18:00
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-outQuoted 5 lines
Quoted 2 lines · Peter Marko via lists.openembedded.org
+ ${@bb.utils.contains('PACKAGECONFIG', 'predictable- if-mac', 'file://0001-NamePolicy.patch', '', d)} \
Quoted 6 lines
Quoted 3 lines
There’s a few other places which use the pni-names
DISTRO_FEATURE(which probably needs to be documented), this should respect that I guess.Sent a v2, maybe it's more acceptable as it uses distro feature and does not conditionally patch the sources.
FWIW I much prefer it thanks.
Quoted 4 lines
Note that I have added the pni-names condition only to the systemd part.
If this is accepted, the components from the other 4 patches should follow this.
I'm struggling to keep track of all the details but I think this is an improvement so I've queued it.
Cheers,
Richard
-----Original Message-----
From: Richard Purdie <[email protected]>
Sent: Friday, April 12, 2024 18:41
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>; Ross Burton <[email protected]>; Kanavin, Alexander (EXT) (Linutronix GmbH) <[email protected]>; [email protected]
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
Quoted 21 lines · Peter
Quoted 13 lines
-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Wednesday, April 10, 2024 18:00
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-outQuoted 5 lines
Quoted 2 lines · Peter Marko via lists.openembedded.org
+ ${@bb.utils.contains('PACKAGECONFIG', 'predictable- if-mac', 'file://0001-NamePolicy.patch', '', d)} \
Quoted 6 lines
Quoted 3 lines
There’s a few other places which use the pni-names
DISTRO_FEATURE(which probably needs to be documented), this should respect that I guess.Sent a v2, maybe it's more acceptable as it uses distro feature and does not conditionally patch the sources.
Quoted 8 lines
FWIW I much prefer it thanks.
Quoted 4 lines
Note that I have added the pni-names condition only to the systemd part.
If this is accepted, the components from the other 4 patches should follow this.I'm struggling to keep track of all the details but I think this is an improvement so I've queued it.
I have checked and I think we should be good now.
The 5 commits introducing the pni changes were:
- "init-ifupdown: add predictable interface names" - does not enable pni, just handles if it's enabled
- found problems were fixed by "init-ifupdown: modify interfaces for busybox" and "packagegroup-core-boot: recommend ifupdown"
- "eudev: modify predictable network if name search" - does not enable pmi, just handles if it's enabled
- "eudev: allow for predictable network interface names" - guarded by pni-names
- "qemuboot: predictable network interface names" - guarded by pni-names
- "systemd: enable mac based names in NamePolicy" - guarded by pni-names now after my commit
Peter
Quoted 3 lines
Cheers,
Richard
Quoted 6 lines · Peter Marko via lists.openembedded.org
From: Peter Marko <[email protected]>
Even the patch says it's inappropriate for upstream, and it's also inappropriate for some downstream projects, too. So make it possible to opt-out on it.
I’m looking at these patches because of the fallout from the use of matches in the interfaces file. Presumably you want to make this opt-out for concrete reasons, can you explain what broke?
Ross
-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Wednesday, April 10, 2024 18:18
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
Quoted 11 lines · Peter Marko via lists.openembedded.org
Quoted 6 lines
From: Peter Marko <[email protected]>
Even the patch says it's inappropriate for upstream, and it's also inappropriate for some downstream projects, too.
So make it possible to opt-out on it.I’m looking at these patches because of the fallout from the use of matches in the interfaces file. Presumably you want to make this opt-out for concrete reasons, can you explain what broke?
Ross
Basically, we have networkmanager and firewalld configuration matching interface names.
In addition, also our applications are hardcoding the interface names to be able to configure interfaces on demand. Switching to dynamic names is not realistic.
After upgrading from 5.0_M3 to 5.0_M4 our wlan0 interface gets renamed by udev and thus networking breaks.
Unlike our ethernet ports with names defined in device tree, wifi chip uses external vendor kernel module so I'm not sure if I'm able to configure a stable kernel name for it.
Peter
Quoted 42 lines
-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Peter Marko via lists.openembedded.org
Sent: Wednesday, April 10, 2024 11:05 AM
To: Ross Burton <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt- out-----Original Message-----
From: Ross Burton <[email protected]>
Sent: Wednesday, April 10, 2024 18:18
To: Marko, Peter (ADV D EU SK BFS1) <[email protected]>
Cc: [email protected]
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt- outQuoted 1 line
On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org
Quoted 8 lines · <[email protected]> wrote:
Quoted 6 lines
From: Peter Marko <[email protected]>
Even the patch says it's inappropriate for upstream, and it's also inappropriate for some downstream projects, too.
So make it possible to opt-out on it.I’m looking at these patches because of the fallout from the use of matches in
the interfaces file. Presumably you want to make this opt-out for concrete
reasons, can you explain what broke?Quoted 2 lines
Ross
Basically, we have networkmanager and firewalld configuration matching interface names.
In addition, also our applications are hardcoding the interface names to be able to configure interfaces on demand.
Switching to dynamic names is not realistic.
Quoted 7 lines
After upgrading from 5.0_M3 to 5.0_M4 our wlan0 interface gets renamed by udev and thus networking breaks.
Unlike our ethernet ports with names defined in device tree, wifi chip uses external vendor kernel module so I'm not sure if I'm able to configure a stable kernel name for it.Peter
Commit 37bd8e8... sets the configuration in 99-default.link to include mac-based "predictable" names. I think we should decide on a default and let people who don't like it put a modified version of 99-default.link under /etc/system/network. The impetus to allow mac based names is that some bsp's don't produce anything else, but that makes the default different than the upstream version. Everyone will not want the provided 99-default.link, so we just need to decide who we cater to.
Joe
Hello Marko and Ross
Quoted 17 lines · Peter
From: Ross Burton <[email protected]>
Quoted 10 lines · Peter Marko via lists.openembedded.org
Quoted 5 lines
From: Peter Marko <[email protected]>
Even the patch says it's inappropriate for upstream, and it's also inappropriate for some downstream projects, too. So make it possible to opt-out on it.
I’m looking at these patches because of the fallout from the use of
matches in the interfaces file. Presumably you want to make this
opt-out for concrete reasons, can you explain what broke?Basically, we have networkmanager and firewalld configuration matching interface names. In addition, also our applications are hardcoding the interface names to be able to configure interfaces on demand. Switching to dynamic names is not realistic.
Quoted 5 lines
After upgrading from 5.0_M3 to 5.0_M4 our wlan0 interface gets renamed by udev and thus networking breaks. Unlike our ethernet ports with names defined in device tree, wifi chip uses external vendor kernel module so I'm not sure if I'm able to configure a stable kernel name for it.
I can confirm that this is an issue also for my use case, for similar reasons.
Francesco