Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-12 Thread Peter Marko via lists.openembedded.org
-Original Message-
From: Richard Purdie  
Sent: Friday, April 12, 2024 18:41
To: Marko, Peter (ADV D EU SK BFS1) ; Ross Burton 
; Kanavin, Alexander (EXT) (Linutronix GmbH) 
; joe.sla...@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 +, Marko, Peter wrote:
> > -Original Message-
> > From: Ross Burton 
> > Sent: Wednesday, April 10, 2024 18:00
> > To: Marko, Peter (ADV D EU SK BFS1) 
> > 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 
> > >  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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198186): 
https://lists.openembedded.org/g/openembedded-core/message/198186
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-12 Thread Francesco Dolcini
Hello Marko and Ross

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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198185): 
https://lists.openembedded.org/g/openembedded-core/message/198185
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-12 Thread Richard Purdie
On Fri, 2024-04-12 at 13:47 +, Marko, Peter wrote:
> -Original Message-
> From: Ross Burton  
> Sent: Wednesday, April 10, 2024 18:00
> To: Marko, Peter (ADV D EU SK BFS1) 
> 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
> >  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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198177): 
https://lists.openembedded.org/g/openembedded-core/message/198177
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-12 Thread Peter Marko via lists.openembedded.org
-Original Message-
From: Ross Burton  
Sent: Wednesday, April 10, 2024 18:00
To: Marko, Peter (ADV D EU SK BFS1) 
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 
>  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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198168): 
https://lists.openembedded.org/g/openembedded-core/message/198168
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-11 Thread Joe Slater via lists.openembedded.org


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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198141): 
https://lists.openembedded.org/g/openembedded-core/message/198141
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-10 Thread Peter Marko via lists.openembedded.org

-Original Message-
From: Ross Burton  
Sent: Wednesday, April 10, 2024 18:18
To: Marko, Peter (ADV D EU SK BFS1) 
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 
>  wrote:
> > 
> > From: Peter Marko 
> > 
> > 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198105): 
https://lists.openembedded.org/g/openembedded-core/message/198105
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-10 Thread Ross Burton
On 8 Apr 2024, at 08:04, Peter Marko via lists.openembedded.org 
 wrote:
> 
> From: Peter Marko 
> 
> 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
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198102): 
https://lists.openembedded.org/g/openembedded-core/message/198102
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-10 Thread Ross Burton
On 8 Apr 2024, at 08:04, Peter Marko via 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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198101): 
https://lists.openembedded.org/g/openembedded-core/message/198101
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-09 Thread Alexander Kanavin
On Tue, 9 Apr 2024 at 11:57, Marko, Peter  wrote:
>
> -Original Message-
> From: Alexander Kanavin 
> Sent: Tuesday, April 9, 2024 11:16
> To: Marko, Peter (ADV D EU SK BFS1) 
> 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 
> >  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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198062): 
https://lists.openembedded.org/g/openembedded-core/message/198062
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-09 Thread Peter Marko via lists.openembedded.org
-Original Message-
From: Alexander Kanavin  
Sent: Tuesday, April 9, 2024 11:16
To: Marko, Peter (ADV D EU SK BFS1) 
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 
>  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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198061): 
https://lists.openembedded.org/g/openembedded-core/message/198061
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



Re: [OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-09 Thread Alexander Kanavin
On Mon, 8 Apr 2024 at 09:06, Peter Marko via 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

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198057): 
https://lists.openembedded.org/g/openembedded-core/message/198057
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-



[OE-core][PATCH] systemd: make predictable name mac policy opt-out

2024-04-08 Thread Peter Marko via lists.openembedded.org
From: Peter Marko 

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 
---
 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


-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#198005): 
https://lists.openembedded.org/g/openembedded-core/message/198005
Mute This Topic: https://lists.openembedded.org/mt/105396950/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-