All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] systemd: make predictable name mac policy opt-out
@ 2024-04-08  7:04 Peter Marko
  2024-04-09  9:16 ` Alexander Kanavin
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Peter Marko @ 2024-04-08  7:04 UTC (permalink / raw
  To: openembedded-core; +Cc: Peter Marko

From: Peter Marko <peter.marko@siemens.com>

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.

Signed-off-by: Peter Marko <peter.marko@siemens.com>
---
 meta/recipes-core/systemd/systemd_255.4.bb | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_255.4.bb b/meta/recipes-core/systemd/systemd_255.4.bb
index 8a816c4bc1..17f28a9897 100644
--- a/meta/recipes-core/systemd/systemd_255.4.bb
+++ b/meta/recipes-core/systemd/systemd_255.4.bb
@@ -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"
-- 
2.30.2



^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-08  7:04 [OE-core][PATCH] systemd: make predictable name mac policy opt-out Peter Marko
@ 2024-04-09  9:16 ` Alexander Kanavin
  2024-04-09  9:57   ` Marko, Peter
  2024-04-10 15:59 ` Ross Burton
  2024-04-10 16:18 ` Ross Burton
  2 siblings, 1 reply; 12+ messages in thread
From: Alexander Kanavin @ 2024-04-09  9:16 UTC (permalink / raw
  To: peter.marko; +Cc: openembedded-core

On Mon, 8 Apr 2024 at 09:06, Peter Marko via lists.openembedded.org
<peter.marko=siemens.com@lists.openembedded.org> wrote:
> -           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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-09  9:16 ` Alexander Kanavin
@ 2024-04-09  9:57   ` Marko, Peter
  2024-04-09 10:02     ` Alexander Kanavin
  0 siblings, 1 reply; 12+ messages in thread
