Commit Graph
78765 Commits
Author SHA1 Message Date
Daan De Meyer e9b9fc080f ci: Stop archiving packages
This takes up a lot of storage space and we're almost hitting the
limit so since nobody's actually using these and we just started
doing nightly builds in OBS, let's drop this and point people towards
OBS for nightly packages in the future.
2025-01-15 15:32:14 +00:00
Yu Watanabe 346ed75198 ptyfwd: fix wrong userdata passed to PTY forwarding
Fixes #35942.
2025-01-15 16:25:32 +01:00
Lennart Poettering b5a6f4c05b string-util: make strjoin() just a special case of strextend() (#36011)
This is split out of #36010, but makes a ton of sense on its own.
2025-01-15 13:25:08 +01:00
Lennart Poettering 3bcb650431 user-record-show: use word 'show' not 'dump' for helper call
The key functions and the file itself use the word "to show" here, this
helper should really stick to that nomenclature.
2025-01-15 13:24:17 +01:00
Lennart Poettering 7adafb0832 missing: add quotactl_fd() wrapper 2025-01-15 13:24:04 +01:00
Lennart Poettering f91f1eda08 bus-wait-for-jobs: fix table of service result codes (#35992) 2025-01-15 12:50:32 +01:00
Daan De Meyer d00739f3f4 test: Drop sandbox() from integration test wrapper (#36009)
With the latest changes, this is not required anymore as mkosi sandbox
will set up the proper $PATH to make sure the executables from the build
directory are used.
2025-01-15 11:32:34 +01:00
Lennart Poettering fd3b7cf772 string-util: add a mechanism for strextend_with_separator() for specifying "ignore" arguments
in strv_new() we have STRV_IGNORE for skipping over an argument in the
argument list. Let's add the same to strextend_with_separator():

strextend_with_separator(&x, "foo", POINTER_MAX, "bar");

will result in "foobar" being appended to "x". (POINTER_MAX Which is
different from NULL, which terminates the argument list).

This is useful for ternary op situations.

(We should probably get rid of STRV_IGNORE and just use POINTER_MAX
everywhere directly, but that's for another time.)
2025-01-15 10:52:38 +01:00
Lennart Poettering 34467ffa3c string-util: make strjoin() just a special case of strextend()
The functions are very similar, let's make them the same. If the first
argument to strextend() is NULL instead of extending a string we'll
allocate a fresh one and return that.
2025-01-15 10:51:53 +01:00
Daan De Meyer 9a0776159b udev: several trivial fixlets (#36005)
split out of #35968.
2025-01-15 10:50:11 +01:00
Luca Boccassi af0a28854d meson: add udev/hwdb build aliases
Allows to do:

meson compile libudev udev hwdb
meson install --no-rebuild --tags libudev,udev,hwdb
2025-01-15 09:48:27 +00:00
Lennart Poettering 390dffb862 man: also fix documentation of start-limit-hit 2025-01-15 10:42:10 +01:00
Lennart Poettering a7620f5dd1 bus-wait-for-jobs: fix service result table
We were missing one service result (oom-kill), and the ratelimit one is
called differently. Correct that so that we generate proper log messages
for these cases.
2025-01-15 10:41:11 +01:00
Lennart Poettering 1d522f1a86 terminal-util: drop support for pre-TIOCGPTPEER kernels
Our minimum baseline is now far beyond 4.13, hence let's drop these
fallback paths.
2025-01-15 10:39:04 +01:00
Lennart Poettering 3eafa5e23c update TODO 2025-01-15 10:37:19 +01:00
Zbigniew Jędrzejewski-Szmek 69c9629da7 sysusers: emit audit events for user and group creation (#35957)
Background: Fedora/RHEL are switching to sysusers.d metadata for
creation of users and groups for system users defined by packages
(https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers).
Packages carry sysusers files. During package installation, rpm calls an
program to execute on this config. This program may either be
/usr/lib/rpm/sysusers.sh which calls useradd/groupadd, or
/usr/bin/systemd-sysusers. To match the functionality provided by
useradd/groupadd from the shadow-utils project, systemd-sysusers must
emit audit events so that it provides a drop-in replacement.

systemd-sysuers will emit audit events AUDIT_ADD_USER/AUDIT_ADD_GROUP
when adding users and groups. The operation "names" are copied from
shadow-utils, so the format of the events that is generated on success
should be identical. On failure, things are more complicated. We write
the whole file at once, once, so we first generate "success" messages
for each entry, then we try to write the files, and if things fail, we
generate failure messages to all entries that we failed to write.
2025-01-15 10:36:07 +01:00
Zbigniew Jędrzejewski-Szmek 0dba7b5c6b core: use shared audit-fd wrappers
Two funcs are renamed to avoid naming conflict with the common
helper.
2025-01-15 10:35:28 +01:00
Zbigniew Jędrzejewski-Szmek 9c6afab6b6 sysusers: emit audit events for user and group creation
Background: Fedora/RHEL are switching to sysusers.d metadata for creation of
users and groups for system users defined by packages
(https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers).
Packages carry sysusers files. During package installation, rpm calls an
program to execute on this config. This program may either be
/usr/lib/rpm/sysusers.sh which calls useradd/groupadd, or
/usr/bin/systemd-sysusers. To match the functionality provided by
useradd/groupadd from the shadow-utils project, systemd-sysusers must emit
audit events so that it provides a drop-in replacement.

systemd-sysuers will emit audit events AUDIT_ADD_USER/AUDIT_ADD_GROUP when
adding users and groups. The operation "names" are copied from shadow-utils in
Fedora (which has a patch to change them from the upstream version), so the
format of the events that is generated on success should be identical.

The helper code is shared between sysusers and utmp-wtmp. I changed the
audit_fd variable to be unconditional. This way we can avoid ugly iffdefery
every time the variable would be used. The cost is that 4 bytes of unused
storage might be present. This is negligible, and the compiler might even be
able to optimize that away if it inlines things.
2025-01-15 10:35:28 +01:00
Daan De Meyer ac75c51927 test: Drop sandbox() from integration test wrapper
With the latest changes, this is not required anymore as mkosi sandbox
will set up the proper $PATH to make sure the executables from the build
directory are used.
2025-01-15 10:21:33 +01:00
Daan De Meyer 82d6bcbdea mkosi: Update to latest 2025-01-15 10:21:12 +01:00
Yu Watanabe 132a164d97 Follow-ups for recent namespace PRs (#35923) 2025-01-15 14:10:21 +09:00
Jeremy Linton 2572bf6a39 confidential-virt: add detection for aarch64 CCA
The arm confidential compute architecture (CCA) provides a platform design for
confidential VMs running in a new realm context.

This can be detected by the existence of a platform device exported for the
arm-cca-guest driver, which provides attestation services via the realm
services interface (RSI) to the Realm Management Monitor (RMM).

Like the other methods systemd uses to detect Confidential VM's, checking
the sysfs entry suggests that this is a confidential VM and should only be
used for informative purposes, or to trigger further attestation.

Like the s390 detection logic, the sysfs path being checked is not labeled
as ABI, and may change in the future. It was chosen because its
directly tied to the kernel's detection of the realm service interface rather
to the Trusted Security Module (TSM) which is what is being triggered by the
device entry. The TSM module has a provider string of 'arm-cca-guest' which
could also be used, but that (IMHO) doesn't currently provide any additional
benefit except that it can fail of the module isn't loaded.

More information can be found here:
https://developer.arm.com/documentation/den0125/0300

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
2025-01-15 13:51:12 +09:00
Yu Watanabe 0363a45898 udev-rules: do not change maximum log level when running in test mode
When udev rules are being tested, log level specified by SYSTEMD_LOG_LEVEL=
environment variable should be honored, and should not be overridden by
the rules.
2025-01-15 11:50:22 +09:00
Yu Watanabe a75aeca78c udev-rules: replace 'type *func()' -> 'type* func()' 2025-01-15 11:48:11 +09:00
Yu Watanabe 22ca9406c4 udevadm-test: add missing oom check 2025-01-15 11:48:11 +09:00
Lennart Poettering 28425b73ee update TODO 2025-01-15 00:26:00 +01:00
Daan De Meyer bbe9e03f80 man: Clarify systemd-notify and sd_notify() PID documentation
Let's clarify more explicitly that privileged calls to
systemd-notify --pid= and sd_pid_notify() effectively override any
configured NotifyAccess=main|exec for a service.
2025-01-14 21:07:06 +00:00
Daan De Meyer 05932f4768 mkosi: Install libxslt on CentOS/Fedora instead of xsltproc
Same package, but xsltproc is a very recently introduced Provides
for libxslt, and isn't available on CentOS Stream 9, so let's install
the package directly instead.
2025-01-14 16:01:56 +01:00
Lennart Poettering f54390de87 NEWS: mention mesg y/n 2025-01-14 15:38:39 +01:00
Silvio Knizek 6731769320 docs: fix markup (#35995) 2025-01-14 15:19:56 +01:00
Sea-Eun Lee 015a3b8cb1 oomd: support reloading configuration at runtime 2025-01-14 14:42:23 +01:00
Lennart Poettering 857ddc2e55 core: serialize API bus id and validate before deserializing bus tracks, plus several other bus util cleanups (#35970)
Follow-up for #35406
2025-01-14 14:39:58 +01:00
Lennart Poettering 4ba24c46b3 sysusers: some tweaks, mostly around chase() use (#35976) 2025-01-14 14:38:32 +01:00
Lennart Poettering 255468d7f2 update TODO 2025-01-14 13:59:54 +01:00
Daan De Meyer 603a3a8f22 Update packaging specs (#35980) 2025-01-14 12:24:49 +01:00
Daan De Meyer 3c2fa8e050 fmf: Only move logs if corresponding directory exists
Otherwise find fails with an error.
2025-01-14 12:07:53 +01:00
Daan De Meyer 6309efbf31 dissect: Use COPY_MERGE
When copying a directory from or to an image, let's always merge
with existing directories instead of failing with "File Exists".

Fixes https://github.com/systemd/mkosi/issues/3342.
2025-01-14 11:13:25 +01:00
Daan De Meyer 9876c27390 mkosi: update fedora commit reference
* fd36e4c562 Rebuilt for the bin-sbin merge (2nd attempt)
* cddeca136f Rebuilt for the bin-sbin merge (2nd attempt)
* 20cc578e59 Enable signing systemd-boot on OBS builds
* b1bd57ecce Revert use of PrivateTmp=disconnected
* 30f50b1870 Drop patch numbers
* 1814bfe794 remove STI test
* 3a9c32b8a9 Version 257.2
* 4df2711a9f Add bcond for OBS-specific quirks
* e570cd53df spec: drop trailing whitespace
* c7379c9460 Replace 'udevadm hwdb' with systemd-hwdb
* 3386f5d704 Rename source .abignore file
* fd860fd12d Drop a build dependency on a linter package: pytest-flakes
* 133ae30e33 Drop patches based on %upstream macro instead of patch number
* e157552c6c Always build in release mode
* fc47a92e4a Re-enable upstream behaviour of systemd-tmpfiles --purge
* 62abb21906 Version 257.1
* 35e6814ef4 Add patch for test-time-util
* bd8339bf00 sysusers: support new ! line flag for creating fully locked accounts
* c2f5f4a68a Version 257
* 31aaef8e17 Enable slow tests during build
2025-01-14 11:05:02 +01:00
Daan De Meyer 55455280da mkosi: update arch commit reference
* 8160e63e52 Limit logic required for building locally
* 3a62443e41 OBS build: add support for xz and zst compression formats
* 9667464ad7 Get rid of _tag variable
* 73dc492b5e upgpkg: 257.2-2: rebuild with changes for service restart
* 6b7355b5bb do not restart any templated units
* 332718f955 exclude vmspawn units from restart as well
* 5a749a6716 exclude systemd-nspawn@* services from restart
* 8a10796f8b upgpkg: 257.2-1: new upstream release
* 16294a0b44 Add support for building from git in OBS
* 38b664eed4 upgpkg: 257.1-1: new upstream release
* e26158dda9 upgpkg: 257-1: new upstream release
* c984b75c3f restart services after upgrade...
* 27fae2c192 upgpkg: 256.9-1: new upstream release
* 1afdd08a60 upgpkg: 256.8-2: apply: shutdown: close DM block device before issuing DM_DEV_REMOVE ioctl
2025-01-14 11:05:02 +01:00
Daan De Meyer 6e5fb09d1c ci: Skip coverage workflow on forks
Fixes #35964
2025-01-14 11:04:05 +01:00
Lennart Poettering 5e35b6a5f7 lsm: improve logging about absence of lsm-bpf
In containers securityfs is typically not mounted. Our lsm-bpf code
so far detected this situation and claimed the kernel was lacking
lsm-bpf support. Which isn't quite true though, it might very well
support it. This made boots of systemd in systemd-nspawn a bit ugly,
because of the misleading log message at boot.

Let's improve things, and make clearer what is going on.
2025-01-14 09:53:56 +00:00
Daan De Meyer 1d77ac19cf test: Only move journal file if we didn't just unlink it 2025-01-14 10:21:45 +01:00
Mike Yuan 34f4b817f6 core/manager: restore bus track deserialization cleanup in manager_reload()
There's zero explanation why it got (spuriously) removed in
8402ca04d1a063c3d8a9e3d5c16df8bb8778ae98...
2025-01-13 23:08:35 +01:00
Aman Verma 9b10bc107f update-done: remove spurious trailing whitespace from MESSAGE. 2025-01-13 22:54:42 +01:00
Mike Yuan 1446e3c392 core: serialize API bus id and validate before deserializing bus tracks 2025-01-13 21:52:19 +01:00
Mike Yuan a9a8d2e12f bus-util: introduce bus_get_instance_id() 2025-01-13 21:52:19 +01:00
Mike Yuan af0e10354e core/manager: drop duplicate bus track deserialization
bus_init_api() now does this internally
(after 8402ca04d1).
2025-01-13 21:52:19 +01:00
Mike Yuan a7516260b3 core/manager: use FOREACH_ARRAY at one more place 2025-01-13 21:52:19 +01:00
Mike Yuan 33eeea4128 bus-util: do not reset the count returned by sd_bus_track_count_name()
Follow-up for 8402ca04d1

While at it, turn the retval check for sd_bus_track_count_name()
into assertion, given we're working with already established tracks
(service_name_is_valid() should never yield false in this case).

Addresses https://github.com/systemd/systemd/pull/35406#discussion_r1912066774
2025-01-13 21:52:18 +01:00
Mike Yuan 38a2c2bf6a shared/serialize: introduce serialize_id128() 2025-01-13 21:52:13 +01:00