]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
10 months agomkosi: Run more commands as root
Daan De Meyer [Mon, 20 Jan 2025 12:57:02 +0000 (13:57 +0100)] 
mkosi: Run more commands as root

zypper has some new rather questionable userspace level permission
checking that blows ups completely when operating as root on an
cache directory owned by a non-root user, so let's build the tools
tree and set up meson as root to avoid the issue.

(https://github.com/openSUSE/libzypp/issues/603)

Also drop a leftover debug message from coverage.yml while we're at
it.

(cherry picked from commit cb13d6b44f7952fdfd1fbab99293403a107c75c0)

10 months agomkosi: Don't set -O ^orphan_file in centos stream 9 tools tree
Daan De Meyer [Fri, 17 Jan 2025 15:39:09 +0000 (16:39 +0100)] 
mkosi: Don't set -O ^orphan_file in centos stream 9 tools tree

(cherry picked from commit 26025dba3ec967e4897338c838d21d06240a99c0)

10 months agomkosi: lcov and shellcheck are not in EPEL 10
Daan De Meyer [Fri, 17 Jan 2025 14:35:37 +0000 (15:35 +0100)] 
mkosi: lcov and shellcheck are not in EPEL 10

Let's drop these from CentOS Stream tools trees as they are not in
EPEL 10 yet.

(cherry picked from commit 7a75a6f70f037d3403c5f2c13ecc2b814fc26867)

10 months agomkosi: Use a bigger variety of tools tree distributions
Daan De Meyer [Fri, 17 Jan 2025 12:28:47 +0000 (13:28 +0100)] 
mkosi: Use a bigger variety of tools tree distributions

Let's add more coverage for building with tools trees by building
each image with a tools tree of the same distribution and release.

Because not every tools tree distribution has a newer meson yet, we
only use --max-lines= when meson actually knows the option.

(cherry picked from commit 7645139bd7c7ccd10849c43644286e4877719a45)

10 months agomkosi: Update to latest
Daan De Meyer [Fri, 17 Jan 2025 14:12:46 +0000 (15:12 +0100)] 
mkosi: Update to latest

(cherry picked from commit 685666afd824a28c38ae7ee68c8891b03cb122de)

10 months agomkosi: Don't set ToolsTreeRepositories= for CentOS Stream tools
Daan De Meyer [Fri, 17 Jan 2025 14:29:14 +0000 (15:29 +0100)] 
mkosi: Don't set ToolsTreeRepositories= for CentOS Stream tools

mkosi does this itself so no need to do it in systemd.

(cherry picked from commit 8fa4a292a64c71a05869f495fab77f2d2bd08894)

10 months agosbsign: Make sure output file mode respects umask
Daan De Meyer [Sun, 19 Jan 2025 21:48:21 +0000 (22:48 +0100)] 
sbsign: Make sure output file mode respects umask

(cherry picked from commit 6f594acd632f61fde4b1c33bfcab3954ec304e8a)

10 months agosbsign: Make two debug logs into error logs
Daan De Meyer [Mon, 20 Jan 2025 08:01:37 +0000 (09:01 +0100)] 
sbsign: Make two debug logs into error logs

(cherry picked from commit 7180a3b38ca4c167ab2df12bec02058878f8142c)

10 months agoci: Stop archiving packages
Daan De Meyer [Wed, 15 Jan 2025 11:58:36 +0000 (12:58 +0100)] 
ci: Stop archiving packages

This takes up a lot of storage space and we're almost hitting the
limit so since nobody's actually using these and we just started
doing nightly builds in OBS, let's drop this and point people towards
OBS for nightly packages in the future.

(cherry picked from commit e9b9fc080f0616d08269c7e5946d2f389dff83ec)

10 months agotest: Drop sandbox() from integration test wrapper
Daan De Meyer [Wed, 15 Jan 2025 09:21:33 +0000 (10:21 +0100)] 
test: Drop sandbox() from integration test wrapper

With the latest changes, this is not required anymore as mkosi sandbox
will set up the proper $PATH to make sure the executables from the build
directory are used.

(cherry picked from commit ac75c5192797082c1965ab30be4711490f2937bc)

10 months agomkosi: Update to latest
Daan De Meyer [Wed, 15 Jan 2025 09:21:12 +0000 (10:21 +0100)] 
mkosi: Update to latest

(cherry picked from commit 82d6bcbdea7125d4e8d6acaa60e9847a7ce1464d)

10 months agoman: Clarify systemd-notify and sd_notify() PID documentation
Daan De Meyer [Tue, 14 Jan 2025 15:05:33 +0000 (16:05 +0100)] 
man: Clarify systemd-notify and sd_notify() PID documentation

Let's clarify more explicitly that privileged calls to
systemd-notify --pid= and sd_pid_notify() effectively override any
configured NotifyAccess=main|exec for a service.

(cherry picked from commit bbe9e03f8066d1001497494ee862cf45f986b854)

10 months agomkosi: Install libxslt on CentOS/Fedora instead of xsltproc
Daan De Meyer [Tue, 14 Jan 2025 12:53:26 +0000 (13:53 +0100)] 
mkosi: Install libxslt on CentOS/Fedora instead of xsltproc

Same package, but xsltproc is a very recently introduced Provides
for libxslt, and isn't available on CentOS Stream 9, so let's install
the package directly instead.

(cherry picked from commit 05932f4768bc329f933774eef9a2286f706d3673)

10 months agofmf: Only move logs if corresponding directory exists
Daan De Meyer [Tue, 14 Jan 2025 10:41:17 +0000 (11:41 +0100)] 
fmf: Only move logs if corresponding directory exists

Otherwise find fails with an error.

(cherry picked from commit 3c2fa8e0501f9f39b3b7ca0506a7d548a39af928)

10 months agotest: Only move journal file if we didn't just unlink it
Daan De Meyer [Tue, 14 Jan 2025 08:52:40 +0000 (09:52 +0100)] 
test: Only move journal file if we didn't just unlink it

(cherry picked from commit 1d77ac19cfa1c9b194d7e9805430ab6fd38ba97e)

10 months agotest: Fix bug in integration test wrapper
Daan De Meyer [Mon, 13 Jan 2025 09:33:20 +0000 (10:33 +0100)] 
test: Fix bug in integration test wrapper

(cherry picked from commit 79ac78e3680a425d86c7a90e6846c630c9583b48)

10 months agofmf: Skip TEST-21-DFUZZER
Daan De Meyer [Fri, 10 Jan 2025 14:29:28 +0000 (15:29 +0100)] 
fmf: Skip TEST-21-DFUZZER

Similar to Github Actions, since we don't build with sanitizers in
the packit job, let's skip TEST-21-DFUZZER.

(cherry picked from commit e0c2fd6a3345d26afdf4159406c38cd9101d2e0d)

10 months agofmf: Use different heuristic on beefy systems
Daan De Meyer [Fri, 10 Jan 2025 14:26:54 +0000 (15:26 +0100)] 
fmf: Use different heuristic on beefy systems

If we save journals in /tmp, we can run a larger number of tests in
parallel so let's make use of the larger number of CPUs if the tests
run on a beefy machine.

(cherry picked from commit 53546c71fe0a1b30ee296df84bb8c3577f5675a4)

10 months agofmf: Bump inotify limits to avoid systemd-nspawn failures
Daan De Meyer [Fri, 10 Jan 2025 14:26:37 +0000 (15:26 +0100)] 
fmf: Bump inotify limits to avoid systemd-nspawn failures

(cherry picked from commit c32a8cdaa0f03ae29e9edade1213cc2001b28000)

10 months agotest: Move StateDirectory= directive into dropin
Daan De Meyer [Fri, 10 Jan 2025 13:51:24 +0000 (14:51 +0100)] 
test: Move StateDirectory= directive into dropin

The integration-test-setup calls require StateDirectory= but some
tests override the test unit used which then won't have StateDirectory=
so let's move StateDirectory= into the dropin as well to avoid this
issue.

(cherry picked from commit 1f17ec0ed419627a686ee6e719ac7f55cf082ada)

10 months agotest: Don't register machines with machined unless we're in interactive mode
Daan De Meyer [Fri, 10 Jan 2025 13:29:58 +0000 (14:29 +0100)] 
test: Don't register machines with machined unless we're in interactive mode

(cherry picked from commit 84b30442d257102a9a39122f9a537fa48fb0bfda)

10 months agotest: Add option to save in progress test journals to /tmp
Daan De Meyer [Fri, 10 Jan 2025 13:27:33 +0000 (14:27 +0100)] 
test: Add option to save in progress test journals to /tmp

The journal isn't the best at being fast, especially when writing
to disk and not to memory, which can cause integration tests to
grind to a halt on beefy systems due to all the systemd-journal-remote
instances not being able to write journal entries to disk fast enough.

Let's introduce an option to allow writing in progress test journals
to use /tmp which can be used on beefy systems with lots of memory to
speed things up.

(cherry picked from commit e49fdecd161b3d391e55311652fda3220d851fa1)

10 months agotree-wide: Fix python formatting
Daan De Meyer [Thu, 9 Jan 2025 15:24:22 +0000 (16:24 +0100)] 
tree-wide: Fix python formatting

The new release of ruff formats a few more things which causes linter
failures in CI so let's fix those formatting nits.

(cherry picked from commit 96403d5121d93dd47dbe9dab5b90ff973e664ac3)

10 months agofmf: Log clock source
Daan De Meyer [Thu, 9 Jan 2025 14:24:51 +0000 (15:24 +0100)] 
fmf: Log clock source

(cherry picked from commit 6e761c5a93278fc719a66f7c984af9608b836991)

10 months agofmf: Move meson logs and failed test journals to test artifacts dir
Daan De Meyer [Thu, 9 Jan 2025 14:13:18 +0000 (15:13 +0100)] 
fmf: Move meson logs and failed test journals to test artifacts dir

(cherry picked from commit 0e444c948e7d8ddbdec83116b68af7d876e2d2f6)

10 months agomkosi: Re-enable TEST-21-DFUZZER when running with sanitizers
Daan De Meyer [Tue, 7 Jan 2025 14:01:02 +0000 (15:01 +0100)] 
mkosi: Re-enable TEST-21-DFUZZER when running with sanitizers

Similar to how CentOS CI did it previously, let's only run
TEST-21-DFUZZER when built with sanitizers for maximum effect.

(cherry picked from commit 103e92810a4bd3f01d2a49d85ef9575d60a8d244)

10 months agotest: Only plug in integration-test-setup.sh in interactive mode
Daan De Meyer [Thu, 9 Jan 2025 10:28:15 +0000 (11:28 +0100)] 
test: Only plug in integration-test-setup.sh in interactive mode

If we're not running interactively, there's no point in the features
from integration-test-setup.sh which are intended for interactive
development and debugging so lets skip adding it in that case.

(cherry picked from commit 794d456cf402a35290d6562c21f0ff846511026c)

10 months agotest: Drop set -x from integration-test-setup.sh
Daan De Meyer [Thu, 9 Jan 2025 10:27:51 +0000 (11:27 +0100)] 
test: Drop set -x from integration-test-setup.sh

(cherry picked from commit 90538ede55ac9d40dc513f64f052c687672cae89)

10 months agofmf: Force SELinux relabel when running within testing farm
Daan De Meyer [Wed, 8 Jan 2025 15:03:06 +0000 (16:03 +0100)] 
fmf: Force SELinux relabel when running within testing farm

We expect to run as root within testing farm and to have permissions
to do selinux relabelling so let's enable it explicitly.

(cherry picked from commit e1c883bf32f3922bfc977701062e353c0a0a4ac5)

10 months agoTEST-06-SELINUX: Add knob to allow checking for AVCs
Daan De Meyer [Wed, 8 Jan 2025 12:31:11 +0000 (13:31 +0100)] 
TEST-06-SELINUX: Add knob to allow checking for AVCs

When running the integration tests downstream, it's useful to be
able to test that a new systemd version doesn't introduce any AVC
denials, so let's add a knob to make that possible.

(cherry picked from commit de19520ec979902fd457515d1a795210fdaedf93)

10 months agofmf: Dump CPU and memory information
Daan De Meyer [Wed, 8 Jan 2025 15:41:46 +0000 (16:41 +0100)] 
fmf: Dump CPU and memory information

(cherry picked from commit 44368f84d7ddbec7a50648a65c27cb6a31090a29)

10 months agofmf: Only mess with /etc/yum.repos.d when running within testing farm
Daan De Meyer [Wed, 8 Jan 2025 11:12:15 +0000 (12:12 +0100)] 
fmf: Only mess with /etc/yum.repos.d when running within testing farm

If running tmt locally to debug the test script, make sure we don't
mess with /etc/yum.repos.d.

(cherry picked from commit 8e3347f3bd3d9a01b8f39b0858eab74084ecf20a)

10 months agofmf: Fix glob
Daan De Meyer [Wed, 8 Jan 2025 09:38:21 +0000 (10:38 +0100)] 
fmf: Fix glob

Globs inside quotes aren't expanded and we need the glob to be more
specific to avoid matching multiple entries inside the tmt source
directory.

(cherry picked from commit fc1b08dee2ccf706580fa448e66831d1e853d054)

10 months agofmf: Fix dist-git example
Daan De Meyer [Wed, 8 Jan 2025 09:25:50 +0000 (10:25 +0100)] 
fmf: Fix dist-git example

All that's needed is dist-git-source: true so remove the other settings
that aren't required.

(cherry picked from commit 0a85b3757968a2750286119760244e017c990263)

10 months agofmf: Don't fail if we can't put selinux in permissive mode
Daan De Meyer [Wed, 8 Jan 2025 09:25:05 +0000 (10:25 +0100)] 
fmf: Don't fail if we can't put selinux in permissive mode

The tests might be running unprivileged or in an environment without
selinux so let's not fail if we can't put it in permissive mode.

(cherry picked from commit 0250db0139b159cb9e6c1a87ad91ffdd03e80236)

10 months agomeson: bump version to 257.2 v257.2
Luca Boccassi [Tue, 7 Jan 2025 20:45:53 +0000 (20:45 +0000)] 
meson: bump version to 257.2

10 months agojournalctl: make --invocation and --list-invocations accept unit name without suffix
Yu Watanabe [Wed, 11 Dec 2024 00:05:34 +0000 (09:05 +0900)] 
journalctl: make --invocation and --list-invocations accept unit name without suffix

Fixes #35538.

(cherry picked from commit e8823b5e352711c68ab3282697a6ab1cfb06d25a)

10 months agosystemctl: certainly ignore ENOENT in checking inhibitors
Yu Watanabe [Thu, 2 Jan 2025 12:15:02 +0000 (21:15 +0900)] 
systemctl: certainly ignore ENOENT in checking inhibitors

Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.

Follow-up for 084f361b509cbffe7ffd5ab6085469f76f799fe5 and
a1417e5563acb73a0accdc12b3af91e4ec1c7f46.

Note, ERRNO_IS_NEG_DISCONNECT() includes ENONET rather than ENOENT...
So, ENOENT needs to be handled explicitly.

Fixes #35757 and #35806.

(cherry picked from commit 66f379b63ddac8c72b9130df86a82b68ec42c119)

10 months agosystemctl: also ignore ENOENT in checking inhibitors
Yu Watanabe [Sat, 28 Dec 2024 04:36:32 +0000 (13:36 +0900)] 
systemctl: also ignore ENOENT in checking inhibitors

Fixes a bug caused by 804874d26ac73e0af07c4c5d7165c95372f03f6d.
Follow-up for a1417e5563acb73a0accdc12b3af91e4ec1c7f46.
Fixes #35757.

(cherry picked from commit 084f361b509cbffe7ffd5ab6085469f76f799fe5)

10 months agoobs: also trigger Fedora package builds
Luca Boccassi [Tue, 7 Jan 2025 00:40:02 +0000 (00:40 +0000)] 
obs: also trigger Fedora package builds

The package is logistically separated, as the rpm sources conflict from Fedora
conflict with the rpm sources from SUSE (some files have the same name and
location but different, incompatible content), so Fedora builds can't be
triggered from the same package. The result is the same.

(cherry picked from commit 5c4cb68390a4a3b60d2ca733e283c44fcc205df7)

10 months agoCI: add OBS workflow integration to build packages on push to main
Luca Boccassi [Mon, 6 Jan 2025 10:45:21 +0000 (10:45 +0000)] 
CI: add OBS workflow integration to build packages on push to main

When main is updated, packages for Arch/Debian/Ubuntu/SUSE will be built and published
on OBS:

https://download.opensuse.org/repositories/home:/bluca:/systemd/
https://build.opensuse.org/project/show/home:bluca:systemd
(cherry picked from commit 0b5f9269398d1422bb7ff3f928a4ffe67332ff63)

10 months agoRevert "mkosi: Fix opensuse build"
Daan De Meyer [Tue, 7 Jan 2025 15:25:03 +0000 (16:25 +0100)] 
Revert "mkosi: Fix opensuse build"

The commit that changes the name from README.testsuite to README.md
was never backported (and shouldn't as it would break opensuse's spec)
so revert the corresponding change in the mkosi opensuse build script.

This reverts commit 4162c331dd4fc6657d1f51c90a7a0223e9f4a30d.

10 months agostdio-bridge: fix polled fds
Jacob McNamee [Tue, 7 Jan 2025 11:29:31 +0000 (03:29 -0800)] 
stdio-bridge: fix polled fds

Poll fds associated with the bus instead of hardcoding stdin/stdout.

This is consequential under socket activation, when the provided fd
should be used instead of stdin/stdout.

(cherry picked from commit 9d1c28b2d8422df700e7d94339ac6052a6755c6c)
(cherry picked from commit 59f5a4323468befbdca2bae7907219eaf8852f9a)

10 months agofmf: Check out target branch in packit
Daan De Meyer [Tue, 7 Jan 2025 13:39:53 +0000 (14:39 +0100)] 
fmf: Check out target branch in packit

(cherry picked from commit 3c9ffd2e4b81e6bbc8cb28634432b6c9dccd661e)

10 months agopackit: Simplify configuration
Daan De Meyer [Mon, 6 Jan 2025 12:44:03 +0000 (13:44 +0100)] 
packit: Simplify configuration

(cherry picked from commit 86a6d7cc5a4798e614c50ed02c751e71f74637f9)

10 months agomkosi: Install which in build image
Daan De Meyer [Tue, 7 Jan 2025 11:23:09 +0000 (12:23 +0100)] 
mkosi: Install which in build image

Required by gdb-add-index to find gdb and not declared as a dependency
of the package.

(cherry picked from commit 414fe9629cebf1ca2dc4c38d82ad8872a5483e89)

10 months agohwdb: comment out the entry for Logitech MX Keys for Mac
Yu Watanabe [Fri, 20 Dec 2024 18:13:18 +0000 (03:13 +0900)] 
hwdb: comment out the entry for Logitech MX Keys for Mac

This effectively reverts the commit f70e5620b6ac319beac1d5ce26331bdc48d25daa,
as the entry seems to match multiple models.

Fixes #35691.

(cherry picked from commit 52a2b049476b374dea2efa22d39c5a1944125c47)

10 months agotest: answer 2nd mdadm --create question for compat with new version
Luca Boccassi [Sun, 22 Dec 2024 13:31:36 +0000 (13:31 +0000)] 
test: answer 2nd mdadm --create question for compat with new version

New version of mdadm now asks a second question, so send 'y' twice
to it in the test scripts

[    5.253483] TEST-64-UDEV-STORAGE.sh[684]: + echo y
[    5.254412] TEST-64-UDEV-STORAGE.sh[685]: + mdadm --create /dev/md/mdmirror --name mdmirror --uuid aaaaaaaa:bbbbbbbb:cccccccc:00000001 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm0 /dev/disk/by-id/scsi-0systemd_foobar_deadbeefmdadm1 -v -f --level=1 --raid-devices=2
[    5.254759] TEST-64-UDEV-STORAGE.sh[685]: To optimalize recovery speed, it is recommended to enable write-indent bitmap, do you want to enable it now? [y/N]? mdadm: Note: this array has metadata at the start and
[    5.255085] TEST-64-UDEV-STORAGE.sh[685]:     may not be suitable as a boot device.  If you plan to
[    5.255418] TEST-64-UDEV-STORAGE.sh[685]:     store '/boot' on this device please ensure that
[    5.255745] TEST-64-UDEV-STORAGE.sh[685]:     your boot-loader understands md/v1.x metadata, or use
[    5.256285] TEST-64-UDEV-STORAGE.sh[685]:     --metadata=0.90
[    5.256672] TEST-64-UDEV-STORAGE.sh[685]: mdadm: size set to 64512K
[    5.257063] TEST-64-UDEV-STORAGE.sh[685]: Continue creating array [y/N]? mdadm: create aborted.

This is backward compatible with the older version that asks just one
question

(cherry picked from commit 16406420ea449b75e70a7dced05d7b98bc0f5376)

10 months agocore/unit-serialize: fix serialization of markers
Mike Yuan [Thu, 26 Dec 2024 20:15:44 +0000 (21:15 +0100)] 
core/unit-serialize: fix serialization of markers

Follow-up for ff68472a20c208121b69ea13586f3105a219bc14

(cherry picked from commit 5ce8d7d83902e920a34488c4193d9bc4b5bb70ae)

10 months agocreds: fix use-after-free in varlink interface
Luca Boccassi [Fri, 27 Dec 2024 15:06:39 +0000 (15:06 +0000)] 
creds: fix use-after-free in varlink interface

All other usages of sd_varlink_call* do not free the json return parameter,
and it is owned by the varlink object instead. Do the same here.

TEST-54-CREDS.sh[1074]: ==1074==ERROR: AddressSanitizer: heap-use-after-free on address 0x50c00000095a at pc 0x55cf8cd18a0f bp 0x7ffd7b9d4f10 sp 0x7ffd7b9d4f08
TEST-54-CREDS.sh[1074]: READ of size 2 at 0x50c00000095a thread T0 ((sd-mkdcreds))
TEST-54-CREDS.sh[1074]:     #0 0x55cf8cd18a0e in sd_json_variant_unref /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:887:16
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd4cecb in varlink_clear_current /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:593:22
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cd4975e in varlink_clear /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:614:9
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cd3dc3c in varlink_destroy /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:651:9
TEST-54-CREDS.sh[1074]:     #4 0x55cf8cd3dc3c in sd_varlink_unref /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:657:1
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cb47a82 in sd_varlink_unrefp /usr/src/debug/systemd/src/systemd/sd-varlink.h:279:1
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cb47a82 in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1660:1
TEST-54-CREDS.sh[1074]:     #7 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #9 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #10 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #12 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #13 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #14 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #15 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #16 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #17 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: 0x50c00000095a is located 26 bytes inside of 120-byte region [0x50c000000940,0x50c0000009b8)
TEST-54-CREDS.sh[1074]: freed by thread T0 ((sd-mkdcreds)) here:
TEST-54-CREDS.sh[1074]:     #0 0x7f64b48d57ea in free (/usr/lib/clang/19/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so+0xd57ea) (BuildId: c59bbd28ceb74038a60373d4a8cd4c258bcf0b4e)
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd188ab in sd_json_variant_unref /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:895:25
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cb47a4c in sd_json_variant_unrefp /usr/src/debug/systemd/src/systemd/sd-json.h:98:1
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cb47a4c in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1660:1
TEST-54-CREDS.sh[1074]:     #4 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #7 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #9 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #10 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #12 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #13 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #14 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: previously allocated by thread T0 ((sd-mkdcreds)) here:
TEST-54-CREDS.sh[1074]:     #0 0x7f64b48d5a83 in malloc (/usr/lib/clang/19/lib/x86_64-redhat-linux-gnu/libclang_rt.asan.so+0xd5a83) (BuildId: c59bbd28ceb74038a60373d4a8cd4c258bcf0b4e)
TEST-54-CREDS.sh[1074]:     #1 0x55cf8cd16bb7 in malloc_multiply /usr/src/debug/systemd/src/basic/alloc-util.h:119:16
TEST-54-CREDS.sh[1074]:     #2 0x55cf8cd16bb7 in sd_json_variant_new_object /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:737:13
TEST-54-CREDS.sh[1074]:     #3 0x55cf8cd32e58 in json_parse_internal /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3161:29
TEST-54-CREDS.sh[1074]:     #4 0x55cf8cd37326 in sd_json_parse_with_source /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3408:16
TEST-54-CREDS.sh[1074]:     #5 0x55cf8cd37326 in sd_json_parse /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:3437:16
TEST-54-CREDS.sh[1074]:     #6 0x55cf8cd3f753 in varlink_parse_message /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:962:13
TEST-54-CREDS.sh[1074]:     #7 0x55cf8cd3f753 in sd_varlink_process /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:1466:13
TEST-54-CREDS.sh[1074]:     #8 0x55cf8cd4c0a9 in sd_varlink_call_full /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2160:21
TEST-54-CREDS.sh[1074]:     #9 0x55cf8cd4d617 in sd_varlink_callb_ap /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2237:16
TEST-54-CREDS.sh[1074]:     #10 0x55cf8cd4da3c in sd_varlink_callb /usr/src/debug/systemd/src/libsystemd/sd-varlink/sd-varlink.c:2251:13
TEST-54-CREDS.sh[1074]:     #11 0x55cf8cb47686 in ipc_decrypt_credential /usr/src/debug/systemd/src/shared/creds-util.c:1623:13
TEST-54-CREDS.sh[1074]:     #12 0x55cf8caca99a in maybe_decrypt_and_write_credential /usr/src/debug/systemd/src/core/exec-credential.c:486:29
TEST-54-CREDS.sh[1074]:     #13 0x55cf8cac790b in load_credential /usr/src/debug/systemd/src/core/exec-credential.c:713:16
TEST-54-CREDS.sh[1074]:     #14 0x55cf8cac5403 in acquire_credentials /usr/src/debug/systemd/src/core/exec-credential.c:819:29
TEST-54-CREDS.sh[1074]:     #15 0x55cf8cac5403 in setup_credentials_internal /usr/src/debug/systemd/src/core/exec-credential.c:1023:13
TEST-54-CREDS.sh[1074]:     #16 0x55cf8cac42d4 in exec_setup_credentials /usr/src/debug/systemd/src/core/exec-credential.c:1168:21
TEST-54-CREDS.sh[1074]:     #17 0x55cf8ca59569 in exec_invoke /usr/src/debug/systemd/src/core/exec-invoke.c:4866:13
TEST-54-CREDS.sh[1074]:     #18 0x55cf8ca428d8 in run /usr/src/debug/systemd/src/core/executor.c:244:13
TEST-54-CREDS.sh[1074]:     #19 0x55cf8ca428d8 in main /usr/src/debug/systemd/src/core/executor.c:275:13
TEST-54-CREDS.sh[1074]:     #20 0x7f64b40110c7 in __libc_start_call_main (/lib64/libc.so.6+0x40c7) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #21 0x7f64b401118a in __libc_start_main@GLIBC_2.2.5 (/lib64/libc.so.6+0x418a) (BuildId: 159846287d47eef88f2a478f59803f6e8fc81d05)
TEST-54-CREDS.sh[1074]:     #22 0x55cf8ca41cb4  (/usr/lib/systemd/systemd-executor+0x124cb4) (BuildId: 24f2b1608c3aaee3226cdd14fa2b6e6741156222)
TEST-54-CREDS.sh[1074]: SUMMARY: AddressSanitizer: heap-use-after-free /usr/src/debug/systemd/src/libsystemd/sd-json/sd-json.c:887:16 in sd_json_variant_unref
TEST-54-CREDS.sh[1074]: Shadow bytes around the buggy address:
TEST-54-CREDS.sh[1074]:   0x50c000000680: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000700: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd
TEST-54-CREDS.sh[1074]:   0x50c000000780: fa fa fa fa fa fa fa fa 00 00 00 00 00 00 00 00
TEST-54-CREDS.sh[1074]:   0x50c000000800: 00 00 00 00 00 00 00 00 fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000880: fd fd fd fd fd fd fd fd fd fd fd fd fd fd fd fa
TEST-54-CREDS.sh[1074]: =>0x50c000000900: fa fa fa fa fa fa fa fa fd fd fd[fd]fd fd fd fd
TEST-54-CREDS.sh[1074]:   0x50c000000980: fd fd fd fd fd fd fd fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000a00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000a80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000b00: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]:   0x50c000000b80: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
TEST-54-CREDS.sh[1074]: Shadow byte legend (one shadow byte represents 8 application bytes):
TEST-54-CREDS.sh[1074]:   Addressable:           00
TEST-54-CREDS.sh[1074]:   Partially addressable: 01 02 03 04 05 06 07
TEST-54-CREDS.sh[1074]:   Heap left redzone:       fa
TEST-54-CREDS.sh[1074]:   Freed heap region:       fd
TEST-54-CREDS.sh[1074]:   Stack left redzone:      f1
TEST-54-CREDS.sh[1074]:   Stack mid redzone:       f2
TEST-54-CREDS.sh[1074]:   Stack right redzone:     f3
TEST-54-CREDS.sh[1074]:   Stack after return:      f5
TEST-54-CREDS.sh[1074]:   Stack use after scope:   f8
TEST-54-CREDS.sh[1074]:   Global redzone:          f9
TEST-54-CREDS.sh[1074]:   Global init order:       f6
TEST-54-CREDS.sh[1074]:   Poisoned by user:        f7
TEST-54-CREDS.sh[1074]:   Container overflow:      fc
TEST-54-CREDS.sh[1074]:   Array cookie:            ac
TEST-54-CREDS.sh[1074]:   Intra object redzone:    bb
TEST-54-CREDS.sh[1074]:   ASan internal:           fe
TEST-54-CREDS.sh[1074]:   Left alloca redzone:     ca
TEST-54-CREDS.sh[1074]:   Right alloca redzone:    cb

