SHA256
1
0
forked from pool/systemd

Accepting request 1138298 from Base:System

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

- Import commit 67a5ac1043417d900bf417a884372ae14a96ef69 (merge of v254.8)
  For a complete list of changes, visit:
  071ac409a0...67a5ac1043

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

  071ac409a0 rules: set up tty permissions and group for /dev/hvc* nodes (bsc#1218137)

OBS-URL: https://build.opensuse.org/request/show/1138298
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=411
This commit is contained in:
Ana Guerrero 2024-01-14 18:01:13 +00:00 committed by Git OBS Bridge
commit f26756ace3
7 changed files with 117 additions and 7 deletions

View File

@ -0,0 +1,37 @@
From 323274d5e7545013b09c280254879dcbf1430fbf Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
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

View File

@ -0,0 +1,36 @@
From 65b0ae29194a335dc2cc1410d57acf7307251791 Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
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

View File

@ -4,7 +4,9 @@
%config(noreplace) %{_sysconfdir}/udev/udev.conf %config(noreplace) %{_sysconfdir}/udev/udev.conf
%if %{without bootstrap} %if %{without bootstrap}
%dir %{_libdir}/cryptsetup %dir %{_libdir}/cryptsetup
%endif
%dir %{_modulesloaddir} %dir %{_modulesloaddir}
%if %{without bootstrap}
%dir %{_prefix}/lib/kernel %dir %{_prefix}/lib/kernel
%dir %{_prefix}/lib/kernel/install.d %dir %{_prefix}/lib/kernel/install.d
%endif %endif

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4b5a0cb1989c2850c7087d2f1c00051878e26505a71ffe3287e27011b81023c8
size 10352172

BIN
systemd-v254.8+suse.22.g67a5ac1043.tar.xz (Stored with Git LFS) Normal file

Binary file not shown.

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Fri Jan 12 10:12:15 UTC 2024 - Franck Bui <fbui@suse.com>
- 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 <fbui@suse.com>
- 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 <dimstar@opensuse.org>
- 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 <dimstar@opensuse.org> Wed Dec 20 12:49:09 UTC 2023 - Dominique Leuenberger <dimstar@opensuse.org>
@ -10,7 +38,7 @@ Wed Dec 20 12:40:55 UTC 2023 - Franck Bui <fbui@suse.com>
- Import commit 071ac409a0564863657d8f8a5a35e6a4f914695f - 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 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) 963d838bad vconsole-setup: handle the case where the vc is in KD_GRAPHICS mode more gracefully (bsc#1215282)
6f53f71d2d vconsole-setup: simplify error handling 6f53f71d2d vconsole-setup: simplify error handling

View File

@ -1,7 +1,7 @@
# #
# spec file # spec file
# #
# Copyright (c) 2023 SUSE LLC # Copyright (c) 2024 SUSE LLC
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -18,7 +18,7 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%define archive_version +suse.21.g071ac409a0 %define archive_version +suse.22.g67a5ac1043
%define _testsuitedir %{_systemd_util_dir}/tests %define _testsuitedir %{_systemd_util_dir}/tests
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit %define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
@ -79,7 +79,7 @@ fi \
Name: systemd%{?mini} Name: systemd%{?mini}
URL: http://www.freedesktop.org/wiki/Software/systemd URL: http://www.freedesktop.org/wiki/Software/systemd
Version: 254.5 Version: 254.8
Release: 0 Release: 0
Summary: A System and Session Manager Summary: A System and Session Manager
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
@ -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 # 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 # 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. # 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 %description
Systemd is a system and service manager, compatible with SysV and LSB Systemd is a system and service manager, compatible with SysV and LSB
@ -761,6 +763,7 @@ export CFLAGS="%{optflags} -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2"
-Dhtml=%{when_not bootstrap} \ -Dhtml=%{when_not bootstrap} \
-Dima=%{when_not bootstrap} \ -Dima=%{when_not bootstrap} \
-Dkernel-install=%{when_not bootstrap} \ -Dkernel-install=%{when_not bootstrap} \
-Dkmod=%{when_not bootstrap} \
-Dlibcryptsetup-plugins=%{when_not bootstrap} \ -Dlibcryptsetup-plugins=%{when_not bootstrap} \
-Dman=%{when_not bootstrap} \ -Dman=%{when_not bootstrap} \
-Dnss-myhostname=%{when_not bootstrap} \ -Dnss-myhostname=%{when_not bootstrap} \
@ -861,6 +864,10 @@ mkdir -p %{buildroot}%{_modprobedir}
mv %{buildroot}/usr/lib/modprobe.d/* %{buildroot}%{_modprobedir}/ mv %{buildroot}/usr/lib/modprobe.d/* %{buildroot}%{_modprobedir}/
%endif %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 # Make sure we don't ship static enablement symlinks in /etc during
# installation, presets should be honoured instead. # installation, presets should be honoured instead.
rm -rf %{buildroot}%{_sysconfdir}/systemd/system/*.target.{requires,wants} rm -rf %{buildroot}%{_sysconfdir}/systemd/system/*.target.{requires,wants}