1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2024-12-23 17:34:00 +03:00
Commit Graph

57249 Commits

Author SHA1 Message Date
Frantisek Sumsal
673d1f4ab9
Merge pull request #23000 from mrc0mmand/coverage__exit
macro: call __gcov_dump() before _exit() w/ coverage enabled
2022-04-07 13:08:55 +00:00
Frantisek Sumsal
1b2e3b8bff 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.
2022-04-07 12:45:13 +02:00
Frantisek Sumsal
c6552ad381 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
2022-04-07 10:06:44 +02:00
Yu Watanabe
239adf0384 sd-ipv4acd: actually drop the arp packet from one of the host interface
Fixes a bug in 7f77917c0e.

Fixes #23001.
2022-04-07 15:02:21 +09:00
Luca Boccassi
219ff0cb1e semaphoreci: re-enable rebooting tests
Fixed by 5738b62f55

Fixes https://github.com/systemd/systemd/issues/22991
2022-04-07 14:53:49 +09:00
Anita Zhang
3d935cea2c
Merge pull request #22965 from enr0n/oomd-used-memory-calc
oomd: calculate 'used' memory with MemAvailable instead of MemFree
2022-04-06 16:42:46 -07:00
Mariusz Tkaczyk
3a3b022d2c 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>
2022-04-06 21:56:40 +01:00
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
Frantisek Sumsal
124d293268
Merge pull request #22996 from yuwata/test-sfdisk-lock
test: use "udevadm lock" more
2022-04-06 20:47:12 +00:00
Yu Watanabe
70a3ce51f3 test: drop unnecessary use of loop device
To avoid inferences with udevd.
2022-04-07 01:44:39 +09:00
Yu Watanabe
bc6bd62c0e 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.
2022-04-07 01:42:44 +09:00
Lennart Poettering
5645b4976e update TODO 2022-04-06 18:37:51 +02: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
Zbigniew Jędrzejewski-Szmek
adbe000e3d 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.
2022-04-06 23:16:39 +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
2f88f2936c README: rawhide -> Rawhide 2022-04-06 23:14:21 +09:00
Yu Watanabe
588453b8b4
README: add rawhide SELinux build status (#22997)
Co-authored-by: Frantisek Sumsal <frantisek@sumsal.cz>
2022-04-06 14:13:10 +00: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
Frantisek Sumsal
467ba161af
Merge pull request #22985 from bluca/semaphore
Semaphore CI fixes
2022-04-06 10:27:17 +00: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
Luca Boccassi
8821518b00 semaphoreci: skip boot-and-services test
It started failing, disable it for now
2022-04-06 10:41:46 +01:00
Luca Boccassi
16ae198485 semaphoreci: move runner from Bionic to Focal 2022-04-06 10:41:46 +01:00
Yu Watanabe
f7ad162879 test-network: rename one .netdev to make the file removed after the test
Follow-up for 7809cab717.
2022-04-06 18:14:45 +09: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
Luca Boccassi
b6529646e7 semaphoreci: speed up package installation
Disable updating the manpage database, and use dpkg's unsafe-io flag
2022-04-06 00:24:11 +01:00
Luca Boccassi
9a6260b194 semaphoreci: run dhclient manually on setup
For some reason the guest container stopped having its
network interface configured. Run the dhcp client manually.
2022-04-06 00:24:11 +01:00
Luca Boccassi
93de997d12 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
2022-04-05 22:12:17 +01: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
3761002eea 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.
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
Zbigniew Jędrzejewski-Szmek
9f9be6ea28 test/check-help: check that --help and -h are identical 2022-04-05 22:18:31 +02:00
Zbigniew Jędrzejewski-Szmek
ffb7406ba9 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.
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
88a3af9421 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.
2022-04-05 20:31:30 +02:00