]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agocopy: Invoke hardlink context cleanup before restoring timestamps
Andreas Stührk [Tue, 25 Feb 2025 23:05:41 +0000 (00:05 +0100)] 
copy: Invoke hardlink context cleanup before restoring timestamps

When hardlink recreation is requested, it creates temporary files that
will be deleted once the context is destroyed. The deletion
(potentially) updates the directory's timestamps, so it's crucial that
the deletion happens before the directory timestamps are restored when
`COPY_RESTORE_DIRECTORY_TIMESTAMPS` is requested.

(cherry picked from commit b66291444b8d4022ce68121af8e6f99d29ebefd0)

8 months agopackit: Switch to meson.version for the current version
Daan De Meyer [Tue, 25 Feb 2025 11:01:53 +0000 (12:01 +0100)] 
packit: Switch to meson.version for the current version

(cherry picked from commit 6a558625162591b34f6daf7e8878d79f78e3e8be)

8 months agomkosi: update fedora commit reference
Daan De Meyer [Tue, 25 Feb 2025 18:30:42 +0000 (19:30 +0100)] 
mkosi: update fedora commit reference

9b6884d2e1 Stop using version_no_tilde for github archives
5671cf6132 List the fallback Source0 first

(cherry picked from commit 89a5ea6583840261896b2d5e8ac60dedde7da422)

8 months agomkosi: Enable History= option
Daan De Meyer [Mon, 24 Feb 2025 09:56:26 +0000 (10:56 +0100)] 
mkosi: Enable History= option

This option makes mkosi "remember" all the CLI options specified on
the command line when building an image. This means they don't need
to be specified again when booting the image afterwards or doing any
other operation on the image with "mkosi xxx".

As an example of how this is useful, currently, when running "mkosi
-d opensuse -f" to build an opensuse image and then running "mkosi
sandbox -- meson test -C build TEST-86-MULTI-UKI-PROFILE", running
the test will try to add virtiofs mounts of the fedora~rawhide build
directory on my machine instead of the opensuse one. With the History=
option enabled, it will use the opensuse tumbleweed directory as expected.

We stop setting --extra-search-path and --output-dir in the integration test
wrapper as these are settings that are "remembered" by enabling the History=
option.

(cherry picked from commit 75cf5b0d3a6045e72dacd90f90ae14fa6d817be1)

8 months agoTEST-64-UDEV-STORAGE: Stop using mkosi configure scripts
Daan De Meyer [Mon, 24 Feb 2025 16:14:01 +0000 (17:14 +0100)] 
TEST-64-UDEV-STORAGE: Stop using mkosi configure scripts

Now that we have mkosi sandbox, meson runs with the mkosi tools tree
mounted (if one is used at all), so we can implement all the qemu feature
checks in meson itself, removing the need for mkosi configure scripts.

(cherry picked from commit ba29de84cf3967ac3b06707348493d5ddc65c7d8)

8 months agoTEST-53-ISSUE-16347: Implement rtc via custom argument
Daan De Meyer [Mon, 24 Feb 2025 16:12:22 +0000 (17:12 +0100)] 
TEST-53-ISSUE-16347: Implement rtc via custom argument

Let's get rid of the configure script for this use case by just
implementing the necessary logic in integration-test-wrapper.py.
We need to get rid of our usage of configure scripts to allow enabling
the History= setting.

(cherry picked from commit 2db2cb3034e71600d25ab1c181f692265d3833fe)

8 months agomkosi: Update to latest
Daan De Meyer [Mon, 24 Feb 2025 21:24:52 +0000 (22:24 +0100)] 
mkosi: Update to latest

(cherry picked from commit 4b8edc68f9f4111ccb5ba40c048431874ce8afab)

8 months agorepart: when using erofs and log level is not debug, use --quiet
Luca Boccassi [Sun, 23 Feb 2025 19:05:24 +0000 (19:05 +0000)] 
repart: when using erofs and log level is not debug, use --quiet

mkfs.erofs is extremely verbose and will log every single file added
to the filesystem, which is a lot of them when building a rootfs.

(cherry picked from commit 323213cfea8b78d44f63b8a83f74fbd1f79f1775)

8 months agofuzz: tentatively disable fuzz-compress on oss-fuzz
Yu Watanabe [Sat, 22 Feb 2025 20:34:55 +0000 (05:34 +0900)] 
fuzz: tentatively disable fuzz-compress on oss-fuzz

It does not work on oss-fuzz for some reasons. See #11018.

(cherry picked from commit 0656b3a083b48a2cccb90ee1f7fed949d9283b76)

8 months agotest: split VM-only subtests from TEST-74-AUX-UTILS to new VM-only test
Luca Boccassi [Thu, 21 Nov 2024 09:51:14 +0000 (09:51 +0000)] 
test: split VM-only subtests from TEST-74-AUX-UTILS to new VM-only test

TEST-74-AUX-UTILS covers many subtests, as it's a catch-all job, and a few
need a VM to run. The job is thus marked VM-only. But that means in settings
where we can't run VM tests (no KVM available), the entire thing is skipped,
losing tons of coverage that doesn't need skipping.

Move the VM-only subtests to TEST-87-AUX-UTILS-VM that is configured to only
run in VMs under both runners. This way we keep the existing tests as-is, and
we can add new VM-only tests without worrying. This is how the rest of the
tests are organized.

Follow-up for f4faac20730cbb339ae05ed6e20da687a2868e76

(cherry picked from commit 3f9539a97f3b4747ff22a530bac39dec24ac58af)

8 months agofuzz: decompress_startswith() may return zero
Yu Watanabe [Sat, 22 Feb 2025 19:59:46 +0000 (04:59 +0900)] 
fuzz: decompress_startswith() may return zero

Fixes #36472.

(cherry picked from commit 339f2f2eeb883b201f59076900e3bee7ff143460)

9 months agotest-network: add test case for KeepConfiguration=yes with RTPROT_BOOT
Yu Watanabe [Mon, 17 Feb 2025 17:05:07 +0000 (02:05 +0900)] 
test-network: add test case for KeepConfiguration=yes with RTPROT_BOOT

For issue #36411.

(cherry picked from commit 1cac0676dafb45c64940c36d7d75ce1e04eb831c)

9 months agonetwork/route: do not remove any foreign routes when KeepConfiguration=yes
Yu Watanabe [Mon, 17 Feb 2025 17:08:10 +0000 (02:08 +0900)] 
network/route: do not remove any foreign routes when KeepConfiguration=yes

Without this change, only foreign routes with RTPROT_KERNEL, RTPROT_STATIC,
RTPROT_DHCP, RTPROT_RA, and RTPROT_REDIRECT are kept, and foreign routes with
other protocol e.g. RTPROT_BOOT are removed even if KeepConfiguration=yes.

Fixes a regression in dd6d53a8dc58c5e6e310b09ba7f7a22600a87ba9 (v257).
Fixes #36411.

(cherry picked from commit 724faccf45b6933bb30c56cf99acf6373fffbc70)

