From 8da357a7ed88a61bec9790f56cefd8882e90dccd1a15a36f67afbdfe6df3a7ab Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 21 Dec 2023 08:24:37 +0000 Subject: [PATCH 1/5] disable kmod support for the mini flavor, this complements the previous change OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1479 --- systemd.spec | 1 + 1 file changed, 1 insertion(+) diff --git a/systemd.spec b/systemd.spec index daba32a2..efdc4ba1 100644 --- a/systemd.spec +++ b/systemd.spec @@ -761,6 +761,7 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2" -Dhtml=%{when_not bootstrap} \ -Dima=%{when_not bootstrap} \ -Dkernel-install=%{when_not bootstrap} \ + -Dkmod=%{when_not bootstrap} \ -Dlibcryptsetup-plugins=%{when_not bootstrap} \ -Dman=%{when_not bootstrap} \ -Dnss-myhostname=%{when_not bootstrap} \ From a52c2fed3d1175cab429c0dac4052d3dff322bdf172bc792f5d6ae82b369d404 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Thu, 21 Dec 2023 10:22:01 +0000 Subject: [PATCH 2/5] document bsc#1218137 in the changelogs OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1480 --- systemd.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/systemd.changes b/systemd.changes index 143ed472..3280cf7d 100644 --- a/systemd.changes +++ b/systemd.changes @@ -10,7 +10,7 @@ Wed Dec 20 12:40:55 UTC 2023 - Franck Bui - Import commit 071ac409a0564863657d8f8a5a35e6a4f914695f - 071ac409a0 rules: set up tty permissions and group for /dev/hvc* nodes + 071ac409a0 rules: set up tty permissions and group for /dev/hvc* nodes (bsc#1218137) f693b3ed8a vconsole-setup: remember the correct error value when open_terminal() fails 963d838bad vconsole-setup: handle the case where the vc is in KD_GRAPHICS mode more gracefully (bsc#1215282) 6f53f71d2d vconsole-setup: simplify error handling From c2a41999854eb737c81aca48bea5393fbceca3d293cc86f047a237c730e91779 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 22 Dec 2023 10:27:31 +0000 Subject: [PATCH 3/5] Accepting request 1134609 from home:dimstar:Factory - udev(-mini)?: ensure %_modulesloaddir exists and is owned properly. Allows other packages to install modules without worry of the parent directory. We do not ensure /etc/modules-load.d exists in the -mini flavor, as that directory is not meant to be used by packages. OBS-URL: https://build.opensuse.org/request/show/1134609 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1481 --- files.udev | 2 ++ systemd.changes | 9 +++++++++ systemd.spec | 4 ++++ 3 files changed, 15 insertions(+) diff --git a/files.udev b/files.udev index c32bbb71..1f8a39cf 100644 --- a/files.udev +++ b/files.udev @@ -4,7 +4,9 @@ %config(noreplace) %{_sysconfdir}/udev/udev.conf %if %{without bootstrap} %dir %{_libdir}/cryptsetup +%endif %dir %{_modulesloaddir} +%if %{without bootstrap} %dir %{_prefix}/lib/kernel %dir %{_prefix}/lib/kernel/install.d %endif diff --git a/systemd.changes b/systemd.changes index 3280cf7d..d0b5fe54 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Thu Dec 21 10:11:53 UTC 2023 - Dominique Leuenberger + +- udev(-mini)?: ensure %_modulesloaddir exists and is owned + properly. Allows other packages to install modules without worry + of the parent directory. We do not ensure /etc/modules-load.d + exists in the -mini flavor, as that directory is not meant to be + used by packages. + ------------------------------------------------------------------- Wed Dec 20 12:49:09 UTC 2023 - Dominique Leuenberger diff --git a/systemd.spec b/systemd.spec index efdc4ba1..07e641b9 100644 --- a/systemd.spec +++ b/systemd.spec @@ -862,6 +862,10 @@ mkdir -p %{buildroot}%{_modprobedir} mv %{buildroot}/usr/lib/modprobe.d/* %{buildroot}%{_modprobedir}/ %endif +# Make sure /usr/lib/modules-load.d exists in udev(-mini)?, so other +# packages can install modules without worry +mkdir -p %{buildroot}%{_modulesloaddir} + # Make sure we don't ship static enablement symlinks in /etc during # installation, presets should be honoured instead. rm -rf %{buildroot}%{_sysconfdir}/systemd/system/*.target.{requires,wants} From 31bc789b24fb4c68480f3590da6baec6733e25a2a73f337112a1192935c9b906 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 12 Jan 2024 09:56:05 +0000 Subject: [PATCH 4/5] - Import commit 67a5ac1043417d900bf417a884372ae14a96ef69 (merge of v254.8) For a complete list of changes, visit: https://github.com/openSUSE/systemd/compare/071ac409a0564863657d8f8a5a35e6a4f914695f...67a5ac1043417d900bf417a884372ae14a96ef69 OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1482 --- systemd-v254.5+suse.21.g071ac409a0.tar.xz | 3 --- systemd-v254.8+suse.22.g67a5ac1043.tar.xz | 3 +++ systemd.changes | 8 ++++++++ systemd.spec | 6 +++--- 4 files changed, 14 insertions(+), 6 deletions(-) delete mode 100644 systemd-v254.5+suse.21.g071ac409a0.tar.xz create mode 100644 systemd-v254.8+suse.22.g67a5ac1043.tar.xz diff --git a/systemd-v254.5+suse.21.g071ac409a0.tar.xz b/systemd-v254.5+suse.21.g071ac409a0.tar.xz deleted file mode 100644 index d42f86a8..00000000 --- a/systemd-v254.5+suse.21.g071ac409a0.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4b5a0cb1989c2850c7087d2f1c00051878e26505a71ffe3287e27011b81023c8 -size 10352172 diff --git a/systemd-v254.8+suse.22.g67a5ac1043.tar.xz b/systemd-v254.8+suse.22.g67a5ac1043.tar.xz new file mode 100644 index 00000000..1e72540b --- /dev/null +++ b/systemd-v254.8+suse.22.g67a5ac1043.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7bedcb8262cd6cccbd2d16aff5466c8e98c92ae5108e65f8fb88dcc47a0f8d93 +size 10403896 diff --git a/systemd.changes b/systemd.changes index d0b5fe54..da9da129 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Fri Jan 12 09:34:14 UTC 2024 - Franck Bui + +- Import commit 67a5ac1043417d900bf417a884372ae14a96ef69 (merge of v254.8) + + For a complete list of changes, visit: + https://github.com/openSUSE/systemd/compare/071ac409a0564863657d8f8a5a35e6a4f914695f...67a5ac1043417d900bf417a884372ae14a96ef69 + ------------------------------------------------------------------- Thu Dec 21 10:11:53 UTC 2023 - Dominique Leuenberger diff --git a/systemd.spec b/systemd.spec index 07e641b9..1255bb8f 100644 --- a/systemd.spec +++ b/systemd.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,7 +18,7 @@ %global flavor @BUILD_FLAVOR@%{nil} -%define archive_version +suse.21.g071ac409a0 +%define archive_version +suse.22.g67a5ac1043 %define _testsuitedir %{_systemd_util_dir}/tests %define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit @@ -79,7 +79,7 @@ fi \ Name: systemd%{?mini} URL: http://www.freedesktop.org/wiki/Software/systemd -Version: 254.5 +Version: 254.8 Release: 0 Summary: A System and Session Manager License: LGPL-2.1-or-later From b8562e417751467ba7d4373c8832f888929bae4e9b4e0eab34ef502aab23b040 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Fri, 12 Jan 2024 10:19:47 +0000 Subject: [PATCH 5/5] - Add 5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch 5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch It seems that systemd upstream has a dubious way to fix broken code these days... let's revert these hacks until a final decision is taken to solve https://github.com/systemd/systemd/issues/28141. See also https://github.com/systemd/systemd/pull/30075. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1483 --- ...te-devlink-with-the-newer-device-nod.patch | 37 +++++++++++++++++++ ...rt-workarounds-for-issues-caused-by-.patch | 36 ++++++++++++++++++ systemd.changes | 11 ++++++ systemd.spec | 2 + 4 files changed, 86 insertions(+) create mode 100644 5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch create mode 100644 5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch diff --git a/5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch b/5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch new file mode 100644 index 00000000..691f628a --- /dev/null +++ b/5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch @@ -0,0 +1,37 @@ +From 323274d5e7545013b09c280254879dcbf1430fbf Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Fri, 12 Jan 2024 10:54:57 +0100 +Subject: [PATCH 5001/5002] Revert "udev: update devlink with the newer device + node even when priority is equivalent" + +This reverts commit 277cb24ffb7a520f640eb36d11340f11bf0c7c4f. +--- + src/udev/udev-node.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/src/udev/udev-node.c b/src/udev/udev-node.c +index 74a70185bc..75845413cf 100644 +--- a/src/udev/udev-node.c ++++ b/src/udev/udev-node.c +@@ -468,13 +468,13 @@ static int link_update(sd_device *dev, const char *slink, bool add) { + /* The devlink priority is downgraded. Another device may have a higher + * priority now. Let's find the device node with the highest priority. */ + } else { +- if (current_prio > prio) +- /* The devlink with a higher priority already exists and is owned by +- * another device. Hence, it is not necessary to recreate it. */ ++ if (current_prio >= prio) ++ /* The devlink with equal or higher priority already exists and is ++ * owned by another device. Hence, it is not necessary to recreate it. */ + return 0; + +- /* This device has the equal or a higher priority than the current. Let's +- * create the devlink to our device node. */ ++ /* This device has a higher priority than the current. Let's create the ++ * devlink to our device node. */ + return node_symlink(dev, NULL, slink); + } + +-- +2.35.3 + diff --git a/5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch b/5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch new file mode 100644 index 00000000..37e58f64 --- /dev/null +++ b/5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch @@ -0,0 +1,36 @@ +From 65b0ae29194a335dc2cc1410d57acf7307251791 Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Fri, 12 Jan 2024 10:55:17 +0100 +Subject: [PATCH 5002/5002] Revert "udev: revert workarounds for issues caused + by the devlink creation optimization" + +This reverts commit b8fa62589271a0a7552c6eb02e6beac3ca759ba7. +--- + rules.d/60-persistent-storage.rules.in | 11 +++++++++++ + 1 file changed, 11 insertions(+) + +diff --git a/rules.d/60-persistent-storage.rules.in b/rules.d/60-persistent-storage.rules.in +index 835263f3cb..d5e0f5f705 100644 +--- a/rules.d/60-persistent-storage.rules.in ++++ b/rules.d/60-persistent-storage.rules.in +@@ -134,6 +134,17 @@ KERNEL!="sr*|mmcblk[0-9]boot[0-9]", IMPORT{builtin}="blkid" + LABEL="persistent_storage_blkid_probe_end" + {% endif %} + ++# Decrease devlink priority for whole disk of ISO hybrid images, and make the ++# priority for partitions in the image relatively higher. This is for the case ++# that a disk and one of its partition have the same label or so. ++# See issue #28468. ++ENV{ID_FS_TYPE}=="iso9660", ENV{DEVTYPE}=="disk", OPTIONS+="link_priority=-10" ++ ++# Decrease devlink priority for encrypted partitions, and make the priority for ++# decrypted DM devices relatively higher. This is for the case that an encrypted ++# partition and its decrypted DM device have the same label. ++ENV{ID_FS_USAGE}=="crypto", OPTIONS+="link_priority=-10" ++ + # by-label/by-uuid links (filesystem metadata) + ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}" + ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}" +-- +2.35.3 + diff --git a/systemd.changes b/systemd.changes index da9da129..40bd609f 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,14 @@ +------------------------------------------------------------------- +Fri Jan 12 10:12:15 UTC 2024 - Franck Bui + +- Add 5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch + 5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch + + It seems that systemd upstream has a dubious way to fix broken code these + days... let's revert these hacks until a final decision is taken to solve + https://github.com/systemd/systemd/issues/28141. See also + https://github.com/systemd/systemd/pull/30075. + ------------------------------------------------------------------- Fri Jan 12 09:34:14 UTC 2024 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 1255bb8f..3d98cedc 100644 --- a/systemd.spec +++ b/systemd.spec @@ -219,6 +219,8 @@ Patch5: 0008-sysv-generator-translate-Required-Start-into-a-Wants.patch # very few cases, some stuff might be broken in upstream and need to be fixed or # worked around quickly. In these cases, the patches are added temporarily and # will be removed as soon as a proper fix will be merged by upstream. +Patch5001: 5001-Revert-udev-update-devlink-with-the-newer-device-nod.patch +Patch5002: 5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch %description Systemd is a system and service manager, compatible with SysV and LSB