systemd/5002-Revert-udev-revert-workarounds-for-issues-caused-by-.patch
Franck Bui b8562e4177 - 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
2024-01-12 10:19:47 +00:00

37 lines
1.7 KiB
Diff

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