9 months agosbsign: Don't set bit in SpcPeImageData->flags
Daan De Meyer [Fri, 21 Feb 2025 21:41:26 +0000 (22:41 +0100)] 
sbsign: Don't set bit in SpcPeImageData->flags

Neither sbsign nor pesign set this flag in SpcPeImageData->flags,
which is about which resources should be included specifying "Which
portions of the Windows PE file are hashed." according to the
authenticode spec. However, this is followed by "Although flags is
always present, it is ignored when calculating the file hash for both
signing and verification purposes". So as it doesn't seem to do
anything useful and the other tools don't set any of these flags
either, let's follow suite and not set this flag ourselves either.

(cherry picked from commit 66584a9335f9a3be5666209ddb34ae7d7f547189)

9 months agodocs/CONTROL_GROUP_INTERFACE: fix typo
Lin Jian [Fri, 21 Feb 2025 13:07:27 +0000 (21:07 +0800)] 
docs/CONTROL_GROUP_INTERFACE: fix typo

(cherry picked from commit 7593173c947d7ac2a4a890c570501034f3a4f9b1)

9 months agodocs: Clarify that login1 signals are not emitted for convenience objects
Philip Withnall [Thu, 20 Feb 2025 18:15:43 +0000 (18:15 +0000)] 
docs: Clarify that login1 signals are not emitted for convenience objects

While this is obvious if you spend a few minutes thinking about how
D-Bus signals work (in this case, they are broadcast from a system
service, so cannot apply to a specific user/session/seat), it’s a bit
easy to overlook this while putting code together which uses the login1
D-Bus API, so it’s helpful to point this hazard out specifically in the
docs.

The signals can only be emitted on the canonical objects. The
convenience objects are useful for method calls, as the calling context
can be used to dereference ‘self’ and ‘auto’, but this can’t work for
signals.

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
(cherry picked from commit 82b32b997c51e259ddf66a0ec6bd7631b0ea781d)

9 months agodocs: Fix some confusing wording in various D-Bus docs
Philip Withnall [Thu, 20 Feb 2025 18:13:00 +0000 (18:13 +0000)] 
docs: Fix some confusing wording in various D-Bus docs

Signed-off-by: Philip Withnall <pwithnall@gnome.org>
(cherry picked from commit 5fe4edd3fccd2a14ec3488daeac80ddb33bc71db)

9 months agoman: fix typo in systemd.watchdog_device kernel option
Ahmad Fatoum [Thu, 20 Feb 2025 11:53:49 +0000 (12:53 +0100)] 
man: fix typo in systemd.watchdog_device kernel option

The option that systemd actually looks for has an underscore and no dash
as can be seen in src/core/main.c.

The man/kernel-command-line.xml documentation also gets it right with
this file being the only instance of watchdog-device being used.

Fixes: c75396c30bd9 ("documentation: add description for watchdog device path")
Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
(cherry picked from commit 6f8a9d0917d6fe42c674466bffead9ac19db98e9)

9 months agotools/dbus_exporter: set LD_ORIGIN_PATH if procfs is not available
Luca Boccassi [Fri, 8 Nov 2024 22:41:09 +0000 (22:41 +0000)] 
tools/dbus_exporter: set LD_ORIGIN_PATH if procfs is not available

The script runs the binaries which try to find the internal libs via /proc/self/exe due
to glibc's RPATH resolution and fail:

/var/cache/src/systemd/tools/dbus_exporter.py interfaces
 /var/cache/src/systemd/build/systemd
 /var/cache/src/systemd/build/systemd-homed
 /var/cache/src/systemd/build/systemd-hostnamed
 /var/cache/src/systemd/build/systemd-importd
 /var/cache/src/systemd/build/systemd-localed
 /var/cache/src/systemd/build/systemd-logind
 /var/cache/src/systemd/build/systemd-machined
 /var/cache/src/systemd/build/systemd-networkd
 /var/cache/src/systemd/build/systemd-oomd
 /var/cache/src/systemd/build/systemd-portabled
 /var/cache/src/systemd/build/systemd-resolved
 /var/cache/src/systemd/build/systemd-sysupdated
 /var/cache/src/systemd/build/systemd-timedated
execve("/var/cache/src/systemd/build/systemd", ["/var/cache/src/systemd/build/sys"..., "--bus-introspect", "list"], 0x7ffc7ab68600 /* 20 vars */) = 0
brk(NULL)                               = 0x56265bf70000
mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7f56ced7f000
readlinkat(AT_FDCWD, "/proc/self/exe", 0x7ffedeaa7a90, 4096) = -1 ENOENT (No such file or directory)
access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
fstat(3, {st_mode=S_IFREG|0644, st_size=20293, ...}) = 0
mmap(NULL, 20293, PROT_READ, MAP_PRIVATE, 3, 0) = 0x7f56ced7a000
close(3)                                = 0
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/x86_64-linux-gnu/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/x86_64-linux-gnu/", {st_mode=S_IFDIR|0755, st_size=19312, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v4/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v3/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/glibc-hwcaps/x86-64-v2/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/", {st_mode=S_IFDIR|0755, st_size=19312, ...}, 0) = 0
openat(AT_FDCWD, "/lib/glibc-hwcaps/x86-64-v4/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/glibc-hwcaps/x86-64-v4/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/glibc-hwcaps/x86-64-v3/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/glibc-hwcaps/x86-64-v3/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/glibc-hwcaps/x86-64-v2/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/glibc-hwcaps/x86-64-v2/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/lib/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/lib/", {st_mode=S_IFDIR|0755, st_size=642, ...}, 0) = 0
openat(AT_FDCWD, "/usr/lib/glibc-hwcaps/x86-64-v4/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/glibc-hwcaps/x86-64-v4/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/glibc-hwcaps/x86-64-v3/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/glibc-hwcaps/x86-64-v3/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/glibc-hwcaps/x86-64-v2/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/glibc-hwcaps/x86-64-v2/", 0x7ffedeaa80b0, 0) = -1 ENOENT (No such file or directory)
openat(AT_FDCWD, "/usr/lib/libsystemd-core-258.so", O_RDONLY|O_CLOEXEC) = -1 ENOENT (No such file or directory)
newfstatat(AT_FDCWD, "/usr/lib/", {st_mode=S_IFDIR|0755, st_size=642, ...}, 0) = 0
writev(2, [{iov_base="/var/cache/src/systemd/build/sys"..., iov_len=36},
           {iov_base=": ", iov_len=2},
           {iov_base="error while loading shared libra"..., iov_len=36},
           {iov_base=": ", iov_len=2},
           {iov_base="libsystemd-core-258.so", iov_len=22},
           {iov_base=": ", iov_len=2},
           {iov_base="cannot open shared object file", iov_len=30},
           {iov_base=": ", iov_len=2},
           {iov_base="No such file or directory", iov_len=25},
           {iov_base="\n", iov_len=1}],
           10/var/cache/src/systemd/build/systemd: error while loading shared libraries: libsystemd-core-258.so: cannot open shared object file: No such file or directory
) = 158

