SHA256
1
0
forked from pool/systemd

Accepting request 199084 from home:elvigia:branches:Base:System

- 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch 
  missing important check on return value.
- 0002-cgroup-correct-the-log-information.patch fix misleading
  log information.
- 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch fix
  setting memory cgroup
- 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch
  should fail if write fails.
- 0005-core-cgroup-first-print-then-free.patch use-after-free
  will trigger if there is an error condition.
- 0006-swap-fix-reverse-dependencies.patch reported in 
  opensuse-factory list, topic "swap isn't activated"
- 0007-libudev-fix-move_later-comparison.patch libudev
  invalid usage of "move_later".

- while testing this new release I get in the logs ocassionally
  at boot "systemd[1]: Failed to open private bus connection: 
  Failed to connect to socket /var/run/dbus/system_bus_socket: 
  No such file or directory" indeed DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
  is defined to /var/run/dbus/system_bus_socket instead of 
  /run/dbus/system_bus_socket and that does not fly when /var/run
  is not yet available. (systemd-dbus-system-bus-address.patch)

- 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch 
  missing important check on return value.
- 0002-cgroup-correct-the-log-information.patch fix misleading
  log information.
- 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch fix
  setting memory cgroup
- 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch

OBS-URL: https://build.opensuse.org/request/show/199084
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=434
This commit is contained in:
Frederic Crozat 2013-09-16 09:46:56 +00:00 committed by Git OBS Bridge
parent cac03f25c7
commit 0f607e8017
12 changed files with 326 additions and 0 deletions

View File

@ -0,0 +1,27 @@
From 8d7b5ca0a6cdab3e400ef084fa8a05d581d59b55 Mon Sep 17 00:00:00 2001
From: Gao feng <gaofeng@cn.fujitsu.com>
Date: Fri, 13 Sep 2013 11:17:05 +0800
Subject: [PATCH 1/7] cgroup: add the missing setting of variable's value
set the value of variable "r" to the return value
of cg_set_attribute.
---
src/core/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 3eeb475..fba0b2f 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -264,7 +264,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit);
- cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
+ r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
if (r < 0)
log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
}
--
1.8.1.4

View File

@ -0,0 +1,26 @@
From ebab7f4535a077eb8168cb8f3a9fe899e56aba17 Mon Sep 17 00:00:00 2001
From: Gao feng <gaofeng@cn.fujitsu.com>
Date: Fri, 13 Sep 2013 11:17:06 +0800
Subject: [PATCH 2/7] cgroup: correct the log information
it should be memory.soft_limit_in_bytes.
---
src/core/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index fba0b2f..aee93ba 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -266,7 +266,7 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit);
r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
if (r < 0)
- log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
+ log_error("Failed to set memory.soft_limit_in_bytes on %s: %s", path, strerror(-r));
}
if (mask & CGROUP_DEVICE) {
--
1.8.1.4

View File

@ -0,0 +1,46 @@
From bebbf30ef61e4cbc782731e48ad67613aab38ec6 Mon Sep 17 00:00:00 2001
From: Gao feng <gaofeng@cn.fujitsu.com>
Date: Fri, 13 Sep 2013 14:43:04 +0800
Subject: [PATCH 3/7] cgroup: fix incorrectly setting memory cgroup
If the memory_limit of unit is -1, we should write "-1"
to the file memory.limit_in_bytes. not the (unit64_t) -1.
otherwise the memory.limit_in_bytes will be set to zero.
---
src/core/cgroup.c | 15 +++++++++++----
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index aee93ba..244baff 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -257,14 +257,21 @@ void cgroup_context_apply(CGroupContext *c, CGroupControllerMask mask, const cha
if (mask & CGROUP_MEMORY) {
char buf[DECIMAL_STR_MAX(uint64_t) + 1];
+ if (c->memory_limit != (uint64_t) -1) {
+ sprintf(buf, "%" PRIu64 "\n", c->memory_limit);
+ r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf);
+ } else
+ r = cg_set_attribute("memory", path, "memory.limit_in_bytes", "-1");
- sprintf(buf, "%" PRIu64 "\n", c->memory_limit);
- r = cg_set_attribute("memory", path, "memory.limit_in_bytes", buf);
if (r < 0)
log_error("Failed to set memory.limit_in_bytes on %s: %s", path, strerror(-r));
- sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit);
- r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
+ if (c->memory_soft_limit != (uint64_t) -1) {
+ sprintf(buf, "%" PRIu64 "\n", c->memory_soft_limit);
+ r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", buf);
+ } else
+ r = cg_set_attribute("memory", path, "memory.soft_limit_in_bytes", "-1");
+
if (r < 0)
log_error("Failed to set memory.soft_limit_in_bytes on %s: %s", path, strerror(-r));
}
--
1.8.1.4