Follow-up for 2c3cbc5c018e05b3a3e5ec6c6a2da6f3c6c3fb09

(cherry picked from commit 842a674d4f7fb69af28e67f447c1250383e50f41)

10 months agomachine: GC machine when no leader PID is set
Yu Watanabe [Sat, 28 Dec 2024 02:38:24 +0000 (11:38 +0900)] 
machine: GC machine when no leader PID is set

After d8854ff1aca4434db0d7d6dcaf9fcf2f38105fb4, if a serialized
leader PID of a machine is already dead when deserialized, then the
leader PID and PIDFD are unset for the machine, and subsequent
machine_start() -> machine_watch_pidfd() will trigger an assertion.
This makes a Machine object without leader PID GCed.

Fixes a bug introduced by the combination of
d8854ff1aca4434db0d7d6dcaf9fcf2f38105fb4 (v255) and
1762c2c045d3a78d3cad54c6b1e5ee9624b32b00 (v257).

Fixes #35602.

(cherry picked from commit 51a0a3b0494d01c1622f6d0c3e2c31e01c18612f)

10 months agolocale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged
Yu Watanabe [Sat, 28 Dec 2024 06:07:31 +0000 (15:07 +0900)] 
locale-setup: do not load locale from environemnt when /etc/locale.conf is unchanged