(cherry picked from commit c6a932fd0db5bfcc523d0a57351b906bce2955cd)

9 months agoshell completion: add kernel-identify/inspect verbs for bootctl
Luca Boccassi [Tue, 18 Feb 2025 21:15:08 +0000 (21:15 +0000)] 
shell completion: add kernel-identify/inspect verbs for bootctl

Follow-up for a05255981ba5b04f1cf54ea656fbce1dfd9c3a68
Follow-up for 3e0a3a0259324b4c40a9a62c8506fe683cd0273b

(cherry picked from commit 6a6d4c3f3c123a1cbb6770f1cae8c130a48333e1)

9 months agoukify: print all remaining log-like output to stderr
Luca Boccassi [Mon, 17 Feb 2025 19:44:15 +0000 (19:44 +0000)] 
ukify: print all remaining log-like output to stderr

We want to be able to capture stdout for json and such, so convert
all remaining logging to stderr.

(cherry picked from commit cf4deeaf1e822ade5c1fbbe2584b23a2d0988439)

9 months agoUpdate footer.html to 2025
Anthony Avina [Mon, 17 Feb 2025 19:33:42 +0000 (13:33 -0600)] 
Update footer.html to 2025

Updating footer to reflect current year: 2025

(cherry picked from commit 1bcb739f080a56ab578129d9a87e061d92059eb5)

9 months agodissect: fix log_debug_errno assert due to r=0
Luca Boccassi [Mon, 17 Feb 2025 01:04:33 +0000 (01:04 +0000)] 
dissect: fix log_debug_errno assert due to r=0

systemd-dissect[612]: Assertion '(_error) != 0' failed at src/shared/dissect-image.c:3436, function dissected_image_load_verity_sig_partition(). Aborting.

(cherry picked from commit 135640c140ba32915b97d23e8d6c1cc3fd6c6a2a)

9 months agoman/networkd.conf: add missing whitespace between words
Louis Sautier [Sat, 15 Feb 2025 23:05:13 +0000 (00:05 +0100)] 
man/networkd.conf: add missing whitespace between words

Signed-off-by: Louis Sautier <sautier.louis@gmail.com>
(cherry picked from commit 24af6a0d0afcce3268ff60b7fea2f203cd820985)

9 months agoukify: if the specified kernel is not a valid PE file try to decompress it
Luca Boccassi [Thu, 13 Feb 2025 19:44:12 +0000 (19:44 +0000)] 
ukify: if the specified kernel is not a valid PE file try to decompress it

On some distros on some architectures (e.g.: Ubuntu arm64) the kernel is shipped as
a gzipped file, which the UEFI firmware does not understand.
If pefile fails to parse it, try to decompress it.

(cherry picked from commit 0dd03215f1e402092f6c6da213708045e445a9ed)

9 months agoukify: fix zboot parsing with zstd
Luca Boccassi [Thu, 13 Feb 2025 19:43:00 +0000 (19:43 +0000)] 
ukify: fix zboot parsing with zstd

The header starts with 'zstd', not 'zstd22':

$ ukify build --linux vmlinuz-6.13+unreleased-cloud-arm64 --initrd /boot/initrd.img-6.12.12-amd64 --output uki
Kernel version not specified, starting autodetection 😖.
Real-Mode Kernel Header magic not found
+ readelf --notes vmlinuz-6.13+unreleased-cloud-arm64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Traceback (most recent call last):
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2510, in <module>
    main()
    ~~~~^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2499, in main
    make_uki(opts)
    ~~~~~~~~^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 1328, in make_uki
    opts.uname = Uname.scrape(linux, opts=opts)
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 384, in scrape
    version = func(filename, opts=opts)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 374, in scrape_generic
    text = maybe_decompress(filename)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 221, in maybe_decompress
    return get_zboot_kernel(f)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 201, in get_zboot_kernel
    raise NotImplementedError(f'unknown compressed type: {comp_type!r}')
NotImplementedError: unknown compressed type: b'zstd\x00\x00'

(cherry picked from commit a6d51ae582c863c01c581f1e31492910d53b0427)

9 months agoukify: switch from zstd to zstandard
Luca Boccassi [Thu, 13 Feb 2025 19:38:45 +0000 (19:38 +0000)] 
ukify: switch from zstd to zstandard

The zstd library does not support stream decompression, and it
requires the zstd header to contain extra metadata, that the kernel
build does not append:

$ file -k vmlinuz-6.13+unreleased-cloud-arm64
vmlinuz-6.13+unreleased-cloud-arm64: PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows, 2 sections\012- data
$ ukify build --linux vmlinuz-6.13+unreleased-cloud-arm64 --initrd /boot/initrd.img-6.12.12-amd64 --output uki
Kernel version not specified, starting autodetection 😖.
Real-Mode Kernel Header magic not found
+ readelf --notes vmlinuz-6.13+unreleased-cloud-arm64
readelf: Error: Not an ELF file - it has the wrong magic bytes at the start
Traceback (most recent call last):
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2508, in <module>
    main()
    ~~~~^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 2497, in main
    make_uki(opts)
    ~~~~~~~~^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 1326, in make_uki
    opts.uname = Uname.scrape(linux, opts=opts)
                 ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 382, in scrape
    version = func(filename, opts=opts)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 372, in scrape_generic
    text = maybe_decompress(filename)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 219, in maybe_decompress
    return get_zboot_kernel(f)
  File "/home/bluca/git/systemd/src/ukify/ukify.py", line 199, in get_zboot_kernel
    return cast(bytes, zstd.uncompress(f.read(size)))
                       ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^
zstd.Error: Input data invalid or missing content size in frame header.

This appears to be by design:

https://github.com/sergey-dryabzhinsky/python-zstd/issues/53

Switch to python3-zstandard, which works.

(cherry picked from commit fbc6fecf1adbd34bd541c04d04ceef2695caa80a)

9 months agosysupdate: Don't use compression extension for UKIs in manpage
Daan De Meyer [Thu, 13 Feb 2025 12:03:39 +0000 (13:03 +0100)] 
sysupdate: Don't use compression extension for UKIs in manpage

UKIs should generally not be compressed since the kernel image and
initrd in them will already be compressed so let's remove the compression
suffix from the examples in the sysupdate manpage.

(cherry picked from commit 5ca1865ad95a10b744321d21293587ed1d446ee6)

9 months agobasic/linux: update kernel headers from v6.14-rc1
Yu Watanabe [Thu, 6 Feb 2025 10:41:27 +0000 (19:41 +0900)] 
basic/linux: update kernel headers from v6.14-rc1

Co-authored-by: Rudi Heitbaum <rudi@heitbaum.com>
(cherry picked from commit 0d879453acdc86b0d742c5854420c116d0f23ba4)

9 months agobasic/linux: update kernel headers from v6.13-rc6
Yu Watanabe [Mon, 6 Jan 2025 14:10:22 +0000 (23:10 +0900)] 
basic/linux: update kernel headers from v6.13-rc6

This also removes README and moves the explanation about the header
modification to the script.