From: Marko, Peter @ 2024-04-09  9:57 UTC (permalink / raw
  To: Alexander Kanavin; +Cc: openembedded-core@lists.openembedded.org

-----Original Message-----
From: Alexander Kanavin <alex.kanavin@gmail.com> 
Sent: Tuesday, April 9, 2024 11:16
To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

> On Mon, 8 Apr 2024 at 09:06, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > -           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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-09  9:57   ` Marko, Peter
@ 2024-04-09 10:02     ` Alexander Kanavin
  0 siblings, 0 replies; 12+ messages in thread
From: Alexander Kanavin @ 2024-04-09 10:02 UTC (permalink / raw
  To: Marko, Peter; +Cc: openembedded-core@lists.openembedded.org

On Tue, 9 Apr 2024 at 11:57, Marko, Peter <Peter.Marko@siemens.com> wrote:
>
> -----Original Message-----
> From: Alexander Kanavin <alex.kanavin@gmail.com>
> Sent: Tuesday, April 9, 2024 11:16
> To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
>
> > On Mon, 8 Apr 2024 at 09:06, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > > -           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.

It's inappropriate as it is now, but with a meson option it would be
very appropriate.

> What about reverting the inappropriate patch completely instead?

I'm okay with that too. Please work this out with the patch author.

Alex


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-08  7:04 [OE-core][PATCH] systemd: make predictable name mac policy opt-out Peter Marko
  2024-04-09  9:16 ` Alexander Kanavin
@ 2024-04-10 15:59 ` Ross Burton
  2024-04-12 13:47   ` Marko, Peter
  2024-04-10 16:18 ` Ross Burton
  2 siblings, 1 reply; 12+ messages in thread
From: Ross Burton @ 2024-04-10 15:59 UTC (permalink / raw
  To: peter.marko@siemens.com; +Cc: openembedded-core@lists.openembedded.org

On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> +           ${@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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-08  7:04 [OE-core][PATCH] systemd: make predictable name mac policy opt-out Peter Marko
  2024-04-09  9:16 ` Alexander Kanavin
  2024-04-10 15:59 ` Ross Burton
@ 2024-04-10 16:18 ` Ross Burton
  2024-04-10 18:04   ` Marko, Peter
  2 siblings, 1 reply; 12+ messages in thread
From: Ross Burton @ 2024-04-10 16:18 UTC (permalink / raw
  To: peter.marko@siemens.com; +Cc: openembedded-core@lists.openembedded.org

On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> 
> From: Peter Marko <peter.marko@siemens.com>
> 
> 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-10 16:18 ` Ross Burton
@ 2024-04-10 18:04   ` Marko, Peter
  2024-04-11 15:31     ` Francesco Dolcini
  2024-04-11 18:48     ` Slater, Joseph
  0 siblings, 2 replies; 12+ messages in thread
From: Marko, Peter @ 2024-04-10 18:04 UTC (permalink / raw
  To: Ross Burton; +Cc: openembedded-core@lists.openembedded.org


-----Original Message-----
From: Ross Burton <Ross.Burton@arm.com> 
Sent: Wednesday, April 10, 2024 18:18
To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

> On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > 
> > From: Peter Marko <peter.marko@siemens.com>
> > 
> > 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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-10 18:04   ` Marko, Peter
@ 2024-04-11 15:31     ` Francesco Dolcini
  2024-04-11 18:48     ` Slater, Joseph
  1 sibling, 0 replies; 12+ messages in thread
From: Francesco Dolcini @ 2024-04-11 15:31 UTC (permalink / raw
  To: Marko, Peter; +Cc: Ross Burton, openembedded-core@lists.openembedded.org

Hello Marko and Ross

On Wed, Apr 10, 2024 at 06:04:30PM +0000, Marko, Peter wrote:
> From: Ross Burton <Ross.Burton@arm.com> 
> > On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > > From: Peter Marko <peter.marko@siemens.com>
> > > 
> > > 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.
> 
> 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



^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-10 18:04   ` Marko, Peter
  2024-04-11 15:31     ` Francesco Dolcini
@ 2024-04-11 18:48     ` Slater, Joseph
  1 sibling, 0 replies; 12+ messages in thread
From: Slater, Joseph @ 2024-04-11 18:48 UTC (permalink / raw
  To: peter.marko@siemens.com, Ross Burton
  Cc: openembedded-core@lists.openembedded.org, MacLeod, Randy



> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Peter Marko via
> lists.openembedded.org
> Sent: Wednesday, April 10, 2024 11:05 AM
> To: Ross Burton <Ross.Burton@arm.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-
> out
> 
> 
> -----Original Message-----
> From: Ross Burton <Ross.Burton@arm.com>
> Sent: Wednesday, April 10, 2024 18:18
> To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-
> out
> 
> > On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org
> <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > >
> > > From: Peter Marko <peter.marko@siemens.com>
> > >
> > > 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

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

^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-10 15:59 ` Ross Burton
@ 2024-04-12 13:47   ` Marko, Peter
  2024-04-12 16:41     ` Richard Purdie
  0 siblings, 1 reply; 12+ messages in thread
From: Marko, Peter @ 2024-04-12 13:47 UTC (permalink / raw
  To: Ross Burton, alex@linutronix.de,
	richard.purdie@linuxfoundation.org, joe.slater@windriver.com
  Cc: openembedded-core@lists.openembedded.org

-----Original Message-----
From: Ross Burton <Ross.Burton@arm.com> 
Sent: Wednesday, April 10, 2024 18:00
To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

> On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > +           ${@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

>
> Ross


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-12 13:47   ` Marko, Peter
@ 2024-04-12 16:41     ` Richard Purdie
  2024-04-12 20:55       ` Marko, Peter
  0 siblings, 1 reply; 12+ messages in thread
From: Richard Purdie @ 2024-04-12 16:41 UTC (permalink / raw
  To: Marko, Peter, Ross Burton, alex@linutronix.de,
	joe.slater@windriver.com
  Cc: openembedded-core@lists.openembedded.org

On Fri, 2024-04-12 at 13:47 +0000, Marko, Peter wrote:
> -----Original Message-----
> From: Ross Burton <Ross.Burton@arm.com> 
> Sent: Wednesday, April 10, 2024 18:00
> To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core][PATCH] systemd: make predictable name mac
> policy opt-out
> 
> > On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org
> > <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > > +           ${@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.

FWIW I much prefer it thanks.

> 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


^ permalink raw reply	[flat|nested] 12+ messages in thread

* RE: [OE-core][PATCH] systemd: make predictable name mac policy opt-out
  2024-04-12 16:41     ` Richard Purdie
@ 2024-04-12 20:55       ` Marko, Peter
  0 siblings, 0 replies; 12+ messages in thread
From: Marko, Peter @ 2024-04-12 20:55 UTC (permalink / raw
  To: Richard Purdie, Ross Burton, alex@linutronix.de,
	joe.slater@windriver.com
  Cc: openembedded-core@lists.openembedded.org

-----Original Message-----
From: Richard Purdie <richard.purdie@linuxfoundation.org> 
Sent: Friday, April 12, 2024 18:41
To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>; Ross Burton <Ross.Burton@arm.com>; Kanavin, Alexander (EXT) (Linutronix GmbH) <alex@linutronix.de>; joe.slater@windriver.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

> On Fri, 2024-04-12 at 13:47 +0000, Marko, Peter wrote:
> > -----Original Message-----
> > From: Ross Burton <Ross.Burton@arm.com>
> > Sent: Wednesday, April 10, 2024 18:00
> > To: Marko, Peter (ADV D EU SK BFS1) <Peter.Marko@siemens.com>
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core][PATCH] systemd: make predictable name mac 
> > policy opt-out
> > 
> > > On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org 
> > > <peter.marko=siemens.com@lists.openembedded.org> wrote:
> > > > +           ${@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.
>
> FWIW I much prefer it thanks.
>
> > 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

> Cheers,
>
> Richard

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2024-04-12 20:55 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08  7:04 [OE-core][PATCH] systemd: make predictable name mac policy opt-out Peter Marko
2024-04-09  9:16 ` Alexander Kanavin
2024-04-09  9:57   ` Marko, Peter
2024-04-09 10:02     ` Alexander Kanavin
2024-04-10 15:59 ` Ross Burton
2024-04-12 13:47   ` Marko, Peter
2024-04-12 16:41     ` Richard Purdie
2024-04-12 20:55       ` Marko, Peter
2024-04-10 16:18 ` Ross Burton
2024-04-10 18:04   ` Marko, Peter
2024-04-11 15:31     ` Francesco Dolcini
2024-04-11 18:48     ` Slater, Joseph

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.