Commit 978aa46d authored by Simon McVittie's avatar Simon McVittie

Summarize changes

* Merge from Debian jessie, remaining changes:
  + d/p/sound-no-uaccess.patch
    - SteamOS uses a system-wide PulseAudio instance, which should be the
      only thing with access to the sound devices. As such,
      disable uaccess for sound devices.
  + d/p/pulse-owns-audio.patch
    - Change the sound device group from the default audio to pulse so that
      only the system-wide pulse daemon can access those devices.
  + streamcontroller-support.patch
    - Allow access by the steam group to uinput devices, as used for Steam
      Controller support
parents 742f10da c8b0c473
systemd (215-17+steamos2) UNRELEASED; urgency=medium
systemd (215-17+steamos2+deb8u7) UNRELEASED; urgency=medium
* debian/README.source.steamos: Add some useful git remotes
* debian/gbp.conf: Add
* Merge from Debian jessie, remaining changes:
+ d/p/sound-no-uaccess.patch
- SteamOS uses a system-wide PulseAudio instance, which should be the
only thing with access to the sound devices. As such,
disable uaccess for sound devices.
+ d/p/pulse-owns-audio.patch
- Change the sound device group from the default audio to pulse so that
only the system-wide pulse daemon can access those devices.
+ streamcontroller-support.patch
- Allow access by the steam group to uinput devices, as used for Steam
Controller support
-- Simon McVittie <smcv@collabora.com> Fri, 20 Apr 2018 14:30:29 +0100
systemd (215-17+deb8u7) stable; urgency=medium
* bus: Fix bus_print_property() to use "int" for booleans.
This fixes the problem that on big endian architectures, like mips or
powerpc, boolean properties that were retrieved via sd-bus were always
set to 0 (no). (Closes: #774430)
* systemctl: Add is-enabled support for SysV init scripts.
The update-rc.d utility does not provide is-enabled, so implement it
ourselves in systemctl using the same logic as systemd-sysv-install from
Stretch. (Closes: #809405)
* core: If the start command vanishes during runtime don't hit an assert.
This can happen when the configuration is changed and reloaded while we
are executing a service. Let's not hit an assert in this case.
(Closes: #856985)
* automount: If an automount unit is masked, don't react to activation
anymore.
Otherwise we'll hit an assert sooner or later. (Closes: #856035)
-- Michael Biebl <biebl@debian.org> Fri, 10 Mar 2017 06:02:49 +0100
systemd (215-17+deb8u6) stable; urgency=medium
[ Michael Biebl ]
* Don't return any error in manager_dispatch_notify_fd().
If manager_dispatch_notify_fd() fails and returns an error then the
handling of service notifications will be disabled entirely leading to a
compromised system.
For example pid1 won't be able to receive the WATCHDOG messages anymore
and will kill all services supposed to send such messages. (CVE-2016-7796)
(Closes: #839607)
* core: Rework logic to determine when we decide to add automatic deps for
mounts.
This adds a concept of "extrinsic" mounts. If mounts are extrinsic we
consider them managed by something else and do not add automatic ordering
against umount.target, local-fs.target, remote-fs.target.
Extrinsic mounts include API mounts such as everything below /proc, /sys,
/dev. This avoids a crash in LXC containers where /dev/urandom is a bind
mount from the host system and unmounting it leads to an assert in
systemd. (Closes: #818978)
* Various ordering fixes for ifupdown.
Run ifup after all kernel modules have been loaded and all sysctl settings
are applied. Update ifup@.service to add missing After= for the device
unit we bind to. This ensures that the device unit is active when systemd
tries to start the service. (Closes: #819314)
* systemctl: Fix argument handling when invoked as shutdown.
(Closes: #776997)
[ Simon McVittie ]
* localed: tolerate absence of /etc/default/keyboard.
The debian-specific patch to read Debian config files was not tolerating
the absence of /etc/default/keyboard. This causes systemd-localed to fail
to start on systems where that file isn't populated (like embedded systems
without keyboards). (Closes: #833849)
[ Martin Pitt ]
* systemctl, loginctl, etc.: Don't start polkit agent when running as root.
(Closes: #774153, LP: #1565617)
-- Michael Biebl <biebl@debian.org> Wed, 21 Dec 2016 21:33:51 +0100
systemd (215-17+deb8u5) stable; urgency=medium
* Use the right timeout for stop processes we fork. This ensures that
services are properly killed after a given timeout. (Closes: #813702)
* Don't reset log level to NOTICE if we get quiet on the kernel cmdline.
(Closes: #828006)
* Fix prepare priority queue comparison function in sd-event.
Otherwise a disabled event source can get swapped with an enabled one
and cause a severe sd-event malfunction, breaking the event loop.
(Closes: #789796)
* Update links to kernel.org cgroup documentation.
The systemd.resource-control man page had references to /cgroups/ which
moved to /cgroup-v1/. (Closes: #819970)
* Don't start console-getty.service when /dev/console is missing.
Avoids repeated unsuccessful start attempts of agetty inside (docker)
containers. (Closes: #829537)
* Order systemd-user-sessions.service after nss-user-lookup.target. We
should not allow logins before NIS/LDAP users are available.
* Order systemd-user-sessions.service after network.target. That way we can
be sure that local users are logged out and SSH sessions are ended cleanly
before the network is shut down when the system goes down.
-- Michael Biebl <biebl@debian.org> Sun, 24 Jul 2016 18:55:54 +0200
systemd (215-17+deb8u4) stable; urgency=medium
[ Martin Pitt ]
* debian/udev.prerm: Add missing "deconfigure" action. (Closes: #809744)
* udev.postinst: Don't call addgroup with --quiet, so that if the "input"
group already exists as a non-system group you get a sensible error
message. Some broken tutorials forget the --system option.
(Closes: #769948, LP: #1455956)
* systemd.postinst: Drop the --quiet from the addgroup calls as well, same
reason as above. (Closes: #762275)
[ Michael Biebl ]
* Make sure all swap units are ordered before the swap target. This avoids
that swap devices are being stopped prematurely during shutdown.
(Closes: #805133)
* Only skip the filesystem check for /usr if the /run/initramfs/fsck-usr
flag file exists. Otherwise we break booting with dracut which uses
systemd inside the initramfs. (Closes: #810748)
* Fix --network-interface in systemd-nspawn to not fail when modifying an
existing link. (Closes: #813696)
-- Michael Biebl <biebl@debian.org> Thu, 03 Mar 2016 19:51:22 +0100
systemd (215-17+deb8u3) stable; urgency=medium
* Fix namespace breakage due to incorrect path sorting. (Closes: #787758)
* Don't timeout after 90 seconds when no password was entered for cryptsetup
devices. (Closes: #802897)
* Only set the kernel's timezone when the RTC runs in local time. Otherwise,
every daylight saving time change or time zone change by travelling will
make the time jump, and the local time might jump backwards which creates
unsolvable problems with file timestamps. (Closes: #759319)
* Fix incorrect handling of comma separator in systemd-delta.
(Closes: #793477)
* Make DHCP broadcast behaviour configurable in systemd-networkd via
RequestBroadcast=. This is a backport from upstream which doesn't change
the default setting. (Closes: #797894)
-- Michael Biebl <biebl@debian.org> Mon, 16 Nov 2015 18:08:32 +0100
systemd (215-17+deb8u2) stable; urgency=medium
* Disable default DNS servers in systemd-resolved. In v215 they are always
added to resolv.conf as fallback entries even when DNS servers were
acquired from systemd-networkd. (Closes: #787731)
* Use strictly versioned dependency on libsystemd-dev for the
transitional dev packages. The .pc files of the compat libraries declare
a strictly versioned dependency on libsystemd.pc, so reflect that in the
package dependencies as well. (Closes: #794290)
* udev: Increase udev event timeout to 180s. Some kernel modules, like
mptsas, can take longer then 30s to load so udevd kills the (hanging)
worker responsible for loading the module. Increase timeout from 30s to
180s to workaround this issue. Thanks Faidon Liambotis.
(Closes: #787191)
-- Michael Biebl <biebl@debian.org> Sat, 29 Aug 2015 17:17:04 +0200
systemd (215-17+deb8u1) stable; urgency=medium
[ Michael Biebl ]
* manager: Pass correct errno to strerror(), have_ask_password contains
negative error values which have to be negated when being passed to
strerror().
[ Martin Pitt ]
* Revert upstream commit 743970d which immediately SIGKILLs units during
shutdown. This leads to problems like bash not being able to write its
history, mosh not saving its state, and similar failed cleanup actions.
(Closes: #784720, LP: #1448259)
* write_net_rules: Escape '{' and '}' characters as well, to make this work
with busybox grep. Thanks Faidon Liambotis! (Closes: #765577)
* debian/gbp.conf: Point to jessie branch.
-- Martin Pitt <mpitt@debian.org> Tue, 26 May 2015 07:55:44 +0200
systemd (215-17+steamos1) brewmaster; urgency=medium
* Merge SteamOS patches
......
......@@ -184,7 +184,7 @@ Multi-Arch: same
Section: oldlibs
Priority: extra
Depends: ${misc:Depends},
libsystemd-dev (>= ${binary:Version})
libsystemd-dev (= ${binary:Version})
Description: systemd login utility library (transitional package)
The libsystemd-login library provides an interface for the
systemd-logind service which is used to track user sessions and seats.
......@@ -214,7 +214,7 @@ Multi-Arch: same
Section: oldlibs
Priority: extra
Depends: ${misc:Depends},
libsystemd-dev (>= ${binary:Version})
libsystemd-dev (= ${binary:Version})
Description: systemd utility library (transitional package)
The sd-daemon library provides a reference implementation of various
APIs for new-style daemons, as implemented by the systemd init system.
......@@ -244,7 +244,7 @@ Multi-Arch: same
Section: oldlibs
Priority: extra
Depends: ${misc:Depends},
libsystemd-dev (>= ${binary:Version})
libsystemd-dev (= ${binary:Version})
Description: systemd journal utility library (transitional package)
The libsystemd-journal library provides an interface for the
systemd journal service.
......@@ -274,7 +274,7 @@ Multi-Arch: same
Section: oldlibs
Priority: extra
Depends: ${misc:Depends},
libsystemd-dev (>= ${binary:Version})
libsystemd-dev (= ${binary:Version})
Description: systemd 128 bit ID utility library (transitional package)
The libsystemd-id128 library provides utility functions for generating
128 bit IDs.
......
[Unit]
Description=getty on tty2-tty6 if dbus and logind are not available
ConditionPathExists=/dev/tty2
ConditionPathExists=/dev/tty0
ConditionPathExists=!/lib/systemd/system/dbus.service
[Service]
......
[Unit]
After=network-pre.target
After=network-pre.target systemd-sysctl.service systemd-modules-load.service
......@@ -118,7 +118,7 @@ basename=${INTERFACE%%[0-9]*}
match="$match, KERNEL==\"$basename*\""
# build a regular expression that matches the new rule that we want to write
new_rule_pattern=$(echo "^SUBSYSTEM==\"net\", ACTION==\"add\"$match" | sed -re 's/([\?\*])/\\\1/g')
new_rule_pattern=$(echo "^SUBSYSTEM==\"net\", ACTION==\"add\"$match" | sed -re 's/([\?\*\{\}])/\\\1/g')
# Double check if the new rule has already been written. This happens if
# multiple add events are generated before the script returns and udevd
......
[Unit]
Description=ifup for %I
After=local-fs.target network-pre.target networking.service
After=local-fs.target network-pre.target networking.service systemd-sysctl.service
Before=network.target
BindsTo=sys-subsystem-net-devices-%i.device
After=sys-subsystem-net-devices-%i.device
ConditionPathIsDirectory=/run/network
DefaultDependencies=no
......
From: Martin Pitt <martin.pitt@ubuntu.com>
Date: Mon, 27 Apr 2015 15:29:13 +0200
Subject: Revert "core: one step back again,
for nspawn we actually can't wait for cgroups running empty since
systemd will get exactly zero notifications about it"
This reverts commit 743970d2ea6d08aa7c7bff8220f6b7702f2b1db7.
Bug-Debian: https://bugs.debian.org/784720
Bug-Ubuntu: https://launchpad.net/bugs/1448259
Bug-Fedora: https://bugzilla.redhat.com/show_bug.cgi?id=1141137
---
src/core/unit.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/core/unit.c b/src/core/unit.c
index 536fd5e..d82d5d1 100644
--- a/src/core/unit.c
+++ b/src/core/unit.c
@@ -3218,15 +3218,7 @@ int unit_kill_context(
log_warning_unit(u->id, "Failed to kill control group: %s", strerror(-r));
} else if (r > 0) {
- /* FIXME: For now, we will not wait for the
- * cgroup members to die, simply because
- * cgroup notification is unreliable. It
- * doesn't work at all in containers, and
- * outside of containers it can be confused
- * easily by leaving directories in the
- * cgroup. */
-
- /* wait_for_exit = true; */
+ wait_for_exit = true;
if (c->send_sighup && !sigkill) {
set_free(pid_set);
From: Michael Biebl <biebl@debian.org>
Date: Mon, 13 Apr 2015 19:34:23 +0200
From: Nis Martensen <nis.martensen@web.de>
Date: Tue, 19 Jan 2016 22:01:43 +0100
Subject: Skip filesystem check if already done by the initramfs
Newer versions of initramfs-tools already fsck and mount / and /usr in
the initramfs. Skip the filesystem check in this case.
Based on a previous patch by Michael Biebl <biebl@debian.org>.
Closes: #782522
Closes: #810748
---
src/fstab-generator/fstab-generator.c | 4 +++-
units/systemd-fsck-root.service.in | 1 +
2 files changed, 4 insertions(+), 1 deletion(-)
src/fstab-generator/fstab-generator.c | 11 ++++++++---
units/systemd-fsck-root.service.in | 1 +
2 files changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/fstab-generator/fstab-generator.c b/src/fstab-generator/fstab-generator.c
index cb3d9dc..3323884 100644
index cb3d9dc..1557fb2 100644
--- a/src/fstab-generator/fstab-generator.c
+++ b/src/fstab-generator/fstab-generator.c
@@ -163,11 +163,13 @@ static bool mount_is_network(struct mntent *me) {
}
static bool mount_in_initrd(struct mntent *me) {
@@ -188,6 +188,7 @@ static int add_mount(
*filtered = NULL;
_cleanup_fclose_ FILE *f = NULL;
int r;
+ struct stat sb;
+
assert(me);
return
hasmntopt(me, "x-initrd.mount") ||
- streq(me->mnt_dir, "/usr");
+ (streq(me->mnt_dir, "/usr") && stat("/run/initramfs/fsck-usr", &sb) == 0);
}
assert(what);
assert(where);
@@ -241,9 +242,13 @@ static int add_mount(
fprintf(f, "Before=%s\n", post);
if (passno != 0) {
- r = generator_write_fsck_deps(f, arg_dest, what, where, fstype);
- if (r < 0)
- return r;
+ if (streq(where, "/usr") && stat("/run/initramfs/fsck-usr", &sb) == 0)
+ ; /* skip /usr fsck if it has already been checked in the initramfs */
+ else {
+ r = generator_write_fsck_deps(f, arg_dest, what, where, fstype);
+ if (r < 0)
+ return r;
+ }
}
static int add_mount(
fprintf(f,
diff --git a/units/systemd-fsck-root.service.in b/units/systemd-fsck-root.service.in
index 4162983..0668107 100644
--- a/units/systemd-fsck-root.service.in
......
......@@ -8,11 +8,11 @@ configuration and use /etc/default/keyboard instead of
Path courtesy of Steve Langasek.
---
src/locale/localed.c | 214 +++++++++++++++++++++++++++------------------------
1 file changed, 113 insertions(+), 101 deletions(-)
src/locale/localed.c | 212 +++++++++++++++++++++++++++------------------------
1 file changed, 114 insertions(+), 98 deletions(-)
diff --git a/src/locale/localed.c b/src/locale/localed.c
index 23da149..4db8bef 100644
index 23da149..0e09ad9 100644
--- a/src/locale/localed.c
+++ b/src/locale/localed.c
@@ -170,6 +170,24 @@ static int locale_read_data(Context *c) {
......@@ -40,7 +40,7 @@ index 23da149..4db8bef 100644
if (r == -ENOENT) {
int p;
@@ -206,72 +224,17 @@ static int vconsole_read_data(Context *c) {
@@ -206,70 +224,19 @@ static int vconsole_read_data(Context *c) {
}
static int x11_read_data(Context *c) {
......@@ -107,21 +107,20 @@ index 23da149..4db8bef 100644
- } else if (in_section && first_word(l, "EndSection"))
- in_section = false;
- }
-
- fclose(f);
-
- return 0;
+ r = parse_env_file("/etc/default/keyboard", NEWLINE,
+ "XKBMODEL", &c->x11_model,
+ "XKBLAYOUT", &c->x11_layout,
+ "XKBVARIANT", &c->x11_variant,
+ "XKBOPTIONS", &c->x11_options,
+ NULL);
+ return r;
}
static int context_read_data(Context *c) {
@@ -287,8 +250,13 @@ static int context_read_data(Context *c) {
- fclose(f);
+ if (r < 0 && r != -ENOENT)
+ return r;
return 0;
}
@@ -287,8 +254,13 @@ static int context_read_data(Context *c) {
static int locale_write_data(Context *c) {
int r, p;
char **l = NULL;
......@@ -136,7 +135,7 @@ index 23da149..4db8bef 100644
if (r < 0 && r != -ENOENT)
return r;
@@ -320,13 +288,13 @@ static int locale_write_data(Context *c) {
@@ -320,13 +292,13 @@ static int locale_write_data(Context *c) {
if (strv_isempty(l)) {
strv_free(l);
......@@ -152,7 +151,7 @@ index 23da149..4db8bef 100644
strv_free(l);
return r;
@@ -447,57 +415,101 @@ static int vconsole_write_data(Context *c) {
@@ -447,57 +419,101 @@ static int vconsole_write_data(Context *c) {
}
static int write_data_x11(Context *c) {
......@@ -219,26 +218,28 @@ index 23da149..4db8bef 100644
+ strv_free(l);
+ return -ENOMEM;
+ }
+
+ u = strv_env_set(l, t);
+ free(t);
+ strv_free(l);
- r = fopen_temporary("/etc/X11/xorg.conf.d/00-keyboard.conf", &f, &temp_path);
- if (r < 0)
- return r;
+ if (!u)
+ return -ENOMEM;
+ u = strv_env_set(l, t);
+ free(t);
+ strv_free(l);
- fchmod(fileno(f), 0644);
+ l = u;
+ }
+ if (!u)
+ return -ENOMEM;
- fputs("# Read and parsed by systemd-localed. It's probably wise not to edit this file\n"
- "# manually too freely.\n"
- "Section \"InputClass\"\n"
- " Identifier \"system-keyboard\"\n"
- " MatchIsKeyboard \"on\"\n", f);
+ l = u;
+ }
- if (!isempty(c->x11_layout))
- fprintf(f, " Option \"XkbLayout\" \"%s\"\n", c->x11_layout);
+ if (isempty(c->x11_options)) {
+ l = strv_env_unset(l, "XKBOPTIONS");
+ } else {
......@@ -247,24 +248,22 @@ index 23da149..4db8bef 100644
+ return -ENOMEM;
+ }
- if (!isempty(c->x11_layout))
- fprintf(f, " Option \"XkbLayout\" \"%s\"\n", c->x11_layout);
- if (!isempty(c->x11_model))
- fprintf(f, " Option \"XkbModel\" \"%s\"\n", c->x11_model);
+ u = strv_env_set(l, t);
+ free(t);
+ strv_free(l);
- if (!isempty(c->x11_model))
- fprintf(f, " Option \"XkbModel\" \"%s\"\n", c->x11_model);
+ if (!u)
+ return -ENOMEM;
- if (!isempty(c->x11_variant))
- fprintf(f, " Option \"XkbVariant\" \"%s\"\n", c->x11_variant);
+ l = u;
+ }
+ if (!u)
+ return -ENOMEM;
- if (!isempty(c->x11_options))
- fprintf(f, " Option \"XkbOptions\" \"%s\"\n", c->x11_options);
+ l = u;
+ }
+
+ if (strv_isempty(l)) {
+ strv_free(l);
......
From: Lennart Poettering <lennart@poettering.net>
Date: Wed, 1 Mar 2017 04:03:48 +0100
Subject: automount: if an automount unit is masked,
don't react to activation anymore (#5445)
Otherwise we'll hit an assert sooner or later.
This requires us to initialize ->where even if we come back in "masked"
mode, as otherwise we don't know how to operate on the automount and
detach it.
Fixes: #5441
(backported from commit e350ca3f1ecb6672b74cd25d09ef23c7b309aa5a)
---
src/core/automount.c | 67 +++++++++++++++++++++++++++++++++++-----------------
1 file changed, 45 insertions(+), 22 deletions(-)
diff --git a/src/core/automount.c b/src/core/automount.c
index 73a8ce1..4392635 100644
--- a/src/core/automount.c
+++ b/src/core/automount.c
@@ -87,17 +87,19 @@ static void unmount_autofs(Automount *a) {
if (a->pipe_fd < 0)
return;
- automount_send_ready(a, -EHOSTDOWN);
a->pipe_event_source = sd_event_source_unref(a->pipe_event_source);
a->pipe_fd = safe_close(a->pipe_fd);
- /* If we reload/reexecute things we keep the mount point
- * around */
- if (a->where &&
- (UNIT(a)->manager->exit_code != MANAGER_RELOAD &&
- UNIT(a)->manager->exit_code != MANAGER_REEXECUTE))
- repeat_unmount(a->where);
+ /* If we reload/reexecute things we keep the mount point around */
+ if (!IN_SET(UNIT(a)->manager->exit_code, MANAGER_RELOAD, MANAGER_REEXECUTE)) {
+
+ automount_send_ready(a, -EHOSTDOWN);
+
+ if (a->where) {
+ repeat_unmount(a->where);
+ }
+ }
}
static void automount_done(Unit *u) {
@@ -169,6 +171,21 @@ static int automount_verify(Automount *a) {
return 0;
}
+static int automount_set_where(Automount *a) {
+
+ assert(a);
+
+ if (a->where)
+ return 0;
+
+ a->where = unit_name_to_path(UNIT(a)->id);
+ if (!a->where)
+ return -ENOMEM;
+
+ path_kill_slashes(a->where);
+ return 1;
+}
+
static int automount_load(Unit *u) {
Automount *a = AUTOMOUNT(u);
int r;
@@ -184,13 +201,9 @@ static int automount_load(Unit *u) {
if (u->load_state == UNIT_LOADED) {
Unit *x;
- if (!a->where) {
- a->where = unit_name_to_path(u->id);
- if (!a->where)
- return -ENOMEM;
- }
-
- path_kill_slashes(a->where);
+ r = automount_set_where(a);
+ if (r < 0)
+ return r;
r = unit_load_related_unit(u, ".mount", &x);
if (r < 0)
@@ -242,21 +255,25 @@ static int automount_coldplug(Unit *u) {
assert(a);
assert(a->state == AUTOMOUNT_DEAD);
- if (a->deserialized_state != a->state) {
+ if (a->deserialized_state == a->state)
+ return 0;
+
+ if (IN_SET(a->deserialized_state, AUTOMOUNT_WAITING, AUTOMOUNT_RUNNING)) {
+
+ r = automount_set_where(a);
+ if (r < 0)
+ return r;
r = open_dev_autofs(u->manager);
if (r < 0)
return r;
- if (a->deserialized_state == AUTOMOUNT_WAITING ||
- a->deserialized_state == AUTOMOUNT_RUNNING) {
+ assert(a->pipe_fd >= 0);
- assert(a->pipe_fd >= 0);
+ r = sd_event_add_io(u->manager->event, &a->pipe_event_source, a->pipe_fd, EPOLLIN, automount_dispatch_io, u);
+ if (r < 0)
+ return r;
- r = sd_event_add_io(u->manager->event, &a->pipe_event_source, a->pipe_fd, EPOLLIN, automount_dispatch_io, u);
- if (r < 0)
- return r;
- }
automount_set_state(a, a->deserialized_state);
}
@@ -548,6 +565,12 @@ static void automount_enter_runnning(Automount *a) {
assert(a);
+ /* If the user masked our unit in the meantime, fail */
+ if (UNIT(a)->load_state != UNIT_LOADED) {
+ log_error_unit(UNIT(a)->id, "Suppressing automount event since unit is no longer loaded.");
+ goto fail;
+ }
+
/* We don't take mount requests anymore if we are supposed to
* shut down anyway */
if (unit_stop_pending(UNIT(a))) {
From: David Herrmann <dh.herrmann@gmail.com>
Date: Thu, 18 Sep 2014 13:28:28 +0200
Subject: bus: fix bus_print_property() to use "int" for booleans
We always use "int" if we retrieve boolean values from sd-bus, as "bool"
is only a single byte, but full int on va-args.
Thanks to Werner Fink for the report!
(cherry picked from commit c2fa048c4a70c8386c6d8fe939e5ea9edecf1e98)
---
src/libsystemd/sd-bus/bus-util.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libsystemd/sd-bus/bus-util.c b/src/libsystemd/sd-bus/bus-util.c
index 6441c5b..d0b7c3d 100644
--- a/src/libsystemd/sd-bus/bus-util.c
+++ b/src/libsystemd/sd-bus/bus-util.c
@@ -631,7 +631,7 @@ int bus_print_property(const char *name, sd_bus_message *property, bool all) {
}
case SD_BUS_TYPE_BOOLEAN: {
- bool b;
+ int b;
r = sd_bus_message_read_basic(property, type, &b);
if (r < 0)
From: Jan Pazdziora <jpazdziora@redhat.com>
Date: Fri, 13 Mar 2015 12:57:18 +0100
Subject: console-getty.service: don't start when /dev/console is missing
Create minimal image which runs systemd
FROM rhel7.1
RUN yum install -y /usr/bin/ps
ENV container docker
CMD [ "/usr/sbin/init" ]
When you run the container without -t, the process
/sbin/agetty --noclear --keep-baud console 115200 38400 9600
is not happy and checking the journal in the container, there is a stream of
Mar 13 04:50:15 11bf07f59fff agetty[66]: /dev/console: No such file or directory
Mar 13 04:50:25 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
Mar 13 04:50:25 11bf07f59fff systemd[1]: Stopping Console Getty...
Mar 13 04:50:25 11bf07f59fff systemd[1]: Starting Console Getty...
Mar 13 04:50:25 11bf07f59fff systemd[1]: Started Console Getty.
Mar 13 04:50:25 11bf07f59fff agetty[67]: /dev/console: No such file or directory
Mar 13 04:50:35 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
Mar 13 04:50:35 11bf07f59fff systemd[1]: Stopping Console Getty...
Mar 13 04:50:35 11bf07f59fff systemd[1]: Starting Console Getty...
Mar 13 04:50:35 11bf07f59fff systemd[1]: Started Console Getty.
Mar 13 04:50:35 11bf07f59fff agetty[74]: /dev/console: No such file or directory
Mar 13 04:50:45 11bf07f59fff systemd[1]: console-getty.service holdoff time over, scheduling restart.
Mar 13 04:50:45 11bf07f59fff systemd[1]: Stopping Console Getty...
Mar 13 04:50:45 11bf07f59fff systemd[1]: Starting Console Getty...
(cherry-picked from commit 1b41981d9a62443d566df6bcabc1b5024e9f5e4a)
---
units/console-getty.service.m4.in | 1 +
1 file changed, 1 insertion(+)
diff --git a/units/console-getty.service.m4.in b/units/console-getty.service.m4.in
index 8ac51a4..413d940 100644
--- a/units/console-getty.service.m4.in
+++ b/units/console-getty.service.m4.in
@@ -9,6 +9,7 @@
Description=Console Getty
Documentation=man:agetty(8)
After=systemd-user-sessions.service plymouth-quit-wait.service
+ConditionPathExists=/dev/console
m4_ifdef(`HAVE_SYSV_COMPAT',
After=rc-local.service
)m4_dnl