]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
8 months agope-binary: trivial coding style fixlets
Yu Watanabe [Tue, 18 Feb 2025 18:02:32 +0000 (03:02 +0900)] 
pe-binary: trivial coding style fixlets

(cherry picked from commit 2bf5d698d641afb1cec0b9ffb397722622afa8ea)

8 months agogenerator: insert parentheses to make the code clearer
Yu Watanabe [Tue, 18 Feb 2025 17:45:30 +0000 (02:45 +0900)] 
generator: insert parentheses to make the code clearer

Silence CID#1563781.

(cherry picked from commit 3428c4b818fcd303997deb0dbcaf7cea60942bcf)

8 months agoasync: voidify call of fsync()
Yu Watanabe [Tue, 18 Feb 2025 17:34:13 +0000 (02:34 +0900)] 
async: voidify call of fsync()

Fixes CID#1564787.

(cherry picked from commit b0e5cde687dacf885e4000da804ddcd900a83152)

8 months agoTEST-13-NSPAWN.nss-mymachines: Use negative matching switch
Michal Koutný [Tue, 25 Feb 2025 10:36:51 +0000 (11:36 +0100)] 
TEST-13-NSPAWN.nss-mymachines: Use negative matching switch

The test expects _not_ to find the patterns but the run_and_grep would
still print 'FAIL:' message. Use the dedicated -n option that inverts
the semantics cleaner than shell's !.

(cherry picked from commit c4b75966075e01d39556a87caa778eb63d96d6f6)

8 months agotests: remove cache=unsafe from TEST-64-UDEV-STORAGE
Jörg Behrmann [Sun, 2 Mar 2025 14:52:08 +0000 (15:52 +0100)] 
tests: remove cache=unsafe from TEST-64-UDEV-STORAGE

mkosi switch to the newer -blockdev qemu option in systemd/mkosi#3557 [1], but
cache=unsafe is an option only -drive supports.

Since the qemu-system_x86-64 man page [2] says this, cache.writeback=on is the
default and mkosi setting the other two options to the values corresponding to
unsafe, it should be fine to drop the cache=unsafe option.

┌─────────────┬─────────────────┬──────────────┬────────────────┐
│             │ cache.writeback │ cache.direct │ cache.no-flush │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│writeback    │ on              │ off          │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│none         │ on              │ on           │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│writethrough │ off             │ off          │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│directsync   │ off             │ on           │ off            │
├─────────────┼─────────────────┼──────────────┼────────────────┤
│unsafe       │ on              │ off          │ on             │
└─────────────┴─────────────────┴──────────────┴────────────────┘

[1] https://github.com/systemd/mkosi/pull/3557
[2] https://manpages.ubuntu.com/manpages/noble/en/man1/qemu-system-x86_64.1.html

(cherry picked from commit 759fdb3a35f96906de471b2c6c2bc2864dc25564)

8 months agosd-id128: gracefully handle systems where kernel keyring access is blocked
Lennart Poettering [Sun, 2 Mar 2025 06:51:05 +0000 (07:51 +0100)] 
sd-id128: gracefully handle systems where kernel keyring access is blocked

In various scenarios we invoke containers with access to the kernel
keyring blocked. Let's make sure we can handle this properly: when the
invocation ID is stored in in the kernel keyring and we try to read it
and get EPERM we should handle it gracefully, like EOPNOTSUPP.

(cherry picked from commit f2e38b01e052ebd50eaf98763bd9709e880c0a75)

8 months agovmspawn: switch from -drive to -blockdev option
Jörg Behrmann [Sun, 2 Mar 2025 15:07:54 +0000 (16:07 +0100)] 
vmspawn: switch from -drive to -blockdev option

(cherry picked from commit 369655330d57a82b6f346a77798968f135221c99)

