New upstream release 226

- Fix scheduled shutdown to not shut down immediately. (Closes: #797763)
 - Fix description of CPE_NAME in os-release(5). (Closes: #797768)

Adjust patches to new upstream release.
This commit is contained in:
Martin Pitt 2015-09-09 07:37:37 +02:00
parent 15f9a2ce78
commit 2d7e7ebd7c
16 changed files with 127 additions and 106 deletions

5
debian/changelog vendored
View File

@ -1,5 +1,8 @@
systemd (225-2) UNRELEASED; urgency=medium
systemd (226-1) UNRELEASED; urgency=medium
* New upstream release:
- Fix scheduled shutdown to not shut down immediately. (Closes: #797763)
- Fix description of CPE_NAME in os-release(5). (Closes: #797768)
* Enable libseccomp support for mips64, mips64el, and x32. (Closes: #797403)
* debian/tests/networkd: Add hotplug tests.
* Make networkd call if-up.d/ scripts when it brings up interfaces, to

View File

@ -8,10 +8,51 @@ This reverts the Debian specific bits from
46a2911bf2780f616396df5671dd901cc7cb54fd
99f861310d3f05f4e86cb9582a94b891dbb3382b
---
src/basic/time-util.c | 22 ++++++++++++++++++++--
src/core/locale-setup.c | 22 ++++++++++++++++++++++
src/timedate/timedated.c | 20 ++++++++++++++++++--
2 files changed, 40 insertions(+), 2 deletions(-)
src/timedate/timedated.c | 10 ++++++++++
3 files changed, 52 insertions(+), 2 deletions(-)
diff --git a/src/basic/time-util.c b/src/basic/time-util.c
index 531931f..34ddcfc 100644
--- a/src/basic/time-util.c
+++ b/src/basic/time-util.c
@@ -28,6 +28,7 @@
#include "time-util.h"
#include "path-util.h"
#include "strv.h"
+#include "fileio.h"
usec_t now(clockid_t clock_id) {
struct timespec ts;
@@ -1053,8 +1054,25 @@ int get_timezone(char **tz) {
int r;
r = readlink_malloc("/etc/localtime", &t);
- if (r < 0)
- return r; /* returns EINVAL if not a symlink */
+ if (r < 0) {
+ if (r != -EINVAL)
+ return r; /* returns EINVAL if not a symlink */
+
+ r = read_one_line_file("/etc/timezone", &t);
+ if (r < 0) {
+ if (r != -ENOENT)
+ log_warning("Failed to read /etc/timezone: %s", strerror(-r));
+ return -EINVAL;
+ }
+
+ if (!timezone_is_valid(t))
+ return -EINVAL;
+ z = strdup(t);
+ if (!z)
+ return -ENOMEM;
+ *tz = z;
+ return 0;
+ }
e = path_startswith(t, "/usr/share/zoneinfo/");
if (!e)
diff --git a/src/core/locale-setup.c b/src/core/locale-setup.c
index 108072c..9ea0083 100644
--- a/src/core/locale-setup.c
@ -46,41 +87,10 @@ index 108072c..9ea0083 100644
for (i = 0; i < _VARIABLE_LC_MAX; i++) {
char *s;
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 21d6ee4..6967891 100644
index 6de9e24..6958d94 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -71,7 +71,7 @@ static int context_read_data(Context *c) {
r = readlink_malloc("/etc/localtime", &t);
if (r < 0) {
if (r == -EINVAL)
- log_warning("/etc/localtime should be a symbolic link to a time zone data file in /usr/share/zoneinfo/.");
+ log_debug("/etc/localtime should be a symbolic link to a time zone data file in /usr/share/zoneinfo/.");
else
log_warning_errno(r, "Failed to get target of /etc/localtime: %m");
} else {
@@ -82,7 +82,7 @@ static int context_read_data(Context *c) {
e = path_startswith(t, "../usr/share/zoneinfo/");
if (!e)
- log_warning("/etc/localtime should be a symbolic link to a time zone data file in /usr/share/zoneinfo/.");
+ log_debug("/etc/localtime should be a symbolic link to a time zone data file in /usr/share/zoneinfo/.");
else {
c->zone = strdup(e);
if (!c->zone)
@@ -90,6 +90,12 @@ static int context_read_data(Context *c) {
}
}
+ r = read_one_line_file("/etc/timezone", &c->zone);
+ if (r < 0) {
+ if (r != -ENOENT)
+ log_warning("Failed to read /etc/timezone: %s", strerror(-r));
+ }
+
if (isempty(c->zone)) {
free(c->zone);
c->zone = NULL;
@@ -103,6 +109,7 @@ static int context_read_data(Context *c) {
@@ -86,6 +86,7 @@ static int context_read_data(Context *c) {
static int context_write_data_timezone(Context *c) {
_cleanup_free_ char *p = NULL;
int r = 0;
@ -88,7 +98,7 @@ index 21d6ee4..6967891 100644
assert(c);
@@ -110,6 +117,9 @@ static int context_write_data_timezone(Context *c) {
@@ -93,6 +94,9 @@ static int context_write_data_timezone(Context *c) {
if (unlink("/etc/localtime") < 0 && errno != ENOENT)
r = -errno;
@ -98,7 +108,7 @@ index 21d6ee4..6967891 100644
return r;
}
@@ -121,6 +131,12 @@ static int context_write_data_timezone(Context *c) {
@@ -104,6 +108,12 @@ static int context_write_data_timezone(Context *c) {
if (r < 0)
return r;

View File

@ -11,7 +11,7 @@ as PID 1.
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index 3cb5f61..6946bd7 100644
index 96c39aa..d13b678 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -7087,18 +7087,23 @@ static int talk_initctl(void) {

View File

@ -10,10 +10,10 @@ Subject: Add targets for compatibility with Debian insserv system facilities
create mode 100644 units/mail-transport-agent.target
diff --git a/Makefile.am b/Makefile.am
index 9d19274..73dccbc 100644
index e52b3e4..5ff2b85 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -570,6 +570,11 @@ nodist_systemunit_DATA += \
@@ -572,6 +572,11 @@ nodist_systemunit_DATA += \
units/systemd-update-utmp-runlevel.service
endif

View File

@ -9,10 +9,10 @@ Presumably these are due to running on too old kernels, misconfigured
1 file changed, 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 73dccbc..3865f17 100644
index 5ff2b85..35ab77a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1439,14 +1439,11 @@ tests += \
@@ -1441,14 +1441,11 @@ tests += \
test-capability \
test-async \
test-ratelimit \
@ -27,7 +27,7 @@ index 73dccbc..3865f17 100644
test-verbs \
test-af-list \
test-arphrd-list \
@@ -3040,10 +3037,8 @@ tests += \
@@ -3062,10 +3059,8 @@ tests += \
test-bus-introspect \
test-bus-objects \
test-bus-error \
@ -38,7 +38,7 @@ index 73dccbc..3865f17 100644
test-local-addresses \
test-resolve
@@ -3334,7 +3329,6 @@ test_lldp_LDADD = \
@@ -3356,7 +3351,6 @@ test_lldp_LDADD = \
tests += \
test-dhcp-option \
@ -46,7 +46,7 @@ index 73dccbc..3865f17 100644
test-dhcp-server \
test-ipv4ll \
test-icmp6-rs \
@@ -5277,7 +5271,6 @@ test_network_tables_LDADD += \
@@ -5306,7 +5300,6 @@ test_network_tables_LDADD += \
endif
tests += \

View File

@ -13,7 +13,7 @@ Closes: #751392
1 file changed, 2 insertions(+)
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
index 1782d40..b1caa6e 100644
index c6f3569..79e2f8a 100644
--- a/src/core/mount-setup.c
+++ b/src/core/mount-setup.c
@@ -93,6 +93,8 @@ static const MountPoint mount_table[] = {
@ -22,6 +22,6 @@ index 1782d40..b1caa6e 100644
NULL, MNT_FATAL|MNT_IN_CONTAINER },
+ { "tmpfs", "/run/lock", "tmpfs", "mode=1777,size=5242880", MS_NOSUID|MS_NODEV|MS_NOEXEC,
+ NULL, MNT_FATAL|MNT_IN_CONTAINER },
{ "cgroup", "/sys/fs/cgroup", "cgroup", "__DEVEL__sane_behavior", MS_NOSUID|MS_NOEXEC|MS_NODEV,
cg_is_unified_wanted, MNT_FATAL|MNT_IN_CONTAINER },
{ "tmpfs", "/sys/fs/cgroup", "tmpfs", "mode=755", MS_NOSUID|MS_NOEXEC|MS_NODEV|MS_STRICTATIME,
NULL, MNT_FATAL|MNT_IN_CONTAINER },
{ "cgroup", "/sys/fs/cgroup/systemd", "cgroup", "none,name=systemd,xattr", MS_NOSUID|MS_NOEXEC|MS_NODEV,

View File

@ -12,10 +12,10 @@ Bug-Ubuntu: https://launchpad.net/bugs/1400203
1 file changed, 3 insertions(+)
diff --git a/src/libsystemd/sd-login/sd-login.c b/src/libsystemd/sd-login/sd-login.c
index 0eadc8c..7b1cb71 100644
index 265c7c7..a16b6b1 100644
--- a/src/libsystemd/sd-login/sd-login.c
+++ b/src/libsystemd/sd-login/sd-login.c
@@ -920,10 +920,13 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
@@ -987,10 +987,13 @@ _public_ int sd_login_monitor_new(const char *category, sd_login_monitor **m) {
if (!category || streq(category, "machine")) {
k = inotify_add_watch(fd, "/run/systemd/machines/", IN_MOVED_TO|IN_DELETE);

View File

@ -10,26 +10,34 @@ Bug-Debian: https://bugs.debian.org/784720
Bug-Ubuntu: https://launchpad.net/bugs/1448259
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137
---
src/core/unit.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
src/core/unit.c | 18 +-----------------
1 file changed, 1 insertion(+), 17 deletions(-)
diff --git a/src/core/unit.c b/src/core/unit.c
index 43a5ca1..43ef153 100644
index 1aa0321..a1fafb4 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3588,15 +3588,7 @@ int unit_kill_context(
log_unit_warning_errno(u, r, "Failed to kill control group: %m");
@@ -3495,23 +3495,7 @@ int unit_kill_context(
} else if (r > 0) {
- /* FIXME: For now, we will not wait for the
- * cgroup members to die, simply because
- * cgroup notification is unreliable. It
- * doesn't work at all in containers, and
- * outside of containers it can be confused
- * easily by leaving directories in the
- * cgroup. */
- /* FIXME: For now, on the legacy hierarchy, we
- * will not wait for the cgroup members to die
- * if we are running in a container or if this
- * is a delegation unit, simply because cgroup
- * notification is unreliable in these
- * cases. It doesn't work at all in
- * containers, and outside of containers it
- * can be confused easily by left-over
- * directories in the cgroup -- which however
- * should not exist in non-delegated units. On
- * the unified hierarchy that's different,
- * there we get proper events. Hence rely on
- * them.*/
-
- /* wait_for_exit = true; */
- if (cg_unified() > 0 ||
- (detect_container(NULL) == 0 && !unit_cgroup_delegate(u)))
- wait_for_exit = true;
+ wait_for_exit = true;
if (c->send_sighup && k != KILL_KILL) {

View File

@ -9,10 +9,10 @@ to access logind via D-Bus will start it on demand.
1 file changed, 4 deletions(-)
diff --git a/src/login/pam_systemd.c b/src/login/pam_systemd.c
index f83d18b..3bd6118 100644
index f66f1ce..bc78845 100644
--- a/src/login/pam_systemd.c
+++ b/src/login/pam_systemd.c
@@ -223,10 +223,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
@@ -236,10 +236,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
assert(handle);

View File

@ -12,7 +12,7 @@ Patch courtesy of Steve Langasek.
1 file changed, 106 insertions(+), 96 deletions(-)
diff --git a/src/locale/localed.c b/src/locale/localed.c
index e9489f0..007e717 100644
index e304588..2893f49 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -162,6 +162,24 @@ static int locale_read_data(Context *c) {

View File

@ -12,10 +12,10 @@ paths. Closes: #721347
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/configure.ac b/configure.ac
index d9ab362..b9599e3 100644
index 2024939..6db1ace 100644
--- a/configure.ac
+++ b/configure.ac
@@ -92,18 +92,18 @@ AC_PROG_CC_C99
@@ -95,18 +95,18 @@ AC_PROG_AWK
AC_PATH_PROG([M4], [m4])
AC_PATH_PROG([XSLTPROC], [xsltproc])
@ -41,7 +41,7 @@ index d9ab362..b9599e3 100644
AC_PATH_PROG([MOUNT_PATH], [mount], [/usr/bin/mount], [$PATH:/usr/sbin:/sbin])
AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin])
@@ -1206,13 +1206,13 @@ AC_ARG_WITH(kbd-loadkeys,
@@ -1209,13 +1209,13 @@ AC_ARG_WITH(kbd-loadkeys,
AS_HELP_STRING([--with-kbd-loadkeys=PATH],
[Path to loadkeys]),
[KBD_LOADKEYS="$withval"],

View File

@ -14,28 +14,28 @@ Bug-Debian: https://bugs.debian.org/777601
2 files changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 6b3162a..8b49701 100644
index f661a54..aa7ee51 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -1744,8 +1744,6 @@ int cg_create_everywhere(CGroupControllerMask supported, CGroupControllerMask ma
NULSTR_FOREACH(n, mask_names) {
if (mask & bit)
cg_create(n, path);
- else if (supported & bit)
- cg_trim(n, path, true);
@@ -1851,8 +1851,6 @@ int cg_create_everywhere(CGroupMask supported, CGroupMask mask, const char *path
bit <<= 1;
if (mask & bit)
(void) cg_create(n, path);
- else if (supported & bit)
- (void) cg_trim(n, path, true);
}
return 0;
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
index 6474e08..c7533fe 100644
index 9a025cf..52626aa 100644
--- a/src/core/cgroup.c
+++ b/src/core/cgroup.c
@@ -840,7 +840,7 @@ void unit_destroy_cgroup_if_empty(Unit *u) {
if (!u->cgroup_path)
return;
@@ -1025,7 +1025,7 @@ void unit_prune_cgroup(Unit *u) {
- r = cg_trim_everywhere(u->manager->cgroup_supported, u->cgroup_path, !unit_has_name(u, SPECIAL_ROOT_SLICE));
+ r = cg_trim_everywhere(u->cgroup_realized_mask, u->cgroup_path, !unit_has_name(u, SPECIAL_ROOT_SLICE));
is_root_slice = unit_has_name(u, SPECIAL_ROOT_SLICE);
- r = cg_trim_everywhere(u->manager->cgroup_supported, u->cgroup_path, !is_root_slice);
+ r = cg_trim_everywhere(u->cgroup_realized_mask, u->cgroup_path, !is_root_slice);
if (r < 0) {
log_debug_errno(r, "Failed to destroy cgroup %s: %m", u->cgroup_path);
log_debug_errno(r, "Failed to destroy cgroup %s, ignoring: %m", u->cgroup_path);
return;

View File

@ -58,7 +58,7 @@ http://lists.freedesktop.org/archives/systemd-devel/2015-April/030175.html
create mode 100644 units/systemd-fsckd.socket
diff --git a/Makefile-man.am b/Makefile-man.am
index 6528737..df17eae 100644
index 3b80386..b5c83c6 100644
--- a/Makefile-man.am
+++ b/Makefile-man.am
@@ -93,6 +93,7 @@ MANPAGES += \
@ -69,7 +69,7 @@ index 6528737..df17eae 100644
man/systemd-fstab-generator.8 \
man/systemd-getty-generator.8 \
man/systemd-gpt-auto-generator.8 \
@@ -366,6 +367,8 @@ MANPAGES_ALIAS += \
@@ -367,6 +368,8 @@ MANPAGES_ALIAS += \
man/systemd-bus-proxyd.socket.8 \
man/systemd-fsck-root.service.8 \
man/systemd-fsck.8 \
@ -78,7 +78,7 @@ index 6528737..df17eae 100644
man/systemd-hibernate-resume.8 \
man/systemd-hibernate.service.8 \
man/systemd-hybrid-sleep.service.8 \
@@ -652,6 +655,8 @@ man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.servic
@@ -653,6 +656,8 @@ man/systemd-ask-password-wall.service.8: man/systemd-ask-password-console.servic
man/systemd-bus-proxyd.socket.8: man/systemd-bus-proxyd.service.8
man/systemd-fsck-root.service.8: man/systemd-fsck@.service.8
man/systemd-fsck.8: man/systemd-fsck@.service.8
@ -87,7 +87,7 @@ index 6528737..df17eae 100644
man/systemd-hibernate-resume.8: man/systemd-hibernate-resume@.service.8
man/systemd-hibernate.service.8: man/systemd-suspend.service.8
man/systemd-hybrid-sleep.service.8: man/systemd-suspend.service.8
@@ -1348,6 +1353,12 @@ man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html
@@ -1349,6 +1354,12 @@ man/systemd-fsck-root.service.html: man/systemd-fsck@.service.html
man/systemd-fsck.html: man/systemd-fsck@.service.html
$(html-alias)
@ -100,7 +100,7 @@ index 6528737..df17eae 100644
man/systemd-hibernate-resume.html: man/systemd-hibernate-resume@.service.html
$(html-alias)
@@ -2313,6 +2324,7 @@ EXTRA_DIST += \
@@ -2324,6 +2335,7 @@ EXTRA_DIST += \
man/systemd-escape.xml \
man/systemd-firstboot.xml \
man/systemd-fsck@.service.xml \
@ -109,10 +109,10 @@ index 6528737..df17eae 100644
man/systemd-getty-generator.xml \
man/systemd-gpt-auto-generator.xml \
diff --git a/Makefile.am b/Makefile.am
index 3865f17..d9d85ae 100644
index 35ab77a..0a3acba 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -395,6 +395,7 @@ rootlibexec_PROGRAMS = \
@@ -397,6 +397,7 @@ rootlibexec_PROGRAMS = \
systemd-remount-fs \
systemd-reply-password \
systemd-fsck \
@ -120,7 +120,7 @@ index 3865f17..d9d85ae 100644
systemd-machine-id-commit \
systemd-ac-power \
systemd-sysctl \
@@ -503,6 +504,7 @@ dist_systemunit_DATA = \
@@ -505,6 +506,7 @@ dist_systemunit_DATA = \
units/slices.target \
units/system.slice \
units/x-.slice \
@ -128,7 +128,7 @@ index 3865f17..d9d85ae 100644
units/systemd-initctl.socket \
units/syslog.socket \
units/dev-hugepages.mount \
@@ -551,6 +553,7 @@ nodist_systemunit_DATA = \
@@ -553,6 +555,7 @@ nodist_systemunit_DATA = \
units/systemd-kexec.service \
units/systemd-fsck@.service \
units/systemd-fsck-root.service \
@ -136,7 +136,7 @@ index 3865f17..d9d85ae 100644
units/systemd-machine-id-commit.service \
units/systemd-udevd.service \
units/systemd-udev-trigger.service \
@@ -608,6 +611,7 @@ EXTRA_DIST += \
@@ -610,6 +613,7 @@ EXTRA_DIST += \
units/user/systemd-exit.service.in \
units/systemd-fsck@.service.in \
units/systemd-fsck-root.service.in \
@ -144,7 +144,7 @@ index 3865f17..d9d85ae 100644
units/systemd-machine-id-commit.service.in \
units/user@.service.m4.in \
units/debug-shell.service.in \
@@ -2355,6 +2359,16 @@ systemd_fsck_LDADD = \
@@ -2357,6 +2361,16 @@ systemd_fsck_LDADD = \
libshared.la
# ------------------------------------------------------------------------------
@ -330,13 +330,13 @@ index 0000000..c976062
+
+</refentry>
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b4c1121..70e7594 100644
index f33c53f..4b8ef2e 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -5,3 +5,4 @@ src/locale/org.freedesktop.locale1.policy.in
src/login/org.freedesktop.login1.policy.in
@@ -6,3 +6,4 @@ src/login/org.freedesktop.login1.policy.in
src/machine/org.freedesktop.machine1.policy.in
src/timedate/org.freedesktop.timedate1.policy.in
src/core/dbus-unit.c
+src/fsckd/fsckd.c
diff --git a/src/fsckd/fsckd.c b/src/fsckd/fsckd.c
new file mode 100644

View File

@ -25,10 +25,10 @@ It has the following modifications:
create mode 100644 src/insserv-generator/insserv-generator.c
diff --git a/Makefile.am b/Makefile.am
index c2973c0..9d19274 100644
index 8e0448f..e52b3e4 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -409,6 +409,7 @@ rootlibexec_PROGRAMS += \
@@ -411,6 +411,7 @@ rootlibexec_PROGRAMS += \
endif
systemgenerator_PROGRAMS = \
@ -36,7 +36,7 @@ index c2973c0..9d19274 100644
systemd-getty-generator \
systemd-fstab-generator \
systemd-system-update-generator \
@@ -2388,6 +2389,13 @@ systemd_delta_LDADD = \
@@ -2390,6 +2391,13 @@ systemd_delta_LDADD = \
libshared.la
# ------------------------------------------------------------------------------

View File

@ -18,7 +18,7 @@ Closes: #726256
1 file changed, 94 insertions(+), 1 deletion(-)
diff --git a/src/timedate/timedated.c b/src/timedate/timedated.c
index 6967891..552a2f9 100644
index 6958d94..dcd8a38 100644
--- a/src/timedate/timedated.c
+++ b/src/timedate/timedated.c
@@ -22,6 +22,9 @@
@ -135,7 +135,7 @@ index 6967891..552a2f9 100644
static int context_read_data(Context *c) {
_cleanup_free_ char *t = NULL;
int r;
@@ -127,7 +220,7 @@ static int context_write_data_timezone(Context *c) {
@@ -104,7 +197,7 @@ static int context_write_data_timezone(Context *c) {
if (!p)
return log_oom();

View File

@ -8,10 +8,10 @@ Bug-Debian: https://bugs.debian.org/775903
1 file changed, 3 insertions(+)
diff --git a/src/basic/util.c b/src/basic/util.c
index f752595..198edca 100644
index 86aacad..ef43a89 100644
--- a/src/basic/util.c
+++ b/src/basic/util.c
@@ -1875,6 +1875,9 @@ _pure_ static bool hidden_file_allow_backup(const char *filename) {
@@ -1886,6 +1886,9 @@ _pure_ static bool hidden_file_allow_backup(const char *filename) {
endswith(filename, ".dpkg-bak") ||
endswith(filename, ".dpkg-backup") ||
endswith(filename, ".dpkg-remove") ||