Fix kernel-install

This commit is contained in:
Zbigniew Jędrzejewski-Szmek 2016-11-04 09:12:11 -04:00
parent 523b6ce46a
commit d81bdc27d3
4 changed files with 71 additions and 2 deletions

View File

@ -0,0 +1,28 @@
From 55edef4fb8c4c0b6536ad824ef05ce412a701c6a Mon Sep 17 00:00:00 2001
From: Martin Pitt <martin.pitt@ubuntu.com>
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

View File

@ -0,0 +1,35 @@
From a9facbdf54ed3397365f1f4203afa4f606ce7234 Mon Sep 17 00:00:00 2001
From: Yu Watanabe <watanabe.yu+github@gmail.com>
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

View File

@ -1,7 +1,7 @@
#!/bin/bash
if [[ ! -x /sbin/new-kernel-pkg ]]; then
return 0
exit 0
fi
COMMAND="$1"

View File

@ -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 <zbyszek@in.waw.pl> - 232-2
- Fix kernel-install (#1391829)
* Thu Nov 3 2016 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> - 232-1
- Update to latest version (#998615, #1181922, #1374371, #1390704, #1384150, #1287161)
- Add %%{_isa} to Provides on arch-full packages (#1387912)