Luca Boccassi [Wed, 28 Aug 2024 21:08:33 +0000 (22:08 +0100)]
test: mount ld.so.cache in minimal nspawn container if present
In some cases (SUSE Tumbleweed) this is needed as a library (libz) is
not in the default path, so it fails to run.
(cherry picked from commit
1e17e48b96bb509754a0a11ea8bd0394965564c6)
Luca Boccassi [Tue, 10 Sep 2024 15:02:09 +0000 (17:02 +0200)]
meson: bump version to 256.6
Luca Boccassi [Tue, 10 Sep 2024 15:01:26 +0000 (17:01 +0200)]
hwdb: update to main@{2024-09-10}
git restore -s origin/main hwdb.d/ test/hwdb.d
Daan De Meyer [Mon, 8 May 2023 14:04:24 +0000 (16:04 +0200)]
mkosi: Add back accidentally removed .gdbinit file
(cherry picked from commit
b811b9addfa44dd076c6407649e74b7f016b583f)
Luca Boccassi [Wed, 28 Aug 2024 12:53:31 +0000 (13:53 +0100)]
mkosi: use util-linux's autologin
login is now from util-linux so credentials are supported.
It also needs to be pulled in as it's Protected: yes rather than
Essential: yes.
Keep the old setting for Ubuntu as that still uses login from shadow.
(cherry picked from commit
ec540290177ea208eafb6dfd49de2d9344bee4ce)
Daan De Meyer [Sun, 1 Sep 2024 07:31:12 +0000 (09:31 +0200)]
mkosi: Don't create sanitizer wrappers for every mkfs binary
mksquashfs for some reason ends up in nss_systemd and mkfs.btrfs
links against libudev. The others don't need a sanitizer wrapper
script.
(cherry picked from commit
67b240f6b0babf99dce108d1e0f4e3b4b0cf3ec6)
dependabot[bot] [Sun, 1 Sep 2024 09:10:17 +0000 (09:10 +0000)]
build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from
8c2f828701a1bdb3dc9b80d6f2ab979f0430a6b8 to
31b4e756c1484c302435653da5d3b9bdfae38518.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/
8c2f828701a1bdb3dc9b80d6f2ab979f0430a6b8...
31b4e756c1484c302435653da5d3b9bdfae38518)
---
updated-dependencies:
- dependency-name: systemd/mkosi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit
0333969a405ea32be4d79e563db4d9578b996ec1)
Daan De Meyer [Tue, 3 Sep 2024 13:18:49 +0000 (15:18 +0200)]
mkosi: Use apt patterns to install dependencies on Debian/Ubuntu
Instead of parsing the human readable output of apt-cache, let's
use apt patterns to figure out the dependencies.
We also filter out virtual packages as apt will fail and say we need
to install an implementation of the virtual package even if a package
that provides the virtual package is already installed.
(cherry picked from commit
89c579788d1f864778c4d6f47b30bf37d04c4947)
Daan De Meyer [Tue, 3 Sep 2024 10:53:23 +0000 (12:53 +0200)]
mkosi: Make systemd package filtering more robust
Let's not just filter everything with systemd in the name, but instead
use the same list of volatile packages that we install to do the
filtering.
(cherry picked from commit
70ecdbfa230258ee88d3ed42ec8bbcd91e27bba3)
Daan De Meyer [Wed, 28 Aug 2024 10:10:12 +0000 (12:10 +0200)]
mkosi: Include noarch in dnf repoquery architectures
ukify is noarch so we should include noarch to get all results.
(cherry picked from commit
3e09a3eac20423cae5e596e72a4fc40b6ce454e6)
Yu Watanabe [Fri, 2 Aug 2024 20:47:52 +0000 (05:47 +0900)]
Daan De Meyer [Wed, 28 Aug 2024 15:52:40 +0000 (17:52 +0200)]
mkosi: Switch back to src.opensuse.org for opensuse spec
Supposedly they're never going to rewrite their git history again
so let's give src.opensuse.org another try given that code.opensuse.org
is down again.
(cherry picked from commit
ffd76bdd9737484a3582c5f146f4f43318154b5c)
Daan De Meyer [Thu, 29 Aug 2024 11:26:28 +0000 (13:26 +0200)]
mkosi: update fedora commit reference
*
a67221c3f0 Always build ukify package
*
abb115a905 Do not use patch to modify systemd-user pam config file
*
196ec98228 Drop %upstream conditionalization for patches
(cherry picked from commit
e921a8ad674c4a117ac217057b34fe53e5bb8066)
Daan De Meyer [Thu, 29 Aug 2024 16:36:55 +0000 (18:36 +0200)]
mkosi: Don't fetch remote if the commit to check out already exists
If the commit we're about to check out already exists in the local
repository, don't fetch from the remote repository.
(cherry picked from commit
c5730846fe78518fb9fdabaedfd6f20eb5568582)
Daan De Meyer [Mon, 12 Aug 2024 10:19:37 +0000 (12:19 +0200)]
mkosi: Always specify _sourcedir as an absolute path
A relative path is not supported by rpm so let's make sure we specify
it as an absolute path.
(cherry picked from commit
71acb00c28a2d02fd582267a9bc263cd0ef9bd97)
Daan De Meyer [Tue, 27 Aug 2024 11:17:38 +0000 (13:17 +0200)]
mkosi: Don't apply distribution specific patches
rpm upstream is going to imply --noprep when running with --build-in-place so let's do the same on older
versions of rpm (https://github.com/rpm-software-management/rpm/commit/
e0925ad6e3185030b004343f73a5917fdc562d6c)
Also, to keep things consistent between distros, run with --noprepare
on Arch Linux as well (we already skip patches on Debian/Ubuntu).
To keep things working on Arch, we apply the one downstream patch
manually ourselves.
(cherry picked from commit
00a2a67d814651cd3d6e2dff6dab22a3f8e5f5f3)
Daan De Meyer [Mon, 26 Aug 2024 11:08:25 +0000 (13:08 +0200)]
mkosi: Stop using git commit timestamps for package releases
This prevents bisecting to figure out which commit broke something
as when going backwards the git commit timestamp will be older meaning
package managers will refuse to upgrade to the "older" version. Let's
make sure the release is always newer by using the current date unless
$SOURCE_DATE_EPOCH is set.
(cherry picked from commit
caf5eb586afa1a71ed04a3442585536930b150c2)
Daan De Meyer [Wed, 28 Aug 2024 07:46:07 +0000 (09:46 +0200)]
mkosi: update fedora commit reference
*
28076e6232 Only make python3-pillow Recommends on Fedora
*
a9807c4486 Do not require grubby on CentOS Stream 9
*
d38cacfd3a Version 256.5
*
38291e13c1 Disable integration of userdb in sshd
*
53118d2112 Backport patch to only read /proc/cmdline when not in container
*
903e8e0f88 Backport upstream patch to try more initrd variants in 90-loaderentry.install
*
b29a66006c Version 256.4
*
1cdae03391 Update tmpfiles --destroy-data patch
*
4fd4ef72a6 Upload sources
*
3c3772150d Version 256.3
(cherry picked from commit
92c22e02c1a591b4bc97ae4c6d0025851549f0fc)
Daan De Meyer [Wed, 28 Aug 2024 07:46:05 +0000 (09:46 +0200)]
mkosi: update opensuse commit reference
*
2866762da8 Update systemd to version 256.4 / rev 429 via SR
1192932
(cherry picked from commit
051fddfc4191dae851a40ee239707b7ab0061116)
Daan De Meyer [Wed, 28 Aug 2024 07:46:04 +0000 (09:46 +0200)]
mkosi: update arch commit reference
*
ea5f086275 handle uncommon license
*
43e43faab8 upgpkg: 256.5-1: new upstream release
*
7f4443062f Provide /etc/cryptsetup-keys.d/
*
262a14b8e5 upgpkg: 256.4-1: new upstream release
*
1aff4eb5f6 upgpkg: 256.3-1: new upstream release
(cherry picked from commit
caf984def5fb74d4cc674493be561e4c6fea8294)
Daan De Meyer [Tue, 27 Aug 2024 10:56:07 +0000 (12:56 +0200)]
mkosi: Update to latest
(cherry picked from commit
dbff64ddf06f64ab94bd314df27d6c089b75de52)
Daan De Meyer [Thu, 22 Aug 2024 13:22:37 +0000 (15:22 +0200)]
mkosi: Update to latest
Should fix the Fedora Rawhide CI failure.
(cherry picked from commit
f134a79ff8f2146e0f5aa9570df02431d246e9da)
Daan De Meyer [Mon, 19 Aug 2024 09:27:26 +0000 (11:27 +0200)]
mkosi: Update to latest
(cherry picked from commit
2dc99fdadb1eeba998e21760301bbe0142653446)
Daan De Meyer [Mon, 19 Aug 2024 09:27:11 +0000 (11:27 +0200)]
mkosi: Improve formatting
(cherry picked from commit
bc07b026f08afbecc8ff9e4c8171dbb8c246a153)
dependabot[bot] [Thu, 1 Aug 2024 09:02:16 +0000 (09:02 +0000)]
build(deps): bump systemd/mkosi
Bumps [systemd/mkosi](https://github.com/systemd/mkosi) from
4eba736412c702bbbe2c6d4a58a92fa977219249 to
63fc1fde5b1aac1abf07ac499068c2b62263dafb.
- [Release notes](https://github.com/systemd/mkosi/releases)
- [Changelog](https://github.com/systemd/mkosi/blob/main/NEWS.md)
- [Commits](https://github.com/systemd/mkosi/compare/
4eba736412c702bbbe2c6d4a58a92fa977219249...
63fc1fde5b1aac1abf07ac499068c2b62263dafb)
---
updated-dependencies:
- dependency-name: systemd/mkosi
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit
5186b40c6ff34a176c684c38afa922ef8d7ff33d)
Daan De Meyer [Tue, 20 Aug 2024 12:39:45 +0000 (14:39 +0200)]
tests: Don't override QemuKvm= value if TEST_NO_KVM=0
Let's disable KVM if TEST_NO_KVM=1 is set but let's not specify anything
if it's not set so the QemuKvm= setting from mkosi.conf is used.
(cherry picked from commit
c8e7cfeddc7be498c688c564f31676b856181120)
Daan De Meyer [Thu, 5 Sep 2024 16:38:33 +0000 (18:38 +0200)]
mkosi: Install util-linux-script on Rawhide
It's now subpackaged so we can build images without pulling in
libutempter but we use script in the testsuite so let's install the
subpackage.
(cherry picked from commit
4eae2be0d7cd8832688d38ef2cdf4a42578fbff0)
Daan De Meyer [Sat, 7 Sep 2024 10:13:58 +0000 (12:13 +0200)]
mkosi: Drop _fixperms workaround
This was added to deal with a bug in the rpm 4.20 rc in Rawhide
but since that's been fixed, let's drop the workaround.
(cherry picked from commit
517e8922101557fccf4a7f8fc922e5102e787ec7)
Yu Watanabe [Fri, 6 Sep 2024 06:00:32 +0000 (15:00 +0900)]
tree-wide: check if non-empty password is acquired
(cherry picked from commit
204529d0fcde9a95119b489225620f36649c2f5b)
Yu Watanabe [Fri, 6 Sep 2024 02:19:39 +0000 (11:19 +0900)]
ask-password: refuse empty password strv
Fixes #34270.
(cherry picked from commit
623a8b1922bdbd2fb06bc5f2c67d3d6930efc58e)
Yu Watanabe [Thu, 5 Sep 2024 08:57:24 +0000 (17:57 +0900)]
test: fix indentation
(cherry picked from commit
fe6049d0210c89a595ae598d87dcefe7bfbe3a1d)
Yu Watanabe [Thu, 5 Sep 2024 08:58:29 +0000 (17:58 +0900)]
test: add test case for systemd-repart --seed=random
For issue #34257.
(cherry picked from commit
56d6ebd40468e2a743b39ad7d87b0675bdf9a042)
Yu Watanabe [Thu, 5 Sep 2024 06:49:09 +0000 (15:49 +0900)]
repart: initialize seed earlier
As the seed is used by context_load_partition_table() -> derive_uuid().
Fixes #34257.
(cherry picked from commit
b8a8000aba4620a1d93ac1d04dbb86050d9c5fe8)
Yu Watanabe [Thu, 5 Sep 2024 06:05:32 +0000 (15:05 +0900)]
nspawn: refuse to bind mount device node from host when --private-users= is specified
Also do not chown if a device node is bind-mounted.
Fixes #34243.
(cherry picked from commit
efedb6b0f3cff37950112fd37cb750c16d599bc7)
Mike Yuan [Sat, 31 Aug 2024 13:42:43 +0000 (15:42 +0200)]
audit-util: check correct errno
(cherry picked from commit
190a0953808608b099f9465f9e786e4efe276c26)
Daan De Meyer [Thu, 29 Aug 2024 20:59:48 +0000 (22:59 +0200)]
repart: Keep existing directory timestamps intact when copying
Otherwise, when merging multiple directory trees, the output becomes
unreproducible as the directory timestamps will be changed to the current
time when copying identical directories from the second tree.
We introduce a new copy flag to achieve this behavior.
(cherry picked from commit
d850a544bc1f895decb452160c97a884a20b12b7)
Daan De Meyer [Wed, 28 Aug 2024 12:08:30 +0000 (14:08 +0200)]
ukify: Skip test on architectures without UEFI
(cherry picked from commit
5121f7c45b37afca53c89f42123b1dd6a04fa80f)
Ronan Pigott [Mon, 26 Aug 2024 08:39:20 +0000 (01:39 -0700)]
resolved: clear the AD bit for bypass packets
When the bypass logic is invoked, such as for queries to the stub with
the DO bit set, be certain to clear the AD bit in the reply before
forwarding it if the answer is not known to be authentic.
(cherry picked from commit
13e15dae9f0b4566d3ea2ed058a5dd44751216da)
Yu Watanabe [Fri, 23 Aug 2024 01:14:45 +0000 (10:14 +0900)]
udevadm/test,test-builtin: enable debugging logs by default again
The lines were mistakenly dropped by
aa976d87889ae22b7347787a1ebd03a31dcc0a9e.
(cherry picked from commit
b9142e2ba7fce5455fd3a782c69a45a0d8eaf866)
Mike Yuan [Sat, 17 Aug 2024 16:34:46 +0000 (18:34 +0200)]
logind-session: downgrade user@.service dep to Wants=
This partially reverts
52bcc872b5f97a14a9b4e4e383f45bb3066e1643.
We explicitly support running without user manager,
hence only user-runtime-dir@.service should be
required.
Fixes #33405
(cherry picked from commit
26f78eff6905179838f311e4f4e2809677c0bb78)
Alyssa Ross [Wed, 21 Aug 2024 12:21:47 +0000 (14:21 +0200)]
bootctl: don't load etc/machine-info from cwd
arg_root defaults to null, so if --root isn't given, this would try reading
etc/machine-info from the current working directory, which is likely to fail.
Fixes:
77db9ef2ab ("boot: Make sure we take --root into account everywhere.")
(cherry picked from commit
0452779b0054f5c2724b745b1db33bba1ac8e677)
maia x. [Mon, 19 Aug 2024 19:47:21 +0000 (12:47 -0700)]
namespace: Fix extension release memory leak
In apply_one_mount(), in the MOUNT_EXTENSION_DIRECTORY case,
char **extension_release was used as a return pointer twice but only
cleaned up once in the end. Fix it by removing duplicate code that
was causing this issue.
Fixes issue introduced in
55ea4ef096543d2bceea9315868d5aca945d7a57.
(cherry picked from commit
010ea061fceb84d36259d576f52c09b940d0d615)
Kornilios Kourtis [Thu, 15 Aug 2024 15:22:35 +0000 (17:22 +0200)]
process-util: handle pidfd_spawn() returning E2BIG
In some kernels (specifically, 5.4) even though the clone3 syscall is
supported, setting CLONE_INTO_CGROUP is not. The error message returned
in this case is E2BIG.
If posix_spawn_wrapper encounters this error, it does not retry, and
cannot spawn any programs in said kernels.
This commit adds a check for the E2BIG error and retries pidfd_spawn()
without the POSIX_SPAWN_SETCGROUP flag.
If we encounter an E2BIG error, and the pidfd_spawn() succeeds after
removing the POSIX_SPAWN_SETCGROUP flag, then we cache the result so
that we do not retry every time.
Originally, this issue was reported in https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=
1077204.
Signed-off-by: Kornilios Kourtis <kornilios@gmail.com>
(cherry picked from commit
7ac58157ca67ab001307f1fd72e0cc7c0c4e846a)
Yu Watanabe [Wed, 7 Aug 2024 08:48:42 +0000 (17:48 +0900)]
test: add ASSERT_OK_POSITIVE() and ASSERT_OK_ZERO()
(cherry picked from commit
538766ddf47cfd457d9c69f108c035d4d97eaba1)
Raphaël Mélotte [Fri, 14 Jun 2024 12:37:29 +0000 (14:37 +0200)]
src/basic/missing_loop.h: fix missing LOOP_SET_BLOCK_SIZE
Builds with kernels headers < 4.14 fail with:
../src/shared/loop-util.c: In function ‘loop_configure_fallback’:
../src/shared/loop-util.c:237:31: error: ‘LOOP_SET_BLOCK_SIZE’ undeclared (first use in this function); did you mean ‘LOOP_SET_DIRECT_IO’?
if (ioctl(fd, LOOP_SET_BLOCK_SIZE, (unsigned long) c->block_size) < 0)
^~~~~~~~~~~~~~~~~~~
LOOP_SET_DIRECT_IO
Fixes: https://github.com/systemd/systemd/issues/33341
Signed-off-by: Raphaël Mélotte <raphael.melotte@mind.be>
(cherry picked from commit
56ab1c54497d9fac74380ff9e11aaf931a917d2b)
Yu Watanabe [Fri, 16 Aug 2024 16:48:50 +0000 (01:48 +0900)]
test: add test case that 'nspawn --network-veth' enables IP forwarding
(cherry picked from commit
08779d7c55add3a3bad5228d35012c15e92c47a5)
Yu Watanabe [Fri, 16 Aug 2024 16:47:33 +0000 (01:47 +0900)]
test: allow to skip matrix_run_one() if $TEST_MATCH_TESTCASE is set
(cherry picked from commit
7908e1d459f5f2893d6aaf1d62009da7856f9410)
Yu Watanabe [Fri, 16 Aug 2024 15:00:32 +0000 (00:00 +0900)]
network: make IPMasquerade= imply global IP forwarding settings again
After
3976c430927e1bfefa0413f80ebac84ab9a64350 (#31423), IPMasquerade=
implies only per-interface IP forwarding. That means, nspawn users need
to manually enable IPv4/IPv6Forwarding= in networkd.conf when
--network-veth or friend is used. Even the change was announced in NEWS,
the change itself breaks backward compatibility and extremely reduces
usability.
Let's make the setting imply the global setting again.
Fixes #34010.
(cherry picked from commit
0b695febb22ea5701eab4aee801e8a861ffdbaa6)
Yu Watanabe [Fri, 16 Aug 2024 14:30:02 +0000 (23:30 +0900)]
network/lldp-tx: introduce link_lldp_tx_update_capabilities()
Currently it is unused, but it will be used later.
(cherry picked from commit
8ceca83141ffea2e383d1205957bdc47f5492875)
Yu Watanabe [Fri, 16 Aug 2024 14:29:36 +0000 (23:29 +0900)]
sd-lldp-tx: insert missing empty line
(cherry picked from commit
fbcd7e054bd4bc3e25afa41535d08ab2f2f0a095)
Daan De Meyer [Mon, 19 Aug 2024 08:53:53 +0000 (10:53 +0200)]
Merge pull request #34032 from DaanDeMeyer/backport-tests
Backport various commits to v256-stable
Daan De Meyer [Wed, 14 Aug 2024 10:43:05 +0000 (12:43 +0200)]
Add $SYSTEMD_IN_CHROOT to override chroot detection
When running unprivileged, checking /proc/1/root doesn't work because
it requires privileges. Instead, let's add an environment variable so
the process that chroot's can tell (systemd) subprocesses whether
they're running in a chroot or not.
(cherry picked from commit
2701c2f67de592fe2565b084cfaec1667767dbaf)
Daan De Meyer [Sun, 18 Aug 2024 22:13:47 +0000 (00:13 +0200)]
test-dhcp-server: Gracefully handle the network being down
(cherry picked from commit
4cf7a676af9a79ff418227d8ff488dfca6f243ab)
Daan De Meyer [Sun, 18 Aug 2024 11:20:14 +0000 (13:20 +0200)]
test: Gracefully handle running within user namespace with single user
Unprivileged users often make themselves root by unsharing a user namespace
and then mapping their current user to root which does not require privileges.
Let's make sure our tests don't fail in such an environment by adding checks
where required to see if we're not running in a user namespace with only a
single user.
(cherry picked from commit
ef31767ed7e21672a50b77e7b3935948aaba114c)
Daan De Meyer [Sun, 18 Aug 2024 11:19:30 +0000 (13:19 +0200)]
test-netlink: Gracefully handle the loopback interface being down
(cherry picked from commit
d098b8df6e5c1b4c834272dd1397345483116db6)
Luca Boccassi [Thu, 15 Aug 2024 20:46:49 +0000 (21:46 +0100)]
meson: bump version to 256.5
Daan De Meyer [Thu, 15 Aug 2024 20:22:56 +0000 (22:22 +0200)]
Merge pull request #34003 from bluca/v256-stable
v256 batch
Luca Boccassi [Wed, 14 Aug 2024 21:49:10 +0000 (22:49 +0100)]
test: add TEST_SKIP to mkosi integration test wrapper
Takes a space-separate list of test names, allows to skip one or more tests
(cherry picked from commit
ddc91af4eaa32511f92c83b2c24d9cc0425fd5f5)
Yu Watanabe [Thu, 15 Aug 2024 07:14:37 +0000 (16:14 +0900)]
test: remove temporary directory for test-ukify on success
(cherry picked from commit
e9a5b4a10eaa10fd43c69d148d57c7f4d8e10a4f)
Yu Watanabe [Thu, 15 Aug 2024 06:58:29 +0000 (15:58 +0900)]
test: remove temporary directory on success
Also use mkdtemp_open() with specific template.
Follow-up for
e7e52ff9b6d6bbfcdcc298ef3c156420b51d58b8.
(cherry picked from commit
63be834db8fce69536b3ec04f636f1b838dd531a)
Daan De Meyer [Wed, 14 Aug 2024 14:51:11 +0000 (16:51 +0200)]
mkosi: Fix debian/not-installed build logic
- Expand globs
- Filter out directories
- Append to the list of packaged files, not the list of installed files
Fixes the issue in https://github.com/systemd/systemd/pull/32363
(cherry picked from commit
0409213cbc1f939b6f2f72deabc4c92a7fe30523)
Chengen Du [Mon, 12 Aug 2024 03:41:52 +0000 (11:41 +0800)]
udev: Handle PTP device symlink properly on udev action 'change'
PTP device symlink creation rules are currently executed only when the
udev action is 'add'. If a user reloads the rules and runs the udevadm
trigger command to reapply changes, the symlink may be deleted, which
can prevent the chronyd service from restarting properly.
Signed-off-by: Chengen Du <chengen.du@canonical.com>
(cherry picked from commit
6bd12be3fa7761f190e17efdbdbff4440da7528b)
Thorsten Scherer [Wed, 14 Aug 2024 20:32:44 +0000 (22:32 +0200)]
repart: Fix misleading typo in GPT partition flag
Bit 60 is the one corresponding to ReadOnly, not 50. Fix this.
(cherry picked from commit
932cc94436e653d0487c29e0dd44685610cd7bcb)
Daan De Meyer [Thu, 8 Aug 2024 20:34:05 +0000 (22:34 +0200)]
test: Use usual setup in integration-test-setup script
(cherry picked from commit
db043a9b1a109478581f19b69a3019fc15f672aa)
Daan De Meyer [Thu, 8 Aug 2024 19:49:09 +0000 (21:49 +0200)]
test: Fix section of StateDirectory=
(cherry picked from commit
dba138b863fadf57362026281d0597b2d7736090)
Daan De Meyer [Thu, 8 Aug 2024 19:48:34 +0000 (21:48 +0200)]
mkosi: Install llvm
For llvm-symbolizer which is required to sanitize address sanitizer
reports.
(cherry picked from commit
c022fcd80c5bf94e8ac5511559f085303b24b070)
Daan De Meyer [Thu, 8 Aug 2024 08:59:08 +0000 (10:59 +0200)]
mkosi: Disable pagination in gdb
(cherry picked from commit
7628565604f5a6a572cb4a33ccde9a64fcc9ff09)
James Muir [Tue, 13 Aug 2024 01:53:24 +0000 (21:53 -0400)]
man/systemd-sysusers, man/systemd-tmpfiles: fix sentence fragments
add "are executed" so that those two sentences have a verb.
(cherry picked from commit
c5903cde63bb21a37c3e841c160d1fa060ccf7f2)
Daan De Meyer [Tue, 13 Aug 2024 08:36:40 +0000 (10:36 +0200)]
docs: Mention the new mount API in the container interface doc
Let's mention that the new mount API may be used to establish new
mounts in a container without needing the /run/host/incoming directory.
(cherry picked from commit
74cc5e2041a2c32e1824b32316bd95f2c8a811f5)
Mike Yuan [Sun, 11 Aug 2024 13:41:30 +0000 (15:41 +0200)]
edit-util: do not try to recreate temp file if missing
We initially read from temp file, then strip it, and write
back to it. If the file suddenly disappeared during the process,
it indicates someone else is touching our temp file
behind our back. Let's not silently continue.
(cherry picked from commit
3b5b2ff8fa6413afc2e5a058ea8281a58a4c691d)
Ivan Shapovalov [Wed, 7 Aug 2024 08:02:45 +0000 (10:02 +0200)]
core/exec-invoke: call setpriority() after sched_setattr()
The nice value is part of struct sched_attr, and consequently invoking
sched_setattr() after setpriority() would clobber the nice value with
the default (as we are not setting it in struct sched_attr).
It would be best to combine both calls, but for now simply invoke
setpriority() after sched_setattr() to make sure Nice= remains effective
when used together with CPUSchedulingPolicy=.
(cherry picked from commit
711a157738b3dcd29a5ebc8f498eb46bfac59652)
Nick Rosbrook [Wed, 7 Aug 2024 22:18:06 +0000 (18:18 -0400)]
core/unit: do not use unit path cache in unit_need_daemon_reload()
When unit_need_daemon_reload() calls unit_find_dropin_paths() to check
for new drop-in configs, the manager's unit path cache is used to limit
which directories are considered. If a new drop-in directory is created,
it may not be in the unit path cache, and hence unit_need_daemon_reload()
may return false, despite a new drop-in being present. However, if a
unit path cache is not given to unit_file_find_dropin_paths() at all,
then it behaves as if the target path was found in the unit path cache.
So, to fix this, adapt unit_find_dropin_paths() to take a boolean
argument indicating whether or not to pass along the unit path cache.
Set this to false in unit_need_daemon_reload().
Fixes #31752
(cherry picked from commit
82c482d573c9d2f3ab36f7be8d32772f90f2c335)
Luca Boccassi [Thu, 8 Aug 2024 14:13:38 +0000 (15:13 +0100)]
test: note in README how to get full list of Ubuntu CI jobs
(cherry picked from commit
79488ac0038aca5fca5b2938eb645d35015664cf)
Daan De Meyer [Wed, 7 Aug 2024 19:23:37 +0000 (21:23 +0200)]
mkosi: Disable debuginfod
We generally don't care about library debuginfo so let's just disable
debuginfod so it doesn't get in the way when debugging.
We use /root/.gdbinit as the systemwide gdbinit location is distribution
specific.
(cherry picked from commit
2561e2a35601383bfba30da58d378303cb9e39aa)
Yu Watanabe [Wed, 7 Aug 2024 05:03:13 +0000 (14:03 +0900)]
meson: enable -Wunterminated-string-initialization
With
af1a6db58fde8f64edcf7d27e1f3b636c999934c, now we can build with the
option.
(cherry picked from commit
f548bc4011bcdab008b125b9d0993817efa00718)
Cristian Rodríguez [Sun, 4 Aug 2024 22:51:54 +0000 (18:51 -0400)]
basic|boot: silence Wunterminated-string-initialization gcc15 warnings
gcc15 has -Wunterminated-string-initialization in -Wextra and
warns about string constants that are not null terminated even though
the functions do do out of bounds access.
Silence the warnings by simply not providing an explicit size.
(cherry picked from commit
af1a6db58fde8f64edcf7d27e1f3b636c999934c)
Nick Rosbrook [Tue, 6 Aug 2024 00:43:15 +0000 (20:43 -0400)]
sysusers: check if requested group name matches user name in queue
When creating a user, check if the requested group name matches a user
name in the queue. If that matched user name is also going to be a group
name, then use it for the new user too. In other words, allow the
following:
u foo -
u bar -:foo
when both foo and bar are new users.
Fixes #33547
(cherry picked from commit
18a8f03e5160ca3828d327d9bbd1b32f26d792a3)
Yu Watanabe [Sun, 4 Aug 2024 05:09:53 +0000 (14:09 +0900)]
systemctl: gracefully adjust bus transport and runtime scope when --boot-loader-entry=help
This fixes the following assertion:
===
SYSTEMD_LOG_LEVEL=debug systemctl --user -H foo --boot-loader-entry=help
Assertion 'transport != BUS_TRANSPORT_REMOTE || runtime_scope == RUNTIME_SCOPE_SYSTEM' failed at src/shared/bus-util.c:284, function bus_connect_transport(). Ignoring.
Failed to connect to bus: Operation not supported
===
Fixes a bug introduced by
97af80c5a7029c3f92e982dcf9338b9e67ad9cde.
Fixes #33661.
Fixes oss-fuzz#70153.
(cherry picked from commit
1056457d1132e78cbf914e8abfa661465b952412)
Arnaud Patard [Mon, 8 Jul 2024 13:39:14 +0000 (15:39 +0200)]
src/pcrlock/pcrlock.c: Handle empty pcrlock.d directories
Running the following commands:
# mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
# /usr/lib/systemd/systemd-pcrlock predict --pcr=1+2+3+4+5+16
Will result in:
...
Floating point exception
Running the following commands:
# mkdir -p /var/lib/pcrlock.d/123-empty.pcrlock.d
# /usr/lib/systemd/systemd-pcrlock make-policy --pcr=1+2+3+4+5+16
Will result to this (partial) log:
...
Predicted future PCRs in 133us.
[]
...
Written policy digest
0000000000000000000000000000000000000000000000000000000000000000 to NV index 0x1921da6
...
So, add missing checks to handle gracefully cases where there's no variant
inside the component.
Signed-off-by: Arnaud Patard <arnaud.patard@collabora.com>
(cherry picked from commit
e7a93e75219b22424bab95fe45982f5eef21d581)
Daan De Meyer [Mon, 5 Aug 2024 13:37:46 +0000 (15:37 +0200)]
mkosi: Prevent busybox from getting pulled into opensuse images
OpenSUSE's busybox has a bunch of Provides for basic tools that cause
it to get pulled into images unless the corresponding tool is explicitly
installed so let's add explicit tools to make sure we don't get busybox.
(cherry picked from commit
857e4528f5fe556bbe98e32ffcde8932d0d80f83)
Daan De Meyer [Fri, 2 Aug 2024 14:25:03 +0000 (16:25 +0200)]
test: Add a way to quickly iterate on an integration test
Rebuilding the integration test every time is very slow. Let's
introduce a way to iterate on an integration test without rebuilding
the image every time. By making a btrfs snapshot before we run the
integration test, we can then systemctl soft-reboot after running
the test to restore the rootfs to a pristine state before running
the test again.
As /run/nextroot will get nuked on reboot or soft-reboot, we introduce
a tmpfiles snippet to make sure it is recreated every (soft-)reboot
and adapt the existing tests to deal with this new symlink.
(cherry picked from commit
af153e36ae67c242251951c12d6d6b6ae4783845)
Daan De Meyer [Fri, 2 Aug 2024 14:23:40 +0000 (16:23 +0200)]
mkosi: Switch back to btrfs
The next commit will introduce a way to iterate on integration
tests which depends on btrfs specific features.
We leave CentOS on ext4 as its kernel does not support btrfs.
(cherry picked from commit
edc6592e532806fe9ac28400138d5d4e1492a7d0)
Daan De Meyer [Fri, 2 Aug 2024 14:22:37 +0000 (16:22 +0200)]
mkosi: Enable Autologin= again on Debian
Debian uses /usr/bin/login from the shadow package instead of util-linux
which doesn't support credentials. Let's enable autologin the old
fashioned way for now.
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833256
(cherry picked from commit
ea696c5f5300c240ae2749f7791aaa78837d556b)
Daan De Meyer [Fri, 2 Aug 2024 13:46:41 +0000 (15:46 +0200)]
test: Implement TEST_SHELL for mkosi based test runner
TEST_SHELL can be used to get a shell in the integration test
environment without actually immediately starting the test.
(cherry picked from commit
dd1c01b20fb8eef6a4d41ac7f0d3d83399e27593)
Daan De Meyer [Fri, 2 Aug 2024 14:16:14 +0000 (16:16 +0200)]
test: Rename INTERACTIVE_DEBUG to TEST_SHELL
(cherry picked from commit
33f400a9e05f3a09d28ac3d8251cf82592a207c6)
Daan De Meyer [Fri, 2 Aug 2024 13:18:45 +0000 (15:18 +0200)]
docs: Update upgrade commands in HACKING.md
- Add the required options to make the package managers non interactive
- Use apt-get instead of apt
- Remove --reinstall from apt-get command so we only install newer packages
- Add --needed to pacman command so we only install newer packages
(cherry picked from commit
5f5b6fa9017c7c5de1e8a3e6b8888fd71a1d3862)
Daan De Meyer [Fri, 2 Aug 2024 11:45:41 +0000 (13:45 +0200)]
mkosi: Drop locale tmpfiles snippet
Not required anymore as we don't do /usr only anymore and the symlink
will be created by the debian systemd package.
(cherry picked from commit
63bafef12ba867010507963d5aac67f4d64d85e9)
Yu Watanabe [Mon, 5 Aug 2024 05:18:21 +0000 (14:18 +0900)]
journal: set flushed flag even if we fail to open runtime journals
As at this stage, a persistent journal file has been already opened, and
saved seqnum has been reset, and any later journal entries will be stored
to the file. Hence we should not open the runtime journal file by
server_system_journal_open() again.
(cherry picked from commit
b55027efe41b266df4c4704e924fff7dfb32ad70)
Yu Watanabe [Mon, 5 Aug 2024 06:24:07 +0000 (15:24 +0900)]
journal: comment the default value in journald.conf
(cherry picked from commit
0d113f8e70243c1a8f0587105195e51e027a4725)
Yu Watanabe [Mon, 5 Aug 2024 05:56:11 +0000 (14:56 +0900)]
journal: do not rotate journal when MaxRetentionSec= is set
The setting is about vacuuming archived journal files. It is not
necessary to rotate the current journal. Note, journal file rotation is
controlled by MaxFileSec=.
Fixes #31315.
(cherry picked from commit
b63c18db03d0c120ba9eaa2aa9d0d43d80eea02b)
Yu Watanabe [Mon, 5 Aug 2024 01:46:41 +0000 (10:46 +0900)]
resolve: refuse invalid service without type field
Fixes Fixes #33935.
(cherry picked from commit
b48ab08732a76b7337628e1e716f11c687000903)
Yu Watanabe [Sun, 4 Aug 2024 05:07:13 +0000 (14:07 +0900)]
systemctl: refuse --capsule=foo with --system
Fixes the following assertion:
===
systemctl --capsule=hoge --system reboot
Assertion 'runtime_scope == RUNTIME_SCOPE_USER' failed at src/shared/bus-util.c:479, function bus_connect_transport(). Aborting.
Aborted (core dumped)
===
Follow-up for
56cb74c3cd1358d7d0b3f613feaf2eeab601a6bd.
(cherry picked from commit
bcf982223cc5d051818dc88866a42f6a08f39a4a)
Luca Boccassi [Sat, 3 Aug 2024 23:00:05 +0000 (00:00 +0100)]
base-filesystem: do not attempt to create a /lib64 -> /usr/lib/<tuple> symlink
In multi-arch distributions (debian and derivatives) multiarch tuples under
/usr/lib are used, such as /usr/lib/x86_64-linux-gnu/ but the /lib64 symlink
should never point there, it should always point to /usr/lib64, as that's
how they are set up by distribution-specific tools.
https://packages.debian.org/bookworm/amd64/libc6-i386/filelist
https://packages.debian.org/bookworm/mipsel/libc6-mips64/filelist
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L295
https://salsa.debian.org/md/usrmerge/-/blob/master/convert-usrmerge?ref_type=heads#L517
http://bugs.debian.org/
1076491
Fixes https://github.com/systemd/systemd/issues/33919
(cherry picked from commit
b75c13731ee0867a8d7889348fc8da1869af7551)
Daan De Meyer [Sat, 3 Aug 2024 18:10:54 +0000 (20:10 +0200)]
meson: Use -fstrict-flex-arrays=3
Let's explicitly pass the value to -fstrict-flex-arrays. This does
not change behavior but it does (selfishly) make my error not bug
out with an error saying -fstrict-flex-arrays does not exist.
(cherry picked from commit
ad723ca3e5bd41d2d884760375534910bb55d9b3)
Mike Yuan [Sat, 3 Aug 2024 20:38:18 +0000 (22:38 +0200)]
core/execute-serialize: use serialize_item_escaped() for external paths
Otherwise, read_stripped_line() would spuriously drop trailing spaces.
Fixes #33924
(cherry picked from commit
9be46b1da8b01c3f47e6c050185f2b45484d6300)
Mike Yuan [Sat, 3 Aug 2024 20:37:41 +0000 (22:37 +0200)]
core/execute-serialize: drop extraneous '=' in ip-{in,e}gress serialization
(cherry picked from commit
f0fdd13c2f06f9c78747103b971566e2c62b9333)
Yu Watanabe [Fri, 2 Aug 2024 07:45:15 +0000 (16:45 +0900)]
man/net-naming-scheme: mention that NAMING_BRIDGE_MULTIFUNCTION_SLOT is reverted
Follow-up for
af7417ac7b07bc01232982bf46e9d72e69e7f820.
Closes #33596.
(cherry picked from commit
1c0130e8dc3c99d5a85be41e9172adb0ff0cf7fd)
Yu Watanabe [Fri, 2 Aug 2024 04:42:29 +0000 (13:42 +0900)]
man: extend explanation for ConfigureWithoutCarrier= in systemd.network(5)
Prompted by #33702.
(cherry picked from commit
347c8822d1a8a5b70624920b3de2a91d4e0fca91)
Daniel P. Berrangé [Fri, 2 Aug 2024 12:17:56 +0000 (13:17 +0100)]
man/systemd-detect-virt: list known CVM technologies
Add a section which lists the known confidential virtual machine
technologies.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit
a8fb5d21fd6127a6d05757c793cc9ba47f65c893)
Daniel P. Berrangé [Fri, 2 Aug 2024 10:03:10 +0000 (11:03 +0100)]
confidential-virt: add detection for s390x target
The s390x platform provides confidential VMs using the "Secure Execution"
technology, which is also referred to as "Protected Virtualization" or
just "prot virt" in Linux / QEMU.
This can be detected through a simple sysfs attribute.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
(cherry picked from commit
6c35e0a51cc6a852ce239ea46cd75c133212a68e)