Commit Graph

38100 Commits

Author SHA1 Message Date
Luca Boccassi
31cd2dd906 core: taint if /usr is unmerged
9afd5e7b97 introduced a build-time
taint, introduce a runtime one as well, in preparation for
removing support for unmerged-usr in a future release
2022-04-06 21:54:14 +01:00
Yu Watanabe
3452ae90ea test: --initialized=yes is the default for udevadm wait 2022-04-07 00:40:33 +09:00
Yu Watanabe
76b53bf54b Merge pull request #22993 from keszybz/refactor-manager_taint_string()
Refactor manager_taint_string()
2022-04-07 00:36:45 +09:00
Daan De Meyer
cae7c28272 analyze: Fix verify exit status regression
Previously, systemd-analyze verify would return 0 even if warnings
were raised during analysis of the specified units or their
dependencies. With 3cc3dc7, verify was changed to return 1 when
warnings were raised.

This commit changes the default mode to _RECURSIVE_ERRORS_INVALID
so that verify returns zero again by default when warnings are
raised.
2022-04-06 23:16:02 +09:00
Yu Watanabe
2eeabd4489 Merge pull request #22983 from yuwata/login-use-symlinks-under-static_node-tags
login: shorten code a bit
2022-04-06 23:11:56 +09:00
Yu Watanabe
a9e832092a udev: add a brief comment about the origin of the filters
I am not sure whether the original discussions are correct or not.
This is just for adding references for future verification for the
filters.
2022-04-06 15:28:44 +02:00
Zbigniew Jędrzejewski-Szmek
e5f2d77b48 basic/strv: fix typos and confusion whether we are escaping or unescaping 2022-04-06 15:26:05 +02:00
Zbigniew Jędrzejewski-Szmek
226281b36d Add new test-manager.c and "test" manager_taint_string()
It seems it doesn't fit well anywhere else.
2022-04-06 15:26:05 +02:00
Zbigniew Jędrzejewski-Szmek
83fe5d8a78 manager: rework manager_taint_string()
When I see stpcpy, my brain bleeds. This function was too complicated
for it's own good.
2022-04-06 12:55:57 +02:00
Yu Watanabe
e992fd18a8 login: shorten code a bit
The symlinks under /run/udev/static_node-tags are pointing to the
corresponding device nodes. Let's read the symlinks.
2022-04-06 19:38:27 +09:00
Yu Watanabe
8dc3c2f197 Merge pull request #22981 from yuwata/udev-node-cleanups
udev: cleanups for device node handling
2022-04-06 19:34:59 +09:00
Lennart Poettering
39ff521c99 Merge pull request #22968 from keszybz/kernel-4.4
Recommend kernel 4.15 or newer
2022-04-06 12:03:47 +02:00
Michal Sekletar
66425daf2c udev/net_id: avoid slot based names only for single function devices
If we have two or more devices that share the same slot but they are
also multifunction then it is OK to use the slot information even if it
is the same for all of them. Name conflict will be avoided because we
will append function number and form names like, ens1f1, ens1f2...
2022-04-06 11:51:03 +02:00
Yu Watanabe
190ed66edc udevadm: lock: fix TOCTOU
Fixes CID#1487744.
2022-04-06 08:58:23 +01:00
Yu Watanabe
26dd37f6d5 udev: move apply_static_dev_perms() to udev-node.c
and make it internally use udev_node_apply_permissions_impl().
2022-04-06 14:52:36 +09:00
Yu Watanabe
e5ddfe3ec5 udev: upgrade mode in udev_node_apply_permissions_impl() 2022-04-06 14:46:13 +09:00
Yu Watanabe
a782f2a3fc udev: split udev_node_apply_permissions() into two 2022-04-06 14:46:13 +09:00
Yu Watanabe
f14aa5ad42 udev: drop unnecessary code
Follow-up for 78e278ad48.
2022-04-06 14:46:13 +09:00
Yu Watanabe
bab34bc12e Merge pull request #22980 from keszybz/test-help-and-version-output
Test --help and --version output in more cases
2022-04-06 13:42:12 +09:00
Zbigniew Jędrzejewski-Szmek
99d8cbceff meson: make kernel-install a template file, add --version, add to tests
In --help output, change "$0" → "kernel-install". We generally don't include
the full path in --help output, and let's not do this here either.

kernel-install is now in build/ directly, not in the subdirectory.
2022-04-05 22:18:31 +02:00
Zbigniew Jędrzejewski-Szmek
8f04a1ca2b meson: also allow setting GIT_VERSION via templates
GIT_VERSION is not available as a config.h variable, because it's rendered
into version.h during builds. Let's rework jinja2 rendering to also
parse version.h. No functional change, the new variable is so far unused.

