]> git.ipfire.org Git - thirdparty/systemd.git/log
thirdparty/systemd.git
9 months agomeson: fix suite of alignment check tests
Yu Watanabe [Fri, 7 Feb 2025 17:20:02 +0000 (02:20 +0900)] 
meson: fix suite of alignment check tests

Follow-up for 97318131fd06a5bc35454da81dcbbc84f16d9940.

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

(cherry picked from commit 576e98a72c2f6b0145c63c3f3fec1b9194a60539)

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

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

Closing #35599.

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

(cherry picked from commit a4d18914751e687c9e44f22fe4e5f95b843a45c8)

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

For issue #36244.

(cherry picked from commit f7ae28fcec9513435f8258431b686fbaf846915b)

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

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

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

(cherry picked from commit 5078e36632c68f4578cf7507ee14d9ada207983f)

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

(cherry picked from commit a10172b0355f3ff5c301010d81aea1f2fba986e7)

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

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

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

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

(cherry picked from commit bc45d9c9592d3fcd24894199be1902704f48d62c)

9 months agouserdb: reset errno before getpwent()
Lennart Poettering [Wed, 22 Jan 2025 15:44:12 +0000 (16:44 +0100)] 
userdb: reset errno before getpwent()

errno handling for NSS is always a bit weird since NSS modules generally
are not particularly careful with it. Hence let's initialize errno
explicitly before we invoke getpwent() so that we know it's in a
reasonable state afterwards on failure, or zero if not.

We do this in most places we use NSS, including in userdb when it comes
to getgrent(), just for getpwent() we don't so far. Address that.

(cherry picked from commit 83e3b96d0a3b665b7b7a291500fa354a7760a917)

9 months agouserdbctl: don't expect argument to --fuzzy
Lennart Poettering [Wed, 22 Jan 2025 10:55:24 +0000 (11:55 +0100)] 
userdbctl: don't expect argument to --fuzzy

The getopt() parser was completely wrong, it expected an argument where
wasn't expected or processes.

The test cases only passed by accident because they use the "user" verb
which is also the default verb. It would be accidently read as argument
for --fuzzy and ignored.

Fix that.

(cherry picked from commit 165275fe803d0d001a0991014da928e44ed25941)

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

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

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

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

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

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

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

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

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

(cherry picked from commit facc03dc973cc9051c2bde16d7084296e862c0e0)

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

Followup for f26ded4e31b433d3bb6ee4dc3e02e28f7a1d223f

(cherry picked from commit 398d435f3c14959041cc690d2e71b388c1b94ccd)

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

Useful to debug regressions in rpm or other package managers.

(cherry picked from commit e421fb46d8621ecf5a6b527772b3f56a72ddf9ff)

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

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

(cherry picked from commit a128273f7b5e50ce5929ccabda5c2810b7eedd2d)

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

Follow-up for 8b413ae4060b21ed4712fdad7eba195890740756.

(cherry picked from commit be4f4c4343f05f2b53deb326c241c6031c36c911)

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

(cherry picked from commit 8b413ae4060b21ed4712fdad7eba195890740756)

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

Fixes packit test

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

(cherry picked from commit 01b45354559b2fc651441b6b0025ae28daddd06e)

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

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

(cherry picked from commit df8bd4c171bf88feef0302a0d0476e22e5594c82)

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

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

(cherry picked from commit f26ded4e31b433d3bb6ee4dc3e02e28f7a1d223f)

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

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

(cherry picked from commit 20634844ddfc55eebbd6696919f043e3272881c2)

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

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

Fixes: #12545
(cherry picked from commit cac3b43eee83829d68ebf7d4786ebc32e62fe813)

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

(cherry picked from commit df9c5c1c9c230605734aeace4cd3861ff3d6ee6d)

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

(cherry picked from commit e8e778e8abbe119754026929b3c9453404822c70)

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

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

(cherry picked from commit bc1291aa859783673450fc0c66c48a7242a8365b)

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

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

(cherry picked from commit f017a5521305987fdeadf85b975b8ed44a9950b6)

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

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

(cherry picked from commit 728a88e54998d143287ffe89faaeb9512cdf24e1)

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

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

(cherry picked from commit 284a56ff60bc8ff90c7f0e0614b1c30edd875288)

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

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

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

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

