All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] migration-guides/migration-5.3.rst: add note on systemd pni-names change
@ 2025-09-09 13:29 Antonin Godard
  2025-09-09 13:59 ` [docs] " Quentin Schulz
  0 siblings, 1 reply; 7+ messages in thread
From: Antonin Godard @ 2025-09-09 13:29 UTC (permalink / raw)
  To: docs; +Cc: Thomas Petazzoni, Koen Kooi, Ross Burton, Antonin Godard

Add a migration note on the pni-names default policy change after commit
<> in OE-Core.

Cc: Koen Kooi <koen.kooi@oss.qualcomm.com>
Cc: Ross Burton <Ross.Burton@arm.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
---
 documentation/migration-guides/migration-5.3.rst | 25 ++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/documentation/migration-guides/migration-5.3.rst b/documentation/migration-guides/migration-5.3.rst
index 2d2f8d91a..8aa7b537f 100644
--- a/documentation/migration-guides/migration-5.3.rst
+++ b/documentation/migration-guides/migration-5.3.rst
@@ -118,6 +118,31 @@ class. Instead, one should create a new recipe to build this FIT image, as
 described in the :ref:`Removed Classes <migration-guides/migration-5.3:Removed
 Classes>` section of the Migration notes for |yocto-ver| (|yocto-codename|).
 
+systemd Predictable Interface Names no longer MAC policy by default
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+The :oe_git:`systemd recipe </openembedded-core/tree/meta/recipes-core/systemd>`
+used to forcibly set the MAC policy by default when the ``pni-names``
+:term:`distro feature <DISTRO_FEATURES>` was enabled. See
+https://www.freedesktop.org/software/systemd/man/latest/systemd.link.html#AlternativeNamesPolicy=.
+
+This is no longer the case. Instead, when the ``pni-names`` :term:`distro
+feature <DISTRO_FEATURES>` is enabled, the default policy from systemd is
+selected (from https://github.com/systemd/systemd/blob/main/network/99-default.link).
+
+To set the MAC policy to systemd, add the following to a systemd ``.bbappend``
+file in your custom layer::
+
+   do_install:append() {
+          if ${@bb.utils.contains('PACKAGECONFIG', 'pni-names', 'true', 'false', d)}; then
+                  if ! grep -q '^NamePolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then
+                          sed -i '/^NamePolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link
+                  fi
+                  if ! grep -q 'AlternativeNamesPolicy=.*mac' ${D}${nonarch_libdir}/systemd/network/99-default.link; then
+                          sed -i '/AlternativeNamesPolicy=/s/$/ mac/' ${D}${nonarch_libdir}/systemd/network/99-default.link
+                  fi
+   }
+
 Supported kernel versions
 ~~~~~~~~~~~~~~~~~~~~~~~~~
 

---
base-commit: ee0b46bd074dd34c3d6b401e65d2c519c2c3d47b
change-id: 20250904-systemd-pni-names-a9e6c45602c9

Best regards,
--  
Antonin Godard <antonin.godard@bootlin.com>



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

end of thread, other threads:[~2025-09-12 11:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-09 13:29 [PATCH] migration-guides/migration-5.3.rst: add note on systemd pni-names change Antonin Godard
2025-09-09 13:59 ` [docs] " Quentin Schulz
2025-09-10 13:08   ` Antonin Godard
2025-09-10 13:16     ` Quentin Schulz
2025-09-10 13:32       ` Antonin Godard
2025-09-10 14:08         ` Quentin Schulz
2025-09-12 11:27           ` Antonin Godard

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.