Previously, when /etc/locale.conf is unchanged, locales were loaded from
possibly outdated environment variable.

Fixes a bug introduced by 018befcff6b51f8a50ca232e1984d34526037241 (v253).
Fixes #35717.

(cherry picked from commit 80797bbb919b3ccde4e51b349f3ca70c1157053e)

10 months agoshared/hibernate-util: handle the case where no swap has available backing dev
Mike Yuan [Thu, 2 Jan 2025 03:17:47 +0000 (04:17 +0100)] 
shared/hibernate-util: handle the case where no swap has available backing dev

This also makes find_suitable_hibernation_device() report
more accurate error (ENOSPC -> ESTALE) if there's
no swap space on the system at all but resume= is set.

Fixes #35798
Replaces #35801

(cherry picked from commit bd3d361580715c7a6204c74df9185cc81d67f0c2)

10 months agoshared/hibernate-util: don't attempt to fiemap fd if no backing dev available
Mike Yuan [Thu, 2 Jan 2025 03:13:23 +0000 (04:13 +0100)] 
shared/hibernate-util: don't attempt to fiemap fd if no backing dev available

Prompted by #35798

Co-authored-by: Yu Watanabe <watanabe.yu+github@gmail.com>
(cherry picked from commit 6d3b2273b1e14d79548a018674ad6e5a5b8b8009)

