1
0
mirror of https://github.com/systemd/systemd.git synced 2024-11-02 19:21:53 +03:00
Commit Graph

46585 Commits

Author SHA1 Message Date
Michael Biebl
3aa645f0c0 test-network: stop networkd and its socket
With the changes from 2c0dffe82d, starting
systemd-networkd.service will also activate systemd-networkd.socket.
When tearing down a test, we need to stop the socket as well, to make
sure networkd can't be activated accidentally with the wrong
configuration.
2020-08-28 21:03:09 +02:00
Lennart Poettering
5895a9d600
Merge pull request #16874 from poettering/analyze-cap
introduce "systemd-analyze capability" command for dumping locally defined caps
2020-08-28 21:01:56 +02:00
Daniel Mack
5170afbc55 clock-util: read timestamp from /usr/lib/clock-epoch
On systems without an RTC, systemd currently sets the clock to a
compile-time epoch value, derived from the NEWS file in the
repository. This is not ideal as the initial clock hence depends
on the last time systemd was built, not when the image was compiled.

Let's provide a different way here and look at `/usr/lib/clock-epoch`.
If that file exists, it's timestamp for the last modification will be
used instead of the compile-time default.
2020-08-28 18:58:22 +02:00
Kyle Russell
dd05042039 units: add missing usb-gadget.target 2020-08-28 18:57:58 +02:00
Lennart Poettering
b2af819b22 analyze: add 'capability' verb for dumping all known and unknown caps 2020-08-28 18:52:48 +02:00
Lennart Poettering
0f849d0af9 analyze: fix error handling in one case 2020-08-28 18:14:53 +02:00
Lennart Poettering
524bdc95e7 basic: make sure we include inttypes.h when we use its types 2020-08-28 18:14:35 +02:00
Lennart Poettering
3c719357dc man: extend on the usec/sec discrepancy
Let's document the discrepancy between the Sec and USec suffixing of
unit files and D-Bus properties at three places: in "systemctl show"
(where it already was briefly mentioned), in the D-Bus interface
description (at one place at least, i.e. the most prominent of
properties that encapsulate time values, there are many more) and in the
general man page explaining time values.

By documenting this at all three places I think we now do as much as we
can do about this highlighting the discrepancy of the naming and the
reasons behind it.