(cherry picked from commit 62e9cd6b09f835d3e1ebc686b3fe055107ed823e)

9 months agomkosi: update fedora commit reference
Daan De Meyer [Wed, 19 Feb 2025 12:46:47 +0000 (13:46 +0100)] 
mkosi: update fedora commit reference

6c7c4a510d Do not use dynamic spec generation for non-upstream builds
6201755b36 Allow co-installation of systemd-sysusers-standalone and systemd
eba1721678 Split out -sysusers and -shared
ac9c438e27 Use dynamic spec generation for triggers
3671a5cc79 Move more auxiliary files into subpackages
5c40e08728 Remove patch that is already upstream
49ec9f3286 Move some files into subpackages
2c0b984bf4 Version 257.3
d66f997915 Add explicit BR: libxcrypt-devel
1ffa7bf7c7 Make Georgian mapping patch downstream-only
de4ae54a34 Backport PR #36194 to add Georgian mapping to kbd-model-map
cc9bce7893 Drop override of $PATH in the user manager
d0973df863 Backport patch to emit audit events from systemd-sysusers
e54ec2f978 Trim changelog entries that are not relevant to users

(cherry picked from commit 759abb6d523fd619916c1ad9d1832fe5c8dd3043)

9 months agomkosi: update fedora commit reference
Zbigniew Jędrzejewski-Szmek [Thu, 16 Jan 2025 21:26:30 +0000 (22:26 +0100)] 
mkosi: update fedora commit reference

c7fecc18eb Skip test_sysusers_defined on upstream builds
f257050ddd Add a .editorconfig file
aa5546e9ed Add a few mkosi artifact directories to .gitignore
01e5bc1c93 Set SBAT in sd-boot when building on OBS
a7eec4d33d Run upstream integration test suite with Fedora CI

(cherry picked from commit 6e1b24820fb6eae83cb8935867d4ef846cc36428)

9 months agomkosi: update fedora commit reference
Daan De Meyer [Mon, 13 Jan 2025 15:18:33 +0000 (16:18 +0100)] 
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

(cherry picked from commit 9876c273907bf07290056f67500ac2bf069b6d9c)

9 months agomkosi: update arch commit reference
Daan De Meyer [Tue, 18 Feb 2025 13:16:28 +0000 (14:16 +0100)] 
mkosi: update arch commit reference

1b4994657d return if not a git repository (skip backports and reverts)
9d3374e98b move patch up
2416b7d81c upgpkg: 257.3-1: new upstream release

(cherry picked from commit 840ce150a65e12ae1a2639c107d8e178b9b89f7b)

9 months agomkosi: update arch commit reference
Daan De Meyer [Mon, 13 Jan 2025 15:11:07 +0000 (16:11 +0100)] 
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

(cherry picked from commit 55455280dad6eff628b014f5df5e640f850a651b)

9 months agomkosi: Install systemd in Fedora build image
Daan De Meyer [Sat, 15 Feb 2025 20:47:50 +0000 (21:47 +0100)] 
mkosi: Install systemd in Fedora build image

rpm pulls in systemd-standalone-sysusers now by default to get
systemd-sysusers which causes a conflict later on during the prepare
script when systemd is pulled in as a dependency of device-mapper so
let's install systemd in the initial transaction so systemd provides
systemd-sysusers and systemd-standalone-sysusers is never installed
in the first place.

(cherry picked from commit 034f027be4a239cc153493ec71678670f3f0da99)

9 months agomkosi: Fix mkosi.clangd
Daan De Meyer [Fri, 14 Feb 2025 14:22:05 +0000 (15:22 +0100)] 
mkosi: Fix mkosi.clangd

- Add missing '--' delimiter
- Use the new BuildSubdirectory JSON field to figure out the build
  subdirectory.
- Remove the /usr/include path mapping for now. This means we can't
  jump into system headers anymore if they don't exist on the host,
  we can find a way to add this back later if it turns out to be
  crucial.

(cherry picked from commit 531750e9b04580664755f5066d36626e741cc2c1)

9 months agomkosi: Update to latest
Daan De Meyer [Fri, 14 Feb 2025 14:21:04 +0000 (15:21 +0100)] 
mkosi: Update to latest

(cherry picked from commit 487ec6aa3fab7ead9e57aff14472516e7c1768ee)

9 months agomkosi: Update to latest
Daan De Meyer [Thu, 13 Feb 2025 18:56:34 +0000 (19:56 +0100)] 
mkosi: Update to latest

(cherry picked from commit ebcd568aa3b06e703f08c4b02460024fc2bdf0c5)

9 months agofmf: Don't fail if we can't modify sysctl values
Daan De Meyer [Thu, 13 Feb 2025 13:41:21 +0000 (14:41 +0100)] 
fmf: Don't fail if we can't modify sysctl values

If the script is running unprivileged we might not be able to modify
these so let's skip in that case.

(cherry picked from commit 1e6514d6d047a19fe05fa53ed67ffce6d0012c31)

9 months agomeson: bump version to 257.3 v257.3
Zbigniew Jędrzejewski-Szmek [Thu, 13 Feb 2025 17:48:27 +0000 (18:48 +0100)] 
meson: bump version to 257.3

9 months agocore/condition: fix segfault when key not found in os-release
Zbigniew Jędrzejewski-Szmek [Thu, 13 Feb 2025 14:49:50 +0000 (15:49 +0100)] 
core/condition: fix segfault when key not found in os-release

'ConditionOSRelease=|ID_LIKE$=*rhel*' results in a segfault.
The key 'ID_LIKE' is not present in Fedora's os-release file.

I think the most reasonable behaviour is to treat missing keys as empty.
This matches the "shell-like" sprit, since in a shell empty keys would
by default be treated as empty too. Thus, "ID_LIKE=" would match, if
ID_LIKE is not present in the file, and ID_LIKE=!$foo" would also match.
The other option would be to make those matches fail, but I think that'd
make the feature harder to use, esp. with negative matches.

Documentation is updated to clarify the new behaviour.

https://bugzilla.redhat.com/show_bug.cgi?id=2345544
(cherry picked from commit de02b551adcf74e5677454fd36bf7653b1a4def1)

9 months agomkosi: Update to latest
Daan De Meyer [Wed, 12 Feb 2025 10:09:36 +0000 (11:09 +0100)] 
mkosi: Update to latest

In https://github.com/systemd/mkosi/pull/3497, mkosi has started parsing
options passed after the verb as regular mkosi options instead of options
for the invoked command. We adapt to this change by adding '--' as a delimiter
everywhere where required.

(cherry picked from commit b429f82eaf774d9b9f67c201770074a9ec72647e)

9 months agoukify: Calculate section size more correctly
Daan De Meyer [Wed, 29 Jan 2025 13:44:27 +0000 (14:44 +0100)] 
ukify: Calculate section size more correctly

We should only use Misc_VirtualSize if it's smaller than SizeOfRawData,
since in that case it'll be the non-aligned section size. Otherwise we
have to use SizeOfRawData to get the size on disk.

