From 0d248802e0593105f7ffad1944efae3482d77b8d11640d1871a3c421db2096df Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Wed, 29 Nov 2017 10:41:17 +0000 Subject: [PATCH] - Import commit e30f1b10e276fb18db10ea2463fbd7146ae778f6 63481b24b firstboot: do not write vconsole.conf when arg_keymap is empty (bsc#1070124) - Add 0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch (bsc#1051465) This patch is not yet merged in the 'compats/udev-compat-symlinks' branch: we asked to upstream if it would be possible to introduce a new specifier that wouldn't strip trailing whitespaces , see https://github.com/systemd/systemd/issues/7462 Also this allows to give the patch more testing before merging it in the git repo. OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=999 --- ...-rid-of-scsi_id-when-generating-comp.patch | 77 +++++++++++++++++++ systemd-234.tar.xz | 4 +- systemd-mini.changes | 20 +++++ systemd-mini.spec | 3 +- systemd.changes | 20 +++++ systemd.spec | 3 +- 6 files changed, 123 insertions(+), 4 deletions(-) create mode 100644 0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch diff --git a/0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch b/0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch new file mode 100644 index 0000000..16bb923 --- /dev/null +++ b/0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch @@ -0,0 +1,77 @@ +From 17be35b017aa39fad8aec98c81d4fade917096ec Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Mon, 27 Nov 2017 11:46:40 +0100 +Subject: [PATCH 1/1] compat-rules: get rid of scsi_id when generating compat + symlinks for NVMe devices + +The SCSI translation layer for NVMe devices has been removed from the +kernel since 4.13 (commit 3f7f25a910ed8988b2a87c1ca2bfee6b4fb83ac7), +so drop scsi_id in favor of the sysfs interface to generate the +name of the compat symlinks. + +Unfortunately we have to retrieve manually the model attribute +because %s{} strips trailing whitespaces otherwise. Indeed scsi_id +replaced them with a single '_' char due to the use of the +'--replace-whitespace' option. + +[tblume: fixes bsc#1051465] +--- + rules/61-persistent-storage-compat.rules | 34 ++++++++++++++++++++++++++++---- + 1 file changed, 30 insertions(+), 4 deletions(-) + +diff --git a/rules/61-persistent-storage-compat.rules b/rules/61-persistent-storage-compat.rules +index 82a38fac7..639dc1ee1 100644 +--- a/rules/61-persistent-storage-compat.rules ++++ b/rules/61-persistent-storage-compat.rules +@@ -16,6 +16,10 @@ + # doesn't rely on them and they could be disabled permanently. + # + # Thanks ! ++# ++# Note: this rules file can rely on all ID_* variables (set by ++# 60-persistent-storage.rule) but should not overwrite them, see ++# bsc#1048679 for details. + + ACTION=="remove", GOTO="persistent_storage_end" + +@@ -49,11 +53,33 @@ ENV{COMPAT_SYMLINK_GENERATION}!="?*", ENV{COMPAT_SYMLINK_GENERATION}="1" + # + ENV{COMPAT_SYMLINK_GENERATION}!="1", GOTO="generation_2" + +-# NVMe links were introduced first via a SUSE specific commit ++# NVMe symlinks were introduced first via a SUSE specific commit + # (bsc#944132) and upstream gained support later but of course using a +-# different scheme. Also note that ID_SERIAL is already used by the +-# contemporary rules, see bsc#1048679 for details. +-KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_SERIAL_COMPAT}!="?*", PROGRAM="scsi_id --whitelisted --replace-whitespace -d $devnode", RESULT=="?*", ENV{ID_NVME_SERIAL_COMPAT}="$result" ++# different scheme. ++ ++# The SCSI translation layer for NVMe devices has been removed from ++# the kernel since 4.13, therefore we switched from scsi_id to the ++# sysfs interface to generate the name of the compat symlinks. ++# Unfortunately we can't use %s{model} to retrieve the model string ++# because udev strips any trailing whitespaces and some plateforms ++# (QEMU does that) might append such chars. In those cases scsi_id was ++# replacing them with a single trailing '_'. Therefore the currently ++# code retrieves the model string manually making sure to preserve all ++# characters so trailing whitespaces are still converted when the ++# symlink is created. ++ ++# KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_SERIAL_COMPAT}!="?*", ATTRS{model}=="?*", ATTRS{serial}=="?*" \ ++# PROGRAM=="/bin/sh -c 'MODEL=\"%s{model}\"; echo \"${MODEL:0:16}\"'", ENV{ID_NVME_SERIAL_COMPAT}="SNVMe_%c%s{serial}" ++ ++KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_SERIAL_COMPAT}!="?*", ATTRS{model}=="?*", ATTRS{serial}=="?*" \ ++ PROGRAM=="/bin/sh -c ' \ ++ cd /sys/%p; \ ++ while ! [ -f model ]; do \ ++ cd ..; \ ++ [ $(pwd) = %S ] && exit 1; \ ++ done; \ ++ cut -c 1-16 model'", ENV{ID_NVME_SERIAL_COMPAT}="SNVMe_%c%s{serial}" ++ + KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_SERIAL_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_SERIAL_COMPAT}" + KERNEL=="nvme*", ENV{DEVTYPE}=="partition", ENV{ID_NVME_SERIAL_COMPAT}=="?*", SYMLINK+="disk/by-id/nvme-$env{ID_NVME_SERIAL_COMPAT}-part%n" + +-- +2.14.2 + diff --git a/systemd-234.tar.xz b/systemd-234.tar.xz index 82798d6..37172a1 100644 --- a/systemd-234.tar.xz +++ b/systemd-234.tar.xz @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:ab5243e5fdfdc523a41515356a75df1b5e7f6697c4f5a3718ef9ea42056aa408 -size 3352640 +oid sha256:41f96893041fe93197c142ca64f51f882e6c5d4c50c774091e5ff4fc36a814e0 +size 3352496 diff --git a/systemd-mini.changes b/systemd-mini.changes index 75f7133..5b3da89 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Wed Nov 29 10:11:54 UTC 2017 - fbui@suse.com + +- Import commit e30f1b10e276fb18db10ea2463fbd7146ae778f6 + + 63481b24b firstboot: do not write vconsole.conf when arg_keymap is empty (bsc#1070124) + +------------------------------------------------------------------- +Wed Nov 29 09:58:08 UTC 2017 - fbui@suse.com + +- Add 0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch (bsc#1051465) + + This patch is not yet merged in the 'compats/udev-compat-symlinks' + branch: we asked to upstream if it would be possible to introduce a + new specifier that wouldn't strip trailing whitespaces , see + https://github.com/systemd/systemd/issues/7462 + + Also this allows to give the patch more testing before merging it in + the git repo. + ------------------------------------------------------------------- Thu Nov 23 17:33:19 UTC 2017 - fbui@suse.com diff --git a/systemd-mini.spec b/systemd-mini.spec index ebe895c..00f024d 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -155,13 +155,14 @@ Source200: scripts-udev-convert-lib-udev-path.sh Source1065: udev-remount-tmpfs -# Patches listed in here are really special cases. Normally all +# Patches listed in here are put in quarantine. Normally all # changes must go to upstream first and then are cherry-picked in the # SUSE git repository. But in very few cases, some stuff might be # broken in upstream and need an urgent fix. Even in this case, the # patches are temporary and should be removed as soon as a fix is # merged by upstream. Patch1: 0001-core-disable-session-keyring-per-system-sevice-entir.patch +Patch2: 0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch %description Systemd is a system and service manager, compatible with SysV and LSB diff --git a/systemd.changes b/systemd.changes index 75f7133..5b3da89 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,23 @@ +------------------------------------------------------------------- +Wed Nov 29 10:11:54 UTC 2017 - fbui@suse.com + +- Import commit e30f1b10e276fb18db10ea2463fbd7146ae778f6 + + 63481b24b firstboot: do not write vconsole.conf when arg_keymap is empty (bsc#1070124) + +------------------------------------------------------------------- +Wed Nov 29 09:58:08 UTC 2017 - fbui@suse.com + +- Add 0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch (bsc#1051465) + + This patch is not yet merged in the 'compats/udev-compat-symlinks' + branch: we asked to upstream if it would be possible to introduce a + new specifier that wouldn't strip trailing whitespaces , see + https://github.com/systemd/systemd/issues/7462 + + Also this allows to give the patch more testing before merging it in + the git repo. + ------------------------------------------------------------------- Thu Nov 23 17:33:19 UTC 2017 - fbui@suse.com diff --git a/systemd.spec b/systemd.spec index 6a1ef97..2ffba83 100644 --- a/systemd.spec +++ b/systemd.spec @@ -153,13 +153,14 @@ Source200: scripts-udev-convert-lib-udev-path.sh Source1065: udev-remount-tmpfs -# Patches listed in here are really special cases. Normally all +# Patches listed in here are put in quarantine. Normally all # changes must go to upstream first and then are cherry-picked in the # SUSE git repository. But in very few cases, some stuff might be # broken in upstream and need an urgent fix. Even in this case, the # patches are temporary and should be removed as soon as a fix is # merged by upstream. Patch1: 0001-core-disable-session-keyring-per-system-sevice-entir.patch +Patch2: 0001-compat-rules-get-rid-of-scsi_id-when-generating-comp.patch %description Systemd is a system and service manager, compatible with SysV and LSB