Susant Sahani [Wed, 22 May 2019 09:46:41 +0000 (15:16 +0530)]
networkctl: add support to delete virtual netdevs
We now don't have the support to delete netdevs and dependent
upon iproute to delete. With this we can delete via networkctl
and use in our test cases too.
Note that it supports deleting multiple links at once.
rules: enable hardware-related targets also for user instances
> the odd thing is that these units are also defined for the systemd user
> instance. However, because these are bound to SYSTEMD_USER_WANTS rather than
> SYSTEMD_WANTS they are effectively useless unless some other software
> installs the corresponding udev rules first.
This adds the rules and starts those targets also for user instances.
Fixes #12330.
Yu Watanabe [Sat, 25 May 2019 22:21:00 +0000 (07:21 +0900)]
udev: suppress warning when interface matches 99-default.link
This suppress the following warning:
```
systemd-udevd[437]: Config file /usr/lib/systemd/network/99-default.link
applies to device based on potentially unpredictable interface name 'wlan0'
```
Frantisek Sumsal [Mon, 27 May 2019 17:59:26 +0000 (19:59 +0200)]
test: correctly fail when system is borked
In certain situations, the systemctl commands may fail (e.g. due to
missing shared libraries), but the 'script' continues and creates a
/testok file, marking the test incorrectly as passed. Let's fix this and
bail out immediately when a command exits with a non-zero exit code.
Frantisek Sumsal [Fri, 24 May 2019 20:35:52 +0000 (22:35 +0200)]
test: improve handling of ASan under clang
Running integration tests with ASan is somewhat tricky to begin with, as
we need to pre-load the ASan runtime DSO for certain services (like
dbus), otherwise they won't start or behave as expected. In case of gcc
this is pretty easy, as we need the runtime DSO during compilation, so
it's already present on the host system. For clang things get more
complicated, as ASan is compiled in statically by default, thus to
enable the necessary dynamic-ish behavior one needs to compile with
-shared-libasan and then correctly set LD_PRELOAD_PATH, as the runtime
libraries are not in a standard library path.
Oliver Harley [Sun, 26 May 2019 05:31:29 +0000 (07:31 +0200)]
--bind-device does not take a bool
See https://github.com/systemd/systemd/blob/e95be7def26c6c5feaf08a4135aa4f50c53263a8/src/mount/mount-tool.c#L164
Also makes the man page consistent with the `--help` option
Jack [Sat, 25 May 2019 20:42:00 +0000 (21:42 +0100)]
hwdb: Add support for Linx 12V64 (#12665)
This fixes the accelerometer for the Linx 12V64.
Note that even though the configuration for both models is the same, the 12V64 and 12X64 are different models.
terminal-util: reset access mode in vt_restore(), too
Only changing ownership back to root is not enough we also need to
change the access mode, otherwise the user might have set 666 first, and
thus allow everyone access before and after the chown().
Inspired by #12431 let's also rework chmod_and_chown() and make sure we
never add more rights to a file not owned by the right user.
Also, let's make chmod_and_chown() just a wrapper arond
fchmod_and_chown().
let's also change strategy: instead of chown()ing first and stating
after on failure and supressing errors, let's avoid the chown in the
firts place, in the interest on keeping things minimal.
test-execute: turn off coredump generation in test services
These services are likely to coredump, and we expect that but aren't
interested in the coredump. Hence let's turn off processing by setting
RLIMIT_CORE to 0/0.
test-execute: let's ignore the difference between CLD_KILLED and CLD_DUMPED
Depending on system configuration and whether SCMP_ACT_KILL_PROCESS or
SCMP_ACT_KILL_THREAD is available/used processes might coredump on
specific coredumps or are just plain killed. For our test case the
difference doesn't really matter, hence let's hide it away.
man: reword systemd.socket(5) description to avoid "file" when talking about services
This text was written a long time ago, when we mostly talked about "service
files". Strictly speaking, we don't need a "file", because the service might
be just an instance of a template, or an alias to another service. So let's use
the more modern parlance of "service units".
pid1: improve message when setting up namespace fails
I covered the most obvious paths: those where there's a clear problem
with a path specified by the user.
Prints something like this (at error level):
May 21 20:00:01.040418 systemd[125871]: bad-workdir.service: Failed to set up mount namespacing: /run/systemd/unit-root/etc/tomcat9/Catalina: No such file or directory
May 21 20:00:01.040456 systemd[125871]: bad-workdir.service: Failed at step NAMESPACE spawning /bin/true: No such file or directory