Fixes #36170

(cherry picked from commit 0e470e1cc32776f7b57f57640193d6dd0df97a5b)

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

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

This effectively reverts 2188c759f97e40b97ebe3e94e82239f36b525b10 and
0005411352f9bda0d9887c37b9e75a2bce6c1133.

Fixes #35851

(cherry picked from commit 38801c91292fde004bec0974ed5602984701e03b)

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

(cherry picked from commit 4ba3530d67d88c708c36840fbaed9935ae81faa9)

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

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

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

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

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

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

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

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

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

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

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

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

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

(cherry picked from commit b66a4c157e9754528eec16c235265b4ce94d31e8)

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

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

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

(cherry picked from commit 6c45c5a57cac1dd0c35a879bf46d4a42e03e74e1)

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

We now support them, so stop warning about them.

(cherry picked from commit f6928e6b5d59fd6b0dc34d338be1cd427c1d97d5)

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

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

(cherry picked from commit 164295eb6dcc0271d7de030809732c23eeccf9f0)

9 months agomeson: generate keyboard-keys-list from local input.h
Alex Xu (Hello71) [Tue, 28 Jan 2025 22:17:01 +0000 (17:17 -0500)] 
meson: generate keyboard-keys-list from local input.h

otherwise it will use the system input.h which will fail to build if
newer than the bundled version

Fixes: 0a73c8e7b8 ("linux: import input.h and friends")
(cherry picked from commit bc996fd1ba7bce7be4cbae0d0d5ba7c35e8c3f50)

9 months agoukify: Fix two typing issues
Daan De Meyer [Wed, 29 Jan 2025 13:43:06 +0000 (14:43 +0100)] 
ukify: Fix two typing issues

(cherry picked from commit 2d6ae4319ccecdde7a87d12cb439a892afdec943)

9 months agoman: Update nss-myhostname.xml to reflect files
AndreFerreiraMsc [Tue, 28 Jan 2025 13:11:58 +0000 (14:11 +0100)] 
man: Update nss-myhostname.xml to reflect files

(cherry picked from commit 3e1d7b6aae5f5b24610620db810a5730dcc9a6a6)

9 months agotest: support slow test-ukify on Debian/Ubuntu
Luca Boccassi [Sun, 26 Jan 2025 17:35:06 +0000 (17:35 +0000)] 
test: support slow test-ukify on Debian/Ubuntu

Kernels are installed in /boot/ so find them there too

(cherry picked from commit 25a253084a16dcc077592ff85d62f69fa940d1de)

9 months agotest: use local stub if available in test-ukify
Luca Boccassi [Sun, 26 Jan 2025 19:50:22 +0000 (19:50 +0000)] 
test: use local stub if available in test-ukify

It might not be available on a CI system in the system
path, so use the local one if it was built

(cherry picked from commit bcca98c6326b2766d6b769661b15e292c12cf8ac)

9 months agotest: install stub package for test-ukify unit test
Luca Boccassi [Sun, 26 Jan 2025 20:06:36 +0000 (20:06 +0000)] 
test: install stub package for test-ukify unit test

(cherry picked from commit 78ce88e2656aedee8b38b36edcf1e074b90ff53a)

9 months agotest: cleanup after testcase_12_resolvectl2
Nick Rosbrook [Wed, 23 Oct 2024 20:31:00 +0000 (16:31 -0400)] 
test: cleanup after testcase_12_resolvectl2

(cherry picked from commit 266cfdfc77a0eee6d4df60d9795f381ced8a1e65)

9 months agocore: add trigger to path unit debug log
Luca Boccassi [Mon, 27 Jan 2025 20:30:16 +0000 (20:30 +0000)] 
core: add trigger to path unit debug log

Useful for debugging, given it's already logging and the trigger
is known, add it

(cherry picked from commit 6566b4306a65bc7af6ade0cb6887217212925202)

9 months agokbd-model-map: add a georgian mapping
Adam Williamson [Fri, 10 Jan 2025 21:01:47 +0000 (13:01 -0800)] 
kbd-model-map: add a georgian mapping

https://github.com/legionus/kbd/pull/127 adds a Georgian mapping
to kbd. console-setup already has one. Let's support it here, so
it's used for Georgian installs on distros that use this table.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
(cherry picked from commit f89d4c5f108ffbd29d0cc963ed7202bb9b0f778a)

