Commit graph

60799 commits

Author SHA1 Message Date
Lennart Poettering 084ecae56f update TODO 2022-11-08 16:39:27 +01:00
Zbigniew Jędrzejewski-Szmek 2fa6574e83 man: add note that network-generator is not a generator
Also fix indentation.
2022-11-08 12:13:45 +01:00
Hans de Goede 493f67d21d 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.
2022-11-08 10:45:24 +09:00
drosdeck 4dbcb5dc10 Fix key toggle and programmable button for Positivo N14ZP 2022-11-07 22:30:33 +01:00
Luca Boccassi cda4d00dfc 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
2022-11-07 22:30:07 +01:00
Luca Boccassi 1824d3d6cc
Merge pull request #25286 from mrc0mmand/systemd-mount-test-fix
test: replace tmpfs with vfat when testing --owner=
2022-11-07 20:24:52 +01:00
Antonio Alvarez Feijoo 802d9219aa 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.
2022-11-07 19:54:16 +01:00
Frantisek Sumsal 5c1a5ac172
Merge pull request #25279 from mrc0mmand/firstboot-test-fixes
test: cover some interactive/error paths in firstboot
2022-11-07 18:41:44 +00:00
Zbigniew Jędrzejewski-Szmek e02db840ac 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.
2022-11-08 01:32:00 +09:00
Frantisek Sumsal 610eb3f826 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
```
2022-11-08 01:11:44 +09:00
Yu Watanabe 6c826ed161
Merge pull request #25282 from keszybz/trivial-cleanups
Trivial cleanups
2022-11-08 00:21:40 +09:00
Frantisek Sumsal be7463e309 test: replace tmpfs with vfat when testing --owner= 2022-11-07 15:59:37 +01:00
Frantisek Sumsal 9bfd596674 Revert "mountpoint-util: tmpfs supports uid=/gid= mount options"
This reverts commit 7d4f00c88c.

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
2022-11-07 15:43:54 +01:00
Frantisek Sumsal dbd8dbdfc1 test: cover some interactive/error paths in firstboot 2022-11-07 14:48:37 +01:00
Frantisek Sumsal 1edad89399 test: fix keymaps installation on Arch
Where the keymaps live under /usr/share/kbd/keymaps/.
2022-11-07 14:48:37 +01:00
Frantisek Sumsal 0c416ea01b 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.
2022-11-07 14:48:37 +01:00
Torsten Hilbrich 41cac2a8b9 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.
2022-11-07 22:00:42 +09:00
Yu Watanabe aaa411b9f4
Merge pull request #25277 from mrc0mmand/also-coverage
test: add coverage for systemd-mount
2022-11-07 21:59:44 +09:00
Zbigniew Jędrzejewski-Szmek db12cf926f udevadm: merge two log stmts 2022-11-07 13:22:09 +01:00
Zbigniew Jędrzejewski-Szmek 195427cd18 man: grammarro 2022-11-07 12:45:26 +01:00
Zbigniew Jędrzejewski-Szmek 586c8cee1c sd-event: adjust indentation 2022-11-07 12:45:26 +01:00
Lennart Poettering bcb639662e
Merge pull request #25266 from poettering/dissect-fsck-fix
dissect: fix fsck invocation
2022-11-07 12:24:53 +01:00
Frantisek Sumsal eb5d7730e1 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.
2022-11-07 12:18:49 +01:00
Frantisek Sumsal 6da7d0c766 test: add coverage for systemd-mount 2022-11-07 09:08:27 +01:00
Frantisek Sumsal 7d4f00c88c 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.
```
2022-11-07 00:03:49 +01:00
Luca Boccassi f10ad99ab0
Merge pull request #25107 from lucab/ups/sysusers-gid-check-username
sysusers: cross-check user and group names too
2022-11-06 23:58:53 +01:00
Christian Göttsche 3e6b7d2626 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.
2022-11-05 19:19:56 +01:00
Christian Göttsche c826b7ef32 core: update audit messages
Pass getuid() instead of literal `0` as auid, since user session
managers also issue audit messages on SELinux denials.
2022-11-05 19:19:28 +01:00
Lennart Poettering cfb623b6e7 dissect: get rid of basename() use 2022-11-05 19:18:39 +01:00
Jan Macku b6a23ad642 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
2022-11-05 14:10:01 +01:00
Christian Göttsche a45efc9e4b 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.
2022-11-04 23:40:50 +01:00
Lennart Poettering f8ab781223 dissect: fix fsck
Since f7725647bb 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)
2022-11-04 18:53:36 +01:00
Lennart Poettering 981cfbe046 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.
2022-11-04 18:53:36 +01:00
Lennart Poettering ed18c22c98 fd-util: add new fd_cloexec_many() helper 2022-11-04 18:46:42 +01:00
Lennart Poettering d11c14a981 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.
2022-11-04 18:45:32 +01:00
Luca Boccassi 6e14e70599
Merge pull request #25257 from fbuihuu/fix-test-execute-on-opensuse
Fix test execute on opensuse
2022-11-04 18:29:51 +01:00
Antonio Alvarez Feijoo 981502c5cc 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
2022-11-04 16:53:40 +01:00
Luca Boccassi e0fc9be37e 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.
2022-11-04 15:42:16 +01:00
김인수 cb9c37b349 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
2022-11-04 12:27:53 +00:00
Franck Bui 09415aef94 tests: minor simplification in test-execute
No functional change.
2022-11-04 12:53:17 +01:00
Franck Bui d723b0467d 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.
2022-11-04 12:39:56 +01:00
Yu Watanabe e31540196b 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.
2022-11-04 12:31:00 +01:00
Luca Boccassi 441c62f769
Merge pull request #25244 from yuwata/reboot-util-follow-ups
reboot-util: several cleanups
2022-11-04 12:13:01 +01:00
Luca Boccassi 93a142701b
Merge pull request #25246 from yuwata/udev-serial-by-id-symlinks
udev: fix by-id symlinks
2022-11-04 10:18:08 +01:00
Frantisek Sumsal 59377dbef2 test: re-enable skipped systemd-firstboot --locale-messages= test
Since the original issue should be resolved by #25253.
2022-11-04 09:44:34 +01:00
Yu Watanabe 072adf2693
Merge pull request #25250 from mrc0mmand/coverage
test: provide coverage for auxiliary utilities
2022-11-04 15:53:03 +09:00
Luca Boccassi 4c4a73ce06 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
2022-11-04 15:51:49 +09:00
Yu Watanabe 6564918c6c reboot-util: drop unnecessary cast
Follow-up for ede5a78f50.
2022-11-04 11:32:34 +09:00
Yu Watanabe 3f33bfddeb reboot-util: drop redundant headers
Follow-up for ede5a78f50.
2022-11-04 11:32:34 +09:00
Yu Watanabe a2ea44b7db meson: sort libraries
Except for 'threads'.

Follow-up for ede5a78f50.
2022-11-04 11:32:22 +09:00