From d81bdc27d3b68a2b7f6cd6649866f1913d011c48 Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Nov 04 2016 13:12:11 +0000 Subject: Fix kernel-install --- diff --git a/0001-build-sys-link-test-seccomp-against-seccomp-libs-456.patch b/0001-build-sys-link-test-seccomp-against-seccomp-libs-456.patch new file mode 100644 index 0000000..11fbc90 --- /dev/null +++ b/0001-build-sys-link-test-seccomp-against-seccomp-libs-456.patch @@ -0,0 +1,28 @@ +From 55edef4fb8c4c0b6536ad824ef05ce412a701c6a Mon Sep 17 00:00:00 2001 +From: Martin Pitt +Date: Thu, 3 Nov 2016 23:15:33 +0200 +Subject: [PATCH] build-sys: link test-seccomp against seccomp libs (#4560) + +Fixes build error on recent toolchains: + + ../src/test/test-seccomp.c:35: error: undefined reference to 'seccomp_arch_native' + collect2: error: ld returned 1 exit status +(cherry picked from commit e2df6e90b239cbc1d14f5e63a9ba3abb08a2e787) +--- + Makefile.am | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/Makefile.am b/Makefile.am +index f7652c2346..f2d8bf57f7 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -2038,7 +2038,8 @@ test_seccomp_SOURCES = \ + src/test/test-seccomp.c + + test_seccomp_LDADD = \ +- libsystemd-shared.la ++ libsystemd-shared.la \ ++ $(SECCOMP_LIBS) + + test_namespace_LDADD = \ + libcore.la diff --git a/0002-kernel-install-use-exit-instead-of-return-4565.patch b/0002-kernel-install-use-exit-instead-of-return-4565.patch new file mode 100644 index 0000000..cf0ddb1 --- /dev/null +++ b/0002-kernel-install-use-exit-instead-of-return-4565.patch @@ -0,0 +1,35 @@ +From a9facbdf54ed3397365f1f4203afa4f606ce7234 Mon Sep 17 00:00:00 2001 +From: Yu Watanabe +Date: Fri, 4 Nov 2016 21:58:41 +0900 +Subject: [PATCH] kernel-install: use exit instead of return (#4565) + +/bin/kernel-install: line 143: return: can only `return' from a function or sourced script + +https://bugzilla.redhat.com/show_bug.cgi?id=1391829 +(cherry picked from commit 9156493171cf2d78e1ac1a3746c385b0e281acf1) +--- + src/kernel-install/kernel-install | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/kernel-install/kernel-install b/src/kernel-install/kernel-install +index 0c0ee718ac..a95b9717f0 100644 +--- a/src/kernel-install/kernel-install ++++ b/src/kernel-install/kernel-install +@@ -127,7 +127,7 @@ case $COMMAND in + "$f" add "$KERNEL_VERSION" "$BOOT_DIR_ABS" "$KERNEL_IMAGE" + x=$? + if [[ $x == $SKIP_REMAINING ]]; then +- return 0 ++ exit 0 + fi + ((ret+=$x)) + fi +@@ -140,7 +140,7 @@ case $COMMAND in + "$f" remove "$KERNEL_VERSION" "$BOOT_DIR_ABS" + x=$? + if [[ $x == $SKIP_REMAINING ]]; then +- return 0 ++ exit 0 + fi + ((ret+=$x)) + fi diff --git a/20-grubby.install b/20-grubby.install index 5d417f9..418c4b6 100755 --- a/20-grubby.install +++ b/20-grubby.install @@ -1,7 +1,7 @@ #!/bin/bash if [[ ! -x /sbin/new-kernel-pkg ]]; then - return 0 + exit 0 fi COMMAND="$1" diff --git a/systemd.spec b/systemd.spec index 676b0b8..0f913f8 100644 --- a/systemd.spec +++ b/systemd.spec @@ -12,7 +12,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 232 -Release: 1%{?gitcommit:.git%{gitcommitshort}}%{?dist} +Release: 2%{?gitcommit:.git%{gitcommitshort}}%{?dist} # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: System and Service Manager @@ -38,6 +38,9 @@ Source9: 20-yama-ptrace.conf Source10: systemd-udev-trigger-no-reload.conf Source11: 20-grubby.install +Patch0001: 0001-build-sys-link-test-seccomp-against-seccomp-libs-456.patch +Patch0002: 0002-kernel-install-use-exit-instead-of-return-4565.patch + Patch0998: 0998-resolved-create-etc-resolv.conf-symlink-at-runtime.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -949,6 +952,9 @@ getent passwd systemd-journal-upload >/dev/null 2>&1 || useradd -r -l -g systemd %{_mandir}/man[1578]/systemd-journal-gateway* %changelog +* Fri Nov 4 2016 Zbigniew Jędrzejewski-Szmek - 232-2 +- Fix kernel-install (#1391829) + * Thu Nov 3 2016 Zbigniew Jędrzejewski-Szmek - 232-1 - Update to latest version (#998615, #1181922, #1374371, #1390704, #1384150, #1287161) - Add %%{_isa} to Provides on arch-full packages (#1387912)