9 months agomkosi: add loongarch64 to Debian's list of EFI arches
Luca Boccassi [Sat, 25 Jan 2025 01:21:30 +0000 (01:21 +0000)] 
mkosi: add loongarch64 to Debian's list of EFI arches

(cherry picked from commit 5ff144515e8b4d8faeb77461b9a62acb0ff1c0a5)

10 months agomkosi: Add VCS_TAG to PassEnvironment=
Daan De Meyer [Mon, 27 Jan 2025 10:27:49 +0000 (11:27 +0100)] 
mkosi: Add VCS_TAG to PassEnvironment=

(cherry picked from commit 28f96afbbbc023ff9397ff8767d1faa1512abbc1)

10 months agomkosi: Bump minimum version to 25
Daan De Meyer [Mon, 27 Jan 2025 10:26:29 +0000 (11:26 +0100)] 
mkosi: Bump minimum version to 25

Let's require everyone to be on the now officially released mkosi 25.

(cherry picked from commit e9fb163857223da6ea020b0bfd12581e9ea707ae)

10 months agomkosi: Update to latest
Daan De Meyer [Mon, 27 Jan 2025 10:26:13 +0000 (11:26 +0100)] 
mkosi: Update to latest

(cherry picked from commit b10a0a4ad69541a2cbae9df643c67c3292930a25)

10 months agorandom-util: fix compilation error
Yu Watanabe [Wed, 15 Jan 2025 16:29:04 +0000 (01:29 +0900)] 
random-util: fix compilation error

Fixes the following error:
```
../src/basic/random-util.c: In function "fallback_random_bytes":
../src/basic/random-util.c:45:26: error: initializer-string for array of "char" is too long [-Werror=unterminated-string-initialization]
   45 |                 .label = "systemd fallback random bytes v1",
      |                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
```

(cherry picked from commit e722fe74ca5e00d3c8a5f85342b75c40ace051f9)

10 months agosystemctl: fix memleak
Yu Watanabe [Sun, 26 Jan 2025 19:17:27 +0000 (04:17 +0900)] 
systemctl: fix memleak

Fixes a bug introduced by adb6cd9be2b7e9e614d2b5835c7b70cf8eacc852.

Fixes #36178.

(cherry picked from commit 08570f284140752b9f0aad4dbcdff32c090a3661)

10 months agotools: add loongarch64 to debug-sd-boot script
Luca Boccassi [Sat, 25 Jan 2025 01:20:47 +0000 (01:20 +0000)] 
tools: add loongarch64 to debug-sd-boot script

(cherry picked from commit 829f57003d50634f28349f1ec6460421532ef318)

10 months agoukify: add riscv32 to --efi-arch
Luca Boccassi [Sat, 25 Jan 2025 01:25:28 +0000 (01:25 +0000)] 
ukify: add riscv32 to --efi-arch

It is supported in the arch mapping at the top and in elf2efi, so add it here too

(cherry picked from commit d1429288ae4cf611ac3df6f604ddb4d6af480cf8)

10 months agoukify: add loongarch64 to --efi-arch
Luca Boccassi [Sat, 25 Jan 2025 01:19:53 +0000 (01:19 +0000)] 
ukify: add loongarch64 to --efi-arch

(cherry picked from commit abe0033556e2416a04bb23dc6d739c6d4dd37001)

10 months agoman: fix reference to non-existing ukify parameter
Luca Boccassi [Fri, 24 Jan 2025 23:37:33 +0000 (23:37 +0000)] 
man: fix reference to non-existing ukify parameter

The --extend parameter was removed by https://github.com/systemd/systemd/pull/34608
and a --join-profile was added instead, fix leftover reference in manpage

Follow-up for 3891d57c4f768cb648e1a85483216eadae0b101e

(cherry picked from commit fd39606c258789d63a345feb6b492f6d2944d9a6)

10 months agoresolved: stop mdns/llmnr if no interface request it after bus method
Yu Watanabe [Fri, 24 Jan 2025 19:48:00 +0000 (04:48 +0900)] 
resolved: stop mdns/llmnr if no interface request it after bus method

