SHA256
1
0
forked from pool/systemd

Accepting request 313261 from home:jengelh:branches:Base:System

- Update to new upstream release 221

OBS-URL: https://build.opensuse.org/request/show/313261
OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=875
This commit is contained in:
Dr. Werner Fink 2015-06-23 12:56:50 +00:00 committed by Git OBS Bridge
parent 6eb77d03ed
commit 701179bcff
79 changed files with 1343 additions and 2294 deletions

View File

@ -1,69 +0,0 @@
Based on deff2d3e18e831d63bf98dd4114e4e35e41966e8 Mon Sep 17 00:00:00 2001
From: Werner Fink <werner@suse.de>
Date: Wed, 10 Jun 2015 10:47:13 +0200
Subject: [PATCH] Let some boolean survive a daemon-reload
Without the boolean bus_name_good services as well as cgroup_realized
for units a unit of Type=dbus and ExecReload sending SIGHUP to $MAINPID
will be terminated if systemd will be daemon reloaded.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746151
https://bugs.freedesktop.org/show_bug.cgi?id=78311
https://bugzilla.opensuse.org/show_bug.cgi?id=934077
---
src/core/service.c | 9 +++++++++
src/core/unit.c | 11 +++++++++++
2 files changed, 20 insertions(+)
--- systemd-219/src/core/service.c
+++ systemd-219/src/core/service.c 2015-06-11 12:24:36.769519910 +0000
@@ -1920,6 +1920,7 @@ static int service_serialize(Unit *u, FI
unit_serialize_item_format(u, f, "main-pid", PID_FMT, s->main_pid);
unit_serialize_item(u, f, "main-pid-known", yes_no(s->main_pid_known));
+ unit_serialize_item(u, f, "bus-name-good", yes_no(s->bus_name_good));
if (s->status_text)
unit_serialize_item(u, f, "status-text", s->status_text);
@@ -2044,6 +2045,14 @@ static int service_deserialize_item(Unit
log_unit_debug(u->id, "Failed to parse main-pid-known value %s", value);
else
s->main_pid_known = b;
+ } else if (streq(key, "bus-name-good")) {
+ int b;
+
+ b = parse_boolean(value);
+ if (b < 0)
+ log_unit_debug(u->id, "Failed to parse bus-name-good value %s", value);
+ else
+ s->bus_name_good = b;
} else if (streq(key, "status-text")) {
char *t;
--- systemd-219/src/core/unit.c
+++ systemd-219/src/core/unit.c 2015-06-11 12:30:56.805519155 +0000
@@ -2612,6 +2612,7 @@ int unit_serialize(Unit *u, FILE *f, FDS
if (u->cgroup_path)
unit_serialize_item(u, f, "cgroup", u->cgroup_path);
+ unit_serialize_item(u, f, "cgroup-realized", yes_no(u->cgroup_realized));
if (serialize_jobs) {
if (u->job) {
@@ -2803,6 +2804,16 @@ int unit_deserialize(Unit *u, FILE *f, F
assert(hashmap_put(u->manager->cgroup_unit, s, u) == 1);
continue;
+ } else if (streq(l, "cgroup-realized")) {
+ int b;
+
+ b = parse_boolean(v);
+ if (b < 0)
+ log_debug("Failed to parse cgroup-realized bool %s", v);
+ else
+ u->cgroup_realized = b;
+
+ continue;
}
if (unit_can_serialize(u)) {

View File

@ -1,29 +1,183 @@
--- ---
rules/99-systemd.rules.in | 2 rules/99-systemd.rules.in | 2
src/basic/terminal-util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
src/basic/terminal-util.h | 1
src/core/manager.c | 24 ++++++++--- src/core/manager.c | 24 ++++++++---
src/shared/util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
src/shared/util.h | 1
4 files changed, 116 insertions(+), 10 deletions(-) 4 files changed, 116 insertions(+), 10 deletions(-)
Index: systemd/rules/99-systemd.rules.in Index: systemd-221/rules/99-systemd.rules.in
=================================================================== ===================================================================
--- systemd.orig/rules/99-systemd.rules.in --- systemd-221.orig/rules/99-systemd.rules.in
+++ systemd/rules/99-systemd.rules.in +++ systemd-221/rules/99-systemd.rules.in
@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
ACTION=="remove", GOTO="systemd_end" ACTION=="remove", GOTO="systemd_end"
-SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd" -SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty[0-9]*", TAG+="systemd"
+SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd" +SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd"
KERNEL=="vport*", TAG+="systemd" KERNEL=="vport*", TAG+="systemd"
Index: systemd/src/core/manager.c SUBSYSTEM=="block", TAG+="systemd"
Index: systemd-221/src/basic/terminal-util.c
=================================================================== ===================================================================
--- systemd.orig/src/core/manager.c --- systemd-221.orig/src/basic/terminal-util.c
+++ systemd/src/core/manager.c +++ systemd-221/src/basic/terminal-util.c
@@ -113,7 +113,7 @@ static int manager_watch_jobs_in_progres @@ -647,6 +647,7 @@ int status_vprintf(const char *status, b
struct iovec iovec[6] = {};
int n = 0;
static bool prev_ephemeral;
+ static int is_ansi_console = -1;
assert(format);
@@ -660,6 +661,41 @@ int status_vprintf(const char *status, b
if (fd < 0)
return fd;
+ if (_unlikely_(is_ansi_console < 0))
+ is_ansi_console = ansi_console(fd);
+
+ if (status && !is_ansi_console) {
+ const char *esc, *ptr;
+ esc = strchr(status, 0x1B);
+ if (esc && (ptr = strpbrk(esc, "SOFDTI*"))) {
+ switch(*ptr) {
+ case 'S':
+ status = " SKIP ";
+ break;
+ case 'O':
+ status = " OK ";
+ break;
+ case 'F':
+ status = "FAILED";
+ break;
+ case 'D':
+ status = "DEPEND";
+ break;
+ case 'T':
+ status = " TIME ";
+ break;
+ case 'I':
+ status = " INFO ";
+ break;
+ case '*':
+ status = " BUSY ";
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
if (ellipse) {
char *e;
size_t emax, sl;
@@ -682,8 +718,12 @@ int status_vprintf(const char *status, b
}
}
- if (prev_ephemeral)
- IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ if (prev_ephemeral) {
+ if (is_ansi_console)
+ IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ else
+ IOVEC_SET_STRING(iovec[n++], "\r");
+ }
prev_ephemeral = ephemeral;
if (status) {
@@ -807,10 +847,47 @@ bool tty_is_vc_resolve(const char *tty)
return tty_is_vc(tty);
}
+bool ansi_console(int fd) {
+ static int cached_ansi_console = -1;
+
+ if (_likely_(cached_ansi_console >= 0))
+ return cached_ansi_console;
+
+ cached_ansi_console = isatty(fd) > 0;
+#if defined(__s390__) || defined(__s390x__)
+ if (cached_ansi_console) {
+ const char *e = getenv("TERM");
+ if (e != NULL && (streq(e, "dumb") || strneq(e, "ibm3", 4))) {
+ _cleanup_free_ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE,
+ "conmode", &mode, NULL);
+ if (r < 0 || mode == NULL || !streq(mode, "3270"))
+ cached_ansi_console = 0;
+ }
+ }
+#endif
+ return cached_ansi_console;
+}
+
const char *default_term_for_tty(const char *tty) {
assert(tty);
- return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
+ if (tty_is_vc_resolve(tty))
+ return "TERM=linux";
+ if (startswith(tty, "/dev/"))
+ tty += 5;
+#if defined (__s390__) || defined (__s390x__)
+ if (streq(tty, "ttyS0")) {
+ _cleanup_free_ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode",
+ &mode, NULL);
+ if (r < 0 || mode == NULL || !streq(mode, "3270"))
+ return "TERM=dumb";
+ if (streq(mode, "3270"))
+ return "TERM=ibm327x";
+ }
+#endif
+ return "TERM=vt220";
}
int fd_columns(int fd) {
@@ -890,8 +967,22 @@ void columns_lines_cache_reset(int signu
bool on_tty(void) {
static int cached_on_tty = -1;
- if (_unlikely_(cached_on_tty < 0))
+ if (_unlikely_(cached_on_tty < 0)) {
cached_on_tty = isatty(STDOUT_FILENO) > 0;
+#if defined (__s390__) || defined (__s390x__)
+ if (cached_on_tty) {
+ const char *e = getenv("TERM");
+ if (!e)
+ return cached_on_tty;
+ if (streq(e, "dumb") || strneq(e, "ibm3", 4)) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_on_tty = 0;
+ }
+ }
+#endif
+ }
return cached_on_tty;
}
Index: systemd-221/src/basic/terminal-util.h
===================================================================
--- systemd-221.orig/src/basic/terminal-util.h
+++ systemd-221/src/basic/terminal-util.h
@@ -77,6 +77,7 @@ unsigned lines(void);
void columns_lines_cache_reset(int _unused_ signum);
bool on_tty(void);
+bool ansi_console(int fd);
static inline const char *ansi_highlight(void) {
return on_tty() ? ANSI_HIGHLIGHT_ON : "";
Index: systemd-221/src/core/manager.c
===================================================================
--- systemd-221.orig/src/core/manager.c
+++ systemd-221/src/core/manager.c
@@ -113,7 +113,7 @@ static void manager_watch_jobs_in_progre
#define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1)) #define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1))
@ -89,161 +243,3 @@ Index: systemd/src/core/manager.c
m->jobs_in_progress_iteration++; m->jobs_in_progress_iteration++;
Index: systemd/src/shared/util.c
===================================================================
--- systemd.orig/src/shared/util.c
+++ systemd/src/shared/util.c
@@ -3212,6 +3212,7 @@ int status_vprintf(const char *status, b
struct iovec iovec[6] = {};
int n = 0;
static bool prev_ephemeral;
+ static int is_ansi_console = -1;
assert(format);
@@ -3225,6 +3226,41 @@ int status_vprintf(const char *status, b
if (fd < 0)
return fd;
+ if (_unlikely_(is_ansi_console < 0))
+ is_ansi_console = ansi_console(fd);
+
+ if (status && !is_ansi_console) {
+ const char *esc, *ptr;
+ esc = strchr(status, 0x1B);
+ if (esc && (ptr = strpbrk(esc, "SOFDTI*"))) {
+ switch(*ptr) {
+ case 'S':
+ status = " SKIP ";
+ break;
+ case 'O':
+ status = " OK ";
+ break;
+ case 'F':
+ status = "FAILED";
+ break;
+ case 'D':
+ status = "DEPEND";
+ break;
+ case 'T':
+ status = " TIME ";
+ break;
+ case 'I':
+ status = " INFO ";
+ break;
+ case '*':
+ status = " BUSY ";
+ break;
+ default:
+ break;
+ }
+ }
+ }
+
if (ellipse) {
char *e;
size_t emax, sl;
@@ -3247,8 +3283,12 @@ int status_vprintf(const char *status, b
}
}
- if (prev_ephemeral)
- IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ if (prev_ephemeral) {
+ if (is_ansi_console)
+ IOVEC_SET_STRING(iovec[n++], "\r" ANSI_ERASE_TO_END_OF_LINE);
+ else
+ IOVEC_SET_STRING(iovec[n++], "\r");
+ }
prev_ephemeral = ephemeral;
if (status) {
@@ -3504,8 +3544,22 @@ void columns_lines_cache_reset(int signu
bool on_tty(void) {
static int cached_on_tty = -1;
- if (_unlikely_(cached_on_tty < 0))
+ if (_unlikely_(cached_on_tty < 0)) {
cached_on_tty = isatty(STDOUT_FILENO) > 0;
+#if defined (__s390__) || defined (__s390x__)
+ if (cached_on_tty) {
+ const char *e = getenv("TERM");
+ if (!e)
+ return cached_on_tty;
+ if (streq(e, "dumb") || strneq(e, "ibm3", 4)) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_on_tty = 0;
+ }
+ }
+#endif
+ }
return cached_on_tty;
}
@@ -3523,6 +3577,27 @@ int files_same(const char *filea, const
a.st_ino == b.st_ino;
}
+bool ansi_console(int fd) {
+ static int cached_ansi_console = -1;
+
+ if (_unlikely_(cached_ansi_console < 0)) {
+ cached_ansi_console = isatty(fd) > 0;
+#if defined (__s390__) || defined (__s390x__)
+ if (cached_ansi_console) {
+ const char *e = getenv("TERM");
+ if (e && (streq(e, "dumb") || strneq(e, "ibm3", 4))) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ cached_ansi_console = 0;
+ }
+ }
+#endif
+ }
+
+ return cached_ansi_console;
+}
+
int running_in_chroot(void) {
int ret;
@@ -4006,7 +4081,23 @@ bool tty_is_vc_resolve(const char *tty)
const char *default_term_for_tty(const char *tty) {
assert(tty);
- return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
+ if (tty_is_vc_resolve(tty))
+ return "TERM=linux";
+
+ if (startswith(tty, "/dev/"))
+ tty += 5;
+
+#if defined (__s390__) || defined (__s390x__)
+ if (streq(tty, "ttyS0")) {
+ char *mode = NULL;
+ int r = parse_env_file("/proc/cmdline", WHITESPACE, "conmode", &mode, NULL);
+ if (r < 0 || !mode || !streq(mode, "3270"))
+ return "TERM=dumb";
+ if (streq(mode, "3270"))
+ return "TERM=ibm327x";
+ }
+#endif
+ return "TERM=vt220";
}
bool dirent_is_file(const struct dirent *de) {
Index: systemd/src/shared/util.h
===================================================================
--- systemd.orig/src/shared/util.h
+++ systemd/src/shared/util.h
@@ -475,6 +475,7 @@ unsigned lines(void);
void columns_lines_cache_reset(int _unused_ signum);
bool on_tty(void);
+bool ansi_console(int fd);
static inline const char *ansi_highlight(void) {
return on_tty() ? ANSI_HIGHLIGHT_ON : "";

View File

@ -3,11 +3,11 @@
src/systemctl/systemctl.c | 18 ++++++++++++------ src/systemctl/systemctl.c | 18 ++++++++++++------
2 files changed, 16 insertions(+), 6 deletions(-) 2 files changed, 16 insertions(+), 6 deletions(-)
Index: systemd-218/src/core/shutdown.c Index: systemd-221/src/core/shutdown.c
=================================================================== ===================================================================
--- systemd-218.orig/src/core/shutdown.c --- systemd-221.orig/src/core/shutdown.c
+++ systemd-218/src/core/shutdown.c +++ systemd-221/src/core/shutdown.c
@@ -400,6 +400,10 @@ int main(int argc, char *argv[]) { @@ -396,6 +396,10 @@ int main(int argc, char *argv[]) {
} }
reboot(cmd); reboot(cmd);
@ -18,11 +18,11 @@ Index: systemd-218/src/core/shutdown.c
if (errno == EPERM && in_container) { if (errno == EPERM && in_container) {
/* If we are in a container, and we lacked /* If we are in a container, and we lacked
* CAP_SYS_BOOT just exit, this will kill our * CAP_SYS_BOOT just exit, this will kill our
Index: systemd-218/src/systemctl/systemctl.c Index: systemd-221/src/systemctl/systemctl.c
=================================================================== ===================================================================
--- systemd-218.orig/src/systemctl/systemctl.c --- systemd-221.orig/src/systemctl/systemctl.c
+++ systemd-218/src/systemctl/systemctl.c +++ systemd-221/src/systemctl/systemctl.c
@@ -94,6 +94,7 @@ static bool arg_no_pager = false; @@ -93,6 +93,7 @@ static bool arg_no_pager = false;
static bool arg_no_wtmp = false; static bool arg_no_wtmp = false;
static bool arg_no_wall = false; static bool arg_no_wall = false;
static bool arg_no_reload = false; static bool arg_no_reload = false;
@ -30,7 +30,7 @@ Index: systemd-218/src/systemctl/systemctl.c
static bool arg_show_types = false; static bool arg_show_types = false;
static bool arg_ignore_inhibitors = false; static bool arg_ignore_inhibitors = false;
static bool arg_dry = false; static bool arg_dry = false;
@@ -6813,6 +6814,7 @@ static int halt_parse_argv(int argc, cha @@ -6636,6 +6637,7 @@ static int halt_parse_argv(int argc, cha
{ "reboot", no_argument, NULL, ARG_REBOOT }, { "reboot", no_argument, NULL, ARG_REBOOT },
{ "force", no_argument, NULL, 'f' }, { "force", no_argument, NULL, 'f' },
{ "wtmp-only", no_argument, NULL, 'w' }, { "wtmp-only", no_argument, NULL, 'w' },
@ -38,7 +38,7 @@ Index: systemd-218/src/systemctl/systemctl.c
{ "no-wtmp", no_argument, NULL, 'd' }, { "no-wtmp", no_argument, NULL, 'd' },
{ "no-wall", no_argument, NULL, ARG_NO_WALL }, { "no-wall", no_argument, NULL, ARG_NO_WALL },
{} {}
@@ -6865,10 +6867,13 @@ static int halt_parse_argv(int argc, cha @@ -6688,10 +6690,13 @@ static int halt_parse_argv(int argc, cha
case 'i': case 'i':
case 'h': case 'h':
@ -53,7 +53,7 @@ Index: systemd-218/src/systemctl/systemctl.c
case '?': case '?':
return -EINVAL; return -EINVAL;
@@ -7511,7 +7516,8 @@ static int halt_now(enum action a) { @@ -7291,7 +7296,8 @@ static int halt_now(enum action a) {
/* The kernel will automaticall flush ATA disks and suchlike /* The kernel will automaticall flush ATA disks and suchlike
* on reboot(), but the file systems need to be synce'd * on reboot(), but the file systems need to be synce'd
* explicitly in advance. */ * explicitly in advance. */
@ -63,7 +63,7 @@ Index: systemd-218/src/systemctl/systemctl.c
/* Make sure C-A-D is handled by the kernel from this point /* Make sure C-A-D is handled by the kernel from this point
* on... */ * on... */
@@ -7519,14 +7525,14 @@ static int halt_now(enum action a) { @@ -7299,14 +7305,14 @@ static int halt_now(enum action a) {
switch (a) { switch (a) {

View File

@ -5,17 +5,17 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
--- ---
Makefile.am | 2 Makefile.am | 2
src/basic/util.c | 1
src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++ src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++
src/core/mount-iface.h | 25 +++++++ src/core/mount-iface.h | 25 +++++++
src/core/mount.c | 35 +++++++++ src/core/mount.c | 35 +++++++++
src/shared/util.c | 1
5 files changed, 234 insertions(+), 2 deletions(-) 5 files changed, 234 insertions(+), 2 deletions(-)
Index: systemd-218/Makefile.am Index: systemd-221/Makefile.am
=================================================================== ===================================================================
--- systemd-218.orig/Makefile.am --- systemd-221.orig/Makefile.am
+++ systemd-218/Makefile.am +++ systemd-221/Makefile.am
@@ -1134,6 +1134,8 @@ libsystemd_core_la_SOURCES = \ @@ -1164,6 +1164,8 @@ libcore_la_SOURCES = \
src/core/machine-id-setup.h \ src/core/machine-id-setup.h \
src/core/mount-setup.c \ src/core/mount-setup.c \
src/core/mount-setup.h \ src/core/mount-setup.h \
@ -24,10 +24,22 @@ Index: systemd-218/Makefile.am
src/core/kmod-setup.c \ src/core/kmod-setup.c \
src/core/kmod-setup.h \ src/core/kmod-setup.h \
src/core/loopback-setup.h \ src/core/loopback-setup.h \
Index: systemd-218/src/core/mount-iface.c Index: systemd-221/src/basic/util.c
===================================================================
--- systemd-221.orig/src/basic/util.c
+++ systemd-221/src/basic/util.c
@@ -1478,6 +1478,7 @@ bool fstype_is_network(const char *fstyp
"ncp\0"
"nfs\0"
"nfs4\0"
+ "afs\0"
"gfs\0"
"gfs2\0"
"glusterfs\0";
Index: systemd-221/src/core/mount-iface.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd-218/src/core/mount-iface.c +++ systemd-221/src/core/mount-iface.c
@@ -0,0 +1,173 @@ @@ -0,0 +1,173 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+ +
@ -202,10 +214,10 @@ Index: systemd-218/src/core/mount-iface.c
+ freeifaddrs(ifa_list); + freeifaddrs(ifa_list);
+ ifa_list = NULL; + ifa_list = NULL;
+} +}
Index: systemd-218/src/core/mount-iface.h Index: systemd-221/src/core/mount-iface.h
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd-218/src/core/mount-iface.h +++ systemd-221/src/core/mount-iface.h
@@ -0,0 +1,25 @@ @@ -0,0 +1,25 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+ +
@ -232,11 +244,11 @@ Index: systemd-218/src/core/mount-iface.h
+ +
+char *host2iface(const char *ip); +char *host2iface(const char *ip);
+void freeroutes(void); +void freeroutes(void);
Index: systemd-218/src/core/mount.c Index: systemd-221/src/core/mount.c
=================================================================== ===================================================================
--- systemd-218.orig/src/core/mount.c --- systemd-221.orig/src/core/mount.c
+++ systemd-218/src/core/mount.c +++ systemd-221/src/core/mount.c
@@ -38,6 +38,7 @@ @@ -35,6 +35,7 @@
#include "mkdir.h" #include "mkdir.h"
#include "path-util.h" #include "path-util.h"
#include "mount-setup.h" #include "mount-setup.h"
@ -244,7 +256,7 @@ Index: systemd-218/src/core/mount.c
#include "unit-name.h" #include "unit-name.h"
#include "dbus-mount.h" #include "dbus-mount.h"
#include "special.h" #include "special.h"
@@ -1365,8 +1366,9 @@ static int mount_add_one( @@ -1332,8 +1333,9 @@ static int mount_setup_unit(
_cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL; _cleanup_free_ char *e = NULL, *w = NULL, *o = NULL, *f = NULL;
bool load_extras = false; bool load_extras = false;
MountParameters *p; MountParameters *p;
@ -255,17 +267,17 @@ Index: systemd-218/src/core/mount.c
int r; int r;
assert(m); assert(m);
@@ -1391,6 +1393,8 @@ static int mount_add_one( @@ -1358,6 +1360,8 @@ static int mount_setup_unit(
if (!e) if (r < 0)
return -ENOMEM; return r;
+ isnetwork = fstype_is_network(fstype); + isnetwork = fstype_is_network(fstype);
+ +
u = manager_get_unit(m, e); u = manager_get_unit(m, e);
if (!u) { if (!u) {
delete = true; delete = true;
@@ -1419,7 +1423,7 @@ static int mount_add_one( @@ -1385,7 +1389,7 @@ static int mount_setup_unit(
if (m->running_as == SYSTEMD_SYSTEM) { if (m->running_as == MANAGER_SYSTEM) {
const char* target; const char* target;
- target = mount_needs_network(options, fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET; - target = mount_needs_network(options, fstype) ? SPECIAL_REMOTE_FS_TARGET : SPECIAL_LOCAL_FS_TARGET;
@ -273,7 +285,7 @@ Index: systemd-218/src/core/mount.c
r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true); r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
if (r < 0) if (r < 0)
goto fail; goto fail;
@@ -1505,6 +1509,32 @@ static int mount_add_one( @@ -1471,6 +1475,32 @@ static int mount_setup_unit(
goto fail; goto fail;
} }
@ -296,7 +308,7 @@ Index: systemd-218/src/core/mount.c
+ else { + else {
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, target, NULL, true); + r = unit_add_dependency_by_name(u, UNIT_AFTER, target, NULL, true);
+ if (r < 0) + if (r < 0)
+ log_unit_error(u->id, "Failed to add dependency on %s, ignoring: %s", + log_unit_error(u, "Failed to add dependency on %s, ignoring: %s",
+ target, strerror(-r)); + target, strerror(-r));
+ } + }
+ } + }
@ -306,7 +318,7 @@ Index: systemd-218/src/core/mount.c
if (changed) if (changed)
unit_add_to_dbus_queue(u); unit_add_to_dbus_queue(u);
@@ -1560,6 +1590,7 @@ static int mount_load_proc_self_mountinf @@ -1537,6 +1567,7 @@ static int mount_load_proc_self_mountinf
if (r == 0 && k < 0) if (r == 0 && k < 0)
r = k; r = k;
} }
@ -314,15 +326,3 @@ Index: systemd-218/src/core/mount.c
return r; return r;
} }
Index: systemd-218/src/shared/util.c
===================================================================
--- systemd-218.orig/src/shared/util.c
+++ systemd-218/src/shared/util.c
@@ -1667,6 +1667,7 @@ bool fstype_is_network(const char *fstyp
"ncp\0"
"nfs\0"
"nfs4\0"
+ "afs\0"
"gfs\0"
"gfs2\0"
"glusterfs\0";

View File

@ -1,6 +1,12 @@
--- systemd-209/src/login/logind-session.c ---
+++ systemd-209/src/login/logind-session.c 2014-02-28 12:12:14.762736079 +0000 src/login/logind-session.c | 6 ++++++
@@ -525,6 +525,12 @@ int session_start(Session *s) { 1 file changed, 6 insertions(+)
Index: systemd-221/src/login/logind-session.c
===================================================================
--- systemd-221.orig/src/login/logind-session.c
+++ systemd-221/src/login/logind-session.c
@@ -548,6 +548,12 @@ int session_start(Session *s) {
if (r < 0) if (r < 0)
return r; return r;

View File

@ -1,13 +1,13 @@
--- ---
src/login/logind-action.c | 5 +++++ src/login/logind-action.c | 5 +++++
src/login/logind-dbus.c | 20 ++++++++++++++++---- src/login/logind-dbus.c | 31 +++++++++++++++++++++++--------
2 files changed, 21 insertions(+), 4 deletions(-) 2 files changed, 28 insertions(+), 8 deletions(-)
Index: systemd-218/src/login/logind-action.c Index: systemd-221/src/login/logind-action.c
=================================================================== ===================================================================
--- systemd-218.orig/src/login/logind-action.c --- systemd-221.orig/src/login/logind-action.c
+++ systemd-218/src/login/logind-action.c +++ systemd-221/src/login/logind-action.c
@@ -83,6 +83,11 @@ int manager_handle_action( @@ -85,6 +85,11 @@ int manager_handle_action(
/* If the key handling is inhibited, don't do anything */ /* If the key handling is inhibited, don't do anything */
if (inhibit_key > 0) { if (inhibit_key > 0) {
@ -19,57 +19,83 @@ Index: systemd-218/src/login/logind-action.c
if (manager_is_inhibited(m, inhibit_key, INHIBIT_BLOCK, NULL, true, false, 0, NULL)) { if (manager_is_inhibited(m, inhibit_key, INHIBIT_BLOCK, NULL, true, false, 0, NULL)) {
log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key)); log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key));
return 0; return 0;
Index: systemd-218/src/login/logind-dbus.c Index: systemd-221/src/login/logind-dbus.c
=================================================================== ===================================================================
--- systemd-218.orig/src/login/logind-dbus.c --- systemd-221.orig/src/login/logind-dbus.c
+++ systemd-218/src/login/logind-dbus.c +++ systemd-221/src/login/logind-dbus.c
@@ -1487,9 +1487,11 @@ static int method_do_shutdown_or_sleep( @@ -1625,12 +1625,13 @@ static int verify_shutdown_creds(
sd_bus_error *error) { const char *action,
const char *action_multiple_sessions,
const char *action_ignore_inhibit,
- sd_bus_error *error) {
+ sd_bus_error *error, const char *sleep_verb) {
_cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL; _cleanup_bus_creds_unref_ sd_bus_creds *creds = NULL;
- bool multiple_sessions, blocked; - bool multiple_sessions, blocked;
+ bool multiple_sessions, blocked, shutdown_through_acpi; + bool multiple_sessions, blocked, shutdown_through_acpi;
int interactive, r;
uid_t uid; uid_t uid;
+ int fd; - int r;
+ int r, fd;
+ struct stat buf; + struct stat buf;
assert(m); assert(m);
assert(message); assert(message);
@@ -1533,7 +1535,17 @@ static int method_do_shutdown_or_sleep( @@ -1652,7 +1653,19 @@ static int verify_shutdown_creds(
multiple_sessions = r > 0; multiple_sessions = r > 0;
blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL); blocked = manager_is_inhibited(m, w, INHIBIT_BLOCK, NULL, false, true, uid, NULL);
- if (multiple_sessions) { - if (multiple_sessions && action_multiple_sessions) {
+ fd = open ("/run/systemd/acpi-shutdown", O_NOFOLLOW|O_PATH|O_CLOEXEC); + fd = open ("/run/systemd/acpi-shutdown", O_NOFOLLOW|O_PATH|O_CLOEXEC);
+ if (fd >= 0) { + if (fd >= 0) {
+ shutdown_through_acpi = ((fstat(fd,&buf) == 0) && (time(NULL) - buf.st_mtime <= 65) && !sleep_verb); + shutdown_through_acpi = fstat(fd, &buf) == 0 &&
+ time(NULL) - buf.st_mtime <= 65 &&
+ sleep_verb == NULL;
+ close(fd); + close(fd);
+ unlink ("/run/systemd/acpi-shutdown"); + unlink ("/run/systemd/acpi-shutdown");
+ } + }
+ else + else
+ shutdown_through_acpi = false; + shutdown_through_acpi = false;
+ +
+ + if (multiple_sessions && action_multiple_sessions &&
+ if (multiple_sessions && !shutdown_through_acpi) { + !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, &m->polkit_registry, error); r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0) if (r < 0)
return r; return r;
@@ -1541,7 +1553,7 @@ static int method_do_shutdown_or_sleep( @@ -1660,7 +1673,7 @@ static int verify_shutdown_creds(
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
} }
- if (blocked) { - if (blocked && action_ignore_inhibit) {
+ if (blocked && !shutdown_through_acpi) { + if (blocked && action_ignore_inhibit && !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, &m->polkit_registry, error); r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0) if (r < 0)
return r; return r;
@@ -1549,7 +1561,7 @@ static int method_do_shutdown_or_sleep( @@ -1668,7 +1681,8 @@ static int verify_shutdown_creds(
return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */ return 1; /* No authorization for now, but the async polkit stuff will call us again when it has it */
} }
- if (!multiple_sessions && !blocked) { - if (!multiple_sessions && !blocked && action) {
+ if (!multiple_sessions && !blocked && !shutdown_through_acpi) { + if (!multiple_sessions && !blocked && action &&
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, &m->polkit_registry, error); + !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0) if (r < 0)
return r; return r;
@@ -1716,7 +1730,7 @@ static int method_do_shutdown_or_sleep(
}
r = verify_shutdown_creds(m, message, w, interactive, action, action_multiple_sessions,
- action_ignore_inhibit, error);
+ action_ignore_inhibit, error, sleep_verb);
if (r != 0)
return r;
@@ -1896,7 +1910,8 @@ static int method_schedule_shutdown(sd_b
return sd_bus_error_setf(error, SD_BUS_ERROR_INVALID_ARGS, "Unsupported shutdown type");
r = verify_shutdown_creds(m, message, INHIBIT_SHUTDOWN, false,
- action, action_multiple_sessions, action_ignore_inhibit, error);
+ action, action_multiple_sessions,
+ action_ignore_inhibit, error, "UNUSED");
if (r != 0)
return r;

View File

@ -1,917 +0,0 @@
From 628c89cc68ab96fce2de7ebba5933725d147aecc Mon Sep 17 00:00:00 2001
From: Lennart Poettering <lennart@poettering.net>
Date: Fri, 27 Feb 2015 21:55:08 +0100
Subject: [PATCH] core: rework device state logic
References: https://bugzilla.redhat.com/show_bug.cgi?id=1196452
This change introduces a new state "tentative" for device units. Device
units are considered "plugged" when udev announced them, "dead" when
they are not available in the kernel, and "tentative" when they are
referenced in /proc/self/mountinfo or /proc/swaps but not (yet)
announced via udev.
This should fix a race when device nodes (like loop devices) are created
and immediately mounted. Previously, systemd might end up seeing the
mount unit before the device, and would thus pull down the mount because
its BindTo dependency on the device would not be fulfilled.
===
[The bug can be triggered by
cp -a /dev/sda1 (pick any source) /dev/xxx; mount /dev/xxx /mnt;
since "xxx" is a device udev does not know about even if it runs
and is race-free in the moment you are trying.
-jengelh]
---
src/core/device.c | 368 +++++++++++++++++++++++++++++++++---------------------
src/core/device.h | 14 ++-
src/core/mount.c | 46 ++++---
src/core/swap.c | 32 +++--
src/core/swap.h | 4 +-
src/core/unit.c | 1 -
6 files changed, 285 insertions(+), 180 deletions(-)
diff --git a/src/core/device.c b/src/core/device.c
index 2d983cc..e41ed41 100644
--- a/src/core/device.c
+++ b/src/core/device.c
@@ -34,7 +34,8 @@
static const UnitActiveState state_translation_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = UNIT_INACTIVE,
- [DEVICE_PLUGGED] = UNIT_ACTIVE
+ [DEVICE_TENTATIVE] = UNIT_ACTIVATING,
+ [DEVICE_PLUGGED] = UNIT_ACTIVE,
};
static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata);
@@ -63,6 +64,41 @@ static void device_unset_sysfs(Device *d) {
d->sysfs = NULL;
}
+static int device_set_sysfs(Device *d, const char *sysfs) {
+ Device *first;
+ char *copy;
+ int r;
+
+ assert(d);
+
+ if (streq_ptr(d->sysfs, sysfs))
+ return 0;
+
+ r = hashmap_ensure_allocated(&UNIT(d)->manager->devices_by_sysfs, &string_hash_ops);
+ if (r < 0)
+ return r;
+
+ copy = strdup(sysfs);
+ if (!copy)
+ return -ENOMEM;
+
+ device_unset_sysfs(d);
+
+ first = hashmap_get(UNIT(d)->manager->devices_by_sysfs, sysfs);
+ LIST_PREPEND(same_sysfs, first, d);
+
+ r = hashmap_replace(UNIT(d)->manager->devices_by_sysfs, copy, first);
+ if (r < 0) {
+ LIST_REMOVE(same_sysfs, first, d);
+ free(copy);
+ return r;
+ }
+
+ d->sysfs = copy;
+
+ return 0;
+}
+
static void device_init(Unit *u) {
Device *d = DEVICE(u);
@@ -110,8 +146,13 @@ static int device_coldplug(Unit *u) {
assert(d);
assert(d->state == DEVICE_DEAD);
- if (d->sysfs)
+ if (d->found & DEVICE_FOUND_UDEV)
+ /* If udev says the device is around, it's around */
device_set_state(d, DEVICE_PLUGGED);
+ else if (d->found != DEVICE_NOT_FOUND)
+ /* If a device is found in /proc/self/mountinfo or
+ * /proc/swaps, it's "tentatively" around. */
+ device_set_state(d, DEVICE_TENTATIVE);
return 0;
}
@@ -140,49 +181,9 @@ _pure_ static const char *device_sub_state_to_string(Unit *u) {
return device_state_to_string(DEVICE(u)->state);
}
-static int device_add_escaped_name(Unit *u, const char *dn) {
- _cleanup_free_ char *e = NULL;
- int r;
-
- assert(u);
- assert(dn);
- assert(dn[0] == '/');
-
- e = unit_name_from_path(dn, ".device");
- if (!e)
- return -ENOMEM;
-
- r = unit_add_name(u, e);
- if (r < 0 && r != -EEXIST)
- return r;
-
- return 0;
-}
-
-static int device_find_escape_name(Manager *m, const char *dn, Unit **_u) {
- _cleanup_free_ char *e = NULL;
- Unit *u;
-
- assert(m);
- assert(dn);
- assert(dn[0] == '/');
- assert(_u);
-
- e = unit_name_from_path(dn, ".device");
- if (!e)
- return -ENOMEM;
-
- u = manager_get_unit(m, e);
- if (u) {
- *_u = u;
- return 1;
- }
-
- return 0;
-}
-
-static int device_make_description(Unit *u, struct udev_device *dev, const char *path) {
+static int device_update_description(Unit *u, struct udev_device *dev, const char *path) {
const char *model;
+ int r;
assert(u);
assert(dev);
@@ -207,13 +208,16 @@ static int device_make_description(Unit *u, struct udev_device *dev, const char
j = strjoin(model, " ", label, NULL);
if (j)
- return unit_set_description(u, j);
- }
+ r = unit_set_description(u, j);
+ } else
+ r = unit_set_description(u, model);
+ } else
+ r = unit_set_description(u, path);
- return unit_set_description(u, model);
- }
+ if (r < 0)
+ log_unit_error_errno(u->id, r, "Failed to set device description: %m");
- return unit_set_description(u, path);
+ return r;
}
static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
@@ -240,20 +244,20 @@ static int device_add_udev_wants(Unit *u, struct udev_device *dev) {
n = unit_name_mangle(e, MANGLE_NOGLOB);
if (!n)
- return -ENOMEM;
+ return log_oom();
r = unit_add_dependency_by_name(u, UNIT_WANTS, n, NULL, true);
if (r < 0)
- return r;
+ return log_unit_error_errno(u->id, r, "Failed to add wants dependency: %m");
}
if (!isempty(state))
- log_unit_warning(u->id, "Property %s on %s has trailing garbage, ignoring.",
- property, strna(udev_device_get_syspath(dev)));
+ log_unit_warning(u->id, "Property %s on %s has trailing garbage, ignoring.", property, strna(udev_device_get_syspath(dev)));
return 0;
}
-static int device_update_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {
+static int device_setup_unit(Manager *m, struct udev_device *dev, const char *path, bool main) {
+ _cleanup_free_ char *e = NULL;
const char *sysfs;
Unit *u = NULL;
bool delete;
@@ -267,12 +271,18 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
if (!sysfs)
return 0;
- r = device_find_escape_name(m, path, &u);
- if (r < 0)
- return r;
+ e = unit_name_from_path(path, ".device");
+ if (!e)
+ return log_oom();
+
+ u = manager_get_unit(m, e);
- if (u && DEVICE(u)->sysfs && !path_equal(DEVICE(u)->sysfs, sysfs))
+ if (u &&
+ DEVICE(u)->sysfs &&
+ !path_equal(DEVICE(u)->sysfs, sysfs)) {
+ log_unit_error(u->id, "Device %s appeared twice with different sysfs paths %s and %s", e, DEVICE(u)->sysfs, sysfs);
return -EEXIST;
+ }
if (!u) {
delete = true;
@@ -281,7 +291,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
if (!u)
return log_oom();
- r = device_add_escaped_name(u, path);
+ r = unit_add_name(u, e);
if (r < 0)
goto fail;
@@ -293,37 +303,16 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
* actually been seen yet ->sysfs will not be
* initialized. Hence initialize it if necessary. */
- if (!DEVICE(u)->sysfs) {
- Device *first;
-
- DEVICE(u)->sysfs = strdup(sysfs);
- if (!DEVICE(u)->sysfs) {
- r = -ENOMEM;
- goto fail;
- }
-
- r = hashmap_ensure_allocated(&m->devices_by_sysfs, &string_hash_ops);
- if (r < 0)
- goto fail;
-
- first = hashmap_get(m->devices_by_sysfs, sysfs);
- LIST_PREPEND(same_sysfs, first, DEVICE(u));
-
- r = hashmap_replace(m->devices_by_sysfs, DEVICE(u)->sysfs, first);
- if (r < 0)
- goto fail;
- }
-
- device_make_description(u, dev, path);
+ r = device_set_sysfs(DEVICE(u), sysfs);
+ if (r < 0)
+ goto fail;
- if (main) {
- /* The additional systemd udev properties we only
- * interpret for the main object */
+ (void) device_update_description(u, dev, path);
- r = device_add_udev_wants(u, dev);
- if (r < 0)
- goto fail;
- }
+ /* The additional systemd udev properties we only interpret
+ * for the main object */
+ if (main)
+ (void) device_add_udev_wants(u, dev);
/* Note that this won't dispatch the load queue, the caller
* has to do that if needed and appropriate */
@@ -332,7 +321,7 @@ static int device_update_unit(Manager *m, struct udev_device *dev, const char *p
return 0;
fail:
- log_warning_errno(r, "Failed to load device unit: %m");
+ log_unit_warning_errno(u->id, r, "Failed to set up device unit: %m");
if (delete && u)
unit_free(u);
@@ -340,7 +329,7 @@ fail:
return r;
}
-static int device_process_new_device(Manager *m, struct udev_device *dev) {
+static int device_process_new(Manager *m, struct udev_device *dev) {
const char *sysfs, *dn, *alias;
struct udev_list_entry *item = NULL, *first = NULL;
int r;
@@ -352,14 +341,14 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
return 0;
/* Add the main unit named after the sysfs path */
- r = device_update_unit(m, dev, sysfs, true);
+ r = device_setup_unit(m, dev, sysfs, true);
if (r < 0)
return r;
/* Add an additional unit for the device node */
dn = udev_device_get_devnode(dev);
if (dn)
- device_update_unit(m, dev, dn, false);
+ (void) device_setup_unit(m, dev, dn, false);
/* Add additional units for all symlinks */
first = udev_device_get_devlinks_list_entry(dev);
@@ -386,7 +375,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
st.st_rdev != udev_device_get_devnum(dev))
continue;
- device_update_unit(m, dev, p, false);
+ (void) device_setup_unit(m, dev, p, false);
}
/* Add additional units for all explicitly configured
@@ -403,7 +392,7 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
e[l] = 0;
if (path_is_absolute(e))
- device_update_unit(m, dev, e, false);
+ (void) device_setup_unit(m, dev, e, false);
else
log_warning("SYSTEMD_ALIAS for %s is not an absolute path, ignoring: %s", sysfs, e);
}
@@ -414,39 +403,62 @@ static int device_process_new_device(Manager *m, struct udev_device *dev) {
return 0;
}
-static void device_set_path_plugged(Manager *m, struct udev_device *dev) {
- const char *sysfs;
+static void device_update_found_one(Device *d, bool add, DeviceFound found, bool now) {
+ DeviceFound n;
+
+ assert(d);
+
+ n = add ? (d->found | found) : (d->found & ~found);
+ if (n == d->found)
+ return;
+
+ d->found = n;
+
+ if (now) {
+ if (d->found & DEVICE_FOUND_UDEV)
+ device_set_state(d, DEVICE_PLUGGED);
+ else if (d->found != DEVICE_NOT_FOUND)
+ device_set_state(d, DEVICE_TENTATIVE);
+ else
+ device_set_state(d, DEVICE_DEAD);
+ }
+}
+
+static int device_update_found_by_sysfs(Manager *m, const char *sysfs, bool add, DeviceFound found, bool now) {
Device *d, *l;
assert(m);
- assert(dev);
+ assert(sysfs);
- sysfs = udev_device_get_syspath(dev);
- if (!sysfs)
- return;
+ if (found == DEVICE_NOT_FOUND)
+ return 0;
l = hashmap_get(m->devices_by_sysfs, sysfs);
LIST_FOREACH(same_sysfs, d, l)
- device_set_state(d, DEVICE_PLUGGED);
+ device_update_found_one(d, add, found, now);
+
+ return 0;
}
-static int device_process_removed_device(Manager *m, struct udev_device *dev) {
- const char *sysfs;
- Device *d;
+static int device_update_found_by_name(Manager *m, const char *path, bool add, DeviceFound found, bool now) {
+ _cleanup_free_ char *e = NULL;
+ Unit *u;
assert(m);
- assert(dev);
+ assert(path);
- sysfs = udev_device_get_syspath(dev);
- if (!sysfs)
- return -ENOMEM;
+ if (found == DEVICE_NOT_FOUND)
+ return 0;
- /* Remove all units of this sysfs path */
- while ((d = hashmap_get(m->devices_by_sysfs, sysfs))) {
- device_unset_sysfs(d);
- device_set_state(d, DEVICE_DEAD);
- }
+ e = unit_name_from_path(path, ".device");
+ if (!e)
+ return log_oom();
+ u = manager_get_unit(m, e);
+ if (!u)
+ return 0;
+
+ device_update_found_one(DEVICE(u), add, found, now);
return 0;
}
@@ -462,22 +474,6 @@ static bool device_is_ready(struct udev_device *dev) {
return parse_boolean(ready) != 0;
}
-static int device_process_new_path(Manager *m, const char *path) {
- _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
-
- assert(m);
- assert(path);
-
- dev = udev_device_new_from_syspath(m->udev, path);
- if (!dev)
- return log_oom();
-
- if (!device_is_ready(dev))
- return 0;
-
- return device_process_new_device(m, dev);
-}
-
static Unit *device_following(Unit *u) {
Device *d = DEVICE(u);
Device *other, *first = NULL;
@@ -604,12 +600,31 @@ static int device_enumerate(Manager *m) {
goto fail;
first = udev_enumerate_get_list_entry(e);
- udev_list_entry_foreach(item, first)
- device_process_new_path(m, udev_list_entry_get_name(item));
+ udev_list_entry_foreach(item, first) {
+ _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
+ const char *sysfs;
+
+ sysfs = udev_list_entry_get_name(item);
+
+ dev = udev_device_new_from_syspath(m->udev, sysfs);
+ if (!dev) {
+ log_oom();
+ continue;
+ }
+
+ if (!device_is_ready(dev))
+ continue;
+
+ (void) device_process_new(m, dev);
+
+ device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, false);
+ }
return 0;
fail:
+ log_error_errno(r, "Failed to enumerate devices: %m");
+
device_shutdown(m);
return r;
}
@@ -617,7 +632,7 @@ fail:
static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents, void *userdata) {
_cleanup_udev_device_unref_ struct udev_device *dev = NULL;
Manager *m = userdata;
- const char *action;
+ const char *action, *sysfs;
int r;
assert(m);
@@ -639,33 +654,47 @@ static int device_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
if (!dev)
return 0;
+ sysfs = udev_device_get_syspath(dev);
+ if (!sysfs) {
+ log_error("Failed to get udev sys path.");
+ return 0;
+ }
+
action = udev_device_get_action(dev);
if (!action) {
log_error("Failed to get udev action string.");
return 0;
}
- if (streq(action, "remove") || !device_is_ready(dev)) {
- r = device_process_removed_device(m, dev);
- if (r < 0)
- log_error_errno(r, "Failed to process device remove event: %m");
-
- r = swap_process_removed_device(m, dev);
+ if (streq(action, "remove")) {
+ r = swap_process_device_remove(m, dev);
if (r < 0)
log_error_errno(r, "Failed to process swap device remove event: %m");
- } else {
- r = device_process_new_device(m, dev);
- if (r < 0)
- log_error_errno(r, "Failed to process device new event: %m");
+ /* If we get notified that a device was removed by
+ * udev, then it's completely gone, hence unset all
+ * found bits */
+ device_update_found_by_sysfs(m, sysfs, false, DEVICE_FOUND_UDEV|DEVICE_FOUND_MOUNT|DEVICE_FOUND_SWAP, true);
- r = swap_process_new_device(m, dev);
+ } else if (device_is_ready(dev)) {
+
+ (void) device_process_new(m, dev);
+
+ r = swap_process_device_new(m, dev);
if (r < 0)
log_error_errno(r, "Failed to process swap device new event: %m");
manager_dispatch_load_queue(m);
- device_set_path_plugged(m, dev);
+ /* The device is found now, set the udev found bit */
+ device_update_found_by_sysfs(m, sysfs, true, DEVICE_FOUND_UDEV, true);
+
+ } else {
+ /* The device is nominally around, but not ready for
+ * us. Hence unset the udev bit, but leave the rest
+ * around. */
+
+ device_update_found_by_sysfs(m, sysfs, false, DEVICE_FOUND_UDEV, true);
}
return 0;
@@ -684,9 +713,58 @@ static bool device_supported(Manager *m) {
return read_only <= 0;
}
+int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now) {
+ _cleanup_udev_device_unref_ struct udev_device *dev = NULL;
+ struct stat st;
+
+ assert(m);
+ assert(node);
+
+ /* This is called whenever we find a device referenced in
+ * /proc/swaps or /proc/self/mounts. Such a device might be
+ * mounted/enabled at a time where udev has not finished
+ * probing it yet, and we thus haven't learned about it
+ * yet. In this case we will set the device unit to
+ * "tentative" state. */
+
+ if (add) {
+ if (!path_startswith(node, "/dev"))
+ return 0;
+
+ if (stat(node, &st) < 0) {
+ if (errno == ENOENT)
+ return 0;
+
+ return log_error_errno(errno, "Failed to stat device node file %s: %m", node);
+ }
+
+ if (!S_ISBLK(st.st_mode) && !S_ISCHR(st.st_mode))
+ return 0;
+
+ dev = udev_device_new_from_devnum(m->udev, S_ISBLK(st.st_mode) ? 'b' : 'c', st.st_rdev);
+ if (!dev) {
+ if (errno == ENOENT)
+ return 0;
+
+ return log_oom();
+ }
+
+ /* If the device is known in the kernel and newly
+ * appeared, then we'll create a device unit for it,
+ * under the name referenced in /proc/swaps or
+ * /proc/self/mountinfo. */
+
+ (void) device_setup_unit(m, dev, node, false);
+ }
+
+ /* Update the device unit's state, should it exist */
+ return device_update_found_by_name(m, node, add, found, now);
+}
+
static const char* const device_state_table[_DEVICE_STATE_MAX] = {
[DEVICE_DEAD] = "dead",
- [DEVICE_PLUGGED] = "plugged"
+ [DEVICE_TENTATIVE] = "tentative",
+ [DEVICE_PLUGGED] = "plugged",
};
DEFINE_STRING_TABLE_LOOKUP(device_state, DeviceState);
diff --git a/src/core/device.h b/src/core/device.h
index 9065085..9f46e08 100644
--- a/src/core/device.h
+++ b/src/core/device.h
@@ -28,20 +28,28 @@ typedef struct Device Device;
* simplifies the state engine greatly */
typedef enum DeviceState {
DEVICE_DEAD,
- DEVICE_PLUGGED,
+ DEVICE_TENTATIVE, /* mounted or swapped, but not (yet) announced by udev */
+ DEVICE_PLUGGED, /* announced by udev */
_DEVICE_STATE_MAX,
_DEVICE_STATE_INVALID = -1
} DeviceState;
+typedef enum DeviceFound {
+ DEVICE_NOT_FOUND = 0,
+ DEVICE_FOUND_UDEV = 1,
+ DEVICE_FOUND_MOUNT = 2,
+ DEVICE_FOUND_SWAP = 4,
+} DeviceFound;
+
struct Device {
Unit meta;
char *sysfs;
+ DeviceFound found;
/* In order to be able to distinguish dependencies on
different device nodes we might end up creating multiple
devices for the same sysfs path. We chain them up here. */
-
LIST_FIELDS(struct Device, same_sysfs);
DeviceState state;
@@ -51,3 +59,5 @@ extern const UnitVTable device_vtable;
const char* device_state_to_string(DeviceState i) _const_;
DeviceState device_state_from_string(const char *s) _pure_;
+
+int device_found_node(Manager *m, const char *node, bool add, DeviceFound found, bool now);
diff --git a/src/core/mount.c b/src/core/mount.c
index 40037e7..8e4a376 100644
--- a/src/core/mount.c
+++ b/src/core/mount.c
@@ -1386,7 +1386,7 @@ static int mount_dispatch_timer(sd_event_source *source, usec_t usec, void *user
return 0;
}
-static int mount_add_one(
+static int mount_setup_unit(
Manager *m,
const char *what,
const char *where,
@@ -1429,7 +1429,7 @@ static int mount_add_one(
u = unit_new(m, sizeof(Mount));
if (!u)
- return -ENOMEM;
+ return log_oom();
r = unit_add_name(u, e);
if (r < 0)
@@ -1542,6 +1542,8 @@ static int mount_add_one(
return 0;
fail:
+ log_warning_errno(r, "Failed to set up mount unit: %m");
+
if (delete && u)
unit_free(u);
@@ -1549,33 +1551,36 @@ fail:
}
static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
- _cleanup_(mnt_free_tablep) struct libmnt_table *tb = NULL;
- _cleanup_(mnt_free_iterp) struct libmnt_iter *itr = NULL;
- struct libmnt_fs *fs;
+ _cleanup_(mnt_free_tablep) struct libmnt_table *t = NULL;
+ _cleanup_(mnt_free_iterp) struct libmnt_iter *i = NULL;
int r = 0;
assert(m);
- tb = mnt_new_table();
- itr = mnt_new_iter(MNT_ITER_FORWARD);
- if (!tb || !itr)
+ t = mnt_new_table();
+ if (!t)
return log_oom();
- r = mnt_table_parse_mtab(tb, NULL);
+ i = mnt_new_iter(MNT_ITER_FORWARD);
+ if (!i)
+ return log_oom();
+
+ r = mnt_table_parse_mtab(t, NULL);
if (r < 0)
- return r;
+ return log_error_errno(r, "Failed to parse /proc/self/mountinfo: %m");
r = 0;
for (;;) {
const char *device, *path, *options, *fstype;
_cleanup_free_ const char *d = NULL, *p = NULL;
+ struct libmnt_fs *fs;
int k;
- k = mnt_table_next_fs(tb, itr, &fs);
+ k = mnt_table_next_fs(t, i, &fs);
if (k == 1)
break;
- else if (k < 0)
- return log_error_errno(k, "Failed to get next entry from /etc/fstab: %m");
+ if (k < 0)
+ return log_error_errno(k, "Failed to get next entry from /proc/self/mountinfo: %m");
device = mnt_fs_get_source(fs);
path = mnt_fs_get_target(fs);
@@ -1583,11 +1588,16 @@ static int mount_load_proc_self_mountinfo(Manager *m, bool set_flags) {
fstype = mnt_fs_get_fstype(fs);
d = cunescape(device);
+ if (!d)
+ return log_oom();
+
p = cunescape(path);
- if (!d || !p)
+ if (!p)
return log_oom();
- k = mount_add_one(m, d, p, options, fstype, set_flags);
+ (void) device_found_node(m, d, true, DEVICE_FOUND_MOUNT, set_flags);
+
+ k = mount_setup_unit(m, d, p, options, fstype, set_flags);
if (r == 0 && k < 0)
r = k;
}
@@ -1731,8 +1741,6 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
r = mount_load_proc_self_mountinfo(m, true);
if (r < 0) {
- log_error_errno(r, "Failed to reread /proc/self/mountinfo: %m");
-
/* Reset flags, just in case, for later calls */
LIST_FOREACH(units_by_type, u, m->units_by_type[UNIT_MOUNT]) {
Mount *mount = MOUNT(u);
@@ -1765,6 +1773,10 @@ static int mount_dispatch_io(sd_event_source *source, int fd, uint32_t revents,
break;
}
+ if (mount->parameters_proc_self_mountinfo.what)
+ (void) device_found_node(m, mount->parameters_proc_self_mountinfo.what, false, DEVICE_FOUND_MOUNT, true);
+
+
} else if (mount->just_mounted || mount->just_changed) {
/* New or changed mount entry */
diff --git a/src/core/swap.c b/src/core/swap.c
index f73a8e6..de3a5d8 100644
--- a/src/core/swap.c
+++ b/src/core/swap.c
@@ -331,7 +331,7 @@ static int swap_load(Unit *u) {
return swap_verify(s);
}
-static int swap_add_one(
+static int swap_setup_unit(
Manager *m,
const char *what,
const char *what_proc_swaps,
@@ -356,8 +356,10 @@ static int swap_add_one(
if (u &&
SWAP(u)->from_proc_swaps &&
- !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps))
+ !path_equal(SWAP(u)->parameters_proc_swaps.what, what_proc_swaps)) {
+ log_error("Swap %s appeared twice with different device paths %s and %s", e, SWAP(u)->parameters_proc_swaps.what, what_proc_swaps);
return -EEXIST;
+ }
if (!u) {
delete = true;
@@ -372,7 +374,7 @@ static int swap_add_one(
SWAP(u)->what = strdup(what);
if (!SWAP(u)->what) {
- r = log_oom();
+ r = -ENOMEM;
goto fail;
}
@@ -400,7 +402,6 @@ static int swap_add_one(
p->priority = priority;
unit_add_to_dbus_queue(u);
-
return 0;
fail:
@@ -412,7 +413,7 @@ fail:
return r;
}
-static int swap_process_new_swap(Manager *m, const char *device, int prio, bool set_flags) {
+static int swap_process_new(Manager *m, const char *device, int prio, bool set_flags) {
_cleanup_udev_device_unref_ struct udev_device *d = NULL;
struct udev_list_entry *item = NULL, *first = NULL;
const char *dn;
@@ -421,7 +422,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
assert(m);
- r = swap_add_one(m, device, device, prio, set_flags);
+ r = swap_setup_unit(m, device, device, prio, set_flags);
if (r < 0)
return r;
@@ -437,7 +438,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
/* Add the main device node */
dn = udev_device_get_devnode(d);
if (dn && !streq(dn, device))
- swap_add_one(m, dn, device, prio, set_flags);
+ swap_setup_unit(m, dn, device, prio, set_flags);
/* Add additional units for all symlinks */
first = udev_device_get_devlinks_list_entry(d);
@@ -458,7 +459,7 @@ static int swap_process_new_swap(Manager *m, const char *device, int prio, bool
st.st_rdev != udev_device_get_devnum(d))
continue;
- swap_add_one(m, p, device, prio, set_flags);
+ swap_setup_unit(m, p, device, prio, set_flags);
}
return r;
@@ -1084,15 +1085,17 @@ static int swap_load_proc_swaps(Manager *m, bool set_flags) {
if (k == EOF)
break;
- log_warning("Failed to parse /proc/swaps:%u", i);
+ log_warning("Failed to parse /proc/swaps:%u.", i);
continue;
}
d = cunescape(dev);
if (!d)
- return -ENOMEM;
+ return log_oom();
+
+ device_found_node(m, d, true, DEVICE_FOUND_SWAP, set_flags);
- k = swap_process_new_swap(m, d, prio, set_flags);
+ k = swap_process_new(m, d, prio, set_flags);
if (k < 0)
r = k;
}
@@ -1144,6 +1147,9 @@ static int swap_dispatch_io(sd_event_source *source, int fd, uint32_t revents, v
break;
}
+ if (swap->what)
+ device_found_node(m, swap->what, false, DEVICE_FOUND_SWAP, true);
+
} else if (swap->just_activated) {
/* New swap entry */
@@ -1291,7 +1297,7 @@ fail:
return r;
}
-int swap_process_new_device(Manager *m, struct udev_device *dev) {
+int swap_process_device_new(Manager *m, struct udev_device *dev) {
struct udev_list_entry *item = NULL, *first = NULL;
_cleanup_free_ char *e = NULL;
const char *dn;
@@ -1334,7 +1340,7 @@ int swap_process_new_device(Manager *m, struct udev_device *dev) {
return r;
}
-int swap_process_removed_device(Manager *m, struct udev_device *dev) {
+int swap_process_device_remove(Manager *m, struct udev_device *dev) {
const char *dn;
int r = 0;
Swap *s;
diff --git a/src/core/swap.h b/src/core/swap.h
index c36c6f2..5de8c20 100644
--- a/src/core/swap.h
+++ b/src/core/swap.h
@@ -115,8 +115,8 @@ struct Swap {
extern const UnitVTable swap_vtable;
-int swap_process_new_device(Manager *m, struct udev_device *dev);
-int swap_process_removed_device(Manager *m, struct udev_device *dev);
+int swap_process_device_new(Manager *m, struct udev_device *dev);
+int swap_process_device_remove(Manager *m, struct udev_device *dev);
const char* swap_state_to_string(SwapState i) _const_;
SwapState swap_state_from_string(const char *s) _pure_;
diff --git a/src/core/unit.c b/src/core/unit.c
index 63ccd67..7cd7043 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -2834,7 +2834,6 @@ int unit_add_node_link(Unit *u, const char *what, bool wants) {
return -ENOMEM;
r = manager_load_unit(u->manager, e, NULL, NULL, &device);
-
if (r < 0)
return r;
--
2.1.4

View File

@ -1,5 +1,11 @@
--- systemd-210/shell-completion/bash/systemctl.in ---
+++ systemd-210/shell-completion/bash/systemctl.in 2014-08-20 15:01:04.502736981 +0000 shell-completion/bash/systemctl.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: systemd-221/shell-completion/bash/systemctl.in
===================================================================
--- systemd-221.orig/shell-completion/bash/systemctl.in
+++ systemd-221/shell-completion/bash/systemctl.in
@@ -43,7 +43,7 @@ __filter_units_by_property () { @@ -43,7 +43,7 @@ __filter_units_by_property () {
local units=("$@") local units=("$@")
local props local props

View File

@ -8,12 +8,14 @@ is used, the XDG_RUNTIME_DIR will not be clobbered by the new uid.
This belongs to BNC#852015 and also to BNC#855160 This belongs to BNC#852015 and also to BNC#855160
--- ---
pam_systemd.c | 19 +++++++++++++++++++ src/login/pam_systemd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+) 1 file changed, 19 insertions(+)
--- systemd-209/src/login/pam_systemd.c Index: systemd-221/src/login/pam_systemd.c
+++ systemd-209/src/login/pam_systemd.c 2014-02-26 14:31:30.158235525 +0000 ===================================================================
@@ -447,6 +447,25 @@ _public_ PAM_EXTERN int pam_sm_open_sess --- systemd-221.orig/src/login/pam_systemd.c
+++ systemd-221/src/login/pam_systemd.c
@@ -445,6 +445,25 @@ _public_ PAM_EXTERN int pam_sm_open_sess
r = export_legacy_dbus_address(handle, pw->pw_uid, runtime_path); r = export_legacy_dbus_address(handle, pw->pw_uid, runtime_path);
if (r != PAM_SUCCESS) if (r != PAM_SUCCESS)
return r; return r;

View File

@ -1,5 +1,11 @@
--- systemd-208/man/custom-man.xsl ---
+++ systemd-208/man/custom-man.xsl 2013-10-21 09:23:31.030735259 +0000 man/custom-man.xsl | 3 +++
1 file changed, 3 insertions(+)
Index: systemd-221/man/custom-man.xsl
===================================================================
--- systemd-221.orig/man/custom-man.xsl
+++ systemd-221/man/custom-man.xsl
@@ -61,4 +61,7 @@ @@ -61,4 +61,7 @@
<xsl:text>"</xsl:text> <xsl:text>"</xsl:text>
</xsl:template> </xsl:template>

View File

@ -2,9 +2,15 @@
| Belongs to bnc#849071 that is do not install console-shell.service | Belongs to bnc#849071 that is do not install console-shell.service
| in any system target as this will cause automatic poweroff at boot. | in any system target as this will cause automatic poweroff at boot.
| |
--- systemd-208/units/console-shell.service.m4.in ---
+++ systemd-208/units/console-shell.service.m4.in 2013-11-06 09:35:37.958693570 +0000 units/console-shell.service.m4.in | 3 ---
@@ -26,6 +26,3 @@ StandardError=inherit 1 file changed, 3 deletions(-)
Index: systemd-221/units/console-shell.service.m4.in
===================================================================
--- systemd-221.orig/units/console-shell.service.m4.in
+++ systemd-221/units/console-shell.service.m4.in
@@ -28,6 +28,3 @@ StandardError=inherit
KillMode=process KillMode=process
IgnoreSIGPIPE=no IgnoreSIGPIPE=no
SendSIGHUP=yes SendSIGHUP=yes

View File

@ -13,10 +13,10 @@ No word on compression…
src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++ src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++
1 file changed, 34 insertions(+) 1 file changed, 34 insertions(+)
Index: systemd/src/journal/journald-server.c Index: systemd-221/src/journal/journald-server.c
=================================================================== ===================================================================
--- systemd.orig/src/journal/journald-server.c --- systemd-221.orig/src/journal/journald-server.c
+++ systemd/src/journal/journald-server.c +++ systemd-221/src/journal/journald-server.c
@@ -21,6 +21,7 @@ @@ -21,6 +21,7 @@
#include <sys/signalfd.h> #include <sys/signalfd.h>
@ -25,7 +25,7 @@ Index: systemd/src/journal/journald-server.c
#include <linux/sockios.h> #include <linux/sockios.h>
#include <sys/statvfs.h> #include <sys/statvfs.h>
#include <sys/mman.h> #include <sys/mman.h>
@@ -917,6 +918,38 @@ finish: @@ -918,6 +919,38 @@ finish:
dispatch_message_real(s, iovec, n, m, ucred, tv, label, label_len, unit_id, priority, object_pid); dispatch_message_real(s, iovec, n, m, ucred, tv, label, label_len, unit_id, priority, object_pid);
} }
@ -64,7 +64,7 @@ Index: systemd/src/journal/journald-server.c
static int system_journal_open(Server *s, bool flush_requested) { static int system_journal_open(Server *s, bool flush_requested) {
int r; int r;
@@ -946,6 +979,7 @@ static int system_journal_open(Server *s @@ -947,6 +980,7 @@ static int system_journal_open(Server *s
fn = strjoina("/var/log/journal/", ids); fn = strjoina("/var/log/journal/", ids);
(void) mkdir(fn, 0755); (void) mkdir(fn, 0755);

View File

@ -12,10 +12,10 @@
shell-completion/bash/udevadm | 6 +++++- shell-completion/bash/udevadm | 6 +++++-
11 files changed, 70 insertions(+), 11 deletions(-) 11 files changed, 70 insertions(+), 11 deletions(-)
Index: systemd/shell-completion/bash/coredumpctl Index: systemd-221/shell-completion/bash/coredumpctl
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/coredumpctl --- systemd-221.orig/shell-completion/bash/coredumpctl
+++ systemd/shell-completion/bash/coredumpctl +++ systemd-221/shell-completion/bash/coredumpctl
@@ -44,6 +44,10 @@ _coredumpctl() { @@ -44,6 +44,10 @@ _coredumpctl() {
[DUMP]='dump gdb' [DUMP]='dump gdb'
) )
@ -33,10 +33,10 @@ Index: systemd/shell-completion/bash/coredumpctl
-complete -F _coredumpctl coredumpctl -complete -F _coredumpctl coredumpctl
+complete -o default -o bashdefault -F _coredumpctl coredumpctl +complete -o default -o bashdefault -F _coredumpctl coredumpctl
Index: systemd/shell-completion/bash/hostnamectl Index: systemd-221/shell-completion/bash/hostnamectl
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/hostnamectl --- systemd-221.orig/shell-completion/bash/hostnamectl
+++ systemd/shell-completion/bash/hostnamectl +++ systemd-221/shell-completion/bash/hostnamectl
@@ -30,6 +30,10 @@ _hostnamectl() { @@ -30,6 +30,10 @@ _hostnamectl() {
local OPTS='-h --help --version --transient --static --pretty local OPTS='-h --help --version --transient --static --pretty
--no-ask-password -H --host --machine' --no-ask-password -H --host --machine'
@ -54,10 +54,10 @@ Index: systemd/shell-completion/bash/hostnamectl
-complete -F _hostnamectl hostnamectl -complete -F _hostnamectl hostnamectl
+complete -o default -o bashdefault -F _hostnamectl hostnamectl +complete -o default -o bashdefault -F _hostnamectl hostnamectl
Index: systemd/shell-completion/bash/journalctl Index: systemd-221/shell-completion/bash/journalctl
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/journalctl --- systemd-221.orig/shell-completion/bash/journalctl
+++ systemd/shell-completion/bash/journalctl +++ systemd-221/shell-completion/bash/journalctl
@@ -55,6 +55,10 @@ _journalctl() { @@ -55,6 +55,10 @@ _journalctl() {
--root --machine' --root --machine'
) )
@ -75,10 +75,10 @@ Index: systemd/shell-completion/bash/journalctl
-complete -F _journalctl journalctl -complete -F _journalctl journalctl
+complete -o default -o bashdefault -F _journalctl journalctl +complete -o default -o bashdefault -F _journalctl journalctl
Index: systemd/shell-completion/bash/kernel-install Index: systemd-221/shell-completion/bash/kernel-install
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/kernel-install --- systemd-221.orig/shell-completion/bash/kernel-install
+++ systemd/shell-completion/bash/kernel-install +++ systemd-221/shell-completion/bash/kernel-install
@@ -18,11 +18,22 @@ @@ -18,11 +18,22 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>. # along with systemd; If not, see <http://www.gnu.org/licenses/>.
@ -108,10 +108,10 @@ Index: systemd/shell-completion/bash/kernel-install
-complete -F _kernel_install kernel-install -complete -F _kernel_install kernel-install
+complete -o default -o bashdefault -F _kernel_install kernel-install +complete -o default -o bashdefault -F _kernel_install kernel-install
Index: systemd/shell-completion/bash/localectl Index: systemd-221/shell-completion/bash/localectl
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/localectl --- systemd-221.orig/shell-completion/bash/localectl
+++ systemd/shell-completion/bash/localectl +++ systemd-221/shell-completion/bash/localectl
@@ -36,6 +36,10 @@ _localectl() { @@ -36,6 +36,10 @@ _localectl() {
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
-H --host --machine' -H --host --machine'
@ -129,10 +129,10 @@ Index: systemd/shell-completion/bash/localectl
-complete -F _localectl localectl -complete -F _localectl localectl
+complete -o default -o bashdefault -F _localectl localectl +complete -o default -o bashdefault -F _localectl localectl
Index: systemd/shell-completion/bash/loginctl Index: systemd-221/shell-completion/bash/loginctl
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/loginctl --- systemd-221.orig/shell-completion/bash/loginctl
+++ systemd/shell-completion/bash/loginctl +++ systemd-221/shell-completion/bash/loginctl
@@ -38,6 +38,10 @@ _loginctl () { @@ -38,6 +38,10 @@ _loginctl () {
[ARG]='--host -H --kill-who --property -p --signal -s --machine' [ARG]='--host -H --kill-who --property -p --signal -s --machine'
) )
@ -150,12 +150,12 @@ Index: systemd/shell-completion/bash/loginctl
-complete -F _loginctl loginctl -complete -F _loginctl loginctl
+complete -o default -o bashdefault -F _loginctl loginctl +complete -o default -o bashdefault -F _loginctl loginctl
Index: systemd/shell-completion/bash/systemctl.in Index: systemd-221/shell-completion/bash/systemctl.in
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/systemctl.in --- systemd-221.orig/shell-completion/bash/systemctl.in
+++ systemd/shell-completion/bash/systemctl.in +++ systemd-221/shell-completion/bash/systemctl.in
@@ -96,6 +96,10 @@ _systemctl () { @@ -96,6 +96,10 @@ _systemctl () {
[ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --root' [ARG]='--host -H --kill-who --property -p --signal -s --type -t --state --job-mode --root'
) )
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then + if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
@ -165,16 +165,16 @@ Index: systemd/shell-completion/bash/systemctl.in
if __contains_word "--user" ${COMP_WORDS[*]}; then if __contains_word "--user" ${COMP_WORDS[*]}; then
mode=--user mode=--user
else else
@@ -264,4 +268,4 @@ _systemctl () { @@ -268,4 +272,4 @@ _systemctl () {
return 0 return 0
} }
-complete -F _systemctl systemctl -complete -F _systemctl systemctl
+complete -o default -o bashdefault -F _systemctl systemctl +complete -o default -o bashdefault -F _systemctl systemctl
Index: systemd/shell-completion/bash/systemd-analyze Index: systemd-221/shell-completion/bash/systemd-analyze
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/systemd-analyze --- systemd-221.orig/shell-completion/bash/systemd-analyze
+++ systemd/shell-completion/bash/systemd-analyze +++ systemd-221/shell-completion/bash/systemd-analyze
@@ -47,6 +47,10 @@ _systemd_analyze() { @@ -47,6 +47,10 @@ _systemd_analyze() {
[VERIFY]='verify' [VERIFY]='verify'
) )
@ -192,10 +192,10 @@ Index: systemd/shell-completion/bash/systemd-analyze
-complete -F _systemd_analyze systemd-analyze -complete -F _systemd_analyze systemd-analyze
+complete -o default -o bashdefault -F _systemd_analyze systemd-analyze +complete -o default -o bashdefault -F _systemd_analyze systemd-analyze
Index: systemd/shell-completion/bash/systemd-run Index: systemd-221/shell-completion/bash/systemd-run
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/systemd-run --- systemd-221.orig/shell-completion/bash/systemd-run
+++ systemd/shell-completion/bash/systemd-run +++ systemd-221/shell-completion/bash/systemd-run
@@ -17,6 +17,13 @@ @@ -17,6 +17,13 @@
# You should have received a copy of the GNU Lesser General Public License # You should have received a copy of the GNU Lesser General Public License
# along with systemd; If not, see <http://www.gnu.org/licenses/>. # along with systemd; If not, see <http://www.gnu.org/licenses/>.
@ -228,10 +228,10 @@ Index: systemd/shell-completion/bash/systemd-run
-complete -F _systemd_run systemd-run -complete -F _systemd_run systemd-run
+complete -o default -o bashdefault -F _systemd_run systemd-run +complete -o default -o bashdefault -F _systemd_run systemd-run
Index: systemd/shell-completion/bash/timedatectl Index: systemd-221/shell-completion/bash/timedatectl
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/timedatectl --- systemd-221.orig/shell-completion/bash/timedatectl
+++ systemd/shell-completion/bash/timedatectl +++ systemd-221/shell-completion/bash/timedatectl
@@ -30,6 +30,10 @@ _timedatectl() { @@ -30,6 +30,10 @@ _timedatectl() {
local OPTS='-h --help --version --adjust-system-clock --no-pager local OPTS='-h --help --version --adjust-system-clock --no-pager
--no-ask-password -H --host --machine' --no-ask-password -H --host --machine'
@ -249,10 +249,10 @@ Index: systemd/shell-completion/bash/timedatectl
-complete -F _timedatectl timedatectl -complete -F _timedatectl timedatectl
+complete -o default -o bashdefault -F _timedatectl timedatectl +complete -o default -o bashdefault -F _timedatectl timedatectl
Index: systemd/shell-completion/bash/udevadm Index: systemd-221/shell-completion/bash/udevadm
=================================================================== ===================================================================
--- systemd.orig/shell-completion/bash/udevadm --- systemd-221.orig/shell-completion/bash/udevadm
+++ systemd/shell-completion/bash/udevadm +++ systemd-221/shell-completion/bash/udevadm
@@ -36,6 +36,10 @@ _udevadm() { @@ -36,6 +36,10 @@ _udevadm() {
local verbs=(info trigger settle control monitor hwdb test-builtin test) local verbs=(info trigger settle control monitor hwdb test-builtin test)

View File

@ -25,11 +25,11 @@ Signed-off-by: Hannes Reinecke <hare@suse.de>
src/udev/udev-builtin-path_id.c | 53 ++++++++++++++++++++++++++++++---------- src/udev/udev-builtin-path_id.c | 53 ++++++++++++++++++++++++++++++----------
1 file changed, 41 insertions(+), 12 deletions(-) 1 file changed, 41 insertions(+), 12 deletions(-)
Index: systemd-218/src/udev/udev-builtin-path_id.c Index: systemd-221/src/udev/udev-builtin-path_id.c
=================================================================== ===================================================================
--- systemd-218.orig/src/udev/udev-builtin-path_id.c --- systemd-221.orig/src/udev/udev-builtin-path_id.c
+++ systemd-218/src/udev/udev-builtin-path_id.c +++ systemd-221/src/udev/udev-builtin-path_id.c
@@ -426,6 +426,46 @@ static struct udev_device *handle_scsi_h @@ -447,6 +447,46 @@ static struct udev_device *handle_scsi_h
return parent; return parent;
} }
@ -76,7 +76,7 @@ Index: systemd-218/src/udev/udev-builtin-path_id.c
static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) { static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
const char *devtype; const char *devtype;
const char *name; const char *name;
@@ -465,19 +505,8 @@ static struct udev_device *handle_scsi(s @@ -486,19 +526,8 @@ static struct udev_device *handle_scsi(s
goto out; goto out;
} }

View File

@ -4,12 +4,14 @@ Subject: rules create by id scsi links for ATA devices
Re-enable creation of by-id scsi links for ATA devices. (bnc#769002) Re-enable creation of by-id scsi links for ATA devices. (bnc#769002)
--- ---
rules/60-persistent-storage.rules | 4 ++++ rules/60-persistent-storage.rules | 4 ++++
1 file changed, 4 insertions(+) 1 file changed, 4 insertions(+)
--- systemd-206.orig/rules/60-persistent-storage.rules Index: systemd-221/rules/60-persistent-storage.rules
+++ systemd-206/rules/60-persistent-storage.rules ===================================================================
@@ -42,6 +42,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk", --- systemd-221.orig/rules/60-persistent-storage.rules
+++ systemd-221/rules/60-persistent-storage.rules
@@ -36,6 +36,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk",
KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n" KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="partition", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}-part%n"
@ -17,6 +19,6 @@ Re-enable creation of by-id scsi links for ATA devices. (bnc#769002)
+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" +KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" +KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n"
+ +
# firewire # FireWire
KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"

View File

@ -7,16 +7,16 @@ udevd race for netlink events (bnc#774646)
src/udev/udevd.c | 2 ++ src/udev/udevd.c | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
Index: systemd-218/src/udev/udevd.c Index: systemd-221/src/udev/udevd.c
=================================================================== ===================================================================
--- systemd-218.orig/src/udev/udevd.c --- systemd-221.orig/src/udev/udevd.c
+++ systemd-218/src/udev/udevd.c +++ systemd-221/src/udev/udevd.c
@@ -1468,6 +1468,8 @@ int main(int argc, char *argv[]) { @@ -917,6 +917,8 @@ static int on_uevent(sd_event_source *s,
dev = udev_monitor_receive_device(monitor); dev = udev_monitor_receive_device(manager->monitor);
if (dev != NULL) { if (dev) {
udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC)); udev_device_ensure_usec_initialized(dev, NULL);
+ if (rules == NULL) + if (manager->rules == NULL)
+ rules = udev_rules_new(udev, arg_resolve_names); + manager->rules = udev_rules_new(manager->udev, arg_resolve_names);
if (event_queue_insert(dev) < 0) r = event_queue_insert(manager, dev);
udev_device_unref(dev); if (r < 0)
} udev_device_unref(dev);

View File

@ -7,10 +7,10 @@ cdrom_id: created links for the default cd/dvd drive (bnc#783054).
rules/60-cdrom_id.rules | 5 ++++- rules/60-cdrom_id.rules | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+), 1 deletion(-)
Index: systemd/rules/60-cdrom_id.rules Index: systemd-221/rules/60-cdrom_id.rules
=================================================================== ===================================================================
--- systemd.orig/rules/60-cdrom_id.rules --- systemd-221.orig/rules/60-cdrom_id.rules
+++ systemd/rules/60-cdrom_id.rules +++ systemd-221/rules/60-cdrom_id.rules
@@ -20,6 +20,9 @@ IMPORT{program}="cdrom_id --lock-media $ @@ -20,6 +20,9 @@ IMPORT{program}="cdrom_id --lock-media $
# stale mounts after ejecting # stale mounts after ejecting
ENV{DISK_MEDIA_CHANGE}=="?*", ENV{ID_CDROM_MEDIA}!="?*", ENV{SYSTEMD_READY}="0" ENV{DISK_MEDIA_CHANGE}=="?*", ENV{ID_CDROM_MEDIA}!="?*", ENV{SYSTEMD_READY}="0"

View File

@ -13,11 +13,11 @@ Port the patch of Robert to systemd v210 and test it out.
1 file changed, 37 insertions(+), 4 deletions(-) 1 file changed, 37 insertions(+), 4 deletions(-)
Index: systemd-218/src/udev/udev-event.c Index: systemd-221/src/udev/udev-event.c
=================================================================== ===================================================================
--- systemd-218.orig/src/udev/udev-event.c --- systemd-221.orig/src/udev/udev-event.c
+++ systemd-218/src/udev/udev-event.c +++ systemd-221/src/udev/udev-event.c
@@ -767,20 +767,53 @@ out: @@ -796,20 +796,53 @@ out:
static int rename_netif(struct udev_event *event) { static int rename_netif(struct udev_event *event) {
struct udev_device *dev = event->dev; struct udev_device *dev = event->dev;
char name[IFNAMSIZ]; char name[IFNAMSIZ];

View File

@ -1,5 +1,27 @@
--- systemd-210/rules/80-hotplug-cpu-mem.rules ---
+++ systemd-210/rules/80-hotplug-cpu-mem.rules 2014-05-21 15:47:01.885605543 +0000 Makefile.am | 4 ++++
rules/80-hotplug-cpu-mem.rules | 12 ++++++++++++
2 files changed, 16 insertions(+)
Index: systemd-221/Makefile.am
===================================================================
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -3841,6 +3841,10 @@ dist_udevrules_DATA += \
rules/73-seat-numlock.rules
# ------------------------------------------------------------------------------
+dist_udevrules_DATA += \
+ rules/80-hotplug-cpu-mem.rules
+
+# ------------------------------------------------------------------------------
mtd_probe_SOURCES = \
src/udev/mtd_probe/mtd_probe.c \
src/udev/mtd_probe/mtd_probe.h \
Index: systemd-221/rules/80-hotplug-cpu-mem.rules
===================================================================
--- /dev/null
+++ systemd-221/rules/80-hotplug-cpu-mem.rules
@@ -0,0 +1,12 @@ @@ -0,0 +1,12 @@
+# do not edit this file, it will be overwritten on update +# do not edit this file, it will be overwritten on update
+ +
@ -13,16 +35,3 @@
+ +
+# +#
+TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs" +TAG=="tmpfs", RUN+="/usr/lib/udev/remount-tmpfs"
--- systemd-210/Makefile.am
+++ systemd-210/Makefile.am
@@ -2480,6 +2480,10 @@ dist_udevrules_DATA += \
rules/73-seat-numlock.rules
# ------------------------------------------------------------------------------
+dist_udevrules_DATA += \
+ rules/80-hotplug-cpu-mem.rules
+
+# ------------------------------------------------------------------------------
if ENABLE_GUDEV
if ENABLE_GTK_DOC
SUBDIRS += \

View File

@ -7,13 +7,13 @@ If any devices are marked with 'SYSTEMD_READY=0' then
we shouldn't run any btrfs check on them. we shouldn't run any btrfs check on them.
--- ---
rules/64-btrfs.rules | 1 + rules/64-btrfs.rules | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/rules/64-btrfs.rules b/rules/64-btrfs.rules Index: systemd-221/rules/64-btrfs.rules
index fe01001..57631bc 100644 ===================================================================
--- a/rules/64-btrfs.rules --- systemd-221.orig/rules/64-btrfs.rules
+++ b/rules/64-btrfs.rules +++ systemd-221/rules/64-btrfs.rules
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
SUBSYSTEM!="block", GOTO="btrfs_end" SUBSYSTEM!="block", GOTO="btrfs_end"
ACTION=="remove", GOTO="btrfs_end" ACTION=="remove", GOTO="btrfs_end"
@ -22,6 +22,3 @@ index fe01001..57631bc 100644
# let the kernel know about this btrfs filesystem, and check if it is complete # let the kernel know about this btrfs filesystem, and check if it is complete
IMPORT{builtin}="btrfs ready $devnode" IMPORT{builtin}="btrfs ready $devnode"
--
1.8.1.4

View File

@ -10,15 +10,15 @@ persistent symlinks to that device.
Otherwise systemd will get confused about which device to use. Otherwise systemd will get confused about which device to use.
--- ---
rules/60-persistent-storage.rules | 7 +++++-- rules/60-persistent-storage.rules | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-) 1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules Index: systemd-221/rules/60-persistent-storage.rules
index 1208bd3..fd5bedd 100644 ===================================================================
--- a/rules/60-persistent-storage.rules --- systemd-221.orig/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules +++ systemd-221/rules/60-persistent-storage.rules
@@ -39,8 +39,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin @@ -33,8 +33,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!
# scsi devices # SCSI devices
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="scsi" KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="scsi"
KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="cciss" KERNEL=="cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}!="?*", IMPORT{program}="scsi_id --export --whitelisted -d $devnode", ENV{ID_BUS}="cciss"
-KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}" -KERNEL=="sd*|sr*|cciss*", ENV{DEVTYPE}=="disk", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
@ -28,7 +28,7 @@ index 1208bd3..fd5bedd 100644
# scsi compat links for ATA devices # scsi compat links for ATA devices
KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
@@ -70,6 +70,9 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DAT @@ -66,6 +66,9 @@ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!=
KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \ KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", \
IMPORT{builtin}="blkid --noraid" IMPORT{builtin}="blkid --noraid"
@ -38,6 +38,3 @@ index 1208bd3..fd5bedd 100644
# probe filesystem metadata of disks # probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{builtin}="blkid" KERNEL!="sr*", IMPORT{builtin}="blkid"
--
1.8.1.4

View File

@ -1,6 +1,12 @@
--- systemd-210/rules/42-usb-hid-pm.rules.old 2014-04-23 10:54:31.694485615 +0200 ---
+++ systemd-210/rules/42-usb-hid-pm.rules 2014-04-23 10:55:21.969423056 +0200 rules/42-usb-hid-pm.rules | 2 --
@@ -22,8 +22,6 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{id 1 file changed, 2 deletions(-)
Index: systemd-221/rules/42-usb-hid-pm.rules
===================================================================
--- systemd-221.orig/rules/42-usb-hid-pm.rules
+++ systemd-221/rules/42-usb-hid-pm.rules
@@ -19,8 +19,6 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{id
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="413c", ATTR{idProduct}=="0000", TEST=="power/control", ATTR{power/control}="auto" ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="413c", ATTR{idProduct}=="0000", TEST=="power/control", ATTR{power/control}="auto"
# IBM remote access # IBM remote access

View File

@ -12,21 +12,18 @@ References: bnc#881942
Signed-off-by: Hannes Reinecke <hare@suse.de> Signed-off-by: Hannes Reinecke <hare@suse.de>
--- ---
rules/99-systemd.rules.in | 1 + rules/99-systemd.rules.in | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in Index: systemd-221/rules/99-systemd.rules.in
index db72373..11ee262 100644 ===================================================================
--- a/rules/99-systemd.rules.in --- systemd-221.orig/rules/99-systemd.rules.in
+++ b/rules/99-systemd.rules.in +++ systemd-221/rules/99-systemd.rules.in
@@ -11,6 +11,7 @@ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270 @@ -10,6 +10,7 @@ ACTION=="remove", GOTO="systemd_end"
SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270/tty*", TAG+="systemd"
KERNEL=="vport*", TAG+="systemd" KERNEL=="vport*", TAG+="systemd"
+SUBSYSTEM=="block", KERNEL!="ram*", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end" +SUBSYSTEM=="block", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end"
SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd" SUBSYSTEM=="block", TAG+="systemd"
SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0" SUBSYSTEM=="block", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
--
1.8.4.5

View File

@ -1,8 +1,14 @@
Exclude cd/dvd as well (bnc#882714) Exclude cd/dvd as well (bnc#882714)
--- systemd-210/src/udev/udevd.c ---
+++ systemd-210/src/udev/udevd.c 2014-06-18 12:53:34.454235577 +0000 src/udev/udevd.c | 3 ++-
@@ -744,7 +744,8 @@ static int synthesize_change(struct udev 1 file changed, 2 insertions(+), 1 deletion(-)
Index: systemd-221/src/udev/udevd.c
===================================================================
--- systemd-221.orig/src/udev/udevd.c
+++ systemd-221/src/udev/udevd.c
@@ -1022,7 +1022,8 @@ static int synthesize_change(struct udev
if (streq_ptr("block", udev_device_get_subsystem(dev)) && if (streq_ptr("block", udev_device_get_subsystem(dev)) &&
streq_ptr("disk", udev_device_get_devtype(dev)) && streq_ptr("disk", udev_device_get_devtype(dev)) &&

View File

@ -29,8 +29,10 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
rules/64-btrfs.rules | 3 ++- rules/64-btrfs.rules | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-) 1 file changed, 2 insertions(+), 1 deletion(-)
--- a/rules/64-btrfs.rules Index: systemd-221/rules/64-btrfs.rules
+++ b/rules/64-btrfs.rules ===================================================================
--- systemd-221.orig/rules/64-btrfs.rules
+++ systemd-221/rules/64-btrfs.rules
@@ -6,7 +6,8 @@ ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_en @@ -6,7 +6,8 @@ ENV{ID_FS_TYPE}!="btrfs", GOTO="btrfs_en
ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end" ENV{SYSTEMD_READY}=="0", GOTO="btrfs_end"

View File

@ -1,11 +1,15 @@
Index: systemd-210/rules/50-udev-default.rules ---
rules/50-udev-default.rules | 2 ++
1 file changed, 2 insertions(+)
Index: systemd-221/rules/50-udev-default.rules
=================================================================== ===================================================================
--- systemd-210.orig/rules/50-udev-default.rules --- systemd-221.orig/rules/50-udev-default.rules
+++ systemd-210/rules/50-udev-default.rules +++ systemd-221/rules/50-udev-default.rules
@@ -66,4 +66,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st @@ -74,4 +74,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st
KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse" KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
+KERNEL=="genwqe*", MODE="0666" +KERNEL=="genwqe*", MODE="0666"
+ +
LABEL="default_permissions_end" LABEL="default_end"

View File

@ -18,11 +18,11 @@ Signed-off-by: Jeff Mahoney <jeffm@suse.com>
src/udev/scsi_id/scsi_serial.c | 19 +++++++++++++------ src/udev/scsi_id/scsi_serial.c | 19 +++++++++++++------
4 files changed, 32 insertions(+), 7 deletions(-) 4 files changed, 32 insertions(+), 7 deletions(-)
Index: systemd/rules/60-persistent-storage.rules Index: systemd-221/rules/60-persistent-storage.rules
=================================================================== ===================================================================
--- systemd.orig/rules/60-persistent-storage.rules --- systemd-221.orig/rules/60-persistent-storage.rules
+++ systemd/rules/60-persistent-storage.rules +++ systemd-221/rules/60-persistent-storage.rules
@@ -46,6 +46,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par @@ -40,6 +40,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par
KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}" KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --whitelisted --replace-whitespace -p0x80 -d $devnode", RESULT=="?*", ENV{ID_SCSI_COMPAT}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}"
KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n" KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT}-part%n"
@ -30,13 +30,13 @@ Index: systemd/rules/60-persistent-storage.rules
+KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --truncated-serial --whitelisted --replace-whitespace -p0x80 -d$tempnode", RESULT=="?*", ENV{ID_SCSI_COMPAT_TRUNCATED}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}" +KERNEL=="sd*[!0-9]", ENV{ID_BUS}=="ata", PROGRAM="scsi_id --truncated-serial --whitelisted --replace-whitespace -p0x80 -d$tempnode", RESULT=="?*", ENV{ID_SCSI_COMPAT_TRUNCATED}="$result", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}"
+KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT_TRUNCATED}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}-part%n" +KERNEL=="sd*[0-9]", ENV{ID_SCSI_COMPAT_TRUNCATED}=="?*", SYMLINK+="disk/by-id/scsi-$env{ID_SCSI_COMPAT_TRUNCATED}-part%n"
+ +
# firewire # FireWire
KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}" KERNEL=="sd*[!0-9]|sr*", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}"
KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n" KERNEL=="sd*[0-9]", ATTRS{ieee1394_id}=="?*", SYMLINK+="disk/by-id/ieee1394-$attr{ieee1394_id}-part%n"
Index: systemd/src/udev/scsi_id/scsi_id.c Index: systemd-221/src/udev/scsi_id/scsi_id.c
=================================================================== ===================================================================
--- systemd.orig/src/udev/scsi_id/scsi_id.c --- systemd-221.orig/src/udev/scsi_id/scsi_id.c
+++ systemd/src/udev/scsi_id/scsi_id.c +++ systemd-221/src/udev/scsi_id/scsi_id.c
@@ -43,6 +43,7 @@ static const struct option options[] = { @@ -43,6 +43,7 @@ static const struct option options[] = {
{ "replace-whitespace", no_argument, NULL, 'u' }, { "replace-whitespace", no_argument, NULL, 'u' },
{ "sg-version", required_argument, NULL, 's' }, { "sg-version", required_argument, NULL, 's' },
@ -94,11 +94,11 @@ Index: systemd/src/udev/scsi_id/scsi_id.c
util_replace_chars(serial_str, NULL); util_replace_chars(serial_str, NULL);
printf("%s\n", serial_str); printf("%s\n", serial_str);
goto out; goto out;
Index: systemd/src/udev/scsi_id/scsi_id.h Index: systemd-221/src/udev/scsi_id/scsi_id.h
=================================================================== ===================================================================
--- systemd.orig/src/udev/scsi_id/scsi_id.h --- systemd-221.orig/src/udev/scsi_id/scsi_id.h
+++ systemd/src/udev/scsi_id/scsi_id.h +++ systemd-221/src/udev/scsi_id/scsi_id.h
@@ -43,6 +43,7 @@ struct scsi_id_device { @@ -45,6 +45,7 @@ struct scsi_id_device {
char kernel[64]; char kernel[64];
char serial[MAX_SERIAL_LEN]; char serial[MAX_SERIAL_LEN];
char serial_short[MAX_SERIAL_LEN]; char serial_short[MAX_SERIAL_LEN];
@ -106,11 +106,11 @@ Index: systemd/src/udev/scsi_id/scsi_id.h
int use_sg; int use_sg;
/* Always from page 0x80 e.g. 'B3G1P8500RWT' - may not be unique */ /* Always from page 0x80 e.g. 'B3G1P8500RWT' - may not be unique */
Index: systemd/src/udev/scsi_id/scsi_serial.c Index: systemd-221/src/udev/scsi_id/scsi_serial.c
=================================================================== ===================================================================
--- systemd.orig/src/udev/scsi_id/scsi_serial.c --- systemd-221.orig/src/udev/scsi_id/scsi_serial.c
+++ systemd/src/udev/scsi_id/scsi_serial.c +++ systemd-221/src/udev/scsi_id/scsi_serial.c
@@ -96,7 +96,8 @@ static const char hex_str[]="0123456789a @@ -97,7 +97,8 @@ static const char hex_str[]="0123456789a
static int do_scsi_page80_inquiry(struct udev *udev, static int do_scsi_page80_inquiry(struct udev *udev,
struct scsi_id_device *dev_scsi, int fd, struct scsi_id_device *dev_scsi, int fd,
@ -120,7 +120,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
static int sg_err_category_new(struct udev *udev, static int sg_err_category_new(struct udev *udev,
int scsi_status, int msg_status, int int scsi_status, int msg_status, int
@@ -619,7 +620,7 @@ static int do_scsi_page83_inquiry(struct @@ -620,7 +621,7 @@ static int do_scsi_page83_inquiry(struct
unsigned char page_83[SCSI_INQ_BUFF_LEN]; unsigned char page_83[SCSI_INQ_BUFF_LEN];
/* also pick up the page 80 serial number */ /* also pick up the page 80 serial number */
@ -129,7 +129,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
memzero(page_83, SCSI_INQ_BUFF_LEN); memzero(page_83, SCSI_INQ_BUFF_LEN);
retval = scsi_inquiry(udev, dev_scsi, fd, 1, PAGE_83, page_83, retval = scsi_inquiry(udev, dev_scsi, fd, 1, PAGE_83, page_83,
@@ -764,7 +765,8 @@ static int do_scsi_page83_prespc3_inquir @@ -765,7 +766,8 @@ static int do_scsi_page83_prespc3_inquir
/* Get unit serial number VPD page */ /* Get unit serial number VPD page */
static int do_scsi_page80_inquiry(struct udev *udev, static int do_scsi_page80_inquiry(struct udev *udev,
struct scsi_id_device *dev_scsi, int fd, struct scsi_id_device *dev_scsi, int fd,
@ -139,7 +139,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
{ {
int retval; int retval;
int ser_ind; int ser_ind;
@@ -798,9 +800,14 @@ static int do_scsi_page80_inquiry(struct @@ -799,9 +801,14 @@ static int do_scsi_page80_inquiry(struct
ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]); ser_ind = prepend_vendor_model(udev, dev_scsi, &serial[1]);
if (ser_ind < 0) if (ser_ind < 0)
return 1; return 1;
@ -155,7 +155,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
} }
if (serial_short != NULL) { if (serial_short != NULL) {
memcpy(serial_short, &buf[4], len); memcpy(serial_short, &buf[4], len);
@@ -876,7 +883,7 @@ int scsi_get_serial(struct udev *udev, @@ -877,7 +884,7 @@ int scsi_get_serial(struct udev *udev,
return 1; return 1;
if (page_code == PAGE_80) { if (page_code == PAGE_80) {
@ -164,7 +164,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
retval = 1; retval = 1;
goto completed; goto completed;
} else { } else {
@@ -950,7 +957,7 @@ int scsi_get_serial(struct udev *udev, @@ -951,7 +958,7 @@ int scsi_get_serial(struct udev *udev,
for (ind = 4; ind <= page0[3] + 3; ind++) for (ind = 4; ind <= page0[3] + 3; ind++)
if (page0[ind] == PAGE_80) if (page0[ind] == PAGE_80)
if (!do_scsi_page80_inquiry(udev, dev_scsi, fd, if (!do_scsi_page80_inquiry(udev, dev_scsi, fd,

View File

@ -3,22 +3,22 @@
rules/60-ssd-scheduler.rules | 11 +++++++++++ rules/60-ssd-scheduler.rules | 11 +++++++++++
2 files changed, 12 insertions(+) 2 files changed, 12 insertions(+)
Index: systemd/Makefile.am Index: systemd-221/Makefile.am
=================================================================== ===================================================================
--- systemd.orig/Makefile.am --- systemd-221.orig/Makefile.am
+++ systemd/Makefile.am +++ systemd-221/Makefile.am
@@ -3576,6 +3576,7 @@ dist_udevrules_DATA += \ @@ -3501,6 +3501,7 @@ dist_udevrules_DATA += \
rules/60-persistent-input.rules \ rules/60-persistent-input.rules \
rules/60-persistent-alsa.rules \ rules/60-persistent-alsa.rules \
rules/60-persistent-storage.rules \ rules/60-persistent-storage.rules \
+ rules/60-ssd-scheduler.rules \ + rules/60-ssd-scheduler.rules \
rules/60-serial.rules \
rules/64-btrfs.rules \ rules/64-btrfs.rules \
rules/70-mouse.rules \ rules/70-mouse.rules \
rules/70-touchpad.rules \ Index: systemd-221/rules/60-ssd-scheduler.rules
Index: systemd/rules/60-ssd-scheduler.rules
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd/rules/60-ssd-scheduler.rules +++ systemd-221/rules/60-ssd-scheduler.rules
@@ -0,0 +1,11 @@ @@ -0,0 +1,11 @@
+# do not edit this file, it will be overwritten on update +# do not edit this file, it will be overwritten on update
+ +

View File

@ -5,11 +5,11 @@
units/systemd-udev-root-symlink.service.in | 10 ++ units/systemd-udev-root-symlink.service.in | 10 ++
4 files changed, 96 insertions(+) 4 files changed, 96 insertions(+)
Index: systemd/Makefile.am Index: systemd-221/Makefile.am
=================================================================== ===================================================================
--- systemd.orig/Makefile.am --- systemd-221.orig/Makefile.am
+++ systemd/Makefile.am +++ systemd-221/Makefile.am
@@ -3862,6 +3862,25 @@ EXTRA_DIST += \ @@ -3754,6 +3754,25 @@ EXTRA_DIST += \
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -35,10 +35,10 @@ Index: systemd/Makefile.am
ata_id_SOURCES = \ ata_id_SOURCES = \
src/udev/ata_id/ata_id.c src/udev/ata_id/ata_id.c
Index: systemd/src/udev/rootsymlink_generator/rootsymlink_generator.c Index: systemd-221/src/udev/rootsymlink_generator/rootsymlink_generator.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd/src/udev/rootsymlink_generator/rootsymlink_generator.c +++ systemd-221/src/udev/rootsymlink_generator/rootsymlink_generator.c
@@ -0,0 +1,57 @@ @@ -0,0 +1,57 @@
+/* +/*
+ * Copyright (C) 2014-2015 Robert Milasan <rmilasan@suse.com> + * Copyright (C) 2014-2015 Robert Milasan <rmilasan@suse.com>
@ -97,10 +97,10 @@ Index: systemd/src/udev/rootsymlink_generator/rootsymlink_generator.c
+ return errno; + return errno;
+ return 0; + return 0;
+} +}
Index: systemd/units/systemd-udev-root-symlink.service Index: systemd-221/units/systemd-udev-root-symlink.service
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd/units/systemd-udev-root-symlink.service +++ systemd-221/units/systemd-udev-root-symlink.service
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
+[Unit] +[Unit]
+Description=Rule generator for /dev/root symlink +Description=Rule generator for /dev/root symlink
@ -112,10 +112,10 @@ Index: systemd/units/systemd-udev-root-symlink.service
+Type=oneshot +Type=oneshot
+RemainAfterExit=yes +RemainAfterExit=yes
+ExecStart=/usr/lib/udev/rootsymlink-generator +ExecStart=/usr/lib/udev/rootsymlink-generator
Index: systemd/units/systemd-udev-root-symlink.service.in Index: systemd-221/units/systemd-udev-root-symlink.service.in
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd/units/systemd-udev-root-symlink.service.in +++ systemd-221/units/systemd-udev-root-symlink.service.in
@@ -0,0 +1,10 @@ @@ -0,0 +1,10 @@
+[Unit] +[Unit]
+Description=Rule generator for /dev/root symlink +Description=Rule generator for /dev/root symlink

View File

@ -2,25 +2,25 @@
src/udev/udevd.c | 4 ++-- src/udev/udevd.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
Index: systemd-218/src/udev/udevd.c Index: systemd-221/src/udev/udevd.c
=================================================================== ===================================================================
--- systemd-218.orig/src/udev/udevd.c --- systemd-221.orig/src/udev/udevd.c
+++ systemd-218/src/udev/udevd.c +++ systemd-221/src/udev/udevd.c
@@ -446,7 +446,7 @@ static void event_run(struct event *even @@ -569,7 +569,7 @@ static void event_run(Manager *manager,
if (children >= arg_children_max) { if (hashmap_size(manager->workers) >= arg_children_max) {
if (arg_children_max > 1) if (arg_children_max > 1)
- log_debug("maximum number (%i) of children reached", children); - log_debug("maximum number (%i) of children reached", hashmap_size(manager->workers));
+ log_error("maximum number (%i) of children reached", children); + log_error("maximum number (%i) of children reached", hashmap_size(manager->workers));
return; return;
} }
@@ -1265,7 +1265,7 @@ int main(int argc, char *argv[]) { @@ -1641,7 +1641,7 @@ int main(int argc, char *argv[]) {
arg_children_max = 8; arg_children_max = 8;
if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) { if (sched_getaffinity(0, sizeof (cpu_set), &cpu_set) == 0) {
- arg_children_max += CPU_COUNT(&cpu_set) * 2; - arg_children_max += CPU_COUNT(&cpu_set) * 2;
+ arg_children_max += CPU_COUNT(&cpu_set) * 64; + arg_children_max += CPU_COUNT(&cpu_set) * 64;
} }
}
log_debug("set children_max to %u", arg_children_max); log_debug("set children_max to %u", arg_children_max);

View File

@ -1,8 +1,12 @@
Index: systemd-219/units/systemd-networkd.service.in ---
units/systemd-networkd.service.m4.in | 1 +
1 file changed, 1 insertion(+)
Index: systemd-221/units/systemd-networkd.service.m4.in
=================================================================== ===================================================================
--- systemd-219.orig/units/systemd-networkd.service.in --- systemd-221.orig/units/systemd-networkd.service.m4.in
+++ systemd-219/units/systemd-networkd.service.in +++ systemd-221/units/systemd-networkd.service.m4.in
@@ -29,4 +29,5 @@ WatchdogSec=1min @@ -34,4 +34,5 @@ WatchdogSec=1min
[Install] [Install]
WantedBy=multi-user.target WantedBy=multi-user.target

View File

@ -8,10 +8,10 @@ disable /var/lock/{subsys,lockdev} and change default permissions on
tmpfiles.d/legacy.conf | 7 ++++--- tmpfiles.d/legacy.conf | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-) 1 file changed, 4 insertions(+), 3 deletions(-)
Index: systemd-218/tmpfiles.d/legacy.conf Index: systemd-221/tmpfiles.d/legacy.conf
=================================================================== ===================================================================
--- systemd-218.orig/tmpfiles.d/legacy.conf --- systemd-221.orig/tmpfiles.d/legacy.conf
+++ systemd-218/tmpfiles.d/legacy.conf +++ systemd-221/tmpfiles.d/legacy.conf
@@ -10,13 +10,14 @@ @@ -10,13 +10,14 @@
# These files are considered legacy and are unnecessary on legacy-free # These files are considered legacy and are unnecessary on legacy-free
# systems. # systems.
@ -36,5 +36,5 @@ Index: systemd-218/tmpfiles.d/legacy.conf
-d /run/lock/lockdev 0775 root lock - -d /run/lock/lockdev 0775 root lock -
+#d /run/lock/lockdev 0775 root lock - +#d /run/lock/lockdev 0775 root lock -
# /forcefsck, /fastboot and /forcequotecheck are deprecated in favor of the # /forcefsck, /fastboot and /forcequotacheck are deprecated in favor of the
# kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and # kernel command line options 'fsck.mode=force', 'fsck.mode=skip' and

View File

@ -7,19 +7,19 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157)
src/sleep/sleep.c | 27 ++++++++++++++++++++++----- src/sleep/sleep.c | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-) 1 file changed, 22 insertions(+), 5 deletions(-)
Index: systemd/src/sleep/sleep.c Index: systemd-221/src/sleep/sleep.c
=================================================================== ===================================================================
--- systemd.orig/src/sleep/sleep.c --- systemd-221.orig/src/sleep/sleep.c
+++ systemd/src/sleep/sleep.c +++ systemd-221/src/sleep/sleep.c
@@ -24,6 +24,7 @@ @@ -23,6 +23,7 @@
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include <getopt.h> #include <getopt.h>
+#include <stdlib.h> +#include <stdlib.h>
#include "sd-id128.h"
#include "sd-messages.h" #include "sd-messages.h"
@@ -36,6 +37,8 @@ #include "log.h"
@@ -34,6 +35,8 @@
#include "def.h" #include "def.h"
static char* arg_verb = NULL; static char* arg_verb = NULL;
@ -28,7 +28,7 @@ Index: systemd/src/sleep/sleep.c
static int write_mode(char **modes) { static int write_mode(char **modes) {
int r = 0; int r = 0;
@@ -53,10 +56,6 @@ static int write_mode(char **modes) { @@ -51,10 +54,6 @@ static int write_mode(char **modes) {
if (r == 0) if (r == 0)
r = k; r = k;
} }
@ -39,7 +39,7 @@ Index: systemd/src/sleep/sleep.c
return r; return r;
} }
@@ -97,6 +96,8 @@ static int execute(char **modes, char ** @@ -95,6 +94,8 @@ static int execute(char **modes, char **
int r; int r;
_cleanup_fclose_ FILE *f = NULL; _cleanup_fclose_ FILE *f = NULL;
@ -48,7 +48,7 @@ Index: systemd/src/sleep/sleep.c
/* This file is opened first, so that if we hit an error, /* This file is opened first, so that if we hit an error,
* we can abort before modifying any state. */ * we can abort before modifying any state. */
f = fopen("/sys/power/state", "we"); f = fopen("/sys/power/state", "we");
@@ -107,6 +108,7 @@ static int execute(char **modes, char ** @@ -105,6 +106,7 @@ static int execute(char **modes, char **
r = write_mode(modes); r = write_mode(modes);
if (r < 0) if (r < 0)
return r; return r;
@ -56,7 +56,7 @@ Index: systemd/src/sleep/sleep.c
execute_directories(dirs, DEFAULT_TIMEOUT_USEC, arguments); execute_directories(dirs, DEFAULT_TIMEOUT_USEC, arguments);
@@ -115,8 +117,10 @@ static int execute(char **modes, char ** @@ -113,8 +115,10 @@ static int execute(char **modes, char **
LOG_MESSAGE("Suspending system..."), LOG_MESSAGE("Suspending system..."),
"SLEEP=%s", arg_verb, "SLEEP=%s", arg_verb,
NULL); NULL);
@ -68,7 +68,7 @@ Index: systemd/src/sleep/sleep.c
if (r < 0) if (r < 0)
return r; return r;
@@ -156,6 +160,7 @@ static int parse_argv(int argc, char *ar @@ -154,6 +158,7 @@ static int parse_argv(int argc, char *ar
}; };
int c; int c;
@ -76,7 +76,7 @@ Index: systemd/src/sleep/sleep.c
assert(argc >= 0); assert(argc >= 0);
assert(argv); assert(argv);
@@ -193,6 +198,18 @@ static int parse_argv(int argc, char *ar @@ -191,6 +196,18 @@ static int parse_argv(int argc, char *ar
return -EINVAL; return -EINVAL;
} }

View File

@ -4,13 +4,15 @@ Subject: allow multiple sulogin to be started
allows multiple sulogin instance (bnc#793182). allows multiple sulogin instance (bnc#793182).
--- ---
units/getty@.service.m4 | 1 + units/getty@.service.m4 | 1 +
units/rescue.target | 1 + units/rescue.target | 1 +
units/serial-getty@.service.m4 | 1 + units/serial-getty@.service.m4 | 1 +
3 files changed, 3 insertions(+) 3 files changed, 3 insertions(+)
--- systemd-206.orig/units/getty@.service.m4 Index: systemd-221/units/getty@.service.m4
+++ systemd-206/units/getty@.service.m4 ===================================================================
--- systemd-221.orig/units/getty@.service.m4
+++ systemd-221/units/getty@.service.m4
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
Description=Getty on %I Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8) Documentation=man:agetty(8) man:systemd-getty-generator(8)
@ -19,8 +21,10 @@ allows multiple sulogin instance (bnc#793182).
After=systemd-user-sessions.service plymouth-quit-wait.service After=systemd-user-sessions.service plymouth-quit-wait.service
m4_ifdef(`HAVE_SYSV_COMPAT', m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service After=rc-local.service
--- systemd-206.orig/units/rescue.target Index: systemd-221/units/rescue.target
+++ systemd-206/units/rescue.target ===================================================================
--- systemd-221.orig/units/rescue.target
+++ systemd-221/units/rescue.target
@@ -10,6 +10,7 @@ Description=Rescue Mode @@ -10,6 +10,7 @@ Description=Rescue Mode
Documentation=man:systemd.special(7) Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service Requires=sysinit.target rescue.service
@ -29,8 +33,10 @@ allows multiple sulogin instance (bnc#793182).
AllowIsolate=yes AllowIsolate=yes
[Install] [Install]
--- systemd-206.orig/units/serial-getty@.service.m4 Index: systemd-221/units/serial-getty@.service.m4
+++ systemd-206/units/serial-getty@.service.m4 ===================================================================
--- systemd-221.orig/units/serial-getty@.service.m4
+++ systemd-221/units/serial-getty@.service.m4
@@ -10,6 +10,7 @@ Description=Serial Getty on %I @@ -10,6 +10,7 @@ Description=Serial Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8) Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html Documentation=http://0pointer.de/blog/projects/serial-console.html

View File

@ -4,14 +4,14 @@ Subject: apply ACL for nvidia device nodes
set ACL on nvidia devices (bnc#808319). set ACL on nvidia devices (bnc#808319).
--- ---
logind-acl.c | 12 ++++++++++++ src/login/logind-acl.c | 12 ++++++++++++
1 file changed, 12 insertions(+) 1 file changed, 12 insertions(+)
Index: systemd-210/src/login/logind-acl.c Index: systemd-221/src/login/logind-acl.c
=================================================================== ===================================================================
--- systemd-210.orig/src/login/logind-acl.c --- systemd-221.orig/src/login/logind-acl.c
+++ systemd-210/src/login/logind-acl.c +++ systemd-221/src/login/logind-acl.c
@@ -283,5 +283,17 @@ int devnode_acl_all(struct udev *udev, @@ -285,5 +285,17 @@ int devnode_acl_all(struct udev *udev,
r = k; r = k;
} }

View File

@ -5,13 +5,13 @@ Subject: [PATCH] apply ACL for nvidia-uvm device node
set ACL on nvidia-uvm device (bnc#879767). set ACL on nvidia-uvm device (bnc#879767).
--- ---
src/login/logind-acl.c | 2 ++ src/login/logind-acl.c | 2 ++
1 file changed, 2 insertions(+) 1 file changed, 2 insertions(+)
diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c Index: systemd-221/src/login/logind-acl.c
index 54bc16b..a40af21 100644 ===================================================================
--- a/src/login/logind-acl.c --- systemd-221.orig/src/login/logind-acl.c
+++ b/src/login/logind-acl.c +++ systemd-221/src/login/logind-acl.c
@@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev, @@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev,
if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0) if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0)
break; break;
@ -21,6 +21,3 @@ index 54bc16b..a40af21 100644
} }
return r; return r;
--
1.8.4.5

View File

@ -1,8 +1,28 @@
Nasty bug reported on bnc#867663 Nasty bug reported on bnc#867663
--- systemd-210/src/core/manager.c ---
+++ systemd-210/src/core/manager.c 2014-04-17 13:29:07.366236714 +0000 src/basic/def.h | 2 +-
@@ -1780,7 +1780,8 @@ static int manager_dispatch_jobs_in_prog src/core/manager.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
Index: systemd-221/src/basic/def.h
===================================================================
--- systemd-221.orig/src/basic/def.h
+++ systemd-221/src/basic/def.h
@@ -37,7 +37,7 @@
#define SYSTEMD_CGROUP_CONTROLLER "systemd"
-#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
+#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT,SIGTRAP,SIGSYS
#define SIGNALS_IGNORE SIGPIPE
#define DIGITS "0123456789"
Index: systemd-221/src/core/manager.c
===================================================================
--- systemd-221.orig/src/core/manager.c
+++ systemd-221/src/core/manager.c
@@ -1991,7 +1991,8 @@ static int manager_dispatch_jobs_in_prog
assert(m); assert(m);
assert(source); assert(source);
@ -12,14 +32,3 @@ Nasty bug reported on bnc#867663
next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_PERIOD_USEC; next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_PERIOD_USEC;
r = sd_event_source_set_time(source, next); r = sd_event_source_set_time(source, next);
--- systemd-210/src/shared/def.h
+++ systemd-210/src/shared/def.h 2014-04-17 13:47:10.946234983 +0000
@@ -37,7 +37,7 @@
#define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
-#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT
+#define SIGNALS_CRASH_HANDLER SIGSEGV,SIGILL,SIGFPE,SIGBUS,SIGQUIT,SIGABRT,SIGTRAP,SIGSYS
#define SIGNALS_IGNORE SIGPIPE
#define DIGITS "0123456789"

View File

@ -7,8 +7,14 @@ later by a shutdown may fail with (journalctl -b -1):
which then caused the subsequent fault that umounting the users which then caused the subsequent fault that umounting the users
home directories done by automount are busy. home directories done by automount are busy.
--- systemd-210/units/user/systemd-exit.service.in ---
+++ systemd-210/units/user/systemd-exit.service.in 2014-03-25 16:59:20.406235916 +0000 units/user/systemd-exit.service.in | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: systemd-221/units/user/systemd-exit.service.in
===================================================================
--- systemd-221.orig/units/user/systemd-exit.service.in
+++ systemd-221/units/user/systemd-exit.service.in
@@ -10,8 +10,9 @@ Description=Exit the Session @@ -10,8 +10,9 @@ Description=Exit the Session
Documentation=man:systemd.special(7) Documentation=man:systemd.special(7)
DefaultDependencies=no DefaultDependencies=no

View File

@ -5,6 +5,7 @@ systemd
# postun "if [ "$1" == "0" ]; then" # postun "if [ "$1" == "0" ]; then"
# postun "<prefix>%{_sbindir}/pam-config -d --systemd || :" # postun "<prefix>%{_sbindir}/pam-config -d --systemd || :"
# postun "fi" # postun "fi"
libgudev-1_0-0 libsystemd0
libudev1 libudev1
nss-myhostname nss-myhostname
nss-mymachines

View File

@ -1,6 +1,11 @@
diff -Naur systemd-210/units/rc-local.service.in systemd-210-mod/units/rc-local.service.in ---
--- systemd-210/units/rc-local.service.in 2013-08-13 22:02:52.788756123 +0200 units/rc-local.service.in | 2 +-
+++ systemd-210-mod/units/rc-local.service.in 2014-03-25 08:34:40.317587764 +0100 1 file changed, 1 insertion(+), 1 deletion(-)
Index: systemd-221/units/rc-local.service.in
===================================================================
--- systemd-221.orig/units/rc-local.service.in
+++ systemd-221/units/rc-local.service.in
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
[Unit] [Unit]
Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility Description=@RC_LOCAL_SCRIPT_PATH_START@ Compatibility

View File

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

View File

@ -4,30 +4,28 @@ Subject: ensure shortname is set as hostname (bnc#820213)
strip hostname so the domain part isn't set as part of the hostname strip hostname so the domain part isn't set as part of the hostname
--- ---
src/core/hostname-setup.c | 6 +++++- src/core/hostname-setup.c | 4 ++++
1 file changed, 5 insertions(+), 1 deletion(-) 1 file changed, 4 insertions(+)
Index: systemd-218/src/core/hostname-setup.c Index: systemd-221/src/core/hostname-setup.c
=================================================================== ===================================================================
--- systemd-218.orig/src/core/hostname-setup.c --- systemd-221.orig/src/core/hostname-setup.c
+++ systemd-218/src/core/hostname-setup.c +++ systemd-221/src/core/hostname-setup.c
@@ -32,7 +32,7 @@ @@ -34,6 +34,7 @@ int hostname_setup(void) {
#include "fileio.h"
static int read_and_strip_hostname(const char *path, char **hn) {
- char *s;
+ char *s, *domain;
int r; int r;
_cleanup_free_ char *b = NULL;
const char *hn;
+ char *domain;
bool enoent = false;
assert(path); r = read_hostname_config("/etc/hostname", &b);
@@ -49,6 +49,10 @@ static int read_and_strip_hostname(const @@ -46,6 +47,9 @@ int hostname_setup(void) {
return -ENOENT; hn = NULL;
} } else
hn = b;
+ /* strip any leftover of a domain name */ + /* strip any leftover of a domain name */
+ if ((domain = strchr(s, '.')) != NULL) + if ((domain = strchr(hn, '.')) != NULL)
+ *domain = '\0'; + *domain = '\0';
+
*hn = s; if (isempty(hn)) {
return 0; /* Don't override the hostname if it is already set
}

View File

@ -3,14 +3,14 @@ Date: Thu, 23 Aug 2012 11:08:25 +0200
Subject: fix support for boot prefixed initscript (bnc#746506) Subject: fix support for boot prefixed initscript (bnc#746506)
--- ---
src/systemctl/systemctl.c | 20 +++++++++++++++++++- src/systemctl/systemctl.c | 18 +++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-) 1 file changed, 17 insertions(+), 1 deletion(-)
Index: systemd-218/src/systemctl/systemctl.c Index: systemd-221/src/systemctl/systemctl.c
=================================================================== ===================================================================
--- systemd-218.orig/src/systemctl/systemctl.c --- systemd-221.orig/src/systemctl/systemctl.c
+++ systemd-218/src/systemctl/systemctl.c +++ systemd-221/src/systemctl/systemctl.c
@@ -5202,8 +5202,26 @@ static int enable_sysv_units(const char @@ -5165,8 +5165,24 @@ static int enable_sysv_units(const char
p[strlen(p) - strlen(".service")] = 0; p[strlen(p) - strlen(".service")] = 0;
found_sysv = access(p, F_OK) >= 0; found_sysv = access(p, F_OK) >= 0;
@ -27,14 +27,12 @@ Index: systemd-218/src/systemctl/systemctl.c
+ return -ENOMEM; + return -ENOMEM;
+ p[strlen(p) - sizeof(".service") + 1] = 0; + p[strlen(p) - sizeof(".service") + 1] = 0;
+ found_sysv = access(p, F_OK) >= 0; + found_sysv = access(p, F_OK) >= 0;
+ + if (!found_sysv)
+ if (!found_sysv) {
+ continue; + continue;
+ }
+#else +#else
continue; continue;
+#endif +#endif
+ } + }
log_info("%s is not a native service, redirecting to /sbin/chkconfig.", name); if (found_native)
log_info("Synchronizing state of %s with SysV init with %s...", name, argv[0]);

View File

@ -1,36 +1,41 @@
From: Frederic Crozat <fcrozat@suse.com> Original-From: Frederic Crozat <fcrozat@suse.com>
Date: Fri, 19 Aug 2011 15:29:49 +0000 Original-Date: Fri, 19 Aug 2011 15:29:49 +0000
Subject: handle disable_caplock and compose_table and kbd_rate Subject: handle disable_caplock and compose_table and kbd_rate
References: https://bugzilla.opensuse.org/746595
Last-Editor: Jan Engelhardt <jengelh@inai.de>
Date: Fri Jun 19 21:36:27 CEST 2015
(bnc#746595)
--- ---
src/vconsole/vconsole-setup.c | 151 +++++++++++++++++++++++++++++++++++++++++- src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++--
1 file changed, 148 insertions(+), 3 deletions(-) 1 file changed, 147 insertions(+), 4 deletions(-)
Index: systemd-218/src/vconsole/vconsole-setup.c Index: systemd-221/src/vconsole/vconsole-setup.c
=================================================================== ===================================================================
--- systemd-218.orig/src/vconsole/vconsole-setup.c --- systemd-221.orig/src/vconsole/vconsole-setup.c
+++ systemd-218/src/vconsole/vconsole-setup.c +++ systemd-221/src/vconsole/vconsole-setup.c
@@ -40,6 +40,7 @@ @@ -35,6 +35,8 @@
#include "macro.h" #include "log.h"
#include "virt.h" #include "virt.h"
#include "fileio.h" #include "fileio.h"
+#include "macro.h"
+#include "strv.h" +#include "strv.h"
#include "process-util.h"
static bool is_vconsole(int fd) { #include "terminal-util.h"
unsigned char data[1]; #include "signal-util.h"
@@ -101,8 +102,8 @@ static int enable_utf8(int fd) { @@ -99,8 +101,10 @@ static int enable_utf8(int fd) {
return r; return r;
} }
-static int keymap_load(const char *vc, const char *map, const char *map_toggle, bool utf8, pid_t *_pid) { -static int keyboard_load_and_wait(const char *vc, const char *map, const char *map_toggle, bool utf8) {
- const char *args[8]; - const char *args[8];
+static int keymap_load(const char *vc, const char *map, const char *map_toggle, bool utf8, bool disable_capslock, pid_t *_pid) { +static int keyboard_load_and_wait(const char *vc, const char *map,
+ const char *map_toggle, bool utf8, bool disable_capslock)
+{
+ const char *args[9]; + const char *args[9];
int i = 0; int i = 0, r;
pid_t pid; pid_t pid;
@@ -121,6 +122,8 @@ static int keymap_load(const char *vc, c @@ -117,6 +121,8 @@ static int keyboard_load_and_wait(const
args[i++] = map; args[i++] = map;
if (map_toggle) if (map_toggle)
args[i++] = map_toggle; args[i++] = map_toggle;
@ -39,23 +44,23 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
args[i++] = NULL; args[i++] = NULL;
pid = fork(); pid = fork();
@@ -236,11 +239,113 @@ static void font_copy_to_all_vcs(int fd) @@ -246,11 +252,117 @@ static void font_copy_to_all_vcs(int fd)
} }
} }
+#ifdef HAVE_SYSV_COMPAT +#ifdef HAVE_SYSV_COMPAT
+static int load_compose_table(const char *vc, const char *compose_table, pid_t *_pid) { +static int compose_load_and_wait(const char *vc, const char *compose_table)
+{
+ const char *args[1024]; + const char *args[1024];
+ int i = 0, j = 0; + unsigned int i = 0, j = 0;
+ int ret;
+ pid_t pid; + pid_t pid;
+ char **strv_compose_table = NULL; + char **strv_compose_table = NULL;
+ char *to_free[1024]; + char *to_free[1024];
+ +
+ if (isempty(compose_table)) { + if (isempty(compose_table))
+ /* An empty map means no compose table*/ + /* An empty map means no compose table */
+ *_pid = 0; + return 1;
+ return 0;
+ }
+ +
+ args[i++] = KBD_LOADKEYS; + args[i++] = KBD_LOADKEYS;
+ args[i++] = "-q"; + args[i++] = "-q";
@ -69,50 +74,51 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ char **name; + char **name;
+ char *arg; + char *arg;
+ +
+ STRV_FOREACH (name, strv_compose_table) { + STRV_FOREACH(name, strv_compose_table) {
+ if (streq(*name,"-c") || streq(*name,"clear")) { + if (streq(*name, "-c") || streq(*name, "clear")) {
+ compose_clear = true; + compose_clear = true;
+ continue; + continue;
+ } + }
+ if (!compose_loaded) { + if (!compose_loaded && compose_clear)
+ if (compose_clear) + args[i++] = "-c";
+ args[i++] = "-c"; + asprintf(&arg, "compose.%s", *name);
+ }
+ asprintf(&arg, "compose.%s",*name);
+ compose_loaded = true; + compose_loaded = true;
+ args[i++] = to_free[j++] = arg; + args[i++] = to_free[j++] = arg;
+ + if (i >= ELEMENTSOF(args) - 1)
+ break;
+ } + }
+ strv_free(strv_compose_table); + strv_free(strv_compose_table);
+ } + }
+ args[i++] = NULL; + args[i++] = NULL;
+ +
+ if ((pid = fork()) < 0) { + pid = fork();
+ log_error("Failed to fork: %m"); + if (pid < 0)
+ return -errno; + return log_error_errno(errno, "Failed to fork: %m");
+ } else if (pid == 0) { + if (pid == 0) {
+ reset_all_signal_handlers();
+ reset_signal_mask();
+ execv(args[0], (char **) args); + execv(args[0], (char **) args);
+ _exit(EXIT_FAILURE); + _exit(EXIT_FAILURE);
+ } + }
+ +
+ *_pid = pid; + ret = wait_for_terminate_and_warn(args[0], pid, true);
+ + for (i = 0; i < j; ++i)
+ for (i=0 ; i < j ; i++) + free(to_free[i]);
+ free (to_free[i]); + if (ret < 0)
+ + return ret;
+ return 0; + return ret == 0;
+} +}
+#endif +#endif
+ +
+static int set_kbd_rate(const char *vc, const char *kbd_rate, const char *kbd_delay, pid_t *_pid) { +static int kbdrate_set_and_wait(const char *vc, const char *kbd_rate,
+ const char *kbd_delay)
+{
+ const char *args[7]; + const char *args[7];
+ int i = 0; + int i = 0, ret;
+ pid_t pid; + pid_t pid;
+ +
+ if (isempty(kbd_rate) && isempty(kbd_delay)) { + if (isempty(kbd_rate) && isempty(kbd_delay))
+ *_pid = 0; + return 1;
+ return 0;
+ }
+ +
+ args[i++] = "/bin/kbdrate"; + args[i++] = "/bin/kbdrate";
+ if (!isempty(kbd_rate)) { + if (!isempty(kbd_rate)) {
@ -126,16 +132,19 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ args[i++] = "-s"; + args[i++] = "-s";
+ args[i++] = NULL; + args[i++] = NULL;
+ +
+ if ((pid = fork()) < 0) { + pid = fork();
+ log_error("Failed to fork: %m"); + if (pid < 0)
+ return -errno; + return log_error_errno(errno, "Failed to fork: %m");
+ } else if (pid == 0) { + if (pid == 0) {
+ reset_all_signal_handlers();
+ reset_signal_mask();
+ execv(args[0], (char **) args); + execv(args[0], (char **) args);
+ _exit(EXIT_FAILURE); + _exit(EXIT_FAILURE);
+ } + }
+ + ret = wait_for_terminate_and_warn(args[0], pid, true);
+ *_pid = pid; + if (ret < 0)
+ return 0; + return ret;
+ return ret == 0;
+} +}
+ +
int main(int argc, char **argv) { int main(int argc, char **argv) {
@ -147,13 +156,13 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ _cleanup_free_ char + _cleanup_free_ char
+ *vc_kbd_delay = NULL, *vc_kbd_rate = NULL, + *vc_kbd_delay = NULL, *vc_kbd_rate = NULL,
+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL; + *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL;
+ pid_t kbd_rate_pid = 0, compose_table_pid = 0;
+#endif +#endif
+ bool disable_capslock = false; + bool disable_capslock = false;
+ bool comp_ok, rate_ok;
_cleanup_close_ int fd = -1; _cleanup_close_ int fd = -1;
bool utf8; bool utf8, font_copy = false, font_ok, keyboard_ok;
pid_t font_pid = 0, keymap_pid = 0; int r = EXIT_FAILURE;
@@ -273,6 +378,28 @@ int main(int argc, char **argv) { @@ -281,6 +393,31 @@ int main(int argc, char **argv) {
utf8 = is_locale_utf8(); utf8 = is_locale_utf8();
@ -166,7 +175,8 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ "COMPOSETABLE", &vc_compose_table, + "COMPOSETABLE", &vc_compose_table,
+ NULL); + NULL);
+ if (r < 0 && r != -ENOENT) + if (r < 0 && r != -ENOENT)
+ log_warning("Failed to read /etc/sysconfig/keyboard: %s", strerror(-r)); + log_warning("Failed to read /etc/sysconfig/keyboard: %s",
+ strerror(-r));
+ +
+ r = parse_env_file("/etc/sysconfig/console", NEWLINE, + r = parse_env_file("/etc/sysconfig/console", NEWLINE,
+ "CONSOLE_FONT", &vc_font, + "CONSOLE_FONT", &vc_font,
@ -174,45 +184,33 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ "CONSOLE_UNICODEMAP", &vc_font_unimap, + "CONSOLE_UNICODEMAP", &vc_font_unimap,
+ NULL); + NULL);
+ if (r < 0 && r != -ENOENT) + if (r < 0 && r != -ENOENT)
+ log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r)); + log_warning("Failed to read /etc/sysconfig/console: %s",
+ strerror(-r));
+ +
+ disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; + disable_capslock = vc_kbd_disable_caps_lock &&
+#endif + strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
+#endif /* HAVE_SYSV_COMPAT */
+ +
r = parse_env_file("/etc/vconsole.conf", NEWLINE, r = parse_env_file("/etc/vconsole.conf", NEWLINE,
"KEYMAP", &vc_keymap, "KEYMAP", &vc_keymap,
"KEYMAP_TOGGLE", &vc_keymap_toggle, "KEYMAP_TOGGLE", &vc_keymap_toggle,
@@ -312,14 +439,32 @@ int main(int argc, char **argv) { @@ -312,11 +449,17 @@ int main(int argc, char **argv) {
if (font_pid > 0) (void) disable_utf8(fd);
wait_for_terminate_and_warn(KBD_SETFONT, font_pid, true);
- r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid); font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, &keymap_pid); - keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) > 0;
if (r < 0) { + keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
log_error_errno(r, "Failed to start " KBD_LOADKEYS ": %m"); + utf8, disable_capslock) > 0;
return EXIT_FAILURE;
}
+#ifdef HAVE_SYSV_COMPAT +#ifdef HAVE_SYSV_COMPAT
+ r = load_compose_table(vc, vc_compose_table, &compose_table_pid); + comp_ok = compose_load_and_wait(vc, vc_compose_table);
+ if (r < 0) { + rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
+ log_error_errno(r, "Failed to start " KBD_LOADKEYS " loading the compose table: %m");
+ return EXIT_FAILURE;
+ }
+ r = set_kbd_rate(vc, vc_kbd_rate, vc_kbd_delay, &kbd_rate_pid);
+ if (r < 0) {
+ log_error_errno(r, "Failed to start kbdrate: %m");
+ return EXIT_FAILURE;
+ }
+#endif +#endif
if (keymap_pid > 0) /* Only copy the font when we executed setfont successfully */
wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid, true); if (font_copy && font_ok)
+#ifdef HAVE_SYSV_COMPAT (void) font_copy_to_all_vcs(fd);
+ if (compose_table_pid > 0)
+ wait_for_terminate_and_warn(KBD_LOADKEYS, compose_table_pid, true);
+ if (kbd_rate_pid > 0)
+ wait_for_terminate_and_warn("/usr/bin/kbdrate", kbd_rate_pid, true);
+#endif
/* Only copy the font when we started setfont successfully */ - return font_ok && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;
if (font_copy && font_pid > 0) + return font_ok && keyboard_ok && comp_ok && rate_ok ?
+ EXIT_SUCCESS : EXIT_FAILURE;
}

View File

@ -14,11 +14,11 @@ Cristian Rodríguez <crrodriguez@opensuse.org>
units/systemd-vconsole-setup.service.in | 2 - units/systemd-vconsole-setup.service.in | 2 -
5 files changed, 94 insertions(+), 3 deletions(-) 5 files changed, 94 insertions(+), 3 deletions(-)
Index: systemd-218/Makefile.am Index: systemd-221/Makefile.am
=================================================================== ===================================================================
--- systemd-218.orig/Makefile.am --- systemd-221.orig/Makefile.am
+++ systemd-218/Makefile.am +++ systemd-221/Makefile.am
@@ -3715,6 +3715,19 @@ dist_udevrules_DATA += \ @@ -3813,6 +3813,19 @@ dist_udevrules_DATA += \
rules/61-accelerometer.rules rules/61-accelerometer.rules
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -35,13 +35,13 @@ Index: systemd-218/Makefile.am
+ rules/73-seat-numlock.rules + rules/73-seat-numlock.rules
+ +
+# ------------------------------------------------------------------------------ +# ------------------------------------------------------------------------------
if ENABLE_GUDEV mtd_probe_SOURCES = \
if ENABLE_GTK_DOC src/udev/mtd_probe/mtd_probe.c \
SUBDIRS += \ src/udev/mtd_probe/mtd_probe.h \
Index: systemd-218/rules/73-seat-numlock.rules Index: systemd-221/rules/73-seat-numlock.rules
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd-218/rules/73-seat-numlock.rules +++ systemd-221/rules/73-seat-numlock.rules
@@ -0,0 +1,8 @@ @@ -0,0 +1,8 @@
+# This file is part of SUSE customization of systemd. +# This file is part of SUSE customization of systemd.
+# +#
@ -51,10 +51,10 @@ Index: systemd-218/rules/73-seat-numlock.rules
+# (at your option) any later version. +# (at your option) any later version.
+ +
+SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}" +SUBSYSTEM=="tty", ACTION=="add", KERNEL=="tty[0-9]|tty1[0-2]", TEST=="/run/numlock-on", RUN+="numlock-on $env{DEVNAME}"
Index: systemd-218/src/login/numlock-on.c Index: systemd-221/src/login/numlock-on.c
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd-218/src/login/numlock-on.c +++ systemd-221/src/login/numlock-on.c
@@ -0,0 +1,34 @@ @@ -0,0 +1,34 @@
+/* +/*
+ * numlock-on.c: Turn numlock-on + * numlock-on.c: Turn numlock-on
@ -90,13 +90,13 @@ Index: systemd-218/src/login/numlock-on.c
+ +
+ exit(0); + exit(0);
+} +}
Index: systemd-218/src/vconsole/vconsole-setup.c Index: systemd-221/src/vconsole/vconsole-setup.c
=================================================================== ===================================================================
--- systemd-218.orig/src/vconsole/vconsole-setup.c --- systemd-221.orig/src/vconsole/vconsole-setup.c
+++ systemd-218/src/vconsole/vconsole-setup.c +++ systemd-221/src/vconsole/vconsole-setup.c
@@ -42,6 +42,10 @@ @@ -41,6 +41,10 @@
#include "fileio.h" #include "terminal-util.h"
#include "strv.h" #include "signal-util.h"
+#define BIOS_DATA_AREA 0x400 +#define BIOS_DATA_AREA 0x400
+#define BDA_KEYBOARD_STATUS_FLAGS_4 0x97 +#define BDA_KEYBOARD_STATUS_FLAGS_4 0x97
@ -105,21 +105,20 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
static bool is_vconsole(int fd) { static bool is_vconsole(int fd) {
unsigned char data[1]; unsigned char data[1];
@@ -342,10 +346,11 @@ int main(int argc, char **argv) { @@ -359,9 +363,10 @@ int main(int argc, char **argv) {
#ifdef HAVE_SYSV_COMPAT #ifdef HAVE_SYSV_COMPAT
_cleanup_free_ char _cleanup_free_ char
*vc_kbd_delay = NULL, *vc_kbd_rate = NULL, *vc_kbd_delay = NULL, *vc_kbd_rate = NULL,
- *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL; - *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL;
+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL, + *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL,
+ *vc_kbd_numlock = NULL; + *vc_kbd_numlock = NULL;
pid_t kbd_rate_pid = 0, compose_table_pid = 0;
#endif #endif
- bool disable_capslock = false; - bool disable_capslock = false;
+ bool disable_capslock = false, numlock = false; + bool disable_capslock = false, numlock = false;
bool comp_ok, rate_ok;
_cleanup_close_ int fd = -1; _cleanup_close_ int fd = -1;
bool utf8; bool utf8, font_copy = false, font_ok, keyboard_ok;
pid_t font_pid = 0, keymap_pid = 0; @@ -399,6 +404,7 @@ int main(int argc, char **argv) {
@@ -384,6 +389,7 @@ int main(int argc, char **argv) {
"KBD_DELAY", &vc_kbd_delay, "KBD_DELAY", &vc_kbd_delay,
"KBD_RATE", &vc_kbd_rate, "KBD_RATE", &vc_kbd_rate,
"KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock, "KBD_DISABLE_CAPS_LOCK", &vc_kbd_disable_caps_lock,
@ -127,54 +126,54 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
"COMPOSETABLE", &vc_compose_table, "COMPOSETABLE", &vc_compose_table,
NULL); NULL);
if (r < 0 && r != -ENOENT) if (r < 0 && r != -ENOENT)
@@ -398,6 +404,32 @@ int main(int argc, char **argv) { @@ -416,6 +422,32 @@ int main(int argc, char **argv) {
log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
disable_capslock = vc_kbd_disable_caps_lock && strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0; disable_capslock = vc_kbd_disable_caps_lock &&
strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
+ numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes");
+#if defined(__i386__) || defined(__x86_64__) +#if defined(__i386__) || defined(__x86_64__)
+ if (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) { + if (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) {
+ int _cleanup_close_ fdmem; + int _cleanup_close_ fdmem;
+ char c; + char c;
+ +
+ fdmem = open ("/dev/mem", O_RDONLY); + fdmem = open ("/dev/mem", O_RDONLY);
+ if (fdmem < 0) { + if (fdmem < 0) {
+ log_error("Failed to open /dev/mem: %m"); + log_error("Failed to open /dev/mem: %m");
+ return EXIT_FAILURE; + return EXIT_FAILURE;
+ } + }
+ +
+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) { + if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
+ log_error("Failed to seek /dev/mem: %m"); + log_error("Failed to seek /dev/mem: %m");
+ return EXIT_FAILURE; + return EXIT_FAILURE;
+ } + }
+ +
+ if (read (fdmem, &c, sizeof(char)) == -1) { + if (read(fdmem, &c, sizeof(char)) == -1) {
+ log_error("Failed to read /dev/mem: %m"); + log_error("Failed to read /dev/mem: %m");
+ return EXIT_FAILURE; + return EXIT_FAILURE;
+ } + }
+ +
+ if (c & BDA_KSF4_NUMLOCK_MASK) + if (c & BDA_KSF4_NUMLOCK_MASK)
+ numlock = true; + numlock = true;
+ } else + }
+#endif +#endif /* x86 */
+ numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes"); #endif /* HAVE_SYSV_COMPAT */
#endif
r = parse_env_file("/etc/vconsole.conf", NEWLINE, r = parse_env_file("/etc/vconsole.conf", NEWLINE,
@@ -444,6 +476,10 @@ int main(int argc, char **argv) { @@ -451,6 +483,10 @@ int main(int argc, char **argv) {
log_error_errno(r, "Failed to start " KBD_LOADKEYS ": %m"); font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
return EXIT_FAILURE; keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
} utf8, disable_capslock) > 0;
+ if (numlock) + if (numlock)
+ touch("/run/numlock-on"); + touch("/run/numlock-on");
+ else + else
+ unlink("/run/numlock-on"); + unlink("/run/numlock-on");
#ifdef HAVE_SYSV_COMPAT #ifdef HAVE_SYSV_COMPAT
r = load_compose_table(vc, vc_compose_table, &compose_table_pid); comp_ok = compose_load_and_wait(vc, vc_compose_table);
if (r < 0) { rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
Index: systemd-218/units/systemd-vconsole-setup.service.in Index: systemd-221/units/systemd-vconsole-setup.service.in
=================================================================== ===================================================================
--- systemd-218.orig/units/systemd-vconsole-setup.service.in --- systemd-221.orig/units/systemd-vconsole-setup.service.in
+++ systemd-218/units/systemd-vconsole-setup.service.in +++ systemd-221/units/systemd-vconsole-setup.service.in
@@ -10,7 +10,7 @@ Description=Setup Virtual Console @@ -10,7 +10,7 @@ Description=Setup Virtual Console
Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5) Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
DefaultDependencies=no DefaultDependencies=no

View File

@ -7,11 +7,11 @@ handle ROOT_USES_LANG=ctype (bnc#792182).
src/core/locale-setup.c | 26 ++++++++++++++++++++++++++ src/core/locale-setup.c | 26 ++++++++++++++++++++++++++
1 file changed, 26 insertions(+) 1 file changed, 26 insertions(+)
Index: systemd-218/src/core/locale-setup.c Index: systemd-221/src/core/locale-setup.c
=================================================================== ===================================================================
--- systemd-218.orig/src/core/locale-setup.c --- systemd-221.orig/src/core/locale-setup.c
+++ systemd-218/src/core/locale-setup.c +++ systemd-221/src/core/locale-setup.c
@@ -36,6 +36,11 @@ int locale_setup(char ***environment) { @@ -34,6 +34,11 @@ int locale_setup(char ***environment) {
char **add; char **add;
char *variables[_VARIABLE_LC_MAX] = {}; char *variables[_VARIABLE_LC_MAX] = {};
int r = 0, i; int r = 0, i;
@ -23,7 +23,7 @@ Index: systemd-218/src/core/locale-setup.c
if (detect_container(NULL) <= 0) { if (detect_container(NULL) <= 0) {
r = parse_env_file("/proc/cmdline", WHITESPACE, r = parse_env_file("/proc/cmdline", WHITESPACE,
@@ -82,6 +87,27 @@ int locale_setup(char ***environment) { @@ -80,6 +85,27 @@ int locale_setup(char ***environment) {
if (r < 0 && r != -ENOENT) if (r < 0 && r != -ENOENT)
log_warning_errno(r, "Failed to read /etc/locale.conf: %m"); log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
} }

View File

@ -8,14 +8,16 @@ systemd unit drop-in files to add dependencies
--- ---
Makefile.am | 9 Makefile.am | 9
src/insserv-generator/Makefile | 28 ++ src/insserv-generator/Makefile | 28 ++
src/insserv-generator/insserv-generator.c | 312 ++++++++++++++++++++++++++++++ src/insserv-generator/insserv-generator.c | 315 ++++++++++++++++++++++++++++++
3 files changed, 349 insertions(+) 3 files changed, 351 insertions(+), 1 deletion(-)
create mode 100644 src/insserv-generator/Makefile create mode 100644 src/insserv-generator/Makefile
create mode 100644 src/insserv-generator/insserv-generator.c create mode 100644 src/insserv-generator/insserv-generator.c
--- systemd-219.orig/Makefile.am Index: systemd-221/Makefile.am
+++ systemd-219/Makefile.am ===================================================================
@@ -621,7 +621,8 @@ nodist_systemunit_DATA += \ --- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -618,7 +618,8 @@ nodist_systemunit_DATA += \
systemgenerator_PROGRAMS += \ systemgenerator_PROGRAMS += \
systemd-sysv-generator \ systemd-sysv-generator \
@ -25,23 +27,23 @@ systemd unit drop-in files to add dependencies
endif endif
EXTRA_DIST += \ EXTRA_DIST += \
@@ -2565,6 +2566,14 @@ systemd_rc_local_generator_LDADD = \ @@ -2544,6 +2545,12 @@ $(systemd_boot): $(systemd_boot_solib)
libsystemd-label.la \ endif
libsystemd-shared.la endif
+#------------------------------------------------------------------------------- +#-------------------------------------------------------------------------------
+systemd_insserv_generator_SOURCES = \ +systemd_insserv_generator_SOURCES = \
+ src/insserv-generator/insserv-generator.c + src/insserv-generator/insserv-generator.c
+ +
+systemd_insserv_generator_LDADD = \ +systemd_insserv_generator_LDADD = libbasic.la
+ libsystemd-label.la \
+ libsystemd-shared.la
+ +
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
systemd_remount_fs_SOURCES = \ stub_headers = \
src/remount-fs/remount-fs.c \ src/boot/efi/util.h \
Index: systemd-221/src/insserv-generator/Makefile
===================================================================
--- /dev/null --- /dev/null
+++ systemd-219/src/insserv-generator/Makefile +++ systemd-221/src/insserv-generator/Makefile
@@ -0,0 +1,28 @@ @@ -0,0 +1,28 @@
+# This file is part of systemd. +# This file is part of systemd.
+# +#
@ -71,9 +73,11 @@ systemd unit drop-in files to add dependencies
+ $(MAKE) -C .. clean + $(MAKE) -C .. clean
+ +
+.PHONY: all clean +.PHONY: all clean
Index: systemd-221/src/insserv-generator/insserv-generator.c
===================================================================
--- /dev/null --- /dev/null
+++ systemd-219/src/insserv-generator/insserv-generator.c +++ systemd-221/src/insserv-generator/insserv-generator.c
@@ -0,0 +1,312 @@ @@ -0,0 +1,315 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+ +
+/*** +/***
@ -153,6 +157,7 @@ systemd unit drop-in files to add dependencies
+ unsigned i; + unsigned i;
+ char *r; + char *r;
+ const char *n; + const char *n;
+ int ret;
+ +
+ assert(name); + assert(name);
+ assert(_r); + assert(_r);
@ -182,7 +187,9 @@ systemd unit drop-in files to add dependencies
+ return -EINVAL; + return -EINVAL;
+ +
+ /* Facilities starting with $ are most likely targets */ + /* Facilities starting with $ are most likely targets */
+ r = unit_name_build(n, NULL, ".target"); + ret = unit_name_build(n, NULL, ".target", &r);
+ if (ret < 0)
+ return ret;
+ } else if (filename && streq(name, filename)) + } else if (filename && streq(name, filename))
+ /* Names equaling the file name of the services are redundant */ + /* Names equaling the file name of the services are redundant */
+ return 0; + return 0;

View File

@ -16,11 +16,11 @@ What is the rationale for MAP_STACK?
src/journal/mmap-cache.c | 16 +++++++++++++++- src/journal/mmap-cache.c | 16 +++++++++++++++-
4 files changed, 33 insertions(+), 5 deletions(-) 4 files changed, 33 insertions(+), 5 deletions(-)
Index: systemd/src/journal/catalog.c Index: systemd-221/src/journal/catalog.c
=================================================================== ===================================================================
--- systemd.orig/src/journal/catalog.c --- systemd-221.orig/src/journal/catalog.c
+++ systemd/src/journal/catalog.c +++ systemd-221/src/journal/catalog.c
@@ -470,6 +470,10 @@ finish: @@ -469,6 +469,10 @@ finish:
static int open_mmap(const char *database, int *_fd, struct stat *_st, void **_p) { static int open_mmap(const char *database, int *_fd, struct stat *_st, void **_p) {
const CatalogHeader *h; const CatalogHeader *h;
@ -31,7 +31,7 @@ Index: systemd/src/journal/catalog.c
int fd; int fd;
void *p; void *p;
struct stat st; struct stat st;
@@ -492,12 +496,18 @@ static int open_mmap(const char *databas @@ -491,12 +495,18 @@ static int open_mmap(const char *databas
return -EINVAL; return -EINVAL;
} }
@ -51,10 +51,10 @@ Index: systemd/src/journal/catalog.c
h = p; h = p;
if (memcmp(h->signature, CATALOG_SIGNATURE, sizeof(h->signature)) != 0 || if (memcmp(h->signature, CATALOG_SIGNATURE, sizeof(h->signature)) != 0 ||
le64toh(h->header_size) < sizeof(CatalogHeader) || le64toh(h->header_size) < sizeof(CatalogHeader) ||
Index: systemd/src/journal/journal-authenticate.c Index: systemd-221/src/journal/journal-authenticate.c
=================================================================== ===================================================================
--- systemd.orig/src/journal/journal-authenticate.c --- systemd-221.orig/src/journal/journal-authenticate.c
+++ systemd/src/journal/journal-authenticate.c +++ systemd-221/src/journal/journal-authenticate.c
@@ -355,7 +355,8 @@ int journal_file_fss_load(JournalFile *f @@ -355,7 +355,8 @@ int journal_file_fss_load(JournalFile *f
goto finish; goto finish;
} }
@ -76,10 +76,10 @@ Index: systemd/src/journal/journal-authenticate.c
if (f->fss_file == MAP_FAILED) { if (f->fss_file == MAP_FAILED) {
f->fss_file = NULL; f->fss_file = NULL;
r = -errno; r = -errno;
Index: systemd/src/journal/journald-kmsg.c Index: systemd-221/src/journal/journald-kmsg.c
=================================================================== ===================================================================
--- systemd.orig/src/journal/journald-kmsg.c --- systemd-221.orig/src/journal/journald-kmsg.c
+++ systemd/src/journal/journald-kmsg.c +++ systemd-221/src/journal/journald-kmsg.c
@@ -454,7 +454,8 @@ int server_open_kernel_seqnum(Server *s) @@ -454,7 +454,8 @@ int server_open_kernel_seqnum(Server *s)
return 0; return 0;
} }
@ -90,11 +90,11 @@ Index: systemd/src/journal/journald-kmsg.c
if (p == MAP_FAILED) { if (p == MAP_FAILED) {
log_error_errno(errno, "Failed to map sequential number file, ignoring: %m"); log_error_errno(errno, "Failed to map sequential number file, ignoring: %m");
return 0; return 0;
Index: systemd/src/journal/mmap-cache.c Index: systemd-221/src/journal/mmap-cache.c
=================================================================== ===================================================================
--- systemd.orig/src/journal/mmap-cache.c --- systemd-221.orig/src/journal/mmap-cache.c
+++ systemd/src/journal/mmap-cache.c +++ systemd-221/src/journal/mmap-cache.c
@@ -467,11 +467,14 @@ static int add_mmap( @@ -466,11 +466,14 @@ static int add_mmap(
struct stat *st, struct stat *st,
void **ret) { void **ret) {
@ -109,7 +109,7 @@ Index: systemd/src/journal/mmap-cache.c
int r; int r;
assert(m); assert(m);
@@ -510,7 +513,8 @@ static int add_mmap( @@ -509,7 +512,8 @@ static int add_mmap(
} }
for (;;) { for (;;) {
@ -119,7 +119,7 @@ Index: systemd/src/journal/mmap-cache.c
if (d != MAP_FAILED) if (d != MAP_FAILED)
break; break;
if (errno != ENOMEM) if (errno != ENOMEM)
@@ -523,6 +527,16 @@ static int add_mmap( @@ -522,6 +526,16 @@ static int add_mmap(
return -ENOMEM; return -ENOMEM;
} }

View File

@ -5,10 +5,10 @@ Date: Tue Jan 20 11:33:59 UTC 2015
src/locale/kbd-model-map | 13 +++++++++++++ src/locale/kbd-model-map | 13 +++++++++++++
1 file changed, 13 insertions(+) 1 file changed, 13 insertions(+)
Index: systemd/src/locale/kbd-model-map Index: systemd-221/src/locale/kbd-model-map
=================================================================== ===================================================================
--- systemd.orig/src/locale/kbd-model-map --- systemd-221.orig/src/locale/kbd-model-map
+++ systemd/src/locale/kbd-model-map +++ systemd-221/src/locale/kbd-model-map
@@ -66,3 +66,16 @@ lt.baltic lt pc105 - terminate:ctrl_a @@ -66,3 +66,16 @@ lt.baltic lt pc105 - terminate:ctrl_a
lt.l4 lt pc105 - terminate:ctrl_alt_bksp lt.l4 lt pc105 - terminate:ctrl_alt_bksp
lt lt pc105 - terminate:ctrl_alt_bksp lt lt pc105 - terminate:ctrl_alt_bksp

View File

@ -1,35 +1,19 @@
--- ---
Makefile.am | 4 ++++
configure.ac | 4 ---- configure.ac | 4 ----
2 files changed, 4 insertions(+), 4 deletions(-) 1 file changed, 4 deletions(-)
Index: systemd/Makefile.am Index: systemd-221/configure.ac
=================================================================== ===================================================================
--- systemd.orig/Makefile.am --- systemd-221.orig/configure.ac
+++ systemd/Makefile.am +++ systemd-221/configure.ac
@@ -4789,6 +4789,10 @@ systemd_cryptsetup_CFLAGS = \ @@ -194,10 +194,6 @@ AS_CASE([$CC], [*clang*],
$(AM_CFLAGS) \
$(LIBCRYPTSETUP_CFLAGS)
+systemd_cryptsetup_LDFLAGS = \
+ $(AM_LDFLAGS) \
+ -Wl,-rpath-link=$(top_srcdir)/.libs
+
systemd_cryptsetup_LDADD = \
libsystemd-label.la \
libudev-internal.la \
Index: systemd/configure.ac
===================================================================
--- systemd.orig/configure.ac
+++ systemd/configure.ac
@@ -206,10 +206,6 @@ AS_CASE([$CC], [*clang*],
-Wno-gnu-variable-sized-type-not-at-end \ -Wno-gnu-variable-sized-type-not-at-end \
])]) ])])
-AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], -AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],
- [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\ - [CC_CHECK_FLAGS_APPEND([with_cflags], [CFLAGS], [\
- -flto -ffat-lto-objects])], - -flto -ffat-lto-objects])],
- [AC_MSG_RESULT([skipping -flto, optimization not enabled])]) - [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags") AC_SUBST([OUR_CFLAGS], "$with_cflags $sanitizer_cflags")
AS_CASE([$CFLAGS], [*-O[[12345\ ]]*], AS_CASE([$CFLAGS], [*-O[[12345sz\ ]]*],

View File

@ -11,10 +11,10 @@ Reference: bnc#852232
units/emergency.service.in | 1 + units/emergency.service.in | 1 +
1 file changed, 1 insertion(+) 1 file changed, 1 insertion(+)
Index: systemd-218/units/emergency.service.in Index: systemd-221/units/emergency.service.in
=================================================================== ===================================================================
--- systemd-218.orig/units/emergency.service.in --- systemd-221.orig/units/emergency.service.in
+++ systemd-218/units/emergency.service.in +++ systemd-221/units/emergency.service.in
@@ -11,6 +11,7 @@ Documentation=man:sulogin(8) @@ -11,6 +11,7 @@ Documentation=man:sulogin(8)
DefaultDependencies=no DefaultDependencies=no
Conflicts=shutdown.target Conflicts=shutdown.target

View File

@ -2,11 +2,11 @@
src/fstab-generator/fstab-generator.c | 45 +++++++++++++++++++++++++++++++++- src/fstab-generator/fstab-generator.c | 45 +++++++++++++++++++++++++++++++++-
1 file changed, 44 insertions(+), 1 deletion(-) 1 file changed, 44 insertions(+), 1 deletion(-)
Index: systemd/src/fstab-generator/fstab-generator.c Index: systemd-221/src/fstab-generator/fstab-generator.c
=================================================================== ===================================================================
--- systemd.orig/src/fstab-generator/fstab-generator.c --- systemd-221.orig/src/fstab-generator/fstab-generator.c
+++ systemd/src/fstab-generator/fstab-generator.c +++ systemd-221/src/fstab-generator/fstab-generator.c
@@ -48,6 +48,49 @@ static char *arg_usr_what = NULL; @@ -47,6 +47,49 @@ static char *arg_usr_what = NULL;
static char *arg_usr_fstype = NULL; static char *arg_usr_fstype = NULL;
static char *arg_usr_options = NULL; static char *arg_usr_options = NULL;
@ -56,7 +56,7 @@ Index: systemd/src/fstab-generator/fstab-generator.c
static int add_swap( static int add_swap(
const char *what, const char *what,
struct mntent *me, struct mntent *me,
@@ -118,7 +161,7 @@ static int add_swap( @@ -108,7 +151,7 @@ static int add_swap(
if (r < 0) if (r < 0)
return r; return r;

View File

@ -4,10 +4,10 @@
units/rescue.service.in | 3 ++- units/rescue.service.in | 3 ++-
3 files changed, 6 insertions(+), 2 deletions(-) 3 files changed, 6 insertions(+), 2 deletions(-)
Index: systemd/units/console-shell.service.m4.in Index: systemd-221/units/console-shell.service.m4.in
=================================================================== ===================================================================
--- systemd.orig/units/console-shell.service.m4.in --- systemd-221.orig/units/console-shell.service.m4.in
+++ systemd/units/console-shell.service.m4.in +++ systemd-221/units/console-shell.service.m4.in
@@ -17,6 +17,8 @@ Before=getty.target @@ -17,6 +17,8 @@ Before=getty.target
[Service] [Service]
Environment=HOME=/root Environment=HOME=/root
@ -17,10 +17,10 @@ Index: systemd/units/console-shell.service.m4.in
ExecStart=-@SULOGIN@ ExecStart=-@SULOGIN@
ExecStopPost=-@SYSTEMCTL@ poweroff ExecStopPost=-@SYSTEMCTL@ poweroff
Type=idle Type=idle
Index: systemd/units/emergency.service.in Index: systemd-221/units/emergency.service.in
=================================================================== ===================================================================
--- systemd.orig/units/emergency.service.in --- systemd-221.orig/units/emergency.service.in
+++ systemd/units/emergency.service.in +++ systemd-221/units/emergency.service.in
@@ -17,7 +17,8 @@ Before=shutdown.target @@ -17,7 +17,8 @@ Before=shutdown.target
[Service] [Service]
Environment=HOME=/root Environment=HOME=/root
@ -29,12 +29,12 @@ Index: systemd/units/emergency.service.in
+ExecStartPre=-/usr/bin/plymouth quit +ExecStartPre=-/usr/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth --wait +ExecStartPre=-/usr/bin/plymouth --wait
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.' ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\ntry again to boot into default mode.'
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default" ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
Type=idle Type=idle
Index: systemd/units/rescue.service.in Index: systemd-221/units/rescue.service.in
=================================================================== ===================================================================
--- systemd.orig/units/rescue.service.in --- systemd-221.orig/units/rescue.service.in
+++ systemd/units/rescue.service.in +++ systemd-221/units/rescue.service.in
@@ -16,7 +16,8 @@ Before=shutdown.target @@ -16,7 +16,8 @@ Before=shutdown.target
[Service] [Service]
Environment=HOME=/root Environment=HOME=/root
@ -43,5 +43,5 @@ Index: systemd/units/rescue.service.in
+ExecStartPre=-/usr/bin/plymouth quit +ExecStartPre=-/usr/bin/plymouth quit
+ExecStartPre=-/usr/bin/plymouth --wait +ExecStartPre=-/usr/bin/plymouth --wait
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.' ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" or ^D to\\nboot into default mode.'
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default" ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
Type=idle Type=idle

View File

@ -1,5 +1,11 @@
--- systemd-210/units/rpcbind.target ---
+++ systemd-210/units/rpcbind.target 2014-04-08 07:21:55.438235838 +0000 units/rpcbind.target | 1 +
1 file changed, 1 insertion(+)
Index: systemd-221/units/rpcbind.target
===================================================================
--- systemd-221.orig/units/rpcbind.target
+++ systemd-221/units/rpcbind.target
@@ -12,3 +12,4 @@ @@ -12,3 +12,4 @@
Description=RPC Port Mapper Description=RPC Port Mapper
Documentation=man:systemd.special(7) Documentation=man:systemd.special(7)

View File

@ -1,13 +1,22 @@
--- systemd-210/units/emergency.target ---
+++ systemd-210/units/emergency.target 2014-04-15 11:11:18.618235831 +0000 units/emergency.target | 1 +
units/rescue.target | 3 ++-
2 files changed, 3 insertions(+), 1 deletion(-)
Index: systemd-221/units/emergency.target
===================================================================
--- systemd-221.orig/units/emergency.target
+++ systemd-221/units/emergency.target
@@ -10,4 +10,5 @@ Description=Emergency Mode @@ -10,4 +10,5 @@ Description=Emergency Mode
Documentation=man:systemd.special(7) Documentation=man:systemd.special(7)
Requires=emergency.service Requires=emergency.service
After=emergency.service After=emergency.service
+Conflicts=getty.target rescue.target +Conflicts=getty.target rescue.target
AllowIsolate=yes AllowIsolate=yes
--- systemd-210/units/rescue.target Index: systemd-221/units/rescue.target
+++ systemd-210/units/rescue.target 2014-04-15 11:14:40.606808928 +0000 ===================================================================
--- systemd-221.orig/units/rescue.target
+++ systemd-221/units/rescue.target
@@ -10,7 +10,8 @@ Description=Rescue Mode @@ -10,7 +10,8 @@ Description=Rescue Mode
Documentation=man:systemd.special(7) Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service Requires=sysinit.target rescue.service

View File

@ -2,11 +2,11 @@
src/fstab-generator/fstab-generator.c | 7 +++++-- src/fstab-generator/fstab-generator.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-) 1 file changed, 5 insertions(+), 2 deletions(-)
Index: systemd-218/src/fstab-generator/fstab-generator.c Index: systemd-221/src/fstab-generator/fstab-generator.c
=================================================================== ===================================================================
--- systemd-218.orig/src/fstab-generator/fstab-generator.c --- systemd-221.orig/src/fstab-generator/fstab-generator.c
+++ systemd-218/src/fstab-generator/fstab-generator.c +++ systemd-221/src/fstab-generator/fstab-generator.c
@@ -238,8 +238,11 @@ static int add_mount( @@ -289,8 +289,11 @@ static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n", "Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source); source);
@ -18,5 +18,5 @@ Index: systemd-218/src/fstab-generator/fstab-generator.c
+ fprintf(f, "Before=%s\n", post); + fprintf(f, "Before=%s\n", post);
+ } + }
if (passno != 0) { if (!automount && opts) {
r = generator_write_fsck_deps(f, arg_dest, what, where, fstype); r = write_requires_after(f, opts);

View File

@ -10,11 +10,11 @@ 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-lock.mount
create mode 100644 units/var-run.mount create mode 100644 units/var-run.mount
Index: systemd-218/Makefile.am Index: systemd-221/Makefile.am
=================================================================== ===================================================================
--- systemd-218.orig/Makefile.am --- systemd-221.orig/Makefile.am
+++ systemd-218/Makefile.am +++ systemd-221/Makefile.am
@@ -516,6 +516,12 @@ endif @@ -526,6 +526,12 @@ dist_systemunit_DATA += \
dist_systemunit_DATA_busnames += \ dist_systemunit_DATA_busnames += \
units/busnames.target units/busnames.target
@ -27,9 +27,9 @@ Index: systemd-218/Makefile.am
nodist_systemunit_DATA = \ nodist_systemunit_DATA = \
units/getty@.service \ units/getty@.service \
units/serial-getty@.service \ units/serial-getty@.service \
@@ -6086,6 +6092,9 @@ RUNLEVEL4_TARGET_WANTS += \ @@ -6123,6 +6129,9 @@ GRAPHICAL_TARGET_WANTS += \
systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service
RUNLEVEL5_TARGET_WANTS += \ RESCUE_TARGET_WANTS += \
systemd-update-utmp-runlevel.service systemd-update-utmp-runlevel.service
+LOCAL_FS_TARGET_WANTS += \ +LOCAL_FS_TARGET_WANTS += \
+ var-run.mount \ + var-run.mount \
@ -37,10 +37,10 @@ Index: systemd-218/Makefile.am
endif endif
SYSINIT_TARGET_WANTS += \ SYSINIT_TARGET_WANTS += \
Index: systemd-218/units/var-lock.mount Index: systemd-221/units/var-lock.mount
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd-218/units/var-lock.mount +++ systemd-221/units/var-lock.mount
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+# This file is part of systemd. +# This file is part of systemd.
+# +#
@ -61,10 +61,10 @@ Index: systemd-218/units/var-lock.mount
+Where=/var/lock +Where=/var/lock
+Type=bind +Type=bind
+Options=bind +Options=bind
Index: systemd-218/units/var-run.mount Index: systemd-221/units/var-run.mount
=================================================================== ===================================================================
--- /dev/null --- /dev/null
+++ systemd-218/units/var-run.mount +++ systemd-221/units/var-run.mount
@@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
+# This file is part of systemd. +# This file is part of systemd.
+# +#

View File

@ -1,16 +1,18 @@
Use and set default logging console for both journald and kernel messages Use and set default logging console for both journald and kernel messages
--- ---
src/journal/journald-console.c | 96 +++++++++++++++++++++++++++++++++++++++++ src/journal/journald-console.c | 100 +++++++++++++++++++++++++++++++++++++++++
src/journal/journald-console.h | 4 + src/journal/journald-console.h | 3 +
src/journal/journald-server.c | 5 ++ src/journal/journald-server.c | 6 ++
3 files changed, 105 insertions(+) 3 files changed, 109 insertions(+)
--- systemd-219.orig/src/journal/journald-console.c Index: systemd-221/src/journal/journald-console.c
+++ systemd-219/src/journal/journald-console.c ===================================================================
@@ -23,6 +23,14 @@ --- systemd-221.orig/src/journal/journald-console.c
+++ systemd-221/src/journal/journald-console.c
@@ -22,6 +22,14 @@
#include <time.h>
#include <fcntl.h> #include <fcntl.h>
#include <unistd.h>
#include <sys/socket.h> #include <sys/socket.h>
+#ifdef HAVE_SYSV_COMPAT +#ifdef HAVE_SYSV_COMPAT
+# include <linux/tiocl.h> +# include <linux/tiocl.h>
@ -23,11 +25,11 @@ Use and set default logging console for both journald and kernel messages
#include "fileio.h" #include "fileio.h"
#include "journald-server.h" #include "journald-server.h"
@@ -43,6 +51,76 @@ static bool prefix_timestamp(void) { @@ -45,6 +53,76 @@ static bool prefix_timestamp(void) {
return cached_printk_time; return cached_printk_time;
} }
+void defaul_tty_path(Server *s) +void default_tty_path(Server *s)
+{ +{
+#ifdef HAVE_SYSV_COMPAT +#ifdef HAVE_SYSV_COMPAT
+ static const char list[] = "/dev/tty10\0" "/dev/console\0"; + static const char list[] = "/dev/tty10\0" "/dev/console\0";
@ -100,7 +102,7 @@ Use and set default logging console for both journald and kernel messages
void server_forward_console( void server_forward_console(
Server *s, Server *s,
int priority, int priority,
@@ -64,6 +142,12 @@ void server_forward_console( @@ -66,6 +144,12 @@ void server_forward_console(
if (LOG_PRI(priority) > s->max_level_console) if (LOG_PRI(priority) > s->max_level_console)
return; return;
@ -113,7 +115,7 @@ Use and set default logging console for both journald and kernel messages
/* First: timestamp */ /* First: timestamp */
if (prefix_timestamp()) { if (prefix_timestamp()) {
assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0); assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0);
@@ -100,7 +184,23 @@ void server_forward_console( @@ -102,7 +186,23 @@ void server_forward_console(
fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC); fd = open_terminal(tty, O_WRONLY|O_NOCTTY|O_CLOEXEC);
if (fd < 0) { if (fd < 0) {
log_debug_errno(errno, "Failed to open %s for logging: %m", tty); log_debug_errno(errno, "Failed to open %s for logging: %m", tty);
@ -137,22 +139,34 @@ Use and set default logging console for both journald and kernel messages
} }
if (writev(fd, iovec, n) < 0) if (writev(fd, iovec, n) < 0)
--- systemd-219.orig/src/journal/journald-console.h Index: systemd-221/src/journal/journald-console.h
+++ systemd-219/src/journal/journald-console.h ===================================================================
--- systemd-221.orig/src/journal/journald-console.h
+++ systemd-221/src/journal/journald-console.h
@@ -24,3 +24,6 @@ @@ -24,3 +24,6 @@
#include "journald-server.h" #include "journald-server.h"
void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred); void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
+ +
+void klogconsole(Server *s); +void klogconsole(Server *s);
+void defaul_tty_path(Server *s); +void default_tty_path(Server *s);
--- systemd-219.orig/src/journal/journald-server.c Index: systemd-221/src/journal/journald-server.c
+++ systemd-219/src/journal/journald-server.c ===================================================================
@@ -1520,6 +1520,11 @@ int server_init(Server *s) { --- systemd-221.orig/src/journal/journald-server.c
+++ systemd-221/src/journal/journald-server.c
@@ -52,6 +52,7 @@
#include "journal-internal.h"
#include "journal-vacuum.h"
#include "journal-authenticate.h"
+#include "journald-console.h"
#include "journald-rate-limit.h"
#include "journald-kmsg.h"
#include "journald-syslog.h"
@@ -1514,6 +1515,11 @@ int server_init(Server *s) {
server_parse_config_file(s); server_parse_config_file(s);
server_parse_proc_cmdline(s); server_parse_proc_cmdline(s);
+ defaul_tty_path(s); + default_tty_path(s);
+ +
+ if (s->tty_path) + if (s->tty_path)
+ klogconsole(s); + klogconsole(s);

View File

@ -2,12 +2,12 @@
Makefile.am | 10 +++++----- Makefile.am | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-) 1 file changed, 5 insertions(+), 5 deletions(-)
Index: systemd-218/Makefile.am Index: systemd-221/Makefile.am
=================================================================== ===================================================================
--- systemd-218.orig/Makefile.am --- systemd-221.orig/Makefile.am
+++ systemd-218/Makefile.am +++ systemd-221/Makefile.am
@@ -4209,11 +4209,11 @@ noinst_LTLIBRARIES += \ @@ -4129,11 +4129,11 @@ noinst_LTLIBRARIES += \
libsystemd-journal-core.la libjournal-core.la
journal-install-hook: journal-install-hook:
- -$(MKDIR_P) $(DESTDIR)/var/log/journal - -$(MKDIR_P) $(DESTDIR)/var/log/journal

View File

@ -7,12 +7,14 @@ This reverts commit 3cdebc217c42c8529086f2965319b6a48eaaeabe.
[Implementation note: currently, the unit is generated, but not [Implementation note: currently, the unit is generated, but not
activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de] activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
--- ---
src/sysv-generator/sysv-generator.c | 26 +++++++++++++++++++++----- src/sysv-generator/sysv-generator.c | 21 +++++++++++++++------
1 file changed, 21 insertions(+), 5 deletions(-) 1 file changed, 15 insertions(+), 6 deletions(-)
--- systemd-219.orig/src/sysv-generator/sysv-generator.c Index: systemd-221/src/sysv-generator/sysv-generator.c
+++ systemd-219/src/sysv-generator/sysv-generator.c ===================================================================
@@ -42,7 +42,8 @@ --- systemd-221.orig/src/sysv-generator/sysv-generator.c
+++ systemd-221/src/sysv-generator/sysv-generator.c
@@ -39,7 +39,8 @@
typedef enum RunlevelType { typedef enum RunlevelType {
RUNLEVEL_UP, RUNLEVEL_UP,
@ -22,7 +24,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
} RunlevelType; } RunlevelType;
static const struct { static const struct {
@@ -50,6 +51,9 @@ static const struct { @@ -47,6 +48,9 @@ static const struct {
const char *target; const char *target;
const RunlevelType type; const RunlevelType type;
} rcnd_table[] = { } rcnd_table[] = {
@ -30,9 +32,9 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
+ { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT }, + { "boot.d", SPECIAL_SYSINIT_TARGET, RUNLEVEL_SYSINIT },
+ +
/* Standard SysV runlevels for start-up */ /* Standard SysV runlevels for start-up */
{ "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP }, { "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
{ "rc2.d", SPECIAL_RUNLEVEL2_TARGET, RUNLEVEL_UP }, { "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
@@ -65,7 +69,7 @@ static const struct { @@ -62,10 +66,10 @@ static const struct {
directories in this order, and we want to make sure that directories in this order, and we want to make sure that
sysv_start_priority is known when we first load the sysv_start_priority is known when we first load the
unit. And that value we only know from S links. Hence unit. And that value we only know from S links. Hence
@ -40,17 +42,12 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
+ UP/SYSINIT must be read before DOWN */ + UP/SYSINIT must be read before DOWN */
}; };
typedef struct SysvStub {
@@ -83,7 +87,7 @@ typedef struct SysvStub {
bool reload;
} SysvStub;
-const char *arg_dest = "/tmp"; -const char *arg_dest = "/tmp";
+static const char *arg_dest = "/tmp"; +static const char *arg_dest = "/tmp";
static int add_symlink(const char *service, const char *where) { typedef struct SysvStub {
_cleanup_free_ char *from = NULL, *to = NULL; char *name;
@@ -235,6 +239,10 @@ static bool usage_contains_reload(const @@ -242,6 +246,10 @@ static bool usage_contains_reload(const
static char *sysv_translate_name(const char *name) { static char *sysv_translate_name(const char *name) {
char *r; char *r;
@ -61,7 +58,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
r = new(char, strlen(name) + strlen(".service") + 1); r = new(char, strlen(name) + strlen(".service") + 1);
if (!r) if (!r)
return NULL; return NULL;
@@ -864,10 +872,10 @@ static int set_dependencies_from_rcnd(Lo @@ -853,10 +861,10 @@ static int set_dependencies_from_rcnd(co
if (de->d_name[0] == 'S') { if (de->d_name[0] == 'S') {
@ -74,7 +71,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
r = set_ensure_allocated(&runlevel_services[i], NULL); r = set_ensure_allocated(&runlevel_services[i], NULL);
if (r < 0) if (r < 0)
@@ -878,7 +886,8 @@ static int set_dependencies_from_rcnd(Lo @@ -867,7 +875,8 @@ static int set_dependencies_from_rcnd(co
goto finish; goto finish;
} else if (de->d_name[0] == 'K' && } else if (de->d_name[0] == 'K' &&

View File

@ -10,10 +10,10 @@ configuration), needed by openSUSE (bnc#809420).
units/systemd-sysctl.service.in | 2 ++ units/systemd-sysctl.service.in | 2 ++
2 files changed, 10 insertions(+) 2 files changed, 10 insertions(+)
Index: systemd-218/src/sysctl/sysctl.c Index: systemd-221/src/sysctl/sysctl.c
=================================================================== ===================================================================
--- systemd-218.orig/src/sysctl/sysctl.c --- systemd-221.orig/src/sysctl/sysctl.c
+++ systemd-218/src/sysctl/sysctl.c +++ systemd-221/src/sysctl/sysctl.c
@@ -26,6 +26,7 @@ @@ -26,6 +26,7 @@
#include <stdio.h> #include <stdio.h>
#include <limits.h> #include <limits.h>
@ -22,7 +22,7 @@ Index: systemd-218/src/sysctl/sysctl.c
#include "log.h" #include "log.h"
#include "strv.h" #include "strv.h"
@@ -310,6 +311,13 @@ int main(int argc, char *argv[]) { @@ -264,6 +265,13 @@ int main(int argc, char *argv[]) {
} else { } else {
_cleanup_strv_free_ char **files = NULL; _cleanup_strv_free_ char **files = NULL;
char **f; char **f;
@ -36,10 +36,10 @@ Index: systemd-218/src/sysctl/sysctl.c
r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs); r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
if (r < 0) { if (r < 0) {
Index: systemd-218/units/systemd-sysctl.service.in Index: systemd-221/units/systemd-sysctl.service.in
=================================================================== ===================================================================
--- systemd-218.orig/units/systemd-sysctl.service.in --- systemd-221.orig/units/systemd-sysctl.service.in
+++ systemd-218/units/systemd-sysctl.service.in +++ systemd-221/units/systemd-sysctl.service.in
@@ -13,6 +13,8 @@ Conflicts=shutdown.target @@ -13,6 +13,8 @@ Conflicts=shutdown.target
After=systemd-modules-load.service After=systemd-modules-load.service
Before=sysinit.target shutdown.target Before=sysinit.target shutdown.target

View File

@ -6,11 +6,11 @@ This solves the bug bnc#868439
man/systemctl.xml | 4 +++- man/systemctl.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-) 1 file changed, 3 insertions(+), 1 deletion(-)
Index: systemd/man/systemctl.xml Index: systemd-221/man/systemctl.xml
=================================================================== ===================================================================
--- systemd.orig/man/systemctl.xml --- systemd-221.orig/man/systemctl.xml
+++ systemd/man/systemctl.xml +++ systemd-221/man/systemctl.xml
@@ -445,7 +445,7 @@ along with systemd; If not, see <http:// @@ -439,7 +439,7 @@
<term><option>--force</option></term> <term><option>--force</option></term>
<listitem> <listitem>
@ -19,7 +19,7 @@ Index: systemd/man/systemctl.xml
any existing conflicting symlinks.</para> any existing conflicting symlinks.</para>
<para>When used with <command>halt</command>, <para>When used with <command>halt</command>,
@@ -1215,6 +1215,8 @@ kobject-uevent 1 systemd-udevd-kernel.so @@ -1237,6 +1237,8 @@ kobject-uevent 1 systemd-udevd-kernel.so
<para>Return the default target to boot into. This returns <para>Return the default target to boot into. This returns
the target unit name <filename>default.target</filename> the target unit name <filename>default.target</filename>
is aliased (symlinked) to.</para> is aliased (symlinked) to.</para>

View File

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

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

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

View File

@ -1,13 +1,13 @@
--- ---
man/tmpfiles.d.xml | 3 +++ man/tmpfiles.d.xml | 3 +++
src/tmpfiles/tmpfiles.c | 48 ++++++++++++++++++++++++++++++++++++++++-------- src/tmpfiles/tmpfiles.c | 47 ++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 43 insertions(+), 8 deletions(-) 2 files changed, 43 insertions(+), 7 deletions(-)
Index: systemd/man/tmpfiles.d.xml Index: systemd-221/man/tmpfiles.d.xml
=================================================================== ===================================================================
--- systemd.orig/man/tmpfiles.d.xml --- systemd-221.orig/man/tmpfiles.d.xml
+++ systemd/man/tmpfiles.d.xml +++ systemd-221/man/tmpfiles.d.xml
@@ -489,6 +489,9 @@ @@ -528,6 +528,9 @@
<varname>f</varname>, <varname>F</varname>, and <varname>f</varname>, <varname>F</varname>, and
<varname>w</varname> may be used to specify a short string that <varname>w</varname> may be used to specify a short string that
is written to the file, suffixed by a newline. For is written to the file, suffixed by a newline. For
@ -15,13 +15,21 @@ Index: systemd/man/tmpfiles.d.xml
+ usernames. If given, only paths belonging to these users will be excluded + usernames. If given, only paths belonging to these users will be excluded
+ during directory cleanup. Ignored for all other lines. For + during directory cleanup. Ignored for all other lines. For
<varname>C</varname>, specifies the source file or <varname>C</varname>, specifies the source file or
directory. For <varname>t</varname> determines extended directory. For <varname>t</varname>, <varname>T</varname>
attributes to be set. For <varname>a</varname> determines determines extended attributes to be set. For
Index: systemd/src/tmpfiles/tmpfiles.c Index: systemd-221/src/tmpfiles/tmpfiles.c
=================================================================== ===================================================================
--- systemd.orig/src/tmpfiles/tmpfiles.c --- systemd-221.orig/src/tmpfiles/tmpfiles.c
+++ systemd/src/tmpfiles/tmpfiles.c +++ systemd-221/src/tmpfiles/tmpfiles.c
@@ -345,6 +345,7 @@ static int dir_cleanup( @@ -37,6 +37,7 @@
#include <sys/stat.h>
#include <sys/xattr.h>
#include <linux/fs.h>
+#include <pwd.h>
#include "log.h"
#include "util.h"
@@ -358,6 +359,7 @@ static int dir_cleanup(
struct timespec times[2]; struct timespec times[2];
bool deleted = false; bool deleted = false;
int r = 0; int r = 0;
@ -29,24 +37,23 @@ Index: systemd/src/tmpfiles/tmpfiles.c
while ((dent = readdir(d))) { while ((dent = readdir(d))) {
struct stat s; struct stat s;
@@ -395,14 +396,45 @@ static int dir_cleanup( @@ -408,14 +410,45 @@ static int dir_cleanup(
} }
/* Is there an item configured for this path? */ /* Is there an item configured for this path? */
- if (hashmap_get(items, sub_path)) { - if (ordered_hashmap_get(items, sub_path)) {
- log_debug("Ignoring \"%s\": a separate entry exists.", sub_path); - log_debug("Ignoring \"%s\": a separate entry exists.", sub_path);
- continue; - continue;
- } + bool found_glob = false;
+ found = ordered_hashmap_get(items, sub_path);
+ if (!found) {
+ found_glob = true;
+ found = find_glob(globs, sub_path);
}
- -
- if (find_glob(globs, sub_path)) { - if (find_glob(globs, sub_path)) {
- log_debug("Ignoring \"%s\": a separate glob exists.", sub_path); - log_debug("Ignoring \"%s\": a separate glob exists.", sub_path);
- continue; - continue;
+ bool found_glob = false;
+ found = hashmap_get(items, sub_path);
+ if (!found) {
+ found_glob = true;
+ found = find_glob(globs, sub_path);
+ }
+ if (found) { + if (found) {
+ struct passwd *pw; + struct passwd *pw;
+ char *userfound = NULL, *args; + char *userfound = NULL, *args;

View File

@ -1,13 +1,26 @@
--- ---
src/basic/def.h | 2 +-
src/libsystemd/sd-bus/sd-bus.c | 4 ++-- src/libsystemd/sd-bus/sd-bus.c | 4 ++--
src/shared/def.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-) 2 files changed, 3 insertions(+), 3 deletions(-)
Index: systemd/src/libsystemd/sd-bus/sd-bus.c Index: systemd-221/src/basic/def.h
=================================================================== ===================================================================
--- systemd.orig/src/libsystemd/sd-bus/sd-bus.c --- systemd-221.orig/src/basic/def.h
+++ systemd/src/libsystemd/sd-bus/sd-bus.c +++ systemd-221/src/basic/def.h
@@ -809,8 +809,8 @@ static int parse_container_unix_address( @@ -61,7 +61,7 @@
"/usr/lib/kbd/keymaps/\0"
#endif
-#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
+#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
#define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
#define DEFAULT_SYSTEM_BUS_ADDRESS KERNEL_SYSTEM_BUS_ADDRESS ";" UNIX_SYSTEM_BUS_ADDRESS
#define UNIX_USER_BUS_ADDRESS_FMT "unix:path=%s/bus"
Index: systemd-221/src/libsystemd/sd-bus/sd-bus.c
===================================================================
--- systemd-221.orig/src/libsystemd/sd-bus/sd-bus.c
+++ systemd-221/src/libsystemd/sd-bus/sd-bus.c
@@ -837,8 +837,8 @@ static int parse_container_unix_address(
b->nspid = 0; b->nspid = 0;
b->sockaddr.un.sun_family = AF_UNIX; b->sockaddr.un.sun_family = AF_UNIX;
@ -18,16 +31,3 @@ Index: systemd/src/libsystemd/sd-bus/sd-bus.c
return 0; return 0;
} }
Index: systemd/src/shared/def.h
===================================================================
--- systemd.orig/src/shared/def.h
+++ systemd/src/shared/def.h
@@ -61,7 +61,7 @@
"/usr/lib/kbd/keymaps/\0"
#endif
-#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/var/run/dbus/system_bus_socket"
+#define UNIX_SYSTEM_BUS_ADDRESS "unix:path=/run/dbus/system_bus_socket"
#define KERNEL_SYSTEM_BUS_ADDRESS "kernel:path=/sys/fs/kdbus/0-system/bus"
#ifdef ENABLE_KDBUS

View File

@ -1,6 +1,12 @@
--- a/Makefile.am ---
+++ b/Makefile.am Makefile.am | 12 ++++++------
@@ -4560,12 +4560,6 @@ lib_LTLIBRARIES += \ 1 file changed, 6 insertions(+), 6 deletions(-)
Index: systemd-221/Makefile.am
===================================================================
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -5876,12 +5876,6 @@ lib_LTLIBRARIES += \
libsystemd-id128.la \ libsystemd-id128.la \
libsystemd-daemon.la libsystemd-daemon.la
@ -13,7 +19,7 @@
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed # move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
compat-lib-install-hook: compat-lib-install-hook:
libname=libsystemd-login.so && $(move-to-rootlibdir) libname=libsystemd-login.so && $(move-to-rootlibdir)
@@ -4583,6 +4577,12 @@ INSTALL_EXEC_HOOKS += compat-lib-install @@ -5899,6 +5893,12 @@ INSTALL_EXEC_HOOKS += compat-lib-install
UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook UNINSTALL_EXEC_HOOKS += compat-lib-uninstall-hook
endif endif
@ -24,5 +30,5 @@
+ src/compat-libs/libsystemd-daemon.pc + src/compat-libs/libsystemd-daemon.pc
+ +
EXTRA_DIST += \ EXTRA_DIST += \
src/compat-libs/linkwarning.h \
src/compat-libs/libsystemd-journal.pc.in \ src/compat-libs/libsystemd-journal.pc.in \
src/compat-libs/libsystemd-login.pc.in \

View File

@ -1,3 +1,47 @@
-------------------------------------------------------------------
Fri Jun 19 20:51:14 UTC 2015 - jengelh@inai.de
- Update to new upstream release 221
* From 220:
* libgudev was moved into a package of its own
* Runlevels 2, 3 and 4 are no longer distinct, they all map to
multi-user.target.
* The EFI System Partition mounted to /boot will be unmounted
2 minutes after boot.
* systemd does not support direct live-upgrades (via `systemctl
daemon-reexec`) from versions older than v44 anymore.
* systemd-nspawn may now be called as part of a shell pipeline.
* systemd-shutdownd has been removed. This service was
previously responsible for implementing scheduled shutdowns
as exposed in /usr/bin/shutdown's time parameter. This
functionality has now been moved into systemd-logind and is
accessible via a bus interface.
* udev will no longer call blkid and create symlinks for all
block devices, but merely those from a whitelist
(cf. 60-persistent-storage.rules).
* /usr/lib/os-release gained a new optional field VARIANT=
* Details at
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032147.html
* From 221:
* New sd-bus and sd-event APIs in libsystemd
* If there is both a systemd unit and a SysV init script for the
same service name, and `systemctl enable` or other operation is
run, both will now be enabled (or execute the related operation
on both), not just the unit.
- Split libsystemd0 to support systemd-less nspawn containers
- Redo manpage file lists without %exclude, tends to hide
unpackaged files.
- hwdb belongs to udev
- Resolve memory leak and add missing _cleanup_free_ to
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
- Remove systemd-powerd-initctl-support.patch
(no longer builds because shutdownd is gone)
- Remove quilt-patches/0001-core-rework-device-state-logic.patch,
0001-Let-some-boolean-survive-a-daemon-reload.patch
(merged upstream),
0001-Let-some-boolean-survive-a-daemon-reload.patch
(obsolete)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 11 14:48:03 UTC 2015 - werner@suse.de Thu Jun 11 14:48:03 UTC 2015 - werner@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package systemd-mini # spec file for package systemd-mini
# #
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -46,7 +46,7 @@
Name: systemd-mini Name: systemd-mini
Url: http://www.freedesktop.org/wiki/Software/systemd Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 219 Version: 221
Release: 0 Release: 0
Summary: A System and Session Manager Summary: A System and Session Manager
License: LGPL-2.1+ License: LGPL-2.1+
@ -61,7 +61,6 @@ BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gperf BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libcap-devel BuildRequires: libcap-devel
@ -90,8 +89,6 @@ Conflicts: systemd
Conflicts: kiwi Conflicts: kiwi
%else %else
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc
BuildRequires: libgcrypt-devel BuildRequires: libgcrypt-devel
BuildRequires: libusb-devel BuildRequires: libusb-devel
BuildRequires: libxslt-tools BuildRequires: libxslt-tools
@ -117,7 +114,7 @@ BuildRequires: pam-config >= 0.79-5
Requires: pwdutils Requires: pwdutils
Requires: systemd-presets-branding Requires: systemd-presets-branding
Requires: sysvinit-tools Requires: sysvinit-tools
Requires: util-linux >= 2.25 Requires: util-linux >= 2.26
Requires(post): coreutils Requires(post): coreutils
Requires(post): findutils Requires(post): findutils
Requires(post): pam-config >= 0.79-5 Requires(post): pam-config >= 0.79-5
@ -206,8 +203,6 @@ Patch180: 0014-journald-with-journaling-FS.patch
Patch182: 0019-make-completion-smart-to-be-able-to-redirect.patch Patch182: 0019-make-completion-smart-to-be-able-to-redirect.patch
# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com # PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com
Patch183: 0001-add-network-device-after-NFS-mount-units.patch Patch183: 0001-add-network-device-after-NFS-mount-units.patch
# PATCH-FIX-SUSE systemd-powerd-initctl-support.patch
Patch185: systemd-powerd-initctl-support.patch
# PATCH-FIX-SUSE systemctl-set-default-target.patch # PATCH-FIX-SUSE systemctl-set-default-target.patch
Patch186: systemctl-set-default-target.patch Patch186: systemctl-set-default-target.patch
# PATCH-FIX-SUSE boot-local-start.patch (bnc #869142) # PATCH-FIX-SUSE boot-local-start.patch (bnc #869142)
@ -253,9 +248,6 @@ Patch490: watch_resolv.conf_for_become_changed.patch
Patch520: systemd-add-user-keep.patch Patch520: systemd-add-user-keep.patch
# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) # PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009)
Patch521: kbd-model-map.patch Patch521: kbd-model-map.patch
Patch522: 0001-core-rework-device-state-logic.patch
# PATCH-FIX-SUSE/PATCH-FIX-UPSTREAM
Patch523: 0001-Let-some-boolean-survive-a-daemon-reload.patch
# UDEV PATCHES # UDEV PATCHES
# ============ # ============
@ -330,7 +322,7 @@ Some systemd commands offer bash completion, but it's an optional dependency.
Summary: Development headers for systemd Summary: Development headers for systemd
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version} Requires: libsystemd0 = %version
Requires: systemd-rpm-macros Requires: systemd-rpm-macros
%if 0%{?bootstrap} %if 0%{?bootstrap}
Conflicts: systemd-devel Conflicts: systemd-devel
@ -351,6 +343,32 @@ Provides: sysvinit:/sbin/init
%description sysvinit %description sysvinit
Drop-in replacement of System V init tools. Drop-in replacement of System V init tools.
%package -n libsystemd0
Summary: Component library for systemd
License: LGPL-2.1+
Group: System/Libraries
%description -n libsystemd0
This library provides several of the systemd C APIs:
* sd-bus implements an alternative D-Bus client library that is
relatively easy to use, very efficient and supports both classic
D-Bus as well as kdbus as transport backend.
* sd-daemon(3): for system services (daemons) to report their status
to systemd and to make easy use of socket-based activation logic
* sd-event is a generic event loop abstraction that is built around
Linux epoll, but adds features such as event prioritization or
efficient timer handling.
* sd-id128(3): generation and processing of 128-bit IDs
* sd-journal(3): API to submit and query journal log entries
* sd-login(3): APIs to introspect and monitor seat, login session and
user status information on the local system.
%package -n %{udevpkgname} %package -n %{udevpkgname}
Summary: A rule-based device node and kernel event manager Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
@ -432,38 +450,6 @@ This package contains the development files for the library libudev, a
dynamic library, which provides access to udev device information. dynamic library, which provides access to udev device information.
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%package -n libgudev-1_0-0
Summary: GObject library, to access udev device information
License: LGPL-2.1+
Group: System/Libraries
Requires: lib%{udevpkgname}%{udev_major} = %{version}-%{release}
%description -n libgudev-1_0-0
This package contains the GObject library libgudev, which provides
access to udev device information.
%package -n typelib-1_0-GUdev-1_0
Summary: GObject library, to access udev device information -- Introspection bindings
License: LGPL-2.1+
Group: System/Libraries
%description -n typelib-1_0-GUdev-1_0
This package provides the GObject Introspection bindings for libgudev, which
provides access to udev device information.
%package -n libgudev-1_0-devel
Summary: Devel package for libgudev
License: LGPL-2.1+
Group: Development/Libraries/Other
Requires: glib2-devel
Requires: libgudev-1_0-0 = %{version}-%{release}
Requires: libudev-devel = %{version}-%{release}
Requires: typelib-1_0-GUdev-1_0 = %{version}-%{release}
%description -n libgudev-1_0-devel
This is the devel package for the GObject library libgudev, which
provides GObject access to udev device information.
%package logger %package logger
Summary: Journal only logging Summary: Journal only logging
License: LGPL-2.1+ License: LGPL-2.1+
@ -580,7 +566,6 @@ cp %{SOURCE7} m4/
%patch180 -p1 %patch180 -p1
%patch182 -p1 %patch182 -p1
%patch183 -p1 %patch183 -p1
%patch185 -p1
%patch186 -p1 %patch186 -p1
%patch188 -p1 %patch188 -p1
%patch189 -p1 %patch189 -p1
@ -607,8 +592,6 @@ cp %{SOURCE7} m4/
%patch490 -p1 %patch490 -p1
%patch520 -p1 %patch520 -p1
%patch521 -p1 %patch521 -p1
%patch522 -p1
%patch523 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1
@ -713,7 +696,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
--with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \
--with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \
%if 0%{?bootstrap} %if 0%{?bootstrap}
--disable-gudev \
--disable-myhostname \ --disable-myhostname \
--disable-manpages \ --disable-manpages \
--disable-machined \ --disable-machined \
@ -722,7 +704,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
%if %{with python} %if %{with python}
--with-python \ --with-python \
%endif %endif
--enable-gtk-doc \
--with-nss-my-hostname-warning \ --with-nss-my-hostname-warning \
%endif %endif
--enable-selinux \ --enable-selinux \
@ -1079,16 +1060,13 @@ fi
%regenerate_initrd_posttrans %regenerate_initrd_posttrans
%endif %endif
%post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %post -n libsystemd0 -p /sbin/ldconfig
%postun -n libsystemd0 -p /sbin/ldconfig
%post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig
%postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%post -n libgudev-1_0-0 -p /sbin/ldconfig
%postun -n libgudev-1_0-0 -p /sbin/ldconfig
%if %{with permission} %if %{with permission}
%verifyscript logger %verifyscript logger
%verify_permissions -e %{_localstatedir}/log/journal/ %verify_permissions -e %{_localstatedir}/log/journal/
@ -1164,7 +1142,6 @@ exit 0
%{_bindir}/systemd-path %{_bindir}/systemd-path
%{_bindir}/systemd-sysusers %{_bindir}/systemd-sysusers
%{_bindir}/systemd-notify %{_bindir}/systemd-notify
%{_bindir}/systemd-hwdb
%{_bindir}/systemd-run %{_bindir}/systemd-run
%{_bindir}/systemd-journalctl %{_bindir}/systemd-journalctl
%{_bindir}/journalctl %{_bindir}/journalctl
@ -1180,13 +1157,6 @@ exit 0
%{_bindir}/systemd-detect-virt %{_bindir}/systemd-detect-virt
%{_bindir}/timedatectl %{_bindir}/timedatectl
%{_sbindir}/systemd-sysv-convert %{_sbindir}/systemd-sysv-convert
%{_libdir}/libsystemd.so.*
%if %{with compat_libs}
%{_libdir}/libsystemd-daemon.so.*
%{_libdir}/libsystemd-login.so.*
%{_libdir}/libsystemd-id128.so.*
%{_libdir}/libsystemd-journal.so.*
%endif
%{_bindir}/systemd-cgls %{_bindir}/systemd-cgls
%{_bindir}/systemd-cgtop %{_bindir}/systemd-cgtop
%{_bindir}/systemd-cat %{_bindir}/systemd-cat
@ -1217,6 +1187,7 @@ exit 0
%{_prefix}/lib/systemd/system/*.path %{_prefix}/lib/systemd/system/*.path
%{_prefix}/lib/systemd/user/*.target %{_prefix}/lib/systemd/user/*.target
%{_prefix}/lib/systemd/user/*.service %{_prefix}/lib/systemd/user/*.service
%{_prefix}/lib/systemd/user/*.socket
%exclude %{_prefix}/lib/systemd/systemd-udevd %exclude %{_prefix}/lib/systemd/systemd-udevd
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd %exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd
@ -1231,6 +1202,7 @@ exit 0
%dir %{_prefix}/lib/systemd/user-preset %dir %{_prefix}/lib/systemd/user-preset
%dir %{_prefix}/lib/systemd/system-generators %dir %{_prefix}/lib/systemd/system-generators
%dir %{_prefix}/lib/systemd/user-generators %dir %{_prefix}/lib/systemd/user-generators
%{_prefix}/lib/systemd/user-generators/systemd-dbus1-generator
%dir %{_prefix}/lib/systemd/ntp-units.d/ %dir %{_prefix}/lib/systemd/ntp-units.d/
%dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-shutdown/
%dir %{_prefix}/lib/systemd/system-sleep/ %dir %{_prefix}/lib/systemd/system-sleep/
@ -1241,6 +1213,7 @@ exit 0
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator
%endif %endif
%{_prefix}/lib/systemd/system-generators/systemd-dbus1-generator
%if 0%{has_efi} %if 0%{has_efi}
%{_bindir}/bootctl %{_bindir}/bootctl
%{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator
@ -1307,6 +1280,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
%{_sysconfdir}/X11/xinit/
# Some files which may created by us # Some files which may created by us
%dir %{_sysconfdir}/X11/xorg.conf.d %dir %{_sysconfdir}/X11/xorg.conf.d
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
@ -1322,15 +1296,23 @@ exit 0
%{_datadir}/factory/ %{_datadir}/factory/
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%if %{with networkd} %if %{with networkd}
%{_prefix}/lib/systemd/system/org.freedesktop.network1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.network1.service %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service
%endif %endif
%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
%{_prefix}/lib/systemd/system/org.freedesktop.locale1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
%{_prefix}/lib/systemd/system/org.freedesktop.hostname1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
%if !0%{?bootstrap} %if !0%{?bootstrap}
%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
%endif %endif
%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
%dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions %dir %{_datadir}/polkit-1/actions
@ -1348,20 +1330,20 @@ exit 0
%{_datadir}/systemd %{_datadir}/systemd
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
# Packaged in sysvinit subpackage %_mandir/man1/[a-rt-z]*ctl.1*
%exclude %{_mandir}/man1/init.1* %_mandir/man1/systemc*.1*
%exclude %{_mandir}/man8/halt.8* %_mandir/man1/systemd*.1*
%exclude %{_mandir}/man8/reboot.8* %_mandir/man5/[a-tv-z]*
%exclude %{_mandir}/man8/shutdown.8* %_mandir/man5/user*
%exclude %{_mandir}/man8/poweroff.8* %_mandir/man7/[bdfks]*
%exclude %{_mandir}/man8/telinit.8* %_mandir/man8/kern*
%exclude %{_mandir}/man8/runlevel.8* %_mandir/man8/pam_*
%exclude %{_mandir}/man*/*udev*.[0-9]* %_mandir/man8/systemd-[a-gik-tv]*
%exclude %{_mandir}/man8/systemd-journal-gatewayd.* %_mandir/man8/systemd-h[aioy]*
%{_mandir}/man1/*.1* %_mandir/man8/systemd-journal-remote.*
%{_mandir}/man5/*.5* %_mandir/man8/systemd-journal-upload.*
%{_mandir}/man7/*.7* %_mandir/man8/systemd-journald*
%{_mandir}/man8/*.8* %_mandir/man8/systemd-u[ps]*
%endif %endif
%{_docdir}/systemd %{_docdir}/systemd
%{_prefix}/lib/udev/rules.d/70-uaccess.rules %{_prefix}/lib/udev/rules.d/70-uaccess.rules
@ -1408,21 +1390,16 @@ exit 0
%{_libdir}/libsystemd-login.so %{_libdir}/libsystemd-login.so
%{_libdir}/libsystemd-id128.so %{_libdir}/libsystemd-id128.so
%{_libdir}/libsystemd-journal.so %{_libdir}/libsystemd-journal.so
%dir %{_includedir}/systemd %{_includedir}/systemd/
%{_includedir}/systemd/sd-login.h %{_datadir}/pkgconfig/systemd.pc
%{_includedir}/systemd/sd-daemon.h
%{_includedir}/systemd/sd-id128.h
%{_includedir}/systemd/sd-journal.h
%{_includedir}/systemd/sd-messages.h
%{_includedir}/systemd/_sd-common.h
%{_libdir}/pkgconfig/systemd.pc
%{_libdir}/pkgconfig/libsystemd.pc %{_libdir}/pkgconfig/libsystemd.pc
%{_libdir}/pkgconfig/libsystemd-daemon.pc %{_libdir}/pkgconfig/libsystemd-daemon.pc
%{_libdir}/pkgconfig/libsystemd-login.pc %{_libdir}/pkgconfig/libsystemd-login.pc
%{_libdir}/pkgconfig/libsystemd-id128.pc %{_libdir}/pkgconfig/libsystemd-id128.pc
%{_libdir}/pkgconfig/libsystemd-journal.pc %{_libdir}/pkgconfig/libsystemd-journal.pc
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_mandir}/man3/*.3* %_mandir/man3/SD*.3*
%_mandir/man3/sd*.3*
%endif %endif
%files sysvinit %files sysvinit
@ -1454,6 +1431,7 @@ exit 0
%if 0%{?suse_version} <= 1310 %if 0%{?suse_version} <= 1310
%{_prefix}/lib/firmware %{_prefix}/lib/firmware
%endif %endif
%{_bindir}/systemd-hwdb
%dir %{_prefix}/lib/udev/ %dir %{_prefix}/lib/udev/
%{_prefix}/lib/udev/accelerometer %{_prefix}/lib/udev/accelerometer
%{_prefix}/lib/udev/ata_id %{_prefix}/lib/udev/ata_id
@ -1472,14 +1450,18 @@ exit 0
%exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules %exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules
%exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules
%{_prefix}/lib/udev/rules.d/*.rules %{_prefix}/lib/udev/rules.d/*.rules
%dir %{_prefix}/lib/udev/hwdb.d %{_prefix}/lib/udev/hwdb.d/
%{_prefix}/lib/udev/hwdb.d/*
%dir %{_sysconfdir}/udev/ %dir %{_sysconfdir}/udev/
%dir %{_sysconfdir}/udev/rules.d/ %dir %{_sysconfdir}/udev/rules.d/
%ghost %{_sysconfdir}/udev/hwdb.bin %ghost %{_sysconfdir}/udev/hwdb.bin
%config(noreplace) %{_sysconfdir}/udev/udev.conf %config(noreplace) %{_sysconfdir}/udev/udev.conf
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_mandir}/man?/*udev*.[0-9]* %_mandir/man5/udev*
%_mandir/man7/hwdb*
%_mandir/man7/udev*
%_mandir/man8/systemd-hwdb*
%_mandir/man8/systemd-udev*
%_mandir/man8/udev*
%endif %endif
%dir %{_prefix}/lib/systemd/system %dir %{_prefix}/lib/systemd/system
%{_prefix}/lib/systemd/systemd-udevd %{_prefix}/lib/systemd/systemd-udevd
@ -1496,6 +1478,16 @@ exit 0
%{_datadir}/pkgconfig/udev.pc %{_datadir}/pkgconfig/udev.pc
%endif %endif
%files -n libsystemd0
%defattr(-,root,root)
%_libdir/libsystemd.so.*
%if %{with compat_libs}
%_libdir/libsystemd-daemon.so.*
%_libdir/libsystemd-login.so.*
%_libdir/libsystemd-id128.so.*
%_libdir/libsystemd-journal.so.*
%endif
%files -n lib%{udevpkgname}%{udev_major} %files -n lib%{udevpkgname}%{udev_major}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libudev.so.* %{_libdir}/libudev.so.*
@ -1505,35 +1497,9 @@ exit 0
%{_includedir}/libudev.h %{_includedir}/libudev.h
%{_libdir}/libudev.so %{_libdir}/libudev.so
%{_libdir}/pkgconfig/libudev.pc %{_libdir}/pkgconfig/libudev.pc
%if ! 0%{?bootstrap} %{_mandir}/man3/*udev*.3*
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/libudev
%{_datadir}/gtk-doc/html/libudev/*
%endif
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%files -n libgudev-1_0-0
%defattr(-,root,root)
%{_libdir}/libgudev-1.0.so.*
%files -n typelib-1_0-GUdev-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GUdev-1.0.typelib
%files -n libgudev-1_0-devel
%defattr(-,root,root)
%dir %{_includedir}/gudev-1.0
%dir %{_includedir}/gudev-1.0/gudev
%{_includedir}/gudev-1.0/gudev/*.h
%{_libdir}/libgudev-1.0.so
%{_libdir}/pkgconfig/gudev-1.0.pc
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/gudev
%{_datadir}/gtk-doc/html/gudev/*
%{_datadir}/gir-1.0/GUdev-1.0.gir
%files logger %files logger
%defattr(-,root,root) %defattr(-,root,root)
%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/ %dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/
@ -1544,6 +1510,8 @@ exit 0
%files -n nss-myhostname %files -n nss-myhostname
%defattr(-, root, root) %defattr(-, root, root)
%{_sbindir}/nss-myhostname-config %{_sbindir}/nss-myhostname-config
%{_mandir}/man8/libnss_myhostname.*
%{_mandir}/man8/nss-myhostname.*
/%{_lib}/*nss_myhostname* /%{_lib}/*nss_myhostname*
%files journal-gateway %files journal-gateway
@ -1556,6 +1524,8 @@ exit 0
%files -n nss-mymachines %files -n nss-mymachines
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libnss_mymachines.so* %_libdir/libnss_mymachines.so*
%_mandir/man8/libnss_mymachines.*
%_mandir/man8/nss-mymachines.*
%endif %endif
%changelog %changelog

View File

@ -2,10 +2,10 @@
src/login/systemd-user | 4 ++-- src/login/systemd-user | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-) 1 file changed, 2 insertions(+), 2 deletions(-)
Index: systemd-218/src/login/systemd-user Index: systemd-221/src/login/systemd-user
=================================================================== ===================================================================
--- systemd-218.orig/src/login/systemd-user --- systemd-221.orig/src/login/systemd-user
+++ systemd-218/src/login/systemd-user +++ systemd-221/src/login/systemd-user
@@ -2,5 +2,5 @@ @@ -2,5 +2,5 @@
# #
# Used by systemd --user instances. # Used by systemd --user instances.

View File

@ -1,121 +0,0 @@
From 7b8b1ca177a532a6673e5795af867b3631622391 Mon Sep 17 00:00:00 2001
From: Hannes Reinecke <hare@suse.de>
Date: Fri, 7 Mar 2014 14:04:58 +0100
Subject: [PATCH] systemd: powerd initctl support
Old versions of powerd will be using the initctl fifo to signal
state changes. To maintain backward compability systemd should
be interpreting these messages, too.
Signed-off-by: Hannes Reinecke <hare@suse.de>
---
src/initctl/initctl.c | 71 ++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 70 insertions(+), 1 deletion(-)
--- systemd-219.orig/src/initctl/initctl.c
+++ systemd-219/src/initctl/initctl.c
@@ -32,8 +32,11 @@
#include <sys/un.h>
#include <fcntl.h>
#include <ctype.h>
+#include <sys/reboot.h>
+#include <linux/reboot.h>
#include "sd-daemon.h"
+#include "sd-shutdown.h"
#include "sd-bus.h"
#include "util.h"
@@ -44,6 +47,7 @@
#include "bus-util.h"
#include "bus-error.h"
#include "def.h"
+#include "socket-util.h"
#define SERVER_FD_MAX 16
#define TIMEOUT_MSEC ((int) (DEFAULT_EXIT_USEC/USEC_PER_MSEC))
@@ -141,7 +145,54 @@ static void change_runlevel(Server *s, i
}
}
+static int send_shutdownd(unsigned delay, char mode, const char *message) {
+#ifdef HAVE_SYSV_COMPAT
+ usec_t t = now(CLOCK_REALTIME) + delay * USEC_PER_MINUTE;
+ struct sd_shutdown_command c = {
+ .usec = t,
+ .mode = mode,
+ .dry_run = false,
+ .warn_wall = true,
+ };
+
+ union sockaddr_union sockaddr = {
+ .un.sun_family = AF_UNIX,
+ .un.sun_path = "/run/systemd/shutdownd",
+ };
+
+ struct iovec iovec[2] = {{
+ .iov_base = (char*) &c,
+ .iov_len = offsetof(struct sd_shutdown_command, wall_message),
+ }};
+
+ struct msghdr msghdr = {
+ .msg_name = &sockaddr,
+ .msg_namelen = offsetof(struct sockaddr_un, sun_path)
+ + sizeof("/run/systemd/shutdownd") - 1,
+ .msg_iov = iovec,
+ .msg_iovlen = 1,
+ };
+
+ _cleanup_close_ int fd;
+
+ fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
+ if (fd < 0)
+ return -errno;
+
+ if (!isempty(message)) {
+ iovec[1].iov_base = (char*) message;
+ iovec[1].iov_len = strlen(message);
+ msghdr.msg_iovlen++;
+ }
+
+ if (sendmsg(fd, &msghdr, MSG_NOSIGNAL) < 0)
+ return -errno;
+#endif
+ return 0;
+}
+
static void request_process(Server *s, const struct init_request *req) {
+ int r;
assert(s);
assert(req);
@@ -184,9 +235,28 @@ static void request_process(Server *s, c
return;
case INIT_CMD_POWERFAIL:
+ r = send_shutdownd(2, SD_SHUTDOWN_POWEROFF,
+ "THE POWER IS FAILED! SYSTEM GOING DOWN! PLEASE LOG OFF NOW!");
+ if (r < 0) {
+ log_warning("Failed to talk to shutdownd, shutdown cancelled: %s", strerror(-r));
+ }
+ return;
case INIT_CMD_POWERFAILNOW:
+ r = send_shutdownd(0, SD_SHUTDOWN_POWEROFF,
+ "THE POWER IS FAILED! LOW BATTERY - EMERGENCY SYSTEM SHUTDOWN!");
+ if (r < 0) {
+ log_warning("Failed to talk to shutdownd, proceeding with immediate shutdown: %s", strerror(-r));
+ reboot(RB_ENABLE_CAD);
+ reboot(RB_POWER_OFF);
+ }
+ return;
+
case INIT_CMD_POWEROK:
- log_warning("Received UPS/power initctl request. This is not implemented in systemd. Upgrade your UPS daemon!");
+ r = send_shutdownd(0, SD_SHUTDOWN_NONE,
+ "THE POWER IS BACK");
+ if (r < 0) {
+ log_warning("Failed to talk to shutdownd, proceeding with shutdown: %s", strerror(-r));
+ }
return;
case INIT_CMD_CHANGECONS:

View File

@ -8,10 +8,10 @@ SUSE policy is to not clean /tmp by default.
tmpfiles.d/tmp.conf | 5 +++-- tmpfiles.d/tmp.conf | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-) 1 file changed, 3 insertions(+), 2 deletions(-)
Index: systemd/tmpfiles.d/tmp.conf Index: systemd-221/tmpfiles.d/tmp.conf
=================================================================== ===================================================================
--- systemd.orig/tmpfiles.d/tmp.conf --- systemd-221.orig/tmpfiles.d/tmp.conf
+++ systemd/tmpfiles.d/tmp.conf +++ systemd-221/tmpfiles.d/tmp.conf
@@ -8,8 +8,9 @@ @@ -8,8 +8,9 @@
# See tmpfiles.d(5) for details # See tmpfiles.d(5) for details

View File

@ -1,3 +1,47 @@
-------------------------------------------------------------------
Fri Jun 19 20:51:14 UTC 2015 - jengelh@inai.de
- Update to new upstream release 221
* From 220:
* libgudev was moved into a package of its own
* Runlevels 2, 3 and 4 are no longer distinct, they all map to
multi-user.target.
* The EFI System Partition mounted to /boot will be unmounted
2 minutes after boot.
* systemd does not support direct live-upgrades (via `systemctl
daemon-reexec`) from versions older than v44 anymore.
* systemd-nspawn may now be called as part of a shell pipeline.
* systemd-shutdownd has been removed. This service was
previously responsible for implementing scheduled shutdowns
as exposed in /usr/bin/shutdown's time parameter. This
functionality has now been moved into systemd-logind and is
accessible via a bus interface.
* udev will no longer call blkid and create symlinks for all
block devices, but merely those from a whitelist
(cf. 60-persistent-storage.rules).
* /usr/lib/os-release gained a new optional field VARIANT=
* Details at
http://lists.freedesktop.org/archives/systemd-devel/2015-May/032147.html
* From 221:
* New sd-bus and sd-event APIs in libsystemd
* If there is both a systemd unit and a SysV init script for the
same service name, and `systemctl enable` or other operation is
run, both will now be enabled (or execute the related operation
on both), not just the unit.
- Split libsystemd0 to support systemd-less nspawn containers
- Redo manpage file lists without %exclude, tends to hide
unpackaged files.
- hwdb belongs to udev
- Resolve memory leak and add missing _cleanup_free_ to
0001-On_s390_con3270_disable_ANSI_colour_esc.patch
- Remove systemd-powerd-initctl-support.patch
(no longer builds because shutdownd is gone)
- Remove quilt-patches/0001-core-rework-device-state-logic.patch,
0001-Let-some-boolean-survive-a-daemon-reload.patch
(merged upstream),
0001-Let-some-boolean-survive-a-daemon-reload.patch
(obsolete)
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Jun 11 14:48:03 UTC 2015 - werner@suse.de Thu Jun 11 14:48:03 UTC 2015 - werner@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package systemd # spec file for package systemd
# #
# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
# #
# All modifications and additions to the file contributed by third parties # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -44,7 +44,7 @@
Name: systemd Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 219 Version: 221
Release: 0 Release: 0
Summary: A System and Session Manager Summary: A System and Session Manager
License: LGPL-2.1+ License: LGPL-2.1+
@ -56,7 +56,6 @@ BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
BuildRequires: fdupes BuildRequires: fdupes
BuildRequires: gperf BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: intltool BuildRequires: intltool
BuildRequires: libacl-devel BuildRequires: libacl-devel
BuildRequires: libcap-devel BuildRequires: libcap-devel
@ -85,8 +84,6 @@ Conflicts: systemd
Conflicts: kiwi Conflicts: kiwi
%else %else
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc
BuildRequires: libgcrypt-devel BuildRequires: libgcrypt-devel
BuildRequires: libusb-devel BuildRequires: libusb-devel
BuildRequires: libxslt-tools BuildRequires: libxslt-tools
@ -112,7 +109,7 @@ BuildRequires: pam-config >= 0.79-5
Requires: pwdutils Requires: pwdutils
Requires: systemd-presets-branding Requires: systemd-presets-branding
Requires: sysvinit-tools Requires: sysvinit-tools
Requires: util-linux >= 2.25 Requires: util-linux >= 2.26
Requires(post): coreutils Requires(post): coreutils
Requires(post): findutils Requires(post): findutils
Requires(post): pam-config >= 0.79-5 Requires(post): pam-config >= 0.79-5
@ -201,8 +198,6 @@ Patch180: 0014-journald-with-journaling-FS.patch
Patch182: 0019-make-completion-smart-to-be-able-to-redirect.patch Patch182: 0019-make-completion-smart-to-be-able-to-redirect.patch
# PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com # PATCH-FIX-SUSE 0001-add-network-device-after-NFS-mount-units.patch werner@suse.com
Patch183: 0001-add-network-device-after-NFS-mount-units.patch Patch183: 0001-add-network-device-after-NFS-mount-units.patch
# PATCH-FIX-SUSE systemd-powerd-initctl-support.patch
Patch185: systemd-powerd-initctl-support.patch
# PATCH-FIX-SUSE systemctl-set-default-target.patch # PATCH-FIX-SUSE systemctl-set-default-target.patch
Patch186: systemctl-set-default-target.patch Patch186: systemctl-set-default-target.patch
# PATCH-FIX-SUSE boot-local-start.patch (bnc #869142) # PATCH-FIX-SUSE boot-local-start.patch (bnc #869142)
@ -248,9 +243,6 @@ Patch490: watch_resolv.conf_for_become_changed.patch
Patch520: systemd-add-user-keep.patch Patch520: systemd-add-user-keep.patch
# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009) # PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009)
Patch521: kbd-model-map.patch Patch521: kbd-model-map.patch
Patch522: 0001-core-rework-device-state-logic.patch
# PATCH-FIX-SUSE/PATCH-FIX-UPSTREAM
Patch523: 0001-Let-some-boolean-survive-a-daemon-reload.patch
# UDEV PATCHES # UDEV PATCHES
# ============ # ============
@ -325,7 +317,7 @@ Some systemd commands offer bash completion, but it's an optional dependency.
Summary: Development headers for systemd Summary: Development headers for systemd
License: LGPL-2.1+ License: LGPL-2.1+
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Requires: %{name} = %{version} Requires: libsystemd0 = %version
Requires: systemd-rpm-macros Requires: systemd-rpm-macros
%if 0%{?bootstrap} %if 0%{?bootstrap}
Conflicts: systemd-devel Conflicts: systemd-devel
@ -346,6 +338,32 @@ Provides: sysvinit:/sbin/init
%description sysvinit %description sysvinit
Drop-in replacement of System V init tools. Drop-in replacement of System V init tools.
%package -n libsystemd0
Summary: Component library for systemd
License: LGPL-2.1+
Group: System/Libraries
%description -n libsystemd0
This library provides several of the systemd C APIs:
* sd-bus implements an alternative D-Bus client library that is
relatively easy to use, very efficient and supports both classic
D-Bus as well as kdbus as transport backend.
* sd-daemon(3): for system services (daemons) to report their status
to systemd and to make easy use of socket-based activation logic
* sd-event is a generic event loop abstraction that is built around
Linux epoll, but adds features such as event prioritization or
efficient timer handling.
* sd-id128(3): generation and processing of 128-bit IDs
* sd-journal(3): API to submit and query journal log entries
* sd-login(3): APIs to introspect and monitor seat, login session and
user status information on the local system.
%package -n %{udevpkgname} %package -n %{udevpkgname}
Summary: A rule-based device node and kernel event manager Summary: A rule-based device node and kernel event manager
License: GPL-2.0 License: GPL-2.0
@ -427,38 +445,6 @@ This package contains the development files for the library libudev, a
dynamic library, which provides access to udev device information. dynamic library, which provides access to udev device information.
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%package -n libgudev-1_0-0
Summary: GObject library, to access udev device information
License: LGPL-2.1+
Group: System/Libraries
Requires: lib%{udevpkgname}%{udev_major} = %{version}-%{release}
%description -n libgudev-1_0-0
This package contains the GObject library libgudev, which provides
access to udev device information.
%package -n typelib-1_0-GUdev-1_0
Summary: GObject library, to access udev device information -- Introspection bindings
License: LGPL-2.1+
Group: System/Libraries
%description -n typelib-1_0-GUdev-1_0
This package provides the GObject Introspection bindings for libgudev, which
provides access to udev device information.
%package -n libgudev-1_0-devel
Summary: Devel package for libgudev
License: LGPL-2.1+
Group: Development/Libraries/Other
Requires: glib2-devel
Requires: libgudev-1_0-0 = %{version}-%{release}
Requires: libudev-devel = %{version}-%{release}
Requires: typelib-1_0-GUdev-1_0 = %{version}-%{release}
%description -n libgudev-1_0-devel
This is the devel package for the GObject library libgudev, which
provides GObject access to udev device information.
%package logger %package logger
Summary: Journal only logging Summary: Journal only logging
License: LGPL-2.1+ License: LGPL-2.1+
@ -575,7 +561,6 @@ cp %{SOURCE7} m4/
%patch180 -p1 %patch180 -p1
%patch182 -p1 %patch182 -p1
%patch183 -p1 %patch183 -p1
%patch185 -p1
%patch186 -p1 %patch186 -p1
%patch188 -p1 %patch188 -p1
%patch189 -p1 %patch189 -p1
@ -602,8 +587,6 @@ cp %{SOURCE7} m4/
%patch490 -p1 %patch490 -p1
%patch520 -p1 %patch520 -p1
%patch521 -p1 %patch521 -p1
%patch522 -p1
%patch523 -p1
# udev patches # udev patches
%patch1001 -p1 %patch1001 -p1
@ -708,7 +691,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
--with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \ --with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \
--with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \ --with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \
%if 0%{?bootstrap} %if 0%{?bootstrap}
--disable-gudev \
--disable-myhostname \ --disable-myhostname \
--disable-manpages \ --disable-manpages \
--disable-machined \ --disable-machined \
@ -717,7 +699,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
%if %{with python} %if %{with python}
--with-python \ --with-python \
%endif %endif
--enable-gtk-doc \
--with-nss-my-hostname-warning \ --with-nss-my-hostname-warning \
%endif %endif
--enable-selinux \ --enable-selinux \
@ -1074,16 +1055,13 @@ fi
%regenerate_initrd_posttrans %regenerate_initrd_posttrans
%endif %endif
%post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %post -n libsystemd0 -p /sbin/ldconfig
%postun -n libsystemd0 -p /sbin/ldconfig
%post -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig
%postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig %postun -n lib%{udevpkgname}%{udev_major} -p /sbin/ldconfig
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%post -n libgudev-1_0-0 -p /sbin/ldconfig
%postun -n libgudev-1_0-0 -p /sbin/ldconfig
%if %{with permission} %if %{with permission}
%verifyscript logger %verifyscript logger
%verify_permissions -e %{_localstatedir}/log/journal/ %verify_permissions -e %{_localstatedir}/log/journal/
@ -1159,7 +1137,6 @@ exit 0
%{_bindir}/systemd-path %{_bindir}/systemd-path
%{_bindir}/systemd-sysusers %{_bindir}/systemd-sysusers
%{_bindir}/systemd-notify %{_bindir}/systemd-notify
%{_bindir}/systemd-hwdb
%{_bindir}/systemd-run %{_bindir}/systemd-run
%{_bindir}/systemd-journalctl %{_bindir}/systemd-journalctl
%{_bindir}/journalctl %{_bindir}/journalctl
@ -1175,13 +1152,6 @@ exit 0
%{_bindir}/systemd-detect-virt %{_bindir}/systemd-detect-virt
%{_bindir}/timedatectl %{_bindir}/timedatectl
%{_sbindir}/systemd-sysv-convert %{_sbindir}/systemd-sysv-convert
%{_libdir}/libsystemd.so.*
%if %{with compat_libs}
%{_libdir}/libsystemd-daemon.so.*
%{_libdir}/libsystemd-login.so.*
%{_libdir}/libsystemd-id128.so.*
%{_libdir}/libsystemd-journal.so.*
%endif
%{_bindir}/systemd-cgls %{_bindir}/systemd-cgls
%{_bindir}/systemd-cgtop %{_bindir}/systemd-cgtop
%{_bindir}/systemd-cat %{_bindir}/systemd-cat
@ -1212,6 +1182,7 @@ exit 0
%{_prefix}/lib/systemd/system/*.path %{_prefix}/lib/systemd/system/*.path
%{_prefix}/lib/systemd/user/*.target %{_prefix}/lib/systemd/user/*.target
%{_prefix}/lib/systemd/user/*.service %{_prefix}/lib/systemd/user/*.service
%{_prefix}/lib/systemd/user/*.socket
%exclude %{_prefix}/lib/systemd/systemd-udevd %exclude %{_prefix}/lib/systemd/systemd-udevd
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd %exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd
@ -1226,6 +1197,7 @@ exit 0
%dir %{_prefix}/lib/systemd/user-preset %dir %{_prefix}/lib/systemd/user-preset
%dir %{_prefix}/lib/systemd/system-generators %dir %{_prefix}/lib/systemd/system-generators
%dir %{_prefix}/lib/systemd/user-generators %dir %{_prefix}/lib/systemd/user-generators
%{_prefix}/lib/systemd/user-generators/systemd-dbus1-generator
%dir %{_prefix}/lib/systemd/ntp-units.d/ %dir %{_prefix}/lib/systemd/ntp-units.d/
%dir %{_prefix}/lib/systemd/system-shutdown/ %dir %{_prefix}/lib/systemd/system-shutdown/
%dir %{_prefix}/lib/systemd/system-sleep/ %dir %{_prefix}/lib/systemd/system-sleep/
@ -1236,6 +1208,7 @@ exit 0
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator %{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator
%endif %endif
%{_prefix}/lib/systemd/system-generators/systemd-dbus1-generator
%if 0%{has_efi} %if 0%{has_efi}
%{_bindir}/bootctl %{_bindir}/bootctl
%{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator %{_prefix}/lib/systemd/system-generators/systemd-efi-boot-generator
@ -1302,6 +1275,7 @@ exit 0
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf %config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
%{_sysconfdir}/X11/xinit/
# Some files which may created by us # Some files which may created by us
%dir %{_sysconfdir}/X11/xorg.conf.d %dir %{_sysconfdir}/X11/xorg.conf.d
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf %ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
@ -1317,15 +1291,23 @@ exit 0
%{_datadir}/factory/ %{_datadir}/factory/
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%if %{with networkd} %if %{with networkd}
%{_prefix}/lib/systemd/system/org.freedesktop.network1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.network1.service %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service
%endif %endif
%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
%{_prefix}/lib/systemd/system/org.freedesktop.locale1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.login1.service %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
%{_prefix}/lib/systemd/system/org.freedesktop.hostname1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
%if !0%{?bootstrap} %if !0%{?bootstrap}
%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
%endif %endif
%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
%dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions %dir %{_datadir}/polkit-1/actions
@ -1343,20 +1325,20 @@ exit 0
%{_datadir}/systemd %{_datadir}/systemd
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
# Packaged in sysvinit subpackage %_mandir/man1/[a-rt-z]*ctl.1*
%exclude %{_mandir}/man1/init.1* %_mandir/man1/systemc*.1*
%exclude %{_mandir}/man8/halt.8* %_mandir/man1/systemd*.1*
%exclude %{_mandir}/man8/reboot.8* %_mandir/man5/[a-tv-z]*
%exclude %{_mandir}/man8/shutdown.8* %_mandir/man5/user*
%exclude %{_mandir}/man8/poweroff.8* %_mandir/man7/[bdfks]*
%exclude %{_mandir}/man8/telinit.8* %_mandir/man8/kern*
%exclude %{_mandir}/man8/runlevel.8* %_mandir/man8/pam_*
%exclude %{_mandir}/man*/*udev*.[0-9]* %_mandir/man8/systemd-[a-gik-tv]*
%exclude %{_mandir}/man8/systemd-journal-gatewayd.* %_mandir/man8/systemd-h[aioy]*
%{_mandir}/man1/*.1* %_mandir/man8/systemd-journal-remote.*
%{_mandir}/man5/*.5* %_mandir/man8/systemd-journal-upload.*
%{_mandir}/man7/*.7* %_mandir/man8/systemd-journald*
%{_mandir}/man8/*.8* %_mandir/man8/systemd-u[ps]*
%endif %endif
%{_docdir}/systemd %{_docdir}/systemd
%{_prefix}/lib/udev/rules.d/70-uaccess.rules %{_prefix}/lib/udev/rules.d/70-uaccess.rules
@ -1403,21 +1385,16 @@ exit 0
%{_libdir}/libsystemd-login.so %{_libdir}/libsystemd-login.so
%{_libdir}/libsystemd-id128.so %{_libdir}/libsystemd-id128.so
%{_libdir}/libsystemd-journal.so %{_libdir}/libsystemd-journal.so
%dir %{_includedir}/systemd %{_includedir}/systemd/
%{_includedir}/systemd/sd-login.h %{_datadir}/pkgconfig/systemd.pc
%{_includedir}/systemd/sd-daemon.h
%{_includedir}/systemd/sd-id128.h
%{_includedir}/systemd/sd-journal.h
%{_includedir}/systemd/sd-messages.h
%{_includedir}/systemd/_sd-common.h
%{_libdir}/pkgconfig/systemd.pc
%{_libdir}/pkgconfig/libsystemd.pc %{_libdir}/pkgconfig/libsystemd.pc
%{_libdir}/pkgconfig/libsystemd-daemon.pc %{_libdir}/pkgconfig/libsystemd-daemon.pc
%{_libdir}/pkgconfig/libsystemd-login.pc %{_libdir}/pkgconfig/libsystemd-login.pc
%{_libdir}/pkgconfig/libsystemd-id128.pc %{_libdir}/pkgconfig/libsystemd-id128.pc
%{_libdir}/pkgconfig/libsystemd-journal.pc %{_libdir}/pkgconfig/libsystemd-journal.pc
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_mandir}/man3/*.3* %_mandir/man3/SD*.3*
%_mandir/man3/sd*.3*
%endif %endif
%files sysvinit %files sysvinit
@ -1449,6 +1426,7 @@ exit 0
%if 0%{?suse_version} <= 1310 %if 0%{?suse_version} <= 1310
%{_prefix}/lib/firmware %{_prefix}/lib/firmware
%endif %endif
%{_bindir}/systemd-hwdb
%dir %{_prefix}/lib/udev/ %dir %{_prefix}/lib/udev/
%{_prefix}/lib/udev/accelerometer %{_prefix}/lib/udev/accelerometer
%{_prefix}/lib/udev/ata_id %{_prefix}/lib/udev/ata_id
@ -1467,14 +1445,18 @@ exit 0
%exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules %exclude %{_prefix}/lib/udev/rules.d/73-seat-numlock.rules
%exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules %exclude %{_prefix}/lib/udev/rules.d/99-systemd.rules
%{_prefix}/lib/udev/rules.d/*.rules %{_prefix}/lib/udev/rules.d/*.rules
%dir %{_prefix}/lib/udev/hwdb.d %{_prefix}/lib/udev/hwdb.d/
%{_prefix}/lib/udev/hwdb.d/*
%dir %{_sysconfdir}/udev/ %dir %{_sysconfdir}/udev/
%dir %{_sysconfdir}/udev/rules.d/ %dir %{_sysconfdir}/udev/rules.d/
%ghost %{_sysconfdir}/udev/hwdb.bin %ghost %{_sysconfdir}/udev/hwdb.bin
%config(noreplace) %{_sysconfdir}/udev/udev.conf %config(noreplace) %{_sysconfdir}/udev/udev.conf
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%{_mandir}/man?/*udev*.[0-9]* %_mandir/man5/udev*
%_mandir/man7/hwdb*
%_mandir/man7/udev*
%_mandir/man8/systemd-hwdb*
%_mandir/man8/systemd-udev*
%_mandir/man8/udev*
%endif %endif
%dir %{_prefix}/lib/systemd/system %dir %{_prefix}/lib/systemd/system
%{_prefix}/lib/systemd/systemd-udevd %{_prefix}/lib/systemd/systemd-udevd
@ -1491,6 +1473,16 @@ exit 0
%{_datadir}/pkgconfig/udev.pc %{_datadir}/pkgconfig/udev.pc
%endif %endif
%files -n libsystemd0
%defattr(-,root,root)
%_libdir/libsystemd.so.*
%if %{with compat_libs}
%_libdir/libsystemd-daemon.so.*
%_libdir/libsystemd-login.so.*
%_libdir/libsystemd-id128.so.*
%_libdir/libsystemd-journal.so.*
%endif
%files -n lib%{udevpkgname}%{udev_major} %files -n lib%{udevpkgname}%{udev_major}
%defattr(-,root,root) %defattr(-,root,root)
%{_libdir}/libudev.so.* %{_libdir}/libudev.so.*
@ -1500,35 +1492,9 @@ exit 0
%{_includedir}/libudev.h %{_includedir}/libudev.h
%{_libdir}/libudev.so %{_libdir}/libudev.so
%{_libdir}/pkgconfig/libudev.pc %{_libdir}/pkgconfig/libudev.pc
%if ! 0%{?bootstrap} %{_mandir}/man3/*udev*.3*
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/libudev
%{_datadir}/gtk-doc/html/libudev/*
%endif
%if ! 0%{?bootstrap} %if ! 0%{?bootstrap}
%files -n libgudev-1_0-0
%defattr(-,root,root)
%{_libdir}/libgudev-1.0.so.*
%files -n typelib-1_0-GUdev-1_0
%defattr(-,root,root)
%{_libdir}/girepository-1.0/GUdev-1.0.typelib
%files -n libgudev-1_0-devel
%defattr(-,root,root)
%dir %{_includedir}/gudev-1.0
%dir %{_includedir}/gudev-1.0/gudev
%{_includedir}/gudev-1.0/gudev/*.h
%{_libdir}/libgudev-1.0.so
%{_libdir}/pkgconfig/gudev-1.0.pc
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/gudev
%{_datadir}/gtk-doc/html/gudev/*
%{_datadir}/gir-1.0/GUdev-1.0.gir
%files logger %files logger
%defattr(-,root,root) %defattr(-,root,root)
%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/ %dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/
@ -1539,6 +1505,8 @@ exit 0
%files -n nss-myhostname %files -n nss-myhostname
%defattr(-, root, root) %defattr(-, root, root)
%{_sbindir}/nss-myhostname-config %{_sbindir}/nss-myhostname-config
%{_mandir}/man8/libnss_myhostname.*
%{_mandir}/man8/nss-myhostname.*
/%{_lib}/*nss_myhostname* /%{_lib}/*nss_myhostname*
%files journal-gateway %files journal-gateway
@ -1551,6 +1519,8 @@ exit 0
%files -n nss-mymachines %files -n nss-mymachines
%defattr(-,root,root) %defattr(-,root,root)
%_libdir/libnss_mymachines.so* %_libdir/libnss_mymachines.so*
%_mandir/man8/libnss_mymachines.*
%_mandir/man8/nss-mymachines.*
%endif %endif
%changelog %changelog

View File

@ -5,9 +5,11 @@ Provide /run/lock/subsys directory to be able to provide the
tmpfiles.d/legacy.conf | 2 +- tmpfiles.d/legacy.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-) 1 file changed, 1 insertion(+), 1 deletion(-)
--- systemd-210/tmpfiles.d/legacy.conf Index: systemd-221/tmpfiles.d/legacy.conf
+++ systemd-210/tmpfiles.d/legacy.conf 2014-07-30 12:36:36.862735670 +0000 ===================================================================
@@ -16,7 +16,7 @@ d /run/lock 0775 root lock - --- systemd-221.orig/tmpfiles.d/legacy.conf
+++ systemd-221/tmpfiles.d/legacy.conf
@@ -17,7 +17,7 @@ L /var/lock - - - - ../run/lock
# /run/lock/subsys is used for serializing SysV service execution, and # /run/lock/subsys is used for serializing SysV service execution, and
# hence without use on SysV-less systems. # hence without use on SysV-less systems.

View File

@ -2,10 +2,10 @@
src/tty-ask-password-agent/tty-ask-password-agent.c | 171 +++++++++++++++++++- src/tty-ask-password-agent/tty-ask-password-agent.c | 171 +++++++++++++++++++-
1 file changed, 166 insertions(+), 5 deletions(-) 1 file changed, 166 insertions(+), 5 deletions(-)
Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c Index: systemd-221/src/tty-ask-password-agent/tty-ask-password-agent.c
=================================================================== ===================================================================
--- systemd.orig/src/tty-ask-password-agent/tty-ask-password-agent.c --- systemd-221.orig/src/tty-ask-password-agent/tty-ask-password-agent.c
+++ systemd/src/tty-ask-password-agent/tty-ask-password-agent.c +++ systemd-221/src/tty-ask-password-agent/tty-ask-password-agent.c
@@ -31,6 +31,10 @@ @@ -31,6 +31,10 @@
#include <getopt.h> #include <getopt.h>
#include <sys/signalfd.h> #include <sys/signalfd.h>
@ -24,10 +24,10 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
+#include "fileio.h" +#include "fileio.h"
+#include "macro.h" +#include "macro.h"
+#include "list.h" +#include "list.h"
#include "process-util.h"
static enum { #include "terminal-util.h"
ACTION_LIST, #include "signal-util.h"
@@ -50,6 +57,22 @@ static enum { @@ -53,6 +60,22 @@ static enum {
ACTION_WALL ACTION_WALL
} arg_action = ACTION_QUERY; } arg_action = ACTION_QUERY;
@ -50,7 +50,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
static bool arg_plymouth = false; static bool arg_plymouth = false;
static bool arg_console = false; static bool arg_console = false;
@@ -208,6 +231,58 @@ static int ask_password_plymouth( @@ -211,6 +234,58 @@ static int ask_password_plymouth(
return 0; return 0;
} }
@ -109,7 +109,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
static int parse_password(const char *filename, char **wall) { static int parse_password(const char *filename, char **wall) {
_cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = NULL; _cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = NULL;
uint64_t not_after = 0; uint64_t not_after = 0;
@@ -308,7 +383,7 @@ static int parse_password(const char *fi @@ -311,7 +386,7 @@ static int parse_password(const char *fi
_cleanup_free_ char *password = NULL; _cleanup_free_ char *password = NULL;
if (arg_console) { if (arg_console) {
@ -118,7 +118,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
if (tty_fd < 0) if (tty_fd < 0)
return tty_fd; return tty_fd;
} }
@@ -612,9 +687,85 @@ static int parse_argv(int argc, char *ar @@ -615,9 +690,85 @@ static int parse_argv(int argc, char *ar
return 1; return 1;
} }
@ -205,7 +205,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
log_set_target(LOG_TARGET_AUTO); log_set_target(LOG_TARGET_AUTO);
log_parse_environment(); log_parse_environment();
log_open(); log_open();
@@ -625,11 +776,19 @@ int main(int argc, char *argv[]) { @@ -628,11 +779,19 @@ int main(int argc, char *argv[]) {
if (r <= 0) if (r <= 0)
goto finish; goto finish;
@ -228,7 +228,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL)) if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL))
r = watch_passwords(); r = watch_passwords();
else else
@@ -638,6 +797,8 @@ int main(int argc, char *argv[]) { @@ -641,6 +800,8 @@ int main(int argc, char *argv[]) {
if (r < 0) if (r < 0)
log_error_errno(r, "Error: %m"); log_error_errno(r, "Error: %m");

View File

@ -5,11 +5,13 @@ write back the bytes and increase the entropy bit counter.
Related to bnc#892096 Related to bnc#892096
--- ---
systemd-219/src/random-seed/random-seed.c | 71 +++++++++++++++++++++++++----- src/random-seed/random-seed.c | 71 ++++++++++++++++++++++++++++++++++++------
1 file changed, 61 insertions(+), 10 deletions(-) 1 file changed, 61 insertions(+), 10 deletions(-)
--- systemd-219/src/random-seed/random-seed.c Index: systemd-221/src/random-seed/random-seed.c
+++ systemd-219/src/random-seed/random-seed.c 2015-04-21 09:39:03.057518051 +0000 ===================================================================
--- systemd-221.orig/src/random-seed/random-seed.c
+++ systemd-221/src/random-seed/random-seed.c
@@ -22,7 +22,9 @@ @@ -22,7 +22,9 @@
#include <unistd.h> #include <unistd.h>
#include <fcntl.h> #include <fcntl.h>
@ -37,7 +39,7 @@ Related to bnc#892096
- buf = malloc(buf_size); - buf = malloc(buf_size);
- if (!buf) { - if (!buf) {
+ entropy = (struct rand_pool_info*) malloc(sizeof(struct rand_pool_info) + buf_size); + entropy = malloc(sizeof(struct rand_pool_info) + buf_size);
+ if (!entropy) { + if (!entropy) {
r = log_oom(); r = log_oom();
goto finish; goto finish;
@ -70,18 +72,18 @@ Related to bnc#892096
seed_fd = open(RANDOM_SEED, O_RDWR|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600); seed_fd = open(RANDOM_SEED, O_RDWR|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
if (seed_fd < 0) { if (seed_fd < 0) {
seed_fd = open(RANDOM_SEED, O_RDONLY|O_CLOEXEC|O_NOCTTY); seed_fd = open(RANDOM_SEED, O_RDONLY|O_CLOEXEC|O_NOCTTY);
@@ -104,7 +124,7 @@ int main(int argc, char *argv[]) { @@ -103,7 +123,7 @@ int main(int argc, char *argv[]) {
} }
} }
- k = loop_read(seed_fd, buf, buf_size, false); - k = loop_read(seed_fd, buf, buf_size, false);
+ k = loop_read(seed_fd, entropy->buf, entropy->buf_size, false); + k = loop_read(seed_fd, entropy->buf, entropy->buf_size, false);
if (k <= 0) { if (k < 0)
r = log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m");
if (r != 0) else if (k == 0)
@@ -115,13 +135,29 @@ int main(int argc, char *argv[]) { @@ -111,13 +131,29 @@ int main(int argc, char *argv[]) {
} else { else {
lseek(seed_fd, 0, SEEK_SET); (void) lseek(seed_fd, 0, SEEK_SET);
- r = loop_write(random_fd, buf, (size_t) k, false); - r = loop_write(random_fd, buf, (size_t) k, false);
- if (r < 0) - if (r < 0)
@ -111,8 +113,8 @@ Related to bnc#892096
+ +
seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600); seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
if (seed_fd < 0) { if (seed_fd < 0) {
log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m"); r = log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m");
@@ -136,6 +172,21 @@ int main(int argc, char *argv[]) { @@ -130,6 +166,21 @@ int main(int argc, char *argv[]) {
goto finish; goto finish;
} }
@ -132,20 +134,23 @@ Related to bnc#892096
+ } + }
+ +
} else { } else {
log_error("Unknown verb %s.", argv[1]); log_error("Unknown verb '%s'.", argv[1]);
r = -EINVAL; r = -EINVAL;
@@ -149,12 +200,12 @@ int main(int argc, char *argv[]) { @@ -144,7 +195,7 @@ int main(int argc, char *argv[]) {
fchmod(seed_fd, 0600); (void) fchmod(seed_fd, 0600);
fchown(seed_fd, 0, 0); (void) fchown(seed_fd, 0, 0);
- k = loop_read(random_fd, buf, buf_size, false); - k = loop_read(random_fd, buf, buf_size, false);
+ k = loop_read(random_fd, entropy->buf, entropy->buf_size, false); + k = loop_read(random_fd, entropy->buf, entropy->buf_size, false);
if (k <= 0) { if (k < 0) {
log_error("Failed to read new seed from /dev/urandom: %s", r < 0 ? strerror(-r) : "EOF"); r = log_error_errno(k, "Failed to read new seed from /dev/urandom: %m");
r = k == 0 ? -EIO : (int) k; goto finish;
} else { @@ -155,7 +206,7 @@ int main(int argc, char *argv[]) {
- r = loop_write(seed_fd, buf, (size_t) k, false); goto finish;
+ r = loop_write(seed_fd, entropy->buf, (size_t) k, false);
if (r < 0)
log_error_errno(r, "Failed to write new random seed file: %m");
} }
- r = loop_write(seed_fd, buf, (size_t) k, false);
+ r = loop_write(seed_fd, entropy->buf, (size_t) k, false);
if (r < 0)
log_error_errno(r, "Failed to write new random seed file: %m");
}

View File

@ -14,10 +14,10 @@ track progress: https://bugzilla.redhat.com/show_bug.cgi?id=1141137
units/getty@.service.m4 | 1 + units/getty@.service.m4 | 1 +
units/serial-getty@.service.m4 | 1 + units/serial-getty@.service.m4 | 1 +
2 files changed, 2 insertions(+) 2 files changed, 2 insertions(+)
Index: systemd-218/units/getty@.service.m4 Index: systemd-221/units/getty@.service.m4
=================================================================== ===================================================================
--- systemd-218.orig/units/getty@.service.m4 --- systemd-221.orig/units/getty@.service.m4
+++ systemd-218/units/getty@.service.m4 +++ systemd-221/units/getty@.service.m4
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0 @@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
[Service] [Service]
# the VT is cleared by TTYVTDisallocate # the VT is cleared by TTYVTDisallocate
@ -26,10 +26,10 @@ Index: systemd-218/units/getty@.service.m4
Type=idle Type=idle
Restart=always Restart=always
RestartSec=0 RestartSec=0
Index: systemd-218/units/serial-getty@.service.m4 Index: systemd-221/units/serial-getty@.service.m4
=================================================================== ===================================================================
--- systemd-218.orig/units/serial-getty@.service.m4 --- systemd-221.orig/units/serial-getty@.service.m4
+++ systemd-218/units/serial-getty@.service.m4 +++ systemd-221/units/serial-getty@.service.m4
@@ -24,6 +24,7 @@ IgnoreOnIsolate=yes @@ -24,6 +24,7 @@ IgnoreOnIsolate=yes
[Service] [Service]

View File

@ -3,19 +3,19 @@
src/core/manager.h | 5 ++ src/core/manager.h | 5 ++
2 files changed, 98 insertions(+) 2 files changed, 98 insertions(+)
Index: systemd-218/src/core/manager.c Index: systemd-221/src/core/manager.c
=================================================================== ===================================================================
--- systemd-218.orig/src/core/manager.c --- systemd-221.orig/src/core/manager.c
+++ systemd-218/src/core/manager.c +++ systemd-221/src/core/manager.c
@@ -37,6 +37,7 @@ @@ -32,6 +32,7 @@
#include <sys/stat.h> #include <fcntl.h>
#include <dirent.h> #include <dirent.h>
#include <sys/timerfd.h> #include <sys/timerfd.h>
+#include <resolv.h> +#include <resolv.h>
#ifdef HAVE_AUDIT #ifdef HAVE_AUDIT
#include <libaudit.h> #include <libaudit.h>
@@ -302,6 +303,91 @@ static int manager_check_ask_password(Ma @@ -308,6 +309,91 @@ static int manager_check_ask_password(Ma
return m->have_ask_password; return m->have_ask_password;
} }
@ -107,7 +107,7 @@ Index: systemd-218/src/core/manager.c
static int manager_watch_idle_pipe(Manager *m) { static int manager_watch_idle_pipe(Manager *m) {
int r; int r;
@@ -557,6 +643,7 @@ int manager_new(SystemdRunningAs running @@ -585,6 +671,7 @@ int manager_new(ManagerRunningAs running
m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = m->utab_inotify_fd = -1; m->pin_cgroupfs_fd = m->notify_fd = m->signal_fd = m->time_change_fd = m->dev_autofs_fd = m->private_listen_fd = m->kdbus_fd = m->utab_inotify_fd = -1;
m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */ m->current_job_id = 1; /* start as id #1, so that we can leave #0 around as "null-like" value */
@ -115,7 +115,7 @@ Index: systemd-218/src/core/manager.c
m->ask_password_inotify_fd = -1; m->ask_password_inotify_fd = -1;
m->have_ask_password = -EINVAL; /* we don't know */ m->have_ask_password = -EINVAL; /* we don't know */
@@ -618,6 +705,10 @@ int manager_new(SystemdRunningAs running @@ -651,6 +738,10 @@ int manager_new(ManagerRunningAs running
if (r < 0) if (r < 0)
goto fail; goto fail;
@ -126,7 +126,7 @@ Index: systemd-218/src/core/manager.c
m->udev = udev_new(); m->udev = udev_new();
if (!m->udev) { if (!m->udev) {
r = -ENOMEM; r = -ENOMEM;
@@ -896,6 +987,8 @@ Manager* manager_free(Manager *m) { @@ -929,6 +1020,8 @@ Manager* manager_free(Manager *m) {
if (!m) if (!m)
return NULL; return NULL;
@ -135,11 +135,11 @@ Index: systemd-218/src/core/manager.c
manager_clear_jobs_and_units(m); manager_clear_jobs_and_units(m);
for (c = 0; c < _UNIT_TYPE_MAX; c++) for (c = 0; c < _UNIT_TYPE_MAX; c++)
Index: systemd-218/src/core/manager.h Index: systemd-221/src/core/manager.h
=================================================================== ===================================================================
--- systemd-218.orig/src/core/manager.h --- systemd-221.orig/src/core/manager.h
+++ systemd-218/src/core/manager.h +++ systemd-221/src/core/manager.h
@@ -185,6 +185,11 @@ struct Manager { @@ -181,6 +181,11 @@ struct Manager {
int utab_inotify_fd; int utab_inotify_fd;
sd_event_source *mount_utab_event_source; sd_event_source *mount_utab_event_source;