10 months agoresolved: stop mdns/lnrr when config changes to disabled on reload
Luca Boccassi [Thu, 2 Jan 2025 17:30:21 +0000 (17:30 +0000)] 
resolved: stop mdns/lnrr when config changes to disabled on reload

Currently on reload mdns/lnrr are enabled if they were disabled,
but not viceversa. Fix it.

Follow-up for 14a52176798bc2d013297b503ac6fa49a64e2725

(cherry picked from commit 2976730a4d34749bfb7a88da341464f1834ab1c6)

10 months agosd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subs...
Yu Watanabe [Sat, 4 Jan 2025 18:52:05 +0000 (03:52 +0900)] 
sd-device: fix validation for devices under /sys/firmware/ in sd_device_new_from_subsystem_sysname()

Devices under /sys/firmware/ do not have subsystems. Hence, the
validation in sd_device_new_from_subsystem_sysname() ->
device_new_from_path_join() always failed.

Fixes a bug introduced by cd7c71154cd62d3f50c07ce387edd9c20aebd7bc (v257).
Fixes #35861.

(cherry picked from commit 3328d1e1816f408e6516c35991a89a8d21fd60b4)

10 months agosd-device: add missing debugging log
Yu Watanabe [Sat, 4 Jan 2025 18:09:29 +0000 (03:09 +0900)] 
sd-device: add missing debugging log

