Commit Graph

85161 Commits

Author SHA1 Message Date
Luca Boccassi
a895fb38bb meson: bump version to v259~rc2 2025-11-26 12:26:56 +00:00
Luca Boccassi
fc06602eb6 NEWS: finalize date 2025-11-26 12:26:45 +00:00
Lennart Poettering
1ceba02ad9 ci: split out nvpcr test, so that it runs before rest of pcrextend (#39915)
in pcrextend we destroy pcr 11, and if we are booted in a kernel that
has pcr11 sigs, we cannot use that signature anymore. hence, let's do
the nvpcr test first, before doing the pcrextend stuff.

Fixes: #39582
2025-11-26 12:24:57 +00:00
Daan De Meyer
6a9f0641cd tree-wide: Fix declaration/definition parameter name mismatches 2025-11-26 19:02:31 +09:00
Luca Boccassi
a8374a7607 Chores for RC2 (#39901) 2025-11-26 09:52:33 +00:00
Yu Watanabe
caf7cb2737 SD_JSON_BUILD_PAIR() conversions with coccinelle script (#39858) 2025-11-26 16:35:35 +09:00
Yu Watanabe
b7f892b390 core/mount: comprehensively disable mount unit support if no libmount (#39884) 2025-11-26 16:29:30 +09:00
Yu Watanabe
7875d9a4f6 run0: two follow-ups (#39900) 2025-11-26 16:24:42 +09:00
Mike Yuan
cffb53d742 smbios11: use size_add() where appropriate
Follow-up for 33b0642e6a
2025-11-26 16:23:32 +09:00
Daan De Meyer
9ad1d56f82 import: Make naming consistent
Always abbreviate import/pull/export structs with their first letter
instead of only doing it in some places and using the wrong letter in
other places.
2025-11-26 16:23:13 +09:00
Daan De Meyer
27217200f6 core: Rename error sd_bus_error parameters to reterr_error 2025-11-26 16:22:50 +09:00
Daan De Meyer
c421392811 fsprg: Drop const from gcry_mpi_t arguments
gcry_mpi_t is defined as "typedef struct gcry_mpi *gcry_mpi_t;".
When const is applied to this type, it resolves to
"struct gcry_mpi *const" instead of what we expect ("const struct gcry_mpi *").

So we end up with a const pointer to a mutable object instead of a mutable
pointer to a const object. Since the pointer passed to the function
is copied regardless, making it const has zero benefit.

You'd think we could instead stop using gcry_mpi_t and replace it with
"const struct gcry_mpi *", except that gcrypt leaked this mess into its
api, so it expects const pointers to mutable objects as well, which means
we can't take pointers to const objects as arguments, as we'd discard the qualifier
when calling a gcrypt function.

To avoid confusion, let's drop the const qualifiers from the gcry_mpi_t arguments.
2025-11-26 16:22:32 +09:00
Daan De Meyer
9a6a8f35eb tree-wide: Small fixes for various clang-tidy warnings 2025-11-26 16:22:00 +09:00
Mike Yuan
38b59a83d2 libmount-util: build .c only if libmount feature is enabled
Follow-up for 7336f2c748

This alignes with some other optional modules in shraed/,
and it allows dlopen_libmount() to be optimized out entirely.
Let's avoid emitting pointless symbols.
2025-11-26 02:40:28 +01:00
Mike Yuan
46b4b33c25 Revert "pid1: pull in libmount unconditionally"
This reverts commit 6069de1ed3.
2025-11-26 02:40:28 +01:00
Mike Yuan
1bee93e6e2 core/mount: comprehensively disable mount unit support if no libmount
Follow-up for b3243f4bee
and 5df44d0f6a

Since we now consider this a supported senario, let's hook up
libmount loading with the high-level unit_type_supported() machinery
and gracefully skip the whole unit accordingly.
2025-11-26 02:40:27 +01:00
Luca Boccassi
b860edb962 NEWS: update contributors list 2025-11-26 01:19:25 +00:00
Luca Boccassi
9e929e4aa7 Translations: update systemd-po
ninja -C build systemd-update-po
2025-11-26 01:18:22 +00:00
Luca Boccassi
ef1105f5d5 Translations: update systemd-pot
ninja -C build systemd-pot
2025-11-26 01:17:53 +00:00
Luca Boccassi
2ded1c5a6e syscalls: add 'pragma export' to script that generates header
Otherwise it gets lost every time the header is regenerated

Follow-up for 3111327ca4
2025-11-26 01:15:33 +00:00
Luca Boccassi
0a2970898a Update hwdb
ninja -C build update-hwdb
2025-11-26 01:13:40 +00:00
Mike Yuan
2ef2002a96 run: merge privileged_execution() into become_root()
This got split in 5cabeed80b
to accommodate --empower, and later --empower received
dedicated handling again (c36942916b).
I think the new naming makes more sense - --empower is privileged
after all, just with uid left unchanged. Hence merge
privileged_execution back into it.
2025-11-26 01:10:55 +00:00
Mike Yuan
2207b7f9a4 run0: swap the order of setting default wd and user
Follow-up for 4f6ef13f43

Special casing --area= rather than --empower makes the code
self-explanatory, as --area= is about alternative home dir
after all. On top of that this ensures when --area= and
--empower are specified in combination we honor the home dir
switch, too.
2025-11-26 01:10:55 +00:00
Mike Yuan
f76f91b7c9 dlfcn-util: fix potential dl handle leak
Follow-up for 2c7bdaf9f1
2025-11-26 01:41:51 +01:00
Daan De Meyer
2ba910ab06 run: Don't make executable absolute when --root-directory= is used
Also, unless --same-root-dir was specified, don't make the executable
absolute if we're running in a chroot. Situations like this are still iffy,
but we might as well handle them a little more gracefully.
2025-11-26 00:37:17 +01:00
Frantisek Sumsal
ade882f16f sd-journal: fix a copy-paste error
Dereference the Directory pointer in the debug message instead of the
(probably already freed) JournalFile one.
2025-11-26 00:36:03 +01:00
Zbigniew Jędrzejewski-Szmek
1d26bac43f tree-wide: Fix constness issues with newer glibc (#39896)
Latest glibc uses _Generic to have strstr() and other functions return
const char* or char* based on whether the input is a const char* or a
char*. This causes build failures as we previously always expected a
char*.

Let's fix the compilation failures and add our own macros similar to
glibc's to have string functions that return a mutable or const pointer
depending on the input.
2025-11-26 00:32:54 +01:00
Daan De Meyer
0bac1ed242 tree-wide: Fix constness issues with newer glibc
Latest glibc uses _Generic to have strstr() and other functions return
const char* or char* based on whether the input is a const char* or a
char*. This causes build failures as we previously always expected a char*.

Let's fix the compilation failures and add our own macros similar to glibc's
to have string functions that return a mutable or const pointer depending on
the input.
2025-11-25 20:49:39 +01:00
Daan De Meyer
33b0642e6a tree-wide: sizeof() fixes
- TIME_T_MAX is always time_t so the check in time-util.c was redundant
- quota-util.c was zero-ing a pointer
- smbios11.c was calling sizeof(pointer)
2025-11-25 17:34:48 +01:00
Daan De Meyer
c36942916b run0: Give --empower its own color, title and emoji
When in --empower mode, all created files will be owned by the current
user, which could be problematic when creating files outside of the
current user's home directory, as other processes running as the same
user would be able to edit those files.

While this is a bit of an edge case since users already have to go through
the effort of writing --empower to indicate they want a privileged session
as the current user, it's not unphatomable to think they could start an
empowered session which they later return to and continue using. Currently,
it's not easy to differentiate a regular run0 session and an empowered session
at a glance, so users might think they're using a regular run0 session when
they're actually using an empowered session.

To address this problem, let's give empowered session their own identify, by
making the background orange, using the pumpkin emoji as the shell prompt
prefix and giving them an orange circle as the PTY title.
2025-11-25 17:15:30 +01:00
Daan De Meyer
2f62e4f5d8 boot: Fix warning
memchr() is a macro on newer glibc so make sure to undefine it before
redefining it.
2025-11-25 16:50:50 +01:00
Yu Watanabe
784f5a52f8 openssl-util: indentation fix
Follow-up for 1144f07dc6.
2025-11-25 15:32:37 +01:00
Yu Watanabe
1defd69d69 TEST-02-UNITTESTS: drop outdated comment
Follow-up for 741d59b326.
2025-11-25 22:52:10 +09:00
Yu Watanabe
f01daa30f1 docs/MOUNT_REQUIREMENTS: fix typo
Follow-ups for 3e94ae6f1e.
2025-11-25 22:52:10 +09:00
Yu Watanabe
05afbcc377 process-util: fix typo
Follow-up for a08f2ea02d.
2025-11-25 22:52:10 +09:00
Daan De Meyer
d867010caa mkosi: Add hyperscale profile (#39329)
In the CentOS Hyperscale SIG, we maintain a backport of systemd with
its own rpm spec forked from rawhide.

Let's make it easy to build upstream rpms using the Hyperscale spec
by adding a mkosi hyperscale profile.
2025-11-25 13:50:45 +01:00
Daan De Meyer
32b10d0d28 TEST-88-UPGRADE: Stop resolved hook socket before downgrading
Otherwise it'll remain active and cause networkd to get started again
during the downgrade.
2025-11-25 11:49:31 +01:00
Zbigniew Jędrzejewski-Szmek
7fd5f7aade Adjust code to query terminal size and other attributes (#39832) 2025-11-25 11:43:26 +01:00
Daan De Meyer
91af194001 mkosi: Add fixed qemu ppa for Noble temporarily
Until https://bugs.launchpad.net/ubuntu/+source/qemu/+bug/2127974
is fixed and rolled out, let's use enr0n's ppa with the fixed qemu
to make CI pass.
2025-11-25 11:02:34 +01:00
Daan De Meyer
c41c4b2bf3 mkosi: Add hyperscale profile
In the CentOS Hyperscale SIG, we maintain a backport of systemd with
its own rpm spec forked from rawhide.

Let's make it easy to build upstream rpms using the Hyperscale spec
by adding a mkosi hyperscale profile.
2025-11-25 11:02:34 +01:00
Daan De Meyer
fb514c2f8f mkosi: Rework how the pkgenv environment variables are set
Instead of including distribution specific files in the subimages,
let's have one common mkosi.pkgenv/ directory that handles all the
matching which is then included in the subimages.

This gives us more control on exactly how we do the matching.
2025-11-25 11:02:34 +01:00
Daan De Meyer
2fe49e8a4c mkosi: update mkosi commit reference to 10544812b35a668d4aac9834c78ee8166e99bc78
* 10544812b3 Don't fix up vmlinuz locations if not required
* 9baf551923 Reduce amount of packages in default image
* 9e1a2f18b8 Add support for assert sections
* c7c6e2c0b1 ubuntu: Switch to devel as the default release
* 0822deb69c Improve logging when we can not extract kernel version from filename
* 1fd7ef3db7 Do not build default initrd if Initrds= is specified
* 611c8b46c8 Don't unconditionally sync when PackageCacheDirectory=/var
* ab37f24d38 README: add link to OBS docs for mkosi builds
* 02bf256ebb completion: add reuse ignore comments
* 10ccb0b04f Make sure not all subimages depend on default-initrd subimage
* 442e1ce0f1 mkosi-tools: systemd-boot-tools is now available for all arches
* 307fc1dba3 action: make it work when used as a submodule
* c37a55f91b config: serialize dataclass instances in our JSONEncoder
* f26cb34155 log: set terminal window title in complete_step while mkosi runs
* 280c78e681 Make sure inherited settings are applied for the default initrd
* ae4f2fd718 Fix typo
* 5644f3e83e build(deps): bump github/codeql-action from 3.29.7 to 3.30.5
* 7d7b26b8c9 build(deps): bump actions/checkout from 4.2.2 to 5.0.0
* e805253447 postmarketos: implement is_kernel_package
* dd51d2e019 postmarketos: provide missing i386-vars.fd
* e23e6de66b Do not relabel files when building extension image
* ab05ead5eb Bump various systemd version checks to 258
* 382cc8b450 preset: drop systemd-networkd-wait-online.service
* 477b6b2ed5 mkosi-initrd: install systemd-container in network profile
* 1d167c0b53 mkosi-initrd: add 89-ethernet.network for network profile
* b1e81dec3a mkosi-initrd: Install libseccomp explicitly
* 3c431a141c opensuse: repository non-oss-debug is invalid
* 62ab363149 ci: add an s390x build job for additional coverage
* 62765f2d07 mailmap: deduplicate Daan
* 47f963f40b Revert "ci: Disable PPC jobs temporarily"
* 6a48f83dda dnf: Always specify --best again
* 3702368616 sandbox: Make all relative paths absolute during argparsing
* a587af0bf7 dnf: Fix /var package cache directory check in package_subdirs()
* 56cdbc25b5 Always use repository metadata from /var package cache directory
* 669d4418a3 Add note on Encrypt=yes to Passphrase= docs
* caa129edae Drop BuildSourcesEphemeral=yes from default image config
* 7edca63478 Add devicetree-auto support for UKI
* 6cb1649074 Don't add ncdu for ppc64-le on Fedora
* e019d2d2a6 ci: Disable PPC jobs temporarily
2025-11-25 11:02:34 +01:00
Yu Watanabe
27971114d5 factory: do not install nsswitch.conf when nss is disabled
When systemd is built with musl, nss modules are not supported,
hence the file is not necessary. Let's not install the file.
2025-11-25 10:48:31 +01:00
Zbigniew Jędrzejewski-Szmek
e698ee5705 basic/terminal-util: ignore failures in cleanup
Some of the functions were ignoring failure in cleanup, others weren't. If we
got a reply, it's better to use it, so ignore failures in cleanup everywhere.
2025-11-24 21:48:28 +01:00
Zbigniew Jędrzejewski-Szmek
46f6742911 basic/terminal-util: operate on one fd in get_default_background_color()
This moves the open call earlier, so that we do any state-changing operations
if we actually managed to open the nonblocking fd. The code is easier to follow
this way and might be more robust.

Suprisingly, this fixes https://github.com/systemd/systemd/issues/39055: it
seems that run0 chowns /dev/stdin (in my case /dev/pts/0) to root:root, and the
second run0 can read and write stdin/stdout throught the already-open fds,
but fd_reopen fails.

Fixes https://github.com/systemd/systemd/issues/39055.
2025-11-24 21:47:57 +01:00
Jelle van der Waa
863b852c80 coccinelle: error out when spatch is not installed
Otherwise parallel keeps spitting out "command not found".
2025-11-24 21:05:10 +01:00
Jelle van der Waa
c12966c14f treewide: prefer using SD_JSON_BUILD_PAIR_* over SD_JSON_BUILD_PAIR()
Include a coccinelle script that patches this automatically.
2025-11-24 21:05:10 +01:00
Jelle van der Waa
21ebaaf627 shared: prefer using SD_JSON_BUILD_PAIR_* over SD_JSON_BUILD_PAIR()
No functional change, just refactoring.
2025-11-24 21:05:10 +01:00
Jelle van der Waa
18615041a5 home: prefer using SD_JSON_BUILD_PAIR_* over SD_JSON_BUILD_PAIR()
No functional change, just refactoring.
2025-11-24 21:05:10 +01:00
Jelle van der Waa
a8a8498ef1 cryptenroll: prefer using SD_JSON_BUILD_PAIR_* over SD_JSON_BUILD_PAIR()
No functional change, just refactoring.
2025-11-24 20:44:14 +01:00