(cherry picked from commit 33b25fa11c408ae40f2aa4300220504329a23a52)

9 months agoukify: print debug/progress messages to stderr
Luca Boccassi [Sun, 19 Jan 2025 15:42:47 +0000 (15:42 +0000)] 
ukify: print debug/progress messages to stderr

Otherwise json will be interleaved with plain text messages

(cherry picked from commit 7d64e2f368ec7c683fee95d21f527c406b8eb5e6)

9 months agologin: Queue session for garbage collection on leader death
msizanoen [Wed, 12 Feb 2025 14:27:25 +0000 (21:27 +0700)] 
login: Queue session for garbage collection on leader death

This ensures sessions are cleaned up properly in case the user service
manager was manually stopped.

(cherry picked from commit a6bccda28d398925397d3a8f0c7491ba03941f23)

9 months agologin: Continue watching leader pidfd after stop
msizanoen [Wed, 12 Feb 2025 15:09:01 +0000 (22:09 +0700)] 
login: Continue watching leader pidfd after stop

This ensures that garbage collection will be triggered when the leader
process dies.

(cherry picked from commit b2a4109031c1bd79c498f8642df150deeebe1708)

9 months agoudev-watch: do not try to remove invalid watch handle
Yu Watanabe [Wed, 12 Feb 2025 00:23:33 +0000 (09:23 +0900)] 
udev-watch: do not try to remove invalid watch handle

When a new device is processed, there should be no watch handle for
the device, hence udev_watch_clear() provides -1. Let's not try to call
inotify_rm_watch() in that case.

This should not change any behavior. Just for suppressing spurious
debugging log:
=====
(udev-worker)[3626140]: zram1: Removing watch handle -1.
=====

(cherry picked from commit b3b442062045eac61a9dd3ed73b650dfb5be0b46)

9 months agoudev-watch: mention that the failure is ignored
Yu Watanabe [Wed, 12 Feb 2025 00:22:49 +0000 (09:22 +0900)] 
udev-watch: mention that the failure is ignored

(cherry picked from commit a52aad3b4bb735a22ce67110142d135819589a87)

9 months agoudev-worker: add debugging log about success of flock() for whole block device
Yu Watanabe [Wed, 12 Feb 2025 00:20:51 +0000 (09:20 +0900)] 
udev-worker: add debugging log about success of flock() for whole block device

(cherry picked from commit 951def0e276c041a262b3f147bb42206195fe13e)

9 months agotmpfiles: fix copypasta in create_symlink() (FIFO -> symlink)
Mike Yuan [Sun, 9 Feb 2025 14:38:05 +0000 (15:38 +0100)] 
tmpfiles: fix copypasta in create_symlink() (FIFO -> symlink)

(cherry picked from commit 6f91e7a3bea2c5046354b31cb650b54e3b2884d5)

9 months agoukify: do not fail if pefile complains about hardcoded 256MB limit
Luca Boccassi [Thu, 30 Jan 2025 01:19:59 +0000 (01:19 +0000)] 
ukify: do not fail if pefile complains about hardcoded 256MB limit

pefile has an hardcoded limit to 256MB per section:

https://github.com/erocarrera/pefile/issues/396

When building an initrd with large firmware files and
lots of kernel modules, this limit can be reached.
Skip over those warnings.

(cherry picked from commit 32caed550f5a81eb87d2e39bc83917df2898d844)

9 months agoimport: update to current fedora keyring
Lennart Poettering [Fri, 7 Feb 2025 13:58:29 +0000 (14:58 +0100)] 
import: update to current fedora keyring

Add a bunch of more released keys. Kinda a follow-up for c8c5ce5772b08da0ad317331b1f4929c1b466ae0

(cherry picked from commit 8135d37f81917f2a7f98a52bdae92eae5878946d)

9 months agoimport-pubring.gpg: add openSUSE build key
Thorsten Kukuk [Fri, 7 Feb 2025 13:36:06 +0000 (14:36 +0100)] 
import-pubring.gpg: add openSUSE build key

(cherry picked from commit c8c5ce5772b08da0ad317331b1f4929c1b466ae0)

9 months agostub: Mention that VirtualSize should be <= SizeOfRawData
Daan De Meyer [Tue, 4 Feb 2025 13:52:02 +0000 (14:52 +0100)] 
stub: Mention that VirtualSize should be <= SizeOfRawData

(cherry picked from commit 2443b4d9a17787fd0a63d6591fbdb74650c43994)

9 months agomissing_sched: add CLONE_PIDFD
Michael Olbrich [Sun, 9 Feb 2025 12:32:36 +0000 (13:32 +0100)] 
missing_sched: add CLONE_PIDFD

CLONE_PIDFD was introduced in v5.2 and in sched.h in glibc-2.31 so
without this, building with older version fails with:

src/basic/raw-clone.h:41:108: error: 'CLONE_PIDFD' undeclared (first use in this function); did you mean 'CLONE_FILES'?

(cherry picked from commit e91c5cf06ab7ca9e5576c6feac5f743927f2b063)

9 months agobootctl: minor reordering of fields in output
Lennart Poettering [Sun, 9 Feb 2025 22:34:29 +0000 (23:34 +0100)] 
bootctl: minor reordering of fields in output

Let's move the currently used/default/oneshot entry output after the
basic info about the boot loader itself, since conceptually these are
objects kinda "one level down" from the boot loader perspective. Hence,
let's *first* show all info about the boot loader itself before we
display the objects it manages.

This is just a trivial change in output, just swaps th elines for these
fields with the ones showing where the boot loader is installed.

(cherry picked from commit af5b961ad8f22be04f47c1c0e729b1e6fd78b423)

9 months agobootctl: suppress output of empty partition info if we also have no idea about EFI...
Lennart Poettering [Sun, 9 Feb 2025 22:23:38 +0000 (23:23 +0100)] 
bootctl: suppress output of empty partition info if we also have no idea about EFI binary path

So far we'd output both the partition and the binary path always, even
if we didn't know either (but in that case show empty information).
Let's address this, and show partition info only if we know it, or if we
know the EFI binary path, but suppress both if we know neither.

Note that we'll show the partition info if we don't know it still if we
know the EFI binary path used for boot, since it is relative to the
partition of course, and hence it's really strange to know one but not
the other, hence it deserves some mentioning in the output.

(cherry picked from commit df418fa234a5b12e302a336df82c97f33871ae35)

9 months agobootctl: also shown whether stub loader partition data was passed
Lennart Poettering [Sun, 9 Feb 2025 22:21:08 +0000 (23:21 +0100)] 
bootctl: also shown whether stub loader partition data was passed

Let's make the stub and loader output sections more alike, and say in
both cases whether we recieved that data from the boot phase or not the
same way.

(cherry picked from commit 26bfd97216ab55664214d1e0fac7065e5573a36b)

9 months agobootctl: fix potential uninitialized memory access
Lennart Poettering [Sun, 9 Feb 2025 08:53:39 +0000 (09:53 +0100)] 
bootctl: fix potential uninitialized memory access

