mirror of
https://git.proxmox.com/git/systemd
synced 2026-02-01 23:01:32 +00:00
Updated upstream v208-stable patch series to 53b1b6c
This commit is contained in:
parent
954ec0a7a6
commit
3de79dba03
1
debian/changelog
vendored
1
debian/changelog
vendored
@ -19,6 +19,7 @@ systemd (208-8) UNRELEASED; urgency=medium
|
||||
* Add Breaks: systemd (<< 208) to udev to avoid partial upgrades. Newer udev
|
||||
versions rely on kmod-static-nodes.service being provided by systemd.
|
||||
(Closes: #757777)
|
||||
* Updated upstream v208-stable patch series to 53b1b6c.
|
||||
|
||||
-- Martin Pitt <mpitt@debian.org> Thu, 07 Aug 2014 08:31:38 +0200
|
||||
|
||||
|
||||
@ -11,10 +11,10 @@ as PID 1.
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index 78bdeb2..a78881b 100644
|
||||
index 21a99bc..c2f7bbc 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -5732,19 +5732,24 @@ static int talk_initctl(void) {
|
||||
@@ -5729,19 +5729,24 @@ static int talk_initctl(void) {
|
||||
request.cmd = INIT_CMD_RUNLVL;
|
||||
request.runlevel = rl;
|
||||
|
||||
|
||||
@ -11,10 +11,10 @@ Subject: Add targets for compatibility with Debian insserv system facilities
|
||||
create mode 100644 units/x-display-manager.target
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 1bd4e99..78ae428 100644
|
||||
index cdd412e..0bbd79a 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -457,6 +457,12 @@ nodist_systemunit_DATA = \
|
||||
@@ -465,6 +465,12 @@ nodist_systemunit_DATA = \
|
||||
units/initrd-switch-root.service \
|
||||
units/systemd-nspawn@.service
|
||||
|
||||
|
||||
@ -9,10 +9,10 @@ enable rsyslog.service)
|
||||
1 file changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index f3be0f1..ea36b48 100644
|
||||
index 9c9f0ac..ab92fc7 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -4255,9 +4255,6 @@ static int enable_sysv_units(char **args) {
|
||||
@@ -4257,9 +4257,6 @@ static int enable_sysv_units(const char *verb, char **args) {
|
||||
|
||||
name = args[f];
|
||||
|
||||
@ -22,7 +22,7 @@ index f3be0f1..ea36b48 100644
|
||||
if (path_is_absolute(name))
|
||||
continue;
|
||||
|
||||
@@ -4289,7 +4286,8 @@ static int enable_sysv_units(char **args) {
|
||||
@@ -4291,7 +4288,8 @@ static int enable_sysv_units(const char *verb, char **args) {
|
||||
goto finish;
|
||||
}
|
||||
|
||||
|
||||
@ -9,10 +9,10 @@ Closes: #624599
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index c573a72..c56027f 100644
|
||||
index c47dd44..a228287 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -976,6 +976,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
|
||||
@@ -974,6 +974,21 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
|
||||
dbus_set_error(e, BUS_ERROR_INVALID_JOB_MODE, "final.target is queued, ignoring %s request for unit %s", job_type_to_string(type), unit->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -9,10 +9,10 @@ for the patch. Closes: #624599.
|
||||
1 file changed, 25 insertions(+)
|
||||
|
||||
diff --git a/src/core/manager.c b/src/core/manager.c
|
||||
index 58dacdc..c573a72 100644
|
||||
index e75550b..c47dd44 100644
|
||||
--- a/src/core/manager.c
|
||||
+++ b/src/core/manager.c
|
||||
@@ -943,6 +943,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
|
||||
@@ -941,6 +941,8 @@ int manager_startup(Manager *m, FILE *serialization, FDSet *fds) {
|
||||
int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool override, DBusError *e, Job **_ret) {
|
||||
int r;
|
||||
Transaction *tr;
|
||||
@ -21,7 +21,7 @@ index 58dacdc..c573a72 100644
|
||||
|
||||
assert(m);
|
||||
assert(type < _JOB_TYPE_MAX);
|
||||
@@ -954,6 +956,29 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
|
||||
@@ -952,6 +954,29 @@ int manager_add_job(Manager *m, JobType type, Unit *unit, JobMode mode, bool ove
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
|
||||
4
debian/patches/Check-for-kmod-binary.patch
vendored
4
debian/patches/Check-for-kmod-binary.patch
vendored
@ -11,12 +11,12 @@ will fail, so add a condition to check if the binary is available.
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
|
||||
index ff4017b..718d77b 100644
|
||||
index 0934a87..076e316 100644
|
||||
--- a/units/kmod-static-nodes.service.in
|
||||
+++ b/units/kmod-static-nodes.service.in
|
||||
@@ -11,6 +11,7 @@ DefaultDependencies=no
|
||||
Before=sysinit.target systemd-tmpfiles-setup-dev.service
|
||||
ConditionCapability=CAP_MKNOD
|
||||
ConditionCapability=CAP_SYS_MODULE
|
||||
ConditionPathExists=/lib/modules/%v/modules.devname
|
||||
+ConditionFileIsExecutable=@KMOD@
|
||||
|
||||
|
||||
@ -18,10 +18,10 @@ anymore afterwards).
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 8d9c587..7d1f408 100644
|
||||
index 205ea50..41b89b2 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -4413,8 +4413,7 @@ SYSINIT_TARGET_WANTS += \
|
||||
@@ -4437,8 +4437,7 @@ SYSINIT_TARGET_WANTS += \
|
||||
systemd-update-utmp.service
|
||||
LOCAL_FS_TARGET_WANTS += \
|
||||
systemd-remount-fs.service \
|
||||
@ -32,10 +32,10 @@ index 8d9c587..7d1f408 100644
|
||||
getty.target \
|
||||
systemd-ask-password-wall.path
|
||||
diff --git a/units/tmp.mount b/units/tmp.mount
|
||||
index 99a3ba3..3b4d6f8 100644
|
||||
index 00a0d28..8777171 100644
|
||||
--- a/units/tmp.mount
|
||||
+++ b/units/tmp.mount
|
||||
@@ -18,3 +18,6 @@ What=tmpfs
|
||||
@@ -19,3 +19,6 @@ What=tmpfs
|
||||
Where=/tmp
|
||||
Type=tmpfs
|
||||
Options=mode=1777,strictatime
|
||||
|
||||
@ -13,10 +13,10 @@ generator for that, as this would be cleaner. But for now that will do.
|
||||
1 file changed, 18 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index 47587d0..e11c413 100644
|
||||
index 2a6c3c8..f8a0201 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -51,7 +51,8 @@
|
||||
@@ -52,7 +52,8 @@
|
||||
|
||||
typedef enum RunlevelType {
|
||||
RUNLEVEL_UP,
|
||||
@ -26,7 +26,7 @@ index 47587d0..e11c413 100644
|
||||
} RunlevelType;
|
||||
|
||||
static const struct {
|
||||
@@ -66,6 +67,9 @@ static const struct {
|
||||
@@ -67,6 +68,9 @@ static const struct {
|
||||
{ "rc4.d", SPECIAL_RUNLEVEL4_TARGET, RUNLEVEL_UP },
|
||||
{ "rc5.d", SPECIAL_RUNLEVEL5_TARGET, RUNLEVEL_UP },
|
||||
|
||||
@ -36,7 +36,7 @@ index 47587d0..e11c413 100644
|
||||
/* Standard SysV runlevels for shutdown */
|
||||
{ "rc0.d", SPECIAL_POWEROFF_TARGET, RUNLEVEL_DOWN },
|
||||
{ "rc6.d", SPECIAL_REBOOT_TARGET, RUNLEVEL_DOWN }
|
||||
@@ -74,10 +78,12 @@ static const struct {
|
||||
@@ -75,10 +79,12 @@ 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
|
||||
@ -50,7 +50,7 @@ index 47587d0..e11c413 100644
|
||||
#endif
|
||||
|
||||
static const UnitActiveState state_translation_table[_SERVICE_STATE_MAX] = {
|
||||
@@ -915,6 +921,13 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
@@ -917,6 +923,13 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
|
||||
if ((r = sysv_exec_commands(s, supports_reload)) < 0)
|
||||
goto finish;
|
||||
@ -64,7 +64,7 @@ index 47587d0..e11c413 100644
|
||||
|
||||
if (s->sysv_runlevels && !chars_intersect(RUNLEVELS_UP, s->sysv_runlevels)) {
|
||||
/* If there a runlevels configured for this service
|
||||
@@ -3541,7 +3554,7 @@ static int service_enumerate(Manager *m) {
|
||||
@@ -3614,7 +3627,7 @@ static int service_enumerate(Manager *m) {
|
||||
|
||||
if (de->d_name[0] == 'S') {
|
||||
|
||||
@ -73,7 +73,7 @@ index 47587d0..e11c413 100644
|
||||
SERVICE(service)->sysv_start_priority_from_rcnd =
|
||||
MAX(a*10 + b, SERVICE(service)->sysv_start_priority_from_rcnd);
|
||||
|
||||
@@ -3558,7 +3571,8 @@ static int service_enumerate(Manager *m) {
|
||||
@@ -3631,7 +3644,8 @@ static int service_enumerate(Manager *m) {
|
||||
goto finish;
|
||||
|
||||
} else if (de->d_name[0] == 'K' &&
|
||||
|
||||
@ -16,10 +16,10 @@ this old hack to make the renaming less likely to fail.
|
||||
1 file changed, 41 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
|
||||
index 3db2cb7..c768d12 100644
|
||||
index 37b545b..18f66ec 100644
|
||||
--- a/src/udev/udev-event.c
|
||||
+++ b/src/udev/udev-event.c
|
||||
@@ -750,6 +750,7 @@ static int rename_netif(struct udev_event *event)
|
||||
@@ -752,6 +752,7 @@ static int rename_netif(struct udev_event *event)
|
||||
struct udev_device *dev = event->dev;
|
||||
int sk;
|
||||
struct ifreq ifr;
|
||||
@ -27,7 +27,7 @@ index 3db2cb7..c768d12 100644
|
||||
int err;
|
||||
|
||||
log_debug("changing net interface name from '%s' to '%s'\n",
|
||||
@@ -766,12 +767,49 @@ static int rename_netif(struct udev_event *event)
|
||||
@@ -768,12 +769,49 @@ static int rename_netif(struct udev_event *event)
|
||||
strscpy(ifr.ifr_name, IFNAMSIZ, udev_device_get_sysname(dev));
|
||||
strscpy(ifr.ifr_newname, IFNAMSIZ, event->name);
|
||||
err = ioctl(sk, SIOCSIFNAME, &ifr);
|
||||
|
||||
@ -8,11 +8,11 @@ to access logind via D-Bus will start it on demand.
|
||||
src/login/pam-module.c | 7 ++-----
|
||||
1 file changed, 2 insertions(+), 5 deletions(-)
|
||||
|
||||
Index: systemd/src/login/pam-module.c
|
||||
===================================================================
|
||||
--- systemd.orig/src/login/pam-module.c
|
||||
+++ systemd/src/login/pam-module.c
|
||||
@@ -191,10 +191,6 @@ _public_ PAM_EXTERN int pam_sm_open_sess
|
||||
diff --git a/src/login/pam-module.c b/src/login/pam-module.c
|
||||
index fe3ddd4..b5085ff 100644
|
||||
--- a/src/login/pam-module.c
|
||||
+++ b/src/login/pam-module.c
|
||||
@@ -191,10 +191,6 @@ _public_ PAM_EXTERN int pam_sm_open_session(
|
||||
|
||||
dbus_error_init(&error);
|
||||
|
||||
@ -23,7 +23,7 @@ Index: systemd/src/login/pam-module.c
|
||||
if (parse_argv(handle,
|
||||
argc, argv,
|
||||
&class_pam,
|
||||
@@ -254,7 +250,8 @@ _public_ PAM_EXTERN int pam_sm_open_sess
|
||||
@@ -254,7 +250,8 @@ _public_ PAM_EXTERN int pam_sm_open_session(
|
||||
|
||||
bus = dbus_bus_get_private(DBUS_BUS_SYSTEM, &error);
|
||||
if (!bus) {
|
||||
|
||||
@ -13,10 +13,10 @@ again.
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.mount.xml b/man/systemd.mount.xml
|
||||
index 48af1ca..66be987 100644
|
||||
index cadf950..517731b 100644
|
||||
--- a/man/systemd.mount.xml
|
||||
+++ b/man/systemd.mount.xml
|
||||
@@ -145,12 +145,12 @@
|
||||
@@ -148,12 +148,12 @@
|
||||
<filename>local-fs.target</filename> or
|
||||
<filename>remote-fs.target</filename>, depending
|
||||
whether the file system is local or remote. If
|
||||
|
||||
@ -12,7 +12,7 @@ paths. Closes: #721347
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 9605b38..b7f8a74 100644
|
||||
index 4b0b45b..e3df24c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -67,16 +67,16 @@ AC_PROG_GCC_TRADITIONAL
|
||||
@ -38,7 +38,7 @@ index 9605b38..b7f8a74 100644
|
||||
|
||||
AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
|
||||
|
||||
@@ -792,13 +792,13 @@ AC_ARG_WITH(kbd-loadkeys,
|
||||
@@ -742,13 +742,13 @@ AC_ARG_WITH(kbd-loadkeys,
|
||||
AS_HELP_STRING([--with-kbd-loadkeys=PATH],
|
||||
[Path to loadkeys]),
|
||||
[KBD_LOADKEYS="$withval"],
|
||||
|
||||
74
debian/patches/accelerometer-Don-t-wait-for-new-data-from-the-senso.patch
vendored
Normal file
74
debian/patches/accelerometer-Don-t-wait-for-new-data-from-the-senso.patch
vendored
Normal file
@ -0,0 +1,74 @@
|
||||
From: Bastien Nocera <hadess@hadess.net>
|
||||
Date: Tue, 8 Jul 2014 18:29:06 +0200
|
||||
Subject: accelerometer: Don't wait for new data from the sensor
|
||||
|
||||
Instead of waiting for new data from the sensor, which might be
|
||||
a long time coming, depending on the sensor device, ask the kernel
|
||||
for the last state for that particular input device.
|
||||
|
||||
(cherry picked from commit a545c6e1aa31b4d7e80c9d3609d9fc4fc9921498)
|
||||
(cherry picked from commit e27bfc22bba932950a398b32bf57be6f825438ee)
|
||||
---
|
||||
src/udev/accelerometer/accelerometer.c | 33 ++++++---------------------------
|
||||
1 file changed, 6 insertions(+), 27 deletions(-)
|
||||
|
||||
diff --git a/src/udev/accelerometer/accelerometer.c b/src/udev/accelerometer/accelerometer.c
|
||||
index 9610d7c..d192e57 100644
|
||||
--- a/src/udev/accelerometer/accelerometer.c
|
||||
+++ b/src/udev/accelerometer/accelerometer.c
|
||||
@@ -179,7 +179,7 @@ get_prev_orientation(struct udev_device *dev)
|
||||
return string_to_orientation(value);
|
||||
}
|
||||
|
||||
-#define SET_AXIS(axis, code_) if (ev[i].code == code_) { if (got_##axis == 0) { axis = ev[i].value; got_##axis = true; } }
|
||||
+#define READ_AXIS(axis, var) { memzero(&abs_info, sizeof(abs_info)); r = ioctl(fd, EVIOCGABS(axis), &abs_info); if (r < 0) return; var = abs_info.value; }
|
||||
|
||||
/* accelerometers */
|
||||
static void test_orientation(struct udev *udev,
|
||||
@@ -188,10 +188,9 @@ static void test_orientation(struct udev *udev,
|
||||
{
|
||||
OrientationUp old, new;
|
||||
_cleanup_close_ int fd = -1;
|
||||
- struct input_event ev[64];
|
||||
- bool got_syn = false;
|
||||
- bool got_x = false, got_y = false, got_z = false;
|
||||
+ struct input_absinfo abs_info;
|
||||
int x = 0, y = 0, z = 0;
|
||||
+ int r;
|
||||
char text[64];
|
||||
|
||||
old = get_prev_orientation(dev);
|
||||
@@ -200,30 +199,10 @@ static void test_orientation(struct udev *udev,
|
||||
if (fd < 0)
|
||||
return;
|
||||
|
||||
- while (1) {
|
||||
- int i, r;
|
||||
-
|
||||
- r = read(fd, ev, sizeof(struct input_event) * 64);
|
||||
-
|
||||
- if (r < (int) sizeof(struct input_event))
|
||||
- return;
|
||||
-
|
||||
- for (i = 0; i < r / (int) sizeof(struct input_event); i++) {
|
||||
- if (got_syn) {
|
||||
- if (ev[i].type == EV_ABS) {
|
||||
- SET_AXIS(x, ABS_X);
|
||||
- SET_AXIS(y, ABS_Y);
|
||||
- SET_AXIS(z, ABS_Z);
|
||||
- }
|
||||
- }
|
||||
- if (ev[i].type == EV_SYN && ev[i].code == SYN_REPORT)
|
||||
- got_syn = true;
|
||||
- if (got_x && got_y && got_z)
|
||||
- goto read_dev;
|
||||
- }
|
||||
- }
|
||||
+ READ_AXIS(ABS_X, x);
|
||||
+ READ_AXIS(ABS_Y, y);
|
||||
+ READ_AXIS(ABS_Z, z);
|
||||
|
||||
-read_dev:
|
||||
new = orientation_calc(old, x, y, z);
|
||||
snprintf(text, sizeof(text),
|
||||
"ID_INPUT_ACCELEROMETER_ORIENTATION=%s", orientation_to_string(new));
|
||||
29
debian/patches/analyze-fix-crash-on-invalid-commandline.patch
vendored
Normal file
29
debian/patches/analyze-fix-crash-on-invalid-commandline.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 9 Aug 2014 09:53:34 -0400
|
||||
Subject: analyze: fix crash on invalid commandline
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1128360
|
||||
---
|
||||
src/analyze/systemd-analyze.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/analyze/systemd-analyze.c b/src/analyze/systemd-analyze.c
|
||||
index 25f8ad6..db5d6e6 100644
|
||||
--- a/src/analyze/systemd-analyze.c
|
||||
+++ b/src/analyze/systemd-analyze.c
|
||||
@@ -1236,13 +1236,14 @@ static int set_log_level(DBusConnection *bus, char **args) {
|
||||
assert(bus);
|
||||
assert(args);
|
||||
|
||||
+ dbus_error_init(&error);
|
||||
+
|
||||
if (strv_length(args) != 1) {
|
||||
log_error("This command expects one argument only.");
|
||||
return -E2BIG;
|
||||
}
|
||||
|
||||
value = args[0];
|
||||
- dbus_error_init(&error);
|
||||
|
||||
m = dbus_message_new_method_call("org.freedesktop.systemd1",
|
||||
"/org/freedesktop/systemd1",
|
||||
@ -1,20 +1,24 @@
|
||||
From: Michael Biebl <biebl@debian.org>
|
||||
Date: Wed, 17 Jul 2013 18:27:39 +0200
|
||||
Subject: Don't move libgudev to /lib
|
||||
Date: Wed, 16 Jul 2014 12:09:47 +0200
|
||||
Subject: build-sys: don't move libgudev to /lib
|
||||
|
||||
libgobject and libgmodule are currently installed in /usr/lib.
|
||||
It depends on libgobject and libgmodule which are installed in /usr/lib.
|
||||
|
||||
(cherry picked from commit 5c059d2ead0787a90732d27ed1b485d236abf641)
|
||||
(cherry picked from commit c46cee9156e8785fc70e8528d6deb402bef06ca0)
|
||||
---
|
||||
Makefile.am | 9 ---------
|
||||
1 file changed, 9 deletions(-)
|
||||
Makefile.am | 10 ----------
|
||||
1 file changed, 10 deletions(-)
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 631bfde..43f1ec6 100644
|
||||
index d57d890..205ea50 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -2654,15 +2654,6 @@ typelibs_DATA = \
|
||||
@@ -2682,16 +2682,6 @@ typelibs_DATA = \
|
||||
|
||||
CLEANFILES += $(gir_DATA) $(typelibs_DATA)
|
||||
endif # HAVE_INTROSPECTION
|
||||
|
||||
-
|
||||
-# move lib from $(libdir) to $(rootlibdir) and update devel link, if needed
|
||||
-libgudev-install-hook:
|
||||
- libname=libgudev-1.0.so && $(move-to-rootlibdir)
|
||||
@ -1,8 +1,6 @@
|
||||
From bc3d33edd2b227c17ae338bf147067bdfafe299c Mon Sep 17 00:00:00 2001
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Wed, 28 May 2014 17:36:40 +0800
|
||||
Subject: [PATCH] build-sys: use glibc's xattr support instead of requiring
|
||||
libattr
|
||||
Subject: build-sys: use glibc's xattr support instead of requiring libattr
|
||||
|
||||
(cherry picked from commit d2edfae0f9bdbecf6a8518e2a5bcf06f470e0d9e)
|
||||
---
|
||||
@ -90,7 +88,7 @@ index 9605b38..4b0b45b 100644
|
||||
QRENCODE: ${have_qrencode}
|
||||
MICROHTTPD: ${have_microhttpd}
|
||||
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
|
||||
index cff83d3..12b7ed3 100644
|
||||
index 5c6edfd..6843183 100644
|
||||
--- a/src/core/mount-setup.c
|
||||
+++ b/src/core/mount-setup.c
|
||||
@@ -87,10 +87,8 @@ static const MountPoint mount_table[] = {
|
||||
@ -105,7 +103,7 @@ index cff83d3..12b7ed3 100644
|
||||
NULL, MNT_IN_CONTAINER },
|
||||
{ "pstore", "/sys/fs/pstore", "pstore", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
|
||||
diff --git a/src/core/socket.c b/src/core/socket.c
|
||||
index 8e02c03..3bd4532 100644
|
||||
index 1bf1f05..66af49d 100644
|
||||
--- a/src/core/socket.c
|
||||
+++ b/src/core/socket.c
|
||||
@@ -28,9 +28,7 @@
|
||||
@ -120,7 +118,7 @@ index 8e02c03..3bd4532 100644
|
||||
#include "unit.h"
|
||||
#include "socket.h"
|
||||
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
|
||||
index 2d2d289..010dda1 100644
|
||||
index 2d79dce..dd63803 100644
|
||||
--- a/src/journal/journal-file.c
|
||||
+++ b/src/journal/journal-file.c
|
||||
@@ -26,10 +26,7 @@
|
||||
@ -135,7 +133,7 @@ index 2d2d289..010dda1 100644
|
||||
|
||||
#include "journal-def.h"
|
||||
#include "journal-file.h"
|
||||
@@ -2513,7 +2510,6 @@ int journal_file_open(
|
||||
@@ -2507,7 +2504,6 @@ int journal_file_open(
|
||||
}
|
||||
|
||||
if (f->last_stat.st_size == 0 && f->writable) {
|
||||
@ -143,7 +141,7 @@ index 2d2d289..010dda1 100644
|
||||
uint64_t crtime;
|
||||
|
||||
/* Let's attach the creation time to the journal file,
|
||||
@@ -2528,7 +2524,6 @@ int journal_file_open(
|
||||
@@ -2522,7 +2518,6 @@ int journal_file_open(
|
||||
|
||||
crtime = htole64((uint64_t) now(CLOCK_REALTIME));
|
||||
fsetxattr(f->fd, "user.crtime_usec", &crtime, sizeof(crtime), XATTR_CREATE);
|
||||
@ -195,6 +193,3 @@ index 695e518..442120a 100644
|
||||
}
|
||||
|
||||
static int journal_file_empty(int dir_fd, const char *name) {
|
||||
--
|
||||
2.0.1
|
||||
|
||||
|
||||
@ -7,10 +7,10 @@ Subject: change the log_info() line in systemctl to reflect reality
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index a5624a8..f3be0f1 100644
|
||||
index 2a69c65..9c9f0ac 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -4298,7 +4298,7 @@ static int enable_sysv_units(char **args) {
|
||||
@@ -4300,7 +4300,7 @@ static int enable_sysv_units(const char *verb, char **args) {
|
||||
/* Mark this entry, so that we don't try enabling it as native unit */
|
||||
args[f] = (char*) "";
|
||||
|
||||
|
||||
29
debian/patches/core-You-can-not-put-the-cached-result-of-use_smack-.patch
vendored
Normal file
29
debian/patches/core-You-can-not-put-the-cached-result-of-use_smack-.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
From: Ronan Le Martret <ronan@fridu.net>
|
||||
Date: Tue, 22 Apr 2014 10:33:25 +0200
|
||||
Subject: core: You can not put the cached result of use_smack fct,
|
||||
as we are not sure the "/sys" is mounted. So we should mount "sys"
|
||||
before "/proc"
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=77646
|
||||
(cherry picked from commit d1d8e5d49f3149d03ceb94d1d2f6c14e7abccb6f)
|
||||
---
|
||||
src/core/mount-setup.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/core/mount-setup.c b/src/core/mount-setup.c
|
||||
index cff83d3..5c6edfd 100644
|
||||
--- a/src/core/mount-setup.c
|
||||
+++ b/src/core/mount-setup.c
|
||||
@@ -69,10 +69,10 @@ typedef struct MountPoint {
|
||||
#define N_EARLY_MOUNT 5
|
||||
|
||||
static const MountPoint mount_table[] = {
|
||||
- { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
|
||||
- NULL, MNT_FATAL|MNT_IN_CONTAINER },
|
||||
{ "sysfs", "/sys", "sysfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
|
||||
NULL, MNT_FATAL|MNT_IN_CONTAINER },
|
||||
+ { "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
|
||||
+ NULL, MNT_FATAL|MNT_IN_CONTAINER },
|
||||
{ "devtmpfs", "/dev", "devtmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME,
|
||||
NULL, MNT_FATAL|MNT_IN_CONTAINER },
|
||||
{ "securityfs", "/sys/kernel/security", "securityfs", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV,
|
||||
28
debian/patches/core-nicer-message-when-inotify-watches-are-exhauste.patch
vendored
Normal file
28
debian/patches/core-nicer-message-when-inotify-watches-are-exhauste.patch
vendored
Normal file
@ -0,0 +1,28 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Wed, 16 Jul 2014 22:52:53 -0400
|
||||
Subject: core: nicer message when inotify watches are exhausted
|
||||
|
||||
inotify_add_watch returns ENOSPC, which translates to
|
||||
"No space left on device", which is misleading.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=73628
|
||||
(cherry picked from commit 18abe7bd3e13525b257da69ac49ff7841c289567)
|
||||
(cherry picked from commit fe85271fb6090e58b36e182ce3e20a388f0ca006)
|
||||
---
|
||||
src/core/path.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/path.c b/src/core/path.c
|
||||
index 5e4f6d5..538c1ea 100644
|
||||
--- a/src/core/path.c
|
||||
+++ b/src/core/path.c
|
||||
@@ -95,7 +95,8 @@ int path_spec_watch(PathSpec *s, Unit *u) {
|
||||
break;
|
||||
}
|
||||
|
||||
- log_warning("Failed to add watch on %s: %m", s->path);
|
||||
+ log_warning("Failed to add watch on %s: %s", s->path,
|
||||
+ errno == ENOSPC ? "too many watches" : strerror(-r));
|
||||
r = -errno;
|
||||
if (cut)
|
||||
*cut = tmp;
|
||||
80
debian/patches/core-snapshot-log-info-when-snapshots-are-created-an.patch
vendored
Normal file
80
debian/patches/core-snapshot-log-info-when-snapshots-are-created-an.patch
vendored
Normal file
@ -0,0 +1,80 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 22 Jun 2014 14:20:08 -0400
|
||||
Subject: core/snapshot: log info when snapshots are created and removed
|
||||
|
||||
Snapshot mechanism is not used very much, but snapshot creation/destruction
|
||||
should be at least as verbose as normal unit starting/stopping.
|
||||
|
||||
(cherry picked from commit 6f8bd5c94ebc19c9afdb17684945526dddc2ec23)
|
||||
|
||||
Conflicts:
|
||||
TODO
|
||||
---
|
||||
src/core/snapshot.c | 19 ++++++++++++-------
|
||||
1 file changed, 12 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/core/snapshot.c b/src/core/snapshot.c
|
||||
index d11239d..e1267a9 100644
|
||||
--- a/src/core/snapshot.c
|
||||
+++ b/src/core/snapshot.c
|
||||
@@ -51,10 +51,11 @@ static void snapshot_set_state(Snapshot *s, SnapshotState state) {
|
||||
s->state = state;
|
||||
|
||||
if (state != old_state)
|
||||
- log_debug("%s changed %s -> %s",
|
||||
- UNIT(s)->id,
|
||||
- snapshot_state_to_string(old_state),
|
||||
- snapshot_state_to_string(state));
|
||||
+ log_debug_unit(UNIT(s)->id,
|
||||
+ "%s changed %s -> %s",
|
||||
+ UNIT(s)->id,
|
||||
+ snapshot_state_to_string(old_state),
|
||||
+ snapshot_state_to_string(state));
|
||||
|
||||
unit_notify(UNIT(s), state_translation_table[old_state], state_translation_table[state], true);
|
||||
}
|
||||
@@ -154,7 +155,7 @@ static int snapshot_deserialize_item(Unit *u, const char *key, const char *value
|
||||
|
||||
state = snapshot_state_from_string(value);
|
||||
if (state < 0)
|
||||
- log_debug("Failed to parse state value %s", value);
|
||||
+ log_debug_unit(u->id, "Failed to parse state value %s", value);
|
||||
else
|
||||
s->deserialized_state = state;
|
||||
|
||||
@@ -162,7 +163,7 @@ static int snapshot_deserialize_item(Unit *u, const char *key, const char *value
|
||||
|
||||
r = parse_boolean(value);
|
||||
if (r < 0)
|
||||
- log_debug("Failed to parse cleanup value %s", value);
|
||||
+ log_debug_unit(u->id, "Failed to parse cleanup value %s", value);
|
||||
else
|
||||
s->cleanup = r;
|
||||
|
||||
@@ -172,7 +173,7 @@ static int snapshot_deserialize_item(Unit *u, const char *key, const char *value
|
||||
if (r < 0)
|
||||
return r;
|
||||
} else
|
||||
- log_debug("Unknown serialization key '%s'", key);
|
||||
+ log_debug_unit(u->id, "Unknown serialization key '%s'", key);
|
||||
|
||||
return 0;
|
||||
}
|
||||
@@ -263,6 +264,8 @@ int snapshot_create(Manager *m, const char *name, bool cleanup, DBusError *e, Sn
|
||||
SNAPSHOT(u)->cleanup = cleanup;
|
||||
*_s = SNAPSHOT(u);
|
||||
|
||||
+ log_info_unit(u->id, "Created snapshot %s.", u->id);
|
||||
+
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
@@ -275,6 +278,8 @@ fail:
|
||||
void snapshot_remove(Snapshot *s) {
|
||||
assert(s);
|
||||
|
||||
+ log_info_unit(UNIT(s)->id, "Removing snapshot %s.", UNIT(s)->id);
|
||||
+
|
||||
unit_add_to_cleanup_queue(UNIT(s));
|
||||
}
|
||||
|
||||
46
debian/patches/core-transaction-avoid-misleading-error-message-when.patch
vendored
Normal file
46
debian/patches/core-transaction-avoid-misleading-error-message-when.patch
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 22 Jun 2014 14:04:23 -0400
|
||||
Subject: core/transaction: avoid misleading error message when unit not found
|
||||
|
||||
There's no point in telling the user to look at the logs when
|
||||
an attempt to load the unit file failed with ENOENT.
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=996133
|
||||
(cherry picked from commit 04ef5b03f64d3824a51a2a903548af029a006744)
|
||||
|
||||
Conflicts:
|
||||
TODO
|
||||
src/core/transaction.c
|
||||
---
|
||||
src/core/transaction.c | 18 ++++++++++++------
|
||||
1 file changed, 12 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/core/transaction.c b/src/core/transaction.c
|
||||
index 203070f..10d7602 100644
|
||||
--- a/src/core/transaction.c
|
||||
+++ b/src/core/transaction.c
|
||||
@@ -861,12 +861,18 @@ int transaction_add_job_and_dependencies(
|
||||
}
|
||||
|
||||
if (type != JOB_STOP && unit->load_state == UNIT_ERROR) {
|
||||
- dbus_set_error(e, BUS_ERROR_LOAD_FAILED,
|
||||
- "Unit %s failed to load: %s. "
|
||||
- "See system logs and 'systemctl status %s' for details.",
|
||||
- unit->id,
|
||||
- strerror(-unit->load_error),
|
||||
- unit->id);
|
||||
+ if (unit->load_error == -ENOENT)
|
||||
+ dbus_set_error(e, BUS_ERROR_LOAD_FAILED,
|
||||
+ "Unit %s failed to load: %s.",
|
||||
+ unit->id,
|
||||
+ strerror(-unit->load_error));
|
||||
+ else
|
||||
+ dbus_set_error(e, BUS_ERROR_LOAD_FAILED,
|
||||
+ "Unit %s failed to load: %s. "
|
||||
+ "See system logs and 'systemctl status %s' for details.",
|
||||
+ unit->id,
|
||||
+ strerror(-unit->load_error),
|
||||
+ unit->id);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
@ -18,12 +18,13 @@ verify that the unit is part of the transaction before considering a
|
||||
job a candidate for deletion.
|
||||
|
||||
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=752259
|
||||
(cherry picked from commit 375ae4aa4d2f89ae8afdd27e9f2b8336fcc2a046)
|
||||
---
|
||||
src/core/transaction.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/transaction.c b/src/core/transaction.c
|
||||
index 203070f..45e06b0 100644
|
||||
index 10d7602..c8ab491 100644
|
||||
--- a/src/core/transaction.c
|
||||
+++ b/src/core/transaction.c
|
||||
@@ -374,7 +374,7 @@ static int transaction_verify_order_one(Transaction *tr, Job *j, Job *from, unsi
|
||||
|
||||
56
debian/patches/cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch
vendored
Normal file
56
debian/patches/cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch
vendored
Normal file
@ -0,0 +1,56 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 23 Jun 2014 19:18:44 +0200
|
||||
Subject: cryptsetup: don't add unit dependency on /dev/null devices when it
|
||||
is listed as password file
|
||||
|
||||
As special magic, don't create device dependencies for /dev/null. Of
|
||||
course, there might be similar devices we might want to include, but
|
||||
given that none of them really make sense to specify as password source
|
||||
there's really no point in checking for anything else here.
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=75816
|
||||
(cherry picked from commit bde29068aa3815c88190a91e9867605a0aeaf9c4)
|
||||
|
||||
Conflicts:
|
||||
src/cryptsetup/cryptsetup-generator.c
|
||||
---
|
||||
src/cryptsetup/cryptsetup-generator.c | 18 +++++++++++-------
|
||||
1 file changed, 11 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/cryptsetup/cryptsetup-generator.c b/src/cryptsetup/cryptsetup-generator.c
|
||||
index 11e5268..1b5f8be 100644
|
||||
--- a/src/cryptsetup/cryptsetup-generator.c
|
||||
+++ b/src/cryptsetup/cryptsetup-generator.c
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "virt.h"
|
||||
#include "strv.h"
|
||||
#include "fileio.h"
|
||||
+#include "path-util.h"
|
||||
|
||||
static const char *arg_dest = "/tmp";
|
||||
static bool arg_enabled = true;
|
||||
@@ -137,14 +138,17 @@ static int create_disk(
|
||||
if (uu == NULL)
|
||||
return log_oom();
|
||||
|
||||
- if (is_device_path(uu)) {
|
||||
- _cleanup_free_ char *dd = unit_name_from_path(uu, ".device");
|
||||
- if (dd == NULL)
|
||||
- return log_oom();
|
||||
+ if (!path_equal(uu, "/dev/null")) {
|
||||
+
|
||||
+ if (is_device_path(uu)) {
|
||||
+ _cleanup_free_ char *dd = unit_name_from_path(uu, ".device");
|
||||
+ if (dd == NULL)
|
||||
+ return log_oom();
|
||||
|
||||
- fprintf(f, "After=%1$s\nRequires=%1$s\n", dd);
|
||||
- } else
|
||||
- fprintf(f, "RequiresMountsFor=%s\n", password);
|
||||
+ fprintf(f, "After=%1$s\nRequires=%1$s\n", dd);
|
||||
+ } else
|
||||
+ fprintf(f, "RequiresMountsFor=%s\n", password);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
24
debian/patches/hostnamed-add-a-new-chassis-type-for-watches.patch
vendored
Normal file
24
debian/patches/hostnamed-add-a-new-chassis-type-for-watches.patch
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Wed, 9 Jul 2014 13:20:05 +0200
|
||||
Subject: hostnamed: add a new chassis type for watches
|
||||
|
||||
(cherry picked from commit c49e59c1831f20fe02276d7bc6ba7d23d24c4ab3)
|
||||
(cherry picked from commit 6f977a8c14c4cec72a85f20d0986daa391dd3319)
|
||||
---
|
||||
src/hostname/hostnamed.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/hostname/hostnamed.c b/src/hostname/hostnamed.c
|
||||
index 0c24b65..769f25c 100644
|
||||
--- a/src/hostname/hostnamed.c
|
||||
+++ b/src/hostname/hostnamed.c
|
||||
@@ -155,7 +155,8 @@ static bool valid_chassis(const char *chassis) {
|
||||
"laptop\0"
|
||||
"server\0"
|
||||
"tablet\0"
|
||||
- "handset\0",
|
||||
+ "handset\0"
|
||||
+ "watch\0",
|
||||
chassis);
|
||||
}
|
||||
|
||||
39
debian/patches/hostnamed-update-documentation-with-new-watch-chassi.patch
vendored
Normal file
39
debian/patches/hostnamed-update-documentation-with-new-watch-chassi.patch
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
From: Tomasz Torcz <tomek@pipebreaker.pl>
|
||||
Date: Wed, 9 Jul 2014 13:37:50 +0200
|
||||
Subject: hostnamed: update documentation with new "watch" chassis type
|
||||
|
||||
(cherry picked from commit efab8d0b0ebf6d715949b7af66fecaf5e5e5d77b)
|
||||
(cherry picked from commit 710348ce7349b224ba58bae765611455320f68d1)
|
||||
---
|
||||
man/hostnamectl.xml | 3 ++-
|
||||
man/machine-info.xml | 3 ++-
|
||||
2 files changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
|
||||
index a0776f5..f3038b3 100644
|
||||
--- a/man/hostnamectl.xml
|
||||
+++ b/man/hostnamectl.xml
|
||||
@@ -236,7 +236,8 @@
|
||||
<literal>laptop</literal>,
|
||||
<literal>server</literal>,
|
||||
<literal>tablet</literal>,
|
||||
- <literal>handset</literal>, as well as
|
||||
+ <literal>handset</literal>,
|
||||
+ <literal>watch</literal>, as well as
|
||||
the special chassis types
|
||||
<literal>vm</literal> and
|
||||
<literal>container</literal> for
|
||||
diff --git a/man/machine-info.xml b/man/machine-info.xml
|
||||
index 7448e68..244e9b6 100644
|
||||
--- a/man/machine-info.xml
|
||||
+++ b/man/machine-info.xml
|
||||
@@ -138,7 +138,8 @@
|
||||
<literal>laptop</literal>,
|
||||
<literal>server</literal>,
|
||||
<literal>tablet</literal>,
|
||||
- <literal>handset</literal>, as well as
|
||||
+ <literal>handset</literal>,
|
||||
+ <literal>watch</literal>, as well as
|
||||
the special chassis types
|
||||
<literal>vm</literal> and
|
||||
<literal>container</literal> for
|
||||
46
debian/patches/hwdb-Update-database-of-Bluetooth-company-identi-495.patch
vendored
Normal file
46
debian/patches/hwdb-Update-database-of-Bluetooth-company-identi-495.patch
vendored
Normal file
@ -0,0 +1,46 @@
|
||||
From: Marcel Holtmann <marcel@holtmann.org>
|
||||
Date: Thu, 3 Jul 2014 16:13:48 +0200
|
||||
Subject: hwdb: Update database of Bluetooth company identifiers
|
||||
|
||||
(cherry picked from commit 063e36db8aed7b54100b33089deb6d2e86d516b9)
|
||||
---
|
||||
hwdb/20-bluetooth-vendor-product.hwdb | 26 +++++++++++++++++++++++++-
|
||||
1 file changed, 25 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/hwdb/20-bluetooth-vendor-product.hwdb b/hwdb/20-bluetooth-vendor-product.hwdb
|
||||
index 377748a..9f3136a 100644
|
||||
--- a/hwdb/20-bluetooth-vendor-product.hwdb
|
||||
+++ b/hwdb/20-bluetooth-vendor-product.hwdb
|
||||
@@ -1045,7 +1045,31 @@ bluetooth:v0159*
|
||||
ID_VENDOR_FROM_DATABASE=ChefSteps, Inc.
|
||||
|
||||
bluetooth:v015A*
|
||||
- ID_VENDOR_FROM_DATABASE=micus AG
|
||||
+ ID_VENDOR_FROM_DATABASE=micas AG
|
||||
|
||||
bluetooth:v015B*
|
||||
ID_VENDOR_FROM_DATABASE=Biomedical Research Ltd.
|
||||
+
|
||||
+bluetooth:v015C*
|
||||
+ ID_VENDOR_FROM_DATABASE=Pitius Tec S.L.
|
||||
+
|
||||
+bluetooth:v015D*
|
||||
+ ID_VENDOR_FROM_DATABASE=Estimote, Inc.
|
||||
+
|
||||
+bluetooth:v015E*
|
||||
+ ID_VENDOR_FROM_DATABASE=Unikey Technologies, Inc.
|
||||
+
|
||||
+bluetooth:v015F*
|
||||
+ ID_VENDOR_FROM_DATABASE=Timer Cap Co.
|
||||
+
|
||||
+bluetooth:v0160*
|
||||
+ ID_VENDOR_FROM_DATABASE=AwoX
|
||||
+
|
||||
+bluetooth:v0161*
|
||||
+ ID_VENDOR_FROM_DATABASE=yikes
|
||||
+
|
||||
+bluetooth:v0162*
|
||||
+ ID_VENDOR_FROM_DATABASE=MADSGlobal NZ Ltd.
|
||||
+
|
||||
+bluetooth:v0163*
|
||||
+ ID_VENDOR_FROM_DATABASE=PCH International
|
||||
4389
debian/patches/hwdb-update-496.patch
vendored
Normal file
4389
debian/patches/hwdb-update-496.patch
vendored
Normal file
File diff suppressed because it is too large
Load Diff
@ -8,10 +8,10 @@ Closes: #634472
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index e11c413..96874f9 100644
|
||||
index f8a0201..5af2d20 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -636,6 +636,9 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
@@ -634,6 +634,9 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
|
||||
/* Try to parse Red Hat style chkconfig headers */
|
||||
|
||||
@ -21,7 +21,7 @@ index e11c413..96874f9 100644
|
||||
if (startswith_no_case(t, "chkconfig:")) {
|
||||
int start_priority;
|
||||
char runlevels[16], *k;
|
||||
@@ -677,7 +680,10 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
@@ -675,7 +678,10 @@ static int service_load_sysv_path(Service *s, const char *path) {
|
||||
s->sysv_runlevels = d;
|
||||
}
|
||||
|
||||
|
||||
6
debian/patches/insserv.conf-generator.patch
vendored
6
debian/patches/insserv.conf-generator.patch
vendored
@ -23,10 +23,10 @@ It has the following modifications:
|
||||
create mode 100644 src/insserv-generator/insserv-generator.c
|
||||
|
||||
diff --git a/Makefile.am b/Makefile.am
|
||||
index 909bf58..1bd4e99 100644
|
||||
index 4f5ec6c..cdd412e 100644
|
||||
--- a/Makefile.am
|
||||
+++ b/Makefile.am
|
||||
@@ -322,6 +322,7 @@ rootlibexec_PROGRAMS = \
|
||||
@@ -323,6 +323,7 @@ rootlibexec_PROGRAMS = \
|
||||
systemd-sleep
|
||||
|
||||
systemgenerator_PROGRAMS = \
|
||||
@ -34,7 +34,7 @@ index 909bf58..1bd4e99 100644
|
||||
systemd-getty-generator \
|
||||
systemd-fstab-generator \
|
||||
systemd-system-update-generator
|
||||
@@ -1683,6 +1684,14 @@ systemd_delta_LDADD = \
|
||||
@@ -1702,6 +1703,14 @@ systemd_delta_LDADD = \
|
||||
libsystemd-shared.la
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
32
debian/patches/journal-allow-files-with-no-data-whatsoever.patch
vendored
Normal file
32
debian/patches/journal-allow-files-with-no-data-whatsoever.patch
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sun, 30 Mar 2014 14:20:34 -0400
|
||||
Subject: journal: allow files with no data whatsoever
|
||||
|
||||
If a file was opened for writing, and then closed immediately without
|
||||
actually writing any entries, on subsequent opening, it would be
|
||||
considered "corrupted". This should be totally fine, and even in
|
||||
read mode, an empty file can become non-empty later on.
|
||||
|
||||
(cherry picked from commit b3306e9c3c1e036396bc6bf74555eecea3f45ad9)
|
||||
(cherry picked from commit ae1d412f96829802688194e6957f75d37da9d7e9)
|
||||
---
|
||||
src/journal/journal-file.c | 6 ------
|
||||
1 file changed, 6 deletions(-)
|
||||
|
||||
diff --git a/src/journal/journal-file.c b/src/journal/journal-file.c
|
||||
index 2d2d289..2d79dce 100644
|
||||
--- a/src/journal/journal-file.c
|
||||
+++ b/src/journal/journal-file.c
|
||||
@@ -274,12 +274,6 @@ static int journal_file_verify_header(JournalFile *f) {
|
||||
!VALID64(le64toh(f->header->entry_array_offset)))
|
||||
return -ENODATA;
|
||||
|
||||
- if (le64toh(f->header->data_hash_table_offset) < le64toh(f->header->header_size) ||
|
||||
- le64toh(f->header->field_hash_table_offset) < le64toh(f->header->header_size) ||
|
||||
- le64toh(f->header->tail_object_offset) < le64toh(f->header->header_size) ||
|
||||
- le64toh(f->header->entry_array_offset) < le64toh(f->header->header_size))
|
||||
- return -ENODATA;
|
||||
-
|
||||
if (f->writable) {
|
||||
uint8_t state;
|
||||
sd_id128_t machine_id;
|
||||
44
debian/patches/journal-compress-add-stream-compression-decompressio.patch
vendored
Normal file
44
debian/patches/journal-compress-add-stream-compression-decompressio.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 24 Jun 2014 21:24:46 -0400
|
||||
Subject: journal/compress: add stream compression/decompression functions
|
||||
|
||||
(cherry picked from commit 355b59e252c9910e44a1ad95c045ba8db58a4f6a)
|
||||
|
||||
Conflicts:
|
||||
src/journal/test-compress.c
|
||||
src/shared/copy.c
|
||||
|
||||
Actually keep only compress_blob changes.
|
||||
---
|
||||
src/journal/compress.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/journal/compress.c b/src/journal/compress.c
|
||||
index cafe8f4..a83dcea 100644
|
||||
--- a/src/journal/compress.c
|
||||
+++ b/src/journal/compress.c
|
||||
@@ -24,8 +24,8 @@
|
||||
#include <string.h>
|
||||
#include <lzma.h>
|
||||
|
||||
-#include "macro.h"
|
||||
#include "compress.h"
|
||||
+#include "macro.h"
|
||||
|
||||
bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size) {
|
||||
lzma_ret ret;
|
||||
@@ -40,12 +40,12 @@ bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_
|
||||
* compressed result is longer than the original */
|
||||
|
||||
ret = lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,
|
||||
- src, src_size, dst, &out_pos, *dst_size);
|
||||
+ src, src_size, dst, &out_pos, src_size);
|
||||
if (ret != LZMA_OK)
|
||||
return false;
|
||||
|
||||
/* Is it actually shorter? */
|
||||
- if (out_pos == *dst_size)
|
||||
+ if (out_pos == src_size)
|
||||
return false;
|
||||
|
||||
*dst_size = out_pos;
|
||||
68
debian/patches/journal-compress-improve-xz-compression-performance.patch
vendored
Normal file
68
debian/patches/journal-compress-improve-xz-compression-performance.patch
vendored
Normal file
@ -0,0 +1,68 @@
|
||||
From: Jon Severinsson <jon@severinsson.net>
|
||||
Date: Tue, 8 Jul 2014 18:29:46 +0200
|
||||
Subject: journal/compress: improve xz compression performance
|
||||
|
||||
The new lzma2 compression options at the top of compress_blob_xz are
|
||||
equivalent to using preset "0", exept for using a 1 MiB dictionary
|
||||
(the same as preset "1"). This makes the memory usage at most 7.5 MiB
|
||||
in the compressor, and 1 MiB in the decompressor, instead of the
|
||||
previous 92 MiB in the compressor and 8 MiB in the decompressor.
|
||||
|
||||
According to test-compress-benchmark this commit makes XZ compression
|
||||
20 times faster, with no increase in compressed data size.
|
||||
Using more realistic test data (an ELF binary rather than repeating
|
||||
ASCII letters 'a' through 'z' in order) it only provides a factor 10
|
||||
speedup, and at a cost if a 10% increase in compressed data size.
|
||||
But that is still a worthwhile trade-off.
|
||||
|
||||
According to test-compress-benchmark XZ compression is still 25 times
|
||||
slower than LZ4, but the compressed data is one eighth the size.
|
||||
Using more realistic test data XZ compression is only 18 times slower
|
||||
than LZ4, and the compressed data is only one quarter the size.
|
||||
|
||||
$ ./test-compress-benchmark
|
||||
XZ: compressed & decompressed 2535300963 bytes in 42.30s (57.15MiB/s), mean compresion 99.95%, skipped 3570 bytes
|
||||
LZ4: compressed & decompressed 2535303543 bytes in 1.60s (1510.60MiB/s), mean compresion 99.60%, skipped 990 bytes
|
||||
|
||||
(cherry picked from commit 1930eed2a7855d2df06ccf51f9e394428bf547e2)
|
||||
|
||||
Conflicts:
|
||||
src/journal/compress.c
|
||||
|
||||
(cherry picked from commit 00464ad8a698fe7735737fab57420f8a44013890)
|
||||
---
|
||||
src/journal/compress.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/journal/compress.c b/src/journal/compress.c
|
||||
index a83dcea..77465c7 100644
|
||||
--- a/src/journal/compress.c
|
||||
+++ b/src/journal/compress.c
|
||||
@@ -28,6 +28,13 @@
|
||||
#include "macro.h"
|
||||
|
||||
bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size) {
|
||||
+ static const lzma_options_lzma opt = {
|
||||
+ 1u << 20u, NULL, 0, LZMA_LC_DEFAULT, LZMA_LP_DEFAULT,
|
||||
+ LZMA_PB_DEFAULT, LZMA_MODE_FAST, 128, LZMA_MF_HC3, 4};
|
||||
+ static const lzma_filter filters[2] = {
|
||||
+ {LZMA_FILTER_LZMA2, (lzma_options_lzma*) &opt},
|
||||
+ {LZMA_VLI_UNKNOWN, NULL}
|
||||
+ };
|
||||
lzma_ret ret;
|
||||
size_t out_pos = 0;
|
||||
|
||||
@@ -39,8 +46,11 @@ bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_
|
||||
/* Returns false if we couldn't compress the data or the
|
||||
* compressed result is longer than the original */
|
||||
|
||||
- ret = lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,
|
||||
- src, src_size, dst, &out_pos, src_size);
|
||||
+ if (src_size < 80)
|
||||
+ return -ENOBUFS;
|
||||
+
|
||||
+ ret = lzma_stream_buffer_encode((lzma_filter*) filters, LZMA_CHECK_NONE, NULL,
|
||||
+ src, src_size, dst, &out_pos, src_size - 1);
|
||||
if (ret != LZMA_OK)
|
||||
return false;
|
||||
|
||||
61
debian/patches/journal-compress-simplify-compress_blob.patch
vendored
Normal file
61
debian/patches/journal-compress-simplify-compress_blob.patch
vendored
Normal file
@ -0,0 +1,61 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 24 Jun 2014 21:24:09 -0400
|
||||
Subject: journal/compress: simplify compress_blob
|
||||
|
||||
(cherry picked from commit 76cc0bf682b944d4cb611f1b37c71fce140f8fe7)
|
||||
---
|
||||
src/journal/compress.c | 28 +++++++---------------------
|
||||
1 file changed, 7 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/src/journal/compress.c b/src/journal/compress.c
|
||||
index a4427be..cafe8f4 100644
|
||||
--- a/src/journal/compress.c
|
||||
+++ b/src/journal/compress.c
|
||||
@@ -28,9 +28,8 @@
|
||||
#include "compress.h"
|
||||
|
||||
bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_size) {
|
||||
- lzma_stream s = LZMA_STREAM_INIT;
|
||||
lzma_ret ret;
|
||||
- bool b = false;
|
||||
+ size_t out_pos = 0;
|
||||
|
||||
assert(src);
|
||||
assert(src_size > 0);
|
||||
@@ -40,30 +39,17 @@ bool compress_blob(const void *src, uint64_t src_size, void *dst, uint64_t *dst_
|
||||
/* Returns false if we couldn't compress the data or the
|
||||
* compressed result is longer than the original */
|
||||
|
||||
- ret = lzma_easy_encoder(&s, LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE);
|
||||
+ ret = lzma_easy_buffer_encode(LZMA_PRESET_DEFAULT, LZMA_CHECK_NONE, NULL,
|
||||
+ src, src_size, dst, &out_pos, *dst_size);
|
||||
if (ret != LZMA_OK)
|
||||
return false;
|
||||
|
||||
- s.next_in = src;
|
||||
- s.avail_in = src_size;
|
||||
- s.next_out = dst;
|
||||
- s.avail_out = src_size;
|
||||
-
|
||||
- /* Does it fit? */
|
||||
- if (lzma_code(&s, LZMA_FINISH) != LZMA_STREAM_END)
|
||||
- goto fail;
|
||||
-
|
||||
/* Is it actually shorter? */
|
||||
- if (s.avail_out == 0)
|
||||
- goto fail;
|
||||
-
|
||||
- *dst_size = src_size - s.avail_out;
|
||||
- b = true;
|
||||
-
|
||||
-fail:
|
||||
- lzma_end(&s);
|
||||
+ if (out_pos == *dst_size)
|
||||
+ return false;
|
||||
|
||||
- return b;
|
||||
+ *dst_size = out_pos;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool uncompress_blob(const void *src, uint64_t src_size,
|
||||
27
debian/patches/journal-reduce-test-journal-send-timeout-from-10s-to.patch
vendored
Normal file
27
debian/patches/journal-reduce-test-journal-send-timeout-from-10s-to.patch
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Fri, 18 Jul 2014 12:58:00 +0200
|
||||
Subject: journal: reduce test-journal-send timeout from 10s to 1s
|
||||
|
||||
The sleep(10) in test-journal-send is quite aggressive. We need it only
|
||||
for the journal to get our cgroup information. But even that information
|
||||
is not vital to the test, so a sleep(1) should be just fine.
|
||||
|
||||
(cherry picked from commit 037ee337f0f64bd35ced765f2e2d97f496d4e7c7)
|
||||
(cherry picked from commit 918af53be96fe4284538ebf8eb4fac1aa8839529)
|
||||
---
|
||||
src/journal/test-journal-send.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/journal/test-journal-send.c b/src/journal/test-journal-send.c
|
||||
index 3e986ed..45eb327 100644
|
||||
--- a/src/journal/test-journal-send.c
|
||||
+++ b/src/journal/test-journal-send.c
|
||||
@@ -72,7 +72,7 @@ int main(int argc, char *argv[]) {
|
||||
"N_CPUS=%li", sysconf(_SC_NPROCESSORS_ONLN),
|
||||
NULL);
|
||||
|
||||
- sleep(10);
|
||||
+ sleep(1);
|
||||
|
||||
return 0;
|
||||
}
|
||||
33
debian/patches/journald-make-MaxFileSec-really-default-to-1month.patch
vendored
Normal file
33
debian/patches/journald-make-MaxFileSec-really-default-to-1month.patch
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
From: =?utf-8?q?Micha=C5=82_Bartoszkiewicz?= <mbartoszkiewicz@gmail.com>
|
||||
Date: Thu, 26 Jun 2014 22:11:35 +0200
|
||||
Subject: journald: make MaxFileSec really default to 1month
|
||||
|
||||
journald.conf(5) states that the default for MaxFileSec is one month,
|
||||
but the code didn't respect that.
|
||||
|
||||
(cherry picked from commit e150e82097211f09b911c7784a89ef9efed713ca)
|
||||
---
|
||||
src/journal/journald-server.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/journal/journald-server.c b/src/journal/journald-server.c
|
||||
index 0b31d10..1e93670 100644
|
||||
--- a/src/journal/journald-server.c
|
||||
+++ b/src/journal/journald-server.c
|
||||
@@ -67,6 +67,7 @@
|
||||
#define DEFAULT_SYNC_INTERVAL_USEC (5*USEC_PER_MINUTE)
|
||||
#define DEFAULT_RATE_LIMIT_INTERVAL (30*USEC_PER_SEC)
|
||||
#define DEFAULT_RATE_LIMIT_BURST 1000
|
||||
+#define DEFAULT_MAX_FILE_USEC USEC_PER_MONTH
|
||||
|
||||
#define RECHECK_AVAILABLE_SPACE_USEC (30*USEC_PER_SEC)
|
||||
|
||||
@@ -1486,6 +1487,8 @@ int server_init(Server *s) {
|
||||
|
||||
s->forward_to_syslog = true;
|
||||
|
||||
+ s->max_file_usec = DEFAULT_MAX_FILE_USEC;
|
||||
+
|
||||
s->max_level_store = LOG_DEBUG;
|
||||
s->max_level_syslog = LOG_DEBUG;
|
||||
s->max_level_kmsg = LOG_NOTICE;
|
||||
@ -1,4 +1,3 @@
|
||||
From 3fdb2494c1e24c0a020f5b54022d2c751fd26f50 Mon Sep 17 00:00:00 2001
|
||||
From: David Herrmann <dh.herrmann@gmail.com>
|
||||
Date: Thu, 28 Nov 2013 10:52:18 +0100
|
||||
Subject: login: revert lazy session-activation on non-VT seats
|
||||
@ -11,12 +10,17 @@ This patch restores the original behavior. We either need to add a new
|
||||
flag for session-creation or some other heuristic to avoid activating new
|
||||
sessions in the future.
|
||||
|
||||
(cherry picked from commit 3fdb2494c1e24c0a020f5b54022d2c751fd26f50)
|
||||
---
|
||||
src/login/logind-seat.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
|
||||
index b30c4ce..ca0e8d7 100644
|
||||
index b581925..030df40 100644
|
||||
--- a/src/login/logind-seat.c
|
||||
+++ b/src/login/logind-seat.c
|
||||
@@ -413,8 +413,8 @@ int seat_attach_session(Seat *s, Session *session) {
|
||||
seat_send_changed(s, "Sessions", NULL);
|
||||
@@ -419,8 +419,8 @@ int seat_attach_session(Seat *s, Session *session) {
|
||||
seat_send_changed(s, "Sessions\0");
|
||||
|
||||
/* On seats with VTs, the VT logic defines which session is active. On
|
||||
- * seats without VTs, we automatically activate the first session. */
|
||||
@ -26,6 +30,3 @@ index b30c4ce..ca0e8d7 100644
|
||||
seat_set_active(s, session);
|
||||
|
||||
return 0;
|
||||
--
|
||||
cgit v0.10.2
|
||||
|
||||
25
debian/patches/machine-don-t-return-uninitialized-variable.patch
vendored
Normal file
25
debian/patches/machine-don-t-return-uninitialized-variable.patch
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
From: Tom Gundersen <teg@jklm.no>
|
||||
Date: Sun, 6 Jul 2014 14:12:28 +0200
|
||||
Subject: machine: don't return uninitialized variable
|
||||
|
||||
Repotred by Ronny Chevalier
|
||||
|
||||
(cherry picked from commit f14aa1f1b2e4e99ee20393871b5f64f1378ed6c3)
|
||||
(cherry picked from commit 6e07a1c070376b7c2bcc8d57e8adbc8f6f78e8d5)
|
||||
---
|
||||
src/machine/machine.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/machine/machine.c b/src/machine/machine.c
|
||||
index 3df9c45..56986c8 100644
|
||||
--- a/src/machine/machine.c
|
||||
+++ b/src/machine/machine.c
|
||||
@@ -342,7 +342,7 @@ static int machine_stop_scope(Machine *m) {
|
||||
free(m->scope_job);
|
||||
m->scope_job = job;
|
||||
|
||||
- return r;
|
||||
+ return 0;
|
||||
}
|
||||
|
||||
int machine_stop(Machine *m) {
|
||||
39
debian/patches/man-also-describe-an-udev-rule-for-bridge-sysctl.patch
vendored
Normal file
39
debian/patches/man-also-describe-an-udev-rule-for-bridge-sysctl.patch
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 19 Jun 2014 21:13:56 -0400
|
||||
Subject: man: also describe an udev rule for bridge sysctl
|
||||
|
||||
(cherry picked from commit 71418295125c542d3edd1e7251bb0701ef1af89b)
|
||||
---
|
||||
man/sysctl.d.xml | 19 ++++++++++++++++++-
|
||||
1 file changed, 18 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
|
||||
index 78c4e80..ed9e997 100644
|
||||
--- a/man/sysctl.d.xml
|
||||
+++ b/man/sysctl.d.xml
|
||||
@@ -154,7 +154,24 @@
|
||||
</example>
|
||||
|
||||
<example>
|
||||
- <title>Disable packet filter on the bridge</title>
|
||||
+ <title>Disable packet filter on the bridge (method one)</title>
|
||||
+ <para><filename>/etc/udev/rules.d/99-bridge.conf</filename>:
|
||||
+ </para>
|
||||
+
|
||||
+ <programlisting>ACTION=="add", SUBSYSTEM=="module", KERNEL=="bridge", RUN+="/usr/lib/systemd/systemd-sysctl --prefix=/proc/sys/net/bridge"
|
||||
+</programlisting>
|
||||
+
|
||||
+ <para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
||||
+ </para>
|
||||
+
|
||||
+ <programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
||||
+net.bridge.bridge-nf-call-iptables = 0
|
||||
+net.bridge.bridge-nf-call-arptables = 0
|
||||
+</programlisting>
|
||||
+ </example>
|
||||
+
|
||||
+ <example>
|
||||
+ <title>Disable packet filter on the bridge (method two)</title>
|
||||
<para><filename>/etc/modules-load.d/bridge.conf</filename>:
|
||||
</para>
|
||||
|
||||
127
debian/patches/man-document-statically-loading-modules-for-sysctl-s.patch
vendored
Normal file
127
debian/patches/man-document-statically-loading-modules-for-sysctl-s.patch
vendored
Normal file
@ -0,0 +1,127 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Thu, 19 Jun 2014 20:43:56 -0400
|
||||
Subject: man: document statically loading modules for sysctl settings
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1022977
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=725412
|
||||
(cherry picked from commit 7284335adbb8cb2bc9c11f9e102906da1bf71145)
|
||||
---
|
||||
man/sysctl.d.xml | 79 +++++++++++++++++++++++++++++++++++++++-----------------
|
||||
1 file changed, 56 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/man/sysctl.d.xml b/man/sysctl.d.xml
|
||||
index db53b49..78c4e80 100644
|
||||
--- a/man/sysctl.d.xml
|
||||
+++ b/man/sysctl.d.xml
|
||||
@@ -71,24 +71,6 @@
|
||||
is <literal>#</literal> or <literal>;</literal> are
|
||||
ignored.</para>
|
||||
|
||||
- <para>Note that either <literal>/</literal> or
|
||||
- <literal>.</literal> may be used as separators within
|
||||
- sysctl variable names. If the first separator is a
|
||||
- slash, remaining slashes and dots are left intact. If
|
||||
- the first separator is a dot, dots and slashes are
|
||||
- interchanged. <literal>kernel.domainname=foo</literal>
|
||||
- and <literal>kernel/domainname=foo</literal> are
|
||||
- equivalent and will cause <literal>foo</literal> to
|
||||
- be written to
|
||||
- <filename>/proc/sys/kernel/domainname</filename>.
|
||||
- Either
|
||||
- <literal>net.ipv4.conf.enp3s0/200.forwarding</literal>
|
||||
- or
|
||||
- <literal>net/ipv4/conf/enp3s0.200/forwarding</literal>
|
||||
- may be used to refer to
|
||||
- <filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
|
||||
- </para>
|
||||
-
|
||||
<para>Each configuration file shall be named in the
|
||||
style of <filename><replaceable>program</replaceable>.conf</filename>.
|
||||
Files in <filename>/etc/</filename> override files
|
||||
@@ -110,6 +92,24 @@
|
||||
number and a dash, to simplify the ordering of the
|
||||
files.</para>
|
||||
|
||||
+ <para>Note that either <literal>/</literal> or
|
||||
+ <literal>.</literal> may be used as separators within
|
||||
+ sysctl variable names. If the first separator is a
|
||||
+ slash, remaining slashes and dots are left intact. If
|
||||
+ the first separator is a dot, dots and slashes are
|
||||
+ interchanged. <literal>kernel.domainname=foo</literal>
|
||||
+ and <literal>kernel/domainname=foo</literal> are
|
||||
+ equivalent and will cause <literal>foo</literal> to
|
||||
+ be written to
|
||||
+ <filename>/proc/sys/kernel/domainname</filename>.
|
||||
+ Either
|
||||
+ <literal>net.ipv4.conf.enp3s0/200.forwarding</literal>
|
||||
+ or
|
||||
+ <literal>net/ipv4/conf/enp3s0.200/forwarding</literal>
|
||||
+ may be used to refer to
|
||||
+ <filename>/proc/sys/net/ipv4/conf/enp3s0.200/forwarding</filename>.
|
||||
+ </para>
|
||||
+
|
||||
<para>If the administrator wants to disable a
|
||||
configuration file supplied by the vendor, the
|
||||
recommended way is to place a symlink to
|
||||
@@ -125,16 +125,48 @@
|
||||
specifically,
|
||||
<filename>net.ipv4.conf.*</filename>,
|
||||
<filename>net.ipv6.conf.*</filename>,
|
||||
- <filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>)</para>
|
||||
+ <filename>net.ipv4.neigh.*</filename> and <filename>net.ipv6.neigh.*</filename>).</para>
|
||||
+
|
||||
+ <para>Many sysctl parameters only become available
|
||||
+ when certain kernel modules are loaded. Modules are
|
||||
+ usually loaded on demand, e.g. when certain hardware
|
||||
+ is plugged in or network brought up. This means that
|
||||
+ <citerefentry><refentrytitle>systemd-sysctl.service</refentrytitle><manvolnum>8</manvolnum></citerefentry> which runs
|
||||
+ during early boot will not configure such parameters
|
||||
+ if they become available after it has run. To
|
||||
+ set such parameters, it is recommended to add
|
||||
+ an <citerefentry><refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum></citerefentry> rule to set those parameters when they become
|
||||
+ available. Alternatively, a slightly simpler and
|
||||
+ less efficient option is to add the module to
|
||||
+ <citerefentry><refentrytitle>modules-load.d</refentrytitle><manvolnum>5</manvolnum></citerefentry>, causing it to be loaded statically
|
||||
+ before sysctl settings are applied (see
|
||||
+ example below).</para>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
- <title>Example</title>
|
||||
+ <title>Examples</title>
|
||||
+ <example>
|
||||
+ <title>Set kernel YP domain name</title>
|
||||
+ <para><filename>/etc/sysctl.d/domain-name.conf</filename>:
|
||||
+ </para>
|
||||
+
|
||||
+ <programlisting>kernel.domainname=example.com</programlisting>
|
||||
+ </example>
|
||||
+
|
||||
<example>
|
||||
- <title>/etc/sysctl.d/domain-name.conf example:</title>
|
||||
+ <title>Disable packet filter on the bridge</title>
|
||||
+ <para><filename>/etc/modules-load.d/bridge.conf</filename>:
|
||||
+ </para>
|
||||
+
|
||||
+ <programlisting>bridge</programlisting>
|
||||
+
|
||||
+ <para><filename>/etc/sysctl.d/bridge.conf</filename>:
|
||||
+ </para>
|
||||
|
||||
- <programlisting># Set kernel YP domain name
|
||||
-kernel.domainname=example.com</programlisting>
|
||||
+ <programlisting>net.bridge.bridge-nf-call-ip6tables = 0
|
||||
+net.bridge.bridge-nf-call-iptables = 0
|
||||
+net.bridge.bridge-nf-call-arptables = 0
|
||||
+</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
@@ -146,6 +178,7 @@ kernel.domainname=example.com</programlisting>
|
||||
<citerefentry><refentrytitle>systemd-delta</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sysctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
|
||||
<citerefentry><refentrytitle>sysctl.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
|
||||
+ <citerefentry><refentrytitle>modprobe</refentrytitle><manvolnum>8</manvolnum></citerefentry>
|
||||
</para>
|
||||
</refsect1>
|
||||
|
||||
23
debian/patches/man-fix-path-in-crypttab-5.patch
vendored
Normal file
23
debian/patches/man-fix-path-in-crypttab-5.patch
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 23 Jun 2014 23:07:53 -0400
|
||||
Subject: man: fix path in crypttab(5)
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=75816
|
||||
(cherry picked from commit 9fcdf32294e66f91d2a177f73a77049832768311)
|
||||
---
|
||||
man/crypttab.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/crypttab.xml b/man/crypttab.xml
|
||||
index 4b6d12e..af41ef4 100644
|
||||
--- a/man/crypttab.xml
|
||||
+++ b/man/crypttab.xml
|
||||
@@ -376,7 +376,7 @@
|
||||
<programlisting>luks UUID=2505567a-9e27-4efe-a4d5-15ad146c258b
|
||||
swap /dev/sda7 /dev/urandom swap
|
||||
truecrypt /dev/sda2 /etc/container_password tcrypt
|
||||
-hidden /mnt/tc_hidden /null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting>
|
||||
+hidden /mnt/tc_hidden /dev/null tcrypt-hidden,tcrypt-keyfile=/etc/keyfile</programlisting>
|
||||
</example>
|
||||
</refsect1>
|
||||
|
||||
22
debian/patches/man-sd_journal_get_data-fix-variable-naming-in-examp.patch
vendored
Normal file
22
debian/patches/man-sd_journal_get_data-fix-variable-naming-in-examp.patch
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Tue, 1 Jul 2014 10:22:51 +0200
|
||||
Subject: man/sd_journal_get_data: fix variable naming in example
|
||||
|
||||
(cherry picked from commit 02ea24ca2a0aac854c4e9e7d712f6464c8b29e4a)
|
||||
---
|
||||
man/sd_journal_get_data.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/sd_journal_get_data.xml b/man/sd_journal_get_data.xml
|
||||
index 6ed52b5..7f90fc3 100644
|
||||
--- a/man/sd_journal_get_data.xml
|
||||
+++ b/man/sd_journal_get_data.xml
|
||||
@@ -225,7 +225,7 @@
|
||||
<programlisting>...
|
||||
int print_fields(sd_journal *j) {
|
||||
const void *data;
|
||||
- size_t l;
|
||||
+ size_t length;
|
||||
SD_JOURNAL_FOREACH_DATA(j, data, length)
|
||||
printf("%.*s\n", (int) length, data);
|
||||
}
|
||||
32
debian/patches/man-sd_journal_next-fix-argument-in-example.patch
vendored
Normal file
32
debian/patches/man-sd_journal_next-fix-argument-in-example.patch
vendored
Normal file
@ -0,0 +1,32 @@
|
||||
From: Christian Hesse <mail@eworm.de>
|
||||
Date: Tue, 1 Jul 2014 10:22:50 +0200
|
||||
Subject: man/sd_journal_next: fix argument in example
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset="utf-8"
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The example does not compile, it fails with:
|
||||
|
||||
error: passing argument 3 of ‘sd_journal_get_data’ from incompatible
|
||||
pointer type
|
||||
|
||||
Cast to (const void **) to avoid this.
|
||||
|
||||
(cherry picked from commit 8959ae0d4cc7921293a21182693b7d953f6cce9b)
|
||||
---
|
||||
man/sd_journal_next.xml | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/man/sd_journal_next.xml b/man/sd_journal_next.xml
|
||||
index 1409b0d..750282c 100644
|
||||
--- a/man/sd_journal_next.xml
|
||||
+++ b/man/sd_journal_next.xml
|
||||
@@ -183,7 +183,7 @@ int main(int argc, char *argv[]) {
|
||||
const char *d;
|
||||
size_t l;
|
||||
|
||||
- r = sd_journal_get_data(j, "MESSAGE", &d, &l);
|
||||
+ r = sd_journal_get_data(j, "MESSAGE", (const void **)&d, &l);
|
||||
if (r < 0) {
|
||||
fprintf(stderr, "Failed to read message field: %s\n", strerror(-r));
|
||||
continue;
|
||||
14
debian/patches/more-cd-aliases.patch
vendored
14
debian/patches/more-cd-aliases.patch
vendored
@ -4,14 +4,14 @@ Subject: more cd aliases
|
||||
|
||||
Add more aliases for CD/DVD devices.
|
||||
---
|
||||
rules/60-cdrom_id.rules | 10 +++++++++-
|
||||
1 file changed, 9 insertions(+), 1 deletion(-)
|
||||
rules/60-cdrom_id.rules | 8 +++++++-
|
||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
Index: systemd/rules/60-cdrom_id.rules
|
||||
===================================================================
|
||||
--- systemd.orig/rules/60-cdrom_id.rules
|
||||
+++ systemd/rules/60-cdrom_id.rules
|
||||
@@ -15,6 +15,12 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdr
|
||||
diff --git a/rules/60-cdrom_id.rules b/rules/60-cdrom_id.rules
|
||||
index 6eaf76a..4dccfc6 100644
|
||||
--- a/rules/60-cdrom_id.rules
|
||||
+++ b/rules/60-cdrom_id.rules
|
||||
@@ -15,6 +15,12 @@ ENV{DISK_EJECT_REQUEST}=="?*", RUN+="cdrom_id --eject-media $devnode", GOTO="cdr
|
||||
# enable the receiving of media eject button events
|
||||
IMPORT{program}="cdrom_id --lock-media $devnode"
|
||||
|
||||
|
||||
67
debian/patches/rules-consistently-use-instead-of.patch
vendored
Normal file
67
debian/patches/rules-consistently-use-instead-of.patch
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Tue, 15 Jul 2014 02:04:47 +0200
|
||||
Subject: rules: consistently use "?*" instead of "*?"
|
||||
|
||||
(cherry picked from commit 64dfe7b74446bd56e2d0e1588f900372ac13ae42)
|
||||
(cherry picked from commit 9221fcfe485a71dd206691f25fc7db3b02076bf3)
|
||||
---
|
||||
rules/99-systemd.rules.in | 2 +-
|
||||
src/login/70-uaccess.rules | 12 ++++++------
|
||||
2 files changed, 7 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/rules/99-systemd.rules.in b/rules/99-systemd.rules.in
|
||||
index 713e052..ed0df75 100644
|
||||
--- a/rules/99-systemd.rules.in
|
||||
+++ b/rules/99-systemd.rules.in
|
||||
@@ -43,7 +43,7 @@ SUBSYSTEM=="net", KERNEL!="lo", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsys
|
||||
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_ALIAS}+="/sys/subsystem/bluetooth/devices/%k"
|
||||
|
||||
SUBSYSTEM=="bluetooth", TAG+="systemd", ENV{SYSTEMD_WANTS}+="bluetooth.target"
|
||||
-ENV{ID_SMARTCARD_READER}=="*?", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
|
||||
+ENV{ID_SMARTCARD_READER}=="?*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="smartcard.target"
|
||||
SUBSYSTEM=="sound", KERNEL=="card*", TAG+="systemd", ENV{SYSTEMD_WANTS}+="sound.target"
|
||||
|
||||
SUBSYSTEM=="printer", TAG+="systemd", ENV{SYSTEMD_WANTS}+="printer.target"
|
||||
diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules
|
||||
index 01484c9..c4fc956 100644
|
||||
--- a/src/login/70-uaccess.rules
|
||||
+++ b/src/login/70-uaccess.rules
|
||||
@@ -12,7 +12,7 @@ ENV{MAJOR}=="", GOTO="uaccess_end"
|
||||
SUBSYSTEM=="usb", ENV{ID_USB_INTERFACES}=="*:060101:*", TAG+="uaccess"
|
||||
|
||||
# Digicams with proprietary protocol
|
||||
-ENV{ID_GPHOTO2}=="*?", TAG+="uaccess"
|
||||
+ENV{ID_GPHOTO2}=="?*", TAG+="uaccess"
|
||||
|
||||
# SCSI and USB scanners
|
||||
ENV{libsane_matched}=="yes", TAG+="uaccess"
|
||||
@@ -49,13 +49,13 @@ SUBSYSTEM=="drm", KERNEL=="card*", TAG+="uaccess"
|
||||
SUBSYSTEM=="misc", KERNEL=="kvm", TAG+="uaccess"
|
||||
|
||||
# smart-card readers
|
||||
-ENV{ID_SMARTCARD_READER}=="*?", TAG+="uaccess"
|
||||
+ENV{ID_SMARTCARD_READER}=="?*", TAG+="uaccess"
|
||||
|
||||
# (USB) authentication devices
|
||||
-ENV{ID_SECURITY_TOKEN}=="*?", TAG+="uaccess"
|
||||
+ENV{ID_SECURITY_TOKEN}=="?*", TAG+="uaccess"
|
||||
|
||||
# PDA devices
|
||||
-ENV{ID_PDA}=="*?", TAG+="uaccess"
|
||||
+ENV{ID_PDA}=="?*", TAG+="uaccess"
|
||||
|
||||
# Programmable remote control
|
||||
ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess"
|
||||
@@ -64,10 +64,10 @@ ENV{ID_REMOTE_CONTROL}=="1", TAG+="uaccess"
|
||||
SUBSYSTEM=="input", ENV{ID_INPUT_JOYSTICK}=="?*", TAG+="uaccess"
|
||||
|
||||
# color measurement devices
|
||||
-ENV{COLOR_MEASUREMENT_DEVICE}=="*?", TAG+="uaccess"
|
||||
+ENV{COLOR_MEASUREMENT_DEVICE}=="?*", TAG+="uaccess"
|
||||
|
||||
# DDC/CI device, usually high-end monitors such as the DreamColor
|
||||
-ENV{DDC_DEVICE}=="*?", TAG+="uaccess"
|
||||
+ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
|
||||
|
||||
# media player raw devices (for user-mode drivers, Android SDK, etc.)
|
||||
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
|
||||
27
debian/patches/rules-don-t-enable-usb-pm-for-Avocent-devices.patch
vendored
Normal file
27
debian/patches/rules-don-t-enable-usb-pm-for-Avocent-devices.patch
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
From: Tom Hirst <tom.hirst@ipe-systems.co.uk>
|
||||
Date: Wed, 25 Jun 2014 11:57:11 +0000
|
||||
Subject: rules: don't enable usb pm for Avocent devices
|
||||
|
||||
The Avocent KVM over IP devices doesn't work correctly with USB power
|
||||
management enabled.
|
||||
|
||||
(cherry picked from commit 52fb538361053f8c4abce0e40cd0bae3d28ceb16)
|
||||
---
|
||||
rules/42-usb-hid-pm.rules | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/rules/42-usb-hid-pm.rules b/rules/42-usb-hid-pm.rules
|
||||
index 3fd6e8a..483a781 100644
|
||||
--- a/rules/42-usb-hid-pm.rules
|
||||
+++ b/rules/42-usb-hid-pm.rules
|
||||
@@ -11,10 +11,6 @@ ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Mouse", ATTR{serial}==
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Tablet", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{product}=="QEMU USB Keyboard", ATTR{serial}=="42", TEST=="power/control", ATTR{power/control}="auto"
|
||||
|
||||
-# Catch-all for Avocent HID devices. Keyed off interface in order to only
|
||||
-# trigger on HID class devices.
|
||||
-ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0624", ATTR{bInterfaceClass}=="03", TEST=="../power/control", ATTR{../power/control}="auto"
|
||||
-
|
||||
# Dell DRAC 4
|
||||
ACTION=="add", SUBSYSTEM=="usb", ATTR{idVendor}=="413c", ATTR{idProduct}=="2500", TEST=="power/control", ATTR{power/control}="auto"
|
||||
|
||||
44
debian/patches/rules-uaccess-add-ID_SOFTWARE_RADIO.patch
vendored
Normal file
44
debian/patches/rules-uaccess-add-ID_SOFTWARE_RADIO.patch
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
From: Kay Sievers <kay@vrfy.org>
|
||||
Date: Tue, 15 Jul 2014 17:35:53 +0200
|
||||
Subject: rules: uaccess - add ID_SOFTWARE_RADIO
|
||||
|
||||
On Tue, Jul 15, 2014 at 1:52 PM, Alick Zhao <alick9188@gmail.com> wrote:
|
||||
>>>
|
||||
>>> So maybe ID_SOFTWARE_RADIO ?
|
||||
>>
|
||||
>> Hmm, SDR is more a term for a generic technology than for a device
|
||||
>> class. To me it does not really sound like an administrator would know
|
||||
>> what this is.
|
||||
>>
|
||||
>> What exactly is the device or subsystem you want to make accessible to
|
||||
>> locally logged-in users only?
|
||||
>
|
||||
> Initially it is bladeRF, but many more are of interest: USRP, rtl-sdr,
|
||||
> HackRF, ... [1]
|
||||
>
|
||||
> I agree an administrator might not know what SDR is, since it is
|
||||
> currently still not widely known, and makes sense only for amateurs
|
||||
> and researchers. But as a SDR fan, I see many new SDR peripherals
|
||||
> are created recently, and expect to see more. So a generic ID seems
|
||||
> reasonable to me.
|
||||
>
|
||||
> [1] http://en.wikipedia.org/wiki/List_of_software-defined_radios
|
||||
|
||||
(cherry picked from commit 30632d97d9d68c8202e562f34afae8f8d6e9c377)
|
||||
(cherry picked from commit 4e0d085ff52a7d7858a30c651e37b18f3e92618b)
|
||||
---
|
||||
src/login/70-uaccess.rules | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/login/70-uaccess.rules b/src/login/70-uaccess.rules
|
||||
index c4fc956..6bbd182 100644
|
||||
--- a/src/login/70-uaccess.rules
|
||||
+++ b/src/login/70-uaccess.rules
|
||||
@@ -72,4 +72,7 @@ ENV{DDC_DEVICE}=="?*", TAG+="uaccess"
|
||||
# media player raw devices (for user-mode drivers, Android SDK, etc.)
|
||||
SUBSYSTEM=="usb", ENV{ID_MEDIA_PLAYER}=="?*", TAG+="uaccess"
|
||||
|
||||
+# software-defined radio communication devices
|
||||
+ENV{ID_SOFTWARE_RADIO}=="?*", TAG+="uaccess"
|
||||
+
|
||||
LABEL="uaccess_end"
|
||||
49
debian/patches/series
vendored
49
debian/patches/series
vendored
@ -477,10 +477,53 @@ shared-fix-search_and_fopen-with-alternate-roots.patch
|
||||
Reset-signal-mask-on-re-exec-to-init.patch
|
||||
core-clean-up-signal-reset-logic-when-reexec.patch
|
||||
util-treat-fuse.sshfs-as-a-network-filesystem.patch
|
||||
units-systemd-sysctl.service.in-run-after-load-modul.patch
|
||||
man-document-statically-loading-modules-for-sysctl-s.patch
|
||||
man-also-describe-an-udev-rule-for-bridge-sysctl.patch
|
||||
util-do-not-strip-dev-prefix-twice.patch
|
||||
core-transaction-avoid-misleading-error-message-when.patch
|
||||
core-snapshot-log-info-when-snapshots-are-created-an.patch
|
||||
vconsole-also-copy-character-maps-not-just-fonts-fro.patch
|
||||
core-You-can-not-put-the-cached-result-of-use_smack-.patch
|
||||
cryptsetup-don-t-add-unit-dependency-on-dev-null-dev.patch
|
||||
man-fix-path-in-crypttab-5.patch
|
||||
core-transaction-fix-cycle-break-attempts-outside-tr.patch
|
||||
journald-make-MaxFileSec-really-default-to-1month.patch
|
||||
rules-don-t-enable-usb-pm-for-Avocent-devices.patch
|
||||
units-remove-RefuseManualStart-from-units-which-are-.patch
|
||||
units-skip-mounting-tmp-if-it-is-a-symlink.patch
|
||||
man-sd_journal_next-fix-argument-in-example.patch
|
||||
man-sd_journal_get_data-fix-variable-naming-in-examp.patch
|
||||
hwdb-Update-database-of-Bluetooth-company-identi-495.patch
|
||||
hwdb-update-496.patch
|
||||
units-conditionalize-static-device-node-logic-on-CAP.patch
|
||||
units-conditionalize-configfs-and-debugfs-with-CAP_S.patch
|
||||
machine-don-t-return-uninitialized-variable.patch
|
||||
vconsole-setup-run-setfont-before-loadkeys.patch
|
||||
vconsole-setup-fix-inverted-error-messages.patch
|
||||
util-consider-0x7F-a-control-chracter-which-it-is-DE.patch
|
||||
service-flush-status-text-and-errno-values-each-time.patch
|
||||
accelerometer-Don-t-wait-for-new-data-from-the-senso.patch
|
||||
journal-compress-simplify-compress_blob.patch
|
||||
journal-compress-add-stream-compression-decompressio.patch
|
||||
journal-compress-improve-xz-compression-performance.patch
|
||||
hostnamed-add-a-new-chassis-type-for-watches.patch
|
||||
hostnamed-update-documentation-with-new-watch-chassi.patch
|
||||
units-make-ExecStopPost-action-part-of-ExecStart.patch
|
||||
shell-completion-man-beef-up-chassis-completions-and.patch
|
||||
rules-consistently-use-instead-of.patch
|
||||
rules-uaccess-add-ID_SOFTWARE_RADIO.patch
|
||||
journal-allow-files-with-no-data-whatsoever.patch
|
||||
units-serial-getty-.service-use-the-default-RestartS.patch
|
||||
build-sys-don-t-move-libgudev-to-lib.patch
|
||||
core-nicer-message-when-inotify-watches-are-exhauste.patch
|
||||
journal-reduce-test-journal-send-timeout-from-10s-to.patch
|
||||
socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch
|
||||
analyze-fix-crash-on-invalid-commandline.patch
|
||||
|
||||
## Cherry-picked from trunk
|
||||
## Cherry-picked from trunk:
|
||||
build-sys-use-glibc-s-xattr-support-instead-of-requi.patch
|
||||
logind-revert-lazy-session-activation.patch
|
||||
login-revert-lazy-session-activation-on-non-VT-seats.patch
|
||||
|
||||
## Debian specific patches:
|
||||
Add-back-support-for-Debian-specific-config-files.patch
|
||||
@ -505,7 +548,6 @@ Revert-udev-network-device-renaming-immediately-give.patch
|
||||
udev-hwdb-Store-binary-database-in-libdir-not-in-etc.patch
|
||||
Make-99-systemd.rules-check-for-run-systemd-systemd-.patch
|
||||
Make-net.ifnames-opt-in-instead-of-opt-out.patch
|
||||
Don-t-move-libgudev-to-lib.patch
|
||||
Use-different-default-paths-for-various-binaries.patch
|
||||
Use-comment-systemd.-syntax-in-systemd.mount-man-pag.patch
|
||||
Avoid-reloading-services-when-shutting-down.patch
|
||||
@ -524,7 +566,6 @@ more-cd-aliases.patch
|
||||
Check-for-kmod-binary.patch
|
||||
Adjust-systemd-user-pam-config-file-for-Debian.patch
|
||||
Add-run-initctl-support-to-SysV-compat-tools.patch
|
||||
core-transaction-fix-cycle-break-attempts-outside-tr.patch
|
||||
tmpfiles-don-t-allow-read-access-to-journal-files-to.patch
|
||||
Map-rcS.d-init-script-dependencies-to-their-systemd-.patch
|
||||
Add-support-for-TuxOnIce-hibernation.patch
|
||||
|
||||
27
debian/patches/service-flush-status-text-and-errno-values-each-time.patch
vendored
Normal file
27
debian/patches/service-flush-status-text-and-errno-values-each-time.patch
vendored
Normal file
@ -0,0 +1,27 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 7 Jul 2014 17:33:46 +0200
|
||||
Subject: service: flush status text and errno values each time a service is
|
||||
started
|
||||
|
||||
We shouldn't show status texts from previous service starts
|
||||
|
||||
(cherry picked from commit 8cfdb077b8e3da1c47fc1d735d051f21f33144c1)
|
||||
(cherry picked from commit 853896f09d35f8c2db3bf25376d1c3ab240287ed)
|
||||
---
|
||||
src/core/service.c | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/src/core/service.c b/src/core/service.c
|
||||
index 9fd58fa..c616fbe 100644
|
||||
--- a/src/core/service.c
|
||||
+++ b/src/core/service.c
|
||||
@@ -2575,6 +2575,9 @@ static int service_start(Unit *u) {
|
||||
s->main_pid_alien = false;
|
||||
s->forbid_restart = false;
|
||||
|
||||
+ free(s->status_text);
|
||||
+ s->status_text = NULL;
|
||||
+
|
||||
service_enter_start_pre(s);
|
||||
return 0;
|
||||
}
|
||||
223
debian/patches/shell-completion-man-beef-up-chassis-completions-and.patch
vendored
Normal file
223
debian/patches/shell-completion-man-beef-up-chassis-completions-and.patch
vendored
Normal file
@ -0,0 +1,223 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 11 Jul 2014 08:25:20 -0400
|
||||
Subject: shell-completion,man: beef up chassis completions and description
|
||||
|
||||
Parameters to hostnamectl command are not optional and should not be marked
|
||||
as such in the man page.
|
||||
|
||||
(cherry picked from commit 1ed774956406941d4812a3fb4493d2915f130f12)
|
||||
(cherry picked from commit ba838f7f9b3de1777f3528c0fe211f9bedbd2a8b)
|
||||
---
|
||||
man/hostnamectl.xml | 73 +++++++++++++++++++++------------------
|
||||
shell-completion/bash/hostnamectl | 3 ++
|
||||
shell-completion/zsh/_hostnamectl | 32 +++++++++++++++--
|
||||
shell-completion/zsh/_localectl | 4 +--
|
||||
4 files changed, 75 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/man/hostnamectl.xml b/man/hostnamectl.xml
|
||||
index f3038b3..b4aa43d 100644
|
||||
--- a/man/hostnamectl.xml
|
||||
+++ b/man/hostnamectl.xml
|
||||
@@ -172,13 +172,14 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
- <term><command>set-hostname [NAME]</command></term>
|
||||
+ <term><command>set-hostname <replaceable>NAME</replaceable></command></term>
|
||||
|
||||
<listitem><para>Set the system
|
||||
- hostname. By default, this will alter
|
||||
- the pretty, the static, and the
|
||||
- transient hostname alike; however, if
|
||||
- one or more of
|
||||
+ hostname to
|
||||
+ <replaceable>NAME</replaceable>. By
|
||||
+ default, this will alter the pretty,
|
||||
+ the static, and the transient hostname
|
||||
+ alike; however, if one or more of
|
||||
<option>--static</option>,
|
||||
<option>--transient</option>,
|
||||
<option>--pretty</option> are used,
|
||||
@@ -199,55 +200,61 @@
|
||||
the hostname string is not done if
|
||||
only the transient and/or static host
|
||||
names are set, and the pretty host
|
||||
- name is left untouched. Pass the empty
|
||||
- string <literal></literal> as the
|
||||
- hostname to reset the selected
|
||||
- hostnames to their default (usually
|
||||
+ name is left untouched.</para>
|
||||
+
|
||||
+ <para>Pass the empty string
|
||||
+ <literal></literal> as the hostname to
|
||||
+ reset the selected hostnames to their
|
||||
+ default (usually
|
||||
<literal>localhost</literal>).</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
- <term><command>set-icon-name [NAME]</command></term>
|
||||
+ <term><command>set-icon-name <replaceable>NAME</replaceable></command></term>
|
||||
|
||||
<listitem><para>Set the system icon
|
||||
- name. The icon name is used by some
|
||||
- graphical applications to visualize
|
||||
- this host. The icon name should follow
|
||||
- the <ulink
|
||||
+ name to
|
||||
+ <replaceable>NAME</replaceable>. The
|
||||
+ icon name is used by some graphical
|
||||
+ applications to visualize this host.
|
||||
+ The icon name should follow the <ulink
|
||||
url="http://standards.freedesktop.org/icon-naming-spec/icon-naming-spec-latest.html">Icon
|
||||
- Naming Specification</ulink>. Pass an
|
||||
- empty string to this operation to
|
||||
- reset the icon name to the default
|
||||
- value, which is determined from chassis
|
||||
- type (see below) and possibly other
|
||||
+ Naming Specification</ulink>.</para>
|
||||
+
|
||||
+ <para>Pass an empty string to reset
|
||||
+ the icon name to the default value,
|
||||
+ which is determined from chassis type
|
||||
+ (see below) and possibly other
|
||||
parameters.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
- <term><command>set-chassis [TYPE]</command></term>
|
||||
+ <term><command>set-chassis <replaceable>TYPE</replaceable></command></term>
|
||||
|
||||
- <listitem><para>Set the chassis
|
||||
- type. The chassis type is used by some
|
||||
+ <listitem><para>Set the chassis type
|
||||
+ to <replaceable>TYPE</replaceable>.
|
||||
+ The chassis type is used by some
|
||||
graphical applications to visualize
|
||||
- the host or alter user
|
||||
- interaction. Currently, the following
|
||||
- chassis types are defined:
|
||||
+ the host or alter user interaction.
|
||||
+ Currently, the following chassis types
|
||||
+ are defined:
|
||||
<literal>desktop</literal>,
|
||||
<literal>laptop</literal>,
|
||||
<literal>server</literal>,
|
||||
<literal>tablet</literal>,
|
||||
- <literal>handset</literal>,
|
||||
- <literal>watch</literal>, as well as
|
||||
+ <literal>handset</literal>,
|
||||
+ <literal>watch</literal>, as well as
|
||||
the special chassis types
|
||||
<literal>vm</literal> and
|
||||
<literal>container</literal> for
|
||||
virtualized systems that lack an
|
||||
- immediate physical chassis. Pass an
|
||||
- empty string to this operation to
|
||||
- reset the chassis type to the default
|
||||
- value which is determined from the
|
||||
- firmware and possibly other
|
||||
- parameters.</para></listitem>
|
||||
+ immediate physical chassis.</para>
|
||||
+
|
||||
+ <para>Pass an empty string to reset
|
||||
+ the chassis type to the default value
|
||||
+ which is determined from the firmware
|
||||
+ and possibly other parameters.</para>
|
||||
+ </listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
diff --git a/shell-completion/bash/hostnamectl b/shell-completion/bash/hostnamectl
|
||||
index 9c75da9..22f8f06 100644
|
||||
--- a/shell-completion/bash/hostnamectl
|
||||
+++ b/shell-completion/bash/hostnamectl
|
||||
@@ -39,6 +39,7 @@ _hostnamectl() {
|
||||
[STANDALONE]='status'
|
||||
[ICONS]='set-icon-name'
|
||||
[NAME]='set-hostname'
|
||||
+ [CHASSIS]='set-chassis'
|
||||
)
|
||||
|
||||
for ((i=0; i < COMP_CWORD; i++)); do
|
||||
@@ -50,6 +51,8 @@ _hostnamectl() {
|
||||
|
||||
if [[ -z $verb ]]; then
|
||||
comps=${VERBS[*]}
|
||||
+ elif __contains_word "$verb" ${VERBS[CHASSIS]}; then
|
||||
+ comps='desktop laptop server tablet handset watch vm container'
|
||||
elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[ICONS]} ${VERBS[NAME]}; then
|
||||
comps=''
|
||||
fi
|
||||
diff --git a/shell-completion/zsh/_hostnamectl b/shell-completion/zsh/_hostnamectl
|
||||
index 45b9597..52945d8 100644
|
||||
--- a/shell-completion/zsh/_hostnamectl
|
||||
+++ b/shell-completion/zsh/_hostnamectl
|
||||
@@ -1,5 +1,30 @@
|
||||
#compdef hostnamectl
|
||||
|
||||
+_hostnamectl_set-hostname() {
|
||||
+ if (( CURRENT <= 3 )); then
|
||||
+ _message "new hostname"
|
||||
+ else
|
||||
+ _message "no more options"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+_hostnamectl_set-icon-name() {
|
||||
+ if (( CURRENT <= 3 )); then
|
||||
+ _message "new icon name"
|
||||
+ else
|
||||
+ _message "no more options"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
+_hostnamectl_set-chassis() {
|
||||
+ if (( CURRENT <= 3 )); then
|
||||
+ _chassis=( desktop laptop server tablet handset watch vm container )
|
||||
+ _describe chassis _chassis
|
||||
+ else
|
||||
+ _message "no more options"
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
_hostnamectl_command() {
|
||||
local -a _hostnamectl_cmds
|
||||
_hostnamectl_cmds=(
|
||||
@@ -13,8 +38,11 @@ _hostnamectl_command() {
|
||||
local curcontext="$curcontext"
|
||||
cmd="${${_hostnamectl_cmds[(r)$words[1]:*]%%:*}}"
|
||||
if (( $#cmd )); then
|
||||
- [[ $cmd == status ]] && msg="no options" || msg="options for $cmd"
|
||||
- _message "$msg"
|
||||
+ if [[ $cmd == status ]]; then
|
||||
+ _message "no options"
|
||||
+ else
|
||||
+ _hostnamectl_$cmd
|
||||
+ fi
|
||||
else
|
||||
_message "unknown hostnamectl command: $words[1]"
|
||||
fi
|
||||
diff --git a/shell-completion/zsh/_localectl b/shell-completion/zsh/_localectl
|
||||
index c04f4f3..7756eb9 100644
|
||||
--- a/shell-completion/zsh/_localectl
|
||||
+++ b/shell-completion/zsh/_localectl
|
||||
@@ -22,8 +22,8 @@ _localectl_set-locale() {
|
||||
|
||||
_localectl_set-keymap() {
|
||||
local -a _keymaps
|
||||
- _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
|
||||
if (( CURRENT <= 3 )); then
|
||||
+ _keymaps=( ${(f)"$(_call_program locales "$service" list-keymaps)"} )
|
||||
_describe keymaps _keymaps
|
||||
else
|
||||
_message "no more options"
|
||||
@@ -73,7 +73,7 @@ _localectl_command() {
|
||||
if (( $+functions[_localectl_$cmd] )); then
|
||||
_localectl_$cmd
|
||||
else
|
||||
- _message "no more options"
|
||||
+ _message "unknown localectl command: $words[1]"
|
||||
fi
|
||||
fi
|
||||
}
|
||||
583
debian/patches/socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch
vendored
Normal file
583
debian/patches/socket-add-SocketUser-and-SocketGroup-for-chown-ing-.patch
vendored
Normal file
@ -0,0 +1,583 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Thu, 5 Jun 2014 09:55:53 +0200
|
||||
Subject: socket: add SocketUser= and SocketGroup= for chown()ing sockets in
|
||||
the file system
|
||||
|
||||
This is relatively complex, as we cannot invoke NSS from PID 1, and thus
|
||||
need to fork a helper process temporarily.
|
||||
|
||||
(cherry picked from commit 3900e5fdff688dc3c273f177d9d913b7389d5561)
|
||||
|
||||
Conflicts:
|
||||
src/core/dbus-socket.c
|
||||
src/core/socket.c
|
||||
src/shared/exit-status.c
|
||||
src/shared/exit-status.h
|
||||
---
|
||||
man/systemd.socket.xml | 38 ++++--
|
||||
src/core/dbus-socket.c | 4 +-
|
||||
src/core/load-fragment-gperf.gperf.m4 | 4 +-
|
||||
src/core/socket.c | 224 +++++++++++++++++++++++++++-------
|
||||
src/core/socket.h | 4 +
|
||||
src/shared/exit-status.c | 3 +
|
||||
src/shared/exit-status.h | 3 +-
|
||||
7 files changed, 222 insertions(+), 58 deletions(-)
|
||||
|
||||
diff --git a/man/systemd.socket.xml b/man/systemd.socket.xml
|
||||
index 67267b2..d0c2595 100644
|
||||
--- a/man/systemd.socket.xml
|
||||
+++ b/man/systemd.socket.xml
|
||||
@@ -372,16 +372,21 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
- <term><varname>DirectoryMode=</varname></term>
|
||||
- <listitem><para>If listening on a file
|
||||
- system socket or FIFO, the parent
|
||||
- directories are automatically created
|
||||
- if needed. This option specifies the
|
||||
- file system access mode used when
|
||||
- creating these directories. Takes an
|
||||
- access mode in octal
|
||||
- notation. Defaults to
|
||||
- 0755.</para></listitem>
|
||||
+ <term><varname>SocketUser=</varname></term>
|
||||
+ <term><varname>SocketGroup=</varname></term>
|
||||
+
|
||||
+ <listitem><para>Takes a UNIX
|
||||
+ user/group name. When specified
|
||||
+ all AF_UNIX sockets and FIFO nodes in
|
||||
+ the file system are owned by the
|
||||
+ specified user and group. If unset
|
||||
+ (the default), the nodes are owned by
|
||||
+ the root user/group (if run in system
|
||||
+ context) or the invoking user/group
|
||||
+ (if run in user context). If only a
|
||||
+ user is specified but no group, then
|
||||
+ the group is derived from the user's
|
||||
+ default group.</para></listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
@@ -396,6 +401,19 @@
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
+ <term><varname>DirectoryMode=</varname></term>
|
||||
+ <listitem><para>If listening on a file
|
||||
+ system socket or FIFO, the parent
|
||||
+ directories are automatically created
|
||||
+ if needed. This option specifies the
|
||||
+ file system access mode used when
|
||||
+ creating these directories. Takes an
|
||||
+ access mode in octal
|
||||
+ notation. Defaults to
|
||||
+ 0755.</para></listitem>
|
||||
+ </varlistentry>
|
||||
+
|
||||
+ <varlistentry>
|
||||
<term><varname>Accept=</varname></term>
|
||||
<listitem><para>Takes a boolean
|
||||
argument. If true, a service instance
|
||||
diff --git a/src/core/dbus-socket.c b/src/core/dbus-socket.c
|
||||
index 30c4b63..d6743da 100644
|
||||
--- a/src/core/dbus-socket.c
|
||||
+++ b/src/core/dbus-socket.c
|
||||
@@ -172,8 +172,10 @@ static const BusProperty bus_socket_properties[] = {
|
||||
BUS_EXEC_COMMAND_PROPERTY("ExecStopPost", offsetof(Socket, exec_command[SOCKET_EXEC_STOP_POST]), true ),
|
||||
{ "ControlPID", bus_property_append_pid, "u", offsetof(Socket, control_pid) },
|
||||
{ "BindToDevice", bus_property_append_string, "s", offsetof(Socket, bind_to_device), true },
|
||||
- { "DirectoryMode", bus_property_append_mode, "u", offsetof(Socket, directory_mode) },
|
||||
+ { "SocketUser", bus_property_append_string, "s", offsetof(Socket, user), true },
|
||||
+ { "SocketGroup", bus_property_append_string, "s", offsetof(Socket, group), true },
|
||||
{ "SocketMode", bus_property_append_mode, "u", offsetof(Socket, socket_mode) },
|
||||
+ { "DirectoryMode", bus_property_append_mode, "u", offsetof(Socket, directory_mode) },
|
||||
{ "Accept", bus_property_append_bool, "b", offsetof(Socket, accept) },
|
||||
{ "KeepAlive", bus_property_append_bool, "b", offsetof(Socket, keep_alive) },
|
||||
{ "Priority", bus_property_append_int, "i", offsetof(Socket, priority) },
|
||||
diff --git a/src/core/load-fragment-gperf.gperf.m4 b/src/core/load-fragment-gperf.gperf.m4
|
||||
index d65bcc1..0991cb9 100644
|
||||
--- a/src/core/load-fragment-gperf.gperf.m4
|
||||
+++ b/src/core/load-fragment-gperf.gperf.m4
|
||||
@@ -193,8 +193,10 @@ Socket.ExecStartPost, config_parse_exec, SOCKET_EXEC
|
||||
Socket.ExecStopPre, config_parse_exec, SOCKET_EXEC_STOP_PRE, offsetof(Socket, exec_command)
|
||||
Socket.ExecStopPost, config_parse_exec, SOCKET_EXEC_STOP_POST, offsetof(Socket, exec_command)
|
||||
Socket.TimeoutSec, config_parse_sec, 0, offsetof(Socket, timeout_usec)
|
||||
-Socket.DirectoryMode, config_parse_mode, 0, offsetof(Socket, directory_mode)
|
||||
+Socket.SocketUser, config_parse_unit_string_printf, 0, offsetof(Socket, user)
|
||||
+Socket.SocketGroup, config_parse_unit_string_printf, 0, offsetof(Socket, group)
|
||||
Socket.SocketMode, config_parse_mode, 0, offsetof(Socket, socket_mode)
|
||||
+Socket.DirectoryMode, config_parse_mode, 0, offsetof(Socket, directory_mode)
|
||||
Socket.Accept, config_parse_bool, 0, offsetof(Socket, accept)
|
||||
Socket.MaxConnections, config_parse_unsigned, 0, offsetof(Socket, max_connections)
|
||||
Socket.KeepAlive, config_parse_bool, 0, offsetof(Socket, keep_alive)
|
||||
diff --git a/src/core/socket.c b/src/core/socket.c
|
||||
index 8e02c03..1bf1f05 100644
|
||||
--- a/src/core/socket.c
|
||||
+++ b/src/core/socket.c
|
||||
@@ -54,6 +54,7 @@
|
||||
static const UnitActiveState state_translation_table[_SOCKET_STATE_MAX] = {
|
||||
[SOCKET_DEAD] = UNIT_INACTIVE,
|
||||
[SOCKET_START_PRE] = UNIT_ACTIVATING,
|
||||
+ [SOCKET_START_CHOWN] = UNIT_ACTIVATING,
|
||||
[SOCKET_START_POST] = UNIT_ACTIVATING,
|
||||
[SOCKET_LISTENING] = UNIT_ACTIVE,
|
||||
[SOCKET_RUNNING] = UNIT_ACTIVE,
|
||||
@@ -149,6 +150,9 @@ static void socket_done(Unit *u) {
|
||||
free(s->smack_ip_out);
|
||||
|
||||
unit_unwatch_timer(u, &s->timer_watch);
|
||||
+
|
||||
+ free(s->user);
|
||||
+ free(s->group);
|
||||
}
|
||||
|
||||
static int socket_instantiate_service(Socket *s) {
|
||||
@@ -527,6 +531,13 @@ static void socket_dump(Unit *u, FILE *f, const char *prefix) {
|
||||
"%sSmackLabelIPOut: %s\n",
|
||||
prefix, s->smack_ip_out);
|
||||
|
||||
+ if (!isempty(s->user) || !isempty(s->group))
|
||||
+ fprintf(f,
|
||||
+ "%sOwnerUser: %s\n"
|
||||
+ "%sOwnerGroup: %s\n",
|
||||
+ prefix, strna(s->user),
|
||||
+ prefix, strna(s->group));
|
||||
+
|
||||
LIST_FOREACH(port, p, s->ports) {
|
||||
|
||||
if (p->type == SOCKET_SOCKET) {
|
||||
@@ -1093,6 +1104,7 @@ static void socket_set_state(Socket *s, SocketState state) {
|
||||
s->state = state;
|
||||
|
||||
if (state != SOCKET_START_PRE &&
|
||||
+ state != SOCKET_START_CHOWN &&
|
||||
state != SOCKET_START_POST &&
|
||||
state != SOCKET_STOP_PRE &&
|
||||
state != SOCKET_STOP_PRE_SIGTERM &&
|
||||
@@ -1109,7 +1121,8 @@ static void socket_set_state(Socket *s, SocketState state) {
|
||||
if (state != SOCKET_LISTENING)
|
||||
socket_unwatch_fds(s);
|
||||
|
||||
- if (state != SOCKET_START_POST &&
|
||||
+ if (state != SOCKET_START_CHOWN &&
|
||||
+ state != SOCKET_START_POST &&
|
||||
state != SOCKET_LISTENING &&
|
||||
state != SOCKET_RUNNING &&
|
||||
state != SOCKET_STOP_PRE &&
|
||||
@@ -1136,6 +1149,7 @@ static int socket_coldplug(Unit *u) {
|
||||
if (s->deserialized_state != s->state) {
|
||||
|
||||
if (s->deserialized_state == SOCKET_START_PRE ||
|
||||
+ s->deserialized_state == SOCKET_START_CHOWN ||
|
||||
s->deserialized_state == SOCKET_START_POST ||
|
||||
s->deserialized_state == SOCKET_STOP_PRE ||
|
||||
s->deserialized_state == SOCKET_STOP_PRE_SIGTERM ||
|
||||
@@ -1156,7 +1170,8 @@ static int socket_coldplug(Unit *u) {
|
||||
return r;
|
||||
}
|
||||
|
||||
- if (s->deserialized_state == SOCKET_START_POST ||
|
||||
+ if (s->deserialized_state == SOCKET_START_CHOWN ||
|
||||
+ s->deserialized_state == SOCKET_START_POST ||
|
||||
s->deserialized_state == SOCKET_LISTENING ||
|
||||
s->deserialized_state == SOCKET_RUNNING ||
|
||||
s->deserialized_state == SOCKET_STOP_PRE ||
|
||||
@@ -1176,9 +1191,9 @@ static int socket_coldplug(Unit *u) {
|
||||
}
|
||||
|
||||
static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
|
||||
+ _cleanup_free_ char **argv = NULL;
|
||||
pid_t pid;
|
||||
int r;
|
||||
- char **argv;
|
||||
|
||||
assert(s);
|
||||
assert(c);
|
||||
@@ -1211,21 +1226,95 @@ static int socket_spawn(Socket *s, ExecCommand *c, pid_t *_pid) {
|
||||
if (r < 0)
|
||||
goto fail;
|
||||
|
||||
- strv_free(argv);
|
||||
+ r = unit_watch_pid(UNIT(s), pid);
|
||||
if (r < 0)
|
||||
- goto fail;
|
||||
-
|
||||
- if ((r = unit_watch_pid(UNIT(s), pid)) < 0)
|
||||
/* FIXME: we need to do something here */
|
||||
goto fail;
|
||||
|
||||
*_pid = pid;
|
||||
-
|
||||
return 0;
|
||||
|
||||
fail:
|
||||
unit_unwatch_timer(UNIT(s), &s->timer_watch);
|
||||
+ return r;
|
||||
+}
|
||||
+
|
||||
+static int socket_chown(Socket *s, pid_t *_pid) {
|
||||
+ pid_t pid;
|
||||
+ int r;
|
||||
+
|
||||
+ /* We have to resolve the user names out-of-process, hence
|
||||
+ * let's fork here. It's messy, but well, what can we do? */
|
||||
+
|
||||
+ pid = fork();
|
||||
+ if (pid < 0)
|
||||
+ return -errno;
|
||||
+
|
||||
+ if (pid == 0) {
|
||||
+ SocketPort *p;
|
||||
+ uid_t uid = (uid_t) -1;
|
||||
+ gid_t gid = (gid_t) -1;
|
||||
+ int ret;
|
||||
+
|
||||
+ default_signals(SIGNALS_CRASH_HANDLER, SIGNALS_IGNORE, -1);
|
||||
+ ignore_signals(SIGPIPE, -1);
|
||||
+ log_forget_fds();
|
||||
+
|
||||
+ if (!isempty(s->user)) {
|
||||
+ const char *user = s->user;
|
||||
+
|
||||
+ r = get_user_creds(&user, &uid, &gid, NULL, NULL);
|
||||
+ if (r < 0) {
|
||||
+ ret = EXIT_USER;
|
||||
+ goto fail_child;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ if (!isempty(s->group)) {
|
||||
+ const char *group = s->group;
|
||||
|
||||
+ r = get_group_creds(&group, &gid);
|
||||
+ if (r < 0) {
|
||||
+ ret = EXIT_GROUP;
|
||||
+ goto fail_child;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ LIST_FOREACH(port, p, s->ports) {
|
||||
+ const char *path;
|
||||
+
|
||||
+ if (p->type == SOCKET_SOCKET)
|
||||
+ path = socket_address_get_path(&p->address);
|
||||
+ else if (p->type == SOCKET_FIFO)
|
||||
+ path = p->path;
|
||||
+
|
||||
+ if (!path)
|
||||
+ continue;
|
||||
+
|
||||
+ if (chown(path, uid, gid) < 0) {
|
||||
+ r = -errno;
|
||||
+ ret = EXIT_CHOWN;
|
||||
+ goto fail_child;
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ _exit(0);
|
||||
+
|
||||
+ fail_child:
|
||||
+ log_open();
|
||||
+ log_error("Failed to chown socket at step %s: %s", exit_status_to_string(ret, EXIT_STATUS_SYSTEMD), strerror(-r));
|
||||
+
|
||||
+ _exit(ret);
|
||||
+ }
|
||||
+
|
||||
+ r = unit_watch_pid(UNIT(s), pid);
|
||||
+ if (r < 0)
|
||||
+ goto fail;
|
||||
+
|
||||
+ *_pid = pid;
|
||||
+ return 0;
|
||||
+
|
||||
+fail:
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -1249,11 +1338,12 @@ static void socket_enter_stop_post(Socket *s, SocketResult f) {
|
||||
s->result = f;
|
||||
|
||||
socket_unwatch_control_pid(s);
|
||||
-
|
||||
s->control_command_id = SOCKET_EXEC_STOP_POST;
|
||||
+ s->control_command = s->exec_command[SOCKET_EXEC_STOP_POST];
|
||||
|
||||
- if ((s->control_command = s->exec_command[SOCKET_EXEC_STOP_POST])) {
|
||||
- if ((r = socket_spawn(s, s->control_command, &s->control_pid)) < 0)
|
||||
+ if (s->control_command) {
|
||||
+ r = socket_spawn(s, s->control_command, &s->control_pid);
|
||||
+ if (r < 0)
|
||||
goto fail;
|
||||
|
||||
socket_set_state(s, SOCKET_STOP_POST);
|
||||
@@ -1319,11 +1409,12 @@ static void socket_enter_stop_pre(Socket *s, SocketResult f) {
|
||||
s->result = f;
|
||||
|
||||
socket_unwatch_control_pid(s);
|
||||
-
|
||||
s->control_command_id = SOCKET_EXEC_STOP_PRE;
|
||||
+ s->control_command = s->exec_command[SOCKET_EXEC_STOP_PRE];
|
||||
|
||||
- if ((s->control_command = s->exec_command[SOCKET_EXEC_STOP_PRE])) {
|
||||
- if ((r = socket_spawn(s, s->control_command, &s->control_pid)) < 0)
|
||||
+ if (s->control_command) {
|
||||
+ r = socket_spawn(s, s->control_command, &s->control_pid);
|
||||
+ if (r < 0)
|
||||
goto fail;
|
||||
|
||||
socket_set_state(s, SOCKET_STOP_PRE);
|
||||
@@ -1362,6 +1453,32 @@ static void socket_enter_start_post(Socket *s) {
|
||||
int r;
|
||||
assert(s);
|
||||
|
||||
+ socket_unwatch_control_pid(s);
|
||||
+ s->control_command_id = SOCKET_EXEC_START_POST;
|
||||
+ s->control_command = s->exec_command[SOCKET_EXEC_START_POST];
|
||||
+
|
||||
+ if (s->control_command) {
|
||||
+ r = socket_spawn(s, s->control_command, &s->control_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_warning_unit(UNIT(s)->id, "%s failed to run 'start-post' task: %s", UNIT(s)->id, strerror(-r));
|
||||
+ goto fail;
|
||||
+ }
|
||||
+
|
||||
+ socket_set_state(s, SOCKET_START_POST);
|
||||
+ } else
|
||||
+ socket_enter_listening(s);
|
||||
+
|
||||
+ return;
|
||||
+
|
||||
+fail:
|
||||
+ socket_enter_stop_pre(s, SOCKET_FAILURE_RESOURCES);
|
||||
+}
|
||||
+
|
||||
+static void socket_enter_start_chown(Socket *s) {
|
||||
+ int r;
|
||||
+
|
||||
+ assert(s);
|
||||
+
|
||||
r = socket_open_fds(s);
|
||||
if (r < 0) {
|
||||
log_warning_unit(UNIT(s)->id,
|
||||
@@ -1370,22 +1487,23 @@ static void socket_enter_start_post(Socket *s) {
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- socket_unwatch_control_pid(s);
|
||||
+ if (!isempty(s->user) || !isempty(s->group)) {
|
||||
|
||||
- s->control_command_id = SOCKET_EXEC_START_POST;
|
||||
+ socket_unwatch_control_pid(s);
|
||||
+ s->control_command_id = SOCKET_EXEC_START_CHOWN;
|
||||
+ s->control_command = NULL;
|
||||
|
||||
- if ((s->control_command = s->exec_command[SOCKET_EXEC_START_POST])) {
|
||||
- r = socket_spawn(s, s->control_command, &s->control_pid);
|
||||
+ r = socket_chown(s, &s->control_pid);
|
||||
if (r < 0) {
|
||||
log_warning_unit(UNIT(s)->id,
|
||||
- "%s failed to run 'start-post' task: %s",
|
||||
+ "%s failed to fork 'start-chown' task: %s",
|
||||
UNIT(s)->id, strerror(-r));
|
||||
goto fail;
|
||||
}
|
||||
|
||||
- socket_set_state(s, SOCKET_START_POST);
|
||||
+ socket_set_state(s, SOCKET_START_CHOWN);
|
||||
} else
|
||||
- socket_enter_listening(s);
|
||||
+ socket_enter_start_post(s);
|
||||
|
||||
return;
|
||||
|
||||
@@ -1398,23 +1516,23 @@ static void socket_enter_start_pre(Socket *s) {
|
||||
assert(s);
|
||||
|
||||
socket_unwatch_control_pid(s);
|
||||
-
|
||||
s->control_command_id = SOCKET_EXEC_START_PRE;
|
||||
+ s->control_command = s->exec_command[SOCKET_EXEC_START_PRE];
|
||||
|
||||
- if ((s->control_command = s->exec_command[SOCKET_EXEC_START_PRE])) {
|
||||
- if ((r = socket_spawn(s, s->control_command, &s->control_pid)) < 0)
|
||||
+ if (s->control_command) {
|
||||
+ r = socket_spawn(s, s->control_command, &s->control_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_warning_unit(UNIT(s)->id, "%s failed to run 'start-pre' task: %s", UNIT(s)->id, strerror(-r));
|
||||
goto fail;
|
||||
+ }
|
||||
|
||||
socket_set_state(s, SOCKET_START_PRE);
|
||||
} else
|
||||
- socket_enter_start_post(s);
|
||||
+ socket_enter_start_chown(s);
|
||||
|
||||
return;
|
||||
|
||||
fail:
|
||||
- log_warning_unit(UNIT(s)->id,
|
||||
- "%s failed to run 'start-pre' task: %s",
|
||||
- UNIT(s)->id, strerror(-r));
|
||||
socket_enter_dead(s, SOCKET_FAILURE_RESOURCES);
|
||||
}
|
||||
|
||||
@@ -1600,16 +1718,19 @@ static int socket_start(Unit *u) {
|
||||
|
||||
/* We cannot fulfill this request right now, try again later
|
||||
* please! */
|
||||
- if (s->state == SOCKET_STOP_PRE ||
|
||||
- s->state == SOCKET_STOP_PRE_SIGKILL ||
|
||||
- s->state == SOCKET_STOP_PRE_SIGTERM ||
|
||||
- s->state == SOCKET_STOP_POST ||
|
||||
- s->state == SOCKET_FINAL_SIGTERM ||
|
||||
- s->state == SOCKET_FINAL_SIGKILL)
|
||||
+ if (IN_SET(s->state,
|
||||
+ SOCKET_STOP_PRE,
|
||||
+ SOCKET_STOP_PRE_SIGKILL,
|
||||
+ SOCKET_STOP_PRE_SIGTERM,
|
||||
+ SOCKET_STOP_POST,
|
||||
+ SOCKET_FINAL_SIGTERM,
|
||||
+ SOCKET_FINAL_SIGKILL))
|
||||
return -EAGAIN;
|
||||
|
||||
- if (s->state == SOCKET_START_PRE ||
|
||||
- s->state == SOCKET_START_POST)
|
||||
+ if (IN_SET(s->state,
|
||||
+ SOCKET_START_PRE,
|
||||
+ SOCKET_START_CHOWN,
|
||||
+ SOCKET_START_POST))
|
||||
return 0;
|
||||
|
||||
/* Cannot run this without the service being around */
|
||||
@@ -1658,18 +1779,21 @@ static int socket_stop(Unit *u) {
|
||||
assert(s);
|
||||
|
||||
/* Already on it */
|
||||
- if (s->state == SOCKET_STOP_PRE ||
|
||||
- s->state == SOCKET_STOP_PRE_SIGTERM ||
|
||||
- s->state == SOCKET_STOP_PRE_SIGKILL ||
|
||||
- s->state == SOCKET_STOP_POST ||
|
||||
- s->state == SOCKET_FINAL_SIGTERM ||
|
||||
- s->state == SOCKET_FINAL_SIGKILL)
|
||||
+ if (IN_SET(s->state,
|
||||
+ SOCKET_STOP_PRE,
|
||||
+ SOCKET_STOP_PRE_SIGTERM,
|
||||
+ SOCKET_STOP_PRE_SIGKILL,
|
||||
+ SOCKET_STOP_POST,
|
||||
+ SOCKET_FINAL_SIGTERM,
|
||||
+ SOCKET_FINAL_SIGKILL))
|
||||
return 0;
|
||||
|
||||
/* If there's already something running we go directly into
|
||||
* kill mode. */
|
||||
- if (s->state == SOCKET_START_PRE ||
|
||||
- s->state == SOCKET_START_POST) {
|
||||
+ if (IN_SET(s->state,
|
||||
+ SOCKET_START_PRE,
|
||||
+ SOCKET_START_CHOWN,
|
||||
+ SOCKET_START_POST)) {
|
||||
socket_enter_signal(s, SOCKET_STOP_PRE_SIGTERM, SOCKET_SUCCESS);
|
||||
return -EAGAIN;
|
||||
}
|
||||
@@ -2093,11 +2217,18 @@ static void socket_sigchld_event(Unit *u, pid_t pid, int code, int status) {
|
||||
|
||||
case SOCKET_START_PRE:
|
||||
if (f == SOCKET_SUCCESS)
|
||||
- socket_enter_start_post(s);
|
||||
+ socket_enter_start_chown(s);
|
||||
else
|
||||
socket_enter_signal(s, SOCKET_FINAL_SIGTERM, f);
|
||||
break;
|
||||
|
||||
+ case SOCKET_START_CHOWN:
|
||||
+ if (f == SOCKET_SUCCESS)
|
||||
+ socket_enter_start_post(s);
|
||||
+ else
|
||||
+ socket_enter_stop_pre(s, f);
|
||||
+ break;
|
||||
+
|
||||
case SOCKET_START_POST:
|
||||
if (f == SOCKET_SUCCESS)
|
||||
socket_enter_listening(s);
|
||||
@@ -2141,6 +2272,7 @@ static void socket_timer_event(Unit *u, uint64_t elapsed, Watch *w) {
|
||||
socket_enter_signal(s, SOCKET_FINAL_SIGTERM, SOCKET_FAILURE_TIMEOUT);
|
||||
break;
|
||||
|
||||
+ case SOCKET_START_CHOWN:
|
||||
case SOCKET_START_POST:
|
||||
log_warning_unit(u->id,
|
||||
"%s starting timed out. Stopping.", u->id);
|
||||
@@ -2328,6 +2460,7 @@ static int socket_kill(Unit *u, KillWho who, int signo, DBusError *error) {
|
||||
static const char* const socket_state_table[_SOCKET_STATE_MAX] = {
|
||||
[SOCKET_DEAD] = "dead",
|
||||
[SOCKET_START_PRE] = "start-pre",
|
||||
+ [SOCKET_START_CHOWN] = "start-chown",
|
||||
[SOCKET_START_POST] = "start-post",
|
||||
[SOCKET_LISTENING] = "listening",
|
||||
[SOCKET_RUNNING] = "running",
|
||||
@@ -2344,6 +2477,7 @@ DEFINE_STRING_TABLE_LOOKUP(socket_state, SocketState);
|
||||
|
||||
static const char* const socket_exec_command_table[_SOCKET_EXEC_COMMAND_MAX] = {
|
||||
[SOCKET_EXEC_START_PRE] = "StartPre",
|
||||
+ [SOCKET_EXEC_START_CHOWN] = "StartChown",
|
||||
[SOCKET_EXEC_START_POST] = "StartPost",
|
||||
[SOCKET_EXEC_STOP_PRE] = "StopPre",
|
||||
[SOCKET_EXEC_STOP_POST] = "StopPost"
|
||||
diff --git a/src/core/socket.h b/src/core/socket.h
|
||||
index 3d7eadc..d87b483 100644
|
||||
--- a/src/core/socket.h
|
||||
+++ b/src/core/socket.h
|
||||
@@ -32,6 +32,7 @@ typedef struct Socket Socket;
|
||||
typedef enum SocketState {
|
||||
SOCKET_DEAD,
|
||||
SOCKET_START_PRE,
|
||||
+ SOCKET_START_CHOWN,
|
||||
SOCKET_START_POST,
|
||||
SOCKET_LISTENING,
|
||||
SOCKET_RUNNING,
|
||||
@@ -48,6 +49,7 @@ typedef enum SocketState {
|
||||
|
||||
typedef enum SocketExecCommand {
|
||||
SOCKET_EXEC_START_PRE,
|
||||
+ SOCKET_EXEC_START_CHOWN,
|
||||
SOCKET_EXEC_START_POST,
|
||||
SOCKET_EXEC_STOP_PRE,
|
||||
SOCKET_EXEC_STOP_POST,
|
||||
@@ -151,6 +153,8 @@ struct Socket {
|
||||
char *smack;
|
||||
char *smack_ip_in;
|
||||
char *smack_ip_out;
|
||||
+
|
||||
+ char *user, *group;
|
||||
};
|
||||
|
||||
/* Called from the service code when collecting fds */
|
||||
diff --git a/src/shared/exit-status.c b/src/shared/exit-status.c
|
||||
index 45131f2..92ac520 100644
|
||||
--- a/src/shared/exit-status.c
|
||||
+++ b/src/shared/exit-status.c
|
||||
@@ -130,6 +130,9 @@ const char* exit_status_to_string(ExitStatus status, ExitStatusLevel level) {
|
||||
|
||||
case EXIT_SECCOMP:
|
||||
return "SECCOMP";
|
||||
+
|
||||
+ case EXIT_CHOWN:
|
||||
+ return "CHOWN";
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/shared/exit-status.h b/src/shared/exit-status.h
|
||||
index 1f035a3..babef31 100644
|
||||
--- a/src/shared/exit-status.h
|
||||
+++ b/src/shared/exit-status.h
|
||||
@@ -67,7 +67,8 @@ typedef enum ExitStatus {
|
||||
EXIT_NETWORK,
|
||||
EXIT_NAMESPACE,
|
||||
EXIT_NO_NEW_PRIVILEGES,
|
||||
- EXIT_SECCOMP
|
||||
+ EXIT_SECCOMP,
|
||||
+ EXIT_CHOWN,
|
||||
} ExitStatus;
|
||||
|
||||
typedef enum ExitStatusLevel {
|
||||
@ -7,10 +7,10 @@ Subject: systemctl: call update-rc.d enable|disable, not defaults|remove
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index 863129d..a5a4d2b 100644
|
||||
index e3c2b19..42c1d13 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -4301,7 +4301,7 @@ static int enable_sysv_units(char **args) {
|
||||
@@ -4303,7 +4303,7 @@ static int enable_sysv_units(const char *verb, char **args) {
|
||||
log_info("Synchronizing state for %s with sysvinit using update-rc.d...", name);
|
||||
|
||||
argv[c++] = path_get_file_name(p);
|
||||
|
||||
@ -8,10 +8,10 @@ Subject: =?utf-8?q?systemctl=3A_don=E2=80=99t_skip_native_units_when_enabl?=
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
|
||||
index ea36b48..863129d 100644
|
||||
index ab92fc7..e3c2b19 100644
|
||||
--- a/src/systemctl/systemctl.c
|
||||
+++ b/src/systemctl/systemctl.c
|
||||
@@ -4293,8 +4293,10 @@ static int enable_sysv_units(char **args) {
|
||||
@@ -4295,8 +4295,10 @@ static int enable_sysv_units(const char *verb, char **args) {
|
||||
if (!found_sysv)
|
||||
continue;
|
||||
|
||||
|
||||
42
debian/patches/units-conditionalize-configfs-and-debugfs-with-CAP_S.patch
vendored
Normal file
42
debian/patches/units-conditionalize-configfs-and-debugfs-with-CAP_S.patch
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 4 Jul 2014 03:10:09 +0200
|
||||
Subject: units: conditionalize configfs and debugfs with CAP_SYS_RAWIO
|
||||
|
||||
We really don't want these in containers as they provide a too lowlevel
|
||||
look on the system.
|
||||
|
||||
Conditionalize them with CAP_SYS_RAWIO since that's required to access
|
||||
/proc/kcore, /dev/kmem and similar, which feel similar in style. Also,
|
||||
npsawn containers lack that capability.
|
||||
|
||||
(cherry picked from commit fa229d09281d435153b4cfd138a2a62fa66d889b)
|
||||
(cherry picked from commit b654a1065f278c93b3891cc5993645026e0d3702)
|
||||
---
|
||||
units/sys-kernel-config.mount | 1 +
|
||||
units/sys-kernel-debug.mount | 1 +
|
||||
2 files changed, 2 insertions(+)
|
||||
|
||||
diff --git a/units/sys-kernel-config.mount b/units/sys-kernel-config.mount
|
||||
index 020101c..21648ef 100644
|
||||
--- a/units/sys-kernel-config.mount
|
||||
+++ b/units/sys-kernel-config.mount
|
||||
@@ -11,6 +11,7 @@ Documentation=https://www.kernel.org/doc/Documentation/filesystems/configfs/conf
|
||||
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
|
||||
DefaultDependencies=no
|
||||
ConditionPathExists=/sys/kernel/config
|
||||
+ConditionCapability=CAP_SYS_RAWIO
|
||||
After=systemd-modules-load.service
|
||||
Before=sysinit.target
|
||||
|
||||
diff --git a/units/sys-kernel-debug.mount b/units/sys-kernel-debug.mount
|
||||
index 5369728..1e94387 100644
|
||||
--- a/units/sys-kernel-debug.mount
|
||||
+++ b/units/sys-kernel-debug.mount
|
||||
@@ -11,6 +11,7 @@ Documentation=https://www.kernel.org/doc/Documentation/filesystems/debugfs.txt
|
||||
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
|
||||
DefaultDependencies=no
|
||||
ConditionPathExists=/sys/kernel/debug
|
||||
+ConditionCapability=CAP_SYS_RAWIO
|
||||
Before=sysinit.target
|
||||
|
||||
[Mount]
|
||||
50
debian/patches/units-conditionalize-static-device-node-logic-on-CAP.patch
vendored
Normal file
50
debian/patches/units-conditionalize-static-device-node-logic-on-CAP.patch
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Fri, 4 Jul 2014 03:07:20 +0200
|
||||
Subject: units: conditionalize static device node logic on CAP_SYS_MODULES
|
||||
instead of CAP_MKNOD
|
||||
|
||||
npsawn containers generally have CAP_MKNOD, since this is required
|
||||
to make PrviateDevices= work. Thus, it's not useful anymore to
|
||||
conditionalize the kmod static device node units.
|
||||
|
||||
Use CAP_SYS_MODULES instead which is not available for nspawn
|
||||
containers. However, the static device node logic is only done for being
|
||||
able to autoload modules with it, and if we can't do that there's no
|
||||
point in doing it.
|
||||
|
||||
(cherry picked from commit e0c74691c41a204eba2fd5f39615049fc9ff1648)
|
||||
(cherry picked from commit fce5e80589911d813dd13d1d0d64df96e0ab7939)
|
||||
|
||||
Conflicts:
|
||||
units/systemd-tmpfiles-setup-dev.service.in
|
||||
---
|
||||
units/kmod-static-nodes.service.in | 2 +-
|
||||
units/systemd-tmpfiles-setup-dev.service.in | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/units/kmod-static-nodes.service.in b/units/kmod-static-nodes.service.in
|
||||
index 368f980..0934a87 100644
|
||||
--- a/units/kmod-static-nodes.service.in
|
||||
+++ b/units/kmod-static-nodes.service.in
|
||||
@@ -9,7 +9,7 @@
|
||||
Description=Create list of required static device nodes for the current kernel
|
||||
DefaultDependencies=no
|
||||
Before=sysinit.target systemd-tmpfiles-setup-dev.service
|
||||
-ConditionCapability=CAP_MKNOD
|
||||
+ConditionCapability=CAP_SYS_MODULE
|
||||
ConditionPathExists=/lib/modules/%v/modules.devname
|
||||
|
||||
[Service]
|
||||
diff --git a/units/systemd-tmpfiles-setup-dev.service.in b/units/systemd-tmpfiles-setup-dev.service.in
|
||||
index 579e7c6..11c5ce2 100644
|
||||
--- a/units/systemd-tmpfiles-setup-dev.service.in
|
||||
+++ b/units/systemd-tmpfiles-setup-dev.service.in
|
||||
@@ -10,7 +10,7 @@ Description=Create static device nodes in /dev
|
||||
Documentation=man:tmpfiles.d(5) man:systemd-tmpfiles(8)
|
||||
DefaultDependencies=no
|
||||
Before=sysinit.target local-fs-pre.target systemd-udevd.service
|
||||
-ConditionCapability=CAP_MKNOD
|
||||
+ConditionCapability=CAP_SYS_MODULE
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
51
debian/patches/units-make-ExecStopPost-action-part-of-ExecStart.patch
vendored
Normal file
51
debian/patches/units-make-ExecStopPost-action-part-of-ExecStart.patch
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
From: Michal Sekletar <msekleta@redhat.com>
|
||||
Date: Tue, 8 Jul 2014 17:42:23 +0200
|
||||
Subject: units: make ExecStopPost action part of ExecStart
|
||||
|
||||
Currently after exiting rescue shell we isolate default target. User
|
||||
might want to isolate to some other target than default one. However
|
||||
issuing systemctl isolate command to desired target would bring system
|
||||
to default target as a consequence of running ExecStopPost action.
|
||||
|
||||
Having common ancestor for rescue shell and possible followup systemctl
|
||||
default command should fix this. If user exits rescue shell we will
|
||||
proceed with isolating default target, otherwise, on manual isolate,
|
||||
parent shell process is terminated and we don't isolate default target,
|
||||
but target chosen by user.
|
||||
|
||||
Suggested-by: Michal Schmidt <mschmidt@redhat.com>
|
||||
(cherry picked from commit d3381512282f2ca1c7669f77fb736a90fdce6982)
|
||||
(cherry picked from commit 7a4ab10135c2b8fdeedb53c0585c67a0d6448ce6)
|
||||
---
|
||||
units/emergency.service.in | 3 +--
|
||||
units/rescue.service.m4.in | 3 +--
|
||||
2 files changed, 2 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/units/emergency.service.in b/units/emergency.service.in
|
||||
index 94c090f..91fc1bb 100644
|
||||
--- a/units/emergency.service.in
|
||||
+++ b/units/emergency.service.in
|
||||
@@ -17,8 +17,7 @@ Environment=HOME=/root
|
||||
WorkingDirectory=/root
|
||||
ExecStartPre=-/bin/plymouth quit
|
||||
ExecStartPre=-/bin/echo -e 'Welcome to emergency mode! After logging in, type "journalctl -xb" to view\\nsystem logs, "systemctl reboot" to reboot, "systemctl default" to try again\\nto boot into default mode.'
|
||||
-ExecStart=-/sbin/sulogin
|
||||
-ExecStopPost=@SYSTEMCTL@ --fail --no-block default
|
||||
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
|
||||
Type=idle
|
||||
StandardInput=tty-force
|
||||
StandardOutput=inherit
|
||||
diff --git a/units/rescue.service.m4.in b/units/rescue.service.m4.in
|
||||
index 552ef89..ef54369 100644
|
||||
--- a/units/rescue.service.m4.in
|
||||
+++ b/units/rescue.service.m4.in
|
||||
@@ -18,8 +18,7 @@ Environment=HOME=/root
|
||||
WorkingDirectory=/root
|
||||
ExecStartPre=-/bin/plymouth quit
|
||||
ExecStartPre=-/bin/echo -e 'Welcome to rescue mode! Type "systemctl default" or ^D to enter default mode.\\nType "journalctl -xb" to view system logs. Type "systemctl reboot" to reboot.'
|
||||
-ExecStart=-/sbin/sulogin
|
||||
-ExecStopPost=-@SYSTEMCTL@ --fail --no-block default
|
||||
+ExecStart=-/bin/sh -c "/sbin/sulogin; @SYSTEMCTL@ --fail --no-block default"
|
||||
Type=idle
|
||||
StandardInput=tty-force
|
||||
StandardOutput=inherit
|
||||
58
debian/patches/units-remove-RefuseManualStart-from-units-which-are-.patch
vendored
Normal file
58
debian/patches/units-remove-RefuseManualStart-from-units-which-are-.patch
vendored
Normal file
@ -0,0 +1,58 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Sat, 28 Jun 2014 00:06:30 -0400
|
||||
Subject: units: remove RefuseManualStart from units which are always around
|
||||
|
||||
In a normal running system, non-passive targets and units used during
|
||||
early bootup are always started. So refusing "manual start" for them
|
||||
doesn't make any difference, because a "start" command doesn't cause
|
||||
any action.
|
||||
|
||||
In early boot however, the administrator might want to start on
|
||||
of those targets or services by hand. We shouldn't interfere with that.
|
||||
|
||||
Note: in case of systemd-tmpfiles-setup.service, really running the
|
||||
unit after system is up would break the system. So e.g. restarting
|
||||
should not be allowed. The unit has "RefuseManualStop=yes", which
|
||||
prevents restart too.
|
||||
|
||||
(cherry picked from commit 0fdeb6e011dfdb17636c81e2d7e0d632186359ce)
|
||||
|
||||
Conflicts:
|
||||
units/systemd-tmpfiles-setup.service.in
|
||||
units/user/basic.target
|
||||
---
|
||||
units/basic.target | 1 -
|
||||
units/sysinit.target | 1 -
|
||||
units/systemd-tmpfiles-setup.service.in | 1 -
|
||||
3 files changed, 3 deletions(-)
|
||||
|
||||
diff --git a/units/basic.target b/units/basic.target
|
||||
index d7c68f4..b890d48 100644
|
||||
--- a/units/basic.target
|
||||
+++ b/units/basic.target
|
||||
@@ -11,4 +11,3 @@ Documentation=man:systemd.special(7)
|
||||
Requires=sysinit.target
|
||||
Wants=sockets.target timers.target paths.target slices.target
|
||||
After=sysinit.target sockets.target timers.target paths.target slices.target
|
||||
-RefuseManualStart=yes
|
||||
diff --git a/units/sysinit.target b/units/sysinit.target
|
||||
index 8f4fb8f..ec33503 100644
|
||||
--- a/units/sysinit.target
|
||||
+++ b/units/sysinit.target
|
||||
@@ -11,4 +11,3 @@ Documentation=man:systemd.special(7)
|
||||
Conflicts=emergency.service emergency.target
|
||||
Wants=local-fs.target swap.target
|
||||
After=local-fs.target swap.target emergency.service emergency.target
|
||||
-RefuseManualStart=yes
|
||||
diff --git a/units/systemd-tmpfiles-setup.service.in b/units/systemd-tmpfiles-setup.service.in
|
||||
index 01043b7..136520b 100644
|
||||
--- a/units/systemd-tmpfiles-setup.service.in
|
||||
+++ b/units/systemd-tmpfiles-setup.service.in
|
||||
@@ -18,7 +18,6 @@ ConditionDirectoryNotEmpty=|/lib/tmpfiles.d
|
||||
ConditionDirectoryNotEmpty=|/usr/local/lib/tmpfiles.d
|
||||
ConditionDirectoryNotEmpty=|/etc/tmpfiles.d
|
||||
ConditionDirectoryNotEmpty=|/run/tmpfiles.d
|
||||
-RefuseManualStart=yes
|
||||
RefuseManualStop=yes
|
||||
|
||||
[Service]
|
||||
33
debian/patches/units-serial-getty-.service-use-the-default-RestartS.patch
vendored
Normal file
33
debian/patches/units-serial-getty-.service-use-the-default-RestartS.patch
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
From: Michael Olbrich <m.olbrich@pengutronix.de>
|
||||
Date: Tue, 15 Jul 2014 18:28:10 +0200
|
||||
Subject: units/serial-getty@.service: use the default RestartSec
|
||||
|
||||
For pluggable ttys such as USB serial devices, the getty is restarted
|
||||
and exits in a loop until the remove event reaches systemd. Under
|
||||
certain circumstances the restart loop can overload the system in a
|
||||
way that prevents the remove event from reaching systemd for a long
|
||||
time (e.g. at least several minutes on a small embedded system).
|
||||
|
||||
Use the default RestartSec to prevent the restart loop from
|
||||
overloading the system. Serial gettys are interactive units, so
|
||||
waiting an extra 100ms really doesn't make a difference anyways
|
||||
compared to the time it takes the user to log in.
|
||||
|
||||
(cherry picked from commit 4bf04322b8b7ecca4f3d65cfc642d0ac16356129)
|
||||
(cherry picked from commit 89b958ef6a43400d1f7b25c58b02f4b5c3c59b36)
|
||||
---
|
||||
units/serial-getty@.service.m4 | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/units/serial-getty@.service.m4 b/units/serial-getty@.service.m4
|
||||
index aea078f..1c2a521 100644
|
||||
--- a/units/serial-getty@.service.m4
|
||||
+++ b/units/serial-getty@.service.m4
|
||||
@@ -25,7 +25,6 @@ IgnoreOnIsolate=yes
|
||||
ExecStart=-/sbin/agetty --keep-baud %I 115200,38400,9600
|
||||
Type=idle
|
||||
Restart=always
|
||||
-RestartSec=0
|
||||
UtmpIdentifier=%I
|
||||
TTYPath=/dev/%I
|
||||
TTYReset=yes
|
||||
24
debian/patches/units-skip-mounting-tmp-if-it-is-a-symlink.patch
vendored
Normal file
24
debian/patches/units-skip-mounting-tmp-if-it-is-a-symlink.patch
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 30 Jun 2014 21:44:05 +0200
|
||||
Subject: units: skip mounting /tmp if it is a symlink
|
||||
|
||||
We shouldn't get confused if people have symlinked /tmp somewhere, so
|
||||
let's simply skip the mount then.
|
||||
|
||||
(cherry picked from commit 8ebf02d6f382ce1ac7e0d44a713b8795a07b08cd)
|
||||
---
|
||||
units/tmp.mount | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/units/tmp.mount b/units/tmp.mount
|
||||
index 99a3ba3..00a0d28 100644
|
||||
--- a/units/tmp.mount
|
||||
+++ b/units/tmp.mount
|
||||
@@ -9,6 +9,7 @@
|
||||
Description=Temporary Directory
|
||||
Documentation=man:hier(7)
|
||||
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
|
||||
+ConditionPathIsSymbolicLink=!/tmp
|
||||
DefaultDependencies=no
|
||||
Conflicts=umount.target
|
||||
Before=local-fs.target umount.target
|
||||
29
debian/patches/units-systemd-sysctl.service.in-run-after-load-modul.patch
vendored
Normal file
29
debian/patches/units-systemd-sysctl.service.in-run-after-load-modul.patch
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
From: =?utf-8?q?Cristian_Rodr=C3=ADguez?= <crrodriguez@opensuse.org>
|
||||
Date: Sat, 23 Mar 2013 03:54:16 +0100
|
||||
Subject: units/systemd-sysctl.service.in: run after load-modules
|
||||
|
||||
Modules might or will register new sysctl options.
|
||||
|
||||
[zj: This mechanism of adding modules just to reliably set sysctl
|
||||
attributes is not ideal. Nevertheless, sysctl for dynamically created
|
||||
attributes is simply broken, and this is the easiest workaround.]
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1022977
|
||||
https://bugzilla.novell.com/show_bug.cgi?id=725412
|
||||
(cherry picked from commit 0b73eab7a2185ae0377650e3fdb8208347a8a575)
|
||||
---
|
||||
units/systemd-sysctl.service.in | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/units/systemd-sysctl.service.in b/units/systemd-sysctl.service.in
|
||||
index 5baf22c..b8e8175 100644
|
||||
--- a/units/systemd-sysctl.service.in
|
||||
+++ b/units/systemd-sysctl.service.in
|
||||
@@ -11,6 +11,7 @@ Documentation=man:systemd-sysctl.service(8) man:sysctl.d(5)
|
||||
DefaultDependencies=no
|
||||
Conflicts=shutdown.target
|
||||
After=systemd-readahead-collect.service systemd-readahead-replay.service
|
||||
+After=systemd-modules-load.service
|
||||
Before=sysinit.target shutdown.target
|
||||
ConditionPathIsReadWrite=/proc/sys/
|
||||
ConditionDirectoryNotEmpty=|/lib/sysctl.d
|
||||
53
debian/patches/util-consider-0x7F-a-control-chracter-which-it-is-DE.patch
vendored
Normal file
53
debian/patches/util-consider-0x7F-a-control-chracter-which-it-is-DE.patch
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
From: Lennart Poettering <lennart@poettering.net>
|
||||
Date: Mon, 7 Jul 2014 11:47:10 +0200
|
||||
Subject: util: consider 0x7F a control chracter (which it is: DEL)
|
||||
|
||||
Let's better be safe than sorry.
|
||||
|
||||
(cherry picked from commit 3a8a916338d8446b938f3cf40f6aae0c611892e3)
|
||||
(cherry picked from commit a71b7b7e52f312c7a9fc19154ac0d444e057e1d4)
|
||||
---
|
||||
src/shared/util.c | 12 ++++++++++--
|
||||
1 file changed, 10 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index 6de527e..a634b9d 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -1716,8 +1716,9 @@ int read_one_char(FILE *f, char *ret, usec_t t, bool *need_nl) {
|
||||
if (fd_wait_for_event(fileno(f), POLLIN, t) <= 0)
|
||||
return -ETIMEDOUT;
|
||||
|
||||
+ errno = 0;
|
||||
if (!fgets(line, sizeof(line), f))
|
||||
- return -EIO;
|
||||
+ return errno ? -errno : -EIO;
|
||||
|
||||
truncate_nl(line);
|
||||
|
||||
@@ -5344,6 +5345,9 @@ bool string_is_safe(const char *p) {
|
||||
if (*t > 0 && *t < ' ')
|
||||
return false;
|
||||
|
||||
+ if (*t == 127)
|
||||
+ return false;
|
||||
+
|
||||
if (strchr("\\\"\'", *t))
|
||||
return false;
|
||||
}
|
||||
@@ -5360,10 +5364,14 @@ bool string_has_cc(const char *p) {
|
||||
|
||||
assert(p);
|
||||
|
||||
- for (t = p; *t; t++)
|
||||
+ for (t = p; *t; t++) {
|
||||
if (*t > 0 && *t < ' ' && *t != '\t')
|
||||
return true;
|
||||
|
||||
+ if (*t == 127)
|
||||
+ return true;
|
||||
+ }
|
||||
+
|
||||
return false;
|
||||
}
|
||||
|
||||
23
debian/patches/util-do-not-strip-dev-prefix-twice.patch
vendored
Normal file
23
debian/patches/util-do-not-strip-dev-prefix-twice.patch
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Fri, 20 Jun 2014 18:44:39 -0400
|
||||
Subject: util: do not strip /dev prefix twice
|
||||
|
||||
(cherry picked from commit 0d460faf732ff3c9483dbfa5db6905d53c2e2522)
|
||||
---
|
||||
src/shared/util.c | 3 ---
|
||||
1 file changed, 3 deletions(-)
|
||||
|
||||
diff --git a/src/shared/util.c b/src/shared/util.c
|
||||
index e78e4e4..6de527e 100644
|
||||
--- a/src/shared/util.c
|
||||
+++ b/src/shared/util.c
|
||||
@@ -3630,9 +3630,6 @@ char *fstab_node_to_udev_node(const char *p) {
|
||||
bool tty_is_vc(const char *tty) {
|
||||
assert(tty);
|
||||
|
||||
- if (startswith(tty, "/dev/"))
|
||||
- tty += 5;
|
||||
-
|
||||
return vtnr_from_tty(tty) >= 0;
|
||||
}
|
||||
|
||||
53
debian/patches/vconsole-also-copy-character-maps-not-just-fonts-fro.patch
vendored
Normal file
53
debian/patches/vconsole-also-copy-character-maps-not-just-fonts-fro.patch
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
From: Carl Schaefer <schaefer@trilug.org>
|
||||
Date: Mon, 23 Jun 2014 18:23:48 +0200
|
||||
Subject: vconsole: also copy character maps (not just fonts) from vt1 to vt2,
|
||||
vt3, ...
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=78796
|
||||
(cherry picked from commit ff452e76e2c0f89a32542b7179bb2fd538335933)
|
||||
---
|
||||
src/vconsole/vconsole-setup.c | 24 ++++++++++++++++++++++++
|
||||
1 file changed, 24 insertions(+)
|
||||
|
||||
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
|
||||
index 0f2b706..e0c4050 100644
|
||||
--- a/src/vconsole/vconsole-setup.c
|
||||
+++ b/src/vconsole/vconsole-setup.c
|
||||
@@ -180,6 +180,10 @@ static int font_load(const char *vc, const char *font, const char *map, const ch
|
||||
*/
|
||||
static void font_copy_to_all_vcs(int fd) {
|
||||
struct vt_stat vcs = {};
|
||||
+ unsigned char map8[E_TABSZ];
|
||||
+ unsigned short map16[E_TABSZ];
|
||||
+ struct unimapdesc unimapd;
|
||||
+ struct unipair unipairs[USHRT_MAX];
|
||||
int i, r;
|
||||
|
||||
/* get active, and 16 bit mask of used VT numbers */
|
||||
@@ -209,6 +213,26 @@ static void font_copy_to_all_vcs(int fd) {
|
||||
cfo.op = KD_FONT_OP_COPY;
|
||||
cfo.height = vcs.v_active-1; /* tty1 == index 0 */
|
||||
ioctl(vcfd, KDFONTOP, &cfo);
|
||||
+
|
||||
+ /* copy map of 8bit chars */
|
||||
+ if (ioctl(fd, GIO_SCRNMAP, map8) >= 0)
|
||||
+ ioctl(vcfd, PIO_SCRNMAP, map8);
|
||||
+
|
||||
+ /* copy map of 8bit chars -> 16bit Unicode values */
|
||||
+ if (ioctl(fd, GIO_UNISCRNMAP, map16) >= 0)
|
||||
+ ioctl(vcfd, PIO_UNISCRNMAP, map16);
|
||||
+
|
||||
+ /* copy unicode translation table */
|
||||
+ /* unimapd is a ushort count and a pointer to an
|
||||
+ array of struct unipair { ushort, ushort } */
|
||||
+ unimapd.entries = unipairs;
|
||||
+ unimapd.entry_ct = USHRT_MAX;
|
||||
+ if (ioctl(fd, GIO_UNIMAP, &unimapd) >= 0) {
|
||||
+ struct unimapinit adv = { 0, 0, 0 };
|
||||
+
|
||||
+ ioctl(vcfd, PIO_UNIMAPCLR, &adv);
|
||||
+ ioctl(vcfd, PIO_UNIMAP, &unimapd);
|
||||
+ }
|
||||
}
|
||||
}
|
||||
|
||||
35
debian/patches/vconsole-setup-fix-inverted-error-messages.patch
vendored
Normal file
35
debian/patches/vconsole-setup-fix-inverted-error-messages.patch
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Mon, 7 Jul 2014 08:55:30 -0400
|
||||
Subject: vconsole-setup: fix inverted error messages
|
||||
|
||||
Introduced in abee28c56d.
|
||||
|
||||
Pointed-out-by: Werner Fink <werner@suse.de>
|
||||
(cherry picked from commit 3dde3f819732aaa66ab8e881305488adaea17641)
|
||||
(cherry picked from commit 14c30a407a7599c96af2e9998c3038574005c368)
|
||||
---
|
||||
src/vconsole/vconsole-setup.c | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
|
||||
index 25d15af..645b1e6 100644
|
||||
--- a/src/vconsole/vconsole-setup.c
|
||||
+++ b/src/vconsole/vconsole-setup.c
|
||||
@@ -305,7 +305,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid);
|
||||
if (r < 0) {
|
||||
- log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
|
||||
+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
@@ -314,7 +314,7 @@ int main(int argc, char **argv) {
|
||||
|
||||
r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
|
||||
if (r < 0) {
|
||||
- log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
|
||||
+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
92
debian/patches/vconsole-setup-run-setfont-before-loadkeys.patch
vendored
Normal file
92
debian/patches/vconsole-setup-run-setfont-before-loadkeys.patch
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
From: =?utf-8?q?Zbigniew_J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
||||
Date: Tue, 1 Jul 2014 22:20:11 -0400
|
||||
Subject: vconsole-setup: run setfont before loadkeys
|
||||
|
||||
https://bugs.freedesktop.org/show_bug.cgi?id=80685
|
||||
(cherry picked from commit abee28c56d523e55751b0c007d0bf812cc285c00)
|
||||
(cherry picked from commit 20a575e8935cf5d2d078bbe3acf21fff56f2345c)
|
||||
---
|
||||
src/vconsole/vconsole-setup.c | 48 +++++++++++++++++++++----------------------
|
||||
1 file changed, 23 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/src/vconsole/vconsole-setup.c b/src/vconsole/vconsole-setup.c
|
||||
index e0c4050..25d15af 100644
|
||||
--- a/src/vconsole/vconsole-setup.c
|
||||
+++ b/src/vconsole/vconsole-setup.c
|
||||
@@ -238,12 +238,10 @@ static void font_copy_to_all_vcs(int fd) {
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
const char *vc;
|
||||
- char *vc_keymap = NULL;
|
||||
- char *vc_keymap_toggle = NULL;
|
||||
- char *vc_font = NULL;
|
||||
- char *vc_font_map = NULL;
|
||||
- char *vc_font_unimap = NULL;
|
||||
- int fd = -1;
|
||||
+ _cleanup_free_ char
|
||||
+ *vc_keymap = NULL, *vc_keymap_toggle = NULL,
|
||||
+ *vc_font = NULL, *vc_font_map = NULL, *vc_font_unimap = NULL;
|
||||
+ _cleanup_close_ int fd = -1;
|
||||
bool utf8;
|
||||
pid_t font_pid = 0, keymap_pid = 0;
|
||||
bool font_copy = false;
|
||||
@@ -265,12 +263,12 @@ int main(int argc, char **argv) {
|
||||
fd = open_terminal(vc, O_RDWR|O_CLOEXEC);
|
||||
if (fd < 0) {
|
||||
log_error("Failed to open %s: %m", vc);
|
||||
- goto finish;
|
||||
+ return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
if (!is_vconsole(fd)) {
|
||||
log_error("Device %s is not a virtual console.", vc);
|
||||
- goto finish;
|
||||
+ return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
utf8 = is_locale_utf8();
|
||||
@@ -305,27 +303,27 @@ int main(int argc, char **argv) {
|
||||
else
|
||||
disable_utf8(fd);
|
||||
|
||||
- r = EXIT_FAILURE;
|
||||
- if (keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid) >= 0 &&
|
||||
- font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid) >= 0)
|
||||
- r = EXIT_SUCCESS;
|
||||
-
|
||||
-finish:
|
||||
- if (keymap_pid > 0)
|
||||
- wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
|
||||
+ r = font_load(vc, vc_font, vc_font_map, vc_font_unimap, &font_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to start " KBD_LOADKEYS ": %s", strerror(-r));
|
||||
+ return EXIT_FAILURE;
|
||||
+ }
|
||||
|
||||
- if (font_pid > 0) {
|
||||
+ if (font_pid > 0)
|
||||
wait_for_terminate_and_warn(KBD_SETFONT, font_pid);
|
||||
- if (font_copy)
|
||||
- font_copy_to_all_vcs(fd);
|
||||
+
|
||||
+ r = keymap_load(vc, vc_keymap, vc_keymap_toggle, utf8, &keymap_pid);
|
||||
+ if (r < 0) {
|
||||
+ log_error("Failed to start " KBD_SETFONT ": %s", strerror(-r));
|
||||
+ return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
- free(vc_keymap);
|
||||
- free(vc_font);
|
||||
- free(vc_font_map);
|
||||
- free(vc_font_unimap);
|
||||
+ if (keymap_pid > 0)
|
||||
+ wait_for_terminate_and_warn(KBD_LOADKEYS, keymap_pid);
|
||||
|
||||
- safe_close(fd);
|
||||
+ /* Only copy the font when we started setfont successfully */
|
||||
+ if (font_copy && font_pid > 0)
|
||||
+ font_copy_to_all_vcs(fd);
|
||||
|
||||
- return r;
|
||||
+ return EXIT_SUCCESS;
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user