Commit Graph

46444 Commits

Author SHA1 Message Date
Lennart Poettering c4bc2e9343 CONTRIBUTING: be clearer about versions and RFE process
Fixes: #16550
2020-08-31 23:23:56 +02:00
Lennart Poettering 4dc286658d dissect-image: generate nice error when we can't detect any file system 2020-08-31 22:11:53 +02:00
Lennart Poettering b519529104
Merge pull request #16841 from keszybz/acl-util-bitmask
Use a bitmask in fd_add_uid_acl_permission()
2020-08-31 16:45:13 +02:00
Lennart Poettering e2b40db616 man: document fd ownership for sd-bus fd marshalling
Fixes: #8003
2020-08-30 18:09:39 +01:00
Daan De Meyer a667ddf132
Merge pull request #16898 from poettering/resolved-errno
make sure we have `answer_errno` always properly initialized before we end a transaction with ERRNO cause
2020-08-30 18:05:38 +01:00
Florian Klink 43269733ef homed: fix log message to honor real homework path
This seems to be overridable by setting the SYSTEMD_HOMEWORK_PATH env
variable, but the error message always printed the SYSTEMD_HOMEWORK_PATH
constant.
2020-08-30 17:04:01 +02:00
fangxiuning 6d95e7d9b2
tree-wide: drop pointless zero initialization (#16900) 2020-08-30 06:21:20 +09:00
Fabrice Fontaine 28e2641a1a
src/shared/dissect-image.c: fix build without blkdid (#16901)
N_DEVICE_NODE_LIST_ATTEMPTS is unconditionally used since version 246 and
ac1f3ad05f

However, this variable is only defined if HAVE_BLKID is set resulting in
the following build failure if cryptsetup is enabled but not libblkid:

../src/shared/dissect-image.c:1336:34: error: 'N_DEVICE_NODE_LIST_ATTEMPTS' undeclared (first use in this function)
 1336 |         for (unsigned i = 0; i < N_DEVICE_NODE_LIST_ATTEMPTS; i++) {
      |

Fixes:
 - http://autobuild.buildroot.org/results/67782c225c08387c1bbcbea9eee3ca12bc6577cd
2020-08-30 06:17:18 +09:00
Michael Biebl 9654645b62
Merge pull request #16850 from mbiebl/networkd-socket-activation
networkd: use socket activation when starting networkd
2020-08-29 16:12:46 +02:00
Lennart Poettering ca19dedb56 sym: fix bad symbol file addition
The next release is 247, not 248.

A follow-up for 2b07ec316a
2020-08-29 12:35:00 +02:00
Lennart Poettering a75cb4e20a resolved: remove superfluous ;; 2020-08-28 22:59:26 +02:00
Lennart Poettering 95d2155aeb tree-wide: no need to negate argument to ERROR_IS_XYZ()
These macros call abs() internally, hence let's simplify invocations.
2020-08-28 22:58:58 +02:00
Lennart Poettering fd8a301703 resolved: make sure we initialize t->answer_errno before completing the transaction
We must have the error number around when completing the transaction.
Let's hence make sure we always initialize it *first* (we accidentally
did it once after).

Fixes: #11626
2020-08-28 22:44:57 +02:00
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
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