And while we are at it, let' get rid of have_xyz_partition_uuid
variables, to simplify things.

(cherry picked from commit df28afe9b2de9e480121c25f222fa487fed927ce)

9 months agoupdate-utmp: do not give up if the first attempt at connecting bus failed
Yu Watanabe [Wed, 18 Dec 2024 13:27:29 +0000 (22:27 +0900)] 
update-utmp: do not give up if the first attempt at connecting bus failed

Otherwise, the program exits with failure if the first attempt in run() failed:
```
Dec 18 20:27:37 systemd-update-utmp[254]: Bus n/a: changing state UNSET → OPENING
Dec 18 20:27:37 systemd-update-utmp[254]: sd-bus: starting bus by connecting to /run/systemd/private...
Dec 18 20:27:37 systemd-update-utmp[254]: Bus n/a: changing state OPENING → CLOSED
Dec 18 20:27:37 systemd-update-utmp[254]: Failed to get D-Bus connection: Connection refused
```

(cherry picked from commit 85d040dabd2cc67c89b7ed6157429b8f6f2240f4)

9 months agoudevadm-test: fix gid check
Yu Watanabe [Fri, 7 Feb 2025 02:07:37 +0000 (11:07 +0900)] 
udevadm-test: fix gid check

Fixes a bug introduced by 03b6879f4d45c49264708aef872fd05af30ddcf0.

Based on the upstream commit e66d4ea31ad3812fdd7a0f1cdcc3b941cedf542a.

9 months agohwdb: update to main@{2025-02-07}
Luca Boccassi [Fri, 7 Feb 2025 23:08:10 +0000 (23:08 +0000)] 
hwdb: update to main@{2025-02-07}

git restore -s origin/main hwdb.d/ test/hwdb.d

9 months agohwdb: Make remote controllable lights work out-of-the-box
Bastien Nocera [Thu, 12 Dec 2024 13:23:46 +0000 (14:23 +0100)] 
hwdb: Make remote controllable lights work out-of-the-box

Give access to USB/Bluetooth lights such as the Logitech Litra family of
devices.

The Logitech devices in particular are accessible through USB
and Bluetooth.

(cherry picked from commit 106f64cbd66b8aa76333c3f11177f53e79e2cd82)

9 months agomeson: fix suite of alignment check tests
Yu Watanabe [Fri, 7 Feb 2025 17:20:02 +0000 (02:20 +0900)] 
meson: fix suite of alignment check tests

Follow-up for 97318131fd06a5bc35454da81dcbbc84f16d9940.

By default, suite of each built test is determined by the directory of
the source file. Hence, before the mentioned commit, all tests in
src/boot/efi/ are in the 'efi' suite. The commit changed the directory
tree, but forgot to update the name of the test suite.

(cherry picked from commit 576e98a72c2f6b0145c63c3f3fec1b9194a60539)

9 months agomeson: allow to customize the access mode for tty/pts devices
Yu Watanabe [Mon, 16 Dec 2024 02:50:53 +0000 (11:50 +0900)] 
meson: allow to customize the access mode for tty/pts devices

Then, switch the default value to "0600", due to general security
concerns about terminals being written to by other users.

Closing #35599.

Backport note: the default is changed back to 0620 to keep backward
compatbility intact for the purpose of backporting. This lets
security-conscious users fix  the issue if they want to, without
affecting users that do not want changes in the stable branches.

(cherry picked from commit a4d18914751e687c9e44f22fe4e5f95b843a45c8)

9 months agotest-network: add test case for requesting routing policy rules by multiple interfaces
Yu Watanabe [Tue, 4 Feb 2025 00:45:45 +0000 (09:45 +0900)] 
test-network: add test case for requesting routing policy rules by multiple interfaces

For issue #36244.

(cherry picked from commit f7ae28fcec9513435f8258431b686fbaf846915b)

9 months agonetwork: allow to configure routing policy rule even if requesting interface is not...
Yu Watanabe [Tue, 4 Feb 2025 03:07:21 +0000 (12:07 +0900)] 
network: allow to configure routing policy rule even if requesting interface is not activated yet

In the kernel, all routing policy rules are not assigned to any interface,
and we can configure them even if the relevant interface is down state.

Fixes a regression caused by 4f8b153d903fd4a6e8d7d3e49113582d70d1525a (v257).
Fixes #36244.

(cherry picked from commit 5078e36632c68f4578cf7507ee14d9ada207983f)

9 months agotest-network: add test case for issue #35874
Yu Watanabe [Wed, 5 Feb 2025 00:40:31 +0000 (09:40 +0900)] 
test-network: add test case for issue #35874

(cherry picked from commit a10172b0355f3ff5c301010d81aea1f2fba986e7)

9 months agonetwork/routing-policy-rule: fix compare func
Yu Watanabe [Wed, 5 Feb 2025 00:14:51 +0000 (09:14 +0900)] 
network/routing-policy-rule: fix compare func

Previously, when comparing an existing and requested routing policy
rules, `all` flag was unset, thus the from and to addresses in the two
rules were not compared. Hence, a new request with from and/or to
addresses might be considered as it already exists even the addresses of
existing one were different from the newly requested one.

All existing rules have valid family, i.e. AF_INET or AF_INET6. And,
all requesting rules with from and/or to addresses also have a valid
family. Hence, even `all` flag is unset, the addresses can be and must
be compared in that case.

Fixes a regression caused by fc58350aa464cd2414b6fe9fec089412120c7d52 (v257).
Fixes #35874.

(cherry picked from commit bc45d9c9592d3fcd24894199be1902704f48d62c)

9 months agouserdb: reset errno before getpwent()
Lennart Poettering [Wed, 22 Jan 2025 15:44:12 +0000 (16:44 +0100)] 
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.

(cherry picked from commit 83e3b96d0a3b665b7b7a291500fa354a7760a917)

9 months agouserdbctl: don't expect argument to --fuzzy
Lennart Poettering [Wed, 22 Jan 2025 10:55:24 +0000 (11:55 +0100)] 
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.

(cherry picked from commit 165275fe803d0d001a0991014da928e44ed25941)

9 months agomkosi: Work around regression in opensuse rpm 4.20 release
Daan De Meyer [Fri, 7 Feb 2025 10:37:34 +0000 (11:37 +0100)] 
mkosi: Work around regression in opensuse rpm 4.20 release

The rpm 4.20 release introduces the following downstream
change in /usr/lib/rpm/macros:

```
%buildroot              %{_builddir}/%{NAME}-%{VERSION}-build/BUILDROOT
```

This definition is broken as rpm internally does the following
since 4.20 to calculate the buildroot:

```
char *bn = rpmExpand("%{NAME}-%{VERSION}-build", NULL);
/* Tilde and caret in paths are evil, convert to underscores */
for (char *t = bn; *t; t++) {
    if (*t == '^' || *t == '~')
        *t = '_';
    }
```

This has broken our upstream opensuse CI builds in systemd as
we do the following to fetch the list of unpackaged files by the rpm build:

