Frantisek Sumsal [Thu, 7 Apr 2022 13:08:55 +0000 (13:08 +0000)]
Merge pull request #23000 from mrc0mmand/coverage__exit
macro: call __gcov_dump() before _exit() w/ coverage enabled
Frantisek Sumsal [Thu, 7 Apr 2022 10:45:13 +0000 (12:45 +0200)]
test: ignore missing coverage in TEST-02
Since
c6552ad we now try to collect coverage even in situations where
it's basically impossible (like in test-mount-util where the whole / is
mounted as read-only). As dealing with this is not worth the trouble,
let's ignore the missing coverage errors thrown by gcov in such cases.
Frantisek Sumsal [Wed, 6 Apr 2022 17:41:01 +0000 (19:41 +0200)]
macro: call __gcov_dump() before _exit() w/ coverage enabled
_exit() skips at-exit hooks, causing lost coverage from processes
utilizing it.
Hopefully resolves systemd/systemd-centos-ci#482
Yu Watanabe [Wed, 6 Apr 2022 18:38:56 +0000 (03:38 +0900)]
sd-ipv4acd: actually drop the arp packet from one of the host interface
Fixes a bug in
7f77917c0effe92d5fed52503bceddabcb4667ba.
Fixes #23001.
Luca Boccassi [Thu, 7 Apr 2022 00:18:53 +0000 (01:18 +0100)]
semaphoreci: re-enable rebooting tests
Fixed by https://salsa.debian.org/systemd-team/systemd/-/commit/
5738b62f5544d040550a018dcd02701bac4feec8
Fixes https://github.com/systemd/systemd/issues/22991
Anita Zhang [Wed, 6 Apr 2022 23:42:46 +0000 (16:42 -0700)]
Merge pull request #22965 from enr0n/oomd-used-memory-calc
oomd: calculate 'used' memory with MemAvailable instead of MemFree
Mariusz Tkaczyk [Tue, 29 Mar 2022 10:49:54 +0000 (12:49 +0200)]
shutdown: get only active md arrays.
Current md_list_get() implementation filters all block devices, started from
"md*". This is ambiguous because list could contain:
- partitions created upon md device (mdXpY)
- external metadata container- specific type of md array.
For partitions there is no issue, because they aren't handle STOP_ARRAY
ioctl sent later. It generates misleading errors only.
Second case is more problematic because containers are not locked in kernel.
They are stopped even if container member array is active. For that reason
reboot or shutdown flow could be blocked because metadata manager cannot be
restarted after switch root on shutdown.
Add filters to remove partitions and containers from md_list. Partitions
can be excluded by DEVTYPE. Containers are determined by MD_LEVEL
property, we are excluding all with "container" value.
Signed-off-by: Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>
Luca Boccassi [Tue, 5 Apr 2022 19:37:59 +0000 (20:37 +0100)]
core: taint if /usr is unmerged
9afd5e7b975e8051c011ff9c07c95e80bd954469 introduced a build-time
taint, introduce a runtime one as well, in preparation for
removing support for unmerged-usr in a future release
Frantisek Sumsal [Wed, 6 Apr 2022 20:47:12 +0000 (20:47 +0000)]
Merge pull request #22996 from yuwata/test-sfdisk-lock
test: use "udevadm lock" more
Yu Watanabe [Wed, 6 Apr 2022 16:39:20 +0000 (01:39 +0900)]
test: drop unnecessary use of loop device
To avoid inferences with udevd.
Yu Watanabe [Wed, 6 Apr 2022 16:35:26 +0000 (01:35 +0900)]
test: use udevadm lock when partitioning block devices
We can use `sfdisk --lock` for these cases, but some CI environments
have old sfdisk which does not support `--lock` option.
Lennart Poettering [Wed, 6 Apr 2022 16:37:51 +0000 (18:37 +0200)]
update TODO
Yu Watanabe [Wed, 6 Apr 2022 12:42:44 +0000 (21:42 +0900)]
test: --initialized=yes is the default for udevadm wait
Yu Watanabe [Wed, 6 Apr 2022 15:36:45 +0000 (00:36 +0900)]
Merge pull request #22993 from keszybz/refactor-manager_taint_string()
Refactor manager_taint_string()
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2022 09:56:05 +0000 (11:56 +0200)]
hwdb: drop boilerplate about match patterns being unstable
We've had this text since the beginning, but in fact the patterns must be
stable in order for people to create local hwdb entries. And we support that
and can't change the match patterns without being very careful. So let's just
drop the text.
Daan De Meyer [Wed, 6 Apr 2022 10:15:33 +0000 (12:15 +0200)]
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.
Yu Watanabe [Wed, 6 Apr 2022 14:05:59 +0000 (23:05 +0900)]
README: rawhide -> Rawhide
Yu Watanabe [Wed, 6 Apr 2022 14:13:10 +0000 (23:13 +0900)]
README: add rawhide SELinux build status (#22997)
Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
Yu Watanabe [Wed, 6 Apr 2022 14:11:56 +0000 (23:11 +0900)]
Merge pull request #22983 from yuwata/login-use-symlinks-under-static_node-tags
login: shorten code a bit
Yu Watanabe [Wed, 6 Apr 2022 11:18:51 +0000 (20:18 +0900)]
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.
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2022 10:50:44 +0000 (12:50 +0200)]
basic/strv: fix typos and confusion whether we are escaping or unescaping
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2022 10:42:58 +0000 (12:42 +0200)]
Add new test-manager.c and "test" manager_taint_string()
It seems it doesn't fit well anywhere else.
Zbigniew Jędrzejewski-Szmek [Wed, 6 Apr 2022 10:26:50 +0000 (12:26 +0200)]
manager: rework manager_taint_string()
When I see stpcpy, my brain bleeds. This function was too complicated
for it's own good.
Yu Watanabe [Tue, 5 Apr 2022 18:51:54 +0000 (03:51 +0900)]
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.
Yu Watanabe [Wed, 6 Apr 2022 10:34:59 +0000 (19:34 +0900)]
Merge pull request #22981 from yuwata/udev-node-cleanups
udev: cleanups for device node handling
Frantisek Sumsal [Wed, 6 Apr 2022 10:27:17 +0000 (10:27 +0000)]
Merge pull request #22985 from bluca/semaphore
Semaphore CI fixes
Lennart Poettering [Wed, 6 Apr 2022 10:03:47 +0000 (12:03 +0200)]
Merge pull request #22968 from keszybz/kernel-4.4
Recommend kernel 4.15 or newer
Michal Sekletar [Wed, 23 Mar 2022 16:34:12 +0000 (17:34 +0100)]
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...
Luca Boccassi [Wed, 6 Apr 2022 00:04:14 +0000 (01:04 +0100)]
semaphoreci: skip boot-and-services test
It started failing, disable it for now
Luca Boccassi [Tue, 5 Apr 2022 21:15:42 +0000 (22:15 +0100)]
semaphoreci: move runner from Bionic to Focal
Yu Watanabe [Wed, 6 Apr 2022 05:41:50 +0000 (14:41 +0900)]
test-network: rename one .netdev to make the file removed after the test
Follow-up for
7809cab71738aa582ac30e7dbc8d1e76c303ff9e.
Yu Watanabe [Tue, 5 Apr 2022 16:17:23 +0000 (01:17 +0900)]
udevadm: lock: fix TOCTOU
Fixes CID#
1487744.
Yu Watanabe [Tue, 5 Apr 2022 17:31:19 +0000 (02:31 +0900)]
udev: move apply_static_dev_perms() to udev-node.c
and make it internally use udev_node_apply_permissions_impl().
Yu Watanabe [Tue, 5 Apr 2022 17:20:11 +0000 (02:20 +0900)]
udev: upgrade mode in udev_node_apply_permissions_impl()
Yu Watanabe [Tue, 5 Apr 2022 16:51:47 +0000 (01:51 +0900)]
udev: split udev_node_apply_permissions() into two
Yu Watanabe [Tue, 5 Apr 2022 16:35:04 +0000 (01:35 +0900)]
udev: drop unnecessary code
Follow-up for
78e278ad48e0d2854f950f261804fde70121820e.
Yu Watanabe [Wed, 6 Apr 2022 04:42:12 +0000 (13:42 +0900)]
Merge pull request #22980 from keszybz/test-help-and-version-output
Test --help and --version output in more cases
Luca Boccassi [Tue, 5 Apr 2022 22:45:27 +0000 (23:45 +0100)]
semaphoreci: speed up package installation
Disable updating the manpage database, and use dpkg's unsafe-io flag
Luca Boccassi [Tue, 5 Apr 2022 21:23:49 +0000 (22:23 +0100)]
semaphoreci: run dhclient manually on setup
For some reason the guest container stopped having its
network interface configured. Run the dhcp client manually.
Luca Boccassi [Tue, 5 Apr 2022 21:11:55 +0000 (22:11 +0100)]
semaphoreci: check keys.opengpgp.org first
Always resolves and it's faster than the others
+ for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 1
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 4
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 9
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 16
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 25
+ for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 1
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 4
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 9
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 16
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.gnupg.net
Setting up the GPG keyring
ERROR: Unable to fetch GPG key from keyserver
lxc-create: bullseye-amd64: lxccontainer.c: create_run_template: 1617 Failed to create container from template
lxc-create: bullseye-amd64: tools/lxc_create.c: main: 327 Failed to create container bullseye-amd64
+ sleep 25
+ for keyserver in "" "keys.gnupg.net" "keys.openpgp.org" "keyserver.ubuntu.com"
+ for retry in {1..5}
+ sudo lxc-create -n bullseye-amd64 -t download -- -d debian -r bullseye -a amd64 --keyserver keys.openpgp.org
Setting up the GPG keyring
Downloading the image index
Downloading the rootfs
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 16:18:56 +0000 (18:18 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 14:52:44 +0000 (16:52 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 12:12:52 +0000 (14:12 +0200)]
test: do --help/--version checks for systemd, firstboot, cryptenroll, s-n-w-o
I basically went by the list in systemd.directives for --help/-h.
kernel-install is also listed there, but will be added in a later commit.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 12:11:42 +0000 (14:11 +0200)]
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.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 12:10:04 +0000 (14:10 +0200)]
pid1: make --help output fit in 80 columns
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 09:00:59 +0000 (11:00 +0200)]
test/check-help: check that --help and -h are identical
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 08:51:21 +0000 (10:51 +0200)]
tests: add a smoke test for --version option in binaries
This is very similar to (and directly based on) the test for --help. I think
it's nice to do this: the test is very quick, but it'll catch cases where we
forgot to hook up the option, or forgot to exit after printing --version, and
it'll also increase our test coverage a bit.
Yu Watanabe [Tue, 5 Apr 2022 16:08:35 +0000 (01:08 +0900)]
hwdb: fix parsing options
Fixes #22976.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 18:31:59 +0000 (20:31 +0200)]
manager: fix typo
I guess that we could make an overflow if all the taint flags were set.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 18:31:03 +0000 (20:31 +0200)]
README: describe taint flags and how to check them
We should have this somewhere. We talk about versions of things
in the README, so it seems as good a place as any.
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 08:24:27 +0000 (10:24 +0200)]
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.
Lennart Poettering [Tue, 5 Apr 2022 16:42:17 +0000 (18:42 +0200)]
Merge pull request #22975 from poettering/logind-longpress-followup
logind: "long press" follow-up
Yu Watanabe [Tue, 5 Apr 2022 12:47:46 +0000 (21:47 +0900)]
core: command argument can be longer than PATH_MAX
Fixes a bug introduced by
065364920281e1cf59cab989e17aff21790505c4.
Fixes #22957.
Lennart Poettering [Tue, 5 Apr 2022 13:59:01 +0000 (15:59 +0200)]
man: split an overly long paragraph in two
Lennart Poettering [Tue, 5 Apr 2022 13:52:49 +0000 (15:52 +0200)]
logind: also show long press settings in default logind.conf
The configuration options where added back in
a520bb665417af7aa98dcb983f3583659bbab807 but this was never actually
added to the default logind.conf.
Follow-up-for:
a520bb665417af7aa98dcb983f3583659bbab807
Follow-up-for: #19917
Lennart Poettering [Tue, 5 Apr 2022 13:50:56 +0000 (15:50 +0200)]
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:
a520bb665417af7aa98dcb983f3583659bbab807
Follow-up-for: #19917
Nick Rosbrook [Mon, 4 Apr 2022 19:06:07 +0000 (15:06 -0400)]
oomd: calculate 'used' memory with MemAvailable instead of MemFree
The calculation for used memory in oomd_system_context_acquire is given
by MemTotal - MemFree from /proc/meminfo. This is too strict of a
calculation because it does not consider memory that is still available
for starting new applictions without swapping (MemAvailable). As a
result, systemd-oomd can start to kill processes before it is necessary.
This is more apparent on systems with low swap space.
Instead, compute 'used' memory as MemTotal - MemAvailable in
oomd_system_context_acquire and procfs_memory_get (which is used by
oomd_cgroup_context_acquire). And, rename oomd_mem_free_below to
oomd_mem_available_below for clarity.
Lennart Poettering [Tue, 5 Apr 2022 12:36:00 +0000 (14:36 +0200)]
update TODO
Lennart Poettering [Tue, 5 Apr 2022 12:02:36 +0000 (14:02 +0200)]
fix TODO
Lennart Poettering [Tue, 5 Apr 2022 11:59:39 +0000 (13:59 +0200)]
update TODO
Luca Boccassi [Tue, 5 Apr 2022 10:10:20 +0000 (11:10 +0100)]
Merge pull request #22953 from yuwata/test-sd-device
test: several fixlets for test-sd-device
Lennart Poettering [Tue, 5 Apr 2022 08:44:52 +0000 (10:44 +0200)]
update TODO
Lennart Poettering [Tue, 5 Apr 2022 08:16:45 +0000 (10:16 +0200)]
update TODO
Zbigniew Jędrzejewski-Szmek [Tue, 5 Apr 2022 06:59:44 +0000 (08:59 +0200)]
Merge pull request #22956 from yuwata/network-fix-permission-error
network: ignore all errors in loading .network files
Yu Watanabe [Tue, 5 Apr 2022 05:28:20 +0000 (14:28 +0900)]
test-sd-device: ignore several errors when running on non-host network namespace
Fixes https://github.com/systemd/systemd/commit/
93e04eb43bed6cd1cea344f8fb1002b62155fae2#commitcomment-
70387367.
Yu Watanabe [Mon, 4 Apr 2022 09:39:38 +0000 (18:39 +0900)]
test-sd-device: allow several devices removed during running test
To make the test stabler.
Yu Watanabe [Mon, 4 Apr 2022 09:25:49 +0000 (18:25 +0900)]
test-sd-device: device ID requires subsystem
Yu Watanabe [Mon, 4 Apr 2022 09:42:29 +0000 (18:42 +0900)]
test-sd-device: log earlier which device is handled
To make debugging the test easier.
Yu Watanabe [Tue, 5 Apr 2022 04:42:43 +0000 (13:42 +0900)]
Merge pull request #22951 from keszybz/fix-entry-selection-bootctl-status
Fix entry selection in bootctl status
Yu Watanabe [Tue, 5 Apr 2022 04:13:06 +0000 (13:13 +0900)]
Merge pull request #22964 from yuwata/udevadm-lock-follow-ups
udevadm lock follow ups
Yu Watanabe [Mon, 4 Apr 2022 18:31:58 +0000 (03:31 +0900)]
test: use udevadm wait and lock
Hopefully fixes #22911.
Yu Watanabe [Mon, 4 Apr 2022 18:17:48 +0000 (03:17 +0900)]
shell-completion: update for udevadm
Yu Watanabe [Mon, 4 Apr 2022 18:56:10 +0000 (03:56 +0900)]
fix typo
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2022 08:45:47 +0000 (10:45 +0200)]
man: add annotated example for bootctl status & list
This is based on the output on my laptop, with various manual adjustments.
If people have other types of entries, it'd be useful to add them here. In
particular, some dual-boot entries would be nice.
Zbigniew Jędrzejewski-Szmek [Mon, 4 Apr 2022 08:13:16 +0000 (10:13 +0200)]
man: fix tag syntax
Strangely enough, having <varlistenetry>s outside of <variablelist> wasn't
causing visual problems. But having two <listitem>s in one <varlistentry>
resulted in the paragraphs running together in the rendered man page.
Zbigniew Jędrzejewski-Szmek [Fri, 1 Apr 2022 10:08:17 +0000 (12:08 +0200)]
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.
Yu Watanabe [Mon, 4 Apr 2022 18:57:24 +0000 (03:57 +0900)]
Merge pull request #22963 from poettering/udevadm-diskseq-fix
sd-device diskseq fix + udevadm info improvements
Yu Watanabe [Mon, 4 Apr 2022 18:04:23 +0000 (03:04 +0900)]
Merge pull request #22867 from poettering/lockdev-util
add small "udevadm lock" tool for locking a block device
Luca Boccassi [Mon, 4 Apr 2022 17:39:59 +0000 (18:39 +0100)]
Merge pull request #22960 from mrc0mmand/use-udevadm-wait
test: use the new `udevadm wait` verb to wait for the loop device
Lennart Poettering [Mon, 4 Apr 2022 10:46:03 +0000 (12:46 +0200)]
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.
Yu Watanabe [Mon, 4 Apr 2022 17:03:22 +0000 (02:03 +0900)]
udev/net: always log error in link_load_one()
Yu Watanabe [Mon, 4 Apr 2022 16:58:37 +0000 (01:58 +0900)]
network: always log error in network_load_one() and netdev_load_one()
Yu Watanabe [Mon, 4 Apr 2022 16:57:03 +0000 (01:57 +0900)]
network: ignore all errors in loading .network files
This partially reverts
9202b567bcdd0c1f6a1fc2a5f36602e619960813.
Fixes #22954.
Lennart Poettering [Mon, 4 Apr 2022 13:35:01 +0000 (15:35 +0200)]
man: document various sd_device_get_xyz() functions
Lennart Poettering [Mon, 4 Apr 2022 14:01:25 +0000 (16:01 +0200)]
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.
Lennart Poettering [Mon, 4 Apr 2022 14:00:25 +0000 (16:00 +0200)]
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.
Lennart Poettering [Mon, 4 Apr 2022 13:25:01 +0000 (15:25 +0200)]
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.
Lennart Poettering [Mon, 4 Apr 2022 13:18:57 +0000 (15:18 +0200)]
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.
Lennart Poettering [Mon, 4 Apr 2022 13:20:01 +0000 (15:20 +0200)]
sd-device: rename return parameter of sd_device_get_devpath() to ret
Lennart Poettering [Mon, 4 Apr 2022 13:38:33 +0000 (15:38 +0200)]
man: properly conditionalize kernel-install man page
Change
f887eab1da85d0053321d43228042d90720eb77e conditionalized the
building of ther kenel-install man page in the generated meson output,
instead of the source in the XML markup. Thus, whenever the rules file
is updated the conditionalization is lost. Correct that.
Follow-up for:
f887eab1da85d0053321d43228042d90720eb77e
Franck Bui [Fri, 18 Mar 2022 07:12:48 +0000 (08:12 +0100)]
journald: make use of CLAMP() in cache_space_refresh()
Franck Bui [Fri, 18 Mar 2022 07:12:06 +0000 (08:12 +0100)]
journald: make sure journal_file_open() doesn't leave a corrupted file around after failing
This can be problematic especially when there's no more free disk
space. Consider the following:.
When disk space becomes sparse, writting to the system journal can lead to
error. In this case journald attempts to make room by rotating the journals,
which consists in archiving online journals and opening new ones.
However opening new files is likely to fail too and in this case
journal_file_open() leaves half initialized file around but in online
state. Then the error is propagated and journald switches into volatile mode.
Next time a new message is received by journald, it tries to open the
persistent system journal file to switch automatically back to persistent
mode.
When opening the system journal, journal_file_open(), called by
managed_journal_file_open_reliably(), finds the persistent system journal left
previously and assumes that it was uncleanly closed and considers it as
corrupted. The error is reported to managed_journal_file_open_reliably(), which
backs the file up and attempts to create a new system file, which fails and
leaves a corrupted system file again.
Since this is done for each message received by journald, /var/log/message can
be filled with backup files pretty quickly.
To prevent this, the patch makes sure to delete the newly created file in case
of error.
Lennart Poettering [Mon, 28 Mar 2022 13:10:56 +0000 (15:10 +0200)]
man: document new udevadm lock tool
Lennart Poettering [Fri, 1 Apr 2022 12:27:45 +0000 (14:27 +0200)]
udevadm: add new "lock" verb for locking block devices
Lennart Poettering [Fri, 1 Apr 2022 12:21:44 +0000 (14:21 +0200)]
hash-funcs: tweak odering in devt_compare_func()
Let's order dev_t's by their major first, minor secondary. The binary
encoding of the two fields is weirdly interleaved and different in
kernel and glibc, hence let's focus on the generic part that works like
users would expect it.
So far the function is only used to compare for equality, not for
sorting, hence this has no immediate effect.
Lennart Poettering [Mon, 4 Apr 2022 13:20:19 +0000 (15:20 +0200)]
TODO
Frantisek Sumsal [Mon, 4 Apr 2022 13:56:00 +0000 (15:56 +0200)]
partition: use `udevadm wait`
Frantisek Sumsal [Mon, 4 Apr 2022 13:58:03 +0000 (15:58 +0200)]
test: use the new `udevadm wait` verb to wait for the loop device
The original workaround didn't work, as `systemd-repart` kept failing
even when the `/dev/loopX` device was present:
```
[ 13.959419] H testsuite-58.sh[280]: + LOOP=/dev/loop1
[ 13.959636] H testsuite-58.sh[280]: + :
[ 13.959764] H testsuite-58.sh[280]: + test -e /dev/loop1
[ 13.959895] H testsuite-58.sh[280]: + break
[ 13.960023] H testsuite-58.sh[280]: + systemd-repart --pretty=yes --definitions=/tmp/testsuite-58-sector/ --seed=
750b6cd5c4ae4012a15e7be3c29e6a47 --empty=require --dry-run=no /dev/loop1
[ 13.970538] H testsuite-58.sh[363]: Device '/dev/loop1' has no dm-crypt/dm-verity device, no need to look for underlying block device.
[ 13.970538] H testsuite-58.sh[363]: Failed to determine canonical path for '/dev/loop1': No such file or directory
[ 13.970538] H testsuite-58.sh[363]: Failed to open file or determine backing device of /dev/loop1: No such file or directory
```
Yu Watanabe [Mon, 4 Apr 2022 13:55:02 +0000 (22:55 +0900)]
Merge pull request #22943 from yuwata/dhcp6-client-requet-options
sd-dhcp6-client: requet options
Yu Watanabe [Mon, 4 Apr 2022 13:53:56 +0000 (22:53 +0900)]
Merge pull request #22952 from poettering/rework-kvm-hyperv
virt: tweak kvm with hyperv enlightenments