It was unexpectedly dropped by 660087dc9c4a5c610da99e7b6b1772e371eb0a80.

(cherry picked from commit 7e5238625ed4a879c2fe8ff7e457021d174bf083)

10 months agorepart: Use streq_ptr()
Daan De Meyer [Mon, 6 Jan 2025 22:02:30 +0000 (23:02 +0100)] 
repart: Use streq_ptr()

p->format is not guaranteed to be initialized.

(cherry picked from commit ffcdaec632d8b96b63499054ff3492b03b33e233)

10 months agocore: fix assert when AddDependencyUnitFiles is called with invalid parameter
Luca Boccassi [Mon, 6 Jan 2025 18:16:29 +0000 (18:16 +0000)] 
core: fix assert when AddDependencyUnitFiles is called with invalid parameter

unit_file_add_dependency() asserts, so check before calling it that the
type is expected, or return EINVAL to the caller.

root@localhost:~# busctl call org.freedesktop.systemd1 /org/freedesktop/systemd1 org.freedesktop.systemd1.Manager AddDependencyUnitFiles "asssbb" 0 uwhatm8 After 1 1

Broadcast message from systemd-journald@localhost (Mon 2025-01-06 18:12:14 UTC):

systemd[1]: Caught <ABRT>, from our own process.

Fixes https://github.com/systemd/systemd/issues/35882

(cherry picked from commit d87dc74e8f1a30d72a0f202e411400bab34ab55a)

10 months agofmf: Support being used downstream in dist-git tests
Daan De Meyer [Mon, 6 Jan 2025 15:30:23 +0000 (16:30 +0100)] 
fmf: Support being used downstream in dist-git tests