Fixes: #2047
2020-08-28 18:01:17 +02:00
fangxiuning
c53aafb7b5
tree-wide: drop pointless zero initialization (#16884)
tree-wide: drop pointless zero initialization
2020-08-28 17:45:54 +02:00
Lennart Poettering
cd17bb6e71 networkd: consider any uevent other than "remove" sufficient for the network device to be ready 2020-08-28 17:45:05 +02:00
Ikey Doherty
97207ac85c login/logind: Include sys/stat.h for struct stat usage
We need to include `<sys/stat.h>` for usage of the `struct stat` in
the Manager struct, much as we already include `<stdbool.h>` for C99
booleans.

This helps alleviate another minor build failure on non-glibc systems.
2020-08-28 17:44:39 +02:00
Lennart Poettering
ddb439b8f9 tmpfiles: use statx() when aging files
This allows us to properly detect mount points, for free. (Also, allows
us to respect btimes that are newer than the cutoff, which should be
useful when people untar file trees in /var/tmp)

Fixes: #16848
2020-08-28 15:45:37 +02:00
Lennart Poettering
cd1361e203 time-util: add timespec_store_nsec()
timespec_store_nsec() is to timespec_store() what timespec_load_nsec()
is to timespec_load(), i.e. the nsec version of the usual usec API
2020-08-28 14:22:43 +02:00
Plan C
b23728ec9f
Add simple usage message to systemd-backlight (#16709) 2020-08-28 13:50:35 +02:00
Ikey Doherty
677bb0555a partition/makefs: Include missing sys/file.h header
This file must be included on non-glibc systems to ensure
the `LOCK_EX` definition is available.

Signed-off-by: Ikey Doherty <ikey.doherty@lispysnake.com>
2020-08-28 13:32:09 +02:00
Lennart Poettering
ae6ad21e0b device: propagate reload events from devices on everything but "add", and "remove"
Any uevent other then the initial and the last uevent we see for a
device (which is "add" and "remove") should result in a reload being
triggered, including "bind" and "unbind". Hence, let's fix up the check.

("move" is kinda a combined "remove" + "add", hence cover that too)
2020-08-28 13:30:13 +02:00
Zbigniew Jędrzejewski-Szmek
c1afa2ed39
Merge pull request #16879 from keszybz/test-last-cap-and-dbus-docs
Add "developer mode" and test last cap and dbus docs
2020-08-28 08:30:00 +02:00
Zbigniew Jędrzejewski-Szmek
7efbe21850
Merge pull request #16872 from keszybz/test-50
Improve handling of os-release in tests
2020-08-28 08:27:55 +02:00
Jérémy Nouhaud
5fc51a8223
hwdb: fix size lenovo x240 touchpad (#16871)
As discussed in https://gitlab.freedesktop.org/libinput/libinput/-/issues/521, it adds a narrower
match that only applies to X240. Other laptops that match `pvrThinkPad??40` are not affected:

$ systemd-hwdb query 'evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX240:*'
EVDEV_ABS_00=1232:5711:51
EVDEV_ABS_01=1159:4700:53
EVDEV_ABS_35=1232:5711:51
EVDEV_ABS_36=1159:4700:53
$ systemd-hwdb query 'evdev:name:SynPS/2 Synaptics TouchPad:dmi:*svnLENOVO*:pvrThinkPadX140:*'
EVDEV_ABS_00=::41
EVDEV_ABS_01=::37
EVDEV_ABS_35=::41
EVDEV_ABS_36=::37
2020-08-27 21:59:23 +02:00
Zbigniew Jędrzejewski-Szmek
e4b2cea32a man: update dbus doc stubs
For 4e39995371 and
bb0c0d6f29.
2020-08-27 21:30:23 +02:00
Zbigniew Jędrzejewski-Szmek
c91e3116f4 update-dbus-docs: add hint 2020-08-27 21:30:23 +02:00
Zbigniew Jędrzejewski-Szmek
04aa6fa8cd update-dbus-docs: omit verbose output when in --test mode
It makes the ninja output listing very long for no good purpose.
2020-08-27 21:30:23 +02:00
Zbigniew Jędrzejewski-Szmek
4cc73cf9c1 test: verify that dbus docs are fresh
This makes use of the developer mode switch: the test is only done
if the user opted-in into developer mode.

Before the man/update-dbus-docs was using the argument form where
we don't need to run find_command(), but that doesn't work with test(),,
so find_command() is used and we get one more line in the config log.
2020-08-27 21:30:22 +02:00
Yu Watanabe
876dc2b014 network: dhcp6: logs only new address
Closes #16731.
2020-08-27 21:24:07 +02:00
Zbigniew Jędrzejewski-Szmek
40af1088b5
Merge pull request #16863 from weblate/weblate-systemd-master
Translations update from Weblate
2020-08-27 21:10:55 +02:00
Zbigniew Jędrzejewski-Szmek
1b584f38a8 update-dbus-docs: add test mode 2020-08-27 20:22:52 +02:00
Zbigniew Jędrzejewski-Szmek
0f5cea0212 update-dbus-docs: use argparse 2020-08-27 20:22:52 +02:00
Zbigniew Jędrzejewski-Szmek
af4c7dc269 update-dbus-docs: print statistics at the end
Right now:
org.freedesktop.LogControl1.xml: 3/3
org.freedesktop.home1.xml:       44/44
org.freedesktop.hostname1.xml:   21/21
org.freedesktop.import1.xml:     17/19
org.freedesktop.locale1.xml:     10/10
org.freedesktop.login1.xml:      172/172
org.freedesktop.machine1.xml:    49/65
org.freedesktop.resolve1.xml:    25/61
org.freedesktop.systemd1.xml:    214/1468
org.freedesktop.timedate1.xml:   12/12
total:                           567/1875

:(
2020-08-27 20:22:40 +02:00
Zbigniew Jędrzejewski-Szmek
b7be416f55 basic/missing_capability: clean up our defines and check that our fallback is up-to-date
There is little point in #defining and #undefining CAP_LAST_CAP multiple times.

The check is only done in developer mode. After all, it's not an error to
compile on a newer kernel, and we shouldn't even warn in that case.
2020-08-27 20:20:23 +02:00
Zbigniew Jędrzejewski-Szmek
839bdf2505 meson: add "develop mode" config switch 2020-08-27 20:20:23 +02:00
Zbigniew Jędrzejewski-Szmek
c87d0661a0 test-path: remove unnecessary check
test points to an array, so it canont be NULL at this point.
2020-08-27 20:20:23 +02:00
Daan De Meyer
f17bdf8264 Don't run test-repart when loop devices are not available 2020-08-27 17:14:58 +02:00
Lennart Poettering
df92f4fa8d
Merge pull request #16864 from yuwata/coverity-fixes
Two coverity fixes
2020-08-27 16:36:40 +02:00
Lennart Poettering
4fc14c345f
Merge pull request #16866 from yuwata/networkctl-tiny-cleanups
networkctl: tiny cleanups
2020-08-27 16:34:43 +02:00
Michal Koutný
94d21c2ef6 missing: Add new Linux capability
Yet another new capability coming in Linux kernel v5.9.
Make sure we can recongize them even when built with older kernel headers.
2020-08-27 16:13:09 +02:00
Zbigniew Jędrzejewski-Szmek
9f927e46ac test/test-functions: do not execute strip_binaries twice
It is called from setup_basic_environment(), which also calls install_symtemd()
a bit earlier, so in effect it would be called twice.
2020-08-27 13:10:30 +02:00
Zbigniew Jędrzejewski-Szmek
ae6c598791 tests/TEST-50: support the case when /etc/os-release is present
We have four legal cases:
1. /usr/lib/os-release exists and /etc/os-release is a symlink to it
2. both exist but /etc/os-release is not a symlink to /usr/lib/os-release
3. only /usr/lib/os-release exists
4. only /etc/os-release exists

The generic setup code in test-functions and create-busybox-image didn't handle
case 3.

The test-specific code in TEST-50 didn't handle 2 (because the general setup
code would only install /etc/os-release in the image and
grep -f /usr/lib/os-release would not work) and 4 (same reason) and would fail
in case 3 in generic setup.
2020-08-27 13:08:14 +02:00
Michael Biebl
ac741c10e2 test: remove executable bit from testsuite-52.service 2020-08-27 12:13:16 +02:00
Zbigniew Jędrzejewski-Szmek
37b6a5dff5 TEST-50: sfdisk is already installed by setup_basic_environment 2020-08-27 11:31:11 +02:00
Yu Watanabe
89d36ce8f7 journal: fix divide-by-zero warning
Fixes CID#1430209.
2020-08-27 18:20:34 +09:00
Yu Watanabe
8062e643e6 core: clear bind mounts on error
Follow-up for bbb4e7f39f.

Fixes CID#1431998.
2020-08-27 18:20:34 +09:00
Zbigniew Jędrzejewski-Szmek
67165f7630
Merge pull request #16860 from poettering/tty-ask-pw-agent-list-fix
tty-ask-password-agent: three fixes
2020-08-27 10:58:13 +02:00
Njibhu
c7300fa44f Add sensor configuration for Acer SW5-017-17BU 2020-08-27 10:30:49 +02:00
Christian Göttsche
2df2152c20 selinux: fork label-aware children with up-to-date label database
The parent process may not perform any label operation, so the
database might not get updated on a SELinux policy change on its own.

Reload the label database once on a policy change, instead of n times
in every started child.
2020-08-27 10:28:53 +02:00
Christian Göttsche
fd5e402fa9 selinux: use SELinux status page
Switch from security_getenforce() and netlink notifications to the
SELinux status page.

This usage saves system calls and will also be the default in
libselinux > 3.1 [1].

[1]: 05bdc03130
2020-08-27 10:28:53 +02:00
Zbigniew Jędrzejewski-Szmek
baeec61b2c
Merge pull request #16847 from olivierlemoal/master
shell-completion/zsh: add missing verbs for networkctl
2020-08-27 10:27:01 +02:00
Zbigniew Jędrzejewski-Szmek
567aeb5801 shared/acl-util: convert rd,wr,ex to a bitmask
I find this version much more readable.

Add replacement defines so that when acl/libacl.h is not available, the
ACL_{READ,WRITE,EXECUTE} constants are also defined. Those constants were
declared in the kernel headers already in 1da177e4c3f41524e886b7f1b8a0c1f,
so they should be the same pretty much everywhere.
2020-08-27 10:20:12 +02:00
Olivier Le Moal
50574ed1ac add "list" verb to autocompleted commands 2020-08-27 10:01:36 +02:00
Yu Watanabe
f2c676c6c0 man: clarify that several networkctl commands takes device names 2020-08-27 16:35:25 +09:00
Yu Watanabe
df696b1413 networkctl: label command does not take any argument 2020-08-27 16:32:13 +09:00