From 77f7c6f49164d2072c6b9263cc44fb1cc9cb8fec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 6 Mar 2018 00:02:37 +0100 Subject: [PATCH] Add patch which hopefully will fix build in koji --- ...til-bail-out-when-running-under-mock.patch | 33 +++++++++++++++++++ systemd.spec | 2 ++ 2 files changed, 35 insertions(+) create mode 100644 0001-test-cgroup-util-bail-out-when-running-under-mock.patch diff --git a/0001-test-cgroup-util-bail-out-when-running-under-mock.patch b/0001-test-cgroup-util-bail-out-when-running-under-mock.patch new file mode 100644 index 0000000..15e9ecb --- /dev/null +++ b/0001-test-cgroup-util-bail-out-when-running-under-mock.patch @@ -0,0 +1,33 @@ +From 62e20ce3dc0210e331147b717ea36b17a3d555f2 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= +Date: Tue, 6 Mar 2018 00:01:36 +0100 +Subject: [PATCH] test-cgroup-util: bail out when running under mock + +The builds were failing in Fedora koji, where something strange is mounted +on /sys/fs/cgroup. +--- + src/test/test-cgroup-util.c | 10 ++++++++-- + 1 file changed, 8 insertions(+), 2 deletions(-) + +diff --git a/src/test/test-cgroup-util.c b/src/test/test-cgroup-util.c +index c4163fc3a9..9ef7c97c74 100644 +--- a/src/test/test-cgroup-util.c ++++ b/src/test/test-cgroup-util.c +@@ -408,9 +408,15 @@ static void test_cg_tests(void) { + static void test_cg_get_keyed_attribute(void) { + _cleanup_free_ char *val = NULL; + char *vals3[3] = {}, *vals3a[3] = {}; +- int i; ++ int i, r; + +- assert_se(cg_get_keyed_attribute("cpu", "/init.scope", "no_such_file", STRV_MAKE("no_such_attr"), &val) == -ENOENT); ++ r = cg_get_keyed_attribute("cpu", "/init.scope", "no_such_file", STRV_MAKE("no_such_attr"), &val); ++ if (r == -ENOMEDIUM) { ++ log_info_errno(r, "Skipping most of %s, /sys/fs/cgroup not accessible: %m", __func__); ++ return; ++ } ++ ++ assert_se(r == -ENOENT); + assert_se(val == NULL); + + if (access("/sys/fs/cgroup/init.scope/cpu.stat", R_OK) < 0) { diff --git a/systemd.spec b/systemd.spec index 73ff869..bd8e0d6 100644 --- a/systemd.spec +++ b/systemd.spec @@ -48,6 +48,8 @@ i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done| GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[67]* hwdb/parse_hwdb.py > hwdb.patch %endif +Patch0001: 0001-test-cgroup-util-bail-out-when-running-under-mock.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);}