Commit Graph

82957 Commits

Author SHA1 Message Date
Yu Watanabe
5b585edd2f journald-config: use char* for credential data
This also slightly update log messages, and make
manager_load_credentials() take JournalConfig.
No functional change, just refactoring.
2025-07-18 15:27:03 +09:00
Yu Watanabe
3941032c6c journald-audit: do not control kernel auditing by non-default namespace instances by default
The kernel (thus system-wide) auditing should not be controlled by
non-default namespace instances, unless explicitly requested.
2025-07-18 15:27:03 +09:00
Yu Watanabe
31b25d4290 journald-manager: use manager_get_file_flags() more
This also adds one missing assertion and drop spurious empty line.
No functional change, just refactoring.
2025-07-18 15:27:03 +09:00
Yu Watanabe
a322e43ba9 journald-manager: make manager_get_file_flags() return JournalFileFlags
This also adds a missing assertion.
2025-07-18 15:26:44 +09:00
Yu Watanabe
ef69668db2 journald: move several configuration related definitions to journald-config.[ch]
No functional change, just refactoring and preparation for later changes.
2025-07-18 15:25:35 +09:00
Luca Boccassi
0ae3a8d147 Small comment fixes (#38252) 2025-07-17 22:56:28 +01:00
Luca Boccassi
681e45716a analyze: several follow-ups for recent changes (#38253)
Follow-ups for 9a08000d18 (#37838) and
ad6e02e7b4 (#38132).
2025-07-17 20:10:47 +01:00
Zbigniew Jędrzejewski-Szmek
0c927c98a7 basic/socket-util: reserve more space for timeval/timespec messages
As reported in https://github.com/systemd/systemd/issues/38222, we get the
buffer size calculation wrong on 32-bit arm. The reporter suggested checking if
__TIMESIZE == 64, but I think it's better to just use the bigger size in all
cases. The code to guesstimate the buffer size was already tweaked a few times
and apparently it's not easy to get it right. Systemd and glibc might be
compiled with different combinations of __TIMESIZE, so the compile-time check
is not super reliable, and by using the bigger size, we don't depend on the
details of how glibc decided whether to duplicate the struct or not. The cost
is negligible, 16 bytes on stack, so let's do the easy and robust thing.

Solution based on the suggestion by UZver24.

While at it, drop the mock struct definitions. They are only used to calculate
the size, but since the types involved are 8-bit values, there are no alignment
issues and we can just calculate the size directly.

Fixes https://github.com/systemd/systemd/issues/38222.
2025-07-18 02:06:37 +09:00
Yu Watanabe
54820da421 bash-completion/analyze: show candidates for --debugger
This also adds missing completion for --debugger-arguments.

Follow-up for ad6e02e7b4.
2025-07-18 01:47:25 +09:00
Yu Watanabe
1b25aa7f6e analyze-unit-gdb: append debugger arguments
Previously, the --debugger-arguments= was ignored.

Follow-up for ad6e02e7b4.
2025-07-18 01:39:51 +09:00
Yu Watanabe
ff4c911ffd analyze: merge if branches on debugger
No functional changes, just refactoring.
2025-07-18 01:39:51 +09:00
Yu Watanabe
3bfc3414e6 analyze: fix memleak and missing oom check
Follow-up for ad6e02e7b4.
2025-07-18 01:39:51 +09:00
Yu Watanabe
33502785de analyze-unit-shell: drop unnecessary error check
execl() and friends will not return on success.

Follow-up for 9a08000d18.
2025-07-18 01:39:51 +09:00
Yu Watanabe
6e7bb4d3e3 analyze: add missing full stop in the log message
Follow-up for 9a08000d18 and
ad6e02e7b4.
2025-07-18 01:39:51 +09:00
Matteo Croce
9b31b3d5ee test: add basic test for timer serialization
Set an OnCalendar= timer before the downgrade, then test for its
validity after the downgrade and the upgrade.
2025-07-17 17:22:32 +01:00
Zbigniew Jędrzejewski-Szmek
f1f1ade0d3 src/shared: grammar fixlet
There is no such verb as "list up". Also nowadays we just say "drop-ins".
2025-07-17 17:13:17 +02:00
Zbigniew Jędrzejewski-Szmek
e884fcb6b5 boot: move/adjust comments
The comment in linux_exec() was based on Lennart's comment in
https://github.com/systemd/systemd/pull/37372#discussion_r2142340582, but
shortened. The original wording is more direct and at least for me easier to
grok, so adjust the comment to be more verbose again.

Also, move the comment from shim_loader_available() to the place where it used.
This function is for checking if the new thing is available, no need to describe
the old thing there.
2025-07-17 17:10:18 +02:00
ZIHCO
ad6e02e7b4 systemd-analyze: added the verb unit-gdb to spawn and attach gdb 2025-07-17 15:09:58 +01:00
Luca Boccassi
6235121abf netdev-util: allow setting local address based on dhcp-pd addresses as well (#38211)
This extends the functionality introduced in #21648 to allow using
addresses chosen from a delegated prefix as well as the existing
SLAAC/LL/DHCP functionality.
2025-07-17 14:14:49 +01:00
Linus Heckemann
94e5d8b0e0 netdev-util: allow finding addresses from dhcp-pd 2025-07-16 16:17:19 +02:00
Sam James
e65455fead elf2efi: ignore .sframe
SFrames are a new format for stack unwinding information. Ignore it if
preset as is done for .eh_frame.
2025-07-16 14:57:30 +02:00
Antonio Alvarez Feijoo
600bbac35f systemctl: remove unnecessary assignment 2025-07-16 21:03:10 +09:00
Yu Watanabe
8013beb4a2 Revert "test: skip one test case when running on coverage"
This reverts commit 2cc6c651ee.

The issue was fixed by b955051244.

Closes #38163.
2025-07-16 10:50:36 +01:00
Mike Yuan
f11e882721 journalctl: track more closely whether we're within --until= range
Follow-up for 81fb5375b3

The offending commit fails to account for the case where
we have fewer lines before --until= than what's specified
in --lines=. Aside from that, if --grep= + --lines=+N are used,
we might also seek forward in the middle of the loop,
breaking the --until= boundary.

Let's turn the logic around then. Context.until_safe will
be set iff we're certain that there's enough to output,
and it gets reset whenever we seek forward.

Fixes #38121
Replaces #38122
2025-07-16 17:01:25 +09:00
Yu Watanabe
6e6c3b8d21 NEWS: fix typo
Follow-up for 644b6041d4.
2025-07-16 10:38:07 +09:00
Matteo Croce
2e354ac7da tests: avoid apt-get asking for user input
apt needs to be called with `-y` to avoid asking for user input,
and thus blocking the script execution when ran non-interactively.
2025-07-16 02:05:41 +01:00
DaanDeMeyer
1a324fb05c vmspawn: Drop unused arg_settings_mask 2025-07-16 09:13:54 +09:00
Yu Watanabe
ee7ed2f067 fsck,quotacheck: add credentials support and drop support of /forcefsck and friends (#38197) 2025-07-16 08:29:20 +09:00
Yu Watanabe
c0c8f918bb test-network: stop varlink.socket before stopping networkd.service
To avoid the following warnings:
```
systemd-networkd-tests.py[3139]: Stopping 'systemd-networkd.service', but its triggering units are still active:
systemd-networkd-tests.py[3139]: systemd-networkd-varlink.socket
```

Follow-up for b0ea79c5b5.
2025-07-16 08:28:23 +09:00
Yu Watanabe
48bc6f47ea mkosi: update debian commit reference to 61144ff7a6747bd3cc6340fbac38a8e15e9a239b
* 61144ff7a6 Install new quota manpages for upstream build
* a50c51d8c8 systemd-boot: fix initramfs post-update hook for uncompressed kernels
2025-07-16 05:50:01 +09:00
Yu Watanabe
d48387623b mkosi: patch filelists by opensuse 2025-07-16 05:49:34 +09:00
Yu Watanabe
644b6041d4 NEWS: mention changes in systemd-fsck and systemd-quotacheck 2025-07-16 05:47:38 +09:00
Yu Watanabe
dba4fe9a60 quotacheck: add quotacheck.mode credential support 2025-07-16 05:47:38 +09:00
Yu Watanabe
d73691c64e quotacheck: introduce string table for quota check mode
No functional change, just refactoring.
2025-07-16 05:47:38 +09:00
Yu Watanabe
e5a017becf quotacheck: drop unnecessary use of global variable 2025-07-16 05:47:38 +09:00
Yu Watanabe
59a6ae4e16 man: fix service names 2025-07-16 05:47:38 +09:00
Yu Watanabe
fff4dcc6de man: fix reference to systemd-quotacheck@.service
Also this makes the man page mentions systemd-quotacheck-root.service.
2025-07-16 05:47:38 +09:00
Yu Watanabe
059afcadfd fsck: add fsck.mode and fsck.repair credentials support
Maybe useful when kernel command line is hard to change, e.g. when UKI
is used.
2025-07-16 05:47:38 +09:00
Yu Watanabe
a85428b1d3 fsck: introduce string tables for fsck.mode= and fsck.repair=
No functional change, just refactoring and preparation for later change.
2025-07-16 05:47:38 +09:00
Yu Watanabe
d3445ec416 fsck,quotacheck: drop support for traditional /forcefsck, /fastboot, and /forcequotacheck files
Instead, please use the kernel command line options with the same name.

I am not sure these files are System V complieant or not, but at least
they are very traditional way to control fsck or quotacheck.
However, the concept of the files are really broken, especially for
fsck. As when we want to fsck the root filesystem, we need to access the
filessystem, but it may be broken...

Let's drop such traditional ways to control fsck and quotacheck.
We already support kernel command line options to control the behaviors.
Maybe, also it is better to provide ways to control them by credentials.
2025-07-16 05:47:38 +09:00
Yu Watanabe
14ce99aefc Add build/unit-tests CI jobs for s390x (#38232) 2025-07-16 05:30:35 +09:00
Yu Watanabe
319fe95fa3 btrfs: use unpriv subvol info ioctl (#38230)
Let's stop doing privileged low-level ioctls, if we also can get
unprivileged high-level ioctls for the same.
2025-07-16 05:24:28 +09:00
Zbigniew Jędrzejewski-Szmek
cf71be0a9e resolvectl: use pager for help output 2025-07-15 20:31:58 +01:00
Lennart Poettering
4b27025223 discover-image: pick up subvol ctime, too
The btrfs subvol ctime is conceptually what we call the images "mtime",
hence expose it like that, since we get it anyway these days.
2025-07-15 17:24:18 +02:00
Lennart Poettering
95e63822c2 btrfs-util: use BTRFS_IOC_GET_SUBVOL_INFO ioctl()
Since kernel 4.18 BTRFS_IOC_GET_SUBVOL_INFO exists to query subvolume
metadata without privs. This is much better than the manual approach
with finding objects in the fs tree (which is priv). Let's use it, and
drop the old code (since 4.18 is older than our baseline).
2025-07-15 17:24:18 +02:00
Luca Boccassi
4a095d9df6 ci: add build/unit-tests jobs for s390x 2025-07-15 16:18:48 +01:00
Luca Boccassi
b735d01c8a test: skip tpm2 test on s390x on GHA
The test reliably fails on s390x but only on the GHA worker,
on a native s390x VM it works. Skip it for now.
2025-07-15 16:17:34 +01:00
Lennart Poettering
f6c81cc805 repart: do not enforce 10M min size for immutable file systems by default 2025-07-15 22:58:27 +09:00
Li Tian
9e3c496bd3 90-uki-copy.install: Skip removing UKI related when BOOT_ENTRY_TYPE=type1
Commit b6d4997683
("Add --entry-type=type1|type2 option to kernel-install.")

Skip removing UKI related contents when BOOT_ENTRY_TYPE=type1

Signed-off-by: Li Tian <litian@redhat.com>
2025-07-15 22:56:33 +09:00
Lennart Poettering
987d283aca machined mini tweaks (#38226) 2025-07-15 14:33:44 +02:00