Commit Graph
79591 Commits
Author SHA1 Message Date
Daan De Meyer 007d255d87 mkosi: Run two more mkosi commands with sudo
Running some mkosi commands as root and other not can lead to cache
invalidations with the latest version, so make sure we run everything
as root after we've built the tools tree.
2025-01-22 22:25:51 +01:00
Luca Boccassi 338813351e udev-dump: also show written sysfs attributes and sysctl entries (#36091)
Split-out of #35968.
2025-01-22 20:56:31 +00:00
Luca Boccassi 60ca3caec6 OBS: switch to new top-level namespace (#36121)
https://build.opensuse.org/project/show/system:systemd
2025-01-22 20:50:44 +00:00
Luca Boccassi a41f67b041 docs: mention packages in HACKING.md 2025-01-22 20:50:08 +00:00
Yu Watanabe 60ce6a3413 test-network: add test case for [IPv6RoutePrefix] Preference= 2025-01-22 20:48:31 +00:00
Yu Watanabe fe9753841f network/radv: add [IPv6RoutePrefix] Preference= setting 2025-01-22 20:48:31 +00:00
Yu Watanabe a10d6e0124 network/radv: modernize config_parse_router_preference() 2025-01-22 20:48:31 +00:00
Yu Watanabe c1b7db56e5 udevadm-test: allow to specify extra directories to load udev rules files
This adds -D/--extra-rules-dir=DIR switch for 'udevadm test' command.
When specified, udev rules files in the specified directory will be also
loaded. This may be useful for debugging udev rules by copying some udev
rules files to a temporary directory.
2025-01-22 20:46:42 +00:00
Yu Watanabe 4fd81d03e2 rpm: mark udevd for reloading when an rules file is installed/updated
Then, we can avoid using udevadm (especially udev control socket) in
processing rpm.
2025-01-22 20:44:38 +00:00
Nick Rosbrook 16f99f5be9 udev: add systemd tag to devices tagged with security-device
This ensures that device units are created for these, which is
convenient for other units that want to declare dependencies on
such devices.
2025-01-22 21:43:44 +01:00
Yu Watanabe 41a1e3012e TEST-65-ANALYZE: add detailed test case for cat-config 2025-01-22 20:43:16 +00:00
Yu Watanabe 5e244e724f pretty-print: make cat_file() also highlight the trailing backslash for line continuation 2025-01-22 20:43:16 +00:00
Yu Watanabe e27fb39e07 pretty-print: fix handling of line continuation in cat_file()
Fixes #35878.
2025-01-22 20:43:16 +00:00
Yu Watanabe 42b71eb94e pretty-print: cleanups for cat_file()
- add one missing assertion,
- always logs on error,
- simplify the logic to make it easy to understand,
- add several more comments.

Preparation for later commits. No functional change.
2025-01-22 20:43:16 +00:00
Lennart Poettering af20b92b61 userdb: add comments to userdb varlink IDL 2025-01-22 21:42:14 +01:00
Lennart Poettering 347576ca8d machine-id-setup: actually unlink /run/machine-id if write/mount fails (#36105)
Follow-up for 64d52739c5

Fixes CID#1590374 and CID#1590375
2025-01-22 21:41:57 +01:00
Mike Yuan 9c039ef5ff pidfd-util: preferably acquire pidfd inode id through name_to_handle_at()
See rationales described in kernel commit:
https://github.com/torvalds/linux/commit/b3caba8f7a34a2bbaf45ffc6ff3a49b70afeb192
2025-01-22 21:41:44 +01:00
Lennart Poettering cc524bc1fe userdb: two small fixes (#36115) 2025-01-22 21:41:28 +01:00
Lennart Poettering 593ad9746b fs-util: at_flags_normalize_nofollow() follow-up (#36116)
Just some extension to 6981203f3a
2025-01-22 21:41:14 +01:00
Yu Watanabe 4c9da4dc91 test: add test cases for parsing SYSTEMD_WANTS=/SYSTEMD_USER_WANTS= 2025-01-22 20:41:00 +00:00
Yu Watanabe a467358b2a core/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=
Let consider the following udev rules:
===
PROGRAM="/usr/bin/systemd-escape foo-bar-baz", ENV{SYSTEMD_WANTS}+="test1@$result.service"
PROGRAM="/usr/bin/systemd-escape aaa-bbb-ccc", ENV{SYSTEMD_WANTS}+="test2@$result.service"
===
Then, a device expectedly gains a property:
===
SYSTEMD_WANTS=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
===
After the event being processed by udevd, PID1 processes the device, the
property previously was parsed with extract_first_word(EXTRACT_UNQUOTE),
then the device unit gained the following dependencies:
===
Wants=test1@foox2dbarx2dbaz.service test2@aaax2dbbbx2dccc.service
===
So both '%i' and '%I' for the template services did not match with the original
data, and it was hard to use systemd-escape in PROGRAM= udev rule token.

This makes the property parsed with extract_first_word(EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE),
hence the device unit now gains the following dependencies:
===
Wants=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
===
and '%I' for the template services match with the original data.

Fixes a bug caused by ceed8f0c8b (v233).

Fixes #16735.
Replaces #16737 and #35768.
2025-01-22 20:41:00 +00:00
Luca Boccassi 13871aa656 OBS: switch to new top-level namespace
https://build.opensuse.org/project/show/system:systemd
2025-01-22 20:34:04 +00:00
Yu Watanabe 9ddcccfad7 udev-dump: also show written sysfs attributes and sysctl entries
This should be useful to know what is changed by processing an event.
2025-01-23 01:50:13 +09:00
Yu Watanabe f3cbd4da12 udev-dump: voidify one function call
Fixes CID#1590377.
2025-01-23 01:50:13 +09:00
Lennart Poettering 4b11087b37 fs-util: also add an at_flags_normalize_follow() helper
This is the reverse of at_flags_normalize_follow()
2025-01-22 17:46:50 +01:00
Lennart Poettering 0783d8da50 xattr-util: use at_flags_normalize_nofollow() at one more place 2025-01-22 17:46:06 +01:00
Lennart Poettering 83e3b96d0a userdb: reset errno before getpwent()
errno handling for NSS is always a bit weird since NSS modules generally
are not particularly careful with it. Hence let's initialize errno
explicitly before we invoke getpwent() so that we know it's in a
reasonable state afterwards on failure, or zero if not.

We do this in most places we use NSS, including in userdb when it comes
to getgrent(), just for getpwent() we don't so far. Address that.
2025-01-22 17:41:12 +01:00
Lennart Poettering 165275fe80 userdbctl: don't expect argument to --fuzzy
The getopt() parser was completely wrong, it expected an argument where
wasn't expected or processes.

The test cases only passed by accident because they use the "user" verb
which is also the default verb. It would be accidently read as argument
for --fuzzy and ignored.

Fix that.
2025-01-22 17:40:05 +01:00
Daan De Meyer d3d501e949 test: Make sure we run lcov from the meson source directory
In ac75c51927, we accidentally changed
the working directory that the tools executed in the wrapper script
are invoked in. This broke our invocations of lcov. Let's explicitly
run those in the meson source directory again to fix the coverage
workflow.
2025-01-23 01:32:37 +09:00
Léane GRASSER e8908d2fc1 po: Translated using Weblate (French)
Currently translated at 100.0% (257 of 257 strings)

Co-authored-by: Léane GRASSER <leane.grasser@proton.me>
Translate-URL: https://translate.fedoraproject.org/projects/systemd/main/fr/
Translation: systemd/main
2025-01-22 23:43:34 +09:00
Mike Yuan c8650d0dbe machine-id-setup: fix typo 2025-01-22 14:47:57 +01:00
Mike Yuan f389506714 machine-id-setup: actually unlink /run/machine-id if write/mount fails
Follow-up for 64d52739c5

Fixes CID#1590374 and CID#1590375
2025-01-22 14:47:37 +01:00
Yu Watanabe e887b3006c networkd-test: unconditionally stop previous invocation of networkd before starting new one
When networkd is already running, creating some .network files and
friends and starting networkd does not take any effect. Let's always
restart networkd when we want to start a new invocation.
2025-01-22 10:29:59 +00:00
Lennart Poettering 8946dabaa3 mountpoint-util: several tweaks for fd_is_mount_point(), drop support for kernels without /proc/pid/fdinfo/ (#36093) 2025-01-22 09:37:25 +01:00
Mike Yuan 6cab0df904 mountpoint-util: port path_is_mount_point() to chase_and_open_parent() 2025-01-22 01:37:32 +01:00
Mike Yuan 7ce2c1bb5f mountpoint-util: rename fd_is_mount_point() to is_mount_point_at()
fd_* functions in our codebase usually mean fd-specific operations,
while this one actually takes openat()-style params. Rename it
accordingly hence.
2025-01-22 01:37:31 +01:00
Mike Yuan e2f97c790e mountpoint-util: some tweaks for fd_is_mount_point()
- Drop fstat() fallback path now that we assume fdinfo
  is available
- Use at_flags_normalize_nofollow()
- Accept empty path the same way as NULL
- Accept fd being AT_FDCWD and filename being "."
2025-01-22 01:37:09 +01:00
Mike Yuan e5a3127339 mountpoint-util: our baseline includes fdinfo and mnt_id now 2025-01-22 01:12:55 +01:00
Mike Yuan 229429a799 mountpoint-util: check >= 0 for success 2025-01-22 01:12:54 +01:00
Mike Yuan c3b7f0240f mountpoint-util: update comment in is_name_to_handle_at_fatal_error()
We can now assume name_to_handle_at() syscall is available,
however the underlying fs can still lack support for it.
2025-01-22 01:12:10 +01:00
Mike Yuan 6981203f3a fs-util: introduce at_flags_normalize_nofollow() helper 2025-01-22 00:52:34 +01:00
Lennart Poettering eab9b9b4ea update TODO 2025-01-21 23:06:55 +01:00
Lennart Poettering bd9553d677 varlink: fix error name
The documentation and code agree on the same name, since always, but
when I put together the IDL I made a mistake and insert a "Not" that
wasn't supposed to be there.

Let's correct that.
2025-01-21 23:01:31 +01:00
Lennart Poettering dc5af20b0c tree-wide: always include our own headers with "" rather than <>
We got this almost always right. Fix this for a few outliers.
2025-01-21 17:05:36 +00:00
Daan De Meyer d641a1f8f7 mkosi: Various tools tree fixes (#36059) 2025-01-21 15:17:36 +01:00
Daan De Meyer c0165676e9 TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM
On CentOS Stream 9/10 booting mkosi qemu with --firmware=linux doesn't
add the virtual TPM to the virtual machine which means TEST-74-AUX-UTILS.run.sh
fails because it requires a TPM.

Let's move the systemd-pcrlock logic that requires a TPM to
TEST-70-TPM.pcrlock to avoid the problem.
2025-01-21 13:48:13 +01:00
Lennart Poettering 3c58ce6bae user-record/home: add concept of alias names for accounts (#36041) 2025-01-21 12:57:52 +01:00
Daan De Meyer 34da8dd345 test: Look for qemu in /usr/libexec/qemu-kvm as well
On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use
that if it's available.
2025-01-21 12:29:56 +01:00
Daan De Meyer cb13d6b44f mkosi: Run more commands as root
zypper has some new rather questionable userspace level permission
checking that blows ups completely when operating as root on an
cache directory owned by a non-root user, so let's build the tools
tree and set up meson as root to avoid the issue.

(https://github.com/openSUSE/libzypp/issues/603)

Also drop a leftover debug message from coverage.yml while we're at
it.
2025-01-21 10:59:01 +01:00
Daan De Meyer 26025dba3e mkosi: Don't set -O ^orphan_file in centos stream 9 tools tree 2025-01-21 10:57:29 +01:00