(cherry picked from commit 269da24c5a3713bea1f1650334e23ce09f6136b2)

10 months agoresolved: do not disable mdns/llmnr globally if it's enabled on any link
Yu Watanabe [Fri, 24 Jan 2025 19:48:00 +0000 (04:48 +0900)] 
resolved: do not disable mdns/llmnr globally if it's enabled on any link

Fixes a regression caused by 2976730a4d34749bfb7a88da341464f1834ab1c6.

Fixes #36078.
Fixes #36126.

Co-authored-by: Luca Boccassi <luca.boccassi@gmail.com>
(cherry picked from commit 962b757d9b62e42df2513577d717d730b619c80c)

10 months agomachine: revert type change of "leader" in io.systemd.Machine.Register method
Yu Watanabe [Fri, 24 Jan 2025 19:05:51 +0000 (04:05 +0900)] 
machine: revert type change of "leader" in io.systemd.Machine.Register method

The varlink method io.systemd.Machine.Register() is in v256, hence type
of "leader" cannot be changed.
Let's revert the change by 755cb018c9b3e93245afb86ec94223756ddd70e4, and
introduce another field "leaderProcessId", which takes detailed information
of the process.

Fixes a regression caused by 755cb018c9b3e93245afb86ec94223756ddd70e4.
Fixes #36155.

(cherry picked from commit 465865146657ad3b2a59f618e5e8a529b08561bd)

10 months agomount-util: make path_get_mount_info_at() also read utab
Yu Watanabe [Fri, 24 Jan 2025 17:35:21 +0000 (02:35 +0900)] 
mount-util: make path_get_mount_info_at() also read utab

As "_netdev" is only stored in utab.

Fixes a bug introduced by 5261c521e3a98932241f36e91cf6f7823c578aca.
Fixes #35949.

(cherry picked from commit 22f980dd0b04e65dbdc2fca9c653119459a2c52f)

10 months agocore/job: never consider reload jobs redundant
Mike Yuan [Wed, 22 Jan 2025 18:36:27 +0000 (19:36 +0100)] 
core/job: never consider reload jobs redundant

Follow-up for 656bbffc6c45bdd8d5c28a96ca948ba16c546547

The commit reworked job merging logic so that reload jobs
won't get merged. However, they might get dropped from
transaction due to being deemed redundant, i.e. way before
it even hits job_install(). Let's make sure reload jobs
are always kept during transaction construction stage, too.

(cherry picked from commit 7b940d8de91aeba6fa171eb42b690fa95641f29e)

10 months agovarlink: fix error name
Lennart Poettering [Tue, 21 Jan 2025 17:34:21 +0000 (18:34 +0100)] 
varlink: fix error name

The documentation and code agree on the same name, since always, but
when I put together the IDL I made a mistake and insert a "Not" that
wasn't supposed to be there.

Let's correct that.

(cherry picked from commit bd9553d6775a954704f0e37bf3b54b98212f4b0f)

10 months agoman: also fix documentation of start-limit-hit
Lennart Poettering [Tue, 14 Jan 2025 13:04:52 +0000 (14:04 +0100)] 
man: also fix documentation of start-limit-hit

(cherry picked from commit 390dffb862af5791a33abef08011f87818249975)

10 months agobus-wait-for-jobs: fix service result table
Lennart Poettering [Tue, 14 Jan 2025 12:56:58 +0000 (13:56 +0100)] 
bus-wait-for-jobs: fix service result table

We were missing one service result (oom-kill), and the ratelimit one is
called differently. Correct that so that we generate proper log messages
for these cases.

(cherry picked from commit a7620f5dd16f0386b8ddeadfcd4e89da4050beef)

10 months agostub: drop PE sections parsing cap
Luca Boccassi [Fri, 10 Jan 2025 21:02:55 +0000 (21:02 +0000)] 
stub: drop PE sections parsing cap

This was added originally as it was thought that Windows applied
the same cap. Nowadays the specs do not mention it, and it is
believed Windows no longer applies it either, so drop it in order
to allow an arbitrary number of DTBs to be included

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

(cherry picked from commit 8c5b359579b0f1029edafb0bd96b5ebfb271db76)