View File

@ -0,0 +1,25 @@
From 0465a409e0a3725b44b0801641a7497e2125e59e Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Fri, 13 Sep 2013 14:12:55 +0200
Subject: [PATCH 4/7] random-seed: we should return errno of failed loop_write
---
src/random-seed/random-seed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/random-seed/random-seed.c b/src/random-seed/random-seed.c
index 4776c07..afbd500 100644
--- a/src/random-seed/random-seed.c
+++ b/src/random-seed/random-seed.c
@@ -157,7 +157,7 @@ int main(int argc, char *argv[]) {
r = loop_write(seed_fd, buf, (size_t) k, false);
if (r <= 0) {
log_error("Failed to write new random seed file: %s", r < 0 ? strerror(-r) : "short write");
- r = k == 0 ? -EIO : (int) k;
+ r = r == 0 ? -EIO : r;
}
}
--
1.8.1.4

View File

@ -0,0 +1,26 @@
From fa7341808def8efb736747299374745ae059f398 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Fri, 13 Sep 2013 14:31:17 +0200
Subject: [PATCH 5/7] core/cgroup: first print then free
---
src/core/cgroup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 244baff..1f41efc 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -402,8 +402,8 @@ static int unit_create_cgroups(Unit *u, CGroupControllerMask mask) {
is_in_hash = true;
if (r < 0) {
- free(path);
log_error("cgroup %s exists already: %s", path, strerror(-r));
+ free(path);
return r;
}
--
1.8.1.4

View File

@ -0,0 +1,30 @@
From dec37dc9e875695c09cfc1ec5e55b5f68eaa39f4 Mon Sep 17 00:00:00 2001
From: Tom Gundersen <teg@jklm.no>
Date: Fri, 13 Sep 2013 14:46:18 +0200
Subject: [PATCH 6/7] swap: fix reverse dependencies
Make sure swap.target correctly requires/wants the swap units.
This fixes https://bugs.freedesktop.org/show_bug.cgi?id=69291.
Reported-by: Hussam Al-Tayeb
---
src/core/swap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/core/swap.c b/src/core/swap.c
index 57d15eb..3950860 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -220,7 +220,7 @@ static int swap_add_default_dependencies(Swap *s) {
}
if (!noauto) {
- r = unit_add_two_dependencies_by_name(UNIT(s), UNIT_BEFORE, (nofail ? UNIT_WANTED_BY : UNIT_REQUIRED_BY),
+ r = unit_add_two_dependencies_by_name_inverse(UNIT(s), UNIT_AFTER, (nofail ? UNIT_WANTS : UNIT_REQUIRES),
SPECIAL_SWAP_TARGET, NULL, true);
if (r < 0)
return r;
--
1.8.1.4

View File

@ -0,0 +1,27 @@
From f90d045c9168a55bb22eef6fe8756b6a6d2c1e53 Mon Sep 17 00:00:00 2001
From: Lukas Nykryn <lnykryn@redhat.com>
Date: Fri, 13 Sep 2013 14:12:54 +0200
Subject: [PATCH 7/7] libudev: fix move_later comparison
At the beginning move_later is set to -1, but it is set to different
value only if expression !move_later is true.
---
src/libudev/libudev-enumerate.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libudev/libudev-enumerate.c b/src/libudev/libudev-enumerate.c
index bc1e37d..8146f27 100644
--- a/src/libudev/libudev-enumerate.c
+++ b/src/libudev/libudev-enumerate.c
@@ -300,7 +300,7 @@ _public_ struct udev_list_entry *udev_enumerate_get_list_entry(struct udev_enume
/* skip to be delayed devices, and move the to
* the point where the prefix changes. We can
* only move one item at a time. */
- if (!move_later) {
+ if (move_later == -1) {
move_later_prefix = devices_delay_later(udev_enumerate->udev, entry->syspath);
if (move_later_prefix > 0) {
--
1.8.1.4

View File

@ -0,0 +1,11 @@
--- systemd-207.orig/src/core/dbus.c
+++ systemd-207/src/core/dbus.c
@@ -50,7 +50,7 @@
#define CONNECTIONS_MAX 512
/* Well-known address (http://dbus.freedesktop.org/doc/dbus-specification.html#message-bus-types) */
-#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
+#define DBUS_SYSTEM_BUS_DEFAULT_ADDRESS "unix:path=/run/dbus/system_bus_socket"
/* Only used as a fallback */
#define DBUS_SESSION_BUS_DEFAULT_ADDRESS "autolaunch:"

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Sat Sep 14 19:01:24 UTC 2013 - crrodriguez@opensuse.org
- 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch
missing important check on return value.
- 0002-cgroup-correct-the-log-information.patch fix misleading
log information.
- 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch fix
setting memory cgroup
- 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch
should fail if write fails.
- 0005-core-cgroup-first-print-then-free.patch use-after-free
will trigger if there is an error condition.
- 0006-swap-fix-reverse-dependencies.patch reported in
opensuse-factory list, topic "swap isn't activated"
- 0007-libudev-fix-move_later-comparison.patch libudev
invalid usage of "move_later".
-------------------------------------------------------------------
Sat Sep 14 06:52:32 UTC 2013 - crrodriguez@opensuse.org
- while testing this new release I get in the logs ocassionally
at boot "systemd[1]: Failed to open private bus connection:
Failed to connect to socket /var/run/dbus/system_bus_socket:
No such file or directory" indeed DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
is defined to /var/run/dbus/system_bus_socket instead of
/run/dbus/system_bus_socket and that does not fly when /var/run
is not yet available. (systemd-dbus-system-bus-address.patch)
-------------------------------------------------------------------
Fri Sep 13 07:47:40 UTC 2013 - fcrozat@suse.com

View File

@ -170,6 +170,21 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch
Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
# PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run
Patch47: systemd-dbus-system-bus-address.patch
# PATCH-FIX-UPSTREAM 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch -- r must be set to the return value of previous call.
Patch48: 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch
# PATCH-FIX-UPSTREAM 0002-cgroup-correct-the-log-information.patch -- fix misleading log information.
Patch49: 0002-cgroup-correct-the-log-information.patch
# PATCH-FIX-UPSTREAM 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch -- memory cgroup setting is wrong.
Patch50: 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch
# PATCH-FIX-UPSTREAM 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch -- systemd-random-seed-load should fail if write fails.
Patch51: 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch
# PATCH-FIX-UPSTREAM 0005-core-cgroup-first-print-then-free.patch -- fix use after free
Patch52: 0005-core-cgroup-first-print-then-free.patch
# PATCH-FIX-UPSTREAM 0006-swap-fix-reverse-dependencies.patch -- SWAP does not mount properly
Patch53: 0006-swap-fix-reverse-dependencies.patch
# udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -186,6 +201,8 @@ Patch1006: 1006-udev-always-rename-network.patch
Patch1007: 1007-physical-hotplug-cpu-and-memory.patch
# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch
Patch1008: 1008-add-msft-compability-rules.patch
# PATCH-FIX-UPSTREAM libudev: fix move_later comparison
Patch1009: 0007-libudev-fix-move_later-comparison.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -414,6 +431,13 @@ cp %{SOURCE7} m4/
%patch41 -p1
%patch42 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
# udev patches
%patch1001 -p1
@ -426,6 +450,7 @@ cp %{SOURCE7} m4/
%patch1007 -p1
%patch1008 -p1
%endif
%patch1009 -p1
%build
autoreconf -fiv

View File

@ -1,3 +1,32 @@
-------------------------------------------------------------------
Sat Sep 14 19:01:24 UTC 2013 - crrodriguez@opensuse.org
- 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch
missing important check on return value.
- 0002-cgroup-correct-the-log-information.patch fix misleading
log information.
- 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch fix
setting memory cgroup
- 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch
should fail if write fails.
- 0005-core-cgroup-first-print-then-free.patch use-after-free
will trigger if there is an error condition.
- 0006-swap-fix-reverse-dependencies.patch reported in
opensuse-factory list, topic "swap isn't activated"
- 0007-libudev-fix-move_later-comparison.patch libudev
invalid usage of "move_later".
-------------------------------------------------------------------
Sat Sep 14 06:52:32 UTC 2013 - crrodriguez@opensuse.org
- while testing this new release I get in the logs ocassionally
at boot "systemd[1]: Failed to open private bus connection:
Failed to connect to socket /var/run/dbus/system_bus_socket:
No such file or directory" indeed DBUS_SYSTEM_BUS_DEFAULT_ADDRESS
is defined to /var/run/dbus/system_bus_socket instead of
/run/dbus/system_bus_socket and that does not fly when /var/run
is not yet available. (systemd-dbus-system-bus-address.patch)
-------------------------------------------------------------------
Fri Sep 13 07:47:40 UTC 2013 - fcrozat@suse.com

View File

@ -165,6 +165,21 @@ Patch25: Forward-suspend-hibernate-calls-to-pm-utils.patch
Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
# PATCH-FIX-OPENSUSE use-usr-sbin-sulogin-for-emergency-service.patch arvidjaar@gmail.com -- fix path to sulogin
Patch46: use-usr-sbin-sulogin-for-emergency-service.patch
# PATCH-FIX-OPENSUSE systemd-dbus-system-bus-address.patch always use /run/dbus not /var/run
Patch47: systemd-dbus-system-bus-address.patch
# PATCH-FIX-UPSTREAM 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch -- r must be set to the return value of previous call.
Patch48: 0001-cgroup-add-the-missing-setting-of-variable-s-value.patch
# PATCH-FIX-UPSTREAM 0002-cgroup-correct-the-log-information.patch -- fix misleading log information.
Patch49: 0002-cgroup-correct-the-log-information.patch
# PATCH-FIX-UPSTREAM 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch -- memory cgroup setting is wrong.
Patch50: 0003-cgroup-fix-incorrectly-setting-memory-cgroup.patch
# PATCH-FIX-UPSTREAM 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch -- systemd-random-seed-load should fail if write fails.
Patch51: 0004-random-seed-we-should-return-errno-of-failed-loop_wr.patch
# PATCH-FIX-UPSTREAM 0005-core-cgroup-first-print-then-free.patch -- fix use after free
Patch52: 0005-core-cgroup-first-print-then-free.patch
# PATCH-FIX-UPSTREAM 0006-swap-fix-reverse-dependencies.patch -- SWAP does not mount properly
Patch53: 0006-swap-fix-reverse-dependencies.patch
# udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -181,6 +196,8 @@ Patch1006: 1006-udev-always-rename-network.patch
Patch1007: 1007-physical-hotplug-cpu-and-memory.patch
# PATCH-FIX-OPENSUSE 1008-add-msft-compability-rules.patch
Patch1008: 1008-add-msft-compability-rules.patch
# PATCH-FIX-UPSTREAM libudev: fix move_later comparison
Patch1009: 0007-libudev-fix-move_later-comparison.patch
%description
Systemd is a system and service manager, compatible with SysV and LSB
@ -409,6 +426,13 @@ cp %{SOURCE7} m4/
%patch41 -p1
%patch42 -p1
%patch46 -p1
%patch47 -p1
%patch48 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
# udev patches
%patch1001 -p1
@ -421,6 +445,7 @@ cp %{SOURCE7} m4/
%patch1007 -p1
%patch1008 -p1
%endif
%patch1009 -p1
%build
autoreconf -fiv