Lennart Poettering [Wed, 9 Nov 2022 14:09:08 +0000 (15:09 +0100)]
acpi-fpdt: don't accidentally drop signedness of pread() return
Lennart Poettering [Wed, 9 Nov 2022 14:08:40 +0000 (15:08 +0100)]
acpi-fpdt: use our usual ret_xyz naming scheme
Lennart Poettering [Wed, 9 Nov 2022 13:42:30 +0000 (14:42 +0100)]
Merge pull request #25314 from poettering/dissect-list-tweaks
dissect: minor tweaks to "systemd-dissect --list"
Lennart Poettering [Wed, 9 Nov 2022 10:52:50 +0000 (11:52 +0100)]
dissect: open pager in --list mode, output might be long
Lennart Poettering [Wed, 9 Nov 2022 10:37:42 +0000 (11:37 +0100)]
dissect: simplify flags for recurse_dir()
We are not interested in the struct dirent data, hence there's no point
in passing RECURSE_DIR_ENSURE_TYPE. Let's drop it, and thus avoid some
extrac work on file systems where readdir() does not report .d_type.
Also drop RECURSE_DIR_SAME_MOUNT, because DDIs after all may contain
multiple partitions, and we mount them all together. The --list command
really should report the full set of files in an image.
Lennart Poettering [Wed, 9 Nov 2022 10:37:19 +0000 (11:37 +0100)]
dissect: remove unused variable
Luca Boccassi [Wed, 9 Nov 2022 10:07:00 +0000 (11:07 +0100)]
Merge pull request #25300 from DaanDeMeyer/kernel-selftests
mkosi: Build and install kernel selftests
blutch112 [Mon, 7 Nov 2022 08:19:51 +0000 (09:19 +0100)]
po: Translated using Weblate (French)
Currently translated at 100.0% (193 of 193 strings)
Co-authored-by: blutch112 <vincent.lefebvre59@gmail.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/fr/
Translation: systemd/main
Zbigniew Jędrzejewski-Szmek [Fri, 28 Oct 2022 13:59:49 +0000 (15:59 +0200)]
basic/virt: treat missing /proc as sign of being in a chroot
The logic of running_in_chroot() has been the same since the introduction of
this function in
b4f10a5e8956d26f0bc6b9aef12846b57caee08b: if /proc is not
mounted, the function returns -ENOENT and all callers treat this as false. But
that might be the most common case of chrooted calls, esp. in all the naïve
chroots that were done with the chroot binary without additional setup.
(In particular rpm executes all scriptlets in a chroot without bothering to set
up /proc or /sys, and we have codepaths in sysusers and tmpfiles to support
running in such an environment.)
This change effectively shortcircuits various calls to udevadm, downgrades
logging in tmpfiles, and disables all verbs marked with VERB_ONLINE_ONLY in
systemctl. detect-virt -r is also affected:
$ sudo chroot /var/lib/machines/rawhide
before> systemd-detect-virt -r && echo OK
Failed to check for chroot() environment: No such file or directory
after> systemd-detect-virt -r && echo OK
OK
Yu Watanabe [Wed, 9 Nov 2022 00:23:17 +0000 (09:23 +0900)]
Merge pull request #25291 from keszybz/util-cleanup
Split/rename util.c+h and def.h
Khem Raj [Tue, 8 Nov 2022 20:21:35 +0000 (12:21 -0800)]
networkd-ipv4acd.c: Use net/if.h for getting IFF_LOOPBACK definition
This helps in avoiding compiling errors on musl. Definition of
IFF_LOOPBACK is the reason for including linux/if_arp.h, this however
could be obtained from net/if.h glibc header equally and makes it
portable as well.
Yu Watanabe [Tue, 8 Nov 2022 21:34:23 +0000 (06:34 +0900)]
Merge pull request #25297 from mrc0mmand/aux-test-fixes
test: fix a race in the systemd-mount test
Lennart Poettering [Fri, 4 Nov 2022 17:29:58 +0000 (18:29 +0100)]
dissect: grey out trailing slash in --list output
Given this is just auxiliary info, let's make it a tiny bit less visible
then the main part of the path.
Zbigniew Jędrzejewski-Szmek [Mon, 7 Nov 2022 13:59:58 +0000 (14:59 +0100)]
Rename def.h to constants.h
The name "def.h" originates from before the rule of "no needless abbreviations"
was established. Let's rename the file to clarify that it contains a collection
of various semi-related constants.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 17:41:48 +0000 (18:41 +0100)]
basic/filesystems: fs_in_group() returns a boolean
is_{temporary,network}_fs() looked like they are incorrectly casting an error
to true, but actually the return type is misdeclared.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 15:54:32 +0000 (16:54 +0100)]
basic: rename util.h to logarithm.h
util.h is now about logarithms only, so we can rename it. Many files included
util.h for no apparent reason… Those includes are dropped.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 15:45:48 +0000 (16:45 +0100)]
basic: move a bunch of cmdline-related funcs to new argv-util.c+h
I wanted to move saved_arg[cv] to process-util.c+h, but this causes problems:
process-util.h includes format-util.h which includes net/if.h, which conflicts
with linux/if.h. So we can't include process-util.h in some files.
But process-util.c is very long anyway, so it seems nice to create a new file.
rename_process(), invoked_as(), invoked_by_systemd(), and argv_looks_like_help()
which lived in process-util.c refer to saved_argc and saved_argv, so it seems
reasonable to move them to the new file too.
util.c is now empty, so it is removed. util.h remains.
Zbigniew Jędrzejewski-Szmek [Tue, 8 Nov 2022 12:37:27 +0000 (13:37 +0100)]
meson: add version.h as dependency to more targets
version.h can be generated after compilation starts, creating a race condition
between compilation of various .c files and creation of version.h. Let's add it
as a dependency to more build targets that require version.h or build.h.
So far we played whack'a'mole by adding versiondep whenever compilation failed.
In principle any target which includes compilation (i.e. any that has .c
sources directly), could require this. I don't understand why we didn't see
more failures… But it seems reasonable to just add the dependency more widely.
Lennart Poettering [Tue, 8 Nov 2022 13:37:26 +0000 (14:37 +0100)]
update TODO
Daan De Meyer [Wed, 2 Nov 2022 11:19:11 +0000 (12:19 +0100)]
mkosi: Build and install kernel selftests
Daan De Meyer [Wed, 2 Nov 2022 10:46:14 +0000 (11:46 +0100)]
mkosi: Add back libasan/libubsan libraries
These were accidentally removed as part of #24025
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 15:30:58 +0000 (16:30 +0100)]
basic: move version() to build.h+c
Zbigniew Jędrzejewski-Szmek [Sat, 5 Nov 2022 16:47:06 +0000 (17:47 +0100)]
basic,shared: move disable_coredumps() to coredump-util.[ch]
Zbigniew Jędrzejewski-Szmek [Sat, 5 Nov 2022 16:40:01 +0000 (17:40 +0100)]
basic: move container_get_leader() to process-util.[ch]
basic/util.[ch] is a grab-bag of unrelated functions. Let's move a few
of the remaning functions to better locations.
Zbigniew Jędrzejewski-Szmek [Sat, 5 Nov 2022 16:29:43 +0000 (17:29 +0100)]
basic: create new basic/initrd-util.[ch] for initrd-related functions
I changed imports of util.h to initrd-util.h, or added an import of
initrd-util.h, to keep compilation working. It turns out that many files didn't
import util.h directly.
When viewing the patch, don't be confused by git rename detection logic:
a new .c file is added and two functions moved into it.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 16:19:32 +0000 (17:19 +0100)]
tests: move tests for eqzero() to a new file
It's a bit silly to have a separate file that one short test, but this is the
last part of the test code that is misplaced, and here consistency beats
brevity.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 16:15:56 +0000 (17:15 +0100)]
tests: move tests for PROTECT_ERRNO to the right file
Also, rename them to uppercase so that the test name matches what we're
actually testing.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 16:13:57 +0000 (17:13 +0100)]
tests: create test-raw-clone.c for raw-clone.h
The include for process-util.h is added for reset_cached_pid(). This
essentially fixes a pre-existing missing include.
Zbigniew Jędrzejewski-Szmek [Sun, 6 Nov 2022 15:59:04 +0000 (16:59 +0100)]
tests: create test-limits-util.c for limits-util funcs
Zbigniew Jędrzejewski-Szmek [Sat, 5 Nov 2022 15:12:15 +0000 (16:12 +0100)]
sd-journal: make prot_from_flags() static and rename
The function had just one caller and a name that didn't explain much.
Let's make it static and rename for clarity.
While at it, the only caller was not doing error handling correctly
— the function would potentially return a negative error value which
wasn't handled. In practice this couldn't happen, but let's remove
this ambiguity.
Frantisek Sumsal [Tue, 8 Nov 2022 11:44:37 +0000 (12:44 +0100)]
test: adjust systemd-mount's tests based on recent coverage reports
Frantisek Sumsal [Tue, 8 Nov 2022 11:43:57 +0000 (12:43 +0100)]
test: install realpath into the test images
Zbigniew Jędrzejewski-Szmek [Tue, 8 Nov 2022 10:07:02 +0000 (11:07 +0100)]
man: add note that network-generator is not a generator
Also fix indentation.
Frantisek Sumsal [Tue, 8 Nov 2022 11:01:13 +0000 (12:01 +0100)]
test: fix a race in the systemd-mount test
Where we might check the automount unit before systemd has a chance to
react.
Hans de Goede [Mon, 7 Nov 2022 20:46:56 +0000 (21:46 +0100)]
hwdb: Add accel orientation quirk for the Acer Switch V 10 SW5-017 2-in-1
Add a quirk for the accelerometer orientation for
the Acer Switch V 10 SW5-017 2-in-1.
drosdeck [Mon, 7 Nov 2022 15:14:07 +0000 (12:14 -0300)]
Fix key toggle and programmable button for Positivo N14ZP
Luca Boccassi [Mon, 7 Nov 2022 16:28:33 +0000 (16:28 +0000)]
kernel-install: skip 50-depmod if depmod is not available
Images might be built without any kernel module, and without
installing depmod as it is not needed. Skip it.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1023607
Luca Boccassi [Mon, 7 Nov 2022 19:24:52 +0000 (20:24 +0100)]
Merge pull request #25286 from mrc0mmand/systemd-mount-test-fix
test: replace tmpfs with vfat when testing --owner=
Antonio Alvarez Feijoo [Mon, 7 Nov 2022 14:25:25 +0000 (15:25 +0100)]
kernel-install/90-loaderentry: do not override an existing systemd.machine_id
If the systemd.machine_id command line option is already set, do not override
it.
Frantisek Sumsal [Mon, 7 Nov 2022 18:41:44 +0000 (18:41 +0000)]
Merge pull request #25279 from mrc0mmand/firstboot-test-fixes
test: cover some interactive/error paths in firstboot
Zbigniew Jędrzejewski-Szmek [Fri, 28 Oct 2022 15:39:50 +0000 (17:39 +0200)]
mkosi: use the new mkosi.conf suffix
Mkosi 14 is out, compat with old mkosi is not terribly important. Let's
use the new nice suffix.
Frantisek Sumsal [Mon, 7 Nov 2022 15:39:12 +0000 (16:39 +0100)]
semaphore: remove the Semaphore repositories recursively
The list of disabled repositories was recently converted from a single
file into a directory with separate repository files, so let's adjust
the setup script accordingly.
```
$ ls -lR /etc/apt/sources.list.d/
/etc/apt/sources.list.d/:
total 36
-rw-r--r-- 1 root root 76 Nov 3 10:28 azure-cli.list
-rw-r--r-- 1 root root 72 Nov 3 10:22 bazel.list
drwxr-xr-x 2 root root 4096 Nov 3 10:31 disabled
-rw-r--r-- 1 root root 113 Nov 3 10:13 docker-source.list
-rw-r--r-- 1 root root 367 Nov 3 10:28 github_git-lfs.list
-rw-r--r-- 1 root root 111 Nov 3 10:25 google-chrome-source.list
-rw-r--r-- 1 root root 64 Nov 3 10:14 google-cloud-sdk.list
-rw-r--r-- 1 root root 54 Nov 3 10:23 helm-stable-debian.list
-rw-r--r-- 1 root root 89 Nov 3 10:29 yarn-source.list
/etc/apt/sources.list.d/disabled:
total 20
-rw-r--r-- 1 root root 100 Nov 3 10:23 devel_kubic_libcontainers_stable.list
-rw-r--r-- 1 root root 103 Nov 3 10:27 git.list
-rw-r--r-- 1 root root 105 Nov 3 10:22 gradle.list
-rw-r--r-- 1 root root 118 Nov 3 10:13 pypy.list
-rw-r--r-- 1 root root 104 Nov 3 10:13 python.list
```
Yu Watanabe [Mon, 7 Nov 2022 15:21:40 +0000 (00:21 +0900)]
Merge pull request #25282 from keszybz/trivial-cleanups
Trivial cleanups
Frantisek Sumsal [Mon, 7 Nov 2022 14:55:08 +0000 (15:55 +0100)]
test: replace tmpfs with vfat when testing --owner=
Frantisek Sumsal [Mon, 7 Nov 2022 14:43:54 +0000 (15:43 +0100)]
Revert "mountpoint-util: tmpfs supports uid=/gid= mount options"
This reverts commit
7d4f00c88c65532bf66d20b3ec498b5bfaa621d2.
fstype_can_uid_gid() is about fixating all files to the specified
uid/gid. tmpfs does not qualify. The uid/gid parameter there is simply
about the default uid/gid for the root inode of the tmpfs, it allows
setting uids/gid arbirarily for all inodes after that.
This distinction matters: for file systems this function returns true
for we can use this in place of uidmapped mounts. But for tmpfs this is
not going to work, given inodes on that fs can end up having arbitrary
uid/gid.
See: https://github.com/systemd/systemd/pull/25284#issue-
1438427144
Frantisek Sumsal [Sun, 6 Nov 2022 21:40:33 +0000 (22:40 +0100)]
test: cover some interactive/error paths in firstboot
Frantisek Sumsal [Mon, 7 Nov 2022 11:07:27 +0000 (12:07 +0100)]
test: fix keymaps installation on Arch
Where the keymaps live under /usr/share/kbd/keymaps/.
Frantisek Sumsal [Mon, 7 Nov 2022 10:57:59 +0000 (11:57 +0100)]
test: fix locale installation when locale-gen is used
locale-gen might merge all compiled locales into a simple archive, so we
need to install it as well if necessary.
Torsten Hilbrich [Mon, 7 Nov 2022 07:38:58 +0000 (08:38 +0100)]
test: compile test-utmp.c only if UTMP is enabled
When compiling with -D utmp=false the compilation fails with:
../../git/systemd/src/test/test-utmp.c: In function ‘test_dump_run_utmp’:
../../git/systemd/src/test/test-utmp.c:21:9: error: cleanup argument not a function
21 | _unused_ _cleanup_(utxent_cleanup) bool utmpx = false;
| ^~~~~~~~
../../git/systemd/src/test/test-utmp.c:23:17: error: implicit declaration of function ‘utxent_start’ [-Werror=implicit-function-declaration]
23 | utmpx = utxent_start();
| ^~~~~~~~~~~~
any many other errors
Add a conditional to compile test-utmp.c only if ENABLE_UTMP is true.
Yu Watanabe [Mon, 7 Nov 2022 12:59:44 +0000 (21:59 +0900)]
Merge pull request #25277 from mrc0mmand/also-coverage
test: add coverage for systemd-mount
Zbigniew Jędrzejewski-Szmek [Fri, 28 Oct 2022 14:00:13 +0000 (16:00 +0200)]
udevadm: merge two log stmts
Zbigniew Jędrzejewski-Szmek [Tue, 18 Jan 2022 11:08:05 +0000 (12:08 +0100)]
man: grammarro
Zbigniew Jędrzejewski-Szmek [Fri, 28 Oct 2022 14:38:46 +0000 (16:38 +0200)]
sd-event: adjust indentation
Lennart Poettering [Mon, 7 Nov 2022 11:24:53 +0000 (12:24 +0100)]
Merge pull request #25266 from poettering/dissect-fsck-fix
dissect: fix fsck invocation
Frantisek Sumsal [Mon, 7 Nov 2022 10:55:29 +0000 (11:55 +0100)]
test: don't ignore non-existent paths in inst_recursive()
The process substitution in the while loop hides errors raised by the
find utility, which might (and did), in turn, hide errors in test setup.
Frantisek Sumsal [Sun, 6 Nov 2022 21:40:40 +0000 (22:40 +0100)]
test: add coverage for systemd-mount
Frantisek Sumsal [Sun, 6 Nov 2022 21:49:47 +0000 (22:49 +0100)]
mountpoint-util: tmpfs supports uid=/gid= mount options
As tmpfs(5) says, both uid= and gid= are supported since kernel 2.5.7 and
the mount utility seems to agree:
```
# stat -c "%U:%G" mnt
root:root
# mount -o uid=testuser,gid=testuser -t tmpfs tmpfs mnt
# stat -c "%U:%G" mnt
testuser:testuser
```
However, systemd-mount currently complains:
```
# systemd-mount --owner testuser -t tmpfs tmpfs mnt
File system type tmpfs is not known to support uid=/gid=, refusing.
```
Luca Boccassi [Sun, 6 Nov 2022 22:58:53 +0000 (23:58 +0100)]
Merge pull request #25107 from lucab/ups/sysusers-gid-check-username
sysusers: cross-check user and group names too
Christian Göttsche [Fri, 4 Nov 2022 18:36:31 +0000 (19:36 +0100)]
loop-util: open lock fd read-only
flock(2) works with file descriptors opened with O_RDONLY.
This affects SELinux systems where access to block devices is quite
restricted to avoid bypasses on filesystem objects.
Christian Göttsche [Fri, 4 Nov 2022 15:30:57 +0000 (16:30 +0100)]
core: update audit messages
Pass getuid() instead of literal `0` as auid, since user session
managers also issue audit messages on SELinux denials.
Lennart Poettering [Thu, 20 Oct 2022 21:20:49 +0000 (23:20 +0200)]
dissect: get rid of basename() use
Jan Macku [Wed, 12 Oct 2022 13:37:00 +0000 (15:37 +0200)]
ci(dev-freeze): Use GitHub Action for PR comments
GitHub Action `devel-freezer` helps with development freeze notifications
during the RC phase. It will create comments using predefined messages on
newly created and updated PRs when the RC tag has been released.
Also, it will update comments once a new major version has been released.
Documentation available at: https://github.com/redhat-plumbers-in-action/devel-freezer
Christian Göttsche [Fri, 4 Nov 2022 14:48:50 +0000 (15:48 +0100)]
test: fstab-generator: adjust PATH for fsck
fsck(8) is located in /usr/sib/ on Debian sid:
stdout:
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-01-dev-nfs.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-02-dhcp.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-03-dhcp6.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-04-nfs.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-05-nfs4.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-06-ipv4.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-07-ipv6.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-08-implicit-nfs.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-09-cifs.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-10-iscsi.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-11-live.input
*** Running /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-12-dev-sdx.input
--- /dev/fd/63 2022-11-04 15:39:13.
131532174 +0100
+++ /dev/fd/62 2022-11-04 15:39:13.
131532174 +0100
@@ -6,3 +6,4 @@
initrd-usr-fs.target.requires
initrd-usr-fs.target.requires/sysroot.mount
sysroot.mount
+systemd-fsck-root.service
**** Unexpected output for /home/christian/Coding/workspaces/systemd/test/testdata/test-fstab-generator/test-12-dev-sdx.input
stderr:
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on NFS was requested.
Skipping root directory handling, as root on CIFS was requested.
Skipping root directory handling, as root on iSCSI was requested.
Skipping root directory handling, as root on live image was requested.
Found entry what=/dev/sdx1 where=/sysroot type=n/a opts=ro
Checking was requested for /dev/sdx1, but the fsck command does not exist.
Lennart Poettering [Fri, 4 Nov 2022 17:26:42 +0000 (18:26 +0100)]
dissect: fix fsck
Since
f7725647bb41c3398a867f139efe526efe8aa1b3 when dissecting a disk
image we operate with fds to the device nodes in question wherever we
can. This includes when we fork off fsck, where we pass a /proc/self/fd/
path as argument. This only works if we keep that fd open however and
disable O_CLOEXEC on the fd. Hence do so, and fix fsck this way.
(Without this, all fsck will fail, since the fd path is invalid)
Lennart Poettering [Fri, 4 Nov 2022 17:20:47 +0000 (18:20 +0100)]
process-util: add new FORK_CLOEXEC_OFF flag for disabling O_CLOEXEC on remaining fds
Often the fds that shall stay around in the child shall be passed
to a process over execve(), hence add an option to explicitly disable
O_CLOEXEC on them in the child.
Lennart Poettering [Fri, 4 Nov 2022 17:20:19 +0000 (18:20 +0100)]
fd-util: add new fd_cloexec_many() helper
Lennart Poettering [Fri, 4 Nov 2022 17:19:29 +0000 (18:19 +0100)]
fd-util: make fd_in_set() (and thus close_all_fds()) handle invalidated fds in the array
let's handle gracefully if fds in the specified array are already
invalidated (i.e. negative). This is handy when putting together arrays
on the fly.
Luca Boccassi [Fri, 4 Nov 2022 17:29:51 +0000 (18:29 +0100)]
Merge pull request #25257 from fbuihuu/fix-test-execute-on-opensuse
Fix test execute on opensuse
Antonio Alvarez Feijoo [Fri, 4 Nov 2022 08:57:24 +0000 (09:57 +0100)]
kernel-install/90-loaderentry: do not add multiple systemd.machine_id options
Do not unconditionally add a new systemd.machine_id command line option, first
check if it already exists with the expected value.
Fixes #25203
Luca Boccassi [Thu, 3 Nov 2022 20:10:57 +0000 (20:10 +0000)]
tmpfiles.d: do not fail if provision.conf fails
On a read-only filesystem creating /root/.ssh might fail, but that's ok.
Do not fail the run, as this is only needed to add the credential, which
is a separate step.
김인수 [Fri, 4 Nov 2022 12:19:47 +0000 (13:19 +0100)]
po: Translated using Weblate (Korean)
Currently translated at 100.0% (193 of 193 strings)
Co-authored-by: 김인수 <simmon@nplob.com>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/master/ko/
Translation: systemd/main
Franck Bui [Fri, 4 Nov 2022 11:50:04 +0000 (12:50 +0100)]
tests: minor simplification in test-execute
No functional change.
Franck Bui [Fri, 4 Nov 2022 11:24:10 +0000 (12:24 +0100)]
tests: make test-execute pass on openSUSE
In my understanding user group "3" (aka "sys") is kept for historical reasons
but not really useful these days. That's probably explained why this group
isn't defined on openSUSE.
Hence let's drop reference to this user group, this shouldn't lessen the
revelance of the test since SupplementaryGroups= is still tested with 2 other
groups.
Yu Watanabe [Fri, 4 Nov 2022 03:06:21 +0000 (12:06 +0900)]
resolve: enable per-link mDNS setting by default
Otherwise, if the link is not managed by systemd-networkd, mDNS cannot
be enabled without calling `resolvectl` explicitly.
Fixes #25252.
Luca Boccassi [Fri, 4 Nov 2022 11:13:01 +0000 (12:13 +0100)]
Merge pull request #25244 from yuwata/reboot-util-follow-ups
reboot-util: several cleanups
Luca Boccassi [Fri, 4 Nov 2022 09:18:08 +0000 (10:18 +0100)]
Merge pull request #25246 from yuwata/udev-serial-by-id-symlinks
udev: fix by-id symlinks
Frantisek Sumsal [Fri, 4 Nov 2022 08:44:34 +0000 (09:44 +0100)]
test: re-enable skipped systemd-firstboot --locale-messages= test
Since the original issue should be resolved by #25253.
Yu Watanabe [Fri, 4 Nov 2022 06:53:03 +0000 (15:53 +0900)]
Merge pull request #25250 from mrc0mmand/coverage
test: provide coverage for auxiliary utilities
Luca Boccassi [Fri, 4 Nov 2022 00:01:16 +0000 (00:01 +0000)]
firstboot: fix segfault when --locale-messages= is passed without --locale=
\#0 __strcmp_evex () at ../sysdeps/x86_64/multiarch/strcmp-evex.S:295
No locals.
\#1 0x0000557444eb172b in process_locale () at ../src/firstboot/firstboot.c:342
etc_localeconf = 0x7ffd40217b80 "/root/root/etc/locale.conf"
locales = {0x0, 0x0, 0x0}
i = 0
r = <optimized out>
__PRETTY_FUNCTION__ = "process_locale"
__func__ = "process_locale"
\#2 0x0000557444eaff93 in run (argv=0x7ffd40217d98, argc=3) at ../src/firstboot/firstboot.c:1401
loop_device = 0x0
unlink_dir = 0x0
r = <optimized out>
loop_device = <optimized out>
unlink_dir = <optimized out>
r = <optimized out>
__func__ = <optimized out>
__PRETTY_FUNCTION__ = <optimized out>
enabled = <optimized out>
_error = <optimized out>
_level = <optimized out>
_e = <optimized out>
_level = <optimized out>
_e = <optimized out>
\#3 main (argc=3, argv=0x7ffd40217d98) at ../src/firstboot/firstboot.c:1432
r = <optimized out>
__PRETTY_FUNCTION__ = "main"
Fixes https://github.com/systemd/systemd/issues/25249
Yu Watanabe [Thu, 3 Nov 2022 00:19:07 +0000 (09:19 +0900)]
reboot-util: drop unnecessary cast
Follow-up for
ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
Yu Watanabe [Thu, 3 Nov 2022 00:16:43 +0000 (09:16 +0900)]
reboot-util: drop redundant headers
Follow-up for
ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
Yu Watanabe [Thu, 3 Nov 2022 00:10:59 +0000 (09:10 +0900)]
meson: sort libraries
Except for 'threads'.
Follow-up for
ede5a78f50ed2d5f86dc7a117de2a51b397d52d4.
Frantisek Sumsal [Thu, 3 Nov 2022 12:13:03 +0000 (13:13 +0100)]
test: introduce sanity coverage for auxiliary utils
Luca BRUNO [Thu, 3 Nov 2022 15:11:01 +0000 (15:11 +0000)]
test-sysusers: check group creation with matching user entry
Luca BRUNO [Thu, 3 Nov 2022 15:11:00 +0000 (15:11 +0000)]
sysusers: cross-check user and group names too
This adds an additional name check when cross-matching new group
entries against existing users, which allows coalescing entries
matching both ID and name.
It provides a small idempotence enhancement when creating groups
in cases where matching user entries are in place. By fine-tuning
the conflict detection logic, this avoids picking up new random
IDs and correctly prefers configuration values instead.
Frantisek Sumsal [Thu, 3 Nov 2022 10:33:13 +0000 (11:33 +0100)]
test: cover a couple of previously missed analyze code paths
Frantisek Sumsal [Thu, 3 Nov 2022 09:59:38 +0000 (10:59 +0100)]
test: cover legacy/deprecated systemd-analyze verbs
They're no longer documented since
26e1e97345 but still work.
Yu Watanabe [Thu, 3 Nov 2022 00:52:23 +0000 (09:52 +0900)]
udev: add safe guard for setting by-id symlink
The ID_BUS property is necessary for creating by-id symlinks.
Yu Watanabe [Thu, 3 Nov 2022 00:43:14 +0000 (09:43 +0900)]
udev: drop redundant call of usb_id and assignment of ID_USB_INTERFACE_NUM
The usb_id builtin command is already called in the above, and the
command sets the ID_USB_INTERFACE_NUM property.
Yu Watanabe [Thu, 3 Nov 2022 00:39:36 +0000 (09:39 +0900)]
udev: first set properties based on usb subsystem
After
479da1107a0d4e2f7ef5cd938512b87a0e45f180, the usb_id builtin
command does not set ID_SERIAL if ID_BUS is already set.
Before the commit, all properties set based on pci bus were overwritten
by the usb_id, hence now it is sufficient setting them only when ID_BUS is
not set yet.
Fixes #25238.
Frantisek Sumsal [Wed, 2 Nov 2022 16:51:51 +0000 (17:51 +0100)]
test: add a sanity coverage for systemd-analyze verbs
Samuel Thibault [Tue, 1 Nov 2022 15:53:02 +0000 (16:53 +0100)]
shutdown: Add Xen kexec support
In the Xen case, it's the hypervisor which manages kexec. We thus
have to ask it whether a kernel is loaded, instead of relying on
/sys/kernel/kexec_loaded.
Frantisek Sumsal [Wed, 2 Nov 2022 10:44:00 +0000 (11:44 +0100)]
test: further extend systemctl's sanity coverage
Also, fix a race condition introduced by
d16684fe13:
```
[ 16.904218] H testsuite-26.sh[394]: + systemd-run --unit failed.service /bin/false
[ 16.964783] H systemd[845]: failed.service: Executing: /bin/false
[ 16.965062] H systemd[1]: Started failed.service.
[ 16.965462] H testsuite-26.sh[844]: Running as unit: failed.service
[ 16.966390] H testsuite-26.sh[394]: + systemctl is-failed failed.service
[ 16.977970] H testsuite-26.sh[846]: active
[ 16.978403] H systemd[1]: failed.service: Main process exited, code=exited, status=1/FAILURE
[ 16.978478] H systemd[1]: failed.service: Failed with result 'exit-code'.
```
Frantisek Sumsal [Wed, 2 Nov 2022 10:48:23 +0000 (11:48 +0100)]
man: use the correct 'Markers' property name for marking units
Follow-up to
c9615f7352 and
70666e28a1.
Yu Watanabe [Tue, 1 Nov 2022 22:06:46 +0000 (07:06 +0900)]
core: fix memleak in GetUnitFileLinks method
Yu Watanabe [Tue, 1 Nov 2022 23:24:38 +0000 (08:24 +0900)]
Merge pull request #25229 from mrc0mmand/extend-coverage
test: extend the sanity coverage a bit
Yu Watanabe [Tue, 1 Nov 2022 21:49:26 +0000 (06:49 +0900)]
test-network: wait for bound interface to be processed by udevd
If another bound interface (dummy98) will be removed before that dummy99
is processed by udevd, then removing dummy98 in the next step makes the
target interface (test1) bring down.
Follow-up for
3e2f7c46da528775f90c521e4cf22c2f61f82a81.
Luca Boccassi [Tue, 1 Nov 2022 21:55:23 +0000 (21:55 +0000)]
docs: DPS and BLS have moved to uapi-group.org
Jörg Thalheim [Thu, 27 Oct 2022 13:59:56 +0000 (15:59 +0200)]
update credentials when reloading a service
Many long-running services will reload configuration and therefore
credentials on reload. Therefore its useful if a service reload will
also update credentials.
Tested in https://github.com/numtide/systemd-vaultd/pull/12
Frantisek Sumsal [Tue, 1 Nov 2022 19:47:37 +0000 (20:47 +0100)]
test: add a couple of sanity tests for systemctl