```
rpmbuild
...
--define "__check_files sh -c '$(rpm --define "_topdir /var/tmp" --eval %__check_files) | tee /tmp/unpackaged-files'"
...
```

which stopped working because the check files script tries
to look for unpackaged files in the "/var/tmp/BUILD/systemd-258~devel-build/BUILDROOT"
directory (%buildroot) whereas it should be looking in "/var/tmp/BUILD/systemd-258_devel-build/BUILDROOT".

Let's remove the %buildroot compat definition until the bug is
addressed in opensuse tumbleweed.

(cherry picked from commit facc03dc973cc9051c2bde16d7084296e862c0e0)

9 months agomkosi: Fix section for BuildSourcesEphemeral=
Daan De Meyer [Fri, 7 Feb 2025 11:04:15 +0000 (12:04 +0100)] 
mkosi: Fix section for BuildSourcesEphemeral=

Followup for f26ded4e31b433d3bb6ee4dc3e02e28f7a1d223f

(cherry picked from commit 398d435f3c14959041cc690d2e71b388c1b94ccd)

9 months agomkosi: Install strace in build image
Daan De Meyer [Fri, 7 Feb 2025 10:36:26 +0000 (11:36 +0100)] 
mkosi: Install strace in build image

Useful to debug regressions in rpm or other package managers.

(cherry picked from commit e421fb46d8621ecf5a6b527772b3f56a72ddf9ff)

9 months agocore/namespace: relabel bind mount source based on the target path
Michal Sekletar [Tue, 21 Jan 2025 14:31:14 +0000 (15:31 +0100)] 
core/namespace: relabel bind mount source based on the target path

Some bind mounts, e.g. /tmp bind mount when PrivateTmp=disconnected,
must be explicitly relabeled because now it would have incorrect SELinux
label. /tmp is expected to have well-known SELinux label, tmp_t. Now it
has label inherited from the source directory of the bind mount.

(cherry picked from commit a128273f7b5e50ce5929ccabda5c2810b7eedd2d)

9 months agomeson: also skip uid/gid check for nobody user/group when id command not found
Yu Watanabe [Fri, 7 Feb 2025 02:36:46 +0000 (11:36 +0900)] 
meson: also skip uid/gid check for nobody user/group when id command not found

Follow-up for 8b413ae4060b21ed4712fdad7eba195890740756.

(cherry picked from commit be4f4c4343f05f2b53deb326c241c6031c36c911)

9 months agomeson: Skip getent when it's not found
Vyacheslav Yurkov [Wed, 5 Feb 2025 07:14:20 +0000 (07:14 +0000)] 
meson: Skip getent when it's not found

(cherry picked from commit 8b413ae4060b21ed4712fdad7eba195890740756)

9 months agomkosi: extend util-linux-script config drop-in to F43
Luca Boccassi [Thu, 6 Feb 2025 14:59:28 +0000 (14:59 +0000)] 
mkosi: extend util-linux-script config drop-in to F43

Fixes packit test

TEST-74-AUX-UTILS.sh[1104]: + script -ec 'networkctl edit --runtime "$NETWORK_NAME"' /dev/null
TEST-74-AUX-UTILS.sh[1154]: .//usr/lib/systemd/tests/testdata/units/TEST-74-AUX-UTILS.networkctl.sh: line 53: script: command not found

(cherry picked from commit 01b45354559b2fc651441b6b0025ae28daddd06e)

9 months agovmspawn: ignore failure from sshd-vsock@ unit
Martin Hundebøll [Thu, 6 Feb 2025 10:33:49 +0000 (11:33 +0100)] 
vmspawn: ignore failure from sshd-vsock@ unit

The "main" sshd@.service unit ignores the return code from per-session
instances, so do the same for the vsock variant.

(cherry picked from commit df8bd4c171bf88feef0302a0d0476e22e5594c82)

9 months agomkosi: Only make build sources ephemeral if NO_BUILD is not enabled
Daan De Meyer [Thu, 6 Feb 2025 13:53:02 +0000 (14:53 +0100)] 
mkosi: Only make build sources ephemeral if NO_BUILD is not enabled

If we're not building distribution packages from source, there's no
need to make the build sources ephemeral so don't enable the setting
if NO_BUILD is enabled.

(cherry picked from commit f26ded4e31b433d3bb6ee4dc3e02e28f7a1d223f)

9 months agodocs: Add an examples for command line access
Andreas Schneider [Wed, 5 Feb 2025 14:38:32 +0000 (15:38 +0100)] 
docs: Add an examples for command line access

It took me almost an hour to read through the source code to construct
this line.

(cherry picked from commit 20634844ddfc55eebbd6696919f043e3272881c2)

9 months agoresolved: fix DNSSEC `missing-key` error
Fabian Möller [Wed, 22 Jan 2025 12:33:12 +0000 (13:33 +0100)] 
resolved: fix DNSSEC `missing-key` error

Skip unsupport/invalid `DS` and `DNSKEY` combinations during verification.

Fixes: #12545
(cherry picked from commit cac3b43eee83829d68ebf7d4786ebc32e62fe813)

9 months agohomectl: fix typo in man page
Matthieu LAURENT [Wed, 5 Feb 2025 16:31:15 +0000 (17:31 +0100)] 
homectl: fix typo in man page

(cherry picked from commit df9c5c1c9c230605734aeace4cd3861ff3d6ee6d)

9 months agohomectl: fix typo in help text
Matthieu LAURENT [Wed, 5 Feb 2025 16:28:37 +0000 (17:28 +0100)] 
homectl: fix typo in help text

(cherry picked from commit e8e778e8abbe119754026929b3c9453404822c70)

9 months agorepart: Don't fail when we're unable to read file attributes
Daan De Meyer [Wed, 5 Feb 2025 11:42:39 +0000 (12:42 +0100)] 
repart: Don't fail when we're unable to read file attributes