We can use our upstream fmf definitions to run downstream tests in
the Fedora systemd dist-git repository
(https://src.fedoraproject.org/rpms/systemd). To have access to the
dist-git sources when running the tests, we enable dist-git-source: true
downstream which makes the sources available in $TMT_SOURCE_DIR so
let's make sure we use those sources if they're available.

(cherry picked from commit 0eb7e29dfb388f746797675cef1ebd7bc3568b6e)

10 months agofmf: Insist on mkosi sha being available
Daan De Meyer [Mon, 6 Jan 2025 15:28:39 +0000 (16:28 +0100)] 
fmf: Insist on mkosi sha being available

Let's assume the workflow file containing the mkosi always being
available.

Also fix the detection while we're at it by not leaving the systemd
directory.

(cherry picked from commit 9e76e9c9dc211440e79a7e27600593169597cc41)

10 months agoci: Rename qemu variable to vm
Daan De Meyer [Mon, 6 Jan 2025 11:08:33 +0000 (12:08 +0100)] 
ci: Rename qemu variable to vm

(cherry picked from commit c5981510e9744b9646088717aeef1ea71f74b1a6)

10 months agomkosi: Migrate more deprecated options
Daan De Meyer [Mon, 6 Jan 2025 11:07:53 +0000 (12:07 +0100)] 
mkosi: Migrate more deprecated options

(cherry picked from commit 28baef47a3098bd82b27c0a629df6c5f885693e7)

10 months agomkosi: replace deprecated settings and command with new ones
Yu Watanabe [Mon, 6 Jan 2025 07:30:26 +0000 (16:30 +0900)] 
mkosi: replace deprecated settings and command with new ones

Follow-up for c008b703701e676a88e16de4c867b9fc4818070d.

These settings and command were deprecated by the following commit.
https://github.com/systemd/mkosi/commit/ebcd2efa03af5c04de91434634f2e4a956f7e53c

(cherry picked from commit d5cdcba928823faf5ddcca267e3866ab5d5fc729)

10 months agopackit: Move fmf metadata into upstream
Daan De Meyer [Fri, 20 Dec 2024 14:34:13 +0000 (15:34 +0100)] 
packit: Move fmf metadata into upstream

This moves https://src.fedoraproject.org/tests/systemd into upstream
so it's one less moving piece that we need to remember. While we're at
it, do various cleanups as well:

- Remove non-packit logic
- Set NO_BUILD in mkosi.local.conf as it's not picked up from the
  process environment
- Don't set unused environment variables
- Remove workdir logic as we run in an ephemeral VM already
- Drop --verbose from meson test to reduce noise
  from passed tests
- Use mkosi sandbox and drop duplicated deps from metadata file
- Stop running the unit tests as they already run as part of the rpm
  build and as part of the integration tests.
- Various style fixes

(cherry picked from commit b0b88f18b3237704d1f6d5b3dcb533367816ce23)

10 months agomkosi: Make path exclude more generic
Daan De Meyer [Sun, 5 Jan 2025 22:19:44 +0000 (23:19 +0100)] 
mkosi: Make path exclude more generic

The systemd rpms we try to install in packit have /usr/bin/bash and
/usr/bin/python3 as dependencies which breaks dnf5 because mkosi
doesn't download filelists metadata and
https://bugzilla.redhat.com/show_bug.cgi?id=2263771 is still not fixed
almost a year after being reported.

(cherry picked from commit 8a9b989cba75810406b0c881bcabe03c27fa47e5)

10 months agomkosi: Update to latest
Daan De Meyer [Fri, 3 Jan 2025 22:25:23 +0000 (23:25 +0100)] 
mkosi: Update to latest

(cherry picked from commit c008b703701e676a88e16de4c867b9fc4818070d)

10 months agomkosi: Warn on unpackaged files in the debian package build
Daan De Meyer [Fri, 3 Jan 2025 10:42:47 +0000 (11:42 +0100)] 
mkosi: Warn on unpackaged files in the debian package build

(cherry picked from commit e965430f57834d641b0b1327617622c20aa23b70)

10 months agomkosi: Handle directories in debian/not-installed correctly
Daan De Meyer [Fri, 3 Jan 2025 09:20:45 +0000 (10:20 +0100)] 
mkosi: Handle directories in debian/not-installed correctly

If a directory is specified without a glob pattern, we have to exclude
all files in that directory, so add a recursive glob to every directory
and enable the bash globstar feature when globbing to '**/*' matches all
files and directories beneath the given directory.

(cherry picked from commit d304b95beb76fd62ea249357df526fb211426edc)

10 months agomkosi: Add docbook tools
Daan De Meyer [Thu, 2 Jan 2025 14:48:54 +0000 (15:48 +0100)] 
mkosi: Add docbook tools

(cherry picked from commit fd3ee47d8d1cac09acf034cdbe53071ee6fdde74)

10 months agotest: update README's Ubuntu CI section for mkosi changes
Luca Boccassi [Thu, 2 Jan 2025 16:21:42 +0000 (16:21 +0000)] 
test: update README's Ubuntu CI section for mkosi changes

(cherry picked from commit 01829580471eb1958bc5c43caa871b243edb1055)

10 months agodocs: Use mkosi sandbox in test documentation as well
Daan De Meyer [Thu, 2 Jan 2025 15:17:53 +0000 (16:17 +0100)] 
docs: Use mkosi sandbox in test documentation as well

Same change as in HACKING.md, but for running the integration tests.

(cherry picked from commit 8a652636503ee99dd484e2ae051cc1f1bdfc18ab)

10 months agomkosi: Allow disabling vcs-tag via environment variable
Daan De Meyer [Thu, 2 Jan 2025 12:11:48 +0000 (13:11 +0100)] 
mkosi: Allow disabling vcs-tag via environment variable

(cherry picked from commit 76d80cc34331b0cefd354ea9de70e9bbb46550a0)

10 months agomkosi: switch to github mirror of openSUSE sources from build.opensuse.org
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 16:39:16 +0000 (17:39 +0100)] 
mkosi: switch to github mirror of openSUSE sources from build.opensuse.org

The current src.opensuse.org is very unstable and commit hashes are reset (or
even removed) every now and then. While the official repo is not fixed, let's
move to a more stable source, the github mirror of code.opensuse.org, maintained
since 2019.

(cherry picked from commit 07638ce2a46c99300e21d7b54e9404fdce488d53)

10 months agomkosi: add libopenssl devel package to openSUSE tools tree
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 16:38:36 +0000 (17:38 +0100)] 
mkosi: add libopenssl devel package to openSUSE tools tree

Otherwise, the build fails with:

```
INFO: autodetecting backend as ninja
INFO: calculating backend command to run: /usr/bin/ninja -C /mnt/work/src/systemd/upstream-fork/main/build-mkosi
ninja: Entering directory `/mnt/work/src/systemd/upstream-fork/main/build-mkosi'
[463/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
FAILED: src/shared/libsystemd-shared-258.a.p/openssl-util.c.o
cc -Isrc/shared/libsystemd-shared-258.a.p -Isrc/shared -I../src/shared -Isrc/basic -I../src/basic -Isrc/fundamental -I../src/fundamental -Isrc/systemd -I../src/systemd -I. -I.. -I../src/libsystemd/sd-bus -I../src/libsystemd/sd-device -I../src/libsystemd/sd-event -I../src/libsystemd/sd-hwdb -I../src/libsystemd/sd-id128 -I../src/libsystemd/sd-journal -I../src/libsystemd/sd-json -I../src/libsystemd/sd-netlink -I../src/libsystemd/sd-network -I../src/libsystemd/sd-path -I../src/libsystemd/sd-resolve -I../src/libsystemd/sd-varlink -I/usr/include/blkid -I/usr/include/libmount -I/usr/include/p11-kit-1 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -Wno-missing-field-initializers -Wno-unused-parameter -Wno-nonnull-compare -Warray-bounds -Warray-bounds=2 -Wdate-time -Wendif-labels -Werror=format=2 -Werror=format-signedness -Werror=implicit-function-declaration -Werror=implicit-int -Werror=incompatible-pointer-types -Werror=int-conversion -Werror=missing-declarations -Werror=missing-prototypes -Werror=overflow -Werror=override-init -Werror=return-type -Werror=shift-count-overflow -Werror=shift-overflow=2 -Werror=strict-flex-arrays -Werror=undef -Wfloat-equal -Wimplicit-fallthrough=5 -Winit-self -Wlogical-op -Wmissing-include-dirs -Wmissing-noreturn -Wnested-externs -Wold-style-definition -Wpointer-arith -Wredundant-decls -Wshadow -Wstrict-aliasing=2 -Wstrict-prototypes -Wsuggest-attribute=noreturn -Wunused-function -Wwrite-strings -Wzero-length-bounds -fdiagnostics-show-option -fno-common -fstack-protector -fstack-protector-strong -fstrict-flex-arrays=3 --param=ssp-buffer-size=4 -Wno-unused-result -Werror=shadow -fPIC -fno-strict-aliasing -fstrict-flex-arrays=1 -fvisibility=hidden -fno-omit-frame-pointer -include config.h -pthread -fvisibility=default -MD -MQ src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -MF src/shared/libsystemd-shared-258.a.p/openssl-util.c.o.d -o src/shared/libsystemd-shared-258.a.p/openssl-util.c.o -c ../src/shared/openssl-util.c
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_read’:
../src/shared/openssl-util.c:1395:65: error: implicit declaration of function ‘UI_method_get_ex_data’; did you mean ‘UI_method_get_reader’? [-Wimplicit-function-declaration]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                                                 ^~~~~~~~~~~~~~~~~~~~~
      |                                                                 UI_method_get_reader
../src/shared/openssl-util.c:1395:65: warning: nested extern declaration of ‘UI_method_get_ex_data’ [-Wnested-externs]
../src/shared/openssl-util.c:1395:43: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
 1395 |                 AskPasswordRequest *req = (AskPasswordRequest*) UI_method_get_ex_data(UI_get_method(ui), 0);
      |                                           ^
../src/shared/openssl-util.c: In function ‘openssl_ask_password_ui_new’:
../src/shared/openssl-util.c:1479:13: error: implicit declaration of function ‘UI_method_set_ex_data’; did you mean ‘UI_method_set_reader’? [-Wimplicit-function-declaration]
 1479 |         if (UI_method_set_ex_data(ui->method, 0, &ui->request) == 0)
      |             ^~~~~~~~~~~~~~~~~~~~~
      |             UI_method_set_reader
../src/shared/openssl-util.c:1479:13: warning: nested extern declaration of ‘UI_method_set_ex_data’ [-Wnested-externs]
[480/2561] Compiling C object src/shared/libsystemd-shared-258.a.p/pkcs11-util.c.o
ninja: build stopped: subcommand failed.
```

(cherry picked from commit 8a6ad7c8376b5dab1d3502a39cead9c63152293d)

10 months agomkosi: update openSUSE commit reference
Antonio Alvarez Feijoo [Mon, 30 Dec 2024 10:00:07 +0000 (11:00 +0100)] 
mkosi: update openSUSE commit reference

Force-pushed as usual, now HEAD is v257.1.

(cherry picked from commit 37c2be73e7238a99bc114f85c7af5c4702f15046)

10 months agomkosi: update opensuse spec repo commit
Luca Boccassi [Thu, 26 Dec 2024 12:08:34 +0000 (12:08 +0000)] 
mkosi: update opensuse spec repo commit

(cherry picked from commit 4db0252c7fd53dc5388db458ad93ce7ef433e704)

10 months agodocs: Explicitly mention ~/.local/bin in section on installing mkosi
Daan De Meyer [Mon, 23 Dec 2024 20:30:32 +0000 (21:30 +0100)] 
docs: Explicitly mention ~/.local/bin in section on installing mkosi

(cherry picked from commit 54b4ec887066b12fe97ac28d7ed5108a23f262de)

10 months agodocs: Use meson compile instead of ninja
Daan De Meyer [Tue, 24 Dec 2024 08:53:53 +0000 (09:53 +0100)] 
docs: Use meson compile instead of ninja

"ninja -C build mkosi" doesn't actually work and fails because ninja
thinks the mkosi target does not exist. "meson compile -C build mkosi"
dpes work so let's use that instead.

Fixes #35741

(cherry picked from commit ece81f339ff41113876bf7a9a2c1ad317c2eb258)

10 months agomkosi: Fix authselect systemd-homed feature name
Daan De Meyer [Sat, 21 Dec 2024 18:10:42 +0000 (19:10 +0100)] 
mkosi: Fix authselect systemd-homed feature name

The feature name is with-systemd-homed, not with-homed.

(cherry picked from commit 5495b11360d649dc8810d59b096231ba596e9436)

10 months agodocs: Simplify hacking documentation
Daan De Meyer [Thu, 19 Dec 2024 10:45:01 +0000 (11:45 +0100)] 
docs: Simplify hacking documentation

Let's use "mkosi sandbox" in the docs so that users can build systemd
without having to install anything except mkosi. Using mkosi sandbox
will use tools and dependencies from the tools tree which is also used
in CI and thus has a higher chance of working from the first try compared
to whatever tools might be installed on the host system of a new contributor.

(cherry picked from commit 34b5a27b0bfd1b0b35bf67c70d1f8bf5c6795b7d)

10 months agomkosi.clangd: Fail on command errors
Daan De Meyer [Thu, 19 Dec 2024 14:05:51 +0000 (15:05 +0100)] 
mkosi.clangd: Fail on command errors

(cherry picked from commit ba3f148307e551d1be3e92383c8d37a9cc5b7a95)

10 months agomkosi.clangd: Don't pass --host if we're not using flatpak-spawn
Daan De Meyer [Thu, 19 Dec 2024 14:05:33 +0000 (15:05 +0100)] 
mkosi.clangd: Don't pass --host if we're not using flatpak-spawn

(cherry picked from commit b133f57544cb6cce244bb8566fbacc952db76d73)

10 months agomkosi: Use build/ as extra search path by default
Daan De Meyer [Thu, 19 Dec 2024 10:43:01 +0000 (11:43 +0100)] 
mkosi: Use build/ as extra search path by default

Building systemd with mkosi generally requires a very recent version
of systemd which might not be installed on the host. Let's configure
mkosi to look for extra executables in the build/ directory by default
so that we prefer systemd executables from the build directory over those
on the host as those on the host are likely to be too old.

(cherry picked from commit 8c5b4df5435ff9e49421ef8db0ca6de06c856b04)

10 months agomkosi: Use tools tree by default
Daan De Meyer [Thu, 19 Dec 2024 10:41:40 +0000 (11:41 +0100)] 
mkosi: Use tools tree by default

Let's enable usage of a tools tree by default to simplify the setup
for new contributors and save them from having to install or upgrade
a bunch of extra tools to get mkosi working as expected.

(cherry picked from commit 1995084a9e01b53cf012a54fe69e35016c235151)

10 months agomkosi: Enable EPEL for CentOS Stream tools tree
Daan De Meyer [Thu, 19 Dec 2024 15:49:59 +0000 (16:49 +0100)] 
mkosi: Enable EPEL for CentOS Stream tools tree

We need packages from EPEL to be able to build CentOS Stream images
with a CentOS Stream tools tree so enable it. This is broken on CentOS
Stream 10 but given using a CentOS Stream tools tree is broken without
EPEL as well, we might as well enable it and just wait until the packages
are added to EPEL 10.

(cherry picked from commit ac1a711d9a237eea36b053d43c0c35af7ac40b1f)

10 months agomkosi: Add libz1 to opensuse tools tree
Daan De Meyer [Thu, 19 Dec 2024 13:43:48 +0000 (14:43 +0100)] 
mkosi: Add libz1 to opensuse tools tree

Without meson fails to configure properly.

(cherry picked from commit d4dda34854c3bcb44ab5929ad32d0793e4debb9f)

10 months agomkosi: Add gdb to tools tree
Daan De Meyer [Thu, 19 Dec 2024 10:32:51 +0000 (11:32 +0100)] 
mkosi: Add gdb to tools tree

(cherry picked from commit 7337f4b1972a099714d596a5d0e7e26f7f2dab48)

10 months agomkosi: Update to latest
Daan De Meyer [Thu, 19 Dec 2024 12:54:13 +0000 (13:54 +0100)] 
mkosi: Update to latest

(cherry picked from commit 1dd345b00d3c0e29abd661094f1cc58173a266e0)

10 months agomkosi: move config options
Matteo Croce [Thu, 19 Dec 2024 18:51:42 +0000 (19:51 +0100)] 
mkosi: move config options

Move some config option in the right section, fixes the following warning:
```
mkosi.conf: Setting Credentials should be configured in [Runtime], not [Host].
mkosi.conf: Setting RuntimeBuildSources should be configured in [Runtime], not [Host].
mkosi.conf: Setting RuntimeScratch should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuSmp should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuSwtpm should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuVsock should be configured in [Runtime], not [Host].
mkosi.conf: Setting QemuKvm should be configured in [Runtime], not [Host].
```

(cherry picked from commit 77d4a263c14ffbb6133382bc18319b6a54a8eaae)

11 months agov257 batch up to b5ea69f5acc4ae0e8d31b236072f75b233dae6e8 (#35682) v257.1
Adrian Vovk [Thu, 19 Dec 2024 21:25:48 +0000 (22:25 +0100)] 
v257 batch up to b5ea69f5acc4ae0e8d31b236072f75b233dae6e8 (#35682)

This includes a revert of
https://github.com/systemd/systemd/commit/2736295ddb78a457796f24805e7b98c3f5304848
as that was identified as the first commit that introduced the boot
regression https://github.com/systemd/systemd/issues/35499

11 months agoRevert "terminal-util: unify code that resets /dev/console in common helper" 35682/head
Luca Boccassi [Thu, 19 Dec 2024 12:26:36 +0000 (12:26 +0000)] 
Revert "terminal-util: unify code that resets /dev/console in common helper"

This reverts commit 2736295ddb78a457796f24805e7b98c3f5304848.

11 months agosemaphore: switch debian/ubuntu to ci/v257-stable branch
Luca Boccassi [Thu, 19 Dec 2024 11:46:50 +0000 (11:46 +0000)] 
semaphore: switch debian/ubuntu to ci/v257-stable branch

Packaging has diverged from main due to new files

11 months agomkosi: switch debian/ubuntu to ci/v257-stable branch
Luca Boccassi [Thu, 19 Dec 2024 11:45:43 +0000 (11:45 +0000)] 
mkosi: switch debian/ubuntu to ci/v257-stable branch

Packaging has diverged from main due to new files

11 months agoukify: Fix regression in --no-sign-kernel flag
Thomas Hebb [Wed, 18 Dec 2024 16:08:17 +0000 (11:08 -0500)] 
ukify: Fix regression in --no-sign-kernel flag

The man page says that --sign-kernel and --no-sign-kernel "override the
detection of whether to sign the Linux binary", so we should only
autodetect if neither are specified. But as of commit 02eabaffe98c
("ukify: Add a unified interface for signing tools"), we autodetect even
when --no-sign-kernel is passed, which makes the flag useless.

The sign_kernel option is parsed using argparse.BooleanOptionalAction,
which sets it to either True, False, or None. commit 02eabaffe98c
replaced `sign_kernel is None` with `not sign_kernel`. These are not the
same in Python, as the latter accepts False as well as None.

Restore the original check and fix type annotations accordingly.

Fixes: 02eabaffe98c ("ukify: Add a unified interface for signing tools")
(cherry picked from commit 32c3e1379dce563a7e686c99045549ac74cce142)

11 months agoman: Document generator sandbox environment
Daan De Meyer [Wed, 18 Dec 2024 11:32:59 +0000 (12:32 +0100)] 
man: Document generator sandbox environment

(cherry picked from commit a48803fd8464e56747f0e145af61bd746351c7d6)

11 months agoresolved: if one transaction completes, expect other transactions within candidate...
Morten Hauke Solvang [Thu, 12 Dec 2024 13:26:31 +0000 (14:26 +0100)] 
resolved: if one transaction completes, expect other transactions within candidate to succeed quickly

Fixes #22575, as suggested by poettering in #35514.

Intended as a workaround for some buggy routers, which refuse to send empty
replies. If systemd-resolved starts two DnsTransactions, one for A and one
for AAAA, and the domain in question has no AAAA entry, then the server will
send a reply for A and no reply for AAAA. Correct behavior for the server would
be to send an empty reply for AAAA.

systemd-resolved would previously keep retrying the AAAA transaction, and
eventually timeout the whole query, returning an error to the caller.

Now, if the server replies to one query and not another, we cut short the
timeout and return the partial result. Returning the partial result allows
the rest of the system to keep working. It matches how e.g. glibc libnss_dns
behaves.

(cherry picked from commit 0da73fab56506ff1e4f8e59c167d27961f0fbf33)

11 months agotpm2-util: Also retry unsealing after policy_pcr returns PCR_CHANGED
Fabian Vogt [Mon, 16 Dec 2024 18:08:13 +0000 (19:08 +0100)] 
tpm2-util: Also retry unsealing after policy_pcr returns PCR_CHANGED

It's not just Esys_Unseal that may fail due to PCR changes during the
session, but also Esys_PolicyPCR. Perform a retry in that case as well.

Fixes #35490

(cherry picked from commit e61032bf47e6a7e572643a0060c6dd610635c854)

11 months agomkosi: Fix tools image package name
Michal Koutný [Wed, 18 Dec 2024 09:36:55 +0000 (10:36 +0100)] 
mkosi: Fix tools image package name

(cherry picked from commit 4c9f242a54ced16897857a80867758557829f0c3)

11 months agotest: skip TEST-69-SHUTDOWN on ubuntu too
Nick Rosbrook [Tue, 17 Dec 2024 16:10:42 +0000 (11:10 -0500)] 
test: skip TEST-69-SHUTDOWN on ubuntu too

(cherry picked from commit 96c4d9d94d06c6c0a8b68be376505f8d8b5eba2b)