Lennart Poettering [Thu, 30 Mar 2017 09:54:23 +0000 (11:54 +0200)]
README: document that gperf 3.1 is required for building now
Jan Synacek [Wed, 29 Mar 2017 06:25:52 +0000 (08:25 +0200)]
basic: forbid rm_rf() to remove paths ending with ".." (#5653)
Fixes: #5644
Zbigniew Jędrzejewski-Szmek [Mon, 27 Mar 2017 10:55:55 +0000 (06:55 -0400)]
units: make enablement of s-n-wait-online.service follow systemd-networkd.service (#5635)
In
58a6dd15582c038a25bd7059435833943e2e4617 s-n-wait-online.service was added
to presets to synchronize the presets with the state after installation. But it
is harmful to have s-n-wait-online.service enabled when s-n.service is
disabled, because s-n-wait-online.service has Requsite=s-n.service and cannot
be activated. Thus remove s-n-wait-online.service from presets again, and let
it be enabled whenever s-n.service is enabled.
During installation we create enablement symlinks by hand, and since s-n.service
is enabled, s-n-w-o.service should be enabled too, so the symlink should still
be created during installation.
https://bugzilla.redhat.com/show_bug.cgi?id=1433459#c15
Zbigniew Jędrzejewski-Szmek [Mon, 27 Mar 2017 10:34:24 +0000 (06:34 -0400)]
rules: add a rule to set /dev/kvm access mode and ownership (#5597)
Kernel default mode is 0600, but distributions change it to group kvm, mode
either 0660 (e.g. Debian) or 0666 (e.g. Fedora). Both approaches have valid
reasons (a stricter mode limits exposure to bugs in the kvm subsystem, a looser
mode makes libvirt and other virtualization mechanisms work out of the box for
unprivileged users over ssh).
In Fedora the qemu package carries the relevant rule, but it's nicer to have it
in systemd, so that the permissions are not dependent on the qemu package being
installed. Use of packaged qemu binaries is not required to make use of
/dev/kvm, e.g. it's possible to use a self-compiled qemu or some alternative.
https://bugzilla.redhat.com/show_bug.cgi?id=1431876
To accomodate both approaches, add a rule to set the mode in 50-udev-default.rules,
but allow the mode to be overridden with a --with-dev-kvm-mode configure rule.
The default is 0660, as the (slightly) more secure option.
flussence [Mon, 27 Mar 2017 00:00:40 +0000 (00:00 +0000)]
hwdb: add resolution values for Waltop USB tablet (#5634)
Newer versions of libinput need this to recognise it as an input device.
https://bugs.freedesktop.org/show_bug.cgi?id=99664
Thomas Haller [Fri, 24 Mar 2017 14:36:06 +0000 (15:36 +0100)]
basic: don't link "libm.so" into "libbasic.so" (#5628)
Very few parts of the systemd source require <math.h> or "libm.so".
Linking libbasic with -lm drags the mathematical library in for all
systemd components, and in turn for all users of systemd libraries.
It's just unneeded.
Michael Biebl [Thu, 23 Mar 2017 03:37:06 +0000 (04:37 +0100)]
units: simplify rescue.service and emergency.service (#5623)
The emergency.service and rescue.service units have become rather
convoluted. We spawn multiple shells and the help text spans multiple lines
which makes the units hard to read.
Move the logic into a single shell script and call that via ExecStart.
Michael Biebl [Wed, 22 Mar 2017 16:55:36 +0000 (17:55 +0100)]
build-sys: minor indentation fix
John Paul Adrian Glaubitz [Wed, 22 Mar 2017 02:36:50 +0000 (03:36 +0100)]
basic/journal-importer: Fix unaligned access in get_data_size() (#5622)
Zbigniew Jędrzejewski-Szmek [Wed, 22 Mar 2017 02:30:32 +0000 (22:30 -0400)]
Merge pull request #5531 from yuwata/mdns
resolved: do not start LLMNR or mDNS stack when no network enables them
Yu Watanabe [Tue, 21 Mar 2017 04:30:48 +0000 (13:30 +0900)]
resolved: detect and warn other running LLMNR stack
Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
even if another LLMNR stack is running, `bind` always success and
we cannot detect the other stack. By this commit, we first try to
`bind` without `SO_REUSEADDR`, and if it fails, show warning and
retry with `SO_REUSEADDR`.
Yu Watanabe [Thu, 16 Mar 2017 05:30:16 +0000 (14:30 +0900)]
resolved: add global config option to control mDNS stack
Yu Watanabe [Tue, 21 Mar 2017 04:34:52 +0000 (13:34 +0900)]
resolved: detect and warn other running mDNS stack
Previously, `SO_REUSEADDR` is set before `bind`-ing socket, Thus,
even if another mDNS stack (e.g. avahi) is running, `bind` always
success and we cannot detect the other stack.
By this commit, we first try to `bind` without `SO_REUSEADDR`,
and if it fails, show warning and retry with `SO_REUSEADDR`.
Yu Watanabe [Thu, 16 Mar 2017 06:52:34 +0000 (15:52 +0900)]
resolved: do not start LLMNR or mDNS stack when no network enables them
When no network enables LLMNR or mDNS, it is not necessary to create
LLMNR or mDNS related sockets. So, let's create them only when
LLMNR- or mDNS-enabled network becomes active or at least one network
enables `LLMNR=` or `MulticastDNS=` options.
Daniel Molkentin [Tue, 21 Mar 2017 02:26:05 +0000 (03:26 +0100)]
units: apply plymouth warning fix to in rescue mode as well (#5615)
Follow up for #5528.
Lucas Werkmeister [Tue, 21 Mar 2017 00:32:23 +0000 (01:32 +0100)]
man: change /lib to /usr/lib (#5618)
Per man:file-hierarchy(7), /lib is just a compatibility symlink; the
other manpages also refer to /usr/lib.
Found with:
git grep -P '(?<!/usr|/var|local)/lib' man/
Felix Zhang [Mon, 20 Mar 2017 10:27:39 +0000 (18:27 +0800)]
systemctl: fix broken vertical lines in list-dependencies --all (#5608)
John Paul Adrian Glaubitz [Mon, 20 Mar 2017 10:22:54 +0000 (11:22 +0100)]
rules: allow SPARC vdisk devices when identifying CD drives (#5599)
hanklank [Mon, 20 Mar 2017 03:56:34 +0000 (04:56 +0100)]
Updated Swedish translation (#5614)
Daniel Molkentin [Fri, 17 Mar 2017 11:13:19 +0000 (12:13 +0100)]
units: do not throw a warning in emergency mode if plymouth is not installed (#5528)
Ideally, plymouth should only be referenced via dependencies,
not ExecStartPre's. This at least avoids the confusing error message
on minimal installations that do not carry plymouth.
Zbigniew Jędrzejewski-Szmek [Thu, 16 Mar 2017 12:42:22 +0000 (08:42 -0400)]
Merge (¾ of) pull request #5596 from matijaskala/master
Djalal Harouni [Thu, 16 Mar 2017 02:30:15 +0000 (03:30 +0100)]
base-filesystem: skip fchownat() if the previous mkdirat() on same path failed (#5548)
If we are working on a path that was marked to be ignored on errors, and
the mkdirat() fails then add a continue statement and skip fchownat() call.
This avoids the case where UID/GID are valid and we run fchownat() on
non existent path which will fail hard even on paths that we want to
ignore in case of errors.
Matija Skala [Wed, 15 Mar 2017 13:16:40 +0000 (14:16 +0100)]
check for _POSIX_C_SOURCE instead of __USE_POSIX*
check for _GNU_SOURCE as well as sd_event_child_handler_t needs to be
defined correctly while compiling systemd
Matija Skala [Wed, 15 Mar 2017 12:49:05 +0000 (13:49 +0100)]
assigning stdout and stderr is not allowed
AlexanderKurtz [Thu, 16 Mar 2017 00:33:56 +0000 (01:33 +0100)]
man: Fix a simple grammar error in systemd.service.xml (#5594)
Matija Skala [Wed, 15 Mar 2017 12:21:10 +0000 (13:21 +0100)]
fix includes
linux/sockios.h is needed for the SIOCGSTAMPNS macro
xlocale.h is included indirectly in glibc and doesn't even exist in
other libcs
steelman [Tue, 14 Mar 2017 23:16:47 +0000 (00:16 +0100)]
build-sys: make RPM macros installation path configurable (#5564)
--with-rpmmacrosdir=no disables installation of the macros.
Adrian Heine né Lang [Tue, 14 Mar 2017 21:42:18 +0000 (22:42 +0100)]
man: Document when pam_systemd sets XDG_RUNTIME_DIR (#5570)
https://github.com/systemd/systemd/blob/
f97b34a6/src/login/pam_systemd.c#L439
Michal Sekletar [Tue, 14 Mar 2017 21:38:19 +0000 (22:38 +0100)]
machinectl: don't return 1 in case we couldn't figure out container IP addresses (#5587)
This is in spirit very similar to commit
4b2419165ce409ee55ce96a926302f89685f2293.
Fixes: #5581
Tobias Stoeckmann [Tue, 14 Mar 2017 21:33:22 +0000 (22:33 +0100)]
Never call unmap with MAP_FAILED. (#5590)
When mmap is called, the code in correctly checks for p == MAP_FAILED.
But the resource cleanup at the end of busname_peek_message checks for
p == NULL, and if that's not true, munmap is called.
Therefore in error case, munmap is called with a MAP_FAILED argument
which can result in unexpected behaviour depending on sz's value.
Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
Tobias Stoeckmann [Mon, 13 Mar 2017 07:14:42 +0000 (08:14 +0100)]
journal: prevent integer overflow while validating header (#5569)
It is possible to overflow uint64_t while validating the header of
a journal file. To prevent this, the addition itself is checked to
be within the limits of UINT64_MAX first.
To keep this readable, I have introduced two stack variables which
hold the converted values during validation.
Martin Pitt [Mon, 13 Mar 2017 07:12:45 +0000 (08:12 +0100)]
Merge pull request #5571 from keszybz/tarball-generation-tweaks
Tarball generation tweaks
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2017 07:11:24 +0000 (03:11 -0400)]
headers: check that __INCLUDE_LEVEL__ is defined before using it (#5575)
That macro is a gcc extension, and while widely supported, not ubiquitous.
In particular the coverity scanner is having trouble with it.
Zbigniew Jędrzejewski-Szmek [Mon, 13 Mar 2017 07:10:04 +0000 (03:10 -0400)]
README: include small graphs of open issues and pull requests (#5576)
Yu Watanabe [Mon, 13 Mar 2017 00:12:03 +0000 (09:12 +0900)]
resolve: add missing space in output message (#5574)
Zbigniew Jędrzejewski-Szmek [Sun, 12 Mar 2017 00:17:38 +0000 (19:17 -0500)]
build-sys: add helper command to sign tarballs
Zbigniew Jędrzejewski-Szmek [Sun, 12 Mar 2017 00:09:27 +0000 (19:09 -0500)]
build-sys: simplify git tar invocation
git is nowadays nice enough to compress based on the output file suffix,
let's make use of that.
Zbigniew Jędrzejewski-Szmek [Sun, 12 Mar 2017 00:00:08 +0000 (19:00 -0500)]
build-sys: make more targets .PHONY
Michal Sekletar [Fri, 10 Mar 2017 14:16:24 +0000 (15:16 +0100)]
Fix typo in function name (#5565)
Bastien Nocera [Thu, 9 Mar 2017 15:40:25 +0000 (16:40 +0100)]
hwdb: Add new quirk type to documentation
Missed in b698b5c.
Zbigniew Jędrzejewski-Szmek [Thu, 9 Mar 2017 15:30:40 +0000 (10:30 -0500)]
Merge pull request #5560 from hadess/keyboard-leds
hwdb: Add property for keyboards without LEDs
Bastien Nocera [Thu, 9 Mar 2017 13:53:52 +0000 (14:53 +0100)]
hwdb: Add property for keyboards without LEDs
It is useful for desktop environments to be able to show Caps-Lock or
Num-Lock status changes as an on-screen display when using a keyboard
that doesn't have LEDs for this.
Closes: #5559
Bastien Nocera [Thu, 9 Mar 2017 13:47:53 +0000 (14:47 +0100)]
hwdb: Better documentation for keyboard quirks
Split up the device matching explanation, and add documentation for
the fixed layout quirk.
Martin Pitt [Wed, 8 Mar 2017 13:20:11 +0000 (14:20 +0100)]
build-sys: only install legacy *.pkla files with old polkit versions (#5555)
The legacy *.pkla files are not required when running against polkit ≥ 106,
and we want to avoid shipping files in /var if possible (but pkla files
can only be in /etc/ or /var).
Only install the *.pkla files if we detect an old polkit version during
configure. Don't install them if polkit isn't installed during build, as
distributions other than Debian-based ones have moved to the new polkit
long ago.
Fixes #5523
Torstein Husebø [Wed, 8 Mar 2017 12:54:22 +0000 (13:54 +0100)]
man: fix typo (#5556)
AsciiWolf [Tue, 7 Mar 2017 15:04:45 +0000 (16:04 +0100)]
docs: use https in the mailing list url
Zbigniew Jędrzejewski-Szmek [Tue, 7 Mar 2017 13:33:27 +0000 (08:33 -0500)]
docs: add a note about reporting security vulns (#5541)
We *do* have the occasional security issue, where it would be nice to have
non-public disclosure and time to fix the issue before it's fully public. Our
github infrastracture does not make it easy to report vulnerabilities in
confidential manner, so let's leverage the distro mechanisms for that. I
think we're better off with this solution than leaving it up to individual
reporters to discover some mechanism on their own.
Peter Hutterer [Tue, 7 Mar 2017 06:55:58 +0000 (16:55 +1000)]
rules: set ID_BUS=bluetooth for any device with id/bustype attr of 0x0005 (#5539)
Not all bluetooth devices come through the bluetooth subsystem and those that
don't currently lack the ID_BUS=bluetooth env. This again fails to apply udev
rules and/or hwdb entries that rely on the bluetooth bustype to be set.
Fix this by checking the attribute id/bustype on the device instead of just
the subsystem.
Fixes #4566
AsciiWolf [Tue, 7 Mar 2017 06:51:35 +0000 (07:51 +0100)]
sd-bus: drop kdbus-related docs (#5533)
Thomas H. P. Andersen [Tue, 7 Mar 2017 06:47:18 +0000 (07:47 +0100)]
cgtop: use PRIu64 to print uint64_t (#5544)
Commit
59f448cf replaced usage of off_t with uint64_t. Change the
format string to use PRIu64 to match it.
Djalal Harouni [Mon, 6 Mar 2017 16:25:40 +0000 (17:25 +0100)]
Merge pull request #5540 from keszybz/coredump-eof-fix
coredump: fix handling of premature-eof for --backtrace
Zbigniew Jędrzejewski-Szmek [Sun, 5 Mar 2017 15:35:44 +0000 (10:35 -0500)]
coredump: fix handling of premature-eof data for --backtrace
We'd fail with an assert in journal_importer_process_data(),
because that function requires the caller to handle EOF themselves.
Djalal Harouni [Sun, 5 Mar 2017 13:55:48 +0000 (14:55 +0100)]
Merge pull request #5525 from martinpitt/khash-notsupp
test: skip instead of fail if crypto kmods are not available
Dax Kelson [Sun, 5 Mar 2017 12:03:53 +0000 (05:03 -0700)]
import: bump image size safety limit for machinectl pull (#5535)
We currenly use 40GB images in our environment
hadess [Sat, 4 Mar 2017 14:35:25 +0000 (15:35 +0100)]
Merge pull request #5510 from phomes/accel-hwdb
hwdb: quirks for accelerometers in HP laptops
Thomas Hindoe Paaboel Andersen [Fri, 3 Mar 2017 20:35:57 +0000 (21:35 +0100)]
hwdb: quirks for accelerometers in HP laptops
This patch adds quirks for the two laptops I could test on
(8540w and 8560w). The accelerometer is configured in the
kernel to report values according to the base of the laptop.
We want the values according to the screen instead.
It is likely (but untested) to match all HP laptops with the
lis3lv02d accelerometer on this list:
https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/platform/x86/hp_accel.c#n207
Thomas Hindoe Paaboel Andersen [Fri, 3 Mar 2017 20:23:39 +0000 (21:23 +0100)]
rules: allow quirks for platform input accelerometers
Martin Pitt [Thu, 2 Mar 2017 22:42:01 +0000 (23:42 +0100)]
test: skip instead of fail if crypto kmods are not available
Package build machines may have module loading disabled, thus AF_ALG
sockets are not available. Skip the tests that cover those (khash and
id128) instead of failing them in this case.
Fixes #5524
Michael Biebl [Thu, 2 Mar 2017 18:11:37 +0000 (19:11 +0100)]
Avoid strict DM interface version dependencies (#5519)
Compiling against the dm-ioctl.h header as provided by the Linux kernel
will embed the DM interface version number. Running an older kernel can
result in an error like this on shutdown:
Could not detach DM dm-11: ioctl mismatch, kernel(4.34.4), user(4.35.4)
Work around this by shipping a local copy of dm-ioctl.h. We need at
least the version from 3.13 for DM_DEFERRED_REMOVE [1], so bump the
requirements in README accordingly.
[1] https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=
2c140a246dc0bc085b98eddde978060fcec1080c
Fixes: #5492
Zbigniew Jędrzejewski-Szmek [Thu, 2 Mar 2017 16:55:45 +0000 (11:55 -0500)]
build-sys: do not require everything to be rebuild to push man pages (#5521)
When the doc-sync target was created, we didn't have man target yet.
Lennart Poettering [Thu, 2 Mar 2017 16:54:13 +0000 (17:54 +0100)]
Merge pull request #5515 from glaubitz/master
Refine sub-architecture detection in basic/architecture
John Paul Adrian Glaubitz [Thu, 2 Mar 2017 00:51:53 +0000 (01:51 +0100)]
basic/architecture: Add sub-architecture types for SuperH
On SuperH, there are multiple sub-architectures defined with
different values for LIB_ARCH_TUPLE. The different sub-
architectures can be detected by checking whether __SH1__,
__SH2__, __SH3__, __SH4__, and so on are defined.
John Paul Adrian Glaubitz [Thu, 2 Mar 2017 00:51:11 +0000 (01:51 +0100)]
basic/architecture: Properly set LIB_ARCH_TUPLE for powerpcspe
On powerpc, there are two possible ABIs and hence values for
LIB_ARCH_TUPLE. The convential type with an FPU and the embedded
variant, called powerpcspe, which does not have a convential FPU
but a special Signal Processing Engine (SPE). The latter can be
detected by checking whether __NO_FPRS__ is defined.
John Paul Adrian Glaubitz [Thu, 2 Mar 2017 00:50:36 +0000 (01:50 +0100)]
basic/architecture: Properly set LIB_ARCH_TUPLE for x32
On x86_64, there are two possible ABIs and hence values for
LIB_ARCH_TUPLE. The convential 64-bit type and the 32-bit
variant, called x32. The latter can be detected by checking
whether __ILP32__ is defined.
Zbigniew Jędrzejewski-Szmek [Thu, 2 Mar 2017 00:27:44 +0000 (19:27 -0500)]
Revert "environment.d: fix date"
This reverts commit
46987593ccb1c78f3889ea91a0c94f9cc810d43c.
Pushed to the wrong repo, sorry.
Zbigniew Jędrzejewski-Szmek [Thu, 2 Mar 2017 00:27:09 +0000 (19:27 -0500)]
environment.d: fix date
Lucas Werkmeister [Thu, 2 Mar 2017 00:08:32 +0000 (01:08 +0100)]
NEWS: fix word (#5514)
Daniel Drake [Tue, 28 Feb 2017 17:54:53 +0000 (11:54 -0600)]
hwdb: Endless ELT-NL3 accelerometer support
The Endless ELT-NL3 laptop has an accelerometer but its values are
not being interpreted correctly, meaning that it's very easy to end up
with the screen rotated inappropriately.
Add an appropriate mount matrix to correct the values.
P: /devices/LNXSYSTM:00/LNXSYBUS:00/
ACCE0001:00
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/
ACCE0001:00
E: DRIVER=cmpc_accel_v4
E: ID_VENDOR_FROM_DATABASE=Accton Technology Corporation
E: MODALIAS=acpi:
ACCE0001:
E: SUBSYSTEM=acpi
P: /devices/LNXSYSTM:00/LNXSYBUS:00/
ACCE0001:00/input/input8
E: ABS=7
E: ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, -1; -1, 0, 0
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/
ACCE0001:00/input/input8
E: EV=9
E: ID_FOR_SEAT=input-acpi-ACCE0001_00
E: ID_INPUT=1
E: ID_INPUT_ACCELEROMETER=1
E: ID_PATH=acpi-
ACCE0001:00
E: ID_PATH_TAG=acpi-ACCE0001_00
E: IIO_SENSOR_PROXY_TYPE=input-accel
E: MODALIAS=input:b0000v0000p0000e0000-e0,3,kra0,1,2,mlsfw
E: NAME="cmpc_accel_v4"
E: PRODUCT=0/0/0/0
E: PROP=0
E: SUBSYSTEM=input
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:seat:systemd:
P: /devices/LNXSYSTM:00/LNXSYBUS:00/
ACCE0001:00/input/input8/event7
N: input/event7
E: ACCEL_MOUNT_MATRIX=0, 1, 0; 0, 0, -1; -1, 0, 0
E: DEVNAME=/dev/input/event7
E: DEVPATH=/devices/LNXSYSTM:00/LNXSYBUS:00/
ACCE0001:00/input/input8/event7
E: ID_INPUT=1
E: ID_INPUT_ACCELEROMETER=1
E: ID_PATH=acpi-
ACCE0001:00
E: ID_PATH_TAG=acpi-ACCE0001_00
E: IIO_SENSOR_PROXY_TYPE=input-accel
E: MAJOR=13
E: MINOR=71
E: SUBSYSTEM=input
E: SYSTEMD_WANTS=iio-sensor-proxy.service
E: TAGS=:power-switch:systemd:
Daniel Drake [Tue, 28 Feb 2017 17:38:18 +0000 (11:38 -0600)]
udev: Allow quirks for ACPI input accelerometers
The existing accelerometer rules only support IIO devices, however
iio-sensor-proxy can also work with accelerometers made available
through the input (evdev) subsystem.
In this case I am working with an accelerometer input device backed by an
ACPI driver for which the hierarchy is:
-
ACCE0001 (ACPI device)
-> input8
-> event7
We want the mount matrix (from hwdb) to be applied to both input8 and
event7. However, to match in 60-sensor.hwdb, we need to be working
with the modalias of the parent device (
ACCE0001), and it is tricky
to access that when processing the input8 device which has it's own
modalias.
Instead of working directly with modalias, this ACPI-specific rule
uses the "hid" attribute to reconstruct the ACPI modalias. Since input
and event devices do not provide a hid attribute we will always get this
from the ACPI parent.
The modalias is constructed according to the definition in the kernel's
Documentation/acpi/namespace.txt and create_pnp_modalias(). We will only
use the first _CID/_HID value available, i.e. in some cases we will only
reconstruct the first part of the modalias, but that should be enough
granularity for our needs.
Lennart Poettering [Wed, 1 Mar 2017 22:35:06 +0000 (23:35 +0100)]
Merge pull request #5283 from poettering/tighten-sandbox
Tighten sandbox of long-running services
Lennart Poettering [Wed, 1 Mar 2017 21:43:06 +0000 (22:43 +0100)]
NEWS: 'systemd' is always spelt with a lowercase 's'
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 21:29:38 +0000 (16:29 -0500)]
NEWS: add note about 'make install-tests' (#5512)
Lennart Poettering [Wed, 1 Mar 2017 21:14:33 +0000 (22:14 +0100)]
Merge pull request #5502 from poettering/coredump-mini-fixes
Coredump mini improvments
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 21:14:12 +0000 (16:14 -0500)]
NEWS: reorder entries by subject, fix some typos and descriptions (#5511)
This doesn't add anything major, but moves some stuff around.
In particular changes which might require updates to the build
environment (new kernel requirements, cgroup stuff, dbus, etc)
are moved to the top, where it's most likely that people will
read them. In particular cgroup hierarchy changes are moved to the
top because they're most likely to be problematic.
Various items are grouped by subject where it's easy.
The description of list-jobs --after/--before was reversed.
Viktor Mihajlovski [Wed, 1 Mar 2017 20:30:17 +0000 (21:30 +0100)]
udev: Use parent bus id for virtio disk builtin path-id (#5500)
The builtin path id for virtio block devices has been changed
to use the bus id without a prefix "virtio-pci" to be
compatible with all virtio transport types.
In order to not break existing setups, the by-path symlinks for
virtio block devices on the PCI bus are reintroduced by udev rules.
The virtio-pci symlinks are considered to be deprecated and
should be replaced by the native PCI symlinks.
Example output for a virtio disk in PCI slot 7:
$ ls /dev/disk/by-path
pci-0000:00:07.0
pci-0000:00:07.0-part1
virtio-pci-0000:00:07.0
virtio-pci-0000:00:07.0-part1
See also
[1] https://lists.freedesktop.org/archives/systemd-devel/2017-February/038326.html
[2] https://lists.freedesktop.org/archives/systemd-devel/2017-March/038397.html
This reverts f073b1b but keeps the same symlinks for compatibility.
Lucas Werkmeister [Wed, 1 Mar 2017 20:24:18 +0000 (21:24 +0100)]
man: escape: fix --suffix examples (#5508)
systemd-escape does not permit the suffix to begin with a dot.
Lennart Poettering [Wed, 1 Mar 2017 20:22:02 +0000 (21:22 +0100)]
Revert "util: Fine tune running_in_chroot() a bit" (#5506)
This reverts commit
295ee9845c801300298d01256eb5a9e3ff117ae0.
Let'd revert this for now, see #5446 for discussions.
We want systemd-detect-virt --chroot to return true for all chroot-like stuff, for
example mock environments which have use a mount namespace. The downside
of this revert that systemctl will not work from our own namespaced services, anything
with RootDirectory=/RootImage= set.
Lucas Werkmeister [Wed, 1 Mar 2017 17:33:02 +0000 (18:33 +0100)]
man: systemd: fix description of SIGRTMIN+26,27,28 (#5505)
Lennart Poettering [Wed, 1 Mar 2017 15:00:47 +0000 (16:00 +0100)]
coredump: define a macro for a "short bus call timeout"
I think it would be a good idea to move such fixed, picked values out of
the main sources into the head of a file, to make sure they are
ultimately tunables.
Lennart Poettering [Wed, 1 Mar 2017 14:58:40 +0000 (15:58 +0100)]
coredump: introduce is_journald_crash() and is_pid1_crash() helpers
We check these a number of times, hence let's unify these checks here.
This also allows us to make the PID 1 check more elaborate as we can
check both the PID and the cgroup. Checking the PID has the benefit that
we'll also cover cases where PID 1 might still be in the root cgroup, and
the cgroup check has the benefit that we also cover crashes in forked
off crasher processes (the way we actually do it in systemd)
Lennart Poettering [Wed, 1 Mar 2017 14:46:54 +0000 (15:46 +0100)]
coredump: normalize generation/parsing of COREDUMP_TRUNCATED=
Given that this is a field primarily processed by computers, and not so
much by humans, assign "1" instead of "yes". Also, use parse_boolean()
as we usually do for parsing it again.
This makes things more alike udev options (as one example), such as
SYSTEMD_READY where we also spit out "1" and "0", and parse with
parse_boolean().
Lennart Poettering [Wed, 1 Mar 2017 16:35:05 +0000 (17:35 +0100)]
mount-util: accept that name_to_handle_at() might fail with EPERM (#5499)
Container managers frequently block name_to_handle_at(), returning
EACCES or EPERM when this is issued. Accept that, and simply fall back
to to fdinfo-based checks.
Note that we accept either EACCES or EPERM here, as container managers
can choose the error code and aren't very good on agreeing on just one.
(note that this is a non-issue with nspawn, as we permit
name_to_handle_at() there, only block open_by_handle_at(), which should
be sufficiently safe).
Lennart Poettering [Wed, 1 Mar 2017 16:21:29 +0000 (17:21 +0100)]
update NEWS for v233 (#5503)
Lennart Poettering [Wed, 1 Mar 2017 15:25:08 +0000 (16:25 +0100)]
core: when a unit's SourcePath points to API VFS pretend we are never out-of-date (#5487)
If the unit's SourcePath is below /proc then it's a unit genreated from
a kernel resource (such as a .mount or .swap unit). And those we watch
anyway, and hence should never be out-of-date.
Fixes: #5461
Lennart Poettering [Wed, 1 Mar 2017 13:37:15 +0000 (14:37 +0100)]
Merge pull request #5458 from keszybz/coredump
Fix for coredump crash
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 04:03:12 +0000 (23:03 -0500)]
Merge pull request #5494 from poettering/run-fixes
systemd-run --user fixes.
Lennart Poettering [Wed, 1 Mar 2017 03:49:19 +0000 (04:49 +0100)]
resolved: add the new KSK to the built-in resolved trust anchor (#5486)
Fixes: #5482
Lennart Poettering [Wed, 1 Mar 2017 03:03:48 +0000 (04:03 +0100)]
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
Zbigniew Jędrzejewski-Szmek [Wed, 1 Mar 2017 02:47:45 +0000 (21:47 -0500)]
coredumpctl: avoid spurious warning about systemd-coredump@0.service
Fixes #5477.
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 23:07:39 +0000 (18:07 -0500)]
coredumpctl: print a hint when no journal files are found
[guest@fedora ~]$ coredumpctl
No coredumps found.
[guest@fedora ~]$ ./coredumpctl
Hint: You are currently not seeing messages from other users and the system.
Users in groups 'adm', 'systemd-journal', 'wheel' can see all messages.
Pass -q to turn off this notice.
No coredumps found.
Fixes #1733.
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 23:00:39 +0000 (18:00 -0500)]
journalctl: move access_check() to shared/
The only functional change is that log_notice("No journal files were found.")
is not printed any more with --quiet. log_error("No journal files were opened
due to insufficient permissions.") is still printed.
I wasn't quite sure where to put this function, but shared/ seems to be the
right place and none of the existing files seem to fit too well.
v2: rename journal_access_check to journal_access_check_and_warn.
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 22:00:01 +0000 (17:00 -0500)]
coredumpctl: use a 3s timeout for checking units
This is just a hint, so we shouldn't wait too long. A short timeout
helps for the case where pid1 of dbus have crashed.
Zbigniew Jędrzejewski-Szmek [Sun, 26 Feb 2017 21:46:23 +0000 (16:46 -0500)]
coredump: process special crashes in an (almost) normal way
We would only log a terse message when pid1 or systemd-journald crashed.
It seems better to reuse the normal code paths as much as possible,
with the following differences:
- if pid1 crashes, we cannot launch the helper, so we don't analyze the
coredump, just write it to file directly from the helper invoked by the
kernel;
- if journald crashes, we can produce the backtrace, but we don't log full
structured messages.
With comparison to previous code, advantages are:
- we go through most of the steps, so for example vacuuming is performed,
- we gather and log more data. In particular for journald and pid1 crashes we
generate a backtrace, and for pid1 crashes we record the metadata (fdinfo,
maps, etc.),
- coredumpctl shows pid1 crashes.
A disavantage (inefficiency) is that we gather metadata for journald crashes
which is then ignored because _TRANSPORT=kernel does not support structued
messages.
Messages for the systemd-journald "crash" have _TRANSPORT=kernel, and
_TRANSPORT=journal for the pid1 "crash".
Feb 26 16:27:55 systemd[1]: systemd-journald.service: Main process exited, code=dumped, status=11/SEGV
Feb 26 16:27:55 systemd[1]: systemd-journald.service: Unit entered failed state.
Feb 26 16:37:54 systemd-coredump[18801]: Process 18729 (systemd-journal) of user 0 dumped core.
Feb 26 16:37:54 systemd-coredump[18801]: Coredump diverted to /var/lib/systemd/coredump/core.systemd-journal.0.
36c14bf3c6ce4c38914f441038990979.18729.
1488145074000000.lz4
Feb 26 16:37:54 systemd-coredump[18801]: Stack trace of thread 18729:
Feb 26 16:37:54 systemd-coredump[18801]: #0 0x00007f46d6a06b8d fsync (libpthread.so.0)
Feb 26 16:37:54 systemd-coredump[18801]: #1 0x00007f46d71bfc47 journal_file_set_online (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #2 0x00007f46d71c1c31 journal_file_append_object (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #3 0x00007f46d71c3405 journal_file_append_data (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #4 0x00007f46d71c4b7c journal_file_append_entry (libsystemd-shared-233.so)
Feb 26 16:37:54 systemd-coredump[18801]: #5 0x00005577688cf056 write_to_journal (systemd-journald)
Feb 26 16:37:54 systemd-coredump[18801]: #6 0x00005577688d2e98 dispatch_message_real (systemd-journald)
Feb 26 16:37:54 kernel: systemd-coredum: 9 output lines suppressed due to ratelimiting
Feb 26 16:37:54 systemd-journald[18810]: Journal started
Feb 26 16:50:59 systemd-coredump[19229]: Due to PID 1 having crashed coredump collection will now be turned off.
Feb 26 16:51:00 systemd[1]: Caught <SEGV>, dumped core as pid 19228.
Feb 26 16:51:00 systemd[1]: Freezing execution.
Feb 26 16:51:00 systemd-coredump[19229]: Process 19228 (systemd) of user 0 dumped core.
Stack trace of thread 19228:
#0 0x00007fab82075c47 kill (libc.so.6)
#1 0x000055fdf7c38b6b crash (systemd)
#2 0x00007fab824175c0 __restore_rt (libpthread.so.0)
#3 0x00007fab82148573 epoll_wait (libc.so.6)
#4 0x00007fab8366f84a sd_event_wait (libsystemd-shared-233.so)
#5 0x00007fab836701de sd_event_run (libsystemd-shared-233.so)
#6 0x000055fdf7c4a380 manager_loop (systemd)
#7 0x000055fdf7c402c2 main (systemd)
#8 0x00007fab82060401 __libc_start_main (libc.so.6)
#9 0x000055fdf7c3818a _start (systemd)
Poor machine ;)
Martin Pitt [Tue, 28 Feb 2017 22:23:18 +0000 (23:23 +0100)]
Merge pull request #5493 from poettering/service-mini-fixes
three small mini-fixes for src/core/service.c
David Herrmann [Tue, 28 Feb 2017 20:57:58 +0000 (21:57 +0100)]
hostname: detect detachable dmi chassis type (#5489)
Detect the 'Detachable' dmi chassis type properly. Use the new
'convertible' chassis class of hostnamed, instead of returning the
generic 'computer' chassis class.
Mauricio Faria de Oliveira [Tue, 28 Feb 2017 20:30:22 +0000 (17:30 -0300)]
cryptsetup-generator: run cryptsetup service before swap unit (#5480)
If the cryptsetup service unit and swap unit for a swap device
are not strictly ordered, it might happen that the swap unit
activates/mounts the swap device before its cryptsetup service unit
has a chance to run the 'mkswap' command (that it is programmed to).
This leads to the following error:
Starting Cryptography Setup for sda3_crypt...
[ OK ] Found device /dev/mapper/sda3_crypt.
Activating swap /dev/mapper/sda3_crypt...
[ OK ] Activated swap /dev/mapper/sda3_crypt.
[ OK ] Reached target Swap.
[FAILED] Failed to start Cryptography Setup for sda3_crypt.
See 'systemctl status systemd-cryptsetup@sda3_crypt.service' for
details.
[DEPEND] Dependency failed for Encrypted Volumes.
Which happens because the swap device is already mounted:
# systemctl status systemd-cryptsetup@sda3_crypt.service
<...>
Active: failed (Result: exit-code) since Mon 2017-02-27 14:21:43 CST;
54s ago
<...>
<...> systemd[1]: Starting Cryptography Setup for sda3_crypt...
<...> mkswap[2420]: mkswap: error: /dev/mapper/sda3_crypt is mounted;
will not make swapspace
<...>
So, modify cryptsetup-generator to include a 'Before=' option for the
respective 'dev-mapper-%i.swap' device in the cryptsetup service unit.
Now, correct ordering is ensured, and the error no longer occurs:
Starting Cryptography Setup for sda3_crypt...
[ OK ] Found device /dev/mapper/sda3_crypt.
[ OK ] Started Cryptography Setup for sda3_crypt.
Activating swap /dev/mapper/sda3_crypt...
[ OK ] Reached target Encrypted Volumes.
[ OK ] Activated swap /dev/mapper/sda3_crypt.
[ OK ] Reached target Swap.
Lennart Poettering [Tue, 28 Feb 2017 20:28:21 +0000 (21:28 +0100)]
udev rules: add udev rule to create /dev/ptp_kvm (#5495)
Its necessary to specify the KVM PTP device name in userspace.
In case a network card with PTP device is assigned to the guest,
it might be the case that KVM PTP gets /dev/ptp0 instead of /dev/ptp1.
Fix a device name for the KVM PTP device.
Lennart Poettering [Tue, 28 Feb 2017 17:27:42 +0000 (18:27 +0100)]
run: also pin unit when we we are in --pty mode
Since
95f1d6bfecde60b245fae1ab0313b550201e7880 we'll subscribe to unit
signals to figure out when to disconnect the pty. But that can only work
correctly if we actually subscribe to the unit's signals. Hence,
explicitly pin (and thus subscribe to) the unit we just created not only
in --wait mode but also in --pty mode.
Or to say this differently: we need to pin the unit in the same cases as
we install the signal match.
95f1d6bfecde60b245fae1ab0313b550201e7880
forgot to do that.
This is relevant to make sure systemd-run works correctly in --user
mode, and correctly exits when the spawned service dies. To test:
systemd-run --user -t /bin/bash
And then press ^D. This will hang before this change, but exit cleanly
after it.
Lennart Poettering [Tue, 28 Feb 2017 16:55:57 +0000 (17:55 +0100)]
core: always consider clients that pinned a unit to be subscribers
If a client pins a unit, then it makes sense to also implicitly make it
a subscriber. This is useful for clients that just want to watch one
specific unit: they can pin it and receive its messages.
Lennart Poettering [Tue, 28 Feb 2017 16:22:14 +0000 (17:22 +0100)]
update TODO