8 months agobuild(deps): bump github/codeql-action from 3.27.5 to 3.28.10
dependabot[bot] [Sat, 1 Mar 2025 09:57:32 +0000 (09:57 +0000)] 
build(deps): bump github/codeql-action from 3.27.5 to 3.28.10

Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.27.5 to 3.28.10.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/f09c1c0a94de965c15400f5634aa42fac8fb8f88...b56ba49b26e50535fa1e7f7db0f4f7b4bf65d80d)

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

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

8 months agobuild(deps): bump redhat-plumbers-in-action/differential-shellcheck
dependabot[bot] [Sat, 1 Mar 2025 09:57:22 +0000 (09:57 +0000)] 
build(deps): bump redhat-plumbers-in-action/differential-shellcheck

Bumps [redhat-plumbers-in-action/differential-shellcheck](https://github.com/redhat-plumbers-in-action/differential-shellcheck) from 5.4.0 to 5.5.3.
- [Release notes](https://github.com/redhat-plumbers-in-action/differential-shellcheck/releases)
- [Changelog](https://github.com/redhat-plumbers-in-action/differential-shellcheck/blob/main/docs/CHANGELOG.md)
- [Commits](https://github.com/redhat-plumbers-in-action/differential-shellcheck/compare/cc6721c45a8800cc666de45493545a07a638d121...dd551ce780d8af741f8cd8bab6982667b906b457)

---
updated-dependencies:
- dependency-name: redhat-plumbers-in-action/differential-shellcheck
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

8 months agotmpfiles: fix output value assignment
Yu Watanabe [Fri, 28 Feb 2025 11:25:05 +0000 (20:25 +0900)] 
tmpfiles: fix output value assignment

Fixes a bug in 7eeda1da90c79ba420a6d82c1d9589b23048d79f (v256).

(cherry picked from commit 914d1ec171eb0e27ced472aed2d05eae19b265da)

8 months agorecurse-dir: fix wrong assertion and error code in log
Yu Watanabe [Fri, 28 Feb 2025 11:22:42 +0000 (20:22 +0900)] 
recurse-dir: fix wrong assertion and error code in log

Fixes a bug in b5a07e524e42d2594174ca1a5b72aa4fdb9af94c (v250).

(cherry picked from commit 91421f8379b66316f937d56c60c2e782b7a79eca)

8 months agomachine-id-setup: bhyve also provides a uuid
Dan McGregor [Thu, 27 Feb 2025 22:18:23 +0000 (16:18 -0600)] 
machine-id-setup: bhyve also provides a uuid

When using UEFI with bhyve it behaves similarly to qemu, and provides
a product_uuid. Use it if found, just like with qemu.

(cherry picked from commit 113c159ba9c4e8052ae162e12faba28b102a90d0)

8 months agotest: Do not add integration tests if want_tests == 'false'
Daan De Meyer [Tue, 25 Feb 2025 09:59:20 +0000 (10:59 +0100)] 
test: Do not add integration tests if want_tests == 'false'

(cherry picked from commit 890e1ad3183458aa0337e4e6a1a9afa26d706e36)

8 months agolibfido2-util: accept cached pin in fido2_generate_hmac_hash()
Martin Wilck [Mon, 17 Feb 2025 17:40:35 +0000 (18:40 +0100)] 
libfido2-util: accept cached pin in fido2_generate_hmac_hash()

fido2_generate_hmac_hash() sets req->keyring to "fido2-pin" when
calling ask_password_auto(), suggesting that a key by this name
can be read from the kernel keyring. But the keyring is never
opened because the ASK_PASSWORD_ACCEPT_CACHED flag is not set.

Set ASK_PASSWORD_ACCEPT_CACHED to allow automated / scripted
setup of encrypted volumes with FIDO2. If the PIN turns out to
be invalid, clear ASK_PASSWORD_ACCEPT_CACHED to avoid retrying
and possible lockout.

(cherry picked from commit 505c2f21377019c058de16aa9e2d8db005e97e6f)

8 months agosbsign: Fix wrong variable being passed to log_error_errno()
Daan De Meyer [Wed, 26 Feb 2025 09:32:25 +0000 (10:32 +0100)] 
sbsign: Fix wrong variable being passed to log_error_errno()

(cherry picked from commit ba6a904442bd6b6e0fad9910fb5e69c44bddfa47)

8 months agoexec-invoke: Fix invalid use of error variable
Daan De Meyer [Wed, 26 Feb 2025 21:34:33 +0000 (22:34 +0100)] 
exec-invoke: Fix invalid use of error variable

Follow up for 406f1775017a5631bc91a1f53ac5e50f4fbfac0c

(cherry picked from commit f215835cb88fd18fca68561b8ff1149632939e94)

8 months agoexec-invoke: Fix unshare() error handling
Daan De Meyer [Wed, 26 Feb 2025 21:31:35 +0000 (22:31 +0100)] 
exec-invoke: Fix unshare() error handling

Follow up for cd58b5a13537fc89b669ff9232ba2206214c9fa1

(cherry picked from commit c78b06b1d23b95e4ea5f507a719bded6a2737581)

8 months agomeson: Add missing dbus_programs dependency on update-dbus-docs
Daan De Meyer [Wed, 26 Feb 2025 21:06:41 +0000 (22:06 +0100)] 
meson: Add missing dbus_programs dependency on update-dbus-docs

All dbus programs have to be up-to-date for update-dbus-docs to
produce the expected output, so add the missing dependency.

(cherry picked from commit 461bd9277a69833a534518c263d00443f2f6fbf4)

8 months agocore/service: do not propagate reload for combined RELOADING=1 + READY=1 when notify...
Mike Yuan [Wed, 26 Feb 2025 14:02:58 +0000 (15:02 +0100)] 
core/service: do not propagate reload for combined RELOADING=1 + READY=1 when notify-reload

Follow-up for 3bd28bf721dc70722ff1c675026ed0b44ad968a3

SERVICE_RELOAD_SIGNAL state can only be reached via explicit reload jobs,
and we have a clear distinction between that and plain RELOADING=1
notifications, the latter of which is issued by clients doing reload
outside of our job engine. I.e. upon SERVICE_RELOAD_SIGNAL + RELOADING=1
we don't propagate reload jobs again, since that's done during transaction
construction stage already. The handling of combined RELOADING=1 + READY=1
so far is bogus however, as it tries to propagate duplicate reload jobs.
Amend this by following the logic for standalone RELOADING=1.

(cherry picked from commit c337a1301f2de4105fc8023e45db20238c6a895a)

8 months agodocs: Use mkosi -R instead of mkosi -t none
Daan De Meyer [Wed, 26 Feb 2025 13:58:53 +0000 (14:58 +0100)] 
docs: Use mkosi -R instead of mkosi -t none

mkosi now supports -R to rerun build scripts without rebuilding the
image so let's document that instead of the current hack to prevent
the rebuild by changing the output format.

(cherry picked from commit 031a474c916758f906ed556c7d2ea3e92ff481a6)

8 months agomkosi: Update to latest
Daan De Meyer [Wed, 26 Feb 2025 13:58:39 +0000 (14:58 +0100)] 
mkosi: Update to latest

(cherry picked from commit 6ccb14af882673dd488ec86ef9f9e8421b126300)

8 months agoimport/pull-tar: fix flag set
Antonio Alvarez Feijoo [Wed, 26 Feb 2025 10:14:17 +0000 (11:14 +0100)] 
import/pull-tar: fix flag set

There is a typo passing flags to `install_file()`, if `IMPORT_READ_ONLY` is set,
`IMPORT_SYNC` is never checked.

(cherry picked from commit 5d2d0c055b1ec68d4fc5d4ec85390fc427171ff3)

8 months agotpm2-setup: add missing O_CLOEXEC at two places
Lennart Poettering [Wed, 26 Feb 2025 08:10:16 +0000 (09:10 +0100)] 
tpm2-setup: add missing O_CLOEXEC at two places

(cherry picked from commit f4e5a730002fa7ed714b89775c3e5fae6d003aae)

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)