SHA256
1
0
forked from pool/systemd

Accepting request 741485 from home:fbui:systemd:openSUSE-Factory

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

OBS-URL: https://build.opensuse.org/request/show/741485
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1075
This commit is contained in:
Franck Bui 2019-10-21 11:34:05 +00:00 committed by Git OBS Bridge
parent 17ef8bf2c2
commit 8c26be2519
5 changed files with 68 additions and 8 deletions

View File

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

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 21 10:33:27 UTC 2019 - Franck Bui <fbui@suse.com>
- 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 <lnussel@suse.de>

View File

@ -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/

View File

@ -1,3 +1,11 @@
-------------------------------------------------------------------
Mon Oct 21 10:33:27 UTC 2019 - Franck Bui <fbui@suse.com>
- 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 <lnussel@suse.de>

View File

@ -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/