diff --git a/0001-compat-rules-escape-when-used-for-shell-expansion.patch b/0001-compat-rules-escape-when-used-for-shell-expansion.patch new file mode 100644 index 00000000..207188cb --- /dev/null +++ b/0001-compat-rules-escape-when-used-for-shell-expansion.patch @@ -0,0 +1,46 @@ +From b37054aa5aebfed9e7c8ee423067aefef0facd39 Mon Sep 17 00:00:00 2001 +From: Franck Bui +Date: Wed, 9 Oct 2019 16:11:17 +0200 +Subject: [PATCH] compat-rules: escape '$' when used for shell expansion + +Make sure to use '$$' in shell expansions since the behavior of udev +is undefined when it encounters unknown substitions. + +udev used to silently ignore them but since v243 (commit +d7aee41db35f808bca), it throws such warning: + + systemd-udevd[443]: /usr/lib/udev/rules.d/61-persistent-storage-compat.rules:83 Invalid value "/bin/sh -c 'eui="%s{eui}"; echo ${eui// /}" for PROGRAM (char 33: invalid substitution type), ignoring, but please fix it. + +No functional changes. +--- + rules/61-persistent-storage-compat.rules | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/rules/61-persistent-storage-compat.rules b/rules/61-persistent-storage-compat.rules +index 0cdc8c4195..bd229f619b 100644 +--- a/rules/61-persistent-storage-compat.rules ++++ b/rules/61-persistent-storage-compat.rules +@@ -80,17 +80,17 @@ ENV{COMPAT_SYMLINK_GENERATION}!="1", GOTO="generation_2" + # symlink is created. + + KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_EUI_COMPAT}!="?*", ATTRS{eui}=="?*", ATTRS{eui}!="0000000000000000", \ +- PROGRAM=="/bin/sh -c 'eui=\"%s{eui}\"; echo ${eui// /}", ENV{ID_NVME_EUI_COMPAT}="2%c" ++ PROGRAM=="/bin/sh -c 'eui=\"%s{eui}\"; echo $${eui// /}", ENV{ID_NVME_EUI_COMPAT}="2%c" + + KERNEL=="nvme*", ENV{DEVTYPE}=="disk", ENV{ID_NVME_NGUID_COMPAT}!="?*", ATTRS{nguid}=="?*", \ +- PROGRAM=="/bin/sh -c 'nguid=\"%s{nguid}\"; echo ${nguid//-/}", ENV{ID_NVME_NGUID_COMPAT}="%c" ++ PROGRAM=="/bin/sh -c 'nguid=\"%s{nguid}\"; echo $${nguid//-/}", ENV{ID_NVME_NGUID_COMPAT}="%c" + + 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; \ ++ [ $$(pwd) = %S ] && exit 1; \ + done; \ + cut -c 1-16 model'", ENV{ID_NVME_SERIAL_COMPAT}="SNVMe_%c%s{serial}" + +-- +2.16.4 + diff --git a/systemd-mini.changes b/systemd-mini.changes index 37b6b69c..8196fde7 100644 --- a/systemd-mini.changes +++ b/systemd-mini.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Oct 21 10:33:27 UTC 2019 - Franck Bui + +- Add 0001-compat-rules-escape-when-used-for-shell-expansion.patch (bsc#1153648) + + Added to the quaratine area to avoid uploading a new tar ball just + for that single change. It will be dropped during the next import. + ------------------------------------------------------------------- Mon Oct 21 09:06:10 UTC 2019 - Ludwig Nussel diff --git a/systemd-mini.spec b/systemd-mini.spec index 82c6a17f..45161ddd 100644 --- a/systemd-mini.spec +++ b/systemd-mini.spec @@ -167,6 +167,7 @@ Source200: scripts-udev-convert-lib-udev-path.sh # 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-compat-rules-escape-when-used-for-shell-expansion.patch Patch2: 0001-logind-keep-backward-compatibility-with-UserTasksMax.patch %description @@ -1276,10 +1277,6 @@ fi %{_datadir}/zsh/site-functions/* %{_datadir}/pkgconfig/systemd.pc -%if ! 0%{?bootstrap} -%files lang -f systemd.lang -%endif - %files devel %defattr(-,root,root,-) %{_libdir}/libsystemd.so @@ -1441,6 +1438,8 @@ fi %endif %if ! 0%{?bootstrap} +%files lang -f systemd.lang + %files logger %defattr(-,root,root) %dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/ diff --git a/systemd.changes b/systemd.changes index 37b6b69c..8196fde7 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Oct 21 10:33:27 UTC 2019 - Franck Bui + +- Add 0001-compat-rules-escape-when-used-for-shell-expansion.patch (bsc#1153648) + + Added to the quaratine area to avoid uploading a new tar ball just + for that single change. It will be dropped during the next import. + ------------------------------------------------------------------- Mon Oct 21 09:06:10 UTC 2019 - Ludwig Nussel diff --git a/systemd.spec b/systemd.spec index 841ba419..2a119e33 100644 --- a/systemd.spec +++ b/systemd.spec @@ -165,6 +165,7 @@ Source200: scripts-udev-convert-lib-udev-path.sh # 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-compat-rules-escape-when-used-for-shell-expansion.patch Patch2: 0001-logind-keep-backward-compatibility-with-UserTasksMax.patch %description @@ -1274,10 +1275,6 @@ fi %{_datadir}/zsh/site-functions/* %{_datadir}/pkgconfig/systemd.pc -%if ! 0%{?bootstrap} -%files lang -f systemd.lang -%endif - %files devel %defattr(-,root,root,-) %{_libdir}/libsystemd.so @@ -1439,6 +1436,8 @@ fi %endif %if ! 0%{?bootstrap} +%files lang -f systemd.lang + %files logger %defattr(-,root,root) %dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/