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
src/basic/terminal-util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
src/basic/terminal-util.h | 1
src/core/manager.c | 24 ++++++++---
src/shared/util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
src/shared/util.h | 1
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/rules/99-systemd.rules.in
--- systemd-221.orig/rules/99-systemd.rules.in
+++ systemd-221/rules/99-systemd.rules.in
@@ -7,7 +7,7 @@
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*", 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/src/core/manager.c
@@ -113,7 +113,7 @@ static int manager_watch_jobs_in_progres
--- systemd-221.orig/src/basic/terminal-util.c
+++ systemd-221/src/basic/terminal-util.c
@@ -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))
@ -89,161 +243,3 @@ Index: systemd/src/core/manager.c
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 ++++++++++++------
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-218/src/core/shutdown.c
@@ -400,6 +400,10 @@ int main(int argc, char *argv[]) {
--- systemd-221.orig/src/core/shutdown.c
+++ systemd-221/src/core/shutdown.c
@@ -396,6 +396,10 @@ int main(int argc, char *argv[]) {
}
reboot(cmd);
@ -18,11 +18,11 @@ Index: systemd-218/src/core/shutdown.c
if (errno == EPERM && in_container) {
/* If we are in a container, and we lacked
* 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-218/src/systemctl/systemctl.c
@@ -94,6 +94,7 @@ static bool arg_no_pager = false;
--- systemd-221.orig/src/systemctl/systemctl.c
+++ systemd-221/src/systemctl/systemctl.c
@@ -93,6 +93,7 @@ static bool arg_no_pager = false;
static bool arg_no_wtmp = false;
static bool arg_no_wall = 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_ignore_inhibitors = 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 },
{ "force", no_argument, NULL, 'f' },
{ "wtmp-only", no_argument, NULL, 'w' },
@ -38,7 +38,7 @@ Index: systemd-218/src/systemctl/systemctl.c
{ "no-wtmp", no_argument, NULL, 'd' },
{ "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 'h':
@ -53,7 +53,7 @@ Index: systemd-218/src/systemctl/systemctl.c
case '?':
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
* on reboot(), but the file systems need to be synce'd
* 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
* 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) {

View File

@ -5,17 +5,17 @@ NFS share is added as "After=" dependency to the <nfs-share-mount-point>.mount.
---
Makefile.am | 2
src/basic/util.c | 1
src/core/mount-iface.c | 173 +++++++++++++++++++++++++++++++++++++++++++++++++
src/core/mount-iface.h | 25 +++++++
src/core/mount.c | 35 +++++++++
src/shared/util.c | 1
5 files changed, 234 insertions(+), 2 deletions(-)
Index: systemd-218/Makefile.am
Index: systemd-221/Makefile.am
===================================================================
--- systemd-218.orig/Makefile.am
+++ systemd-218/Makefile.am
@@ -1134,6 +1134,8 @@ libsystemd_core_la_SOURCES = \
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -1164,6 +1164,8 @@ libcore_la_SOURCES = \
src/core/machine-id-setup.h \
src/core/mount-setup.c \
src/core/mount-setup.h \
@ -24,10 +24,22 @@ Index: systemd-218/Makefile.am
src/core/kmod-setup.c \
src/core/kmod-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
+++ systemd-218/src/core/mount-iface.c
+++ systemd-221/src/core/mount-iface.c
@@ -0,0 +1,173 @@
+/*-*- 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);
+ ifa_list = NULL;
+}
Index: systemd-218/src/core/mount-iface.h
Index: systemd-221/src/core/mount-iface.h
===================================================================
--- /dev/null
+++ systemd-218/src/core/mount-iface.h
+++ systemd-221/src/core/mount-iface.h
@@ -0,0 +1,25 @@
+/*-*- 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);
+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-218/src/core/mount.c
@@ -38,6 +38,7 @@
--- systemd-221.orig/src/core/mount.c
+++ systemd-221/src/core/mount.c
@@ -35,6 +35,7 @@
#include "mkdir.h"
#include "path-util.h"
#include "mount-setup.h"
@ -244,7 +256,7 @@ Index: systemd-218/src/core/mount.c
#include "unit-name.h"
#include "dbus-mount.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;
bool load_extras = false;
MountParameters *p;
@ -255,17 +267,17 @@ Index: systemd-218/src/core/mount.c
int r;
assert(m);
@@ -1391,6 +1393,8 @@ static int mount_add_one(
if (!e)
return -ENOMEM;
@@ -1358,6 +1360,8 @@ static int mount_setup_unit(
if (r < 0)
return r;
+ isnetwork = fstype_is_network(fstype);
+
u = manager_get_unit(m, e);
if (!u) {
delete = true;
@@ -1419,7 +1423,7 @@ static int mount_add_one(
if (m->running_as == SYSTEMD_SYSTEM) {
@@ -1385,7 +1389,7 @@ static int mount_setup_unit(
if (m->running_as == MANAGER_SYSTEM) {
const char* 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);
if (r < 0)
goto fail;
@@ -1505,6 +1509,32 @@ static int mount_add_one(
@@ -1471,6 +1475,32 @@ static int mount_setup_unit(
goto fail;
}
@ -296,7 +308,7 @@ Index: systemd-218/src/core/mount.c
+ else {
+ r = unit_add_dependency_by_name(u, UNIT_AFTER, target, NULL, true);
+ 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));
+ }
+ }
@ -306,7 +318,7 @@ Index: systemd-218/src/core/mount.c
if (changed)
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)
r = k;
}
@ -314,15 +326,3 @@ Index: systemd-218/src/core/mount.c
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
@@ -525,6 +525,12 @@ int session_start(Session *s) {
---
src/login/logind-session.c | 6 ++++++
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)
return r;

View File

@ -1,13 +1,13 @@
---
src/login/logind-action.c | 5 +++++
src/login/logind-dbus.c | 20 ++++++++++++++++----
2 files changed, 21 insertions(+), 4 deletions(-)
src/login/logind-dbus.c | 31 +++++++++++++++++++++++--------
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-218/src/login/logind-action.c
@@ -83,6 +83,11 @@ int manager_handle_action(
--- systemd-221.orig/src/login/logind-action.c
+++ systemd-221/src/login/logind-action.c
@@ -85,6 +85,11 @@ int manager_handle_action(
/* If the key handling is inhibited, don't do anything */
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)) {
log_debug("Refusing operation, %s is inhibited.", inhibit_what_to_string(inhibit_key));
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-218/src/login/logind-dbus.c
@@ -1487,9 +1487,11 @@ static int method_do_shutdown_or_sleep(
sd_bus_error *error) {
--- systemd-221.orig/src/login/logind-dbus.c
+++ systemd-221/src/login/logind-dbus.c
@@ -1625,12 +1625,13 @@ static int verify_shutdown_creds(
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;
- bool multiple_sessions, blocked;
+ bool multiple_sessions, blocked, shutdown_through_acpi;
int interactive, r;
uid_t uid;
+ int fd;
- int r;
+ int r, fd;
+ struct stat buf;
assert(m);
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;
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);
+ 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);
+ unlink ("/run/systemd/acpi-shutdown");
+ }
+ else
+ shutdown_through_acpi = false;
+
+
+ if (multiple_sessions && !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, &m->polkit_registry, error);
+ if (multiple_sessions && action_multiple_sessions &&
+ !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0)
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 */
}
- if (blocked) {
+ if (blocked && !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, &m->polkit_registry, error);
- if (blocked && action_ignore_inhibit) {
+ if (blocked && action_ignore_inhibit && !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0)
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 */
}
- if (!multiple_sessions && !blocked) {
+ if (!multiple_sessions && !blocked && !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, &m->polkit_registry, error);
- if (!multiple_sessions && !blocked && action) {
+ if (!multiple_sessions && !blocked && action &&
+ !shutdown_through_acpi) {
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, UID_INVALID, &m->polkit_registry, error);
if (r < 0)
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 () {
local units=("$@")
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
---
pam_systemd.c | 19 +++++++++++++++++++
src/login/pam_systemd.c | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
--- systemd-209/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
Index: systemd-221/src/login/pam_systemd.c
===================================================================
--- 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);
if (r != PAM_SUCCESS)
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 @@
<xsl:text>"</xsl:text>
</xsl:template>

View File

@ -2,9 +2,15 @@
| Belongs to bnc#849071 that is do not install console-shell.service
| 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
@@ -26,6 +26,3 @@ StandardError=inherit
---
units/console-shell.service.m4.in | 3 ---
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
IgnoreSIGPIPE=no
SendSIGHUP=yes

View File

@ -13,10 +13,10 @@ No word on compression…
src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++
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/src/journal/journald-server.c
--- systemd-221.orig/src/journal/journald-server.c
+++ systemd-221/src/journal/journald-server.c
@@ -21,6 +21,7 @@
#include <sys/signalfd.h>
@ -25,7 +25,7 @@ Index: systemd/src/journal/journald-server.c
#include <linux/sockios.h>
#include <sys/statvfs.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);
}
@ -64,7 +64,7 @@ Index: systemd/src/journal/journald-server.c
static int system_journal_open(Server *s, bool flush_requested) {
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);
(void) mkdir(fn, 0755);

View File

@ -12,10 +12,10 @@
shell-completion/bash/udevadm | 6 +++++-
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/shell-completion/bash/coredumpctl
--- systemd-221.orig/shell-completion/bash/coredumpctl
+++ systemd-221/shell-completion/bash/coredumpctl
@@ -44,6 +44,10 @@ _coredumpctl() {
[DUMP]='dump gdb'
)
@ -33,10 +33,10 @@ Index: systemd/shell-completion/bash/coredumpctl
-complete -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/shell-completion/bash/hostnamectl
--- systemd-221.orig/shell-completion/bash/hostnamectl
+++ systemd-221/shell-completion/bash/hostnamectl
@@ -30,6 +30,10 @@ _hostnamectl() {
local OPTS='-h --help --version --transient --static --pretty
--no-ask-password -H --host --machine'
@ -54,10 +54,10 @@ Index: systemd/shell-completion/bash/hostnamectl
-complete -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/shell-completion/bash/journalctl
--- systemd-221.orig/shell-completion/bash/journalctl
+++ systemd-221/shell-completion/bash/journalctl
@@ -55,6 +55,10 @@ _journalctl() {
--root --machine'
)
@ -75,10 +75,10 @@ Index: systemd/shell-completion/bash/journalctl
-complete -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/shell-completion/bash/kernel-install
--- systemd-221.orig/shell-completion/bash/kernel-install
+++ systemd-221/shell-completion/bash/kernel-install
@@ -18,11 +18,22 @@
# You should have received a copy of the GNU Lesser General Public License
# 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 -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/shell-completion/bash/localectl
--- systemd-221.orig/shell-completion/bash/localectl
+++ systemd-221/shell-completion/bash/localectl
@@ -36,6 +36,10 @@ _localectl() {
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
-H --host --machine'
@ -129,10 +129,10 @@ Index: systemd/shell-completion/bash/localectl
-complete -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/shell-completion/bash/loginctl
--- systemd-221.orig/shell-completion/bash/loginctl
+++ systemd-221/shell-completion/bash/loginctl
@@ -38,6 +38,10 @@ _loginctl () {
[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 -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/shell-completion/bash/systemctl.in
--- systemd-221.orig/shell-completion/bash/systemctl.in
+++ systemd-221/shell-completion/bash/systemctl.in
@@ -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
@ -165,16 +165,16 @@ Index: systemd/shell-completion/bash/systemctl.in
if __contains_word "--user" ${COMP_WORDS[*]}; then
mode=--user
else
@@ -264,4 +268,4 @@ _systemctl () {
@@ -268,4 +272,4 @@ _systemctl () {
return 0
}
-complete -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/shell-completion/bash/systemd-analyze
--- systemd-221.orig/shell-completion/bash/systemd-analyze
+++ systemd-221/shell-completion/bash/systemd-analyze
@@ -47,6 +47,10 @@ _systemd_analyze() {
[VERIFY]='verify'
)
@ -192,10 +192,10 @@ Index: systemd/shell-completion/bash/systemd-analyze
-complete -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/shell-completion/bash/systemd-run
--- systemd-221.orig/shell-completion/bash/systemd-run
+++ systemd-221/shell-completion/bash/systemd-run
@@ -17,6 +17,13 @@
# You should have received a copy of the GNU Lesser General Public License
# 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 -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/shell-completion/bash/timedatectl
--- systemd-221.orig/shell-completion/bash/timedatectl
+++ systemd-221/shell-completion/bash/timedatectl
@@ -30,6 +30,10 @@ _timedatectl() {
local OPTS='-h --help --version --adjust-system-clock --no-pager
--no-ask-password -H --host --machine'
@ -249,10 +249,10 @@ Index: systemd/shell-completion/bash/timedatectl
-complete -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/shell-completion/bash/udevadm
--- systemd-221.orig/shell-completion/bash/udevadm
+++ systemd-221/shell-completion/bash/udevadm
@@ -36,6 +36,10 @@ _udevadm() {
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 ++++++++++++++++++++++++++++++----------
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-218/src/udev/udev-builtin-path_id.c
@@ -426,6 +426,46 @@ static struct udev_device *handle_scsi_h
--- systemd-221.orig/src/udev/udev-builtin-path_id.c
+++ systemd-221/src/udev/udev-builtin-path_id.c
@@ -447,6 +447,46 @@ static struct udev_device *handle_scsi_h
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) {
const char *devtype;
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;
}

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)
---
rules/60-persistent-storage.rules | 4 ++++
rules/60-persistent-storage.rules | 4 ++++
1 file changed, 4 insertions(+)
--- systemd-206.orig/rules/60-persistent-storage.rules
+++ systemd-206/rules/60-persistent-storage.rules
@@ -42,6 +42,10 @@ KERNEL=="cciss*", ENV{DEVTYPE}=="disk",
Index: systemd-221/rules/60-persistent-storage.rules
===================================================================
--- 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*|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_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]", 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 ++
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-218/src/udev/udevd.c
@@ -1468,6 +1468,8 @@ int main(int argc, char *argv[]) {
dev = udev_monitor_receive_device(monitor);
if (dev != NULL) {
udev_device_set_usec_initialized(dev, now(CLOCK_MONOTONIC));
+ if (rules == NULL)
+ rules = udev_rules_new(udev, arg_resolve_names);
if (event_queue_insert(dev) < 0)
udev_device_unref(dev);
}
--- systemd-221.orig/src/udev/udevd.c
+++ systemd-221/src/udev/udevd.c
@@ -917,6 +917,8 @@ static int on_uevent(sd_event_source *s,
dev = udev_monitor_receive_device(manager->monitor);
if (dev) {
udev_device_ensure_usec_initialized(dev, NULL);
+ if (manager->rules == NULL)
+ manager->rules = udev_rules_new(manager->udev, arg_resolve_names);
r = event_queue_insert(manager, 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 ++++-
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/rules/60-cdrom_id.rules
--- systemd-221.orig/rules/60-cdrom_id.rules
+++ systemd-221/rules/60-cdrom_id.rules
@@ -20,6 +20,9 @@ IMPORT{program}="cdrom_id --lock-media $
# stale mounts after ejecting
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(-)
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-218/src/udev/udev-event.c
@@ -767,20 +767,53 @@ out:
--- systemd-221.orig/src/udev/udev-event.c
+++ systemd-221/src/udev/udev-event.c
@@ -796,20 +796,53 @@ out:
static int rename_netif(struct udev_event *event) {
struct udev_device *dev = event->dev;
char name[IFNAMSIZ];
@ -50,7 +50,7 @@ Index: systemd-218/src/udev/udev-event.c
+ oldname, interim, strerror(-r));
+ return r;
+ }
+
+
+ /* log temporary name */
+ log_info("renamed network interface %s to %s\n", oldname, interim);
+

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 @@
+# do not edit this file, it will be overwritten on update
+
@ -13,16 +35,3 @@
+
+#
+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.
---
rules/64-btrfs.rules | 1 +
rules/64-btrfs.rules | 1 +
1 file changed, 1 insertion(+)
diff --git a/rules/64-btrfs.rules b/rules/64-btrfs.rules
index fe01001..57631bc 100644
--- a/rules/64-btrfs.rules
+++ b/rules/64-btrfs.rules
Index: systemd-221/rules/64-btrfs.rules
===================================================================
--- systemd-221.orig/rules/64-btrfs.rules
+++ systemd-221/rules/64-btrfs.rules
@@ -3,6 +3,7 @@
SUBSYSTEM!="block", 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
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.
---
rules/60-persistent-storage.rules | 7 +++++--
rules/60-persistent-storage.rules | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/rules/60-persistent-storage.rules b/rules/60-persistent-storage.rules
index 1208bd3..fd5bedd 100644
--- a/rules/60-persistent-storage.rules
+++ b/rules/60-persistent-storage.rules
@@ -39,8 +39,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{builtin
# scsi devices
Index: systemd-221/rules/60-persistent-storage.rules
===================================================================
--- systemd-221.orig/rules/60-persistent-storage.rules
+++ systemd-221/rules/60-persistent-storage.rules
@@ -33,8 +33,8 @@ KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}!
# SCSI devices
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=="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
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}=="", \
IMPORT{builtin}="blkid --noraid"
@ -38,6 +38,3 @@ index 1208bd3..fd5bedd 100644
# probe filesystem metadata of disks
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
@@ -22,8 +22,6 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{id
---
rules/42-usb-hid-pm.rules | 2 --
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"
# IBM remote access

View File

@ -12,21 +12,18 @@ References: bnc#881942
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(+)
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
index db72373..11ee262 100644
--- a/rules/99-systemd.rules.in
+++ b/rules/99-systemd.rules.in
@@ -11,6 +11,7 @@ SUBSYSTEM=="tty", KERNEL=="tty[a-zA-Z]*|hvc*|xvc*|hvsi*|ttysclp*|sclp_line*|3270
Index: systemd-221/rules/99-systemd.rules.in
===================================================================
--- systemd-221.orig/rules/99-systemd.rules.in
+++ systemd-221/rules/99-systemd.rules.in
@@ -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"
+SUBSYSTEM=="block", KERNEL!="ram*", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end"
SUBSYSTEM=="block", KERNEL!="ram*", TAG+="systemd"
SUBSYSTEM=="block", KERNEL!="ram*", ENV{DM_UDEV_DISABLE_OTHER_RULES_FLAG}=="1", ENV{SYSTEMD_READY}="0"
+SUBSYSTEM=="block", ENV{SYSTEMD_READY}=="0", GOTO="systemd_end"
SUBSYSTEM=="block", TAG+="systemd"
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)
--- systemd-210/src/udev/udevd.c
+++ systemd-210/src/udev/udevd.c 2014-06-18 12:53:34.454235577 +0000
@@ -744,7 +744,8 @@ static int synthesize_change(struct udev
---
src/udev/udevd.c | 3 ++-
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)) &&
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 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- a/rules/64-btrfs.rules
+++ b/rules/64-btrfs.rules
Index: systemd-221/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
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-210/rules/50-udev-default.rules
@@ -66,4 +66,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st
--- systemd-221.orig/rules/50-udev-default.rules
+++ systemd-221/rules/50-udev-default.rules
@@ -74,4 +74,6 @@ KERNEL=="tun", MODE="0666", OPTIONS+="st
KERNEL=="fuse", MODE="0666", OPTIONS+="static_node=fuse"
+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 +++++++++++++------
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/rules/60-persistent-storage.rules
@@ -46,6 +46,10 @@ KERNEL=="sd*|cciss*", ENV{DEVTYPE}=="par
--- systemd-221.orig/rules/60-persistent-storage.rules
+++ systemd-221/rules/60-persistent-storage.rules
@@ -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_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_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]", 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/src/udev/scsi_id/scsi_id.c
--- systemd-221.orig/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[] = {
{ "replace-whitespace", no_argument, NULL, 'u' },
{ "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);
printf("%s\n", serial_str);
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/src/udev/scsi_id/scsi_id.h
@@ -43,6 +43,7 @@ struct scsi_id_device {
--- systemd-221.orig/src/udev/scsi_id/scsi_id.h
+++ systemd-221/src/udev/scsi_id/scsi_id.h
@@ -45,6 +45,7 @@ struct scsi_id_device {
char kernel[64];
char serial[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;
/* 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/src/udev/scsi_id/scsi_serial.c
@@ -96,7 +96,8 @@ static const char hex_str[]="0123456789a
--- systemd-221.orig/src/udev/scsi_id/scsi_serial.c
+++ systemd-221/src/udev/scsi_id/scsi_serial.c
@@ -97,7 +97,8 @@ static const char hex_str[]="0123456789a
static int do_scsi_page80_inquiry(struct udev *udev,
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,
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];
/* 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);
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 */
static int do_scsi_page80_inquiry(struct udev *udev,
struct scsi_id_device *dev_scsi, int fd,
@ -139,7 +139,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
{
int retval;
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]);
if (ser_ind < 0)
return 1;
@ -155,7 +155,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
}
if (serial_short != NULL) {
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;
if (page_code == PAGE_80) {
@ -164,7 +164,7 @@ Index: systemd/src/udev/scsi_id/scsi_serial.c
retval = 1;
goto completed;
} 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++)
if (page0[ind] == PAGE_80)
if (!do_scsi_page80_inquiry(udev, dev_scsi, fd,

View File

@ -3,22 +3,22 @@
rules/60-ssd-scheduler.rules | 11 +++++++++++
2 files changed, 12 insertions(+)
Index: systemd/Makefile.am
Index: systemd-221/Makefile.am
===================================================================
--- systemd.orig/Makefile.am
+++ systemd/Makefile.am
@@ -3576,6 +3576,7 @@ dist_udevrules_DATA += \
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -3501,6 +3501,7 @@ dist_udevrules_DATA += \
rules/60-persistent-input.rules \
rules/60-persistent-alsa.rules \
rules/60-persistent-storage.rules \
+ rules/60-ssd-scheduler.rules \
rules/60-serial.rules \
rules/64-btrfs.rules \
rules/70-mouse.rules \
rules/70-touchpad.rules \
Index: systemd/rules/60-ssd-scheduler.rules
Index: systemd-221/rules/60-ssd-scheduler.rules
===================================================================
--- /dev/null
+++ systemd/rules/60-ssd-scheduler.rules
+++ systemd-221/rules/60-ssd-scheduler.rules
@@ -0,0 +1,11 @@
+# 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 ++
4 files changed, 96 insertions(+)
Index: systemd/Makefile.am
Index: systemd-221/Makefile.am
===================================================================
--- systemd.orig/Makefile.am
+++ systemd/Makefile.am
@@ -3862,6 +3862,25 @@ EXTRA_DIST += \
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -3754,6 +3754,25 @@ EXTRA_DIST += \
# ------------------------------------------------------------------------------
@ -35,10 +35,10 @@ Index: systemd/Makefile.am
ata_id_SOURCES = \
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
+++ systemd/src/udev/rootsymlink_generator/rootsymlink_generator.c
+++ systemd-221/src/udev/rootsymlink_generator/rootsymlink_generator.c
@@ -0,0 +1,57 @@
+/*
+ * 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 0;
+}
Index: systemd/units/systemd-udev-root-symlink.service
Index: systemd-221/units/systemd-udev-root-symlink.service
===================================================================
--- /dev/null
+++ systemd/units/systemd-udev-root-symlink.service
+++ systemd-221/units/systemd-udev-root-symlink.service
@@ -0,0 +1,10 @@
+[Unit]
+Description=Rule generator for /dev/root symlink
@ -112,10 +112,10 @@ Index: systemd/units/systemd-udev-root-symlink.service
+Type=oneshot
+RemainAfterExit=yes
+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
+++ systemd/units/systemd-udev-root-symlink.service.in
+++ systemd-221/units/systemd-udev-root-symlink.service.in
@@ -0,0 +1,10 @@
+[Unit]
+Description=Rule generator for /dev/root symlink

View File

@ -2,25 +2,25 @@
src/udev/udevd.c | 4 ++--
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-218/src/udev/udevd.c
@@ -446,7 +446,7 @@ static void event_run(struct event *even
--- systemd-221.orig/src/udev/udevd.c
+++ systemd-221/src/udev/udevd.c
@@ -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)
- log_debug("maximum number (%i) of children reached", children);
+ log_error("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", hashmap_size(manager->workers));
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;
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;
}
}
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-219/units/systemd-networkd.service.in
@@ -29,4 +29,5 @@ WatchdogSec=1min
--- systemd-221.orig/units/systemd-networkd.service.m4.in
+++ systemd-221/units/systemd-networkd.service.m4.in
@@ -34,4 +34,5 @@ WatchdogSec=1min
[Install]
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 ++++---
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-218/tmpfiles.d/legacy.conf
--- systemd-221.orig/tmpfiles.d/legacy.conf
+++ systemd-221/tmpfiles.d/legacy.conf
@@ -10,13 +10,14 @@
# These files are considered legacy and are unnecessary on legacy-free
# 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 -
# /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

View File

@ -7,19 +7,19 @@ forward suspend/hibernation calls to pm-utils, if installed (bnc#790157)
src/sleep/sleep.c | 27 ++++++++++++++++++++++-----
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/src/sleep/sleep.c
@@ -24,6 +24,7 @@
--- systemd-221.orig/src/sleep/sleep.c
+++ systemd-221/src/sleep/sleep.c
@@ -23,6 +23,7 @@
#include <stdio.h>
#include <errno.h>
#include <string.h>
#include <getopt.h>
+#include <stdlib.h>
#include "sd-id128.h"
#include "sd-messages.h"
@@ -36,6 +37,8 @@
#include "log.h"
@@ -34,6 +35,8 @@
#include "def.h"
static char* arg_verb = NULL;
@ -28,7 +28,7 @@ Index: systemd/src/sleep/sleep.c
static int write_mode(char **modes) {
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)
r = k;
}
@ -39,7 +39,7 @@ Index: systemd/src/sleep/sleep.c
return r;
}
@@ -97,6 +96,8 @@ static int execute(char **modes, char **
@@ -95,6 +94,8 @@ static int execute(char **modes, char **
int r;
_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,
* we can abort before modifying any state. */
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);
if (r < 0)
return r;
@ -56,7 +56,7 @@ Index: systemd/src/sleep/sleep.c
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..."),
"SLEEP=%s", arg_verb,
NULL);
@ -68,7 +68,7 @@ Index: systemd/src/sleep/sleep.c
if (r < 0)
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;
@ -76,7 +76,7 @@ Index: systemd/src/sleep/sleep.c
assert(argc >= 0);
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;
}

View File

@ -4,13 +4,15 @@ Subject: allow multiple sulogin to be started
allows multiple sulogin instance (bnc#793182).
---
units/getty@.service.m4 | 1 +
units/rescue.target | 1 +
units/serial-getty@.service.m4 | 1 +
units/getty@.service.m4 | 1 +
units/rescue.target | 1 +
units/serial-getty@.service.m4 | 1 +
3 files changed, 3 insertions(+)
--- systemd-206.orig/units/getty@.service.m4
+++ systemd-206/units/getty@.service.m4
Index: systemd-221/units/getty@.service.m4
===================================================================
--- systemd-221.orig/units/getty@.service.m4
+++ systemd-221/units/getty@.service.m4
@@ -9,6 +9,7 @@
Description=Getty on %I
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
m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service
--- systemd-206.orig/units/rescue.target
+++ systemd-206/units/rescue.target
Index: systemd-221/units/rescue.target
===================================================================
--- systemd-221.orig/units/rescue.target
+++ systemd-221/units/rescue.target
@@ -10,6 +10,7 @@ Description=Rescue Mode
Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service
@ -29,8 +33,10 @@ allows multiple sulogin instance (bnc#793182).
AllowIsolate=yes
[Install]
--- systemd-206.orig/units/serial-getty@.service.m4
+++ systemd-206/units/serial-getty@.service.m4
Index: systemd-221/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
Documentation=man:agetty(8) man:systemd-getty-generator(8)
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).
---
logind-acl.c | 12 ++++++++++++
src/login/logind-acl.c | 12 ++++++++++++
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-210/src/login/logind-acl.c
@@ -283,5 +283,17 @@ int devnode_acl_all(struct udev *udev,
--- systemd-221.orig/src/login/logind-acl.c
+++ systemd-221/src/login/logind-acl.c
@@ -285,5 +285,17 @@ int devnode_acl_all(struct udev *udev,
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).
---
src/login/logind-acl.c | 2 ++
src/login/logind-acl.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/login/logind-acl.c b/src/login/logind-acl.c
index 54bc16b..a40af21 100644
--- a/src/login/logind-acl.c
+++ b/src/login/logind-acl.c
Index: systemd-221/src/login/logind-acl.c
===================================================================
--- systemd-221.orig/src/login/logind-acl.c
+++ systemd-221/src/login/logind-acl.c
@@ -295,6 +295,8 @@ int devnode_acl_all(struct udev *udev,
if (devnode_acl(devname, flush, del, old_uid, add, new_uid) < 0)
break;
@ -21,6 +21,3 @@ index 54bc16b..a40af21 100644
}
return r;
--
1.8.4.5

View File

@ -1,8 +1,28 @@
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
@@ -1780,7 +1780,8 @@ static int manager_dispatch_jobs_in_prog
---
src/basic/def.h | 2 +-
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(source);
@ -12,14 +32,3 @@ Nasty bug reported on bnc#867663
next = now(CLOCK_MONOTONIC) + JOBS_IN_PROGRESS_PERIOD_USEC;
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
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
Documentation=man:systemd.special(7)
DefaultDependencies=no

View File

@ -5,6 +5,7 @@ systemd
# postun "if [ "$1" == "0" ]; then"
# postun "<prefix>%{_sbindir}/pam-config -d --systemd || :"
# postun "fi"
libgudev-1_0-0
libsystemd0
libudev1
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
+++ systemd-210-mod/units/rc-local.service.in 2014-03-25 08:34:40.317587764 +0100
---
units/rc-local.service.in | 2 +-
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 @@
[Unit]
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 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--- systemd-206_git201308300826.orig/units/systemd-ask-password-wall.service.in
+++ systemd-206_git201308300826/units/systemd-ask-password-wall.service.in
Index: systemd-221/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 @@
[Unit]
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
---
src/core/hostname-setup.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
src/core/hostname-setup.c | 4 ++++
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-218/src/core/hostname-setup.c
@@ -32,7 +32,7 @@
#include "fileio.h"
static int read_and_strip_hostname(const char *path, char **hn) {
- char *s;
+ char *s, *domain;
--- systemd-221.orig/src/core/hostname-setup.c
+++ systemd-221/src/core/hostname-setup.c
@@ -34,6 +34,7 @@ int hostname_setup(void) {
int r;
_cleanup_free_ char *b = NULL;
const char *hn;
+ char *domain;
bool enoent = false;
assert(path);
@@ -49,6 +49,10 @@ static int read_and_strip_hostname(const
return -ENOENT;
}
r = read_hostname_config("/etc/hostname", &b);
@@ -46,6 +47,9 @@ int hostname_setup(void) {
hn = NULL;
} else
hn = b;
+ /* strip any leftover of a domain name */
+ if ((domain = strchr(s, '.')) != NULL)
+ if ((domain = strchr(hn, '.')) != NULL)
+ *domain = '\0';
+
*hn = s;
return 0;
}
if (isempty(hn)) {
/* 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)
---
src/systemctl/systemctl.c | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
src/systemctl/systemctl.c | 18 +++++++++++++++++-
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-218/src/systemctl/systemctl.c
@@ -5202,8 +5202,26 @@ static int enable_sysv_units(const char
--- systemd-221.orig/src/systemctl/systemctl.c
+++ systemd-221/src/systemctl/systemctl.c
@@ -5165,8 +5165,24 @@ static int enable_sysv_units(const char
p[strlen(p) - strlen(".service")] = 0;
found_sysv = access(p, F_OK) >= 0;
@ -27,14 +27,12 @@ Index: systemd-218/src/systemctl/systemctl.c
+ return -ENOMEM;
+ p[strlen(p) - sizeof(".service") + 1] = 0;
+ found_sysv = access(p, F_OK) >= 0;
+
+ if (!found_sysv) {
+ if (!found_sysv)
+ continue;
+ }
+#else
continue;
+#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>
Date: Fri, 19 Aug 2011 15:29:49 +0000
Original-From: Frederic Crozat <fcrozat@suse.com>
Original-Date: Fri, 19 Aug 2011 15:29:49 +0000
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 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 148 insertions(+), 3 deletions(-)
src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++--
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-218/src/vconsole/vconsole-setup.c
@@ -40,6 +40,7 @@
#include "macro.h"
--- systemd-221.orig/src/vconsole/vconsole-setup.c
+++ systemd-221/src/vconsole/vconsole-setup.c
@@ -35,6 +35,8 @@
#include "log.h"
#include "virt.h"
#include "fileio.h"
+#include "macro.h"
+#include "strv.h"
static bool is_vconsole(int fd) {
unsigned char data[1];
@@ -101,8 +102,8 @@ static int enable_utf8(int fd) {
#include "process-util.h"
#include "terminal-util.h"
#include "signal-util.h"
@@ -99,8 +101,10 @@ static int enable_utf8(int fd) {
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];
+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];
int i = 0;
int i = 0, r;
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;
if (map_toggle)
args[i++] = map_toggle;
@ -39,23 +44,23 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
args[i++] = NULL;
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
+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];
+ int i = 0, j = 0;
+ unsigned int i = 0, j = 0;
+ int ret;
+ pid_t pid;
+ char **strv_compose_table = NULL;
+ char *to_free[1024];
+
+ if (isempty(compose_table)) {
+ /* An empty map means no compose table*/
+ *_pid = 0;
+ return 0;
+ }
+ if (isempty(compose_table))
+ /* An empty map means no compose table */
+ return 1;
+
+ args[i++] = KBD_LOADKEYS;
+ args[i++] = "-q";
@ -69,50 +74,51 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ char **name;
+ char *arg;
+
+ STRV_FOREACH (name, strv_compose_table) {
+ if (streq(*name,"-c") || streq(*name,"clear")) {
+ STRV_FOREACH(name, strv_compose_table) {
+ if (streq(*name, "-c") || streq(*name, "clear")) {
+ compose_clear = true;
+ continue;
+ }
+ if (!compose_loaded) {
+ if (compose_clear)
+ args[i++] = "-c";
+ }
+ asprintf(&arg, "compose.%s",*name);
+ if (!compose_loaded && compose_clear)
+ args[i++] = "-c";
+ asprintf(&arg, "compose.%s", *name);
+ compose_loaded = true;
+ args[i++] = to_free[j++] = arg;
+
+ if (i >= ELEMENTSOF(args) - 1)
+ break;
+ }
+ strv_free(strv_compose_table);
+ }
+ args[i++] = NULL;
+
+ if ((pid = fork()) < 0) {
+ log_error("Failed to fork: %m");
+ return -errno;
+ } else if (pid == 0) {
+ pid = fork();
+ if (pid < 0)
+ return log_error_errno(errno, "Failed to fork: %m");
+ if (pid == 0) {
+ reset_all_signal_handlers();
+ reset_signal_mask();
+ execv(args[0], (char **) args);
+ _exit(EXIT_FAILURE);
+ }
+
+ *_pid = pid;
+
+ for (i=0 ; i < j ; i++)
+ free (to_free[i]);
+
+ return 0;
+ ret = wait_for_terminate_and_warn(args[0], pid, true);
+ for (i = 0; i < j; ++i)
+ free(to_free[i]);
+ if (ret < 0)
+ return ret;
+ return ret == 0;
+}
+#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];
+ int i = 0;
+ int i = 0, ret;
+ pid_t pid;
+
+ if (isempty(kbd_rate) && isempty(kbd_delay)) {
+ *_pid = 0;
+ return 0;
+ }
+ if (isempty(kbd_rate) && isempty(kbd_delay))
+ return 1;
+
+ args[i++] = "/bin/kbdrate";
+ if (!isempty(kbd_rate)) {
@ -126,16 +132,19 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ args[i++] = "-s";
+ args[i++] = NULL;
+
+ if ((pid = fork()) < 0) {
+ log_error("Failed to fork: %m");
+ return -errno;
+ } else if (pid == 0) {
+ pid = fork();
+ if (pid < 0)
+ return log_error_errno(errno, "Failed to fork: %m");
+ if (pid == 0) {
+ reset_all_signal_handlers();
+ reset_signal_mask();
+ execv(args[0], (char **) args);
+ _exit(EXIT_FAILURE);
+ }
+
+ *_pid = pid;
+ return 0;
+ ret = wait_for_terminate_and_warn(args[0], pid, true);
+ if (ret < 0)
+ return ret;
+ return ret == 0;
+}
+
int main(int argc, char **argv) {
@ -147,13 +156,13 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ _cleanup_free_ char
+ *vc_kbd_delay = NULL, *vc_kbd_rate = NULL,
+ *vc_kbd_disable_caps_lock = NULL, *vc_compose_table = NULL;
+ pid_t kbd_rate_pid = 0, compose_table_pid = 0;
+#endif
+ bool disable_capslock = false;
+ bool comp_ok, rate_ok;
_cleanup_close_ int fd = -1;
bool utf8;
pid_t font_pid = 0, keymap_pid = 0;
@@ -273,6 +378,28 @@ int main(int argc, char **argv) {
bool utf8, font_copy = false, font_ok, keyboard_ok;
int r = EXIT_FAILURE;
@@ -281,6 +393,31 @@ int main(int argc, char **argv) {
utf8 = is_locale_utf8();
@ -166,7 +175,8 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ "COMPOSETABLE", &vc_compose_table,
+ NULL);
+ 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,
+ "CONSOLE_FONT", &vc_font,
@ -174,45 +184,33 @@ Index: systemd-218/src/vconsole/vconsole-setup.c
+ "CONSOLE_UNICODEMAP", &vc_font_unimap,
+ NULL);
+ 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;
+#endif
+ disable_capslock = vc_kbd_disable_caps_lock &&
+ strcasecmp(vc_kbd_disable_caps_lock, "YES") == 0;
+#endif /* HAVE_SYSV_COMPAT */
+
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
"KEYMAP", &vc_keymap,
"KEYMAP_TOGGLE", &vc_keymap_toggle,
@@ -312,14 +439,32 @@ int main(int argc, char **argv) {
if (font_pid > 0)
wait_for_terminate_and_warn(KBD_SETFONT, font_pid, true);
@@ -312,11 +449,17 @@ int main(int argc, char **argv) {
(void) disable_utf8(fd);
- r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, disable_capslock, &keymap_pid);
if (r < 0) {
log_error_errno(r, "Failed to start " KBD_LOADKEYS ": %m");
return EXIT_FAILURE;
}
font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
- keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle, utf8) > 0;
+ keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
+ utf8, disable_capslock) > 0;
+#ifdef HAVE_SYSV_COMPAT
+ r = load_compose_table(vc, vc_compose_table, &compose_table_pid);
+ if (r < 0) {
+ 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;
+ }
+ comp_ok = compose_load_and_wait(vc, vc_compose_table);
+ rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
+#endif
if (keymap_pid > 0)
wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid, true);
+#ifdef HAVE_SYSV_COMPAT
+ 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 executed setfont successfully */
if (font_copy && font_ok)
(void) font_copy_to_all_vcs(fd);
/* Only copy the font when we started setfont successfully */
if (font_copy && font_pid > 0)
- return font_ok && keyboard_ok ? EXIT_SUCCESS : EXIT_FAILURE;
+ 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 -
5 files changed, 94 insertions(+), 3 deletions(-)
Index: systemd-218/Makefile.am
Index: systemd-221/Makefile.am
===================================================================
--- systemd-218.orig/Makefile.am
+++ systemd-218/Makefile.am
@@ -3715,6 +3715,19 @@ dist_udevrules_DATA += \
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -3813,6 +3813,19 @@ dist_udevrules_DATA += \
rules/61-accelerometer.rules
# ------------------------------------------------------------------------------
@ -35,13 +35,13 @@ Index: systemd-218/Makefile.am
+ rules/73-seat-numlock.rules
+
+# ------------------------------------------------------------------------------
if ENABLE_GUDEV
if ENABLE_GTK_DOC
SUBDIRS += \
Index: systemd-218/rules/73-seat-numlock.rules
mtd_probe_SOURCES = \
src/udev/mtd_probe/mtd_probe.c \
src/udev/mtd_probe/mtd_probe.h \
Index: systemd-221/rules/73-seat-numlock.rules
===================================================================
--- /dev/null
+++ systemd-218/rules/73-seat-numlock.rules
+++ systemd-221/rules/73-seat-numlock.rules
@@ -0,0 +1,8 @@
+# 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.
+
+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
+++ systemd-218/src/login/numlock-on.c
+++ systemd-221/src/login/numlock-on.c
@@ -0,0 +1,34 @@
+/*
+ * numlock-on.c: Turn numlock-on
@ -90,13 +90,13 @@ Index: systemd-218/src/login/numlock-on.c
+
+ 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-218/src/vconsole/vconsole-setup.c
@@ -42,6 +42,10 @@
#include "fileio.h"
#include "strv.h"
--- systemd-221.orig/src/vconsole/vconsole-setup.c
+++ systemd-221/src/vconsole/vconsole-setup.c
@@ -41,6 +41,10 @@
#include "terminal-util.h"
#include "signal-util.h"
+#define BIOS_DATA_AREA 0x400
+#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) {
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
_cleanup_free_ char
*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_numlock = NULL;
pid_t kbd_rate_pid = 0, compose_table_pid = 0;
#endif
- bool disable_capslock = false;
+ bool disable_capslock = false, numlock = false;
bool comp_ok, rate_ok;
_cleanup_close_ int fd = -1;
bool utf8;
pid_t font_pid = 0, keymap_pid = 0;
@@ -384,6 +389,7 @@ int main(int argc, char **argv) {
bool utf8, font_copy = false, font_ok, keyboard_ok;
@@ -399,6 +404,7 @@ int main(int argc, char **argv) {
"KBD_DELAY", &vc_kbd_delay,
"KBD_RATE", &vc_kbd_rate,
"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,
NULL);
if (r < 0 && r != -ENOENT)
@@ -398,6 +404,32 @@ int main(int argc, char **argv) {
log_warning("Failed to read /etc/sysconfig/console: %s", strerror(-r));
@@ -416,6 +422,32 @@ int main(int argc, char **argv) {
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 (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) {
+ int _cleanup_close_ fdmem;
+ char c;
+ if (vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "bios")) {
+ int _cleanup_close_ fdmem;
+ char c;
+
+ fdmem = open ("/dev/mem", O_RDONLY);
+ if (fdmem < 0) {
+ log_error("Failed to open /dev/mem: %m");
+ return EXIT_FAILURE;
+ }
+ fdmem = open ("/dev/mem", O_RDONLY);
+ if (fdmem < 0) {
+ log_error("Failed to open /dev/mem: %m");
+ return EXIT_FAILURE;
+ }
+
+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
+ log_error("Failed to seek /dev/mem: %m");
+ return EXIT_FAILURE;
+ }
+ if (lseek(fdmem, BIOS_DATA_AREA + BDA_KEYBOARD_STATUS_FLAGS_4, SEEK_SET) == (off_t) -1) {
+ log_error("Failed to seek /dev/mem: %m");
+ return EXIT_FAILURE;
+ }
+
+ if (read (fdmem, &c, sizeof(char)) == -1) {
+ log_error("Failed to read /dev/mem: %m");
+ return EXIT_FAILURE;
+ }
+ if (read(fdmem, &c, sizeof(char)) == -1) {
+ log_error("Failed to read /dev/mem: %m");
+ return EXIT_FAILURE;
+ }
+
+ if (c & BDA_KSF4_NUMLOCK_MASK)
+ numlock = true;
+ } else
+#endif
+ numlock = vc_kbd_numlock && strcaseeq(vc_kbd_numlock, "yes");
#endif
+ if (c & BDA_KSF4_NUMLOCK_MASK)
+ numlock = true;
+ }
+#endif /* x86 */
#endif /* HAVE_SYSV_COMPAT */
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
@@ -444,6 +476,10 @@ int main(int argc, char **argv) {
log_error_errno(r, "Failed to start " KBD_LOADKEYS ": %m");
return EXIT_FAILURE;
}
@@ -451,6 +483,10 @@ int main(int argc, char **argv) {
font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
keyboard_ok = keyboard_load_and_wait(vc, vc_keymap, vc_keymap_toggle,
utf8, disable_capslock) > 0;
+ if (numlock)
+ touch("/run/numlock-on");
+ else
+ unlink("/run/numlock-on");
#ifdef HAVE_SYSV_COMPAT
r = load_compose_table(vc, vc_compose_table, &compose_table_pid);
if (r < 0) {
Index: systemd-218/units/systemd-vconsole-setup.service.in
comp_ok = compose_load_and_wait(vc, vc_compose_table);
rate_ok = kbdrate_set_and_wait(vc, vc_kbd_rate, vc_kbd_delay);
Index: systemd-221/units/systemd-vconsole-setup.service.in
===================================================================
--- systemd-218.orig/units/systemd-vconsole-setup.service.in
+++ systemd-218/units/systemd-vconsole-setup.service.in
--- systemd-221.orig/units/systemd-vconsole-setup.service.in
+++ systemd-221/units/systemd-vconsole-setup.service.in
@@ -10,7 +10,7 @@ Description=Setup Virtual Console
Documentation=man:systemd-vconsole-setup.service(8) man:vconsole.conf(5)
DefaultDependencies=no

View File

@ -7,11 +7,11 @@ handle ROOT_USES_LANG=ctype (bnc#792182).
src/core/locale-setup.c | 26 ++++++++++++++++++++++++++
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-218/src/core/locale-setup.c
@@ -36,6 +36,11 @@ int locale_setup(char ***environment) {
--- systemd-221.orig/src/core/locale-setup.c
+++ systemd-221/src/core/locale-setup.c
@@ -34,6 +34,11 @@ int locale_setup(char ***environment) {
char **add;
char *variables[_VARIABLE_LC_MAX] = {};
int r = 0, i;
@ -23,7 +23,7 @@ Index: systemd-218/src/core/locale-setup.c
if (detect_container(NULL) <= 0) {
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)
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
src/insserv-generator/Makefile | 28 ++
src/insserv-generator/insserv-generator.c | 312 ++++++++++++++++++++++++++++++
3 files changed, 349 insertions(+)
src/insserv-generator/insserv-generator.c | 315 ++++++++++++++++++++++++++++++
3 files changed, 351 insertions(+), 1 deletion(-)
create mode 100644 src/insserv-generator/Makefile
create mode 100644 src/insserv-generator/insserv-generator.c
--- systemd-219.orig/Makefile.am
+++ systemd-219/Makefile.am
@@ -621,7 +621,8 @@ nodist_systemunit_DATA += \
Index: systemd-221/Makefile.am
===================================================================
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -618,7 +618,8 @@ nodist_systemunit_DATA += \
systemgenerator_PROGRAMS += \
systemd-sysv-generator \
@ -25,23 +27,23 @@ systemd unit drop-in files to add dependencies
endif
EXTRA_DIST += \
@@ -2565,6 +2566,14 @@ systemd_rc_local_generator_LDADD = \
libsystemd-label.la \
libsystemd-shared.la
@@ -2544,6 +2545,12 @@ $(systemd_boot): $(systemd_boot_solib)
endif
endif
+#-------------------------------------------------------------------------------
+systemd_insserv_generator_SOURCES = \
+ src/insserv-generator/insserv-generator.c
+
+systemd_insserv_generator_LDADD = \
+ libsystemd-label.la \
+ libsystemd-shared.la
+systemd_insserv_generator_LDADD = libbasic.la
+
# ------------------------------------------------------------------------------
systemd_remount_fs_SOURCES = \
src/remount-fs/remount-fs.c \
stub_headers = \
src/boot/efi/util.h \
Index: systemd-221/src/insserv-generator/Makefile
===================================================================
--- /dev/null
+++ systemd-219/src/insserv-generator/Makefile
+++ systemd-221/src/insserv-generator/Makefile
@@ -0,0 +1,28 @@
+# This file is part of systemd.
+#
@ -71,9 +73,11 @@ systemd unit drop-in files to add dependencies
+ $(MAKE) -C .. clean
+
+.PHONY: all clean
Index: systemd-221/src/insserv-generator/insserv-generator.c
===================================================================
--- /dev/null
+++ systemd-219/src/insserv-generator/insserv-generator.c
@@ -0,0 +1,312 @@
+++ systemd-221/src/insserv-generator/insserv-generator.c
@@ -0,0 +1,315 @@
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
+
+/***
@ -153,6 +157,7 @@ systemd unit drop-in files to add dependencies
+ unsigned i;
+ char *r;
+ const char *n;
+ int ret;
+
+ assert(name);
+ assert(_r);
@ -182,7 +187,9 @@ systemd unit drop-in files to add dependencies
+ return -EINVAL;
+
+ /* 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))
+ /* Names equaling the file name of the services are redundant */
+ return 0;

View File

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

View File

@ -5,10 +5,10 @@ Date: Tue Jan 20 11:33:59 UTC 2015
src/locale/kbd-model-map | 13 +++++++++++++
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/src/locale/kbd-model-map
--- systemd-221.orig/src/locale/kbd-model-map
+++ systemd-221/src/locale/kbd-model-map
@@ -66,3 +66,16 @@ lt.baltic lt pc105 - terminate:ctrl_a
lt.l4 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 ----
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/Makefile.am
@@ -4789,6 +4789,10 @@ systemd_cryptsetup_CFLAGS = \
$(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*],
--- systemd-221.orig/configure.ac
+++ systemd-221/configure.ac
@@ -194,10 +194,6 @@ AS_CASE([$CC], [*clang*],
-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], [\
- -flto -ffat-lto-objects])],
- [AC_MSG_RESULT([skipping -flto, optimization not enabled])])
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 +
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-218/units/emergency.service.in
--- systemd-221.orig/units/emergency.service.in
+++ systemd-221/units/emergency.service.in
@@ -11,6 +11,7 @@ Documentation=man:sulogin(8)
DefaultDependencies=no
Conflicts=shutdown.target

View File

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

View File

@ -4,10 +4,10 @@
units/rescue.service.in | 3 ++-
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/units/console-shell.service.m4.in
--- systemd-221.orig/units/console-shell.service.m4.in
+++ systemd-221/units/console-shell.service.m4.in
@@ -17,6 +17,8 @@ Before=getty.target
[Service]
Environment=HOME=/root
@ -17,10 +17,10 @@ Index: systemd/units/console-shell.service.m4.in
ExecStart=-@SULOGIN@
ExecStopPost=-@SYSTEMCTL@ poweroff
Type=idle
Index: systemd/units/emergency.service.in
Index: systemd-221/units/emergency.service.in
===================================================================
--- systemd.orig/units/emergency.service.in
+++ systemd/units/emergency.service.in
--- systemd-221.orig/units/emergency.service.in
+++ systemd-221/units/emergency.service.in
@@ -17,7 +17,8 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
@ -29,12 +29,12 @@ Index: systemd/units/emergency.service.in
+ExecStartPre=-/usr/bin/plymouth quit
+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.'
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
Type=idle
Index: systemd/units/rescue.service.in
Index: systemd-221/units/rescue.service.in
===================================================================
--- systemd.orig/units/rescue.service.in
+++ systemd/units/rescue.service.in
--- systemd-221.orig/units/rescue.service.in
+++ systemd-221/units/rescue.service.in
@@ -16,7 +16,8 @@ Before=shutdown.target
[Service]
Environment=HOME=/root
@ -43,5 +43,5 @@ Index: systemd/units/rescue.service.in
+ExecStartPre=-/usr/bin/plymouth quit
+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.'
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --fail --no-block default"
ExecStart=-/bin/sh -c "@SULOGIN@; @SYSTEMCTL@ --job-mode=fail --no-block default"
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 @@
Description=RPC Port Mapper
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
Documentation=man:systemd.special(7)
Requires=emergency.service
After=emergency.service
+Conflicts=getty.target rescue.target
AllowIsolate=yes
--- systemd-210/units/rescue.target
+++ systemd-210/units/rescue.target 2014-04-15 11:14:40.606808928 +0000
Index: systemd-221/units/rescue.target
===================================================================
--- systemd-221.orig/units/rescue.target
+++ systemd-221/units/rescue.target
@@ -10,7 +10,8 @@ Description=Rescue Mode
Documentation=man:systemd.special(7)
Requires=sysinit.target rescue.service

View File

@ -2,11 +2,11 @@
src/fstab-generator/fstab-generator.c | 7 +++++--
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-218/src/fstab-generator/fstab-generator.c
@@ -238,8 +238,11 @@ static int add_mount(
--- systemd-221.orig/src/fstab-generator/fstab-generator.c
+++ systemd-221/src/fstab-generator/fstab-generator.c
@@ -289,8 +289,11 @@ static int add_mount(
"Documentation=man:fstab(5) man:systemd-fstab-generator(8)\n",
source);
@ -18,5 +18,5 @@ Index: systemd-218/src/fstab-generator/fstab-generator.c
+ fprintf(f, "Before=%s\n", post);
+ }
if (passno != 0) {
r = generator_write_fsck_deps(f, arg_dest, what, where, fstype);
if (!automount && opts) {
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-run.mount
Index: systemd-218/Makefile.am
Index: systemd-221/Makefile.am
===================================================================
--- systemd-218.orig/Makefile.am
+++ systemd-218/Makefile.am
@@ -516,6 +516,12 @@ endif
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -526,6 +526,12 @@ dist_systemunit_DATA += \
dist_systemunit_DATA_busnames += \
units/busnames.target
@ -27,9 +27,9 @@ Index: systemd-218/Makefile.am
nodist_systemunit_DATA = \
units/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
RUNLEVEL5_TARGET_WANTS += \
RESCUE_TARGET_WANTS += \
systemd-update-utmp-runlevel.service
+LOCAL_FS_TARGET_WANTS += \
+ var-run.mount \
@ -37,10 +37,10 @@ Index: systemd-218/Makefile.am
endif
SYSINIT_TARGET_WANTS += \
Index: systemd-218/units/var-lock.mount
Index: systemd-221/units/var-lock.mount
===================================================================
--- /dev/null
+++ systemd-218/units/var-lock.mount
+++ systemd-221/units/var-lock.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#
@ -61,10 +61,10 @@ Index: systemd-218/units/var-lock.mount
+Where=/var/lock
+Type=bind
+Options=bind
Index: systemd-218/units/var-run.mount
Index: systemd-221/units/var-run.mount
===================================================================
--- /dev/null
+++ systemd-218/units/var-run.mount
+++ systemd-221/units/var-run.mount
@@ -0,0 +1,19 @@
+# This file is part of systemd.
+#

View File

@ -1,16 +1,18 @@
Use and set default logging console for both journald and kernel messages
---
src/journal/journald-console.c | 96 +++++++++++++++++++++++++++++++++++++++++
src/journal/journald-console.h | 4 +
src/journal/journald-server.c | 5 ++
3 files changed, 105 insertions(+)
src/journal/journald-console.c | 100 +++++++++++++++++++++++++++++++++++++++++
src/journal/journald-console.h | 3 +
src/journal/journald-server.c | 6 ++
3 files changed, 109 insertions(+)
--- systemd-219.orig/src/journal/journald-console.c
+++ systemd-219/src/journal/journald-console.c
@@ -23,6 +23,14 @@
Index: systemd-221/src/journal/journald-console.c
===================================================================
--- 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 <unistd.h>
#include <sys/socket.h>
+#ifdef HAVE_SYSV_COMPAT
+# include <linux/tiocl.h>
@ -23,11 +25,11 @@ Use and set default logging console for both journald and kernel messages
#include "fileio.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;
}
+void defaul_tty_path(Server *s)
+void default_tty_path(Server *s)
+{
+#ifdef HAVE_SYSV_COMPAT
+ 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(
Server *s,
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)
return;
@ -113,7 +115,7 @@ Use and set default logging console for both journald and kernel messages
/* First: timestamp */
if (prefix_timestamp()) {
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);
if (fd < 0) {
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)
--- systemd-219.orig/src/journal/journald-console.h
+++ systemd-219/src/journal/journald-console.h
Index: systemd-221/src/journal/journald-console.h
===================================================================
--- systemd-221.orig/src/journal/journald-console.h
+++ systemd-221/src/journal/journald-console.h
@@ -24,3 +24,6 @@
#include "journald-server.h"
void server_forward_console(Server *s, int priority, const char *identifier, const char *message, const struct ucred *ucred);
+
+void klogconsole(Server *s);
+void defaul_tty_path(Server *s);
--- systemd-219.orig/src/journal/journald-server.c
+++ systemd-219/src/journal/journald-server.c
@@ -1520,6 +1520,11 @@ int server_init(Server *s) {
+void default_tty_path(Server *s);
Index: systemd-221/src/journal/journald-server.c
===================================================================
--- 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_proc_cmdline(s);
+ defaul_tty_path(s);
+ default_tty_path(s);
+
+ if (s->tty_path)
+ klogconsole(s);

View File

@ -2,12 +2,12 @@
Makefile.am | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
Index: systemd-218/Makefile.am
Index: systemd-221/Makefile.am
===================================================================
--- systemd-218.orig/Makefile.am
+++ systemd-218/Makefile.am
@@ -4209,11 +4209,11 @@ noinst_LTLIBRARIES += \
libsystemd-journal-core.la
--- systemd-221.orig/Makefile.am
+++ systemd-221/Makefile.am
@@ -4129,11 +4129,11 @@ noinst_LTLIBRARIES += \
libjournal-core.la
journal-install-hook:
- -$(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
activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
---
src/sysv-generator/sysv-generator.c | 26 +++++++++++++++++++++-----
1 file changed, 21 insertions(+), 5 deletions(-)
src/sysv-generator/sysv-generator.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
--- systemd-219.orig/src/sysv-generator/sysv-generator.c
+++ systemd-219/src/sysv-generator/sysv-generator.c
@@ -42,7 +42,8 @@
Index: systemd-221/src/sysv-generator/sysv-generator.c
===================================================================
--- systemd-221.orig/src/sysv-generator/sysv-generator.c
+++ systemd-221/src/sysv-generator/sysv-generator.c
@@ -39,7 +39,8 @@
typedef enum RunlevelType {
RUNLEVEL_UP,
@ -22,7 +24,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
} RunlevelType;
static const struct {
@@ -50,6 +51,9 @@ static const struct {
@@ -47,6 +48,9 @@ static const struct {
const char *target;
const RunlevelType type;
} 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 },
+
/* Standard SysV runlevels for start-up */
{ "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
{ "rc2.d", SPECIAL_RUNLEVEL2_TARGET, RUNLEVEL_UP },
@@ -65,7 +69,7 @@ static const struct {
{ "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
{ "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
@@ -62,10 +66,10 @@ static const struct {
directories in this order, and we want to make sure that
sysv_start_priority is known when we first load the
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 */
};
typedef struct SysvStub {
@@ -83,7 +87,7 @@ typedef struct SysvStub {
bool reload;
} SysvStub;
-const char *arg_dest = "/tmp";
+static const char *arg_dest = "/tmp";
static int add_symlink(const char *service, const char *where) {
_cleanup_free_ char *from = NULL, *to = NULL;
@@ -235,6 +239,10 @@ static bool usage_contains_reload(const
typedef struct SysvStub {
char *name;
@@ -242,6 +246,10 @@ static bool usage_contains_reload(const
static char *sysv_translate_name(const char *name) {
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);
if (!r)
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') {
@ -74,7 +71,7 @@ activated even if symlinks exist in boot.d. Hmmm... -jengelh@inai.de]
r = set_ensure_allocated(&runlevel_services[i], NULL);
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;
} 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 ++
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-218/src/sysctl/sysctl.c
--- systemd-221.orig/src/sysctl/sysctl.c
+++ systemd-221/src/sysctl/sysctl.c
@@ -26,6 +26,7 @@
#include <stdio.h>
#include <limits.h>
@ -22,7 +22,7 @@ Index: systemd-218/src/sysctl/sysctl.c
#include "log.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 {
_cleanup_strv_free_ char **files = NULL;
char **f;
@ -36,10 +36,10 @@ Index: systemd-218/src/sysctl/sysctl.c
r = conf_files_list_nulstr(&files, ".conf", NULL, conf_file_dirs);
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-218/units/systemd-sysctl.service.in
--- systemd-221.orig/units/systemd-sysctl.service.in
+++ systemd-221/units/systemd-sysctl.service.in
@@ -13,6 +13,8 @@ Conflicts=shutdown.target
After=systemd-modules-load.service
Before=sysinit.target shutdown.target

View File

@ -6,11 +6,11 @@ This solves the bug bnc#868439
man/systemctl.xml | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: systemd/man/systemctl.xml
Index: systemd-221/man/systemctl.xml
===================================================================
--- systemd.orig/man/systemctl.xml
+++ systemd/man/systemctl.xml
@@ -445,7 +445,7 @@ along with systemd; If not, see <http://
--- systemd-221.orig/man/systemctl.xml
+++ systemd-221/man/systemctl.xml
@@ -439,7 +439,7 @@
<term><option>--force</option></term>
<listitem>
@ -19,7 +19,7 @@ Index: systemd/man/systemctl.xml
any existing conflicting symlinks.</para>
<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
the target unit name <filename>default.target</filename>
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 +++
src/tmpfiles/tmpfiles.c | 48 ++++++++++++++++++++++++++++++++++++++++--------
2 files changed, 43 insertions(+), 8 deletions(-)
src/tmpfiles/tmpfiles.c | 47 ++++++++++++++++++++++++++++++++++++++++-------
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/man/tmpfiles.d.xml
@@ -489,6 +489,9 @@
--- systemd-221.orig/man/tmpfiles.d.xml
+++ systemd-221/man/tmpfiles.d.xml
@@ -528,6 +528,9 @@
<varname>f</varname>, <varname>F</varname>, and
<varname>w</varname> may be used to specify a short string that
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
+ during directory cleanup. Ignored for all other lines. For
<varname>C</varname>, specifies the source file or
directory. For <varname>t</varname> determines extended
attributes to be set. For <varname>a</varname> determines
Index: systemd/src/tmpfiles/tmpfiles.c
directory. For <varname>t</varname>, <varname>T</varname>
determines extended attributes to be set. For
Index: systemd-221/src/tmpfiles/tmpfiles.c
===================================================================
--- systemd.orig/src/tmpfiles/tmpfiles.c
+++ systemd/src/tmpfiles/tmpfiles.c
@@ -345,6 +345,7 @@ static int dir_cleanup(
--- systemd-221.orig/src/tmpfiles/tmpfiles.c
+++ systemd-221/src/tmpfiles/tmpfiles.c
@@ -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];
bool deleted = false;
int r = 0;
@ -29,24 +37,23 @@ Index: systemd/src/tmpfiles/tmpfiles.c
while ((dent = readdir(d))) {
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? */
- if (hashmap_get(items, sub_path)) {
- if (ordered_hashmap_get(items, sub_path)) {
- log_debug("Ignoring \"%s\": a separate entry exists.", sub_path);
- 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)) {
- log_debug("Ignoring \"%s\": a separate glob exists.", sub_path);
- continue;
+ bool found_glob = false;
+ found = hashmap_get(items, sub_path);
+ if (!found) {
+ found_glob = true;
+ found = find_glob(globs, sub_path);
+ }
+ if (found) {
+ struct passwd *pw;
+ char *userfound = NULL, *args;

View File

@ -1,13 +1,26 @@
---
src/basic/def.h | 2 +-
src/libsystemd/sd-bus/sd-bus.c | 4 ++--
src/shared/def.h | 2 +-
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/src/libsystemd/sd-bus/sd-bus.c
@@ -809,8 +809,8 @@ static int parse_container_unix_address(
--- systemd-221.orig/src/basic/def.h
+++ systemd-221/src/basic/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"
#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->sockaddr.un.sun_family = AF_UNIX;
@ -18,16 +31,3 @@ Index: systemd/src/libsystemd/sd-bus/sd-bus.c
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
@@ -4560,12 +4560,6 @@ lib_LTLIBRARIES += \
---
Makefile.am | 12 ++++++------
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-daemon.la
@ -13,7 +19,7 @@
# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
compat-lib-install-hook:
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
endif
@ -24,5 +30,5 @@
+ src/compat-libs/libsystemd-daemon.pc
+
EXTRA_DIST += \
src/compat-libs/linkwarning.h \
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

View File

@ -1,7 +1,7 @@
#
# 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
# remain the property of their copyright owners, unless otherwise agreed
@ -46,7 +46,7 @@
Name: systemd-mini
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 219
Version: 221
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1+
@ -61,7 +61,6 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: libacl-devel
BuildRequires: libcap-devel
@ -90,8 +89,6 @@ Conflicts: systemd
Conflicts: kiwi
%else
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc
BuildRequires: libgcrypt-devel
BuildRequires: libusb-devel
BuildRequires: libxslt-tools
@ -117,7 +114,7 @@ BuildRequires: pam-config >= 0.79-5
Requires: pwdutils
Requires: systemd-presets-branding
Requires: sysvinit-tools
Requires: util-linux >= 2.25
Requires: util-linux >= 2.26
Requires(post): coreutils
Requires(post): findutils
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
# 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
# PATCH-FIX-SUSE systemd-powerd-initctl-support.patch
Patch185: systemd-powerd-initctl-support.patch
# PATCH-FIX-SUSE systemctl-set-default-target.patch
Patch186: systemctl-set-default-target.patch
# 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
# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009)
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
# ============
@ -330,7 +322,7 @@ Some systemd commands offer bash completion, but it's an optional dependency.
Summary: Development headers for systemd
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libsystemd0 = %version
Requires: systemd-rpm-macros
%if 0%{?bootstrap}
Conflicts: systemd-devel
@ -351,6 +343,32 @@ Provides: sysvinit:/sbin/init
%description sysvinit
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}
Summary: A rule-based device node and kernel event manager
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.
%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
Summary: Journal only logging
License: LGPL-2.1+
@ -580,7 +566,6 @@ cp %{SOURCE7} m4/
%patch180 -p1
%patch182 -p1
%patch183 -p1
%patch185 -p1
%patch186 -p1
%patch188 -p1
%patch189 -p1
@ -607,8 +592,6 @@ cp %{SOURCE7} m4/
%patch490 -p1
%patch520 -p1
%patch521 -p1
%patch522 -p1
%patch523 -p1
# udev patches
%patch1001 -p1
@ -713,7 +696,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
--with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \
--with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \
%if 0%{?bootstrap}
--disable-gudev \
--disable-myhostname \
--disable-manpages \
--disable-machined \
@ -722,7 +704,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
%if %{with python}
--with-python \
%endif
--enable-gtk-doc \
--with-nss-my-hostname-warning \
%endif
--enable-selinux \
@ -1079,16 +1060,13 @@ fi
%regenerate_initrd_posttrans
%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
%if ! 0%{?bootstrap}
%post -n libgudev-1_0-0 -p /sbin/ldconfig
%postun -n libgudev-1_0-0 -p /sbin/ldconfig
%if %{with permission}
%verifyscript logger
%verify_permissions -e %{_localstatedir}/log/journal/
@ -1164,7 +1142,6 @@ exit 0
%{_bindir}/systemd-path
%{_bindir}/systemd-sysusers
%{_bindir}/systemd-notify
%{_bindir}/systemd-hwdb
%{_bindir}/systemd-run
%{_bindir}/systemd-journalctl
%{_bindir}/journalctl
@ -1180,13 +1157,6 @@ exit 0
%{_bindir}/systemd-detect-virt
%{_bindir}/timedatectl
%{_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-cgtop
%{_bindir}/systemd-cat
@ -1217,6 +1187,7 @@ exit 0
%{_prefix}/lib/systemd/system/*.path
%{_prefix}/lib/systemd/user/*.target
%{_prefix}/lib/systemd/user/*.service
%{_prefix}/lib/systemd/user/*.socket
%exclude %{_prefix}/lib/systemd/systemd-udevd
%if ! 0%{?bootstrap}
%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd
@ -1231,6 +1202,7 @@ exit 0
%dir %{_prefix}/lib/systemd/user-preset
%dir %{_prefix}/lib/systemd/system-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/system-shutdown/
%dir %{_prefix}/lib/systemd/system-sleep/
@ -1241,6 +1213,7 @@ exit 0
%if ! 0%{?bootstrap}
%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator
%endif
%{_prefix}/lib/systemd/system-generators/systemd-dbus1-generator
%if 0%{has_efi}
%{_bindir}/bootctl
%{_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.timedate1.conf
%{_sysconfdir}/X11/xinit/
# Some files which may created by us
%dir %{_sysconfdir}/X11/xorg.conf.d
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
@ -1322,15 +1296,23 @@ exit 0
%{_datadir}/factory/
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%if %{with networkd}
%{_prefix}/lib/systemd/system/org.freedesktop.network1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.network1.service
%endif
%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname
%{_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
%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname
%{_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
%if !0%{?bootstrap}
%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
%endif
%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
@ -1348,20 +1330,20 @@ exit 0
%{_datadir}/systemd
%if ! 0%{?bootstrap}
# Packaged in sysvinit subpackage
%exclude %{_mandir}/man1/init.1*
%exclude %{_mandir}/man8/halt.8*
%exclude %{_mandir}/man8/reboot.8*
%exclude %{_mandir}/man8/shutdown.8*
%exclude %{_mandir}/man8/poweroff.8*
%exclude %{_mandir}/man8/telinit.8*
%exclude %{_mandir}/man8/runlevel.8*
%exclude %{_mandir}/man*/*udev*.[0-9]*
%exclude %{_mandir}/man8/systemd-journal-gatewayd.*
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*
%{_mandir}/man7/*.7*
%{_mandir}/man8/*.8*
%_mandir/man1/[a-rt-z]*ctl.1*
%_mandir/man1/systemc*.1*
%_mandir/man1/systemd*.1*
%_mandir/man5/[a-tv-z]*
%_mandir/man5/user*
%_mandir/man7/[bdfks]*
%_mandir/man8/kern*
%_mandir/man8/pam_*
%_mandir/man8/systemd-[a-gik-tv]*
%_mandir/man8/systemd-h[aioy]*
%_mandir/man8/systemd-journal-remote.*
%_mandir/man8/systemd-journal-upload.*
%_mandir/man8/systemd-journald*
%_mandir/man8/systemd-u[ps]*
%endif
%{_docdir}/systemd
%{_prefix}/lib/udev/rules.d/70-uaccess.rules
@ -1408,21 +1390,16 @@ exit 0
%{_libdir}/libsystemd-login.so
%{_libdir}/libsystemd-id128.so
%{_libdir}/libsystemd-journal.so
%dir %{_includedir}/systemd
%{_includedir}/systemd/sd-login.h
%{_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
%{_includedir}/systemd/
%{_datadir}/pkgconfig/systemd.pc
%{_libdir}/pkgconfig/libsystemd.pc
%{_libdir}/pkgconfig/libsystemd-daemon.pc
%{_libdir}/pkgconfig/libsystemd-login.pc
%{_libdir}/pkgconfig/libsystemd-id128.pc
%{_libdir}/pkgconfig/libsystemd-journal.pc
%if ! 0%{?bootstrap}
%{_mandir}/man3/*.3*
%_mandir/man3/SD*.3*
%_mandir/man3/sd*.3*
%endif
%files sysvinit
@ -1454,6 +1431,7 @@ exit 0
%if 0%{?suse_version} <= 1310
%{_prefix}/lib/firmware
%endif
%{_bindir}/systemd-hwdb
%dir %{_prefix}/lib/udev/
%{_prefix}/lib/udev/accelerometer
%{_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/99-systemd.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/rules.d/
%ghost %{_sysconfdir}/udev/hwdb.bin
%config(noreplace) %{_sysconfdir}/udev/udev.conf
%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
%dir %{_prefix}/lib/systemd/system
%{_prefix}/lib/systemd/systemd-udevd
@ -1496,6 +1478,16 @@ exit 0
%{_datadir}/pkgconfig/udev.pc
%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}
%defattr(-,root,root)
%{_libdir}/libudev.so.*
@ -1505,35 +1497,9 @@ exit 0
%{_includedir}/libudev.h
%{_libdir}/libudev.so
%{_libdir}/pkgconfig/libudev.pc
%if ! 0%{?bootstrap}
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/libudev
%{_datadir}/gtk-doc/html/libudev/*
%endif
%{_mandir}/man3/*udev*.3*
%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
%defattr(-,root,root)
%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/
@ -1544,6 +1510,8 @@ exit 0
%files -n nss-myhostname
%defattr(-, root, root)
%{_sbindir}/nss-myhostname-config
%{_mandir}/man8/libnss_myhostname.*
%{_mandir}/man8/nss-myhostname.*
/%{_lib}/*nss_myhostname*
%files journal-gateway
@ -1556,6 +1524,8 @@ exit 0
%files -n nss-mymachines
%defattr(-,root,root)
%_libdir/libnss_mymachines.so*
%_mandir/man8/libnss_mymachines.*
%_mandir/man8/nss-mymachines.*
%endif
%changelog

View File

@ -2,10 +2,10 @@
src/login/systemd-user | 4 ++--
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-218/src/login/systemd-user
--- systemd-221.orig/src/login/systemd-user
+++ systemd-221/src/login/systemd-user
@@ -2,5 +2,5 @@
#
# 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 +++--
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/tmpfiles.d/tmp.conf
--- systemd-221.orig/tmpfiles.d/tmp.conf
+++ systemd-221/tmpfiles.d/tmp.conf
@@ -8,8 +8,9 @@
# 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

View File

@ -1,7 +1,7 @@
#
# 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
# remain the property of their copyright owners, unless otherwise agreed
@ -44,7 +44,7 @@
Name: systemd
Url: http://www.freedesktop.org/wiki/Software/systemd
Version: 219
Version: 221
Release: 0
Summary: A System and Session Manager
License: LGPL-2.1+
@ -56,7 +56,6 @@ BuildRequires: autoconf
BuildRequires: automake
BuildRequires: fdupes
BuildRequires: gperf
BuildRequires: gtk-doc
BuildRequires: intltool
BuildRequires: libacl-devel
BuildRequires: libcap-devel
@ -85,8 +84,6 @@ Conflicts: systemd
Conflicts: kiwi
%else
BuildRequires: docbook-xsl-stylesheets
BuildRequires: gobject-introspection-devel
BuildRequires: gtk-doc
BuildRequires: libgcrypt-devel
BuildRequires: libusb-devel
BuildRequires: libxslt-tools
@ -112,7 +109,7 @@ BuildRequires: pam-config >= 0.79-5
Requires: pwdutils
Requires: systemd-presets-branding
Requires: sysvinit-tools
Requires: util-linux >= 2.25
Requires: util-linux >= 2.26
Requires(post): coreutils
Requires(post): findutils
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
# 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
# PATCH-FIX-SUSE systemd-powerd-initctl-support.patch
Patch185: systemd-powerd-initctl-support.patch
# PATCH-FIX-SUSE systemctl-set-default-target.patch
Patch186: systemctl-set-default-target.patch
# 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
# PATCH-FIX-SUSE systemd-add-user-keep.patch (bnc#903009)
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
# ============
@ -325,7 +317,7 @@ Some systemd commands offer bash completion, but it's an optional dependency.
Summary: Development headers for systemd
License: LGPL-2.1+
Group: Development/Libraries/C and C++
Requires: %{name} = %{version}
Requires: libsystemd0 = %version
Requires: systemd-rpm-macros
%if 0%{?bootstrap}
Conflicts: systemd-devel
@ -346,6 +338,32 @@ Provides: sysvinit:/sbin/init
%description sysvinit
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}
Summary: A rule-based device node and kernel event manager
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.
%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
Summary: Journal only logging
License: LGPL-2.1+
@ -575,7 +561,6 @@ cp %{SOURCE7} m4/
%patch180 -p1
%patch182 -p1
%patch183 -p1
%patch185 -p1
%patch186 -p1
%patch188 -p1
%patch189 -p1
@ -602,8 +587,6 @@ cp %{SOURCE7} m4/
%patch490 -p1
%patch520 -p1
%patch521 -p1
%patch522 -p1
%patch523 -p1
# udev patches
%patch1001 -p1
@ -708,7 +691,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
--with-dbussystemservicedir=%{_datadir}/dbus-1/system-services \
--with-dbusinterfacedir=%{_datadir}/dbus-1/interfaces \
%if 0%{?bootstrap}
--disable-gudev \
--disable-myhostname \
--disable-manpages \
--disable-machined \
@ -717,7 +699,6 @@ cflags -Wl,--hash-size=8599 LDFLAGS
%if %{with python}
--with-python \
%endif
--enable-gtk-doc \
--with-nss-my-hostname-warning \
%endif
--enable-selinux \
@ -1074,16 +1055,13 @@ fi
%regenerate_initrd_posttrans
%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
%if ! 0%{?bootstrap}
%post -n libgudev-1_0-0 -p /sbin/ldconfig
%postun -n libgudev-1_0-0 -p /sbin/ldconfig
%if %{with permission}
%verifyscript logger
%verify_permissions -e %{_localstatedir}/log/journal/
@ -1159,7 +1137,6 @@ exit 0
%{_bindir}/systemd-path
%{_bindir}/systemd-sysusers
%{_bindir}/systemd-notify
%{_bindir}/systemd-hwdb
%{_bindir}/systemd-run
%{_bindir}/systemd-journalctl
%{_bindir}/journalctl
@ -1175,13 +1152,6 @@ exit 0
%{_bindir}/systemd-detect-virt
%{_bindir}/timedatectl
%{_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-cgtop
%{_bindir}/systemd-cat
@ -1212,6 +1182,7 @@ exit 0
%{_prefix}/lib/systemd/system/*.path
%{_prefix}/lib/systemd/user/*.target
%{_prefix}/lib/systemd/user/*.service
%{_prefix}/lib/systemd/user/*.socket
%exclude %{_prefix}/lib/systemd/systemd-udevd
%if ! 0%{?bootstrap}
%exclude %{_prefix}/lib/systemd/systemd-journal-gatewayd
@ -1226,6 +1197,7 @@ exit 0
%dir %{_prefix}/lib/systemd/user-preset
%dir %{_prefix}/lib/systemd/system-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/system-shutdown/
%dir %{_prefix}/lib/systemd/system-sleep/
@ -1236,6 +1208,7 @@ exit 0
%if ! 0%{?bootstrap}
%{_prefix}/lib/systemd/system-generators/systemd-cryptsetup-generator
%endif
%{_prefix}/lib/systemd/system-generators/systemd-dbus1-generator
%if 0%{has_efi}
%{_bindir}/bootctl
%{_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.timedate1.conf
%{_sysconfdir}/X11/xinit/
# Some files which may created by us
%dir %{_sysconfdir}/X11/xorg.conf.d
%ghost %config(noreplace) %{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
@ -1317,15 +1291,23 @@ exit 0
%{_datadir}/factory/
%{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
%if %{with networkd}
%{_prefix}/lib/systemd/system/org.freedesktop.network1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.network1.service
%endif
%{_prefix}/lib/systemd/system/org.freedesktop.systemd1.busname
%{_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
%{_prefix}/lib/systemd/system/org.freedesktop.login1.busname
%{_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
%if !0%{?bootstrap}
%{_prefix}/lib/systemd/system/org.freedesktop.machine1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
%endif
%{_prefix}/lib/systemd/system/org.freedesktop.timedate1.busname
%{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
@ -1343,20 +1325,20 @@ exit 0
%{_datadir}/systemd
%if ! 0%{?bootstrap}
# Packaged in sysvinit subpackage
%exclude %{_mandir}/man1/init.1*
%exclude %{_mandir}/man8/halt.8*
%exclude %{_mandir}/man8/reboot.8*
%exclude %{_mandir}/man8/shutdown.8*
%exclude %{_mandir}/man8/poweroff.8*
%exclude %{_mandir}/man8/telinit.8*
%exclude %{_mandir}/man8/runlevel.8*
%exclude %{_mandir}/man*/*udev*.[0-9]*
%exclude %{_mandir}/man8/systemd-journal-gatewayd.*
%{_mandir}/man1/*.1*
%{_mandir}/man5/*.5*
%{_mandir}/man7/*.7*
%{_mandir}/man8/*.8*
%_mandir/man1/[a-rt-z]*ctl.1*
%_mandir/man1/systemc*.1*
%_mandir/man1/systemd*.1*
%_mandir/man5/[a-tv-z]*
%_mandir/man5/user*
%_mandir/man7/[bdfks]*
%_mandir/man8/kern*
%_mandir/man8/pam_*
%_mandir/man8/systemd-[a-gik-tv]*
%_mandir/man8/systemd-h[aioy]*
%_mandir/man8/systemd-journal-remote.*
%_mandir/man8/systemd-journal-upload.*
%_mandir/man8/systemd-journald*
%_mandir/man8/systemd-u[ps]*
%endif
%{_docdir}/systemd
%{_prefix}/lib/udev/rules.d/70-uaccess.rules
@ -1403,21 +1385,16 @@ exit 0
%{_libdir}/libsystemd-login.so
%{_libdir}/libsystemd-id128.so
%{_libdir}/libsystemd-journal.so
%dir %{_includedir}/systemd
%{_includedir}/systemd/sd-login.h
%{_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
%{_includedir}/systemd/
%{_datadir}/pkgconfig/systemd.pc
%{_libdir}/pkgconfig/libsystemd.pc
%{_libdir}/pkgconfig/libsystemd-daemon.pc
%{_libdir}/pkgconfig/libsystemd-login.pc
%{_libdir}/pkgconfig/libsystemd-id128.pc
%{_libdir}/pkgconfig/libsystemd-journal.pc
%if ! 0%{?bootstrap}
%{_mandir}/man3/*.3*
%_mandir/man3/SD*.3*
%_mandir/man3/sd*.3*
%endif
%files sysvinit
@ -1449,6 +1426,7 @@ exit 0
%if 0%{?suse_version} <= 1310
%{_prefix}/lib/firmware
%endif
%{_bindir}/systemd-hwdb
%dir %{_prefix}/lib/udev/
%{_prefix}/lib/udev/accelerometer
%{_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/99-systemd.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/rules.d/
%ghost %{_sysconfdir}/udev/hwdb.bin
%config(noreplace) %{_sysconfdir}/udev/udev.conf
%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
%dir %{_prefix}/lib/systemd/system
%{_prefix}/lib/systemd/systemd-udevd
@ -1491,6 +1473,16 @@ exit 0
%{_datadir}/pkgconfig/udev.pc
%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}
%defattr(-,root,root)
%{_libdir}/libudev.so.*
@ -1500,35 +1492,9 @@ exit 0
%{_includedir}/libudev.h
%{_libdir}/libudev.so
%{_libdir}/pkgconfig/libudev.pc
%if ! 0%{?bootstrap}
%dir %{_datadir}/gtk-doc
%dir %{_datadir}/gtk-doc/html
%dir %{_datadir}/gtk-doc/html/libudev
%{_datadir}/gtk-doc/html/libudev/*
%endif
%{_mandir}/man3/*udev*.3*
%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
%defattr(-,root,root)
%dir %attr(2755,root,systemd-journal) %{_localstatedir}/log/journal/
@ -1539,6 +1505,8 @@ exit 0
%files -n nss-myhostname
%defattr(-, root, root)
%{_sbindir}/nss-myhostname-config
%{_mandir}/man8/libnss_myhostname.*
%{_mandir}/man8/nss-myhostname.*
/%{_lib}/*nss_myhostname*
%files journal-gateway
@ -1551,6 +1519,8 @@ exit 0
%files -n nss-mymachines
%defattr(-,root,root)
%_libdir/libnss_mymachines.so*
%_mandir/man8/libnss_mymachines.*
%_mandir/man8/nss-mymachines.*
%endif
%changelog

View File

@ -5,9 +5,11 @@ Provide /run/lock/subsys directory to be able to provide the
tmpfiles.d/legacy.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- systemd-210/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 -
Index: systemd-221/tmpfiles.d/legacy.conf
===================================================================
--- 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
# hence without use on SysV-less systems.

View File

@ -2,10 +2,10 @@
src/tty-ask-password-agent/tty-ask-password-agent.c | 171 +++++++++++++++++++-
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/src/tty-ask-password-agent/tty-ask-password-agent.c
--- systemd-221.orig/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 @@
#include <getopt.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 "macro.h"
+#include "list.h"
static enum {
ACTION_LIST,
@@ -50,6 +57,22 @@ static enum {
#include "process-util.h"
#include "terminal-util.h"
#include "signal-util.h"
@@ -53,6 +60,22 @@ static enum {
ACTION_WALL
} 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_console = false;
@@ -208,6 +231,58 @@ static int ask_password_plymouth(
@@ -211,6 +234,58 @@ static int ask_password_plymouth(
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) {
_cleanup_free_ char *socket_name = NULL, *message = NULL, *packet = NULL;
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;
if (arg_console) {
@ -118,7 +118,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
if (tty_fd < 0)
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;
}
@ -205,7 +205,7 @@ Index: systemd/src/tty-ask-password-agent/tty-ask-password-agent.c
log_set_target(LOG_TARGET_AUTO);
log_parse_environment();
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)
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))
r = watch_passwords();
else
@@ -638,6 +797,8 @@ int main(int argc, char *argv[]) {
@@ -641,6 +800,8 @@ int main(int argc, char *argv[]) {
if (r < 0)
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
---
systemd-219/src/random-seed/random-seed.c | 71 +++++++++++++++++++++++++-----
src/random-seed/random-seed.c | 71 ++++++++++++++++++++++++++++++++++++------
1 file changed, 61 insertions(+), 10 deletions(-)
--- systemd-219/src/random-seed/random-seed.c
+++ systemd-219/src/random-seed/random-seed.c 2015-04-21 09:39:03.057518051 +0000
Index: systemd-221/src/random-seed/random-seed.c
===================================================================
--- systemd-221.orig/src/random-seed/random-seed.c
+++ systemd-221/src/random-seed/random-seed.c
@@ -22,7 +22,9 @@
#include <unistd.h>
#include <fcntl.h>
@ -37,7 +39,7 @@ Related to bnc#892096
- buf = malloc(buf_size);
- 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) {
r = log_oom();
goto finish;
@ -52,7 +54,7 @@ Related to bnc#892096
+ entropy_fd = open(RANDOM_SEED_DIR "entropy_count", O_RDONLY|O_CLOEXEC|O_NOCTTY, 0600);
+ if (entropy_fd < 0) {
+ entropy->entropy_count = 0;
+ entropy->entropy_count = 0;
+ if (errno != ENOENT) {
+ log_error("Failed to open " RANDOM_SEED "/entropy_count: %m");
+ r = -errno;
@ -70,18 +72,18 @@ Related to bnc#892096
seed_fd = open(RANDOM_SEED, O_RDWR|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
if (seed_fd < 0) {
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, entropy->buf, entropy->buf_size, false);
if (k <= 0) {
if (r != 0)
@@ -115,13 +135,29 @@ int main(int argc, char *argv[]) {
} else {
lseek(seed_fd, 0, SEEK_SET);
if (k < 0)
r = log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m");
else if (k == 0)
@@ -111,13 +131,29 @@ int main(int argc, char *argv[]) {
else {
(void) lseek(seed_fd, 0, SEEK_SET);
- r = loop_write(random_fd, buf, (size_t) k, false);
- 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);
if (seed_fd < 0) {
log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m");
@@ -136,6 +172,21 @@ int main(int argc, char *argv[]) {
r = log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m");
@@ -130,6 +166,21 @@ int main(int argc, char *argv[]) {
goto finish;
}
@ -132,20 +134,23 @@ Related to bnc#892096
+ }
+
} else {
log_error("Unknown verb %s.", argv[1]);
log_error("Unknown verb '%s'.", argv[1]);
r = -EINVAL;
@@ -149,12 +200,12 @@ int main(int argc, char *argv[]) {
fchmod(seed_fd, 0600);
fchown(seed_fd, 0, 0);
@@ -144,7 +195,7 @@ int main(int argc, char *argv[]) {
(void) fchmod(seed_fd, 0600);
(void) fchown(seed_fd, 0, 0);
- k = loop_read(random_fd, buf, buf_size, false);
+ k = loop_read(random_fd, entropy->buf, entropy->buf_size, false);
if (k <= 0) {
log_error("Failed to read new seed from /dev/urandom: %s", r < 0 ? strerror(-r) : "EOF");
r = k == 0 ? -EIO : (int) k;
} else {
- 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");
if (k < 0) {
r = log_error_errno(k, "Failed to read new seed from /dev/urandom: %m");
goto finish;
@@ -155,7 +206,7 @@ int main(int argc, char *argv[]) {
goto finish;
}
- 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/serial-getty@.service.m4 | 1 +
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-218/units/getty@.service.m4
--- systemd-221.orig/units/getty@.service.m4
+++ systemd-221/units/getty@.service.m4
@@ -29,6 +29,7 @@ ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
@ -26,10 +26,10 @@ Index: systemd-218/units/getty@.service.m4
Type=idle
Restart=always
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-218/units/serial-getty@.service.m4
--- systemd-221.orig/units/serial-getty@.service.m4
+++ systemd-221/units/serial-getty@.service.m4
@@ -24,6 +24,7 @@ IgnoreOnIsolate=yes
[Service]

View File

@ -3,19 +3,19 @@
src/core/manager.h | 5 ++
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-218/src/core/manager.c
@@ -37,6 +37,7 @@
#include <sys/stat.h>
--- systemd-221.orig/src/core/manager.c
+++ systemd-221/src/core/manager.c
@@ -32,6 +32,7 @@
#include <fcntl.h>
#include <dirent.h>
#include <sys/timerfd.h>
+#include <resolv.h>
#ifdef HAVE_AUDIT
#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;
}
@ -107,7 +107,7 @@ Index: systemd-218/src/core/manager.c
static int manager_watch_idle_pipe(Manager *m) {
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->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->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)
goto fail;
@ -126,7 +126,7 @@ Index: systemd-218/src/core/manager.c
m->udev = udev_new();
if (!m->udev) {
r = -ENOMEM;
@@ -896,6 +987,8 @@ Manager* manager_free(Manager *m) {
@@ -929,6 +1020,8 @@ Manager* manager_free(Manager *m) {
if (!m)
return NULL;
@ -135,11 +135,11 @@ Index: systemd-218/src/core/manager.c
manager_clear_jobs_and_units(m);
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-218/src/core/manager.h
@@ -185,6 +185,11 @@ struct Manager {
--- systemd-221.orig/src/core/manager.h
+++ systemd-221/src/core/manager.h
@@ -181,6 +181,11 @@ struct Manager {
int utab_inotify_fd;
sd_event_source *mount_utab_event_source;