SHA256
1
0
forked from pool/systemd

Accepting request 198848 from Base:System

- Enable Predictable Network interface names (bnc#829526).

- version 207, distribution specific changes follow, for overall 
  release notes see NEWS.
- Fixed: 
  * Failed at step PAM spawning /usr/lib/systemd/systemd: 
  Operation not permitted
  * Fix shutdown hang "a stop job is running for Session 1 of user root"
    that was reported in opensuse-factory list.
- systemd-sysctl no longer reads /etc/sysctl.conf however backward
  compatbility is to be provides by a symlink created at %post.
- removed previously disabled upstream patches (merged):
  0002-core-mount.c-mount_dump-don-t-segfault-if-mount-is-n.patch,
  0004-disable-the-cgroups-release-agent-when-shutting-down.patch,
  0005-cgroups-agent-remove-ancient-fallback-code-turn-conn.patch,
  0006-suppress-status-message-output-at-shutdown-when-quie.patch,
- removed upstream merged patches:
  exclude-dev-from-tmpfiles.patch,
  logind_update_state_file_after_generating_....patch
- Add systemd-pam_config.patch: use correct include name for PAM
  configuration on openSUSE.

- Add exclude-dev-from-tmpfiles.patch: allow to exclude /dev from
  tmpfiles (bnc#835813).

OBS-URL: https://build.opensuse.org/request/show/198848
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=155
This commit is contained in:
Tomáš Chvátal 2013-09-13 12:45:43 +00:00 committed by Git OBS Bridge
parent aa1c600ed7
commit c446b5bdf8
31 changed files with 182 additions and 431 deletions

View File

@ -1,34 +0,0 @@
From 1e4fc9b1d8449e87474b3af8a4ddab09fab27cd5 Mon Sep 17 00:00:00 2001
From: Harald Hoyer <harald@redhat.com>
Date: Thu, 4 Jul 2013 11:01:47 +0200
Subject: [PATCH 2/6] core/mount.c:mount_dump(): don't segfault, if mount is
not mounted anymore
Don't segfault, if m->from_proc_self_mountinfo and m->from_fragment is
false.
https://bugzilla.redhat.com/show_bug.cgi?id=957783#c9
---
src/core/mount.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/core/mount.c b/src/core/mount.c
index 3cc3e65..58a3f11 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -822,9 +822,9 @@ static void mount_dump(Unit *u, FILE *f, const char *prefix) {
prefix, mount_state_to_string(m->state),
prefix, mount_result_to_string(m->result),
prefix, m->where,
- prefix, strna(p->what),
- prefix, strna(p->fstype),
- prefix, strna(p->options),
+ prefix, p ? strna(p->what) : "n/a",
+ prefix, p ? strna(p->fstype) : "n/a",
+ prefix, p ? strna(p->options) : "n/a",
prefix, yes_no(m->from_proc_self_mountinfo),
prefix, yes_no(m->from_fragment),
prefix, m->directory_mode);
--
1.8.1.4

View File

@ -1,74 +0,0 @@
From ad929bcc27e2c6c1aa731053e45882686e9babab Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Thu, 4 Jul 2013 20:31:18 +0200
Subject: [PATCH 4/6] disable the cgroups release agent when shutting down
During shutdown, when we try to clean up all remaining processes, the
kernel will fork new agents every time a cgroup runs empty. These
new processes cause delays in the final SIGTERM, SIGKILL logic.
Apart from that, this should also avoid that the kernel-forked binaries
cause unpredictably timed access to the filesystem which we might need to
unmount.
---
src/core/main.c | 4 ++++
src/shared/cgroup-util.c | 15 +++++++++++++++
src/shared/cgroup-util.h | 1 +
3 files changed, 20 insertions(+)
diff --git a/src/core/main.c b/src/core/main.c
index 8b8e110..ada0f9d 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1942,6 +1942,10 @@ finish:
watchdog_close(true);
}
+ /* avoid the creation of new processes forked by the kernel; at this
+ * point, we will not listen to the signals anyway */
+ cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
+
execve(SYSTEMD_SHUTDOWN_BINARY_PATH, (char **) command_line, env_block);
free(env_block);
log_error("Failed to execute shutdown binary, freezing: %m");
diff --git a/src/shared/cgroup-util.c b/src/shared/cgroup-util.c
index 390259e..73013d1 100644
--- a/src/shared/cgroup-util.c
+++ b/src/shared/cgroup-util.c
@@ -790,6 +790,21 @@ int cg_install_release_agent(const char *controller, const char *agent) {
return 0;
}
+int cg_uninstall_release_agent(const char *controller) {
+ _cleanup_free_ char *fs = NULL;
+ int r;
+
+ r = cg_get_path(controller, NULL, "release_agent", &fs);
+ if (r < 0)
+ return r;
+
+ r = write_string_file(fs, "");
+ if (r < 0)
+ return r;
+
+ return 0;
+}
+
int cg_is_empty(const char *controller, const char *path, bool ignore_self) {
_cleanup_fclose_ FILE *f = NULL;
pid_t pid = 0, self_pid;
diff --git a/src/shared/cgroup-util.h b/src/shared/cgroup-util.h
index c781aab..0fc93c1 100644
--- a/src/shared/cgroup-util.h
+++ b/src/shared/cgroup-util.h
@@ -89,6 +89,7 @@ int cg_set_group_access(const char *controller, const char *path, mode_t mode, u
int cg_set_task_access(const char *controller, const char *path, mode_t mode, uid_t uid, gid_t gid);
int cg_install_release_agent(const char *controller, const char *agent);
+int cg_uninstall_release_agent(const char *controller);
int cg_is_empty(const char *controller, const char *path, bool ignore_self);
int cg_is_empty_by_spec(const char *spec, bool ignore_self);
--
1.8.1.4

View File

@ -1,53 +0,0 @@
From c1eba3008cac9e625b8bb774e9b44ceec8465980 Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Thu, 4 Jul 2013 20:54:40 +0200
Subject: [PATCH 5/6] cgroups-agent: remove ancient fallback code; turn
connection error into warning
During re-execution and shutdown cgroups agents might not be able
to connect to systemd's private D-Bus socket, the printed error to
the console is misleding in that case, so turn it into a warning.
---
src/cgroups-agent/cgroups-agent.c | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/src/cgroups-agent/cgroups-agent.c b/src/cgroups-agent/cgroups-agent.c
index 0e3d2b7..a47949a 100644
--- a/src/cgroups-agent/cgroups-agent.c
+++ b/src/cgroups-agent/cgroups-agent.c
@@ -48,26 +48,19 @@ int main(int argc, char *argv[]) {
* this to avoid an activation loop when we start dbus when we
* are called when the dbus service is shut down. */
- if (!(bus = dbus_connection_open_private("unix:path=/run/systemd/private", &error))) {
-#ifndef NOLEGACY
- dbus_error_free(&error);
-
- /* Retry with the pre v21 socket name, to ease upgrades */
- if (!(bus = dbus_connection_open_private("unix:abstract=/org/freedesktop/systemd1/private", &error))) {
-#endif
- log_error("Failed to get D-Bus connection: %s", bus_error_message(&error));
- goto finish;
- }
-#ifndef NOLEGACY
+ bus = dbus_connection_open_private("unix:path=/run/systemd/private", &error);
+ if (!bus) {
+ log_warning("Failed to get D-Bus connection: %s", bus_error_message(&error));
+ goto finish;
}
-#endif
if (bus_check_peercred(bus) < 0) {
log_error("Bus owner not root.");
goto finish;
}
- if (!(m = dbus_message_new_signal("/org/freedesktop/systemd1/agent", "org.freedesktop.systemd1.Agent", "Released"))) {
+ m = dbus_message_new_signal("/org/freedesktop/systemd1/agent", "org.freedesktop.systemd1.Agent", "Released");
+ if (!m) {
log_error("Could not allocate signal message.");
goto finish;
}
--
1.8.1.4

View File

@ -1,69 +0,0 @@
From ec26be514ff3c5367b21f9881369080bda54fd2d Mon Sep 17 00:00:00 2001
From: Kay Sievers <kay@vrfy.org>
Date: Fri, 5 Jul 2013 00:32:05 +0200
Subject: [PATCH 6/6] suppress status message output at shutdown when 'quiet'
is given
---
src/core/main.c | 4 ++--
src/core/shutdown.c | 15 +++++++++++++++
2 files changed, 17 insertions(+), 2 deletions(-)
diff --git a/src/core/main.c b/src/core/main.c
index ada0f9d..243855f 100644
--- a/src/core/main.c
+++ b/src/core/main.c
@@ -1942,9 +1942,9 @@ finish:
watchdog_close(true);
}
- /* avoid the creation of new processes forked by the kernel; at this
+ /* avoid the creation of new processes forked by the kernel; at this
* point, we will not listen to the signals anyway */
- cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
+ cg_uninstall_release_agent(SYSTEMD_CGROUP_CONTROLLER);
execve(SYSTEMD_SHUTDOWN_BINARY_PATH, (char **) command_line, env_block);
free(env_block);
diff --git a/src/core/shutdown.c b/src/core/shutdown.c
index 2db761d..c02a14d 100644
--- a/src/core/shutdown.c
+++ b/src/core/shutdown.c
@@ -39,6 +39,7 @@
#include "missing.h"
#include "log.h"
+#include "fileio.h"
#include "umount.h"
#include "util.h"
#include "mkdir.h"
@@ -130,12 +131,26 @@ static int pivot_to_new_root(void) {
}
int main(int argc, char *argv[]) {
+ _cleanup_free_ char *line = NULL;
int cmd, r;
unsigned retries;
bool need_umount = true, need_swapoff = true, need_loop_detach = true, need_dm_detach = true;
bool in_container, use_watchdog = false;
char *arguments[3];
+ /* suppress shutdown status output if 'quiet' is used */
+ r = read_one_line_file("/proc/cmdline", &line);
+ if (r >= 0) {
+ char *w, *state;
+ size_t l;
+
+ FOREACH_WORD_QUOTED(w, l, line, state)
+ if (streq(w, "quiet")) {
+ log_set_max_level(LOG_WARNING);
+ break;
+ }
+ }
+
log_parse_environment();
log_set_target(LOG_TARGET_CONSOLE); /* syslog will die if not gone yet */
log_open();
--
1.8.1.4

View File

@ -8,8 +8,8 @@ disable /var/lock/{subsys,lockdev} and change default permissions on
tmpfiles.d/legacy.conf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
--- systemd-206.orig/tmpfiles.d/legacy.conf
+++ systemd-206/tmpfiles.d/legacy.conf
--- systemd-206_git201308300826.orig/tmpfiles.d/legacy.conf
+++ systemd-206_git201308300826/tmpfiles.d/legacy.conf
@@ -10,12 +10,13 @@
# These files are considered legacy and are unnecessary on legacy-free
# systems.

View File

@ -7,8 +7,8 @@ Subject: avoid assertion if invalid address familily is passed to
src/nss-myhostname/nss-myhostname.c | 6 ++++++
1 file changed, 6 insertions(+)
--- systemd-206.orig/src/nss-myhostname/nss-myhostname.c
+++ systemd-206/src/nss-myhostname/nss-myhostname.c
--- systemd-206_git201308300826.orig/src/nss-myhostname/nss-myhostname.c
+++ systemd-206_git201308300826/src/nss-myhostname/nss-myhostname.c
@@ -442,6 +442,12 @@ enum nss_status _nss_myhostname_gethostb
uint32_t local_address_ipv4 = LOCALADDRESS_IPV4;
const char *canonical = NULL, *additional = NULL;

View File

@ -7,8 +7,8 @@ Subject: delay fsck / cryptsetup after md / dmraid are started
units/systemd-fsck@.service.in | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
--- systemd-206.orig/src/cryptsetup/cryptsetup-generator.c
+++ systemd-206/src/cryptsetup/cryptsetup-generator.c
--- systemd-206_git201308300826.orig/src/cryptsetup/cryptsetup-generator.c
+++ systemd-206_git201308300826/src/cryptsetup/cryptsetup-generator.c
@@ -160,6 +160,7 @@ static int create_disk(
"Conflicts=umount.target\n"
"DefaultDependencies=no\n"
@ -17,8 +17,8 @@ Subject: delay fsck / cryptsetup after md / dmraid are started
"After=systemd-readahead-collect.service systemd-readahead-replay.service\n",
f);
--- systemd-206.orig/units/systemd-fsck@.service.in
+++ systemd-206/units/systemd-fsck@.service.in
--- systemd-206_git201308300826.orig/units/systemd-fsck@.service.in
+++ systemd-206_git201308300826/units/systemd-fsck@.service.in
@@ -10,7 +10,7 @@ Description=File System Check on %f
Documentation=man:systemd-fsck@.service(8)
DefaultDependencies=no

View File

@ -8,8 +8,8 @@ if fsck was disabled for them (bnc#733283).
units/local-fs-pre.target | 1 +
1 file changed, 1 insertion(+)
--- systemd-206.orig/units/local-fs-pre.target
+++ systemd-206/units/local-fs-pre.target
--- systemd-206_git201308300826.orig/units/local-fs-pre.target
+++ systemd-206_git201308300826/units/local-fs-pre.target
@@ -9,3 +9,4 @@
Description=Local File Systems (Pre)
Documentation=man:systemd.special(7)

View File

@ -7,8 +7,8 @@ ensure passphrase is handled before starting getty on tty1.
units/systemd-ask-password-wall.service.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- systemd-206.orig/units/systemd-ask-password-wall.service.in
+++ systemd-206/units/systemd-ask-password-wall.service.in
--- systemd-206_git201308300826.orig/units/systemd-ask-password-wall.service.in
+++ systemd-206_git201308300826/units/systemd-ask-password-wall.service.in
@@ -8,7 +8,7 @@
[Unit]
Description=Forward Password Requests to Wall

View File

@ -7,8 +7,8 @@ Subject: ensure sysctl are applied after modules are loaded
units/systemd-sysctl.service.in | 1 +
1 file changed, 1 insertion(+)
--- systemd-206.orig/units/systemd-sysctl.service.in
+++ systemd-206/units/systemd-sysctl.service.in
--- systemd-206_git201308300826.orig/units/systemd-sysctl.service.in
+++ systemd-206_git201308300826/units/systemd-sysctl.service.in
@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service
DefaultDependencies=no
Conflicts=shutdown.target
@ -16,4 +16,4 @@ Subject: ensure sysctl are applied after modules are loaded
+After=systemd-modules-load.service
Before=sysinit.target shutdown.target
ConditionPathIsReadWrite=/proc/sys/
ConditionPathExists=|/etc/sysctl.conf
ConditionDirectoryNotEmpty=|/lib/sysctl.d

View File

@ -7,8 +7,8 @@ ensure btmp is owned only by root (bnc#777405).
tmpfiles.d/systemd.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- systemd-206.orig/tmpfiles.d/systemd.conf
+++ systemd-206/tmpfiles.d/systemd.conf
--- systemd-206_git201308300826.orig/tmpfiles.d/systemd.conf
+++ systemd-206_git201308300826/tmpfiles.d/systemd.conf
@@ -11,7 +11,7 @@ d /run/user 0755 root root ~10d
F /run/utmp 0664 root utmp -

View File

@ -6,9 +6,9 @@ Subject: fix support for boot prefixed initscript (bnc#746506)
src/systemctl/systemctl.c | 22 +++++++++++++++++++++-
1 file changed, 21 insertions(+), 1 deletion(-)
--- systemd-206.orig/src/systemctl/systemctl.c
+++ systemd-206/src/systemctl/systemctl.c
@@ -4238,8 +4238,28 @@ static int enable_sysv_units(char **args
--- systemd-206_git201308300826.orig/src/systemctl/systemctl.c
+++ systemd-206_git201308300826/src/systemctl/systemctl.c
@@ -4169,8 +4169,28 @@ static int enable_sysv_units(char **args
p[strlen(p) - sizeof(".service") + 1] = 0;
found_sysv = access(p, F_OK) >= 0;

View File

@ -7,8 +7,8 @@ Subject: handle disable_caplock and compose_table and kbd_rate
src/vconsole/vconsole-setup.c | 156 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 153 insertions(+), 3 deletions(-)
--- systemd-206.orig/src/vconsole/vconsole-setup.c
+++ systemd-206/src/vconsole/vconsole-setup.c
--- systemd-206_git201308300826.orig/src/vconsole/vconsole-setup.c
+++ systemd-206_git201308300826/src/vconsole/vconsole-setup.c
@@ -40,6 +40,7 @@
#include "macro.h"
#include "virt.h"

View File

@ -6,8 +6,8 @@ Authors:
Stanislav Brabec <sbrabec@suse.cz>
Cristian Rodríguez <crrodriguez@opensuse.org>
--- systemd-206.orig/src/vconsole/vconsole-setup.c
+++ systemd-206/src/vconsole/vconsole-setup.c
--- systemd-206_git201308300826.orig/src/vconsole/vconsole-setup.c
+++ systemd-206_git201308300826/src/vconsole/vconsole-setup.c
@@ -42,6 +42,10 @@
#include "fileio.h"
#include "strv.h"
@ -98,9 +98,9 @@ Cristian Rodríguez <crrodriguez@opensuse.org>
#ifdef HAVE_SYSV_COMPAT
free(vc_kbd_delay);
free(vc_kbd_rate);
--- systemd-206.orig/Makefile.am
+++ systemd-206/Makefile.am
@@ -2452,6 +2452,19 @@ dist_udevrules_DATA += \
--- systemd-206_git201308300826.orig/Makefile.am
+++ systemd-206_git201308300826/Makefile.am
@@ -2488,6 +2488,19 @@ dist_udevrules_DATA += \
rules/61-accelerometer.rules
# ------------------------------------------------------------------------------
@ -121,7 +121,7 @@ Cristian Rodríguez <crrodriguez@opensuse.org>
if ENABLE_GTK_DOC
SUBDIRS += \
--- /dev/null
+++ systemd-206/rules/73-seat-numlock.rules
+++ systemd-206_git201308300826/rules/73-seat-numlock.rules
@@ -0,0 +1,8 @@
+# This file is part of SUSE customization of systemd.
+#
@ -132,7 +132,7 @@ Cristian Rodríguez <crrodriguez@opensuse.org>
+
+SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}"
--- /dev/null
+++ systemd-206/src/login/numlock-on.c
+++ systemd-206_git201308300826/src/login/numlock-on.c
@@ -0,0 +1,34 @@
+/*
+ * numlock-on.c: Turn numlock-on
@ -168,8 +168,8 @@ Cristian Rodríguez <crrodriguez@opensuse.org>
+
+ exit(0);
+}
--- systemd-206.orig/units/systemd-vconsole-setup.service.in
+++ systemd-206/units/systemd-vconsole-setup.service.in
--- systemd-206_git201308300826.orig/units/systemd-vconsole-setup.service.in
+++ systemd-206_git201308300826/units/systemd-vconsole-setup.service.in
@@ -11,7 +11,7 @@ Documentation=man:systemd-vconsole-setup
DefaultDependencies=no
Conflicts=shutdown.target

View File

@ -7,10 +7,10 @@ handle ROOT_USES_LANG=ctype (bnc#792182).
src/core/locale-setup.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
--- systemd-206.orig/src/core/locale-setup.c
+++ systemd-206/src/core/locale-setup.c
@@ -70,6 +70,11 @@ static const char * const variable_names
int locale_setup(void) {
--- systemd-206_git201308300826.orig/src/core/locale-setup.c
+++ systemd-206_git201308300826/src/core/locale-setup.c
@@ -72,6 +72,11 @@ int locale_setup(char ***environment) {
char **env;
char *variables[_VARIABLE_MAX] = {};
int r = 0, i;
+#ifdef HAVE_SYSV_COMPAT
@ -21,7 +21,7 @@ handle ROOT_USES_LANG=ctype (bnc#792182).
if (detect_container(NULL) <= 0) {
r = parse_env_file("/proc/cmdline", WHITESPACE,
@@ -116,6 +121,27 @@ int locale_setup(void) {
@@ -118,6 +123,27 @@ int locale_setup(char ***environment) {
if (r < 0 && r != -ENOENT)
log_warning("Failed to read /etc/locale.conf: %s", strerror(-r));
}
@ -48,4 +48,4 @@ handle ROOT_USES_LANG=ctype (bnc#792182).
+#endif
for (i = 0; i < _VARIABLE_MAX; i++) {
if (variables[i]) {
if (!variables[i])

View File

@ -13,8 +13,8 @@ systemd unit drop-in files to add dependencies
create mode 100644 src/insserv-generator/Makefile
create mode 100644 src/insserv-generator/insserv-generator.c
--- systemd-206.orig/Makefile.am
+++ systemd-206/Makefile.am
--- systemd-206_git201308300826.orig/Makefile.am
+++ systemd-206_git201308300826/Makefile.am
@@ -321,6 +321,7 @@ rootlibexec_PROGRAMS = \
systemd-sleep
@ -23,7 +23,7 @@ systemd unit drop-in files to add dependencies
systemd-getty-generator \
systemd-fstab-generator \
systemd-system-update-generator
@@ -1642,6 +1643,14 @@ systemd_delta_LDADD = \
@@ -1655,6 +1656,14 @@ systemd_delta_LDADD = \
libsystemd-shared.la
# ------------------------------------------------------------------------------
@ -39,7 +39,7 @@ systemd unit drop-in files to add dependencies
src/getty-generator/getty-generator.c
--- /dev/null
+++ systemd-206/src/insserv-generator/Makefile
+++ systemd-206_git201308300826/src/insserv-generator/Makefile
@@ -0,0 +1,28 @@
+# This file is part of systemd.
+#
@ -70,7 +70,7 @@ systemd unit drop-in files to add dependencies
+
+.PHONY: all clean
--- /dev/null
+++ systemd-206/src/insserv-generator/insserv-generator.c
+++ systemd-206_git201308300826/src/insserv-generator/insserv-generator.c
@@ -0,0 +1,309 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+

View File

@ -1,96 +0,0 @@
Index: systemd-206/src/login/logind-dbus.c
===================================================================
--- systemd-206.orig/src/login/logind-dbus.c
+++ systemd-206/src/login/logind-dbus.c
@@ -643,6 +643,10 @@ static int bus_manager_create_session(Ma
session->create_message = dbus_message_ref(message);
+ /* Now, let's wait until the slice unit and stuff got
+ * created. We send the reply back from
+ * session_send_create_reply().*/
+
return 0;
fail:
@@ -2356,7 +2360,6 @@ DBusHandlerResult bus_message_filter(
if (streq_ptr(path, s->scope_job)) {
free(s->scope_job);
s->scope_job = NULL;
- session_save(s);
if (s->started) {
if (streq(result, "done"))
@@ -2365,7 +2368,8 @@ DBusHandlerResult bus_message_filter(
dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
session_send_create_reply(s, &error);
}
- }
+ } else
+ session_save(s);
}
session_add_to_gc_queue(s);
Index: systemd-206/src/login/logind-session-dbus.c
===================================================================
--- systemd-206.orig/src/login/logind-session-dbus.c
+++ systemd-206/src/login/logind-session-dbus.c
@@ -535,6 +535,10 @@ int session_send_create_reply(Session *s
if (!s->create_message)
return 0;
+ /* This is called after the session scope was successfully
+ * created, and finishes where bus_manager_create_session()
+ * left off. */
+
if (error) {
DBusError buffer;
@@ -588,6 +592,10 @@ int session_send_create_reply(Session *s
return log_oom();
}
+ /* Update the state file before we notify the client about the
+ * result */
+ session_save(s);
+
if (!dbus_connection_send(s->manager->bus, reply, NULL))
return log_oom();
Index: systemd-206/src/machine/machine-dbus.c
===================================================================
--- systemd-206.orig/src/machine/machine-dbus.c
+++ systemd-206/src/machine/machine-dbus.c
@@ -350,6 +350,10 @@ int machine_send_create_reply(Machine *m
return log_oom();
}
+ /* Update the machine state file before we notify the client
+ * about the result. */
+ machine_save(m);
+
if (!dbus_connection_send(m->manager->bus, reply, NULL))
return log_oom();
Index: systemd-206/src/machine/machined-dbus.c
===================================================================
--- systemd-206.orig/src/machine/machined-dbus.c
+++ systemd-206/src/machine/machined-dbus.c
@@ -543,7 +543,6 @@ DBusHandlerResult bus_message_filter(
if (streq_ptr(path, mm->scope_job)) {
free(mm->scope_job);
mm->scope_job = NULL;
- machine_save(mm);
if (mm->started) {
if (streq(result, "done"))
@@ -552,7 +551,8 @@ DBusHandlerResult bus_message_filter(
dbus_set_error(&error, BUS_ERROR_JOB_FAILED, "Start job for unit %s failed with '%s'", unit, result);
machine_send_create_reply(mm, &error);
}
- }
+ } else
+ machine_save(mm);
}
machine_add_to_gc_queue(mm);

View File

@ -7,8 +7,8 @@ Subject: module-load: handle SUSE /etc/sysconfig/kernel module list
units/systemd-modules-load.service.in | 1 +
2 files changed, 27 insertions(+), 1 deletion(-)
--- systemd-206.orig/src/modules-load/modules-load.c
+++ systemd-206/src/modules-load/modules-load.c
--- systemd-206_git201308300826.orig/src/modules-load/modules-load.c
+++ systemd-206_git201308300826/src/modules-load/modules-load.c
@@ -262,6 +262,9 @@ static int parse_argv(int argc, char *ar
int main(int argc, char *argv[]) {
int r, k;
@ -50,8 +50,8 @@ Subject: module-load: handle SUSE /etc/sysconfig/kernel module list
finish:
kmod_unref(ctx);
strv_free(arg_proc_cmdline_modules);
--- systemd-206.orig/units/systemd-modules-load.service.in
+++ systemd-206/units/systemd-modules-load.service.in
--- systemd-206_git201308300826.orig/units/systemd-modules-load.service.in
+++ systemd-206_git201308300826/units/systemd-modules-load.service.in
@@ -13,6 +13,7 @@ Conflicts=shutdown.target
After=systemd-readahead-collect.service systemd-readahead-replay.service
Before=sysinit.target shutdown.target

View File

@ -7,9 +7,9 @@ Subject: optionally warn if nss-myhostname is called
src/nss-myhostname/nss-myhostname.c | 32 ++++++++++++++++++++++++++++++++
2 files changed, 43 insertions(+)
--- systemd-206.orig/configure.ac
+++ systemd-206/configure.ac
@@ -803,6 +803,17 @@ if test "x$enable_myhostname" != "xno";
--- systemd-206_git201308300826.orig/configure.ac
+++ systemd-206_git201308300826/configure.ac
@@ -817,6 +817,17 @@ if test "x$enable_myhostname" != "xno";
fi
AM_CONDITIONAL(HAVE_MYHOSTNAME, [test "$have_myhostname" = "yes"])
@ -27,8 +27,8 @@ Subject: optionally warn if nss-myhostname is called
# ------------------------------------------------------------------------------
AC_ARG_WITH(firmware-path,
AS_HELP_STRING([--with-firmware-path=DIR[[[:DIR[...]]]]],
--- systemd-206.orig/src/nss-myhostname/nss-myhostname.c
+++ systemd-206/src/nss-myhostname/nss-myhostname.c
--- systemd-206_git201308300826.orig/src/nss-myhostname/nss-myhostname.c
+++ systemd-206_git201308300826/src/nss-myhostname/nss-myhostname.c
@@ -29,6 +29,9 @@
#include <net/if.h>
#include <stdlib.h>

View File

@ -11,8 +11,8 @@ PIDFile: and X-Systemd-RemainAfterExit to control it.
src/core/service.h | 1 +
2 files changed, 33 insertions(+), 2 deletions(-)
--- systemd-206.orig/src/core/service.c
+++ systemd-206/src/core/service.c
--- systemd-206_git201308300826.orig/src/core/service.c
+++ systemd-206_git201308300826/src/core/service.c
@@ -135,6 +135,7 @@ static void service_init(Unit *u) {
#ifdef HAVE_SYSV_COMPAT
s->sysv_start_priority = -1;
@ -21,7 +21,7 @@ PIDFile: and X-Systemd-RemainAfterExit to control it.
#endif
s->socket_fd = -1;
s->guess_main_pid = true;
@@ -877,6 +878,34 @@ static int service_load_sysv_path(Servic
@@ -879,6 +880,34 @@ static int service_load_sysv_path(Servic
free(short_description);
short_description = d;
@ -56,7 +56,7 @@ PIDFile: and X-Systemd-RemainAfterExit to control it.
} else if (state == LSB_DESCRIPTION) {
if (startswith(l, "#\t") || startswith(l, "# ")) {
@@ -927,7 +956,8 @@ static int service_load_sysv_path(Servic
@@ -929,7 +958,8 @@ static int service_load_sysv_path(Servic
/* Special setting for all SysV services */
s->type = SERVICE_FORKING;
@ -66,7 +66,7 @@ PIDFile: and X-Systemd-RemainAfterExit to control it.
s->guess_main_pid = false;
s->restart = SERVICE_RESTART_NO;
s->exec_context.ignore_sigpipe = false;
@@ -2094,7 +2124,7 @@ static void service_enter_running(Servic
@@ -2102,7 +2132,7 @@ static void service_enter_running(Servic
if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&
(s->bus_name_good || s->type != SERVICE_DBUS)) {
#ifdef HAVE_SYSV_COMPAT
@ -75,8 +75,8 @@ PIDFile: and X-Systemd-RemainAfterExit to control it.
s->remain_after_exit = false;
#endif
service_set_state(s, SERVICE_RUNNING);
--- systemd-206.orig/src/core/service.h
+++ systemd-206/src/core/service.h
--- systemd-206_git201308300826.orig/src/core/service.h
+++ systemd-206_git201308300826/src/core/service.h
@@ -177,6 +177,7 @@ struct Service {
bool is_sysv:1;
bool sysv_has_lsb:1;

View File

@ -10,9 +10,9 @@ Subject: restore /var/run and /var/lock bind mount if they aren't symlink
create mode 100644 units/var-lock.mount
create mode 100644 units/var-run.mount
--- systemd-206.orig/Makefile.am
+++ systemd-206/Makefile.am
@@ -407,6 +407,12 @@ dist_systemunit_DATA = \
--- systemd-206_git201308300826.orig/Makefile.am
+++ systemd-206_git201308300826/Makefile.am
@@ -419,6 +419,12 @@ dist_systemunit_DATA = \
units/system-update.target \
units/initrd-switch-root.target
@ -25,7 +25,7 @@ Subject: restore /var/run and /var/lock bind mount if they aren't symlink
nodist_systemunit_DATA = \
units/getty@.service \
units/serial-getty@.service \
@@ -4277,6 +4283,9 @@ RUNLEVEL4_TARGET_WANTS += \
@@ -4379,6 +4385,9 @@ RUNLEVEL4_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
RUNLEVEL5_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
@ -36,7 +36,7 @@ Subject: restore /var/run and /var/lock bind mount if they aren't symlink
SYSINIT_TARGET_WANTS += \
systemd-update-utmp.service
--- /dev/null
+++ systemd-206/units/var-lock.mount
+++ systemd-206_git201308300826/units/var-lock.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
@ -58,7 +58,7 @@ Subject: restore /var/run and /var/lock bind mount if they aren't symlink
+Type=bind
+Options=bind
--- /dev/null
+++ systemd-206/units/var-run.mount
+++ systemd-206_git201308300826/units/var-run.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#

View File

@ -12,9 +12,9 @@ Fixes https://bugzilla.novell.com/show_bug.cgi?id=721426
src/core/service.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
--- systemd-206.orig/src/core/service.c
+++ systemd-206/src/core/service.c
@@ -2092,8 +2092,13 @@ static void service_enter_running(Servic
--- systemd-206_git201308300826.orig/src/core/service.c
+++ systemd-206_git201308300826/src/core/service.c
@@ -2100,8 +2100,13 @@ static void service_enter_running(Servic
cgroup_ok = cgroup_good(s);
if ((main_pid_ok > 0 || (main_pid_ok < 0 && cgroup_ok != 0)) &&

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4c993de071118ea1df7ffc4be26ef0b0d78354ef15b2743a2783d20edfcde9de
size 2340536

3
systemd-207.tar.xz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ac1f8120315e7969063bbb0c181c8dc59509aeaf10c4266077c257a182ad5942
size 2363804

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Fri Sep 13 07:47:40 UTC 2013 - fcrozat@suse.com
- Enable Predictable Network interface names (bnc#829526).
-------------------------------------------------------------------
Fri Sep 13 03:14:36 UTC 2013 - crrodriguez@opensuse.org
- version 207, distribution specific changes follow, for overall
release notes see NEWS.
- Fixed:
* Failed at step PAM spawning /usr/lib/systemd/systemd:
Operation not permitted
* Fix shutdown hang "a stop job is running for Session 1 of user root"
that was reported in opensuse-factory list.
- systemd-sysctl no longer reads /etc/sysctl.conf however backward
compatbility is to be provides by a symlink created at %post.
- removed previously disabled upstream patches (merged):
0002-core-mount.c-mount_dump-don-t-segfault-if-mount-is-n.patch,
0004-disable-the-cgroups-release-agent-when-shutting-down.patch,
0005-cgroups-agent-remove-ancient-fallback-code-turn-conn.patch,
0006-suppress-status-message-output-at-shutdown-when-quie.patch,
- removed upstream merged patches:
exclude-dev-from-tmpfiles.patch,
logind_update_state_file_after_generating_....patch
- Add systemd-pam_config.patch: use correct include name for PAM
configuration on openSUSE.
-------------------------------------------------------------------
Mon Sep 9 14:39:46 UTC 2013 - fcrozat@suse.com
- Add exclude-dev-from-tmpfiles.patch: allow to exclude /dev from
tmpfiles (bnc#835813).
-------------------------------------------------------------------
Fri Sep 6 15:02:08 UTC 2013 - fcrozat@suse.com

View File

@ -25,7 +25,7 @@
Name: systemd-mini
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 206
Version: 207
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1+
@ -155,7 +155,7 @@ Patch39: systemd-tmp-safe-defaults.patch
Patch40: sysctl-handle-boot-sysctl.conf-kernel_release.patch
# PATCH-FIX-OPENSUSE ensure-shortname-is-set-as-hostname-bnc-820213.patch bnc#820213 fcrozat@suse.com -- Do not set anything beyond first dot as hostname
Patch41: ensure-shortname-is-set-as-hostname-bnc-820213.patch
Patch42: systemd-pam_config.patch
# Upstream First - Policy:
# Never add any patches to this package without the upstream commit id
# in the patch. Any patches added here without a very good reason to make
@ -170,8 +170,6 @@ 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-UPSTREAM logind_update_state_file_after_generating_the_session_fifo_not_before.patch -- fdo#67273
Patch47: logind_update_state_file_after_generating_the_session_fifo_not_before.patch
# udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -414,8 +412,8 @@ cp %{SOURCE7} m4/
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch46 -p1
%patch47 -p1
# udev patches
%patch1001 -p1
@ -431,7 +429,6 @@ cp %{SOURCE7} m4/
%build
autoreconf -fiv
# prevent pre-generated and distributed files from re-building
find . -name "*.[1-8]" -exec touch '{}' '+';
export V=1
@ -593,11 +590,6 @@ EOF
%fdupes -s %{buildroot}%{_mandir}
# disable predictable network interface naming until it has been reviewed by network team
cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/network.conf
F /run/udev/rules.d/80-net-name-slot.rules 0644 - - - "#disable predictable network interface naming for now"
EOF
# packaged in systemd-rpm-macros
rm -f %{buildroot}/%{_prefix}/lib/rpm/macros.d/macros.systemd
@ -638,6 +630,12 @@ for f in $(find /etc/systemd/system -type l -xtype l); do
[ -f "$new_target" ] && ln -s -f $new_target $f || :
done
# since v207 /etc/sysctl.conf is no longer parsed, however
# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf
if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then
/bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || :
fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ]; then
@ -857,7 +855,9 @@ exit 0
%{_prefix}/lib/systemd/system-generators/systemd-fstab-generator
%{_prefix}/lib/systemd/system-generators/systemd-system-update-generator
%{_prefix}/lib/systemd/system-generators/systemd-insserv-generator
%{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator
/%{_lib}/security/pam_systemd.so
/etc/pam.d/systemd-user
%dir %{_libexecdir}/modules-load.d
%dir %{_sysconfdir}/modules-load.d
@ -951,6 +951,9 @@ exit 0
%dir /var/lib/systemd/migrated
%dir /var/lib/systemd/catalog
%dir /var/lib/systemd/coredump
%dir /usr/share/zsh
%dir /usr/share/zsh/site-functions
/usr/share/zsh/site-functions/*
%files devel
%defattr(-,root,root,-)

14
systemd-pam_config.patch Normal file
View File

@ -0,0 +1,14 @@
diff --git a/src/login/systemd-user b/src/login/systemd-user
index 7b57dbf..c0fc793 100644
--- a/src/login/systemd-user
+++ b/src/login/systemd-user
@@ -2,7 +2,7 @@
# Used by systemd when launching systemd user instances.
-account include system-auth
-session include system-auth
+account include common-account
+session include common-session
auth required pam_deny.so
password required pam_deny.so

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Fri Sep 13 07:47:40 UTC 2013 - fcrozat@suse.com
- Enable Predictable Network interface names (bnc#829526).
-------------------------------------------------------------------
Fri Sep 13 03:14:36 UTC 2013 - crrodriguez@opensuse.org
- version 207, distribution specific changes follow, for overall
release notes see NEWS.
- Fixed:
* Failed at step PAM spawning /usr/lib/systemd/systemd:
Operation not permitted
* Fix shutdown hang "a stop job is running for Session 1 of user root"
that was reported in opensuse-factory list.
- systemd-sysctl no longer reads /etc/sysctl.conf however backward
compatbility is to be provides by a symlink created at %post.
- removed previously disabled upstream patches (merged):
0002-core-mount.c-mount_dump-don-t-segfault-if-mount-is-n.patch,
0004-disable-the-cgroups-release-agent-when-shutting-down.patch,
0005-cgroups-agent-remove-ancient-fallback-code-turn-conn.patch,
0006-suppress-status-message-output-at-shutdown-when-quie.patch,
- removed upstream merged patches:
exclude-dev-from-tmpfiles.patch,
logind_update_state_file_after_generating_....patch
- Add systemd-pam_config.patch: use correct include name for PAM
configuration on openSUSE.
-------------------------------------------------------------------
Mon Sep 9 14:39:46 UTC 2013 - fcrozat@suse.com
- Add exclude-dev-from-tmpfiles.patch: allow to exclude /dev from
tmpfiles (bnc#835813).
-------------------------------------------------------------------
Fri Sep 6 15:02:08 UTC 2013 - fcrozat@suse.com

View File

@ -23,7 +23,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 206
Version: 207
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1+
@ -150,7 +150,7 @@ Patch39: systemd-tmp-safe-defaults.patch
Patch40: sysctl-handle-boot-sysctl.conf-kernel_release.patch
# PATCH-FIX-OPENSUSE ensure-shortname-is-set-as-hostname-bnc-820213.patch bnc#820213 fcrozat@suse.com -- Do not set anything beyond first dot as hostname
Patch41: ensure-shortname-is-set-as-hostname-bnc-820213.patch
Patch42: systemd-pam_config.patch
# Upstream First - Policy:
# Never add any patches to this package without the upstream commit id
# in the patch. Any patches added here without a very good reason to make
@ -165,8 +165,6 @@ 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-UPSTREAM logind_update_state_file_after_generating_the_session_fifo_not_before.patch -- fdo#67273
Patch47: logind_update_state_file_after_generating_the_session_fifo_not_before.patch
# udev patches
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
@ -409,8 +407,8 @@ cp %{SOURCE7} m4/
%patch39 -p1
%patch40 -p1
%patch41 -p1
%patch42 -p1
%patch46 -p1
%patch47 -p1
# udev patches
%patch1001 -p1
@ -426,7 +424,6 @@ cp %{SOURCE7} m4/
%build
autoreconf -fiv
# prevent pre-generated and distributed files from re-building
find . -name "*.[1-8]" -exec touch '{}' '+';
export V=1
@ -588,11 +585,6 @@ EOF
%fdupes -s %{buildroot}%{_mandir}
# disable predictable network interface naming until it has been reviewed by network team
cat << EOF > %{buildroot}%{_prefix}/lib/tmpfiles.d/network.conf
F /run/udev/rules.d/80-net-name-slot.rules 0644 - - - "#disable predictable network interface naming for now"
EOF
# packaged in systemd-rpm-macros
rm -f %{buildroot}/%{_prefix}/lib/rpm/macros.d/macros.systemd
@ -633,6 +625,12 @@ for f in $(find /etc/systemd/system -type l -xtype l); do
[ -f "$new_target" ] && ln -s -f $new_target $f || :
done
# since v207 /etc/sysctl.conf is no longer parsed, however
# backward compatibility is provided by /etc/sysctl.d/99-sysctl.conf
if [ ! -L /etc/sysctl.d/99-sysctl.conf -a -e /etc/sysctl.conf ]; then
/bin/ln -sf /etc/sysctl.conf /etc/sysctl.d/99-sysctl.conf || :
fi
%postun
/sbin/ldconfig
if [ $1 -ge 1 ]; then
@ -852,7 +850,9 @@ exit 0
%{_prefix}/lib/systemd/system-generators/systemd-fstab-generator
%{_prefix}/lib/systemd/system-generators/systemd-system-update-generator
%{_prefix}/lib/systemd/system-generators/systemd-insserv-generator
%{_prefix}/lib/systemd/system-generators/systemd-gpt-auto-generator
/%{_lib}/security/pam_systemd.so
/etc/pam.d/systemd-user
%dir %{_libexecdir}/modules-load.d
%dir %{_sysconfdir}/modules-load.d
@ -946,6 +946,9 @@ exit 0
%dir /var/lib/systemd/migrated
%dir /var/lib/systemd/catalog
%dir /var/lib/systemd/coredump
%dir /usr/share/zsh
%dir /usr/share/zsh/site-functions
/usr/share/zsh/site-functions/*
%files devel
%defattr(-,root,root,-)

View File

@ -6,8 +6,8 @@ Subject: timedate: add support for openSUSE version of /etc/sysconfig/clock
src/timedate/timedated.c | 7 +++++++
1 file changed, 7 insertions(+)
--- systemd-206.orig/src/timedate/timedated.c
+++ systemd-206/src/timedate/timedated.c
--- systemd-206_git201308300826.orig/src/timedate/timedated.c
+++ systemd-206_git201308300826/src/timedate/timedated.c
@@ -182,6 +182,13 @@ static int read_data(void) {
goto have_timezone;
}

View File

@ -3,17 +3,6 @@ Subject: use /usr/sbin/sulogin in emergency service
In current Factory sulogin is in /usr/sbin which makes it impossible
to enter emergency service.
--- systemd-206.orig/units/emergency.service
+++ systemd-206/units/emergency.service
@@ -17,7 +17,7 @@ Environment=HOME=/root
WorkingDirectory=/root
ExecStartPre=-/bin/plymouth quit
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
-ExecStart=-/sbin/sulogin
+ExecStart=-/usr/sbin/sulogin
ExecStopPost=/usr/bin/systemctl --fail --no-block default
Type=idle
StandardInput=tty-force
--- systemd-206.orig/units/emergency.service.in
+++ systemd-206/units/emergency.service.in
@@ -17,7 +17,7 @@ Environment=HOME=/root