Daan De Meyer [Fri, 19 Jul 2024 09:41:28 +0000 (11:41 +0200)]
meson: Drop ~devel suffix from systemd-stable version
Every commit in systemd-stable can be considered stable since CI has
to pass for every merge to stable and we don't do any RC releases or
extra testing when doing a new stable release. So let's reflect that
in the versioning by dropping the "~devel" suffix from meson.version.
This allows distributions to do releases from arbitrary commits in
systemd-stable without ending up with ~devel in their versions.
Daan De Meyer [Thu, 18 Jul 2024 20:35:11 +0000 (22:35 +0200)]
Merge pull request #33774 from DaanDeMeyer/mkosi-backport
v256-stable: Backport various mkosi changes
Daan De Meyer [Thu, 18 Jul 2024 11:01:27 +0000 (13:01 +0200)]
mkosi: Fix indentation
(cherry picked from commit
2315c6996f198b44034fab7a02dc4b8a21c13248)
Daan De Meyer [Thu, 18 Jul 2024 10:53:53 +0000 (12:53 +0200)]
mkosi: Fix typo
Our config parsing is flexible enough that this kind of worked surprisingly
enough.
(cherry picked from commit
ac31804db7b679ae4a4ea028642b87e528ed3a6b)
Daan De Meyer [Thu, 18 Jul 2024 10:51:44 +0000 (12:51 +0200)]
mkosi: Drop util-linux from centos/fedora packages
It's already included in the packages list in mkosi.conf.
(cherry picked from commit
91cc65c5ad6135f428cd6500d19268581ece70b2)
Daan De Meyer [Thu, 18 Jul 2024 10:48:48 +0000 (12:48 +0200)]
mkosi: Drop udev from Packages= list
It's pulled in via VolatilePackages=, no need to put it in Packages=.
(cherry picked from commit
1d914b268c116f5491f02bb554e45483404ed82a)
Daan De Meyer [Thu, 18 Jul 2024 10:47:51 +0000 (12:47 +0200)]
mkosi: Fix formatting
All of our lists start on the next line, so let's make KernelCommandLine=
fit that as well.
(cherry picked from commit
1250dc6a1d4fe1dbb8bcd21fc642c4ffdc60e0c7)
Daan De Meyer [Thu, 18 Jul 2024 06:46:14 +0000 (08:46 +0200)]
mkosi: Build CentOS Stream 10 images by default
CentOS Stream 10 has a newer util-linux which means the terminal
gets correctly resized to the size specified by mkosi. This is a
much nicer experience than CentOS Stream 9 where you're stuck on
80x24 so let's make CentOS Stream 10 the default release to build.
(cherry picked from commit
773f2e9633677298985c1f2991556aeed60c2843)
Daan De Meyer [Thu, 11 Jul 2024 14:09:47 +0000 (16:09 +0200)]
mkosi: Streamline running the integration tests without building systemd
Let's document in detail how to build the integration test image and run
the integration tests without building systemd. To streamline the process,
we stop automatically using binaries from build/ when invoking mkosi directly
and don't automatically use a tools tree anymore if systemd on the host is too
old. Instead, we document these options in HACKING.md and change the mkosi meson
target to automatically use the current build directory as an extra binary search
path for mkosi.
(cherry picked from commit
d279ec4a50d83ab44200ea410fa09d7ba2e5c824)
Daan De Meyer [Fri, 28 Jun 2024 07:58:56 +0000 (09:58 +0200)]
meson: Drop genkey target
In mkosi.images/system/mkosi.conf, we configure the certificate as
an extra tree so it's available inside the image. However, we pick up
the certificate from the top level repository directory and not from the
build directory where it is generated by the genkey meson target.
We currently have no way to access the build directory that mkosi was
invoked from when parsing the configuration file. Thus we have no way to
specify the correct location to the certificate when it's located in the
build directory.
For now, let's look for the key and certificate in the top level repository
root directory and drop the genkey target.
We don't have to change the Github Actions CI because it already runs genkey
manually before the image build (which is something we forgot to remove when
introducing the genkey target and is the reason this didn't cause issues before).
(cherry picked from commit
b00f44c3cff083972b0458359bbb5b80f0d10931)
Daan De Meyer [Thu, 11 Jul 2024 14:09:15 +0000 (16:09 +0200)]
mkosi: Skip sync script if NO_BUILD is enabled
If we're not doing a build, there's no point in syncing either so
lets skip it.
(cherry picked from commit
bb8f6ac445b80f9621503bec7a22caa57bb10ee4)
Daan De Meyer [Wed, 17 Jul 2024 16:56:02 +0000 (18:56 +0200)]
mkosi: Remove enforcing=0 from default kernel command line
We already have selinux=0 in the default kernel command line so
enforcing=0 is redundant. Instead, pass in enforcing=0 when we
enable selinux in TEST-06-SELINUX.
(cherry picked from commit
f5c44df92922d74cfff40989d6617e3a9e4c5904)
Daan De Meyer [Wed, 17 Jul 2024 16:55:24 +0000 (18:55 +0200)]
mkosi: Stop setting apparmor=0
It doesn't get pulled in as a dependency anyway and kernel command
line space is precious so let's remove apparmor=0 as it's a noop
anyway.
(cherry picked from commit
5319be5f0c68d7edb09438419ca4171e4692c859)
migleeson [Wed, 17 Jul 2024 07:45:26 +0000 (03:45 -0400)]
docs: update mkosi version mentioned in HACKING.md (#33723)
* fix: update docs since the default config uses a setting only available in v23
* fix: update docs to only refer to installing from the mkosi repo
(cherry picked from commit
cb2d6214caa25b8297bde01bb8bb925957b04ba7)
Daan De Meyer [Tue, 16 Jul 2024 15:51:55 +0000 (17:51 +0200)]
Merge pull request #33735 from DaanDeMeyer/backport-mkosi
v256-stable: Backport mkosi and test related changes
Daan De Meyer [Tue, 2 Jul 2024 16:34:39 +0000 (18:34 +0200)]
repart: Allow overriding fstype per partition designator
$SYSTEMD_REPART_OVERRIDE_FSTYPE is too invasive. Often you want to
override the fstype only for a specific designator, so let's support
that as well.
(cherry picked from commit
90a255779d1f8e6697e08e91918df88bb52274ad)
Daan De Meyer [Tue, 16 Jul 2024 12:15:38 +0000 (14:15 +0200)]
mkosi: List library packages explicitly in VolatilePackages=
These should already get pulled in as dependencies, but it doesn't
hurt to be explicit.
(cherry picked from commit
b209fff3a51b8e57ea5970575bf8d4db4790b620)
Daan De Meyer [Tue, 16 Jul 2024 10:07:38 +0000 (12:07 +0200)]
mkosi: Build initrd as a subimage
Let's make things a little more consistent and build the initrd
explicitly as a subimage as well instead of relying on mkosi building
it as part of the main image build.
We drop the opensuse initrd postinst script as we don't use erofs by
default anymore. We can always reintroduce it again later if needed.
(cherry picked from commit
68ee9771145464949d36d62a0ec687ecfb39290a)
Daan De Meyer [Tue, 16 Jul 2024 09:45:43 +0000 (11:45 +0200)]
mkosi: Drop CacheOnly=always from two subimages
This is a universal setting and can only be configured in the main
image so let's drop it from the subimages.
(cherry picked from commit
244952b1ead7bb14058a873fded2cb9709c82a95)
Daan De Meyer [Mon, 15 Jul 2024 21:07:52 +0000 (23:07 +0200)]
TEST-13-NSPAWN: make sure we don't load libnss_systemd
Let's make sure we don't load libnss_systemd.so from bash as the
necessary environment variables aren't set to make that work when
we're running with sanitizers enabled.
We can't add a sanitizer wrapper for bash as the wrapper runs using
bash so you end up in a loop.
(cherry picked from commit
5ac0dc70ff330a531539a92552fbeb0f542edfb5)
Daan De Meyer [Mon, 15 Jul 2024 15:15:43 +0000 (17:15 +0200)]
mkosi: Disable unique debug source names
We use -fdebug-prefix-map= because debugedit doesn't work for us (for
a currently unknown reason since it's the most obtuse code I've ever
had the pleasure of reading). With all the unique macros enabled, the
destination directory we pass to -fdebug-prefix-map= includes the package
release. The release is either the timestamp of the current commit or
the current time if the working tree is dirty. This means it generally
changes every time we rerun the build script. However, meson only reads
compiler arguments the first time it is invoked or if --wipe is specified.
This means that on a rerun -fdebug-prefix-map= will be configured wrong
and the build will fail.
Let's prevent this from happening by disabling the unique debug source
names by overriding the --unique-debug-src-base option that is passed to
find-debuginfo.sh by rpm via the _find_debuginfo_opts macro.
(cherry picked from commit
88221219a3290ee20de27aa030c2b23f03d8238a)
Daan De Meyer [Mon, 15 Jul 2024 10:26:04 +0000 (12:26 +0200)]
systemd-networkd-tests: Skip tests requiring dhcpd if it is not available
dhcpd is not available on CentOS Stream 10
See https://github.com/systemd/systemd/issues/33717
(cherry picked from commit
985d5b4bc23f791bdc79d4c2a9a949cc5d3bc27a)
Daan De Meyer [Mon, 15 Jul 2024 07:21:51 +0000 (09:21 +0200)]
TEST-55-OOMD: Remove the opensuse user@ dropin
Required to make TEST-55-OOMD pass on OpenSUSE.
(cherry picked from commit
f65ec2e90483689546d4d700c5ad8475f19a3ab7)
Daan De Meyer [Sun, 14 Jul 2024 20:56:43 +0000 (22:56 +0200)]
mkosi: Install binutils
(cherry picked from commit
a1071c12499c7a5d918f5a6c93d052efbcaec803)
Daan De Meyer [Sun, 14 Jul 2024 20:27:09 +0000 (22:27 +0200)]
TEST-64-UDEV-STORAGE: Use max_ioqpairs instead of num_queues
Fixes a deprecation warning from qemu.
(cherry picked from commit
d97b48176b072211be099318f75dfea62820b4f8)
Daan De Meyer [Fri, 12 Jul 2024 14:45:04 +0000 (16:45 +0200)]
mkosi: Use clang --print-runtime-dir
(cherry picked from commit
6e212a6db9fb04ebb5dd4f365e7cb3a9a9b59e2b)
Daan De Meyer [Fri, 12 Jul 2024 14:42:00 +0000 (16:42 +0200)]
mkosi: Extend arch build script comment about symlinks
(cherry picked from commit
54ab97e59dfa048dd563e2918b594db267efd698)
Daan De Meyer [Fri, 12 Jul 2024 14:04:22 +0000 (16:04 +0200)]
test: do not attempt to set xattr on tmpfs
This is only possible since a recent kernel version, and fails otherwise,
like on CentOS 9
(cherry picked from commit
ff8c89aa5a84733dd777f3e9113df33ce6c1ab1e)
Daan De Meyer [Thu, 11 Jul 2024 13:49:17 +0000 (15:49 +0200)]
mkosi: Add CI for CentOS Stream 10
We switch to the c10s-sig-hyperscale branch of the spec repository
as it will receive all the latest changes the earliest before they
end up in the c9s-sig-hyperscale branch.
(cherry picked from commit
8b32cc79ec028fa783072676346141821444b638)
Daan De Meyer [Thu, 11 Jul 2024 14:19:20 +0000 (16:19 +0200)]
mkosi: Use squashfs for sysext if mkfs.erofs is not available
CentOS Stream 10 does not have erofs-utils so let's add a fallback
to squashfs when building the sysext.
(cherry picked from commit
3cfb020cb9ce5958ac39a7fd586cc4e893a7b190)
Daan De Meyer [Fri, 5 Jul 2024 09:56:44 +0000 (11:56 +0200)]
mkosi: Make epel repositories optional for CentOS Stream 9
This allows us to add CI for CentOS Stream 10 as EPEL 10 doesn't
exist yet and won't exist for quite some time.
CentOS Stream 10 will be enabled later as soon as
https://issues.redhat.com/browse/RHEL-46604 is resolved.
(cherry picked from commit
0e4a7ab6d5601785e326851b3f1b6a3367ec98ec)
Daan De Meyer [Fri, 12 Jul 2024 13:33:49 +0000 (15:33 +0200)]
mkosi: Introduce build image
We want the exitrd image to be built with the latest systemd as well.
As the exitrd image is built as part of mkosi.images, and all subimages
are built before the main image, this implies the packages must be built
as a subimage in mkosi.images/ as well. So we introduce the build image and
move all logic related to building distribution packages there.
This also has the nice side effect of slimming down the main image as the
build dependencies are not installed into the main image anymore. It also
makes sure the packages are built in a "clean" chroot without any of the
other packages which we install in the main image available.
(cherry picked from commit
7205fc7dc31eb2be3075ee6ba23ebe84324aa5cb)
Daan De Meyer [Sun, 14 Jul 2024 15:50:23 +0000 (17:50 +0200)]
mkosi: update fedora commit reference
*
a3524fc837 Use a more precise Recommends for libkxbcommon
*
980ede8c0f Drop machined revert
*
d569018a92 Rebuilt for the bin-sbin merge
*
8881fa94ee Version 256.2
*
1cc4f83002 Link systemd-executor statically
*
0319e62d9c Update dracut workaround
*
c96f54de22 Fix ELN build
*
3f68c5d802 Only exclude dracut conflicts on non-fedora on upstream builds
*
7db154308b Conditionalize dracut Conflicts more
(cherry picked from commit
72a8f508e54188c64687633f96021c185a79938c)
Daan De Meyer [Fri, 12 Jul 2024 14:09:21 +0000 (16:09 +0200)]
mkosi: Update to latest
(cherry picked from commit
9e8cfe5daacce9e74a1f063b1048d71f7843f90e)
Daan De Meyer [Thu, 11 Jul 2024 14:42:06 +0000 (16:42 +0200)]
Merge pull request #33691 from DaanDeMeyer/backport-mkosi
Backport mkosi and integration test changes to v256-stable
Daan De Meyer [Thu, 11 Jul 2024 11:19:11 +0000 (13:19 +0200)]
mkosi: Switch back to code.opensuse.org for opensuse
The commits on src.opensuse.org keep disappearing so let's switch
back to code.opensuse.org.
(cherry picked from commit
a86211b7cad84cde6c9e330e3bbba7b538fa7f1a)
Luca Boccassi [Tue, 9 Jul 2024 17:42:06 +0000 (18:42 +0100)]
test: install split-out sshd-session binary if present
Archlinux split out one ssh binary, install it in the legacy test
setup if present for the tests that need ssh
(cherry picked from commit
aaa7b36bd15ca3a96a1e11a557482b0bc59c769f)
Daan De Meyer [Wed, 10 Jul 2024 12:20:34 +0000 (14:20 +0200)]
mkosi: update opensuse commit reference
*
8c025c3bdf Accepting request
1184267 from Base:System
|\
| *
735f8c4ba4 - Import commit
5a8eadd0c021758337a020c423f25a353bdb9b3c (merge of v255.8) For a complete list of changes, visit: https://github.com/openSUSE/systemd/compare/
603cd1d4d81147d4f2eccd5e352064a4215119b4...
5a8eadd0c021758337a020c423f25a353bdb9b3c - Drop 5003-Revert-run-pass-the-pty-slave-fd-to-transient-servic.patch as v255.8 contains the workaround (commit
639c922ede9485) for the broken commit
28459ba1f4df.
* |
37853fecc3 Accepting request
1183029 from Base:System
|/
*
638de11012 - Don't automatically clean unmodified config files up (bsc#
1226415)
*
369c023c24 reorder one more time...
*
ffa9f0ac80 reorder the runtime deps of the testsuite package so the format_spec_file thingy stop screwing up the spec file...
*
12c1190a79 fix rev 1529: the devel packages are really needed by the testsuite script to install the dlopened libs into the image
*
ca8e7f54ce - systemd.spec: move a misplaced %endif in the testsuite sub-package.
*
b7944f5b14 - Merge systemd-coredump back into the main package (bsc#
1091684)
*
3fa0dea84a - Don't pull the devel packages in when installing the testsuite package.
(cherry picked from commit
eb6f177ae4ec25ba8efaab5268a7c36195f0bf62)
Daan De Meyer [Wed, 10 Jul 2024 12:34:32 +0000 (14:34 +0200)]
tools/update-distro-hash: Fix path
(cherry picked from commit
dfea7a8d2655988e30c0d8ca56a1c7aeefc47d80)
Daan De Meyer [Tue, 9 Jul 2024 10:26:11 +0000 (12:26 +0200)]
TEST-06-SELINUX: Various fixes
- Stop installing the policy in the initramfs as it's not really
supported anyway (https://github.com/fedora-selinux/selinux-policy/issues/2221)
- Stop relabeling on first boot and prefer to do it at image build time
- Disable mkosi relabeling by default but enable it in CI
- Build image as root in CI so the SELinux relabeling works properly
(cherry picked from commit
dedd712dd9b4883678765b9bc1a8ac349cf24f3b)
Daan De Meyer [Fri, 5 Jul 2024 09:24:27 +0000 (11:24 +0200)]
mkosi: Don't fail if /var/log/journal does not exist
(cherry picked from commit
877842ed521c5cdf5dd0b50127b51466959a606e)
Daan De Meyer [Fri, 5 Jul 2024 08:27:56 +0000 (10:27 +0200)]
test: Switch to ncat instead of nc
ncat is available in CentOS Stream 9 without having to enable EPEL.
(cherry picked from commit
e842deeac64b22903a3532728c11cefb640d94ba)
Daan De Meyer [Fri, 5 Jul 2024 07:58:17 +0000 (09:58 +0200)]
TEST-55-OOMD: Switch to stress-ng
stress-ng is available in OpenSUSE and in CentOS Stream without needing
EPEL so let's switch to it instead of stress.
(cherry picked from commit
3e3a15c06e03f1bec209066da5b1340e1dd03dc8)
Daan De Meyer [Wed, 10 Jul 2024 15:03:59 +0000 (17:03 +0200)]
docs: Simplify update commands in HACKING.md
Let's make use of mkosi ssh to give everyone a one liner to run instead
of having to execute two commands (one outside the VM, one inside).
(cherry picked from commit
00acdb314768fac76b563857e2ab4a8e33b7be23)
Daan De Meyer [Wed, 10 Jul 2024 14:52:54 +0000 (16:52 +0200)]
mkosi: Update to latest
(cherry picked from commit
d5c3868181f82783214baa9a4498ae6aad1623f5)
Daan De Meyer [Wed, 10 Jul 2024 08:07:05 +0000 (10:07 +0200)]
mkosi: Build a sysext if SYSEXT=1 is specified
(cherry picked from commit
612a98a0652387d857198cb92dea03ddf1bbbe43)
Daan De Meyer [Tue, 9 Jul 2024 18:02:47 +0000 (20:02 +0200)]
mkosi: Check for configured build directory if WIPE=1
Otherwise trying to use --wipe might fail if the build directory
has not been configured but is not empty either.
(cherry picked from commit
73b3179a5375d3fe7a58b5686446dddd3a14a734)
Daan De Meyer [Wed, 10 Jul 2024 08:05:59 +0000 (10:05 +0200)]
mkosi: Install erofs-utils
(cherry picked from commit
ece66c01cf1bd705a7ffbf5b71f2b0b1f8567a06)
Daan De Meyer [Tue, 9 Jul 2024 16:21:00 +0000 (18:21 +0200)]
Merge pull request #33674 from DaanDeMeyer/backport-mkosi
v256-stable: Backport various mkosi changes
Daan De Meyer [Tue, 9 Jul 2024 06:07:53 +0000 (08:07 +0200)]
mkosi: Fix git commit
In https://github.com/systemd/systemd/pull/33659 the commit was
updated to point to my fork without changing it back after the mkosi
PR was merged so let's change it back to point to the official
repository.
(cherry picked from commit
c8ce41954be9eb06750a9302cbc1f80f1111e067)
Daan De Meyer [Mon, 8 Jul 2024 10:59:52 +0000 (12:59 +0200)]
mkosi: Adapt configuration to take into account configuration rework
In https://github.com/systemd/mkosi/pull/2847, the '@' specifier is
removed, CLI arguments take priority over configuration files again
and the "main" image is defined at the top level instead of in
mkosi.images/. Additionally, not every setting from the top level
configuration is inherited by the images in mkosi.images/ anymore,
only settings which make sense to be inherited are inherited.
This commit gets rid of all the usages of '@', moves the "main" image
configuration from mkosi.images/system to the top level and gets rid
of various hacks we had in place to deal with quirks of the old
configuration parsing logic.
We also remove usages of Images= and --append as these options are
removed by the mentioned PR.
(cherry picked from commit
20345a86b7157e229c1c7e3976005548bad159a4)
Luca Boccassi [Fri, 5 Jul 2024 15:36:45 +0000 (16:36 +0100)]
mkosi: use apt pinning for locally built debian/ubuntu packages
This ensures that even in case the distro repository has newer
versions, the locally built packages are preferred and installed,
even to the point of downgrading already installed ones.
This is needed especially for future stable branches, when the
distros will have a newer version.
(cherry picked from commit
1ee8e526d77cf8eb8ad39622848d87891b7ac13a)
Daan De Meyer [Fri, 5 Jul 2024 17:16:31 +0000 (19:16 +0200)]
mkosi: Make .autorelabel file empty
The contents of this file are passed as arguments to fixfiles so
let's remove the comment as otherwise fixfiles just crashes.
(cherry picked from commit
5eab7c5097a830d6ac26485ec5b80e384f2044c7)
Daan De Meyer [Fri, 5 Jul 2024 10:00:53 +0000 (12:00 +0200)]
mkosi: Update to latest
(cherry picked from commit
b494c7bcb49f95aeff146c8a5b6be6cdbb9f60e9)
dependabot[bot] [Mon, 1 Jul 2024 09:49:46 +0000 (09:49 +0000)]
build(deps): bump actions/checkout from 4.1.6 to 4.1.7
Bumps [actions/checkout](https://github.com/actions/checkout) from 4.1.6 to 4.1.7.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/
a5ac7e51b41094c92402da3b24376905380afc29...
692973e3d937129bcbf40652eb9f2f61becf3332)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
(cherry picked from commit
502fbea8c118abe80733d383a9d9fc91becbed39)
(cherry picked from commit
01721bf2687d417a3620ce72b4598662ba7c7146)
Luca Boccassi [Mon, 8 Jul 2024 15:44:01 +0000 (16:44 +0100)]
mkosi: policykit-1 was renamed to polkitd
(cherry picked from commit
bffd3c52ad7113f21523568120d84326151f4600)
Daan De Meyer [Fri, 5 Jul 2024 07:35:43 +0000 (09:35 +0200)]
mkosi: Use the "default" root filesystem for each distribution
Let's not insist on btrfs everywhere.
93440db8b5eae1244aaf5fecfa68050a8b26f3e3
switched us back to btrfs as we wanted to rely on the fact it records
timestamps properly. Since we now prefer to do incremental builds on the host
with "mkosi -t none" we don't mind anymore that timestamps are not recorded
properly so we're not forced to use btrfs anymore.
This also increases test coverage as we'll now test with different root
filesystems.
(cherry picked from commit
5db8db5e346371c7f11805f1a07e7f3e1c48a96b)
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2024 15:05:31 +0000 (17:05 +0200)]
meson: add option to build systemd-executor "statically"
The new link-executor-shared option is similar to the existing
link-udev-shared: when set to false, we link to the static versions of our
internal libraries.
The resulting exuctor binary is fairly large, about as large as libsystemd-core
(14 MB without lto, 8 with lto).
This is intended as a workaround for the fuckup with the pinned executor
binary:
when an upgrade is performed, the package manager will install new version of
the libraries and new version of the code, and some time later reexecute the
managers. This creates a window when the pinned executor binary will fail to
execute. There are two factors which make the issue easier to hit:
- when the distribution uses a finely-grained shared-lib-tag. E.g. Fedora
uses version-release as the tag, which means that the issue occurs on
every package upgrade. This is the right thing to do, because the
ABI of our internal libraries is not stable at all, so replacing the
library from a different version in place creates a window where our
programs may crash or misbehave.
- when the distribution doesn't immediately reexec all the managers after
upgrade. In early versions of systemd, we used to hammer the machine during
upgrade, doing daemon-reexecs repeatedly. This works, but is ugly and
wasteful. Doing the reexecs while the upgrade is in progres also creates a
window where a mix of old and new configs or both is loaded. Users are
particularly annoyed by those reloads if there is some issue in the
configuration causing us to emit warnings on every reexec. Doing the
reexecs once after the new configuration and libraries have been put
in place is nicer.
The pinning of the executor binary breaks upgrades and in particular
it penalizes the distributions which make use of the features which
were previously added to avoid bugs and inefficiency during upgrades.
When the executor is linked statically, there is a smaller chance that it'll
fail to load libraries. The issue can still occur because other libraries, not
our own, are linked dynamically.
(cherry picked from commit
d59cae6cebd0fc25a16a020bd28e5303901f1b19)
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2024 15:03:26 +0000 (17:03 +0200)]
meson: build libsystemd-core via an intermediate static library
By itself, this is not useful. I'm making this a separate commit to
make debugging easier. It turns out that meson does static libraries
using references, so the "static library" a tiny stub stub that refers
to the object files on disk and this has negligible cost:
$ ls -lhd build/src/core/libsystemd-core-257.{a,so}
-rw-r--r-- 1 zbyszek zbyszek 36K Jul 3 16:54 build/src/core/libsystemd-core-257.a
-rwxr-xr-x 1 zbyszek zbyszek 6.1M Jul 3 16:54 build/src/core/libsystemd-core-257.so
(cherry picked from commit
d0689ee5fbfafa736e6eca89bc80cb2d372f2229)
Zbigniew Jędrzejewski-Szmek [Wed, 3 Jul 2024 14:51:05 +0000 (16:51 +0200)]
meson: rename libbasic to libbasic_static
Our variables for internal libraries are named 'libfoo' for the shared lib
variant, and 'libfoo_static' for the static lib variant. The only exception was
libbasic, because we didn't have a shared variant for it. But let's rename it
for consitency. This makes the build config easier to understand.
(cherry picked from commit
732ed8a84e8b264fccd3f5c0fc68ec2894b6d8ea)
Luca Boccassi [Fri, 5 Jul 2024 18:03:32 +0000 (19:03 +0100)]
Bump meson version to 256.3~devel
Luca Boccassi [Fri, 5 Jul 2024 18:02:52 +0000 (19:02 +0100)]
Finalize v256.2
Luca Boccassi [Fri, 5 Jul 2024 14:14:55 +0000 (15:14 +0100)]
mkosi: switch debian to ci/v256-stable branch
This branch will track changes for v256-stable
Mike Yuan [Thu, 4 Jul 2024 18:55:53 +0000 (20:55 +0200)]
workflows/labeler: do not set labels on stable backport PRs
(cherry picked from commit
5dfc88c12f541ff11ad53634be9ca40f13423467)
Mike Yuan [Thu, 4 Jul 2024 18:55:42 +0000 (20:55 +0200)]
labeler: match all mkosi files
(cherry picked from commit
a3370d5d94167eddf9b0e6efd6a76bb5348afb9d)
Mike Yuan [Thu, 4 Jul 2024 18:54:19 +0000 (20:54 +0200)]
labeler: remove matches for dropped files (Makefile)
(cherry picked from commit
5e12de940a4220b22754c12668474462df64090e)
Lennart Poettering [Thu, 4 Jul 2024 12:34:35 +0000 (14:34 +0200)]
vmm: make sure we can handle smbios objects without variable part
An smbios object with no variable part is a special case, it's just
suffixed with two NUL btes. handle that properly.
This is inspired by a similar fix from https://github.com/systemd/systemd/pull/29726
(cherry picked from commit
44ec70489f377d1fa9f4e19aed95a7e39da7d93d)
Luca Boccassi [Thu, 4 Jul 2024 15:58:46 +0000 (16:58 +0100)]
README: update requirements for signed dm-verity
The newest kconfig enabling DB-verified dm-verity images is queued
for 6.11:
https://patchwork.kernel.org/project/dm-devel/patch/
20240617220037.594792-1-luca.boccassi@gmail.com/
(cherry picked from commit
a79b6dc0706dd5fe76ec56b3308b402c133ead23)
Luca Boccassi [Thu, 4 Jul 2024 09:23:04 +0000 (10:23 +0100)]
sysusers: handle NSS errors gracefully
If the io.systemd.DynamicUser or io.systemd.Machine files exist,
but nothing is listening on them, the nss-systemd module returns
ECONNREFUSED and systemd-sysusers fails to creat the user/group.
This is problematic when ran by packaging scripts, as the package
assumes that after this has run, the user/group exist and can
be used. adduser does not fail in the same situation.
Change sysusers to print a loud warning but otherwise continue
when NSS returns an error.
(cherry picked from commit
fc9938d6f8e7081df5420bf88bf98f683b1391c0)
Lennart Poettering [Wed, 3 Jul 2024 08:18:37 +0000 (10:18 +0200)]
man: fully adopt ~/.local/state/
The XDG base dir spec adopted ~/.local/state/ as a thing a while back,
and we updated our docs in
b4d6bc63e602048188896110a585aa7de1c70c9b, but
forgot to to update the table at the bottom to fully reflect the update.
Fix that.
(cherry picked from commit
72a6296b16a75d4e26eec972f2999e69c9967b9d)
Lennart Poettering [Wed, 3 Jul 2024 08:10:07 +0000 (10:10 +0200)]
man: mention that distinction between /usr/lib/ and /usr/share/ is really about shared *ownership*
(cherry picked from commit
39aafbd42ac3d9675098c8212261fa56261d9066)
Lennart Poettering [Wed, 3 Jul 2024 07:56:51 +0000 (09:56 +0200)]
man: drop version info from file hiearchy man page
This file doesn't document features of systemd, but is more a of a
general description that generalizes/modernizes FHS. As such, the items
listed in it weren't "added" in systemd versions, they simply reflect
general concepts independent of any specific systemd version. hence
let's drop this misleading and confusing version info.
Or in other words, the man page currently claims under "/usr/": "Added
in version 215." – Which of course is rubbish, the directory existed
since time began.
This also rebreaks all paragaphs this touches.
No content changes.
(cherry picked from commit
26db8fe2478316825c5596e4b93b08176a8abddb)
Luca Boccassi [Wed, 3 Jul 2024 20:27:28 +0000 (21:27 +0100)]
os-util: avoid matching on the wrong extension-release file
The previous commit tries to extract a substring from the
extension-release suffix, but that is not right, it's only the
images that need to be versioned and extracted, use the extension-release
suffix as-is. Otherwise if it happens to contain a prefix that
matches the wrong image, it will be taken into account.
Follow-up for
37543971aff79f3a37646ffc2bb5845c9394797b
(cherry picked from commit
92d1fe3efac7b3a700317ec71b64cab5ebc17b42)
Topi Miettinen [Wed, 26 Jun 2024 19:06:41 +0000 (22:06 +0300)]
load-fragment: allow MountImages= with paths starting with /dev
For MountImages=, if the source is a block device, it will most likely reside
in /dev. It should be also possible to mount a static device file system in
place of (or part of) /dev. So let's allow paths starting with /dev as an
exception for MountImages=.
(cherry picked from commit
e81025970fed5673c631976711d45c67b0443bb4)
Ronan Pigott [Wed, 3 Jul 2024 19:33:08 +0000 (12:33 -0700)]
zsh: add run0 completions
(cherry picked from commit
ef98603f4b88738be3c262ee4bd06209e5a3edf5)
Daan De Meyer [Wed, 3 Jul 2024 20:59:40 +0000 (22:59 +0200)]
docs: Update HACKING
Let's mention the new way to install the latest changes without
rebuilding the image. Let's also remove the duplicate info about
distribution packages that is already mentioned in its own section.
(cherry picked from commit
a2403af3293aef9fa5cf32f5ab9fa4eebe5406db)
James Hilliard [Wed, 3 Jul 2024 19:00:04 +0000 (13:00 -0600)]
README: add missing CONFIG_MEMCG kernel config option for oomd
We need to enable this otherwise systemd-oomd.service fails to start.
Fixes:
ConditionControlGroupController=memory was not met
(cherry picked from commit
aa329b89223a79793cde8288b1bc6e93db174938)
Brenton Simpson [Wed, 3 Jul 2024 13:40:26 +0000 (15:40 +0200)]
boot: cover for hardware keys on phones/tablets
The patch is originally from Brenton Simpson, I (Lennart) just added some
comments and rebased it.
I didn't test this, but the patch looks so obviously right to me, that
I think we should just merge it, instead of delaying this further. In
the worst case noone notices, in the best case this makes sd-boot work
reasonably nicely on devices that only have a hadware power key + volume
rocker.
Fixes: #30598
Replaces: #31135
(cherry picked from commit
2fda6f5fffcc05adaa5a08d976e09ad7cc97c1b3)
Mike Yuan [Tue, 2 Jul 2024 16:30:44 +0000 (18:30 +0200)]
core/manager: invoke special targets on signal only for system manager
(cherry picked from commit
6851abe40381cd2c5f059eccc22c6967d0b034e5)
Mike Yuan [Tue, 2 Jul 2024 16:08:06 +0000 (18:08 +0200)]
core/dbus-manager: refuse SoftReboot() for user managers
Otherwise, busctl --user call ... SoftReboot results in
user manager broadcasting signal and initiating soft-reboot...
(cherry picked from commit
236cd4854657745e1a59b224a191a232a476527e)
Daan De Meyer [Tue, 2 Jul 2024 15:50:57 +0000 (17:50 +0200)]
meson: Define __TARGET_ARCH macros required by bpf
These are required by the bpf_tracing.h header in libbpf, see
https://github.com/libbpf/libbpf/blob/master/src/bpf_tracing.h.
bpf_tracing.h does have a few fallbacks in case __TARGET_ARCH_XXX
is not defined but recommends using the __TARGET_ARCH macros instead
so let's do that.
(cherry picked from commit
48d6dad100d0b42c02aa21d897e913461f6b3cc3)
Luca Boccassi [Tue, 2 Jul 2024 14:28:47 +0000 (15:28 +0100)]
coredump: correctly take tmpfs size into account for compression
We calculate the amount of uncompressed data we can write by taking the limits
into account and halving it to ensure there's room for switching to compression
on the fly when storing cores on a tmpfs (eg: due read-only rootfs).
But the logic is flawed, as taking into account the size of the tmpfs storage
was applied after the halving, so in practice when an uncompressed core file
was larger than the tmpfs, we fill it and then fail.
Rearrange the logic so that the halving is done after taking into account
the tmpfs size.
(cherry picked from commit
e6b2508275aac2951aedfc842735d8ebc29850bb)
Luca Boccassi [Tue, 11 Jun 2024 22:07:17 +0000 (23:07 +0100)]
docs: update RELEASE.md to use same repository for stable branches
(cherry picked from commit
62cc0aca1750e90dce20463fab03362c26d6df0f)
Daan De Meyer [Wed, 26 Jun 2024 13:35:30 +0000 (15:35 +0200)]
docs: Add section to HACKING.md on distribution packages
(cherry picked from commit
17ef81a764995dfd0f43daf34dcf2ab04806e760)
Mike Yuan [Tue, 2 Jul 2024 17:20:01 +0000 (19:20 +0200)]
docs/CODING_STYLE: document that we nowadays prefer (const char*) for func ret type
Addresses https://github.com/systemd/systemd/pull/33567#discussion_r1662818225
(cherry picked from commit
4b7249111a4c1d366f476bdbd6e03f7893eb9d42)
Franck Bui [Tue, 2 Jul 2024 16:55:17 +0000 (18:55 +0200)]
test: fix TEST-74-AUX-UTILS.ssh.sh on SUSE
(cherry picked from commit
252542ffc3fda9b110d108a1bce1a1d562baebd4)
Franck Bui [Tue, 2 Jul 2024 13:20:18 +0000 (15:20 +0200)]
test: preserve symlink in inst_recursive()
On SUSE this function is used to copy symlinks installed in *.wants/
directories.
(cherry picked from commit
855bad331e28a03d7ad5831caacd3481db938180)
Franck Bui [Tue, 2 Jul 2024 08:33:29 +0000 (10:33 +0200)]
test: fix TEST-24-CRYPTSETUP on SUSE
/etc/systemd/journald.conf.d drop-in dir already exists on SUSE.
(cherry picked from commit
56a894e888002f44f3463b3188f9d5abdcca4bb0)
Franck Bui [Mon, 1 Jul 2024 16:06:45 +0000 (18:06 +0200)]
test: install /etc/hosts
Needed for resolving the "localhost" hostname.
(cherry picked from commit
a09825ce9fb3bd315f35654b6e6ee4f92c675cde)
Daniel Rusek [Thu, 6 Jun 2024 21:44:38 +0000 (23:44 +0200)]
test: split the resolved test suite into separate test cases
Although being far from ideal and the first two test cases have to be run
before the setup phase otherwise they will fail, it still makes the test
suite look much better and easier to read
(cherry picked from commit
a9d472d6e4ae6c548dd24097b20563dc9c06b329)
Luca Boccassi [Mon, 1 Jul 2024 14:49:55 +0000 (15:49 +0100)]
mkosi: update debian commit reference
*
abf24e775c Add recommends on linux-sysctl-defaults
*
76cb4138d2 autopkgtest: skip qemu tests on arm64
*
0935d73526 Install new systemd-import generator
(cherry picked from commit
4739539a7866f660cec5d746af65a951cdab8dc4)
Lennart Poettering [Mon, 1 Jul 2024 10:40:33 +0000 (12:40 +0200)]
units: add dep on systemd-logind.service by user@.service
Let's make sure logind is accessible by the time user@.service runs, and
that logind stays around as long as it does so.
Addresses an issue reported here:
https://lists.freedesktop.org/archives/systemd-devel/2024-June/050468.html
This addresses an issued introduced by
278e815bfa3e4c2e3914e00121c37fc844cb2025, which dropped the a dependency
from user@.service systemd-user-sessions.service without replacement.
While dropping that dependency does make sense, it should have been
replaced with the weaker dependency on systemd-logind.service, hence fix
that now.
user@.service is after all a logind concept, hence logind really should
be around for its lifetime.
systemd-user-sessions.service is a later milestone that only really
should apply to regular users (not root), hence it's too strong a
requirement.
(cherry picked from commit
29294d21cf82323bf04a9dbb5a03d48d6f758822)
Lennart Poettering [Mon, 1 Jul 2024 08:25:38 +0000 (10:25 +0200)]
repart: add sections to --help text
(cherry picked from commit
68debef4c12e7a25362e8ddbc752feee8c13762b)
rhellstrom [Thu, 27 Jun 2024 08:00:00 +0000 (11:00 +0300)]
Conditional PSI check to reflect changes done in 5.13
cpu.pressure 'full' is undefined for system-wide checks since 5.13 but still reported with values set to 0 for backwards compatibility. Made changes to reflect this for system-wide checks so that the conditional comparison is not made against the 0 value and instead fall back to 'some'.
https://www.kernel.org/doc/html/latest/accounting/psi.html
(cherry picked from commit
98b1ecc9175a8bb241292f6f441a754b6759dd97)
Luca Boccassi [Sat, 29 Jun 2024 17:31:23 +0000 (18:31 +0100)]
core: try again bind mounting if the destination was already created
If the destination mount point is on a shared filesystem and is
missing on the first attempt, we try to create it, but then
fail with -EEXIST if something else created it in the meanwhile.
Enter the retry logic on EEXIST, as we can just use the mount
point if it was already created.
Fixes https://github.com/systemd/systemd/issues/29690
(cherry picked from commit
c3f0f6f8bd812fee4b2ab658a5cc9ac9167d387d)
Daan De Meyer [Sat, 29 Jun 2024 13:27:02 +0000 (15:27 +0200)]
mkfs-util: Set sector size for btrfs as well
btrfs used to default the sector size to the page size and didn't
support anything else. Since 6.7, it defaults to 4K and using 4K
makes the filesystem compatible with all page sizes. So let's make
sure we use minimum 4K as well (lower causes failures on systems with
a 4K page size) but still allow larger sector sizes if specified by
the user.
(cherry picked from commit
03c9e88fb7eb8973477c33aa63dc6bcf0cab52c9)
Daan De Meyer [Sat, 29 Jun 2024 13:36:28 +0000 (15:36 +0200)]
repart: Don't set filesystem sector size to 512
We want to use 4K as the default sector size for filesystems so they
don't have to be regenerated to work on 512, 2048 or 4096 sector sizes.
(cherry picked from commit
d34361149f897eac5c6a41854fa4edca4804b49b)
Daan De Meyer [Fri, 28 Jun 2024 17:36:50 +0000 (19:36 +0200)]
repart: Log more about filesystem sector size
(cherry picked from commit
0e445aaa8553ff4ddf8330913260e5f167b1690d)
Mike Yuan [Fri, 28 Jun 2024 13:32:33 +0000 (15:32 +0200)]
core/unit: follow merged units before updating SourcePath= timestamp too
Currently, we only follow merged units for unit_load_dropin() call.
But if the unit is an alias, we should always perform operations
on the "canonical" unit.
(cherry picked from commit
740cd1e0f2ae5cc1a10d2111d63cc4e975761091)
Zbigniew Jędrzejewski-Szmek [Fri, 28 Jun 2024 16:52:59 +0000 (18:52 +0200)]
meson: use less verbose quoting
(cherry picked from commit
c96cb64dce2e15f50253b34538662845e25e8d1c)