Commit Graph

40679 Commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek 6ed5ef9819 meson: create /var/log/journal/{,remote/} conditionally
Not everybody has those dirs in the filesystem (and they don't need to).
When creating an installation package using $DESTDIR, it is easy enough to
remove or ignore those directories, but if installing into a real root, it
is ugly to create and remove them. Let's add an option so people can skip
it if they want.

Inspired by #12930.
2019-07-04 10:16:48 +02:00
Yu Watanabe 7810d22171
Merge pull request #12946 from poettering/blockdev-tweaks
three small blockdev-util.[ch] tweaks
2019-07-04 12:36:11 +09:00
Lennart Poettering ed9aa225e8 varlink: allow using varlink_wait() even with a server
This call can be useful even if a server object is declared.

(Originally this was not supported, because a server typically needs to
handle multiple connections, and thus a synchronous wait on one would
starve the others out. But in some cases it might make sense to have
varlink point-to-point connections — i.e. where the server only handles
a single connection ever — and there it makes sense to synchronously
wait on the one connection).
2019-07-04 12:35:52 +09:00
Lennart Poettering ca5e7694bd json: use JSON_VARIANT_ARRAY_FOREACH() where we can 2019-07-04 12:35:35 +09:00
Lennart Poettering 54130b3622 logind: drop old-style header from .sym file in favour of SPDX 2019-07-04 12:35:14 +09:00
Connor Reeder 01979136f5 Added ACCEL_MOUNT_MATRIX for Asus Q551LN in hwdb/60-sensor.hwdb 2019-07-04 00:08:35 +02:00
Lennart Poettering a0ea1dee7b blockdev-util: let us know if block_get_whole_disk() did anything 2019-07-04 00:01:09 +02:00
Lennart Poettering 51f14fa111 blockdev: filter out invalid block devices early 2019-07-04 00:00:54 +02:00
Lennart Poettering d18b300933 blockdev-util: propagate actual error 2019-07-04 00:00:44 +02:00
Lennart Poettering 007b77ac6c man: document tmpfiles.d/ user/group resolvability needs 2019-07-03 15:54:45 +02:00
Jan Synacek 93912e872f debug-generator: enable custom systemd.debug_shell tty 2019-07-02 09:51:27 +02:00
Zbigniew Jędrzejewski-Szmek 8fabb625ac
Merge pull request #12912 from yuwata/network-move-functions
network: move functions
2019-07-02 09:46:38 +02:00
Yu Watanabe e28fd95ffb test-network: add udev related tests for networkctl 2019-07-02 09:43:21 +02:00
Zbigniew Jędrzejewski-Szmek 0330cb57ab
Merge pull request #12888 from yuwata/network-udev-property-support
network,udev: add Property= setting in [Match] section
2019-07-01 20:33:24 +02:00
Yu Watanabe 9c69cd7ec0 udev: accept lines which have only PROGRAM=
As PROGRAM= may cause side effect, and users may expect that.
2019-07-01 14:13:31 +02:00
Michael Biebl afb30c9fb6
Merge pull request #12916 from yuwata/meson-drop-duplicated-line
meson: drop duplicated source
2019-07-01 01:39:35 +02:00
Yu Watanabe 6b9518a0e8 test-network: add test for Property= in [Match] section 2019-07-01 06:53:35 +09:00
Yu Watanabe 02848aaea8 meson: drop duplicated source 2019-07-01 06:45:00 +09:00
Yu Watanabe f706340979 test: add tests for config_parse_match_{strv,ifnames}() 2019-07-01 01:24:42 +09:00
Yu Watanabe c382025adf man: fix wrong udev property name 2019-07-01 01:24:42 +09:00
Yu Watanabe 44005bfb4e network,udev: add Property= setting in [Match] section
Closes #5665.
2019-07-01 01:24:42 +09:00
Yu Watanabe b38de0e9cc network,udev: make net_match_config() take sd_device 2019-07-01 01:24:42 +09:00
Yu Watanabe 54a8423788 network,udev: fix multiple invert matching lines
Previously,
```
[Match]
Name=!aaa
Name=!bbb
```
does not work. This fixes the issue.
2019-07-01 01:24:42 +09:00
Yu Watanabe 64e7ebde8b networkctl: do not show '(null)' in HW Address entry
This also fixes indentation.
2019-06-30 10:46:35 +02:00
Yu Watanabe ceac2c2b62 network: move prototypes related to network Network bus objects to networkd-network-bus.h 2019-06-30 05:12:51 +09:00
Yu Watanabe 14a9ab30cd
Merge pull request #12910 from keszybz/udev-kvm
Fix permissions on /dev/kvm
2019-06-30 04:51:05 +09:00
Yu Watanabe 8fcf1d6180 network: move DHCP server related functions to networkd-dhcp-server.c 2019-06-30 04:46:27 +09:00
Yu Watanabe 04ed994937 network: move DHCP6 related code from networkd-manager.c to networkd-dhcp6.c 2019-06-30 04:46:04 +09:00
Yu Watanabe ca5ad760a5 network: move conf parsers and function prototypes 2019-06-30 04:45:56 +09:00
Yu Watanabe 539bcc831b
Merge pull request #12903 from keszybz/condition-quoting
Condition quoting
2019-06-30 04:10:40 +09:00
Zbigniew Jędrzejewski-Szmek 9c02391088 test-condition: do not accidentally treat error as passing condition
condition_test returns 0, 1, or error.
2019-06-29 17:11:37 +02:00
Zbigniew Jędrzejewski-Szmek 910c6d0931 Treat kernel version condition as a list of quoted checks
Before only one comparison was allowed. Let's make this more flexible:
ConditionKernelVersion = ">=4.0" "<=4.5"

Fixes #12881.

This also fixes expressions like "ConditionKernelVersion=>" which would
evaluate as true.
2019-06-29 17:11:03 +02:00
Yu Watanabe fd4487f01a test-execute: add test for ConditionKernelVersion= with quotation 2019-06-29 17:09:07 +02:00
Zbigniew Jędrzejewski-Szmek e0e334d0e4
Merge pull request #12907 from yuwata/meson-default-libidn2
meson: use libidn2 and drop udev debug option
2019-06-29 16:25:52 +02:00
Yu Watanabe 60ccab093e udev: fix wrong event source to set description 2019-06-29 16:23:42 +02:00
Zbigniew Jędrzejewski-Szmek 3b88d21e9b
Merge pull request #12908 from yuwata/udevadm-completion-action
udevadm: support special value 'help' for --action option
2019-06-29 16:22:22 +02:00
Zbigniew Jędrzejewski-Szmek 3708c0f455 udev: don't force device ownership and mode on every event
This partially reverts 25de7aa7b9. I don't think the
change was intended there.

The problem I'm trying to solve: for /dev/kvm we get first an ADD uevent, and
then CHANGE whenever something connects or disconnects to the character device.
The rules in 50-default-udev.rules set UID, GID, and MODE on ADD, but not on
CHANGE. When the change event happens, we would reset the ownership and
permissions.

This happens because node_permissions_apply() would (after 25de7aa7b9)
set uid=gid=0 if they weren't set by the rules.

So let's only pass uid/gid/mode to node_permissions_apply() if appropriately
configured. Also let node_permissions_apply() do the skip of uid/gid/mode if
not set, and rename "always_apply" to more closely reflect its meaning.
2019-06-29 16:10:49 +02:00
Zbigniew Jędrzejewski-Szmek ab3a7372d2 udev: tiny fix to debug message 2019-06-29 14:57:16 +02:00
Yu Watanabe 7ce7278217 bash-completion: udevadm: list all possible values for --action option 2019-06-29 04:10:14 +09:00
Yu Watanabe 6d22bd87f0 udevadm: support special value 'help' for --action option 2019-06-29 04:10:14 +09:00
Yu Watanabe 9e0196b1e2 sd-device: introduce dump_device_action_table()
Will be used in later commits.
2019-06-29 04:10:14 +09:00
Yu Watanabe 0f4143f0f2
Merge pull request #12905 from keszybz/udev-warnings
Udev warnings
2019-06-29 03:35:12 +09:00
Yu Watanabe e110599b63 NEWS: mention that the libidn2 is used by default 2019-06-29 03:18:43 +09:00
Yu Watanabe 1b9313991b meson: default to use libidn2 if both libidn2 and libidn are installed 2019-06-29 03:13:36 +09:00
Yu Watanabe 6c092dbe43 meson: drop unused debug option 2019-06-29 03:06:11 +09:00
Zbigniew Jędrzejewski-Szmek f8bab19674
Merge pull request #12887 from fbuihuu/coredump-cleanup-part-1
Coredump cleanup part 1
2019-06-28 16:25:46 +02:00
Zbigniew Jędrzejewski-Szmek 7504610ba0 udev-rules: add more info to errors about attr formats 2019-06-28 16:20:48 +02:00
Zbigniew Jędrzejewski-Szmek f85cc54c4b udev-rules: add precise information to rule failure logs
It is pretty hard to figure out what the problem actually is, esp. when the rule
is long.

On my machine:
systemd[1]: Starting udev Kernel Device Manager...
systemd-udevd[217399]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 Invalid value for OPTIONS key, ignoring: 'event_timeout=180'
systemd-udevd[217399]: /usr/lib/udev/rules.d/11-dm-lvm.rules:40 The line takes no effect, ignoring.
systemd-udevd[217399]: /etc/udev/rules.d/60-ipath.rules:4 Invalid value "kcopy/%02n" for NAME (char 7: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/65-md-incremental.rules:28 Invalid value "/sbin/mdadm -I $env{DEVNAME} --export $devnode --offroot ${DEVLINKS}" for IMPORT (char 58: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /etc/udev/rules.d/73-special-net-names.rules:14 Invalid value "/bin/sh -ec 'D=${DEVPATH#*/vio/}; D=${D%%%%/*}; D=${D#????}; D=${D#0}; D=${D#0}; D=${D#0}; D=${D#0}; echo ${D:-0}'" for PROGRAM (char 16: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/84-nm-drivers.rules:10 Invalid value "/bin/sh -c 'ethtool -i $1 | sed -n s/^driver:\ //p' -- $env{INTERFACE}" for PROGRAM (char 24: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/90-libgpod.rules:19 IMPORT key takes '==' or '!=' operator, assuming '==', but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/90-libgpod.rules:23 IMPORT key takes '==' or '!=' operator, assuming '==', but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/99-vmware-scsi-udev.rules:5 Invalid value "/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" for RUN (char 27: invalid substitution type), ignoring, but please fix it.
systemd-udevd[217399]: /usr/lib/udev/rules.d/99-vmware-scsi-udev.rules:6 Invalid value "/bin/sh -c 'echo 180 >/sys$DEVPATH/device/timeout'" for RUN (char 27: invalid substitution type), ignoring, but please fix it.
systemd[1]: Started udev Kernel Device Manager.
2019-06-28 16:20:48 +02:00
Zbigniew Jędrzejewski-Szmek 1824300add udev-event: use normal pointer ops where appropriate 2019-06-28 16:20:48 +02:00
Zbigniew Jędrzejewski-Szmek e79c228b52 udev: move rule structure definitions into the .c file
They are (and should) only be used there, no need to expose them.
2019-06-28 16:20:48 +02:00