1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-09 01:18:19 +03:00
Commit Graph

74673 Commits

Author SHA1 Message Date
Daan De Meyer
abc3a61e59 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 72a8f508e5)
2024-07-16 15:10:28 +02:00
Daan De Meyer
748cd5a703 mkosi: Update to latest
(cherry picked from commit 9e8cfe5daa)
2024-07-16 15:10:20 +02:00
Daan De Meyer
6d07d59237
Merge pull request #33691 from DaanDeMeyer/backport-mkosi
Backport mkosi and integration test changes to v256-stable
2024-07-11 16:42:06 +02:00
Daan De Meyer
180814f22f 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 a86211b7ca)
2024-07-11 14:13:20 +02:00
Luca Boccassi
976a0d998e 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 aaa7b36bd1)
2024-07-11 13:48:52 +02:00
Daan De Meyer
ca97b9a7e6 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:   603cd1d4d8...5a8eadd0c0 - 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   28459ba1f4.
* | 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 eb6f177ae4)
2024-07-11 12:48:58 +02:00
Daan De Meyer
fef4746218 tools/update-distro-hash: Fix path
(cherry picked from commit dfea7a8d26)
2024-07-11 12:48:49 +02:00
Daan De Meyer
54eb9b9301 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 dedd712dd9)
2024-07-11 12:48:41 +02:00
Daan De Meyer
de6c473b40 mkosi: Don't fail if /var/log/journal does not exist
(cherry picked from commit 877842ed52)
2024-07-11 12:48:33 +02:00
Daan De Meyer
74475a5169 test: Switch to ncat instead of nc
ncat is available in CentOS Stream 9 without having to enable EPEL.

(cherry picked from commit e842deeac6)
2024-07-11 12:48:24 +02:00
Daan De Meyer
0c51e28088 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 3e3a15c06e)
2024-07-11 12:48:18 +02:00
Daan De Meyer
0c7d634157 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 00acdb3147)
2024-07-11 12:48:12 +02:00
Daan De Meyer
5685a59371 mkosi: Update to latest
(cherry picked from commit d5c3868181)
2024-07-11 12:48:04 +02:00
Daan De Meyer
370bf11ec4 mkosi: Build a sysext if SYSEXT=1 is specified
(cherry picked from commit 612a98a065)
2024-07-11 12:47:55 +02:00
Daan De Meyer
0bdb879b3c 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 73b3179a53)
2024-07-11 12:47:48 +02:00
Daan De Meyer
880c32b7e3 mkosi: Install erofs-utils
(cherry picked from commit ece66c01cf)
2024-07-11 12:47:42 +02:00
Daan De Meyer
cd357eb029
Merge pull request #33674 from DaanDeMeyer/backport-mkosi
v256-stable: Backport various mkosi changes
2024-07-09 18:21:00 +02:00
Daan De Meyer
c350e02631 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 c8ce41954b)
2024-07-09 15:19:02 +02:00
Daan De Meyer
00bcc619db 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 20345a86b7)
2024-07-09 15:18:51 +02:00
Luca Boccassi
3cf12f4f9a 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 1ee8e526d7)
2024-07-09 15:18:38 +02:00
Daan De Meyer
7ab51fef1f 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 5eab7c5097)
2024-07-09 15:17:41 +02:00
Daan De Meyer
0123dbee1b mkosi: Update to latest
(cherry picked from commit b494c7bcb4)
2024-07-09 15:17:02 +02:00
dependabot[bot]
32981c454c 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](a5ac7e51b4...692973e3d9)

---
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 502fbea8c1)
(cherry picked from commit 01721bf2687d417a3620ce72b4598662ba7c7146)
2024-07-09 15:16:54 +02:00
Luca Boccassi
ab11d7e177 mkosi: policykit-1 was renamed to polkitd
(cherry picked from commit bffd3c52ad)
2024-07-09 15:13:28 +02:00
Daan De Meyer
8dd54e5adc mkosi: Use the "default" root filesystem for each distribution
Let's not insist on btrfs everywhere. 93440db8b5
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 5db8db5e34)
2024-07-09 15:13:12 +02:00
Zbigniew Jędrzejewski-Szmek
d28aa922fd 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 d59cae6ceb)
2024-07-08 19:26:15 +02:00
Zbigniew Jędrzejewski-Szmek
c3b4032fc3 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 d0689ee5fb)
2024-07-08 19:26:15 +02:00
Zbigniew Jędrzejewski-Szmek
9be2fe707e 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 732ed8a84e)
2024-07-08 19:26:15 +02:00
Luca Boccassi
fcbafc3ffe Bump meson version to 256.3~devel 2024-07-05 19:03:32 +01:00
Luca Boccassi
c7e144eb4a Finalize v256.2 2024-07-05 19:02:52 +01:00
Luca Boccassi
709655ea0d mkosi: switch debian to ci/v256-stable branch
This branch will track changes for v256-stable
2024-07-05 20:00:04 +02:00
Mike Yuan
e8bbe635cd workflows/labeler: do not set labels on stable backport PRs
(cherry picked from commit 5dfc88c12f)
2024-07-05 20:00:04 +02:00
Mike Yuan
aa1eb0b066 labeler: match all mkosi files
(cherry picked from commit a3370d5d94)
2024-07-05 20:00:04 +02:00
Mike Yuan
32f2b9bba6 labeler: remove matches for dropped files (Makefile)
(cherry picked from commit 5e12de940a)
2024-07-05 20:00:04 +02:00
Lennart Poettering
9a2f16e4ed 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 44ec70489f)
2024-07-05 20:00:04 +02:00
Luca Boccassi
c32f71aa14 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 a79b6dc070)
2024-07-05 20:00:04 +02:00
Luca Boccassi
abba1e6bc2 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 fc9938d6f8)
2024-07-05 20:00:04 +02:00
Lennart Poettering
df1ed3fbe2 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 b4d6bc63e6, but
forgot to to update the table at the bottom to fully reflect the update.
Fix that.

(cherry picked from commit 72a6296b16)
2024-07-05 20:00:04 +02:00
Lennart Poettering
9d40e5c9c6 man: mention that distinction between /usr/lib/ and /usr/share/ is really about shared *ownership*
(cherry picked from commit 39aafbd42a)
2024-07-05 20:00:04 +02:00
Lennart Poettering
8dbb7e2a72 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 26db8fe247)
2024-07-05 20:00:04 +02:00
Luca Boccassi
160b539a9d 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 37543971af

(cherry picked from commit 92d1fe3efa)
2024-07-05 20:00:04 +02:00
Topi Miettinen
0ff6d2cf47 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 e81025970f)
2024-07-05 20:00:04 +02:00
Ronan Pigott
cc4472c31e zsh: add run0 completions
(cherry picked from commit ef98603f4b)
2024-07-05 20:00:04 +02:00
Daan De Meyer
d0a9cf084d 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 a2403af329)
2024-07-05 20:00:04 +02:00
James Hilliard
a50e6c5709 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 aa329b8922)
2024-07-05 20:00:04 +02:00
Brenton Simpson
71de25f2df 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 2fda6f5fff)
2024-07-05 20:00:04 +02:00
Mike Yuan
243276f008 core/manager: invoke special targets on signal only for system manager
(cherry picked from commit 6851abe403)
2024-07-05 20:00:04 +02:00
Mike Yuan
efc44e0c3e 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 236cd48546)
2024-07-05 20:00:04 +02:00
Daan De Meyer
399e788553 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 48d6dad100)
2024-07-05 20:00:04 +02:00
Luca Boccassi
a946258e9d 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 e6b2508275)
2024-07-05 20:00:04 +02:00