diff --git a/0003-kernel-install-avoid-process-substitution.patch b/0003-kernel-install-avoid-process-substitution.patch new file mode 100644 index 0000000..6c5c725 --- /dev/null +++ b/0003-kernel-install-avoid-process-substitution.patch @@ -0,0 +1,54 @@ +From 83a5e5d1f889744bedac8c9e813bf5d3d002a700 Mon Sep 17 00:00:00 2001 +From: Michal Schmidt +Date: Fri, 16 Dec 2016 18:14:47 +0100 +Subject: [PATCH] kernel-install: avoid process substitution + +bash implements process substitution using /dev/fd/N (this is documented +in man bash). We'd like kernel-install to work in chrooted RPM +scriptlets without /dev. + +We can use here-strings instead. bash uses temporary files to implement +those. +--- + src/kernel-install/kernel-install | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install +index a95b9717f0..c7d9f4eea9 100644 +--- a/src/kernel-install/kernel-install ++++ b/src/kernel-install/kernel-install +@@ -34,7 +34,7 @@ dropindirs_sort() + local -a files + local f d i + +- readarray -t files < <( ++ readarray -t files <<<"$( + for d in "$@"; do + for i in "$d/"*"$suffix"; do + if [[ -e "$i" ]]; then +@@ -42,7 +42,7 @@ dropindirs_sort() + fi + done + done | sort -Vu +- ) ++ )" + + for f in "${files[@]}"; do + for d in "$@"; do +@@ -104,11 +104,11 @@ fi + + ret=0 + +-readarray -t PLUGINS < <( ++readarray -t PLUGINS <<<"$( + dropindirs_sort ".install" \ + "/etc/kernel/install.d" \ + "/usr/lib/kernel/install.d" +-) ++)" + + case $COMMAND in + add) +-- +2.9.3 + diff --git a/systemd.spec b/systemd.spec index 686bd69..63d4a3d 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,7 +12,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 232 -Release: 4%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 5%{?gitcommit:.git%{gitcommitshort}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -41,6 +41,7 @@ Source12: https://raw.githubusercontent.com/systemd/systemd/1000522a60cead Patch0001: 0001-build-sys-link-test-seccomp-against-seccomp-libs-456.patch Patch0002: 0002-kernel-install-use-exit-instead-of-return-4565.patch +Patch0003: 0003-kernel-install-avoid-process-substitution.patch Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch @@ -955,6 +956,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd %{_mandir}/man[1578]/systemd-journal-gateway* %changelog +* Fri Jan 06 2017 Kevin Fenzi - 232-5 +- Add patch from Michal Schmidt to avoid process substitution. (#1392236) + * Sun Nov 6 2016 Zbigniew Jędrzejewski-Szmek - 232-4 - Rebuild (#1392236)