We're getting EOVERFLOW when reading file attributes trying to get
mkosi running in a docker container (don't ask). I have a suspicion
this is coming from fuse-overlayfs. Anyway, since the file attributes
stuff is supposed to be purely optional, let's not fail when we can't
read file attributes for whatever reason.

(cherry picked from commit bc1291aa859783673450fc0c66c48a7242a8365b)

9 months agotest: Move external packages section down and reword a little
Daan De Meyer [Tue, 4 Feb 2025 19:46:11 +0000 (20:46 +0100)] 
test: Move external packages section down and reword a little

This is advanced level stuff that regular contributors don't care
about in the slightest, so move it further down. Also reword the
section a little while we're at it.

(cherry picked from commit f017a5521305987fdeadf85b975b8ed44a9950b6)

9 months agotest: Move NO_BUILD instructions to a separate section
Daan De Meyer [Tue, 4 Feb 2025 19:24:17 +0000 (20:24 +0100)] 
test: Move NO_BUILD instructions to a separate section

This isn't relevant for regular development, so let's move it to a
separate section.

(cherry picked from commit 728a88e54998d143287ffe89faaeb9512cdf24e1)

9 months agotest: Drop -Dremote=enabled instructions from readme
Daan De Meyer [Tue, 4 Feb 2025 19:21:36 +0000 (20:21 +0100)] 
test: Drop -Dremote=enabled instructions from readme

The test commands now use mkosi sandbox which always makes sure the
required dependencies for systemd-journal-remote are enabled so no
need to reconfigure meson explicitly anymore.

(cherry picked from commit 284a56ff60bc8ff90c7f0e0614b1c30edd875288)

9 months agomeson: add install tag for systemctl
Vyacheslav Yurkov [Sun, 2 Feb 2025 09:13:38 +0000 (10:13 +0100)] 
meson: add install tag for systemctl

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
(cherry picked from commit b1e5a7aa3f1e552c56d5adbeed6ff67d88d1e103)

9 months agosysupdate: Update example mode to 644 instead of 444
Daan De Meyer [Tue, 4 Feb 2025 10:42:42 +0000 (11:42 +0100)] 
sysupdate: Update example mode to 644 instead of 444

The UKI file has to be writable to be able to do boot counting in
the UEFI firmware which involves renaming the file by writing to
the file metadata which requires the file to be writable in the FAT
filesystem.

Fixes #36170

(cherry picked from commit 0e470e1cc32776f7b57f57640193d6dd0df97a5b)

9 months agoukify/measure: Revert changes to use SizeOfImage from Linux PE binary
Daan De Meyer [Tue, 4 Feb 2025 08:24:26 +0000 (09:24 +0100)] 
ukify/measure: Revert changes to use SizeOfImage from Linux PE binary

With 19812661f1f65ebe777d1626b5abf6475faababc, we make sure at runtime
in the stub itself that SizeOfImage from the Linux EFISTUB PE binary is
taken into account, so there's no need to take this into account in ukify
itself. By reverting the ukify change, we again ensure that Misc_VirtualSize
reflects the actual size of the Linux EFISTUB PE binary in the .linux section
which lots of tooling depends on. It also makes sure we don't measure a bunch
of extra zeroes in the stub which should fix systemd-pcrlock measurements as
well.

This effectively reverts 2188c759f97e40b97ebe3e94e82239f36b525b10 and
0005411352f9bda0d9887c37b9e75a2bce6c1133.

Fixes #35851

(cherry picked from commit 38801c91292fde004bec0974ed5602984701e03b)

9 months agohomectl: Fix empty checks
Daan De Meyer [Mon, 3 Feb 2025 15:17:00 +0000 (16:17 +0100)] 
homectl: Fix empty checks

(cherry picked from commit 4ba3530d67d88c708c36840fbaed9935ae81faa9)

9 months agobuild(deps): bump super-linter/super-linter from 7.1.0 to 7.2.1
dependabot[bot] [Sat, 1 Feb 2025 09:54:18 +0000 (09:54 +0000)] 
build(deps): bump super-linter/super-linter from 7.1.0 to 7.2.1

Bumps [super-linter/super-linter](https://github.com/super-linter/super-linter) from 7.1.0 to 7.2.1.
- [Release notes](https://github.com/super-linter/super-linter/releases)
- [Changelog](https://github.com/super-linter/super-linter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/super-linter/super-linter/compare/b92721f792f381cedc002ecdbb9847a15ece5bb8...85f7611e0f7b53c8573cca84aa0ed4344f6f6a4d)

---
updated-dependencies:
- dependency-name: super-linter/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 6e513fa489b1b0e94fc9d7f35290d5f56dd0f306)

9 months agobuild(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.1
dependabot[bot] [Sat, 1 Feb 2025 09:54:20 +0000 (09:54 +0000)] 
build(deps): bump softprops/action-gh-release from 2.1.0 to 2.2.1

Bumps [softprops/action-gh-release](https://github.com/softprops/action-gh-release) from 2.1.0 to 2.2.1.
- [Release notes](https://github.com/softprops/action-gh-release/releases)
- [Changelog](https://github.com/softprops/action-gh-release/blob/master/CHANGELOG.md)
- [Commits](https://github.com/softprops/action-gh-release/compare/01570a1f39cb168c169c802c3bceb9e93fb10974...c95fe1489396fe8a9eb87c0abf8aa5b2ef267fda)

---
updated-dependencies:
- dependency-name: softprops/action-gh-release
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit 30948201331e3c029c5557de23b57a37901c2eb4)

9 months agobuild(deps): bump coverallsapp/github-action from 2.3.4 to 2.3.6
dependabot[bot] [Sat, 1 Feb 2025 09:54:27 +0000 (09:54 +0000)] 
build(deps): bump coverallsapp/github-action from 2.3.4 to 2.3.6

Bumps [coverallsapp/github-action](https://github.com/coverallsapp/github-action) from 2.3.4 to 2.3.6.
- [Release notes](https://github.com/coverallsapp/github-action/releases)
- [Commits](https://github.com/coverallsapp/github-action/compare/cfd0633edbd2411b532b808ba7a8b5e04f76d2c8...648a8eb78e6d50909eff900e4ec85cab4524a45b)

---
updated-dependencies:
- dependency-name: coverallsapp/github-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit f82660222063c09522440efa3fa8e02c97dab1d5)

9 months agofirstboot: fix crash when hostname question is skipped
Zbigniew Jędrzejewski-Szmek [Thu, 30 Jan 2025 14:25:38 +0000 (15:25 +0100)] 
firstboot: fix crash when hostname question is skipped

(cherry picked from commit b66a4c157e9754528eec16c235265b4ce94d31e8)

9 months agoFix tense in SD_MESSAGE_SHUTDOWN_STR
Andrew Sayers [Wed, 29 Jan 2025 11:03:00 +0000 (11:03 +0000)] 
Fix tense in SD_MESSAGE_SHUTDOWN_STR

This is printed by bus_manager_log_shutdown() in logind-dbus.c,
near the start of the shutdown process.

Clarify that events *will* happen, long after this message is sent.

(cherry picked from commit 6c45c5a57cac1dd0c35a879bf46d4a42e03e74e1)

9 months agope: do not warn about .initrd addons
Luca Boccassi [Thu, 30 Jan 2025 01:51:05 +0000 (01:51 +0000)] 
pe: do not warn about .initrd addons

We now support them, so stop warning about them.

(cherry picked from commit f6928e6b5d59fd6b0dc34d338be1cd427c1d97d5)

9 months agoFix inversion of timesyncd_usec/epoch_usec variables in clock-warp.c
Devilish Spirits [Wed, 29 Jan 2025 20:54:27 +0000 (21:54 +0100)] 
Fix inversion of timesyncd_usec/epoch_usec variables in clock-warp.c

In clock_apply_epoch() function, the /usr/lib/clock-epoch timestamp was set to timesyncd_usec instead of epoch_usec and vice-versa which produced a misleading log message about the clock source systemd used for early clock sanitization. This trivial commit fix the mistake.

(cherry picked from commit 164295eb6dcc0271d7de030809732c23eeccf9f0)