diff --git a/SOURCES/0386-run-drop-mistakenly-committed-test-code.patch b/SOURCES/0386-run-drop-mistakenly-committed-test-code.patch new file mode 100644 index 0000000..9ae34fa --- /dev/null +++ b/SOURCES/0386-run-drop-mistakenly-committed-test-code.patch @@ -0,0 +1,32 @@ +From 5fa9c2729f673aca07741506a5e490b58534ded8 Mon Sep 17 00:00:00 2001 +From: Lennart Poettering +Date: Fri, 31 Jan 2014 18:03:15 +0100 +Subject: [PATCH] run: drop mistakenly committed test code + +Conflicts: + src/run/run.c + +Resolves: #1220272 +--- + src/run/run.c | 8 -------- + 1 file changed, 8 deletions(-) + +diff --git a/src/run/run.c b/src/run/run.c +index 93e3f88..a6abead 100644 +--- a/src/run/run.c ++++ b/src/run/run.c +@@ -315,14 +315,6 @@ static int start_transient_scope( + if (r < 0) + return r; + +- { +- const char *unique_id; +- sd_bus_get_unique_name(bus, &unique_id); +- r = sd_bus_message_append(m, "(sv)", "Controller", "s", unique_id); +- if (r < 0) +- return r; +- } +- + r = sd_bus_message_append(m, "(sv)", "PIDs", "au", 1, (uint32_t) getpid()); + if (r < 0) + return r; diff --git a/SOURCES/0387-cgroup-downgrade-log-messages-when-we-cannot-write-t.patch b/SOURCES/0387-cgroup-downgrade-log-messages-when-we-cannot-write-t.patch new file mode 100644 index 0000000..6e60fa7 --- /dev/null +++ b/SOURCES/0387-cgroup-downgrade-log-messages-when-we-cannot-write-t.patch @@ -0,0 +1,72 @@ +From 4557f90ba7c744e5240e6b494f1eb1ef66ae6ea6 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Mon, 11 May 2015 13:17:03 +0200 +Subject: [PATCH] cgroup: downgrade log messages when we cannot write to cgroup + trees that are mounted read-only + +rhel-only (fixed in upstream differently) + +Resolves: #1220298 +--- + src/core/cgroup.c | 13 +++++++------ + 1 file changed, 7 insertions(+), 6 deletions(-) + +diff --git a/src/core/cgroup.c b/src/core/cgroup.c +index 5163ee4..71d64a1 100644 +--- a/src/core/cgroup.c ++++ b/src/core/cgroup.c +@@ -188,7 +188,7 @@ static int whitelist_device(const char *path, const char *node, const char *acc) + + r = cg_set_attribute("devices", path, "devices.allow", buf); + if (r < 0) +- log_warning("Failed to set devices.allow on %s: %s", path, strerror(-r)); ++ log_full(IN_SET(r, -ENOENT, -EROFS, -EINVAL) ? LOG_DEBUG : LOG_WARNING, "Failed to set devices.allow on %s: %s", path, strerror(-r)); + + return r; + } +@@ -208,7 +208,8 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha + sprintf(buf, "%lu\n", c->cpu_shares); + r = cg_set_attribute("cpu", path, "cpu.shares", buf); + if (r < 0) +- log_warning("Failed to set cpu.shares on %s: %s", path, strerror(-r)); ++ log_full(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, "Failed to set cpu.shares on %s: %s", path, strerror(-r)); ++ + } + + if (mask & CGROUP_BLKIO) { +@@ -221,7 +222,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha + sprintf(buf, "%lu\n", c->blockio_weight); + r = cg_set_attribute("blkio", path, "blkio.weight", buf); + if (r < 0) +- log_warning("Failed to set blkio.weight on %s: %s", path, strerror(-r)); ++ log_full(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, "Failed to set blkio.weight on %s: %s", path, strerror(-r)); + + /* FIXME: no way to reset this list */ + LIST_FOREACH(device_weights, w, c->blockio_device_weights) { +@@ -234,7 +235,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha + sprintf(buf, "%u:%u %lu", major(dev), minor(dev), w->weight); + r = cg_set_attribute("blkio", path, "blkio.weight_device", buf); + if (r < 0) +- log_error("Failed to set blkio.weight_device on %s: %s", path, strerror(-r)); ++ log_full(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, "Failed to set blkio.weight_device on %s: %s", path, strerror(-r)); + } + + /* FIXME: no way to reset this list */ +@@ -251,7 +252,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha + sprintf(buf, "%u:%u %" PRIu64 "\n", major(dev), minor(dev), b->bandwidth); + r = cg_set_attribute("blkio", path, a, buf); + if (r < 0) +- log_error("Failed to set %s on %s: %s", a, path, strerror(-r)); ++ log_full(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, "Failed to set %s on %s: %s", a, path, strerror(-r)); + } + } + +@@ -265,7 +266,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha + r = cg_set_attribute("memory", path, "memory.limit_in_bytes", "-1"); + + if (r < 0) +- log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); ++ log_full(IN_SET(r, -ENOENT, -EROFS) ? LOG_DEBUG : LOG_WARNING, "Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r)); + } + + if (mask & CGROUP_DEVICE) { diff --git a/SOURCES/0388-rules-load-sg-module.patch b/SOURCES/0388-rules-load-sg-module.patch new file mode 100644 index 0000000..9165218 --- /dev/null +++ b/SOURCES/0388-rules-load-sg-module.patch @@ -0,0 +1,24 @@ +From 6d5b6bff86bca5db72a859330a29783fc5676935 Mon Sep 17 00:00:00 2001 +From: Lukas Nykryn +Date: Thu, 21 May 2015 09:23:04 +0200 +Subject: [PATCH] rules: load sg module + +Revert of 09637f743414e2c36d6c5b032d77d76dbeb86b31 +RHEL-only + +Resolves: #1223340 +--- + rules/40-redhat.rules | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/rules/40-redhat.rules b/rules/40-redhat.rules +index 2b494e5..b14f8a9 100644 +--- a/rules/40-redhat.rules ++++ b/rules/40-redhat.rules +@@ -1,3 +1,6 @@ + # do not edit this file, it will be overwritten on update + + SUBSYSTEM=="cpu", ACTION=="add", TEST=="online", ATTR{online}=="0", ATTR{online}="1" ++ ++# load SCSI generic (sg) driver ++SUBSYSTEM=="scsi", ENV{DEVTYPE}=="scsi_device", TEST!="[module/sg]", RUN+="/sbin/modprobe -bv sg" diff --git a/SPECS/systemd.spec b/SPECS/systemd.spec index 8cf38ed..3641684 100644 --- a/SPECS/systemd.spec +++ b/SPECS/systemd.spec @@ -8,7 +8,7 @@ Name: systemd Url: http://www.freedesktop.org/wiki/Software/systemd Version: 208 -Release: 20%{?dist}.3 +Release: 20%{?dist}.5 # For a breakdown of the licensing, see README License: LGPLv2+ and MIT and GPLv2+ Summary: A System and Service Manager @@ -413,6 +413,9 @@ Patch0382: 0382-rules-don-t-enable-usb-pm-for-Avocent-devices.patch Patch0383: 0383-shared-install-avoid-prematurely-rejecting-missing-u.patch Patch0384: 0384-core-fix-enabling-units-via-their-absolute-paths.patch Patch0385: 0385-Revert-units-fix-BindsTo-logic-when-applied-relative.patch +Patch0386: 0386-run-drop-mistakenly-committed-test-code.patch +Patch0387: 0387-cgroup-downgrade-log-messages-when-we-cannot-write-t.patch +Patch0388: 0388-rules-load-sg-module.patch %global num_patches %{lua: c=0; for i,p in ipairs(patches) do c=c+1; end; print(c);} @@ -1213,6 +1216,13 @@ getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g %{_datadir}/systemd/gatewayd %changelog +* Thu May 21 2015 Lukas Nykryn - 208-20.5 +- rules: load sg module (#1223340) + +* Mon May 11 2015 Lukas Nykryn - 208-20.4 +- run: drop mistakenly committed test code (#1220272) +- cgroup: downgrade log messages when we cannot write to cgroup trees that are mounted read-only (#1220298) + * Wed Apr 08 2015 Lukáš Nykrýn - 208-20.3 - Revert "conditionalize hardening away on s390(x)"