10 months agoprocess-util: do not unblock unrelated signals while forking
Lennart Poettering [Thu, 9 Jan 2025 10:15:49 +0000 (11:15 +0100)] 
process-util: do not unblock unrelated signals while forking

This makes sure when we are blocking signals in preparation for fork()
we'll not temporarily unblock any signals previously set, by mistake.

It's safe for us to block more, but not to unblock signals already
blocked. Fix that.

Fixes: #35470
(cherry picked from commit 78933625084b11c495c073fc7c34067315a1da50)

10 months agotest: add test cases for parsing SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=
Yu Watanabe [Mon, 6 Jan 2025 10:16:23 +0000 (19:16 +0900)] 
test: add test cases for parsing SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=

(cherry picked from commit 4c9da4dc91c6f875683a6c9fc00df19686f242cc)

10 months agocore/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=
Yu Watanabe [Mon, 6 Jan 2025 08:26:52 +0000 (17:26 +0900)] 
core/device: do not drop backslashes in SYSTEMD_WANTS=/SYSTEMD_USER_WANTS=

Let consider the following udev rules:
===
PROGRAM="/usr/bin/systemd-escape foo-bar-baz", ENV{SYSTEMD_WANTS}+="test1@$result.service"
PROGRAM="/usr/bin/systemd-escape aaa-bbb-ccc", ENV{SYSTEMD_WANTS}+="test2@$result.service"
===
Then, a device expectedly gains a property:
===
SYSTEMD_WANTS=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
===
After the event being processed by udevd, PID1 processes the device, the
property previously was parsed with extract_first_word(EXTRACT_UNQUOTE),
then the device unit gained the following dependencies:
===
Wants=test1@foox2dbarx2dbaz.service test2@aaax2dbbbx2dccc.service
===
So both '%i' and '%I' for the template services did not match with the original
data, and it was hard to use systemd-escape in PROGRAM= udev rule token.

This makes the property parsed with extract_first_word(EXTRACT_UNQUOTE|EXTRACT_RETAIN_ESCAPE),
hence the device unit now gains the following dependencies:
===
Wants=test1@foo\x2dbar\x2dbaz.service test2@aaa\x2dbbb\x2dccc.service
===
and '%I' for the template services match with the original data.

Fixes a bug caused by ceed8f0c8b9a46300eccd1afa2dd8d3c2cb6b47c (v233).

Fixes #16735.
Replaces #16737 and #35768.

(cherry picked from commit a467358b2a18b611e48e62ed89167a04e0f7634e)

10 months agoefivars: deal with uncommitted efi variables
wrvsrx [Sat, 7 Dec 2024 02:32:15 +0000 (10:32 +0800)] 
efivars: deal with uncommitted efi variables

Unfortunately kernel reports EOF if there's an inconsistency between efivarfs var list
and what's actually stored in firmware, c.f. #34304. A zero size env var is not allowed in
efi and hence the variable doesn't really exist in the backing store as long as it is zero
sized, and the kernel calls this "uncommitted". Hence we translate EOF back to ENOENT here,
as with kernel behavior before
https://github.com/torvalds/linux/commit/3fab70c165795431f00ddf9be8b84ddd07bd1f8f

If the kernel changes behaviour (to flush dentries on resume), we can drop
this at some point in the future. But note that the commit is 11
years old at this point so we'll need to deal with the current behaviour for
a long time.

Fix #34304.

(cherry picked from commit 6013dee98d6543ac290a2938c4ec8494e26531ab)

10 months agoboot: Improve log message
Daan De Meyer [Sat, 25 Jan 2025 19:42:54 +0000 (20:42 +0100)] 
boot: Improve log message

(cherry picked from commit ff83795469a20af02a9bf3285992128799b16302)

10 months agoHACKING: Drop run0 from mkosi boot invocation
Daan De Meyer [Fri, 24 Jan 2025 16:29:58 +0000 (17:29 +0100)] 
HACKING: Drop run0 from mkosi boot invocation

mkosi will itself use run0 or sudo when not running as root to invoke
systemd-nspawn, so no need to do it in HACKING.md.

(cherry picked from commit 1743f0370fd89d95a2fa89e8475f4b82a38f54c3)

10 months agodocs/HACKING: use 'run0' to indicate which commands require privileges
Zbigniew Jędrzejewski-Szmek [Mon, 9 Dec 2024 19:24:34 +0000 (20:24 +0100)] 
docs/HACKING: use 'run0' to indicate which commands require privileges

