forked from pool/systemd
Accepting request 350935 from openSUSE:Factory
Revert to version 224 - 228 exhibits issues on updating from 13.2 to TW OBS-URL: https://build.opensuse.org/request/show/350935 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=227
This commit is contained in:
commit
e442e934dd
@ -0,0 +1,49 @@
|
||||
From 6a102f90a2ee50e43998d64819e8bd4ee241c22b Mon Sep 17 00:00:00 2001
|
||||
From: Franck Bui <fbui@suse.com>
|
||||
Date: Thu, 8 Oct 2015 19:06:06 +0200
|
||||
Subject: [PATCH 1/2] Make sure the mount units pulled by 'RequiresMountsFor='
|
||||
are loaded (if they exist)
|
||||
|
||||
We should make sure that mount units involved by 'RequiresMountsFor='
|
||||
directives are really loaded if not required by any others units so
|
||||
that Requires= dependencies on the mount units are applied and thus
|
||||
the mount unit dependencies are started.
|
||||
|
||||
(cherry picked from commit 9b3757e9c8c8d6e161481193c4ef60e425a9ae41)
|
||||
---
|
||||
src/core/unit.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index dd5e801..dc7bc5a 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -1141,13 +1141,23 @@ static int unit_add_mount_dependencies(Unit *u) {
|
||||
char prefix[strlen(*i) + 1];
|
||||
|
||||
PATH_FOREACH_PREFIX_MORE(prefix, *i) {
|
||||
+ _cleanup_free_ char *p = NULL;
|
||||
Unit *m;
|
||||
|
||||
- r = manager_get_unit_by_path(u->manager, prefix, ".mount", &m);
|
||||
+ r = unit_name_from_path(prefix, ".mount", &p);
|
||||
if (r < 0)
|
||||
return r;
|
||||
- if (r == 0)
|
||||
+
|
||||
+ m = manager_get_unit(u->manager, p);
|
||||
+ if (!m) {
|
||||
+ /* Make sure to load the mount unit if
|
||||
+ * it exists. If so the dependencies
|
||||
+ * on this unit will be added later
|
||||
+ * during the loading of the mount
|
||||
+ * unit. */
|
||||
+ (void) manager_load_unit_prepare(u->manager, p, NULL, NULL, &m);
|
||||
continue;
|
||||
+ }
|
||||
if (m == u)
|
||||
continue;
|
||||
|
||||
--
|
||||
2.6.0
|
||||
|
@ -1,15 +1,15 @@
|
||||
---
|
||||
rules/99-systemd.rules.in | 2 -
|
||||
src/basic/terminal-util.c | 55 ++++++++++++++++++++++++++++++++++++++++++++--
|
||||
rules/99-systemd.rules.in | 2
|
||||
src/basic/terminal-util.c | 99 ++++++++++++++++++++++++++++++++++++++++++++--
|
||||
src/basic/terminal-util.h | 1
|
||||
src/core/manager.c | 24 +++++++++++++++-----
|
||||
4 files changed, 74 insertions(+), 8 deletions(-)
|
||||
src/core/manager.c | 24 ++++++++---
|
||||
4 files changed, 116 insertions(+), 10 deletions(-)
|
||||
|
||||
|
||||
Index: systemd-228/rules/99-systemd.rules.in
|
||||
Index: systemd-221/rules/99-systemd.rules.in
|
||||
===================================================================
|
||||
--- systemd-228.orig/rules/99-systemd.rules.in
|
||||
+++ systemd-228/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"
|
||||
@ -19,11 +19,76 @@ Index: systemd-228/rules/99-systemd.rules.in
|
||||
KERNEL=="vport*", TAG+="systemd"
|
||||
|
||||
SUBSYSTEM=="block", TAG+="systemd"
|
||||
Index: systemd-228/src/basic/terminal-util.c
|
||||
Index: systemd-221/src/basic/terminal-util.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/basic/terminal-util.c
|
||||
+++ systemd-228/src/basic/terminal-util.c
|
||||
@@ -717,10 +717,47 @@ bool tty_is_vc_resolve(const char *tty)
|
||||
--- 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);
|
||||
}
|
||||
|
||||
@ -72,7 +137,7 @@ Index: systemd-228/src/basic/terminal-util.c
|
||||
}
|
||||
|
||||
int fd_columns(int fd) {
|
||||
@@ -800,8 +837,22 @@ void columns_lines_cache_reset(int signu
|
||||
@@ -890,8 +967,22 @@ void columns_lines_cache_reset(int signu
|
||||
bool on_tty(void) {
|
||||
static int cached_on_tty = -1;
|
||||
|
||||
@ -96,59 +161,59 @@ Index: systemd-228/src/basic/terminal-util.c
|
||||
|
||||
return cached_on_tty;
|
||||
}
|
||||
Index: systemd-228/src/basic/terminal-util.h
|
||||
Index: systemd-221/src/basic/terminal-util.h
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/basic/terminal-util.h
|
||||
+++ systemd-228/src/basic/terminal-util.h
|
||||
@@ -78,6 +78,7 @@ unsigned lines(void);
|
||||
--- 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_underline(void) {
|
||||
return on_tty() ? ANSI_UNDERLINE : "";
|
||||
Index: systemd-228/src/core/manager.c
|
||||
static inline const char *ansi_highlight(void) {
|
||||
return on_tty() ? ANSI_HIGHLIGHT_ON : "";
|
||||
Index: systemd-221/src/core/manager.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/core/manager.c
|
||||
+++ systemd-228/src/core/manager.c
|
||||
@@ -126,7 +126,7 @@ static void manager_watch_jobs_in_progre
|
||||
--- 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)-1) + sizeof(ANSI_HIGHLIGHT_RED)-1 + 2*(sizeof(ANSI_NORMAL)-1))
|
||||
#define CYLON_BUFFER_EXTRA (2*(sizeof(ANSI_RED_ON)-1) + sizeof(ANSI_HIGHLIGHT_RED_ON)-1 + 2*(sizeof(ANSI_HIGHLIGHT_OFF)-1))
|
||||
|
||||
-static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos) {
|
||||
+static void draw_cylon(char buffer[], size_t buflen, unsigned width, unsigned pos, bool ansi_console) {
|
||||
char *p = buffer;
|
||||
|
||||
assert(buflen >= CYLON_BUFFER_EXTRA + width + 1);
|
||||
@@ -135,12 +135,14 @@ static void draw_cylon(char buffer[], si
|
||||
@@ -122,12 +122,14 @@ static void draw_cylon(char buffer[], si
|
||||
if (pos > 1) {
|
||||
if (pos > 2)
|
||||
p = mempset(p, ' ', pos-2);
|
||||
- p = stpcpy(p, ANSI_RED);
|
||||
- p = stpcpy(p, ANSI_RED_ON);
|
||||
+ if (ansi_console)
|
||||
+ p = stpcpy(p, ANSI_RED);
|
||||
+ p = stpcpy(p, ANSI_RED_ON);
|
||||
*p++ = '*';
|
||||
}
|
||||
|
||||
if (pos > 0 && pos <= width) {
|
||||
- p = stpcpy(p, ANSI_HIGHLIGHT_RED);
|
||||
- p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
|
||||
+ if (ansi_console)
|
||||
+ p = stpcpy(p, ANSI_HIGHLIGHT_RED);
|
||||
+ p = stpcpy(p, ANSI_HIGHLIGHT_RED_ON);
|
||||
*p++ = '*';
|
||||
}
|
||||
|
||||
@@ -151,7 +153,8 @@ static void draw_cylon(char buffer[], si
|
||||
@@ -138,7 +140,8 @@ static void draw_cylon(char buffer[], si
|
||||
*p++ = '*';
|
||||
if (pos < width-1)
|
||||
p = mempset(p, ' ', width-1-pos);
|
||||
- strcpy(p, ANSI_NORMAL);
|
||||
- strcpy(p, ANSI_HIGHLIGHT_OFF);
|
||||
+ if (ansi_console)
|
||||
+ strcpy(p, ANSI_NORMAL);
|
||||
+ strcpy(p, ANSI_HIGHLIGHT_OFF);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -168,6 +171,7 @@ void manager_flip_auto_status(Manager *m
|
||||
@@ -155,6 +158,7 @@ void manager_flip_auto_status(Manager *m
|
||||
}
|
||||
|
||||
static void manager_print_jobs_in_progress(Manager *m) {
|
||||
@ -156,7 +221,7 @@ Index: systemd-228/src/core/manager.c
|
||||
_cleanup_free_ char *job_of_n = NULL;
|
||||
Iterator i;
|
||||
Job *j;
|
||||
@@ -193,10 +197,20 @@ static void manager_print_jobs_in_progre
|
||||
@@ -180,10 +184,20 @@ static void manager_print_jobs_in_progre
|
||||
assert(counter == print_nr + 1);
|
||||
assert(j);
|
||||
|
||||
|
@ -3,11 +3,11 @@
|
||||
src/systemctl/systemctl.c | 18 ++++++++++++------
|
||||
2 files changed, 16 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: systemd-227/src/core/shutdown.c
|
||||
Index: systemd-221/src/core/shutdown.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/core/shutdown.c
|
||||
+++ systemd-227/src/core/shutdown.c
|
||||
@@ -418,6 +418,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-227/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-227/src/systemctl/systemctl.c
|
||||
Index: systemd-221/src/systemctl/systemctl.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/systemctl/systemctl.c
|
||||
+++ systemd-227/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-227/src/systemctl/systemctl.c
|
||||
static bool arg_show_types = false;
|
||||
static bool arg_ignore_inhibitors = false;
|
||||
static bool arg_dry = false;
|
||||
@@ -6938,6 +6939,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-227/src/systemctl/systemctl.c
|
||||
{ "no-wtmp", no_argument, NULL, 'd' },
|
||||
{ "no-wall", no_argument, NULL, ARG_NO_WALL },
|
||||
{}
|
||||
@@ -6990,10 +6992,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,32 +53,32 @@ Index: systemd-227/src/systemctl/systemctl.c
|
||||
case '?':
|
||||
return -EINVAL;
|
||||
|
||||
@@ -7506,7 +7511,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. */
|
||||
- (void) sync();
|
||||
- sync();
|
||||
+ if (!arg_no_sync)
|
||||
+ (void) sync();
|
||||
+ sync();
|
||||
|
||||
/* Make sure C-A-D is handled by the kernel from this point
|
||||
* on... */
|
||||
@@ -7514,14 +7520,13 @@ static int halt_now(enum action a) {
|
||||
@@ -7299,14 +7305,14 @@ static int halt_now(enum action a) {
|
||||
|
||||
switch (a) {
|
||||
|
||||
- case ACTION_HALT:
|
||||
- log_info("Halting.");
|
||||
- (void) reboot(RB_HALT_SYSTEM);
|
||||
- reboot(RB_HALT_SYSTEM);
|
||||
- return -errno;
|
||||
-
|
||||
|
||||
case ACTION_POWEROFF:
|
||||
log_info("Powering off.");
|
||||
(void) reboot(RB_POWER_OFF);
|
||||
reboot(RB_POWER_OFF);
|
||||
+ /* fall-through */
|
||||
+ case ACTION_HALT:
|
||||
+ log_info("Halting.");
|
||||
+ (void) reboot(RB_HALT_SYSTEM);
|
||||
+ reboot(RB_HALT_SYSTEM);
|
||||
return -errno;
|
||||
|
||||
case ACTION_KEXEC:
|
||||
case ACTION_REBOOT: {
|
||||
|
@ -5,16 +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 +++++++++
|
||||
4 files changed, 233 insertions(+), 2 deletions(-)
|
||||
5 files changed, 234 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: systemd-228/Makefile.am
|
||||
Index: systemd-221/Makefile.am
|
||||
===================================================================
|
||||
--- systemd-228.orig/Makefile.am
|
||||
+++ systemd-228/Makefile.am
|
||||
@@ -1223,6 +1223,8 @@ libcore_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 \
|
||||
@ -23,10 +24,22 @@ Index: systemd-228/Makefile.am
|
||||
src/core/kmod-setup.c \
|
||||
src/core/kmod-setup.h \
|
||||
src/core/loopback-setup.h \
|
||||
Index: systemd-228/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-228/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 -*-*/
|
||||
+
|
||||
@ -201,10 +214,10 @@ Index: systemd-228/src/core/mount-iface.c
|
||||
+ freeifaddrs(ifa_list);
|
||||
+ ifa_list = NULL;
|
||||
+}
|
||||
Index: systemd-228/src/core/mount-iface.h
|
||||
Index: systemd-221/src/core/mount-iface.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-228/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 -*-*/
|
||||
+
|
||||
@ -231,19 +244,19 @@ Index: systemd-228/src/core/mount-iface.h
|
||||
+
|
||||
+char *host2iface(const char *ip);
|
||||
+void freeroutes(void);
|
||||
Index: systemd-228/src/core/mount.c
|
||||
Index: systemd-221/src/core/mount.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/core/mount.c
|
||||
+++ systemd-228/src/core/mount.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "manager.h"
|
||||
--- 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"
|
||||
+#include "mount-iface.h"
|
||||
#include "mount-util.h"
|
||||
#include "mount.h"
|
||||
#include "parse-util.h"
|
||||
@@ -1344,8 +1345,9 @@ static int mount_setup_unit(
|
||||
#include "unit-name.h"
|
||||
#include "dbus-mount.h"
|
||||
#include "special.h"
|
||||
@@ -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;
|
||||
@ -254,7 +267,7 @@ Index: systemd-228/src/core/mount.c
|
||||
int r;
|
||||
|
||||
assert(m);
|
||||
@@ -1370,6 +1372,8 @@ static int mount_setup_unit(
|
||||
@@ -1358,6 +1360,8 @@ static int mount_setup_unit(
|
||||
if (r < 0)
|
||||
return r;
|
||||
|
||||
@ -263,7 +276,7 @@ Index: systemd-228/src/core/mount.c
|
||||
u = manager_get_unit(m, e);
|
||||
if (!u) {
|
||||
delete = true;
|
||||
@@ -1397,7 +1401,7 @@ static int mount_setup_unit(
|
||||
@@ -1385,7 +1389,7 @@ static int mount_setup_unit(
|
||||
if (m->running_as == MANAGER_SYSTEM) {
|
||||
const char* target;
|
||||
|
||||
@ -272,7 +285,7 @@ Index: systemd-228/src/core/mount.c
|
||||
r = unit_add_dependency_by_name(u, UNIT_BEFORE, target, NULL, true);
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
@@ -1483,6 +1487,32 @@ static int mount_setup_unit(
|
||||
@@ -1471,6 +1475,32 @@ static int mount_setup_unit(
|
||||
goto fail;
|
||||
}
|
||||
|
||||
@ -305,7 +318,7 @@ Index: systemd-228/src/core/mount.c
|
||||
if (changed)
|
||||
unit_add_to_dbus_queue(u);
|
||||
|
||||
@@ -1549,6 +1579,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;
|
||||
}
|
||||
|
@ -3,10 +3,10 @@
|
||||
src/login/logind-dbus.c | 31 +++++++++++++++++++++++--------
|
||||
2 files changed, 28 insertions(+), 8 deletions(-)
|
||||
|
||||
Index: systemd-227/src/login/logind-action.c
|
||||
Index: systemd-221/src/login/logind-action.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/login/logind-action.c
|
||||
+++ systemd-227/src/login/logind-action.c
|
||||
--- 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 */
|
||||
@ -19,11 +19,11 @@ Index: systemd-227/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-227/src/login/logind-dbus.c
|
||||
Index: systemd-221/src/login/logind-dbus.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/login/logind-dbus.c
|
||||
+++ systemd-227/src/login/logind-dbus.c
|
||||
@@ -1646,12 +1646,13 @@ static int verify_shutdown_creds(
|
||||
--- 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,
|
||||
@ -40,7 +40,7 @@ Index: systemd-227/src/login/logind-dbus.c
|
||||
|
||||
assert(m);
|
||||
assert(message);
|
||||
@@ -1673,7 +1674,19 @@ static int verify_shutdown_creds(
|
||||
@@ -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);
|
||||
|
||||
@ -58,29 +58,29 @@ Index: systemd-227/src/login/logind-dbus.c
|
||||
+
|
||||
+ if (multiple_sessions && action_multiple_sessions &&
|
||||
+ !shutdown_through_acpi) {
|
||||
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, NULL, interactive, UID_INVALID, &m->polkit_registry, error);
|
||||
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_multiple_sessions, interactive, UID_INVALID, &m->polkit_registry, error);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@@ -1681,7 +1694,7 @@ static int verify_shutdown_creds(
|
||||
@@ -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 && action_ignore_inhibit) {
|
||||
+ if (blocked && action_ignore_inhibit && !shutdown_through_acpi) {
|
||||
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, NULL, interactive, UID_INVALID, &m->polkit_registry, error);
|
||||
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action_ignore_inhibit, interactive, UID_INVALID, &m->polkit_registry, error);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@@ -1689,7 +1702,8 @@ static int verify_shutdown_creds(
|
||||
@@ -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 && action) {
|
||||
+ if (!multiple_sessions && !blocked && action &&
|
||||
+ !shutdown_through_acpi) {
|
||||
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, NULL, interactive, UID_INVALID, &m->polkit_registry, error);
|
||||
r = bus_verify_polkit_async(message, CAP_SYS_BOOT, action, interactive, UID_INVALID, &m->polkit_registry, error);
|
||||
if (r < 0)
|
||||
return r;
|
||||
@@ -1737,7 +1751,7 @@ static int method_do_shutdown_or_sleep(
|
||||
@@ -1716,7 +1730,7 @@ static int method_do_shutdown_or_sleep(
|
||||
}
|
||||
|
||||
r = verify_shutdown_creds(m, message, w, interactive, action, action_multiple_sessions,
|
||||
@ -89,7 +89,7 @@ Index: systemd-227/src/login/logind-dbus.c
|
||||
if (r != 0)
|
||||
return r;
|
||||
|
||||
@@ -1931,7 +1945,8 @@ static int method_schedule_shutdown(sd_b
|
||||
@@ -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,
|
||||
|
@ -1,37 +0,0 @@
|
||||
From cb31827d62066a04b02111df3052949fda4b6888 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 23 Nov 2015 13:59:43 -0500
|
||||
Subject: [PATCH] nss-mymachines: do not allow overlong machine names
|
||||
|
||||
https://github.com/systemd/systemd/issues/2002
|
||||
---
|
||||
src/nss-mymachines/nss-mymachines.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/src/nss-mymachines/nss-mymachines.c b/src/nss-mymachines/nss-mymachines.c
|
||||
index 969fa96..c98a959 100644
|
||||
--- a/src/nss-mymachines/nss-mymachines.c
|
||||
+++ b/src/nss-mymachines/nss-mymachines.c
|
||||
@@ -416,6 +416,9 @@ enum nss_status _nss_mymachines_getpwnam_r(
|
||||
if (!e || e == p)
|
||||
goto not_found;
|
||||
|
||||
+ if (e - p > HOST_NAME_MAX - 1) /* -1 for the last dash */
|
||||
+ goto not_found;
|
||||
+
|
||||
r = parse_uid(e + 1, &uid);
|
||||
if (r < 0)
|
||||
goto not_found;
|
||||
@@ -573,6 +576,9 @@ enum nss_status _nss_mymachines_getgrnam_r(
|
||||
if (!e || e == p)
|
||||
goto not_found;
|
||||
|
||||
+ if (e - p > HOST_NAME_MAX - 1) /* -1 for the last dash */
|
||||
+ goto not_found;
|
||||
+
|
||||
r = parse_gid(e + 1, &gid);
|
||||
if (r < 0)
|
||||
goto not_found;
|
||||
--
|
||||
2.1.4
|
||||
|
140
0002-units-enable-waiting-for-unit-termination-in-certain.patch
Normal file
140
0002-units-enable-waiting-for-unit-termination-in-certain.patch
Normal file
@ -0,0 +1,140 @@
|
||||
From d7f920bfcb0296fed214d4d3a21d64de09a68521 Mon Sep 17 00:00:00 2001
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Tue, 1 Sep 2015 17:25:59 +0200
|
||||
Subject: [PATCH 2/2] units: enable waiting for unit termination in certain
|
||||
cases
|
||||
|
||||
The legacy cgroup hierarchy does not support reliable empty
|
||||
notifications in containers and if there are left-over subgroups in a
|
||||
cgroup. This makes it hard to correctly wait for them running empty, and
|
||||
thus we previously disabled this logic entirely.
|
||||
|
||||
With this change we explicitly check for the container case, and whether
|
||||
the unit is a "delegation" unit (i.e. one where programs may create
|
||||
their own subgroups). If we are neither in a container, nor operating on
|
||||
a delegation unit cgroup empty notifications become reliable and thus we
|
||||
start waiting for the empty notifications again.
|
||||
|
||||
This doesn't really fix the general problem around cgroup notifications
|
||||
but reduces the effect around it.
|
||||
|
||||
(This also reorders #include lines by their focus, as suggsted in
|
||||
CODING_STYLE. We have to add "virt.h", so let's do that at the right
|
||||
place.)
|
||||
|
||||
Also see #317.
|
||||
|
||||
(cherry picked from commit e9db43d5910717a1084924c512bf85e2b8265375)
|
||||
---
|
||||
src/core/cgroup.c | 12 ++++++++++++
|
||||
src/core/cgroup.h | 2 ++
|
||||
src/core/unit.c | 40 +++++++++++++++++++++++-----------------
|
||||
3 files changed, 37 insertions(+), 17 deletions(-)
|
||||
|
||||
diff --git a/src/core/cgroup.c b/src/core/cgroup.c
|
||||
index 6474e08..65af351 100644
|
||||
--- a/src/core/cgroup.c
|
||||
+++ b/src/core/cgroup.c
|
||||
@@ -1127,6 +1127,18 @@ int unit_reset_cpu_usage(Unit *u) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
+bool unit_cgroup_delegate(Unit *u) {
|
||||
+ CGroupContext *c;
|
||||
+
|
||||
+ assert(u);
|
||||
+
|
||||
+ c = unit_get_cgroup_context(u);
|
||||
+ if (!c)
|
||||
+ return false;
|
||||
+
|
||||
+ return c->delegate;
|
||||
+}
|
||||
+
|
||||
static const char* const cgroup_device_policy_table[_CGROUP_DEVICE_POLICY_MAX] = {
|
||||
[CGROUP_AUTO] = "auto",
|
||||
[CGROUP_CLOSED] = "closed",
|
||||
diff --git a/src/core/cgroup.h b/src/core/cgroup.h
|
||||
index 869ddae..7b38d21 100644
|
||||
--- a/src/core/cgroup.h
|
||||
+++ b/src/core/cgroup.h
|
||||
@@ -130,5 +130,7 @@ int unit_get_memory_current(Unit *u, uint64_t *ret);
|
||||
int unit_get_cpu_usage(Unit *u, nsec_t *ret);
|
||||
int unit_reset_cpu_usage(Unit *u);
|
||||
|
||||
+bool unit_cgroup_delegate(Unit *u);
|
||||
+
|
||||
const char* cgroup_device_policy_to_string(CGroupDevicePolicy i) _const_;
|
||||
CGroupDevicePolicy cgroup_device_policy_from_string(const char *s) _pure_;
|
||||
diff --git a/src/core/unit.c b/src/core/unit.c
|
||||
index dc7bc5a..275f567 100644
|
||||
--- a/src/core/unit.c
|
||||
+++ b/src/core/unit.c
|
||||
@@ -28,26 +28,28 @@
|
||||
#include "sd-id128.h"
|
||||
#include "sd-messages.h"
|
||||
#include "set.h"
|
||||
-#include "unit.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
#include "path-util.h"
|
||||
-#include "load-fragment.h"
|
||||
-#include "load-dropin.h"
|
||||
#include "log.h"
|
||||
-#include "unit-name.h"
|
||||
-#include "dbus-unit.h"
|
||||
-#include "special.h"
|
||||
#include "cgroup-util.h"
|
||||
#include "missing.h"
|
||||
#include "mkdir.h"
|
||||
#include "fileio-label.h"
|
||||
+#include "formats-util.h"
|
||||
+#include "process-util.h"
|
||||
+#include "virt.h"
|
||||
#include "bus-common-errors.h"
|
||||
+#include "bus-util.h"
|
||||
+#include "dropin.h"
|
||||
+#include "unit-name.h"
|
||||
+#include "special.h"
|
||||
+#include "unit.h"
|
||||
+#include "load-fragment.h"
|
||||
+#include "load-dropin.h"
|
||||
#include "dbus.h"
|
||||
+#include "dbus-unit.h"
|
||||
#include "execute.h"
|
||||
-#include "dropin.h"
|
||||
-#include "formats-util.h"
|
||||
-#include "process-util.h"
|
||||
|
||||
const UnitVTable * const unit_vtable[_UNIT_TYPE_MAX] = {
|
||||
[UNIT_SERVICE] = &service_vtable,
|
||||
@@ -3535,14 +3537,18 @@ int unit_kill_context(
|
||||
} else if (r > 0) {
|
||||
|
||||
/* FIXME: For now, we will not wait for the
|
||||
- * cgroup members to die, simply because
|
||||
- * cgroup notification is unreliable. It
|
||||
- * doesn't work at all in containers, and
|
||||
- * outside of containers it can be confused
|
||||
- * easily by leaving directories in the
|
||||
- * cgroup. */
|
||||
-
|
||||
- /* wait_for_exit = true; */
|
||||
+ * cgroup members to die if we are running in
|
||||
+ * a container or if this is a delegation
|
||||
+ * unit, simply because cgroup notification is
|
||||
+ * unreliable in these cases. It doesn't work
|
||||
+ * at all in containers, and outside of
|
||||
+ * containers it can be confused easily by
|
||||
+ * left-over directories in the cgroup --
|
||||
+ * which however should not exist in
|
||||
+ * non-delegated units. */
|
||||
+
|
||||
+ if (detect_container(NULL) == 0 && !unit_cgroup_delegate(u))
|
||||
+ wait_for_exit = true;
|
||||
|
||||
if (c->send_sighup && k != KILL_KILL) {
|
||||
set_free(pid_set);
|
||||
--
|
||||
2.6.0
|
||||
|
@ -13,27 +13,27 @@ No word on compression…
|
||||
src/journal/journald-server.c | 34 ++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 34 insertions(+)
|
||||
|
||||
Index: systemd-227/src/journal/journald-server.c
|
||||
Index: systemd-221/src/journal/journald-server.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/journal/journald-server.c
|
||||
+++ systemd-227/src/journal/journald-server.c
|
||||
@@ -24,6 +24,7 @@
|
||||
#include <selinux/selinux.h>
|
||||
#endif
|
||||
--- systemd-221.orig/src/journal/journald-server.c
|
||||
+++ systemd-221/src/journal/journald-server.c
|
||||
@@ -21,6 +21,7 @@
|
||||
|
||||
#include <sys/signalfd.h>
|
||||
#include <sys/ioctl.h>
|
||||
+#include <linux/fs.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/signalfd.h>
|
||||
#include <linux/sockios.h>
|
||||
#include <sys/statvfs.h>
|
||||
@@ -861,6 +862,39 @@ void server_driver_message(Server *s, sd
|
||||
dispatch_message_real(s, iovec, n, ELEMENTSOF(iovec), &ucred, NULL, NULL, 0, NULL, LOG_INFO, 0);
|
||||
#include <sys/mman.h>
|
||||
@@ -918,6 +919,38 @@ finish:
|
||||
dispatch_message_real(s, iovec, n, m, ucred, tv, label, label_len, unit_id, priority, object_pid);
|
||||
}
|
||||
|
||||
+/*
|
||||
+ * On journaling and/or compressing file systems, avoid doubling the efforts
|
||||
+ * for the system, that is, set NOCOW and NOCOMP inode flags. Check for every
|
||||
+ * single flag, as otherwise, some of the file systems may return EOPNOTSUPP on
|
||||
+ * a single unkown flag (like Btrfs does).
|
||||
+ * a single unkown flag (like BtrFS does).
|
||||
+ *
|
||||
+ * …but src/journal/journal-file.c already sets NOCOW too…⸘
|
||||
+ */
|
||||
@ -61,13 +61,12 @@ Index: systemd-227/src/journal/journald-server.c
|
||||
+ }
|
||||
+ close(fd);
|
||||
+}
|
||||
+
|
||||
void server_dispatch_message(
|
||||
Server *s,
|
||||
struct iovec *iovec, unsigned n, unsigned m,
|
||||
@@ -948,6 +982,7 @@ static int system_journal_open(Server *s
|
||||
|
||||
fn = strjoina("/var/log/journal/", SERVER_MACHINE_ID(s));
|
||||
static int system_journal_open(Server *s, bool flush_requested) {
|
||||
int r;
|
||||
@@ -947,6 +980,7 @@ static int system_journal_open(Server *s
|
||||
|
||||
fn = strjoina("/var/log/journal/", ids);
|
||||
(void) mkdir(fn, 0755);
|
||||
+ disable_cow(fn, s);
|
||||
|
||||
|
@ -12,10 +12,10 @@
|
||||
shell-completion/bash/udevadm | 6 +++++-
|
||||
11 files changed, 70 insertions(+), 11 deletions(-)
|
||||
|
||||
Index: systemd-228/shell-completion/bash/coredumpctl
|
||||
Index: systemd-221/shell-completion/bash/coredumpctl
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/coredumpctl
|
||||
+++ systemd-228/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-228/shell-completion/bash/coredumpctl
|
||||
|
||||
-complete -F _coredumpctl coredumpctl
|
||||
+complete -o default -o bashdefault -F _coredumpctl coredumpctl
|
||||
Index: systemd-228/shell-completion/bash/hostnamectl
|
||||
Index: systemd-221/shell-completion/bash/hostnamectl
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/hostnamectl
|
||||
+++ systemd-228/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,12 +54,12 @@ Index: systemd-228/shell-completion/bash/hostnamectl
|
||||
|
||||
-complete -F _hostnamectl hostnamectl
|
||||
+complete -o default -o bashdefault -F _hostnamectl hostnamectl
|
||||
Index: systemd-228/shell-completion/bash/journalctl
|
||||
Index: systemd-221/shell-completion/bash/journalctl
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/journalctl
|
||||
+++ systemd-228/shell-completion/bash/journalctl
|
||||
@@ -56,6 +56,10 @@ _journalctl() {
|
||||
--root -M --machine'
|
||||
--- systemd-221.orig/shell-completion/bash/journalctl
|
||||
+++ systemd-221/shell-completion/bash/journalctl
|
||||
@@ -55,6 +55,10 @@ _journalctl() {
|
||||
--root --machine'
|
||||
)
|
||||
|
||||
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
||||
@ -69,16 +69,16 @@ Index: systemd-228/shell-completion/bash/journalctl
|
||||
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
|
||||
case $prev in
|
||||
--boot|--this-boot|-b)
|
||||
@@ -121,4 +125,4 @@ _journalctl() {
|
||||
@@ -120,4 +124,4 @@ _journalctl() {
|
||||
fi
|
||||
}
|
||||
|
||||
-complete -F _journalctl journalctl
|
||||
+complete -o default -o bashdefault -F _journalctl journalctl
|
||||
Index: systemd-228/shell-completion/bash/kernel-install
|
||||
Index: systemd-221/shell-completion/bash/kernel-install
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/kernel-install
|
||||
+++ systemd-228/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-228/shell-completion/bash/kernel-install
|
||||
|
||||
-complete -F _kernel_install kernel-install
|
||||
+complete -o default -o bashdefault -F _kernel_install kernel-install
|
||||
Index: systemd-228/shell-completion/bash/localectl
|
||||
Index: systemd-221/shell-completion/bash/localectl
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/localectl
|
||||
+++ systemd-228/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-228/shell-completion/bash/localectl
|
||||
|
||||
-complete -F _localectl localectl
|
||||
+complete -o default -o bashdefault -F _localectl localectl
|
||||
Index: systemd-228/shell-completion/bash/loginctl
|
||||
Index: systemd-221/shell-completion/bash/loginctl
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/loginctl
|
||||
+++ systemd-228/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-228/shell-completion/bash/loginctl
|
||||
|
||||
-complete -F _loginctl loginctl
|
||||
+complete -o default -o bashdefault -F _loginctl loginctl
|
||||
Index: systemd-228/shell-completion/bash/systemctl.in
|
||||
Index: systemd-221/shell-completion/bash/systemctl.in
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/systemctl.in
|
||||
+++ systemd-228/shell-completion/bash/systemctl.in
|
||||
@@ -104,6 +104,10 @@ _systemctl () {
|
||||
--preset-mode -n --lines -o --output -M --machine'
|
||||
--- 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 --job-mode --root'
|
||||
)
|
||||
|
||||
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
||||
@ -164,17 +164,17 @@ Index: systemd-228/shell-completion/bash/systemctl.in
|
||||
+
|
||||
if __contains_word "--user" ${COMP_WORDS[*]}; then
|
||||
mode=--user
|
||||
elif __contains_word "--global" ${COMP_WORDS[*]}; then
|
||||
@@ -280,4 +284,4 @@ _systemctl () {
|
||||
else
|
||||
@@ -268,4 +272,4 @@ _systemctl () {
|
||||
return 0
|
||||
}
|
||||
|
||||
-complete -F _systemctl systemctl
|
||||
+complete -o default -o bashdefault -F _systemctl systemctl
|
||||
Index: systemd-228/shell-completion/bash/systemd-analyze
|
||||
Index: systemd-221/shell-completion/bash/systemd-analyze
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/systemd-analyze
|
||||
+++ systemd-228/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-228/shell-completion/bash/systemd-analyze
|
||||
|
||||
-complete -F _systemd_analyze systemd-analyze
|
||||
+complete -o default -o bashdefault -F _systemd_analyze systemd-analyze
|
||||
Index: systemd-228/shell-completion/bash/systemd-run
|
||||
Index: systemd-221/shell-completion/bash/systemd-run
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/systemd-run
|
||||
+++ systemd-228/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/>.
|
||||
@ -210,7 +210,7 @@ Index: systemd-228/shell-completion/bash/systemd-run
|
||||
__systemctl() {
|
||||
local mode=$1; shift 1
|
||||
systemctl $mode --full --no-legend "$@"
|
||||
@@ -40,6 +47,11 @@ _systemd_run() {
|
||||
@@ -38,6 +45,11 @@ _systemd_run() {
|
||||
|
||||
local mode=--system
|
||||
local i
|
||||
@ -219,19 +219,19 @@ Index: systemd-228/shell-completion/bash/systemd-run
|
||||
+ return 0
|
||||
+ fi
|
||||
+
|
||||
local opts_with_values=(
|
||||
--unit --description --slice --service-type -H --host -M --machine -p --property --on-active
|
||||
--on-boot --on-startup --on-unit-active --on-unit-inactive --on-calendar --timer-property
|
||||
@@ -114,4 +126,4 @@ _systemd_run() {
|
||||
for (( i=1; i <= COMP_CWORD; i++ )); do
|
||||
if [[ ${COMP_WORDS[i]} != -* ]]; then
|
||||
local root_command=${COMP_WORDS[i]}
|
||||
@@ -98,4 +110,4 @@ _systemd_run() {
|
||||
return 0
|
||||
}
|
||||
|
||||
-complete -F _systemd_run systemd-run
|
||||
+complete -o default -o bashdefault -F _systemd_run systemd-run
|
||||
Index: systemd-228/shell-completion/bash/timedatectl
|
||||
Index: systemd-221/shell-completion/bash/timedatectl
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/timedatectl
|
||||
+++ systemd-228/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-228/shell-completion/bash/timedatectl
|
||||
|
||||
-complete -F _timedatectl timedatectl
|
||||
+complete -o default -o bashdefault -F _timedatectl timedatectl
|
||||
Index: systemd-228/shell-completion/bash/udevadm
|
||||
Index: systemd-221/shell-completion/bash/udevadm
|
||||
===================================================================
|
||||
--- systemd-228.orig/shell-completion/bash/udevadm
|
||||
+++ systemd-228/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)
|
||||
|
99
1001-re-enable-by_path-links-for-ata-devices.patch
Normal file
99
1001-re-enable-by_path-links-for-ata-devices.patch
Normal file
@ -0,0 +1,99 @@
|
||||
From 5cf46aa4339670afac386b1b0e630b739f3621c7 Mon Sep 17 00:00:00 2001
|
||||
From: Robert Milasan <rmilasan@suse.com>
|
||||
Date: Thu, 12 Jul 2012 15:56:34 +0000
|
||||
Subject: [PATCH] Persistent by_path links for ata devices
|
||||
|
||||
With newer kernel we have the 'port_no' attribute,
|
||||
which allows us to construct a valid ata by-path link.
|
||||
|
||||
With this patch ATA links of the form
|
||||
|
||||
ata-<port>.[01]
|
||||
|
||||
(for master/slave devices) or
|
||||
|
||||
ata-<port>.<pmp>.0
|
||||
|
||||
(for devices behind port multipliers)
|
||||
are generated.
|
||||
|
||||
References: bnc#770910,FATE#317063
|
||||
|
||||
Signed-off-by: Robert Milasan <rmilasan@suse.com>
|
||||
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-221/src/udev/udev-builtin-path_id.c
|
||||
===================================================================
|
||||
--- 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;
|
||||
}
|
||||
|
||||
+static struct udev_device *handle_ata(struct udev_device *parent, char **path)
|
||||
+{
|
||||
+ struct udev *udev = udev_device_get_udev(parent);
|
||||
+ struct udev_device *hostdev, *portdev;
|
||||
+ int host, bus, target, lun, port_no;
|
||||
+ const char *name, *atahost, *port;
|
||||
+
|
||||
+ hostdev = udev_device_get_parent_with_subsystem_devtype(parent, "scsi", "scsi_host");
|
||||
+ if (hostdev == NULL)
|
||||
+ return NULL;
|
||||
+
|
||||
+ name = udev_device_get_sysname(parent);
|
||||
+ if (sscanf(name, "%d:%d:%d:%d", &host, &bus, &target, &lun) != 4)
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* The ata port is the parent of the SCSI host */
|
||||
+ hostdev = udev_device_get_parent(hostdev);
|
||||
+ atahost = udev_device_get_sysname(hostdev);
|
||||
+ if (strncmp(atahost, "ata", 3))
|
||||
+ return NULL;
|
||||
+
|
||||
+ /* ATA port number is found in 'port_no' attribute */
|
||||
+ portdev = udev_device_new_from_subsystem_sysname(udev, "ata_port",
|
||||
+ atahost);
|
||||
+ port = udev_device_get_sysattr_value(portdev, "port_no");
|
||||
+ if (!port || sscanf(port, "%d", &port_no) != 1) {
|
||||
+ hostdev = NULL;
|
||||
+ goto out;
|
||||
+ }
|
||||
+ if (bus != 0)
|
||||
+ /* Devices behind port multiplier have a bus != 0*/
|
||||
+ path_prepend(path, "ata-%u.%u.0", port_no, bus);
|
||||
+ else
|
||||
+ /* Master/slave are distinguished by target id */
|
||||
+ path_prepend(path, "ata-%u.%u", port_no, target);
|
||||
+out:
|
||||
+ udev_device_unref(portdev);
|
||||
+ return hostdev;
|
||||
+}
|
||||
+
|
||||
static struct udev_device *handle_scsi(struct udev_device *parent, char **path, bool *supported_parent) {
|
||||
const char *devtype;
|
||||
const char *name;
|
||||
@@ -486,19 +526,8 @@ static struct udev_device *handle_scsi(s
|
||||
goto out;
|
||||
}
|
||||
|
||||
- /*
|
||||
- * We do not support the ATA transport class, it uses global counters
|
||||
- * to name the ata devices which numbers spread across multiple
|
||||
- * controllers.
|
||||
- *
|
||||
- * The real link numbers are not exported. Also, possible chains of ports
|
||||
- * behind port multipliers cannot be composed that way.
|
||||
- *
|
||||
- * Until all that is solved at the kernel level, there are no by-path/
|
||||
- * links for ATA devices.
|
||||
- */
|
||||
if (strstr(name, "/ata") != NULL) {
|
||||
- parent = NULL;
|
||||
+ parent = handle_ata(parent, path);
|
||||
goto out;
|
||||
}
|
||||
|
@ -2,11 +2,11 @@
|
||||
src/udev/udevd.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: systemd-227/src/udev/udevd.c
|
||||
Index: systemd-221/src/udev/udevd.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/udev/udevd.c
|
||||
+++ systemd-227/src/udev/udevd.c
|
||||
@@ -568,7 +568,7 @@ static void event_run(Manager *manager,
|
||||
--- systemd-221.orig/src/udev/udevd.c
|
||||
+++ systemd-221/src/udev/udevd.c
|
||||
@@ -569,7 +569,7 @@ static void event_run(Manager *manager,
|
||||
|
||||
if (hashmap_size(manager->workers) >= arg_children_max) {
|
||||
if (arg_children_max > 1)
|
||||
@ -15,12 +15,12 @@ Index: systemd-227/src/udev/udevd.c
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1672,7 +1672,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)
|
||||
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) * 64;
|
||||
}
|
||||
|
||||
log_debug("set children_max to %u", arg_children_max);
|
||||
}
|
||||
|
@ -2,12 +2,10 @@
|
||||
src/login/pam_systemd.c | 6 +++++-
|
||||
1 file changed, 5 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: systemd-228/src/login/pam_systemd.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/login/pam_systemd.c
|
||||
+++ systemd-228/src/login/pam_systemd.c
|
||||
@@ -515,7 +515,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess
|
||||
r = pam_set_data(handle, "systemd.session-fd", FD_TO_PTR(session_fd), NULL);
|
||||
--- src/login/pam_systemd.c
|
||||
+++ src/login/pam_systemd.c 2015-07-29 08:52:20.762018565 +0000
|
||||
@@ -507,7 +507,11 @@ _public_ PAM_EXTERN int pam_sm_open_sess
|
||||
r = pam_set_data(handle, "systemd.session-fd", INT_TO_PTR(session_fd+1), NULL);
|
||||
if (r != PAM_SUCCESS) {
|
||||
pam_syslog(handle, LOG_ERR, "Failed to install session fd.");
|
||||
- safe_close(session_fd);
|
||||
|
@ -1,28 +1,28 @@
|
||||
Nasty bug reported on boo#867663
|
||||
Nasty bug reported on bnc#867663
|
||||
|
||||
---
|
||||
src/basic/def.h | 2 +-
|
||||
src/core/manager.c | 3 ++-
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: systemd-228/src/basic/def.h
|
||||
Index: systemd-221/src/basic/def.h
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/basic/def.h
|
||||
+++ systemd-228/src/basic/def.h
|
||||
@@ -40,7 +40,7 @@
|
||||
--- systemd-221.orig/src/basic/def.h
|
||||
+++ systemd-221/src/basic/def.h
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
#define SYSTEMD_CGROUP_CONTROLLER "name=systemd"
|
||||
#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 REBOOT_PARAM_FILE "/run/systemd/reboot-param"
|
||||
Index: systemd-228/src/core/manager.c
|
||||
#define DIGITS "0123456789"
|
||||
Index: systemd-221/src/core/manager.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/core/manager.c
|
||||
+++ systemd-228/src/core/manager.c
|
||||
@@ -2003,7 +2003,8 @@ static int manager_dispatch_jobs_in_prog
|
||||
--- 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);
|
||||
|
||||
|
@ -9,20 +9,20 @@ Date: Fri Jun 19 21:36:27 CEST 2015
|
||||
src/vconsole/vconsole-setup.c | 151 ++++++++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 147 insertions(+), 4 deletions(-)
|
||||
|
||||
Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
Index: systemd-221/src/vconsole/vconsole-setup.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/vconsole/vconsole-setup.c
|
||||
+++ systemd-228/src/vconsole/vconsole-setup.c
|
||||
@@ -34,6 +34,8 @@
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.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"
|
||||
#include "io-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "log.h"
|
||||
@@ -104,8 +106,10 @@ 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;
|
||||
}
|
||||
|
||||
@ -35,7 +35,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
int i = 0, r;
|
||||
pid_t pid;
|
||||
|
||||
@@ -122,6 +126,8 @@ static int keyboard_load_and_wait(const
|
||||
@@ -117,6 +121,8 @@ static int keyboard_load_and_wait(const
|
||||
args[i++] = map;
|
||||
if (map_toggle)
|
||||
args[i++] = map_toggle;
|
||||
@ -44,7 +44,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
args[i++] = NULL;
|
||||
|
||||
pid = fork();
|
||||
@@ -251,11 +257,117 @@ static void font_copy_to_all_vcs(int fd)
|
||||
@@ -246,11 +252,117 @@ static void font_copy_to_all_vcs(int fd)
|
||||
}
|
||||
}
|
||||
|
||||
@ -162,7 +162,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
_cleanup_close_ int fd = -1;
|
||||
bool utf8, font_copy = false, font_ok, keyboard_ok;
|
||||
int r = EXIT_FAILURE;
|
||||
@@ -286,6 +398,31 @@ int main(int argc, char **argv) {
|
||||
@@ -281,6 +393,31 @@ int main(int argc, char **argv) {
|
||||
|
||||
utf8 = is_locale_utf8();
|
||||
|
||||
@ -194,7 +194,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
|
||||
"KEYMAP", &vc_keymap,
|
||||
"KEYMAP_TOGGLE", &vc_keymap_toggle,
|
||||
@@ -317,11 +454,17 @@ int main(int argc, char **argv) {
|
||||
@@ -312,11 +449,17 @@ int main(int argc, char **argv) {
|
||||
(void) disable_utf8(fd);
|
||||
|
||||
font_ok = font_load_and_wait(vc, vc_font, vc_font_map, vc_font_unimap) > 0;
|
||||
|
@ -9,16 +9,14 @@ Cristian Rodríguez <crrodriguez@opensuse.org>
|
||||
---
|
||||
Makefile.am | 13 ++++++++++
|
||||
rules/73-seat-numlock.rules | 8 ++++++
|
||||
src/login/numlock-on.c | 34 ++++++++++++++++++++++++++
|
||||
src/vconsole/vconsole-setup.c | 41 ++++++++++++++++++++++++++++++--
|
||||
src/login/numlock-on.c | 34 +++++++++++++++++++++++++++
|
||||
src/vconsole/vconsole-setup.c | 40 ++++++++++++++++++++++++++++++--
|
||||
units/systemd-vconsole-setup.service.in | 2 -
|
||||
5 files changed, 95 insertions(+), 3 deletions(-)
|
||||
5 files changed, 94 insertions(+), 3 deletions(-)
|
||||
|
||||
Index: systemd-228/Makefile.am
|
||||
===================================================================
|
||||
--- systemd-228.orig/Makefile.am
|
||||
+++ systemd-228/Makefile.am
|
||||
@@ -3825,6 +3825,19 @@ dist_udevrules_DATA += \
|
||||
--- systemd-222.orig/Makefile.am
|
||||
+++ systemd-222/Makefile.am
|
||||
@@ -3805,6 +3805,19 @@ dist_udevrules_DATA += \
|
||||
rules/60-persistent-v4l.rules
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
@ -38,10 +36,8 @@ Index: systemd-228/Makefile.am
|
||||
mtd_probe_SOURCES = \
|
||||
src/udev/mtd_probe/mtd_probe.c \
|
||||
src/udev/mtd_probe/mtd_probe.h \
|
||||
Index: systemd-228/rules/73-seat-numlock.rules
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-228/rules/73-seat-numlock.rules
|
||||
+++ systemd-222/rules/73-seat-numlock.rules
|
||||
@@ -0,0 +1,8 @@
|
||||
+# This file is part of SUSE customization of systemd.
|
||||
+#
|
||||
@ -51,10 +47,8 @@ Index: systemd-228/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-228/src/login/numlock-on.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-228/src/login/numlock-on.c
|
||||
+++ systemd-222/src/login/numlock-on.c
|
||||
@@ -0,0 +1,34 @@
|
||||
+/*
|
||||
+ * numlock-on.c: Turn numlock-on
|
||||
@ -90,21 +84,11 @@ Index: systemd-228/src/login/numlock-on.c
|
||||
+
|
||||
+ exit(0);
|
||||
+}
|
||||
Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/vconsole/vconsole-setup.c
|
||||
+++ systemd-228/src/vconsole/vconsole-setup.c
|
||||
@@ -36,6 +36,7 @@
|
||||
#include "fileio.h"
|
||||
#include "macro.h"
|
||||
#include "strv.h"
|
||||
+#include "fs-util.h"
|
||||
#include "io-util.h"
|
||||
#include "locale-util.h"
|
||||
#include "log.h"
|
||||
@@ -46,6 +47,10 @@
|
||||
#include "util.h"
|
||||
#include "virt.h"
|
||||
--- systemd-222.orig/src/vconsole/vconsole-setup.c
|
||||
+++ systemd-222/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
|
||||
@ -113,7 +97,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
static bool is_vconsole(int fd) {
|
||||
unsigned char data[1];
|
||||
|
||||
@@ -364,9 +369,10 @@ 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,
|
||||
@ -126,7 +110,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
bool comp_ok, rate_ok;
|
||||
_cleanup_close_ int fd = -1;
|
||||
bool utf8, font_copy = false, font_ok, keyboard_ok;
|
||||
@@ -404,6 +410,7 @@ int main(int argc, char **argv) {
|
||||
@@ -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,
|
||||
@ -134,7 +118,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
"COMPOSETABLE", &vc_compose_table,
|
||||
NULL);
|
||||
if (r < 0 && r != -ENOENT)
|
||||
@@ -421,6 +428,32 @@ int main(int argc, char **argv) {
|
||||
@@ -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;
|
||||
@ -167,7 +151,7 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
#endif /* HAVE_SYSV_COMPAT */
|
||||
|
||||
r = parse_env_file("/etc/vconsole.conf", NEWLINE,
|
||||
@@ -456,6 +489,10 @@ int main(int argc, char **argv) {
|
||||
@@ -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;
|
||||
@ -178,10 +162,8 @@ Index: systemd-228/src/vconsole/vconsole-setup.c
|
||||
#ifdef HAVE_SYSV_COMPAT
|
||||
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-228/units/systemd-vconsole-setup.service.in
|
||||
===================================================================
|
||||
--- systemd-228.orig/units/systemd-vconsole-setup.service.in
|
||||
+++ systemd-228/units/systemd-vconsole-setup.service.in
|
||||
--- systemd-222.orig/units/systemd-vconsole-setup.service.in
|
||||
+++ systemd-222/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
|
||||
|
@ -2,22 +2,16 @@ From: Frederic Crozat <fcrozat@suse.com>
|
||||
Date: Tue, 4 Dec 2012 16:51:32 +0000
|
||||
Subject: handle root_uses_lang value in /etc/sysconfig/language
|
||||
|
||||
handle ROOT_USES_LANG=ctype (boo#792182).
|
||||
handle ROOT_USES_LANG=ctype (bnc#792182).
|
||||
---
|
||||
src/core/locale-setup.c | 40 ++++++++++++++++++++++++++++++++++++++++
|
||||
1 file changed, 40 insertions(+)
|
||||
src/core/locale-setup.c | 26 ++++++++++++++++++++++++++
|
||||
1 file changed, 26 insertions(+)
|
||||
|
||||
Index: systemd-228/src/core/locale-setup.c
|
||||
Index: systemd-221/src/core/locale-setup.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/core/locale-setup.c
|
||||
+++ systemd-228/src/core/locale-setup.c
|
||||
@@ -30,11 +30,16 @@
|
||||
#include "strv.h"
|
||||
#include "util.h"
|
||||
#include "virt.h"
|
||||
+#include "alloc-util.h"
|
||||
|
||||
int locale_setup(char ***environment) {
|
||||
--- systemd-221.orig/src/core/locale-setup.c
|
||||
+++ systemd-221/src/core/locale-setup.c
|
||||
@@ -34,6 +34,10 @@ int locale_setup(char ***environment) {
|
||||
char **add;
|
||||
char *variables[_VARIABLE_LC_MAX] = {};
|
||||
int r = 0, i;
|
||||
@ -26,9 +20,9 @@ Index: systemd-228/src/core/locale-setup.c
|
||||
+ char _cleanup_free_ *root_uses_lang = NULL;
|
||||
+#endif
|
||||
|
||||
if (detect_container() <= 0) {
|
||||
if (detect_container(NULL) <= 0) {
|
||||
r = parse_env_file("/proc/cmdline", WHITESPACE,
|
||||
@@ -81,6 +86,41 @@ int locale_setup(char ***environment) {
|
||||
@@ -80,6 +85,41 @@ int locale_setup(char ***environment) {
|
||||
if (r < 0 && r != -ENOENT)
|
||||
log_warning_errno(r, "Failed to read /etc/locale.conf: %m");
|
||||
}
|
||||
|
@ -8,16 +8,16 @@ systemd unit drop-in files to add dependencies
|
||||
---
|
||||
Makefile.am | 9
|
||||
src/insserv-generator/Makefile | 28 ++
|
||||
src/insserv-generator/insserv-generator.c | 319 ++++++++++++++++++++++++++++++
|
||||
3 files changed, 355 insertions(+), 1 deletion(-)
|
||||
src/insserv-generator/insserv-generator.c | 316 ++++++++++++++++++++++++++++++
|
||||
3 files changed, 352 insertions(+), 1 deletion(-)
|
||||
create mode 100644 src/insserv-generator/Makefile
|
||||
create mode 100644 src/insserv-generator/insserv-generator.c
|
||||
|
||||
Index: systemd-228/Makefile.am
|
||||
Index: systemd-224/Makefile.am
|
||||
===================================================================
|
||||
--- systemd-228.orig/Makefile.am
|
||||
+++ systemd-228/Makefile.am
|
||||
@@ -626,7 +626,8 @@ nodist_systemunit_DATA += \
|
||||
--- systemd-224.orig/Makefile.am
|
||||
+++ systemd-224/Makefile.am
|
||||
@@ -617,7 +617,8 @@ nodist_systemunit_DATA += \
|
||||
|
||||
systemgenerator_PROGRAMS += \
|
||||
systemd-sysv-generator \
|
||||
@ -27,7 +27,7 @@ Index: systemd-228/Makefile.am
|
||||
endif
|
||||
|
||||
EXTRA_DIST += \
|
||||
@@ -2682,6 +2683,12 @@ $(systemd_boot): $(systemd_boot_solib)
|
||||
@@ -2556,6 +2557,12 @@ $(systemd_boot): $(systemd_boot_solib)
|
||||
endif
|
||||
endif
|
||||
|
||||
@ -40,10 +40,10 @@ Index: systemd-228/Makefile.am
|
||||
# ------------------------------------------------------------------------------
|
||||
stub_headers = \
|
||||
src/boot/efi/util.h \
|
||||
Index: systemd-228/src/insserv-generator/Makefile
|
||||
Index: systemd-224/src/insserv-generator/Makefile
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-228/src/insserv-generator/Makefile
|
||||
+++ systemd-224/src/insserv-generator/Makefile
|
||||
@@ -0,0 +1,28 @@
|
||||
+# This file is part of systemd.
|
||||
+#
|
||||
@ -73,11 +73,11 @@ Index: systemd-228/src/insserv-generator/Makefile
|
||||
+ $(MAKE) -C .. clean
|
||||
+
|
||||
+.PHONY: all clean
|
||||
Index: systemd-228/src/insserv-generator/insserv-generator.c
|
||||
Index: systemd-224/src/insserv-generator/insserv-generator.c
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ systemd-228/src/insserv-generator/insserv-generator.c
|
||||
@@ -0,0 +1,319 @@
|
||||
+++ systemd-224/src/insserv-generator/insserv-generator.c
|
||||
@@ -0,0 +1,316 @@
|
||||
+/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/
|
||||
+
|
||||
+/***
|
||||
@ -112,9 +112,6 @@ Index: systemd-228/src/insserv-generator/insserv-generator.c
|
||||
+#include "path-util.h"
|
||||
+#include "util.h"
|
||||
+#include "strv.h"
|
||||
+#include "alloc-util.h"
|
||||
+#include "string-util.h"
|
||||
+#include "fd-util.h"
|
||||
+
|
||||
+static const char *arg_dest = "/tmp";
|
||||
+
|
||||
|
@ -1,4 +1,4 @@
|
||||
# -*- Mode: rpm-spec; indent-tabs-mode: nil -*- */
|
||||
# -*- Mode: makefile; indent-tabs-mode: t -*- */
|
||||
#
|
||||
# This file is part of systemd.
|
||||
#
|
||||
@ -39,7 +39,7 @@ Requires(postun): systemd \
|
||||
%systemd_post() \
|
||||
if [ $1 -eq 1 ] ; then \
|
||||
# Initial installation \
|
||||
systemctl --no-reload preset %{?*} >/dev/null 2>&1 || : \
|
||||
systemctl preset %{?*} >/dev/null 2>&1 || : \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
@ -48,7 +48,8 @@ fi \
|
||||
%systemd_preun() \
|
||||
if [ $1 -eq 0 ] ; then \
|
||||
# Package removal, not upgrade \
|
||||
systemctl --no-reload disable --now %{?*} > /dev/null 2>&1 || : \
|
||||
systemctl --no-reload disable %{?*} > /dev/null 2>&1 || : \
|
||||
systemctl stop %{?*} > /dev/null 2>&1 || : \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
@ -59,11 +60,14 @@ if [ $1 -eq 0 ] ; then \
|
||||
fi \
|
||||
%{nil}
|
||||
|
||||
%systemd_postun() %{nil}
|
||||
%systemd_postun() \
|
||||
systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||
%{nil}
|
||||
|
||||
%systemd_user_postun() %{nil}
|
||||
|
||||
%systemd_postun_with_restart() \
|
||||
systemctl daemon-reload >/dev/null 2>&1 || : \
|
||||
if [ $1 -ge 1 ] ; then \
|
||||
# Package upgrade, not uninstall \
|
||||
systemctl try-restart %{?*} >/dev/null 2>&1 || : \
|
||||
|
@ -0,0 +1,18 @@
|
||||
From: Robert Schweikert <rjschwei@suse.com>
|
||||
Date: Fri, 12 Apr 2013 12:08:16 -0400
|
||||
Subject: rules: add lid switch of ARM based Chromebook as a power switch to
|
||||
logind
|
||||
|
||||
---
|
||||
src/login/70-power-switch.rules | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
--- a/src/login/70-power-switch.rules
|
||||
+++ b/src/login/70-power-switch.rules
|
||||
@@ -11,5 +11,6 @@ SUBSYSTEM=="input", KERNEL=="event*", SU
|
||||
SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="thinkpad_acpi", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="twl4030_pwrbutton", TAG+="power-switch"
|
||||
SUBSYSTEM=="input", KERNEL=="event*", ATTRS{name}=="tps65217_pwr_but", TAG+="power-switch"
|
||||
+SUBSYSTEM=="input", KERNEL=="event*", KERNELS=="gpio-keys.8", TAG+="power-switch"
|
||||
|
||||
LABEL="power_switch_end"
|
@ -3,29 +3,29 @@ Use and set default logging console for both journald and kernel messages
|
||||
---
|
||||
src/journal/journald-console.c | 100 +++++++++++++++++++++++++++++++++++++++++
|
||||
src/journal/journald-console.h | 3 +
|
||||
src/journal/journald-server.c | 5 ++
|
||||
3 files changed, 108 insertions(+)
|
||||
src/journal/journald-server.c | 6 ++
|
||||
3 files changed, 109 insertions(+)
|
||||
|
||||
Index: systemd-228/src/journal/journald-console.c
|
||||
Index: systemd-221/src/journal/journald-console.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/journal/journald-console.c
|
||||
+++ systemd-228/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 <sys/socket.h>
|
||||
#include <time.h>
|
||||
+#ifdef HAVE_SYSV_COMPAT
|
||||
+# include <linux/tiocl.h>
|
||||
+# include <linux/vt.h>
|
||||
+# include <sys/ioctl.h>
|
||||
+# include <sys/klog.h>
|
||||
+# include <errno.h>
|
||||
+# include "string-util.h"
|
||||
+# include <linux/tiocl.h>
|
||||
+# include <linux/vt.h>
|
||||
+# include <sys/ioctl.h>
|
||||
+# include <sys/klog.h>
|
||||
+# include <errno.h>
|
||||
+# include "util.h"
|
||||
+#endif
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
@@ -50,6 +58,76 @@ static bool prefix_timestamp(void) {
|
||||
#include "fileio.h"
|
||||
#include "journald-server.h"
|
||||
@@ -45,6 +53,76 @@ static bool prefix_timestamp(void) {
|
||||
return cached_printk_time;
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ Index: systemd-228/src/journal/journald-console.c
|
||||
void server_forward_console(
|
||||
Server *s,
|
||||
int priority,
|
||||
@@ -71,6 +149,12 @@ void server_forward_console(
|
||||
@@ -66,6 +144,12 @@ void server_forward_console(
|
||||
if (LOG_PRI(priority) > s->max_level_console)
|
||||
return;
|
||||
|
||||
@ -115,10 +115,10 @@ Index: systemd-228/src/journal/journald-console.c
|
||||
/* First: timestamp */
|
||||
if (prefix_timestamp()) {
|
||||
assert_se(clock_gettime(CLOCK_MONOTONIC, &ts) == 0);
|
||||
@@ -107,7 +191,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(fd, "Failed to open %s for logging: %m", tty);
|
||||
log_debug_errno(errno, "Failed to open %s for logging: %m", tty);
|
||||
+#ifdef HAVE_SYSV_COMPAT
|
||||
+ if (fd != -ENOENT && fd != -ENODEV)
|
||||
+ return;
|
||||
@ -139,10 +139,10 @@ Index: systemd-228/src/journal/journald-console.c
|
||||
}
|
||||
|
||||
if (writev(fd, iovec, n) < 0)
|
||||
Index: systemd-228/src/journal/journald-console.h
|
||||
Index: systemd-221/src/journal/journald-console.h
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/journal/journald-console.h
|
||||
+++ systemd-228/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"
|
||||
|
||||
@ -150,19 +150,19 @@ Index: systemd-228/src/journal/journald-console.h
|
||||
+
|
||||
+void klogconsole(Server *s);
|
||||
+void default_tty_path(Server *s);
|
||||
Index: systemd-228/src/journal/journald-server.c
|
||||
Index: systemd-221/src/journal/journald-server.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/journal/journald-server.c
|
||||
+++ systemd-228/src/journal/journald-server.c
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "journald-audit.h"
|
||||
#include "journald-kmsg.h"
|
||||
#include "journald-native.h"
|
||||
--- 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-server.h"
|
||||
#include "journald-stream.h"
|
||||
@@ -1751,6 +1752,10 @@ int server_init(Server *s) {
|
||||
#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);
|
||||
@ -170,6 +170,7 @@ Index: systemd-228/src/journal/journald-server.c
|
||||
+
|
||||
+ if (s->tty_path)
|
||||
+ klogconsole(s);
|
||||
|
||||
+
|
||||
if (!!s->rate_limit_interval ^ !!s->rate_limit_burst) {
|
||||
log_debug("Setting both rate limit interval and burst from "USEC_FMT",%u to 0,0",
|
||||
s->rate_limit_interval, s->rate_limit_burst);
|
||||
|
@ -7,14 +7,12 @@ 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 | 20 +++++++++++++++-----
|
||||
1 file changed, 15 insertions(+), 5 deletions(-)
|
||||
src/sysv-generator/sysv-generator.c | 21 +++++++++++++++------
|
||||
1 file changed, 15 insertions(+), 6 deletions(-)
|
||||
|
||||
Index: systemd-228/src/sysv-generator/sysv-generator.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/sysv-generator/sysv-generator.c
|
||||
+++ systemd-228/src/sysv-generator/sysv-generator.c
|
||||
@@ -46,7 +46,8 @@
|
||||
--- systemd-222.orig/src/sysv-generator/sysv-generator.c
|
||||
+++ systemd-222/src/sysv-generator/sysv-generator.c
|
||||
@@ -39,7 +39,8 @@
|
||||
|
||||
typedef enum RunlevelType {
|
||||
RUNLEVEL_UP,
|
||||
@ -24,7 +22,7 @@ Index: systemd-228/src/sysv-generator/sysv-generator.c
|
||||
} RunlevelType;
|
||||
|
||||
static const struct {
|
||||
@@ -54,6 +55,9 @@ static const struct {
|
||||
@@ -47,6 +48,9 @@ static const struct {
|
||||
const char *target;
|
||||
const RunlevelType type;
|
||||
} rcnd_table[] = {
|
||||
@ -34,7 +32,7 @@ Index: systemd-228/src/sysv-generator/sysv-generator.c
|
||||
/* Standard SysV runlevels for start-up */
|
||||
{ "rc1.d", SPECIAL_RESCUE_TARGET, RUNLEVEL_UP },
|
||||
{ "rc2.d", SPECIAL_MULTI_USER_TARGET, RUNLEVEL_UP },
|
||||
@@ -69,10 +73,10 @@ static const struct {
|
||||
@@ -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
|
||||
@ -47,7 +45,7 @@ Index: systemd-228/src/sysv-generator/sysv-generator.c
|
||||
|
||||
typedef struct SysvStub {
|
||||
char *name;
|
||||
@@ -261,6 +265,10 @@ static char *sysv_translate_name(const c
|
||||
@@ -243,6 +247,10 @@ static char *sysv_translate_name(const c
|
||||
_cleanup_free_ char *c = NULL;
|
||||
char *res;
|
||||
|
||||
@ -58,18 +56,21 @@ Index: systemd-228/src/sysv-generator/sysv-generator.c
|
||||
c = strdup(name);
|
||||
if (!c)
|
||||
return NULL;
|
||||
@@ -882,7 +890,8 @@ static int set_dependencies_from_rcnd(co
|
||||
@@ -859,10 +867,10 @@ static int set_dependencies_from_rcnd(co
|
||||
|
||||
if (de->d_name[0] == 'S') {
|
||||
|
||||
- if (rcnd_table[i].type == RUNLEVEL_UP)
|
||||
- if (rcnd_table[i].type == RUNLEVEL_UP) {
|
||||
+ if (rcnd_table[i].type == RUNLEVEL_UP ||
|
||||
+ rcnd_table[i].type == RUNLEVEL_SYSINIT)
|
||||
service->sysv_start_priority = MAX(a*10 + b, service->sysv_start_priority);
|
||||
service->sysv_start_priority =
|
||||
MAX(a*10 + b, service->sysv_start_priority);
|
||||
- }
|
||||
|
||||
r = set_ensure_allocated(&runlevel_services[i], NULL);
|
||||
@@ -898,7 +907,8 @@ static int set_dependencies_from_rcnd(co
|
||||
}
|
||||
if (r < 0)
|
||||
@@ -873,7 +881,8 @@ static int set_dependencies_from_rcnd(co
|
||||
goto finish;
|
||||
|
||||
} else if (de->d_name[0] == 'K' &&
|
||||
- (rcnd_table[i].type == RUNLEVEL_DOWN)) {
|
||||
@ -77,4 +78,4 @@ Index: systemd-228/src/sysv-generator/sysv-generator.c
|
||||
+ rcnd_table[i].type == RUNLEVEL_SYSINIT)) {
|
||||
|
||||
r = set_ensure_allocated(&shutdown_services, NULL);
|
||||
if (r < 0) {
|
||||
if (r < 0)
|
||||
|
@ -1,35 +1,35 @@
|
||||
---
|
||||
man/tmpfiles.d.xml | 3 +++
|
||||
src/tmpfiles/tmpfiles.c | 46 ++++++++++++++++++++++++++++++++++++++++------
|
||||
2 files changed, 43 insertions(+), 6 deletions(-)
|
||||
src/tmpfiles/tmpfiles.c | 47 ++++++++++++++++++++++++++++++++++++++++-------
|
||||
2 files changed, 43 insertions(+), 7 deletions(-)
|
||||
|
||||
Index: systemd-228/man/tmpfiles.d.xml
|
||||
Index: systemd-221/man/tmpfiles.d.xml
|
||||
===================================================================
|
||||
--- systemd-228.orig/man/tmpfiles.d.xml
|
||||
+++ systemd-228/man/tmpfiles.d.xml
|
||||
@@ -599,6 +599,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>, the argument may be used to specify a short string that
|
||||
<varname>w</varname> may be used to specify a short string that
|
||||
is written to the file, suffixed by a newline. For
|
||||
+ <varname>x</varname>, <varname>X</varname>, a comma separated list of
|
||||
+ 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> and <varname>T</varname>,
|
||||
directory. For <varname>t</varname>, <varname>T</varname>
|
||||
determines extended attributes to be set. For
|
||||
Index: systemd-228/src/tmpfiles/tmpfiles.c
|
||||
Index: systemd-221/src/tmpfiles/tmpfiles.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/tmpfiles/tmpfiles.c
|
||||
+++ systemd-228/src/tmpfiles/tmpfiles.c
|
||||
--- 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 <time.h>
|
||||
#include <unistd.h>
|
||||
#include <linux/fs.h>
|
||||
+#include <pwd.h>
|
||||
|
||||
#include "acl-util.h"
|
||||
#include "alloc-util.h"
|
||||
@@ -378,6 +379,7 @@ static int dir_cleanup(
|
||||
#include "log.h"
|
||||
#include "util.h"
|
||||
@@ -358,6 +359,7 @@ static int dir_cleanup(
|
||||
struct timespec times[2];
|
||||
bool deleted = false;
|
||||
int r = 0;
|
||||
@ -37,7 +37,7 @@ Index: systemd-228/src/tmpfiles/tmpfiles.c
|
||||
|
||||
while ((dent = readdir(d))) {
|
||||
struct stat s;
|
||||
@@ -428,14 +430,46 @@ static int dir_cleanup(
|
||||
@@ -408,14 +410,45 @@ static int dir_cleanup(
|
||||
}
|
||||
|
||||
/* Is there an item configured for this path? */
|
||||
@ -50,7 +50,7 @@ Index: systemd-228/src/tmpfiles/tmpfiles.c
|
||||
+ 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;
|
||||
|
@ -1,59 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 21 16:25:44 UTC 2015 - fbui@suse.com
|
||||
|
||||
- Make sure we don't use tmpfs on /tmp by default (bsc#940522)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 21 10:07:38 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Avoid enabling readahead services; they have been removed.
|
||||
- In %install, only process kbd-model-map.xkb-generated if it
|
||||
exists. Resolves a build failure in 13.2/42.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com
|
||||
|
||||
- fix CVE-2015-7510: Stack overflow in nss-mymachines (boo#956712)
|
||||
Add 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 18 14:17:05 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 228
|
||||
* The various memory-related resource limit settings (such as
|
||||
LimitAS=) now understand the usual K, M, G, ... suffixes to
|
||||
the base of 1024 (IEC). Similar, the time-related settings
|
||||
understand the usual min, h, day, ... suffixes now.
|
||||
* CPUAffinity= now takes CPU index ranges in addition to just
|
||||
individual indexes.
|
||||
* A number of properties previously only settable in unit
|
||||
files are now also available as properties to set when
|
||||
creating transient units programmatically via the bus.
|
||||
- Remove 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch
|
||||
(merged upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 00:00:12 UTC 2015 - sor.alexei@meowr.ru
|
||||
|
||||
- Update to 227.
|
||||
- Rebase systemd-pam_config.patch,
|
||||
handle-root_uses_lang-value-in-etc-sysconfig-language.patch,
|
||||
0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch,
|
||||
0001-On_s390_con3270_disable_ANSI_colour_esc.patch,
|
||||
0014-journald-with-journaling-FS.patch,
|
||||
0019-make-completion-smart-to-be-able-to-redirect.patch,
|
||||
avoid-divide-by-zero-sigtrap.patch, systemd-add-user-keep.patch,
|
||||
set-and-use-default-logconsole.patch,
|
||||
tty-ask-password-agent-on-console.patch,
|
||||
0001-bnc888612-logind-polkit-acpi.patch,
|
||||
watch_resolv.conf_for_become_changed.patch,
|
||||
1097-udevd-increase-maximum-number-of-children.patch.
|
||||
- Remove
|
||||
0002-units-enable-waiting-for-unit-termination-in-certain.patch,
|
||||
1001-re-enable-by_path-links-for-ata-devices.patch,
|
||||
rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch:
|
||||
fixed upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 12 09:56:36 UTC 2015 - werner@suse.de
|
||||
|
||||
|
@ -42,7 +42,7 @@
|
||||
|
||||
Name: systemd-mini
|
||||
Url: http://www.freedesktop.org/wiki/Software/systemd
|
||||
Version: 228
|
||||
Version: 224
|
||||
Release: 0
|
||||
Summary: A System and Session Manager
|
||||
License: LGPL-2.1+
|
||||
@ -112,7 +112,7 @@ BuildRequires: pam-config >= 0.79-5
|
||||
Requires: pwdutils
|
||||
Requires: systemd-presets-branding
|
||||
Requires: sysvinit-tools
|
||||
Requires: util-linux >= 2.27
|
||||
Requires: util-linux >= 2.26
|
||||
Requires(post): coreutils
|
||||
Requires(post): findutils
|
||||
Requires(post): pam-config >= 0.79-5
|
||||
@ -176,10 +176,16 @@ Patch42: systemd-pam_config.patch
|
||||
# Never add any patches to this package without the upstream commit id
|
||||
# in the patch. Any patches added here without a very good reason to make
|
||||
# an exception will be silently removed with the next version update.
|
||||
# PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind
|
||||
Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
|
||||
# PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232)
|
||||
Patch84: make-emergency.service-conflict-with-syslog.socket.patch
|
||||
# PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
|
||||
Patch86: 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
|
||||
# PATCH-FIX-UPSTREAM (boo#949574)
|
||||
Patch87: 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#932284)
|
||||
Patch88: 0002-units-enable-waiting-for-unit-termination-in-certain.patch
|
||||
# PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
|
||||
Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
|
||||
# PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty
|
||||
@ -245,8 +251,6 @@ Patch521: kbd-model-map.patch
|
||||
Patch522: Correct_assert_on_unexpected_error_code.patch
|
||||
# PATCH-FIX-SUSE Do not stress the kernel's vc ioctls (boo#904214)
|
||||
Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#956712)
|
||||
Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -256,6 +260,8 @@ Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch
|
||||
# as it's not changing the code of udev and libudev, then is not a udev
|
||||
# patch. Further patches which add and/or changes udev rules.
|
||||
|
||||
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
|
||||
Patch1001: 1001-re-enable-by_path-links-for-ata-devices.patch
|
||||
# PATCH-FIX-OPENSUSE 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
|
||||
Patch1002: 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
|
||||
# PATCH-FIX-OPENSUSE 1003-udev-netlink-null-rules.patch
|
||||
@ -551,6 +557,8 @@ cp %{SOURCE7} m4/
|
||||
%patch42 -p1
|
||||
%patch84 -p1
|
||||
%patch86 -p1
|
||||
%patch87 -p1
|
||||
%patch88 -p1
|
||||
%patch90 -p1
|
||||
%patch91 -p1
|
||||
%patch120 -p1
|
||||
@ -579,14 +587,17 @@ cp %{SOURCE7} m4/
|
||||
%patch386 -p1
|
||||
%patch430 -p1
|
||||
%patch475 -p1
|
||||
%ifarch %arm
|
||||
%patch38 -p1
|
||||
%endif
|
||||
%patch490 -p1
|
||||
%patch520 -p1
|
||||
%patch521 -p1
|
||||
%patch522 -p1
|
||||
%patch522 -p0
|
||||
%patch523 -p0
|
||||
%patch524 -p1
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1003 -p1
|
||||
%patch1005 -p1
|
||||
@ -715,7 +726,7 @@ make %{?_smp_mflags} update-man-list man
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
make install DESTDIR="%buildroot"
|
||||
install -pm0755 "%_sourcedir/systemd-sysv-install" "%buildroot/%_prefix/lib/systemd/"
|
||||
|
||||
# move to %{_lib}
|
||||
@ -756,11 +767,8 @@ ln -s ../usr/bin/systemctl %{buildroot}/sbin/runlevel
|
||||
rm -rf %{buildroot}/etc/systemd/system/*.target.wants
|
||||
rm -f %{buildroot}/etc/systemd/system/default.target
|
||||
|
||||
# We keep a copy of tmp.mount because it may be removed if not used
|
||||
# (see %post): we want to be sure tmpfs won't be used for /tmp by
|
||||
# default on Suse distros.
|
||||
# don't mount /tmp as tmpfs for now
|
||||
rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount
|
||||
cp %{buildroot}/%{_prefix}/lib/systemd/system/tmp.mount %{buildroot}/%{_datadir}/systemd/
|
||||
|
||||
# don't enable wall ask password service, it spams every console (bnc#747783)
|
||||
rm %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants/systemd-ask-password-wall.path
|
||||
@ -891,10 +899,8 @@ done
|
||||
# add entries for xkeyboard-config converted keymaps; mappings,
|
||||
# which already exist in original systemd mapping table are being
|
||||
# ignored though, i.e. not overwritten
|
||||
if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then
|
||||
cat /usr/share/systemd/kbd-model-map.xkb-generated \
|
||||
>>"%buildroot/usr/share/systemd/kbd-model-map"
|
||||
fi
|
||||
cat /usr/share/systemd/kbd-model-map.xkb-generated \
|
||||
>> %{buildroot}//usr/share/systemd/kbd-model-map
|
||||
|
||||
%find_lang systemd
|
||||
|
||||
@ -950,13 +956,12 @@ fi
|
||||
# Create default config in /etc at first install.
|
||||
# Later package updates should not overwrite these settings.
|
||||
if [ "$1" -eq 1 ]; then
|
||||
# Enable these services by default.
|
||||
# Specifying multiple units can cause the entire operation to not
|
||||
# execute if one of them is missing, so run systemctl with one unit
|
||||
# at a time only.
|
||||
for i in getty@tty1.service remote-fs.target; do
|
||||
/usr/bin/systemctl enable "$i" || :
|
||||
done
|
||||
# Enable these services by default.
|
||||
/usr/bin/systemctl enable \
|
||||
getty@tty1.service \
|
||||
systemd-readahead-collect.service \
|
||||
systemd-readahead-replay.service \
|
||||
remote-fs.target || :
|
||||
fi
|
||||
|
||||
# since v207 /etc/sysctl.conf is no longer parsed, however
|
||||
@ -971,16 +976,6 @@ for f in $(find /etc/systemd/system -type l -xtype l); do
|
||||
[ -f "$new_target" ] && ln -s -f $new_target $f || :
|
||||
done
|
||||
|
||||
# Keep tmp.mount if it's been enabled explicitly by the user otherwise
|
||||
# make sure it wont be activated since it's the default for Suse
|
||||
# distros. This unit can be pulled (implicitely) in various ways
|
||||
# (private /tmp, etc..) and it's required by the basic.target
|
||||
# explicitly since v220.
|
||||
case $(/usr/bin/systemctl is-enabled tmp.mount 2>/dev/null) in
|
||||
enabled) ;;
|
||||
*) rm -f %{_prefix}/lib/systemd/system/tmp.mount
|
||||
esac
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
if [ $1 -ge 1 ]; then
|
||||
|
@ -1,32 +1,16 @@
|
||||
Index: systemd-227/factory/etc/pam.d/other
|
||||
---
|
||||
src/login/systemd-user | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: systemd-221/src/login/systemd-user
|
||||
===================================================================
|
||||
--- systemd-227.orig/factory/etc/pam.d/other
|
||||
+++ systemd-227/factory/etc/pam.d/other
|
||||
@@ -1,6 +1,6 @@
|
||||
# This file is part of systemd.
|
||||
|
||||
-auth include system-auth
|
||||
-account include system-auth
|
||||
-password include system-auth
|
||||
-session include system-auth
|
||||
+auth include common-auth
|
||||
+account include common-account
|
||||
+password include common-password
|
||||
+session include common-session
|
||||
Index: systemd-227/src/login/systemd-user.m4
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/login/systemd-user.m4
|
||||
+++ systemd-227/src/login/systemd-user.m4
|
||||
@@ -2,10 +2,10 @@
|
||||
--- systemd-221.orig/src/login/systemd-user
|
||||
+++ systemd-221/src/login/systemd-user
|
||||
@@ -2,5 +2,5 @@
|
||||
#
|
||||
# Used by systemd --user instances.
|
||||
|
||||
-account include system-auth
|
||||
+account include common-account
|
||||
|
||||
m4_ifdef(`HAVE_SELINUX',
|
||||
session required pam_selinux.so close
|
||||
session required pam_selinux.so nottys open
|
||||
)m4_dnl
|
||||
-session include system-auth
|
||||
+account include common-account
|
||||
+session include common-session
|
||||
|
@ -8,19 +8,19 @@ SUSE policy is to not clean /tmp by default.
|
||||
tmpfiles.d/tmp.conf | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
Index: systemd-228/tmpfiles.d/tmp.conf
|
||||
Index: systemd-221/tmpfiles.d/tmp.conf
|
||||
===================================================================
|
||||
--- systemd-228.orig/tmpfiles.d/tmp.conf
|
||||
+++ systemd-228/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
|
||||
|
||||
# Clear tmp directories separately, to make them easier to override
|
||||
-q /tmp 1777 root root 10d
|
||||
-q /var/tmp 1777 root root 30d
|
||||
+# SUSE policy: we do not clean these directories
|
||||
+q /tmp 1777 root root -
|
||||
+q /var/tmp 1777 root root -
|
||||
-v /tmp 1777 root root 10d
|
||||
-v /var/tmp 1777 root root 30d
|
||||
+# SUSE policy: we don't clean those directories
|
||||
+v /tmp 1777 root root -
|
||||
+v /var/tmp 1777 root root -
|
||||
|
||||
# Exclude namespace mountpoints created with PrivateTmp=yes
|
||||
x /tmp/systemd-private-%b-*
|
||||
|
@ -1,59 +1,3 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 21 16:25:44 UTC 2015 - fbui@suse.com
|
||||
|
||||
- Make sure we don't use tmpfs on /tmp by default (bsc#940522)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Dec 21 10:07:38 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Avoid enabling readahead services; they have been removed.
|
||||
- In %install, only process kbd-model-map.xkb-generated if it
|
||||
exists. Resolves a build failure in 13.2/42.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Nov 30 13:59:52 UTC 2015 - thomas.blume@suse.com
|
||||
|
||||
- fix CVE-2015-7510: Stack overflow in nss-mymachines (boo#956712)
|
||||
Add 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Nov 18 14:17:05 UTC 2015 - jengelh@inai.de
|
||||
|
||||
- Update to new upstream release 228
|
||||
* The various memory-related resource limit settings (such as
|
||||
LimitAS=) now understand the usual K, M, G, ... suffixes to
|
||||
the base of 1024 (IEC). Similar, the time-related settings
|
||||
understand the usual min, h, day, ... suffixes now.
|
||||
* CPUAffinity= now takes CPU index ranges in addition to just
|
||||
individual indexes.
|
||||
* A number of properties previously only settable in unit
|
||||
files are now also available as properties to set when
|
||||
creating transient units programmatically via the bus.
|
||||
- Remove 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch
|
||||
(merged upstream)
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Nov 13 00:00:12 UTC 2015 - sor.alexei@meowr.ru
|
||||
|
||||
- Update to 227.
|
||||
- Rebase systemd-pam_config.patch,
|
||||
handle-root_uses_lang-value-in-etc-sysconfig-language.patch,
|
||||
0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch,
|
||||
0001-On_s390_con3270_disable_ANSI_colour_esc.patch,
|
||||
0014-journald-with-journaling-FS.patch,
|
||||
0019-make-completion-smart-to-be-able-to-redirect.patch,
|
||||
avoid-divide-by-zero-sigtrap.patch, systemd-add-user-keep.patch,
|
||||
set-and-use-default-logconsole.patch,
|
||||
tty-ask-password-agent-on-console.patch,
|
||||
0001-bnc888612-logind-polkit-acpi.patch,
|
||||
watch_resolv.conf_for_become_changed.patch,
|
||||
1097-udevd-increase-maximum-number-of-children.patch.
|
||||
- Remove
|
||||
0002-units-enable-waiting-for-unit-termination-in-certain.patch,
|
||||
1001-re-enable-by_path-links-for-ata-devices.patch,
|
||||
rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch:
|
||||
fixed upstream.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Nov 12 09:56:36 UTC 2015 - werner@suse.de
|
||||
|
||||
|
59
systemd.spec
59
systemd.spec
@ -40,7 +40,7 @@
|
||||
|
||||
Name: systemd
|
||||
Url: http://www.freedesktop.org/wiki/Software/systemd
|
||||
Version: 228
|
||||
Version: 224
|
||||
Release: 0
|
||||
Summary: A System and Session Manager
|
||||
License: LGPL-2.1+
|
||||
@ -107,7 +107,7 @@ BuildRequires: pam-config >= 0.79-5
|
||||
Requires: pwdutils
|
||||
Requires: systemd-presets-branding
|
||||
Requires: sysvinit-tools
|
||||
Requires: util-linux >= 2.27
|
||||
Requires: util-linux >= 2.26
|
||||
Requires(post): coreutils
|
||||
Requires(post): findutils
|
||||
Requires(post): pam-config >= 0.79-5
|
||||
@ -171,10 +171,16 @@ Patch42: systemd-pam_config.patch
|
||||
# Never add any patches to this package without the upstream commit id
|
||||
# in the patch. Any patches added here without a very good reason to make
|
||||
# an exception will be silently removed with the next version update.
|
||||
# PATCH-FIX-UPSTREAM rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch rjschwei@suse.com -- add lid switch of ARM based Chromebook as a power switch to logind
|
||||
Patch38: rules-add-lid-switch-of-ARM-based-Chromebook-as-a-power-sw.patch
|
||||
# PATCH-FIX-OPENSUSE make-emergency.service-conflict-with-syslog.socket.patch (bnc#852232)
|
||||
Patch84: make-emergency.service-conflict-with-syslog.socket.patch
|
||||
# PATCH-FIX-SUSE 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
|
||||
Patch86: 0001-add-hdflush-for-reboot-or-hddown-for-poweroff.patch
|
||||
# PATCH-FIX-UPSTREAM (boo#949574)
|
||||
Patch87: 0001-Make-sure-the-mount-units-pulled-by-RequiresMountsFo.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#932284)
|
||||
Patch88: 0002-units-enable-waiting-for-unit-termination-in-certain.patch
|
||||
# PATCH-FIX-SUSE 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
|
||||
Patch90: 0001-On_s390_con3270_disable_ANSI_colour_esc.patch
|
||||
# PATCH-FIX-SUSE plymouth-quit-and-wait-for-emergency-service.patch -- Make sure that no plymouthd is locking the tty
|
||||
@ -240,8 +246,6 @@ Patch521: kbd-model-map.patch
|
||||
Patch522: Correct_assert_on_unexpected_error_code.patch
|
||||
# PATCH-FIX-SUSE Do not stress the kernel's vc ioctls (boo#904214)
|
||||
Patch523: let-vconsole-setup-get-properties-only-once-to-copy-them.patch
|
||||
# PATCH-FIX-UPSTREAM (bsc#956712)
|
||||
Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch
|
||||
|
||||
# UDEV PATCHES
|
||||
# ============
|
||||
@ -251,6 +255,8 @@ Patch524: 0001-nss-mymachines-do-not-allow-overlong-machine-names.patch
|
||||
# as it's not changing the code of udev and libudev, then is not a udev
|
||||
# patch. Further patches which add and/or changes udev rules.
|
||||
|
||||
# PATCH-FIX-OPENSUSE 1001-re-enable-by_path-links-for-ata-devices.patch
|
||||
Patch1001: 1001-re-enable-by_path-links-for-ata-devices.patch
|
||||
# PATCH-FIX-OPENSUSE 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
|
||||
Patch1002: 1002-rules-create-by-id-scsi-links-for-ATA-devices.patch
|
||||
# PATCH-FIX-OPENSUSE 1003-udev-netlink-null-rules.patch
|
||||
@ -546,6 +552,8 @@ cp %{SOURCE7} m4/
|
||||
%patch42 -p1
|
||||
%patch84 -p1
|
||||
%patch86 -p1
|
||||
%patch87 -p1
|
||||
%patch88 -p1
|
||||
%patch90 -p1
|
||||
%patch91 -p1
|
||||
%patch120 -p1
|
||||
@ -574,14 +582,17 @@ cp %{SOURCE7} m4/
|
||||
%patch386 -p1
|
||||
%patch430 -p1
|
||||
%patch475 -p1
|
||||
%ifarch %arm
|
||||
%patch38 -p1
|
||||
%endif
|
||||
%patch490 -p1
|
||||
%patch520 -p1
|
||||
%patch521 -p1
|
||||
%patch522 -p1
|
||||
%patch522 -p0
|
||||
%patch523 -p0
|
||||
%patch524 -p1
|
||||
|
||||
# udev patches
|
||||
%patch1001 -p1
|
||||
%patch1002 -p1
|
||||
%patch1003 -p1
|
||||
%patch1005 -p1
|
||||
@ -710,7 +721,7 @@ make %{?_smp_mflags} update-man-list man
|
||||
%endif
|
||||
|
||||
%install
|
||||
%make_install
|
||||
make install DESTDIR="%buildroot"
|
||||
install -pm0755 "%_sourcedir/systemd-sysv-install" "%buildroot/%_prefix/lib/systemd/"
|
||||
|
||||
# move to %{_lib}
|
||||
@ -751,11 +762,8 @@ ln -s ../usr/bin/systemctl %{buildroot}/sbin/runlevel
|
||||
rm -rf %{buildroot}/etc/systemd/system/*.target.wants
|
||||
rm -f %{buildroot}/etc/systemd/system/default.target
|
||||
|
||||
# We keep a copy of tmp.mount because it may be removed if not used
|
||||
# (see %post): we want to be sure tmpfs won't be used for /tmp by
|
||||
# default on Suse distros.
|
||||
# don't mount /tmp as tmpfs for now
|
||||
rm %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/tmp.mount
|
||||
cp %{buildroot}/%{_prefix}/lib/systemd/system/tmp.mount %{buildroot}/%{_datadir}/systemd/
|
||||
|
||||
# don't enable wall ask password service, it spams every console (bnc#747783)
|
||||
rm %{buildroot}%{_prefix}/lib/systemd/system/multi-user.target.wants/systemd-ask-password-wall.path
|
||||
@ -886,10 +894,8 @@ done
|
||||
# add entries for xkeyboard-config converted keymaps; mappings,
|
||||
# which already exist in original systemd mapping table are being
|
||||
# ignored though, i.e. not overwritten
|
||||
if [ -f /usr/share/systemd/kbd-model-map.xkb-generated ]; then
|
||||
cat /usr/share/systemd/kbd-model-map.xkb-generated \
|
||||
>>"%buildroot/usr/share/systemd/kbd-model-map"
|
||||
fi
|
||||
cat /usr/share/systemd/kbd-model-map.xkb-generated \
|
||||
>> %{buildroot}//usr/share/systemd/kbd-model-map
|
||||
|
||||
%find_lang systemd
|
||||
|
||||
@ -945,13 +951,12 @@ fi
|
||||
# Create default config in /etc at first install.
|
||||
# Later package updates should not overwrite these settings.
|
||||
if [ "$1" -eq 1 ]; then
|
||||
# Enable these services by default.
|
||||
# Specifying multiple units can cause the entire operation to not
|
||||
# execute if one of them is missing, so run systemctl with one unit
|
||||
# at a time only.
|
||||
for i in getty@tty1.service remote-fs.target; do
|
||||
/usr/bin/systemctl enable "$i" || :
|
||||
done
|
||||
# Enable these services by default.
|
||||
/usr/bin/systemctl enable \
|
||||
getty@tty1.service \
|
||||
systemd-readahead-collect.service \
|
||||
systemd-readahead-replay.service \
|
||||
remote-fs.target || :
|
||||
fi
|
||||
|
||||
# since v207 /etc/sysctl.conf is no longer parsed, however
|
||||
@ -966,16 +971,6 @@ for f in $(find /etc/systemd/system -type l -xtype l); do
|
||||
[ -f "$new_target" ] && ln -s -f $new_target $f || :
|
||||
done
|
||||
|
||||
# Keep tmp.mount if it's been enabled explicitly by the user otherwise
|
||||
# make sure it wont be activated since it's the default for Suse
|
||||
# distros. This unit can be pulled (implicitely) in various ways
|
||||
# (private /tmp, etc..) and it's required by the basic.target
|
||||
# explicitly since v220.
|
||||
case $(/usr/bin/systemctl is-enabled tmp.mount 2>/dev/null) in
|
||||
enabled) ;;
|
||||
*) rm -f %{_prefix}/lib/systemd/system/tmp.mount
|
||||
esac
|
||||
|
||||
%postun
|
||||
/sbin/ldconfig
|
||||
if [ $1 -ge 1 ]; then
|
||||
|
@ -26,13 +26,13 @@ Spwan for each device of the system console /dev/console a own process.
|
||||
|
||||
Replace the system call wait() with with system call waitid().
|
||||
---
|
||||
src/tty-ask-password-agent/tty-ask-password-agent.c | 264 +++++++++++++++++++-
|
||||
1 file changed, 254 insertions(+), 10 deletions(-)
|
||||
src/tty-ask-password-agent.c | 264 ++++++++++++++++++++-
|
||||
1 file changed, 255 insertions(+), 9 deletions(-)
|
||||
|
||||
Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
+++ systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
diff --git src/tty-ask-password-agent/tty-ask-password-agent.c src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
index 4630eb9..df4bada 100644
|
||||
--- a/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
+++ b/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
@@ -4,6 +4,7 @@
|
||||
This file is part of systemd.
|
||||
|
||||
@ -41,26 +41,26 @@ Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
|
||||
systemd is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU Lesser General Public License as published by
|
||||
@@ -21,6 +22,9 @@
|
||||
|
||||
#include <errno.h>
|
||||
@@ -31,6 +32,9 @@
|
||||
#include <getopt.h>
|
||||
#include <sys/signalfd.h>
|
||||
#include <fcntl.h>
|
||||
+#include <sys/prctl.h>
|
||||
+#include <signal.h>
|
||||
+#include <sys/wait.h>
|
||||
#include <getopt.h>
|
||||
#include <poll.h>
|
||||
#include <stdbool.h>
|
||||
@@ -49,6 +53,8 @@
|
||||
#include "terminal-util.h"
|
||||
|
||||
#include "util.h"
|
||||
#include "utmp-wtmp.h"
|
||||
#include "mkdir.h"
|
||||
@@ -45,6 +49,8 @@
|
||||
#include "process-util.h"
|
||||
#include "terminal-util.h"
|
||||
#include "signal-util.h"
|
||||
+#include "fileio.h"
|
||||
+#include "macro.h"
|
||||
|
||||
static enum {
|
||||
ACTION_LIST,
|
||||
@@ -57,8 +63,21 @@ static enum {
|
||||
@@ -53,8 +59,21 @@ static enum {
|
||||
ACTION_WALL
|
||||
} arg_action = ACTION_QUERY;
|
||||
|
||||
@ -82,8 +82,8 @@ Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
|
||||
static int ask_password_plymouth(
|
||||
const char *message,
|
||||
@@ -240,6 +259,80 @@ finish:
|
||||
return r;
|
||||
@@ -211,6 +230,80 @@ static int ask_password_plymouth(
|
||||
return 0;
|
||||
}
|
||||
|
||||
+static void free_consoles(struct console *con, unsigned int num) {
|
||||
@ -162,17 +162,17 @@ Index: systemd-228/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;
|
||||
bool accept_cached = false, echo = false;
|
||||
@@ -340,7 +433,7 @@ static int parse_password(const char *fi
|
||||
int tty_fd = -1;
|
||||
uint64_t not_after = 0;
|
||||
@@ -311,7 +404,7 @@ static int parse_password(const char *fi
|
||||
_cleanup_free_ char *password = NULL;
|
||||
|
||||
if (arg_console) {
|
||||
- tty_fd = acquire_terminal("/dev/console", false, false, false, USEC_INFINITY);
|
||||
+ tty_fd = acquire_terminal(current_dev, false, false, false, USEC_INFINITY);
|
||||
if (tty_fd < 0)
|
||||
return log_error_errno(tty_fd, "Failed to acquire /dev/console: %m");
|
||||
|
||||
@@ -601,7 +694,7 @@ static int parse_argv(int argc, char *ar
|
||||
return tty_fd;
|
||||
}
|
||||
@@ -554,7 +647,7 @@ static int parse_argv(int argc, char *ar
|
||||
{ "watch", no_argument, NULL, ARG_WATCH },
|
||||
{ "wall", no_argument, NULL, ARG_WALL },
|
||||
{ "plymouth", no_argument, NULL, ARG_PLYMOUTH },
|
||||
@ -181,7 +181,7 @@ Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
{}
|
||||
};
|
||||
|
||||
@@ -643,6 +736,10 @@ static int parse_argv(int argc, char *ar
|
||||
@@ -598,6 +691,10 @@ static int parse_argv(int argc, char *ar
|
||||
|
||||
case ARG_CONSOLE:
|
||||
arg_console = true;
|
||||
@ -192,7 +192,7 @@ Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
break;
|
||||
|
||||
case '?':
|
||||
@@ -657,9 +754,143 @@ static int parse_argv(int argc, char *ar
|
||||
@@ -612,9 +709,143 @@ static int parse_argv(int argc, char *ar
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -336,16 +336,16 @@ Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
int main(int argc, char *argv[]) {
|
||||
int r;
|
||||
|
||||
@@ -673,16 +904,29 @@ int main(int argc, char *argv[]) {
|
||||
@@ -628,15 +859,28 @@ int main(int argc, char *argv[]) {
|
||||
if (r <= 0)
|
||||
goto finish;
|
||||
|
||||
- if (arg_console) {
|
||||
- (void) setsid();
|
||||
- (void) release_terminal();
|
||||
- setsid();
|
||||
- release_terminal();
|
||||
+ if (arg_console && !arg_device)
|
||||
+ /*
|
||||
+ * Spawn for each console device a own process
|
||||
+ * Spwan for each console device a own process
|
||||
+ */
|
||||
+ r = ask_on_consoles(argc, argv);
|
||||
+ else {
|
||||
@ -365,12 +365,15 @@ Index: systemd-228/src/tty-ask-password-agent/tty-ask-password-agent.c
|
||||
+ else
|
||||
+ r = show_passwords();
|
||||
}
|
||||
|
||||
-
|
||||
- if (IN_SET(arg_action, ACTION_WATCH, ACTION_WALL))
|
||||
- r = watch_passwords();
|
||||
- else
|
||||
- r = show_passwords();
|
||||
-
|
||||
finish:
|
||||
return r < 0 ? EXIT_FAILURE : EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
if (r < 0)
|
||||
log_error_errno(r, "Error: %m");
|
||||
|
||||
--
|
||||
2.2.0
|
||||
|
||||
|
@ -8,20 +8,21 @@ Related to bnc#892096
|
||||
src/random-seed/random-seed.c | 71 ++++++++++++++++++++++++++++++++++++------
|
||||
1 file changed, 61 insertions(+), 10 deletions(-)
|
||||
|
||||
Index: systemd-228/src/random-seed/random-seed.c
|
||||
Index: systemd-221/src/random-seed/random-seed.c
|
||||
===================================================================
|
||||
--- systemd-228.orig/src/random-seed/random-seed.c
|
||||
+++ systemd-228/src/random-seed/random-seed.c
|
||||
@@ -24,6 +24,8 @@
|
||||
#include <string.h>
|
||||
#include <sys/stat.h>
|
||||
--- 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>
|
||||
#include <errno.h>
|
||||
+#include <linux/random.h>
|
||||
#include <string.h>
|
||||
+#include <sys/ioctl.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include "alloc-util.h"
|
||||
#include "fd-util.h"
|
||||
@@ -36,8 +38,8 @@
|
||||
#include "log.h"
|
||||
@@ -32,8 +34,8 @@
|
||||
#define POOL_SIZE_MIN 512
|
||||
|
||||
int main(int argc, char *argv[]) {
|
||||
@ -32,7 +33,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
size_t buf_size = 0;
|
||||
ssize_t k;
|
||||
int r;
|
||||
@@ -68,11 +70,12 @@ int main(int argc, char *argv[]) {
|
||||
@@ -65,11 +67,12 @@ int main(int argc, char *argv[]) {
|
||||
if (buf_size <= POOL_SIZE_MIN)
|
||||
buf_size = POOL_SIZE_MIN;
|
||||
|
||||
@ -47,7 +48,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
|
||||
r = mkdir_parents_label(RANDOM_SEED, 0755);
|
||||
if (r < 0) {
|
||||
@@ -86,6 +89,23 @@ int main(int argc, char *argv[]) {
|
||||
@@ -83,6 +86,23 @@ int main(int argc, char *argv[]) {
|
||||
|
||||
if (streq(argv[1], "load")) {
|
||||
|
||||
@ -71,7 +72,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
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);
|
||||
@@ -106,7 +126,7 @@ int main(int argc, char *argv[]) {
|
||||
@@ -103,7 +123,7 @@ int main(int argc, char *argv[]) {
|
||||
}
|
||||
}
|
||||
|
||||
@ -80,7 +81,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
if (k < 0)
|
||||
r = log_error_errno(k, "Failed to read seed from " RANDOM_SEED ": %m");
|
||||
else if (k == 0)
|
||||
@@ -114,13 +134,29 @@ int main(int argc, char *argv[]) {
|
||||
@@ -111,13 +131,29 @@ int main(int argc, char *argv[]) {
|
||||
else {
|
||||
(void) lseek(seed_fd, 0, SEEK_SET);
|
||||
|
||||
@ -113,7 +114,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
seed_fd = open(RANDOM_SEED, O_WRONLY|O_CLOEXEC|O_NOCTTY|O_CREAT, 0600);
|
||||
if (seed_fd < 0) {
|
||||
r = log_error_errno(errno, "Failed to open " RANDOM_SEED ": %m");
|
||||
@@ -133,6 +169,21 @@ int main(int argc, char *argv[]) {
|
||||
@@ -130,6 +166,21 @@ int main(int argc, char *argv[]) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
@ -135,7 +136,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
} else {
|
||||
log_error("Unknown verb '%s'.", argv[1]);
|
||||
r = -EINVAL;
|
||||
@@ -147,7 +198,7 @@ int main(int argc, char *argv[]) {
|
||||
@@ -144,7 +195,7 @@ int main(int argc, char *argv[]) {
|
||||
(void) fchmod(seed_fd, 0600);
|
||||
(void) fchown(seed_fd, 0, 0);
|
||||
|
||||
@ -144,7 +145,7 @@ Index: systemd-228/src/random-seed/random-seed.c
|
||||
if (k < 0) {
|
||||
r = log_error_errno(k, "Failed to read new seed from /dev/urandom: %m");
|
||||
goto finish;
|
||||
@@ -158,7 +209,7 @@ int main(int argc, char *argv[]) {
|
||||
@@ -155,7 +206,7 @@ int main(int argc, char *argv[]) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
3
v224.tar.gz
Normal file
3
v224.tar.gz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:0d7ac1532a57639fbc828f8a5051a090883c6ad2908618a7a13ab386db831bfc
|
||||
size 3868075
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:dd124ff561a07e6439ed2b3713f38ca914df7747f110ce86deea17b56d245ae6
|
||||
size 4034401
|
@ -3,19 +3,19 @@
|
||||
src/core/manager.h | 5 ++
|
||||
2 files changed, 98 insertions(+)
|
||||
|
||||
Index: systemd-227/src/core/manager.c
|
||||
Index: systemd-221/src/core/manager.c
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/core/manager.c
|
||||
+++ systemd-227/src/core/manager.c
|
||||
--- 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 <sys/wait.h>
|
||||
#include <unistd.h>
|
||||
+#include <resolv.h>
|
||||
|
||||
#ifdef HAVE_AUDIT
|
||||
#include <libaudit.h>
|
||||
@@ -294,6 +295,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,15 +107,15 @@ Index: systemd-227/src/core/manager.c
|
||||
static int manager_watch_idle_pipe(Manager *m) {
|
||||
int r;
|
||||
|
||||
@@ -576,6 +662,7 @@ int manager_new(ManagerRunningAs 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 */
|
||||
|
||||
+ m->resolv_conf_inotify_fd = -1;
|
||||
m->ask_password_inotify_fd = -1;
|
||||
m->have_ask_password = -EINVAL; /* we don't know */
|
||||
m->first_boot = -1;
|
||||
@@ -637,6 +724,10 @@ int manager_new(ManagerRunningAs running
|
||||
|
||||
@@ -651,6 +738,10 @@ int manager_new(ManagerRunningAs running
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
@ -126,7 +126,7 @@ Index: systemd-227/src/core/manager.c
|
||||
m->udev = udev_new();
|
||||
if (!m->udev) {
|
||||
r = -ENOMEM;
|
||||
@@ -914,6 +1005,8 @@ Manager* manager_free(Manager *m) {
|
||||
@@ -929,6 +1020,8 @@ Manager* manager_free(Manager *m) {
|
||||
if (!m)
|
||||
return NULL;
|
||||
|
||||
@ -135,13 +135,13 @@ Index: systemd-227/src/core/manager.c
|
||||
manager_clear_jobs_and_units(m);
|
||||
|
||||
for (c = 0; c < _UNIT_TYPE_MAX; c++)
|
||||
Index: systemd-227/src/core/manager.h
|
||||
Index: systemd-221/src/core/manager.h
|
||||
===================================================================
|
||||
--- systemd-227.orig/src/core/manager.h
|
||||
+++ systemd-227/src/core/manager.h
|
||||
@@ -180,6 +180,11 @@ struct Manager {
|
||||
struct libmnt_monitor *mount_monitor;
|
||||
sd_event_source *mount_event_source;
|
||||
--- 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;
|
||||
|
||||
+ /* Watch out any change of /etc/resolv.conf */
|
||||
+ int resolv_conf_inotify_fd;
|
||||
|
Loading…
Reference in New Issue
Block a user