I guess this will make partial rebuilds a bit slower, but it's useful
to be able to use the full version string.
2022-04-05 22:18:31 +02:00
Zbigniew Jędrzejewski-Szmek
e16793ee7e firstboot: make --help output fit in 80 columns
A long name of one parameter was making the whole thing very wide.
I think that it's obvious from the context what the argument is,
so a shorter name should be just as good.
2022-04-05 22:18:31 +02:00
Zbigniew Jędrzejewski-Szmek
03b3b55e11 pid1: make --help output fit in 80 columns 2022-04-05 22:18:31 +02:00
Yu Watanabe
5674b74c4f hwdb: fix parsing options
Fixes #22976.
2022-04-06 04:03:32 +09:00
Zbigniew Jędrzejewski-Szmek
2c75ef181d manager: fix typo
I guess that we could make an overflow if all the taint flags were set.
2022-04-05 20:31:59 +02:00
Zbigniew Jędrzejewski-Szmek
277f05872f README: say kernel 4.15 is the minimum recommended
After various long discussions
(https://lists.freedesktop.org/archives/systemd-devel/2022-March/047587.html,
https://lwn.net/Articles/889610/), there is no clear answer what the minimum
version should be. Bumping the version above 3.15 doesn't allow us to make any
significant simplifications (unless we went *much* higher). In particular, even
renameat2() is not fully supported with latest kernel versions, e.g. nfs still
doesn't have it. And the bpf stuff is optional anyway. So let's just say that
4.15 is what we recommend, because it provides fairly complete cgroups-v2, but
without any removals of compat in the code.
2022-04-05 20:30:00 +02:00
Lennart Poettering
80b7f7118e Merge pull request #22975 from poettering/logind-longpress-followup
logind: "long press" follow-up
2022-04-05 18:42:17 +02:00
Yu Watanabe
58dd4999dc core: command argument can be longer than PATH_MAX
Fixes a bug introduced by 0653649202.

Fixes #22957.
2022-04-06 00:39:06 +09:00
Lennart Poettering
acc63800bc logind: also show long press settings in default logind.conf
The configuration options where added back in
a520bb6654 but this was never actually
added to the default logind.conf.

Follow-up-for: a520bb6654
Follow-up-for: #19917
2022-04-05 16:10:21 +02:00
Lennart Poettering
c4db78fce6 logind: expose long press actions on D-Bus
The settings and internal varables were added, but this was never
exposed on the bus. Add that.

Follow-up-for: a520bb6654
Follow-up-for: #19917
2022-04-05 16:09:52 +02:00
Luca Boccassi
18a02561f1 Merge pull request #22953 from yuwata/test-sd-device
test: several fixlets for test-sd-device
2022-04-05 11:10:20 +01:00
Zbigniew Jędrzejewski-Szmek
42ac3bf1a3 Merge pull request #22956 from yuwata/network-fix-permission-error
network: ignore all errors in loading .network files
2022-04-05 08:59:44 +02:00
Yu Watanabe
c7749367e3 test-sd-device: ignore several errors when running on non-host network namespace
Fixes 93e04eb43b (commitcomment-70387367).
2022-04-05 14:33:19 +09:00
Yu Watanabe
b1d723228e test-sd-device: allow several devices removed during running test
To make the test stabler.
2022-04-05 14:29:52 +09:00
Yu Watanabe
901fa9a4c9 test-sd-device: device ID requires subsystem 2022-04-05 14:29:49 +09:00
Yu Watanabe
04d1fbd564 test-sd-device: log earlier which device is handled
To make debugging the test easier.
2022-04-05 14:29:41 +09:00
Yu Watanabe
20742f92c1 Merge pull request #22951 from keszybz/fix-entry-selection-bootctl-status
Fix entry selection in bootctl status
2022-04-05 13:42:43 +09:00
Yu Watanabe
e7e25c21c6 fix typo 2022-04-05 04:36:20 +09:00
Zbigniew Jędrzejewski-Szmek
8214758bd5 bootctl: unify boot entry loading for "status" and "list"
We must be consistent in the two listings, so let's split out the loading code
and call it from both verb_status() and verb_list(). This effectively makes
verb_status() also call efi_loader_get_entries().

There is still some code duplicated, but that's hard to avoid. Error messages
are made identical for the same errors in various places.

Fixes #22580.
2022-04-04 21:18:14 +02:00
Yu Watanabe
f379362157 Merge pull request #22963 from poettering/udevadm-diskseq-fix
sd-device diskseq fix + udevadm info improvements
2022-04-05 03:57:24 +09:00
Yu Watanabe
cf708d803e Merge pull request #22867 from poettering/lockdev-util
add small "udevadm lock" tool for locking a block device
2022-04-05 03:04:23 +09:00
Luca Boccassi
4e9a7022c5 Merge pull request #22960 from mrc0mmand/use-udevadm-wait
test: use the new `udevadm wait` verb to wait for the loop device
2022-04-04 18:39:59 +01:00
Lennart Poettering
6b41a7b281 tree-wide: use 'Architecture' type consistently across the tree
Some parts of our tree used 'Architecture' for storing architectures,
others used ints. Let's unify on the former.

Inspired by #22952's rework of the 'Virtualization' enum.
2022-04-05 02:19:37 +09:00
Yu Watanabe
5672bdd341 udev/net: always log error in link_load_one() 2022-04-05 02:03:22 +09:00
Yu Watanabe
61ec7beaf5 network: always log error in network_load_one() and netdev_load_one() 2022-04-05 02:02:42 +09:00
Yu Watanabe
036a8d503f network: ignore all errors in loading .network files
This partially reverts 9202b567bc.

Fixes #22954.
2022-04-05 01:57:07 +09:00
Lennart Poettering
7ba77d8f55 udevadm: if invalid devices are specified on "info" verb, continue
If multiple devices are specified on "udevadm info", then show data
about them all even if one is missing. Return first encountered error
though.
2022-04-04 18:25:18 +02:00
Lennart Poettering
13005c8f2c udevadm: add a dash of color to "udevadm info"
Let's make it easier to discern the "header" of device records from the
"body", i.e. non-property data from property data, by using some
conservative coloring.
2022-04-04 18:25:16 +02:00
Lennart Poettering
a0e902598c udevadm: show more fields of sd_device objects in "udevadm info"
Let's make things easier to debug, and show a more comprehensive set of
fields, extending on the existing output syntax that starts with one
marker character followed by a colon and a space.
2022-04-04 18:24:14 +02:00
Lennart Poettering
1ce0d04059 sd-device: actually read diskseq if told so
sd_device_get_diskseq() actually called device_read_uevent_file() but
that function didn't actually parse DISKSEQ= so far. Fix that.
2022-04-04 18:21:41 +02:00