(cherry picked from commit 6ed73883c68304f6677ff342f457aad3c18ab6c6)

10 months agoHACKING: Move OBS section further down
Daan De Meyer [Fri, 24 Jan 2025 16:28:15 +0000 (17:28 +0100)] 
HACKING: Move OBS section further down

HACKING.md should first and foremost tell someone how to hack on
systemd, installing packages from OBS isn't the most likely section
a new contributor will be interested in, so let's move it further
down.

(cherry picked from commit 798b9fb7eb71ad127af49f5308f9e95de4e77fa8)

10 months agomkosi: Drop usage of _systemd_QUIET in arch build script
Daan De Meyer [Fri, 24 Jan 2025 09:54:51 +0000 (10:54 +0100)] 
mkosi: Drop usage of _systemd_QUIET in arch build script

We dropped the variable in the packaging specs for Arch to keep the
integration points as minimal as possible so let's stop using it in
the build script as well.

(cherry picked from commit 8dab59e610720c022f962311069c95fd8569f82a)

10 months agomkosi: Add back --preserve-env when running integrationt tests
Daan De Meyer [Thu, 23 Jan 2025 09:35:06 +0000 (10:35 +0100)] 
mkosi: Add back --preserve-env when running integrationt tests

The test wrapper script depends on various github actions environment
variables so let's make sure those are propagated.

(cherry picked from commit 6733b07d43f3524b66b5ab79a96cad192d2280fc)

10 months agomkosi: Update to latest
Daan De Meyer [Wed, 22 Jan 2025 14:58:13 +0000 (15:58 +0100)] 
mkosi: Update to latest

With the latest mkosi, mkosi takes care of making sure it is
available within mkosi sandbox so we get rid of all the --preserve-env=
options when we invoke mkosi sandbox with sudo as these are not
required anymore. It also doesn't matter anymore if mkosi is installed
in /usr on the host so we get rid of the documentation around that as
well.

(cherry picked from commit 94558e6fc70b53bfa36707afd7e90ff1737194cf)

10 months agomkosi: Run two more mkosi commands with sudo
Daan De Meyer [Wed, 22 Jan 2025 21:24:36 +0000 (22:24 +0100)] 
mkosi: Run two more mkosi commands with sudo

Running some mkosi commands as root and other not can lead to cache
invalidations with the latest version, so make sure we run everything
as root after we've built the tools tree.

(cherry picked from commit 007d255d870bee37db03da1875c0387598bdedde)

10 months agotest: Make sure we run lcov from the meson source directory
Daan De Meyer [Wed, 22 Jan 2025 13:55:45 +0000 (14:55 +0100)] 
test: Make sure we run lcov from the meson source directory

In ac75c5192797082c1965ab30be4711490f2937bc, we accidentally changed
the working directory that the tools executed in the wrapper script
are invoked in. This broke our invocations of lcov. Let's explicitly
run those in the meson source directory again to fix the coverage
workflow.

(cherry picked from commit d3d501e94930c3865f13c881a23980941cce079f)

10 months agoTEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM
Daan De Meyer [Tue, 21 Jan 2025 12:48:13 +0000 (13:48 +0100)] 
TEST-74-AUX-UTILS: Move run0 pcrlock test to TEST-70-TPM

On CentOS Stream 9/10 booting mkosi qemu with --firmware=linux doesn't
add the virtual TPM to the virtual machine which means TEST-74-AUX-UTILS.run.sh
fails because it requires a TPM.

Let's move the systemd-pcrlock logic that requires a TPM to
TEST-70-TPM.pcrlock to avoid the problem.

(cherry picked from commit c0165676e9b95996a402b26c45023d9358ba159d)

10 months agotest: Look for qemu in /usr/libexec/qemu-kvm as well
Daan De Meyer [Tue, 21 Jan 2025 11:29:56 +0000 (12:29 +0100)] 
test: Look for qemu in /usr/libexec/qemu-kvm as well

On CentOS Stream, the qemu binary is /usr/libexec/qemu-kvm so use
that if it's available.

(cherry picked from commit 34da8dd345935d461a62db5787cfbc35e8be2b4b)

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)