Compare commits

...
Sign in to create a new pull request.

63 commits

Author SHA1 Message Date
Martin Pitt
8c0ffebeea Downgrade kbd dependency to Recommends unconditionally
Commit ab743db0 made the dependency weak for %{with upstream} builds
only, because upstream 3327a411be3e ("vconsole-setup: handle gracefully
if setfont/loadkeys are not available") landed after v260 was released.
Rawhide now has v261.2, so the condition is always true here.

The hard requirement came from 01e2d8a9 (2020, rhbz#1408878), which
"upgraded" the Recommends originally added in 4ebba8aa. Now that
systemd-vconsole-setup logs a notice and skips keymap and font setup
when the binaries are absent, kbd is only needed to actually apply a
non-default console keymap or font.

This again lets minimal images that disable weak dependencies leave out
kbd together with the libxkbcommon, xkeyboard-config, and libxml2 chain
it pulls in: about 9 MB uncompressed. That particularly affects initrds,
which are unpacked into RAM.
2026-07-29 19:27:35 +02:00
Zbigniew Jędrzejewski-Szmek
94948d9db3 Version 261.2
- a bugfix release with correctness and security-relevant fixes too.
  276 patches, so too much to describe here.
2026-07-25 10:49:20 -06:00
Zbigniew Jędrzejewski-Szmek
6282eacf43 Expect report-standalone to be built also for commit builds
[skip changelog]
2026-07-22 12:51:57 +02:00
Zbigniew Jędrzejewski-Szmek
f4e7691d3b Make .conf files non-%doc, install one more license file
Since 99-hardening.conf is supposed to be symlinked as configuration,
it cannot be marked with %doc. Also add one more license file listed
in the License line, and clean things up a bit while at it.

[skip changelog]
2026-07-17 12:15:19 +02:00
Zbigniew Jędrzejewski-Szmek
ec1593fa55 Drop 20-yama-ptrace.conf
20-yama-ptrace.conf has the same (non-comment) content as
/usr/lib/sysctl.d/10-default-yama-scope.conf provided by
elfutils-default-yama-scope. We can drop our file.
And the new 99-kernel-hardening.conf provides a suitable replacement.
2026-07-17 11:39:26 +02:00
Zbigniew Jędrzejewski-Szmek
e48f1014bd Adjust 99-kernel-hardening.conf
Adjust the wording for brevity and fix some typos.

[skip changelog]
2026-07-17 11:38:49 +02:00
Christopher Klooz
eaee67a709 add 99-kernel-hardening.conf 2026-07-17 09:25:44 +00:00
Fedora Release Engineering
4fbce183ce Rebuilt for https://fedoraproject.org/wiki/Fedora_45_Mass_Rebuild 2026-07-17 07:19:12 +00:00
Stewart Smith
cca95abc46 Add sbin_compat bcond to rely on filesystem file triggers for sbin symlinks
Instead of shipping /usr/sbin symlinks directly in the RPM, rely on
filesystem(unmerged-sbin-symlinks) file triggers to create them at
install time. This avoids file conflicts when the package (built on an
unmerged system) is installed into a merged-sbin buildroot, eliminating
the bootstrap ordering problem with the bin/sbin merge.

On unmerged systems, the filesystem file trigger creates the symlinks
when files are installed to /usr/bin. On merged systems, /usr/sbin is
already a symlink to bin so no action is needed.

The bcond defaults to enabled. Use --without sbin_compat to revert to
the old behavior of shipping sbin symlinks in the package.
2026-07-14 10:45:17 -07:00
Zbigniew Jędrzejewski-Szmek
57cbcf979c Also enable report-standalone for OBS builds
OBS uses version strings like "261.999+587+g900ce6f36".

[skip changelog]
2026-07-07 18:36:12 +02:00
Zbigniew Jędrzejewski-Szmek
d69c17b165 Enable report-standalone for upstream builds
(The definition of the conditional needed to be moved below
Version to work.)

[skip changelog]
2026-07-07 13:49:37 +02:00
Zbigniew Jędrzejewski-Szmek
45c16dd369 Use uniform format for %rhel conditionals
They were supposed to apply on old rhel only, but applied
on Fedora too by mistake.

Also restore the old dracut workaround. It *is* a few years
old at this point, but it's not certain that the dracut patch
has been propagated everywhere so it's safe to keep it.

[skip changelog]
2026-07-07 12:17:50 +02:00
Zbigniew Jędrzejewski-Szmek
034fa693f2 Print the build status also in %build
%prep is not executed in no-prep builds which we use with
mkosi.

[skip changelog]
2026-07-07 09:13:58 +02:00
Zbigniew Jędrzejewski-Szmek
3cc7e03365 Restore definitions of helper macros
Fixes 2d6fd95c70.

[skip changelog]
2026-07-07 09:04:19 +02:00
Zbigniew Jędrzejewski-Szmek
2382c910b7 Disable the standalone report yet again
It should be disabled until the changes are merged upstream.

Also fix and adjust the conditions for package-note use.

[skip changelog]
2026-07-07 00:45:42 +02:00
Zbigniew Jędrzejewski-Szmek
2d6fd95c70 Restore explicit requires for Centos Stream 9 and 10
It seems that CI VMs don't boot without this.

[skip changelog]
2026-07-06 22:11:19 +02:00
Frantisek Sumsal
521ab0fb09 test: skip the integration test suite on Fedora ELN (for now)
The test suite currently fails there during setup, because ELN ships
with a reduced package set and it's missing several tools that mkosi
expects to be available:

Updating and loading repositories:
Repositories loaded.
Failed to resolve the transaction:
No match for argument: apk
No match for argument: apt
No match for argument: apt-utils
No match for argument: archlinux-keyring
No match for argument: coccinelle
No match for argument: gh
No match for argument: gh
No match for argument: lcov
No match for argument: musl-clang
No match for argument: musl-gcc
No match for argument: musl-libc
No match for argument: pacman
No match for argument: python3-mypy
No match for argument: qemu-system-aarch64-core
No match for argument: qemu-system-ppc-core
No match for argument: qemu-system-s390x-core
No match for argument: ruff
No match for argument: sbsigntools
No match for argument: zypper
You can try to add to command line:
  --skip-unavailable to skip unavailable packages

Switching the tools tree to Rawhide doesn't help either, as that breaks
other things:

Updating and loading repositories:
 fedora                                 100% |  69.2 MiB/s |  20.9 MiB |  00m00s
>>> Downloading successful, but checksum doesn't match. Calculated: ...
cannot open file: (95) - Operation not supported [/var/cache/libdnf5/fedora-306b6523e9c8dc02/repodata/fc1f05fc361729498fd568dec450c1e27598bd38e3179f9b80ae01fbc8a0b74d-primary.xml.zck]

We can revisit this later if running the test suite on ELN is desirable.

The "skip" on ELN is slightly unconventional, as using "enabled: false"
here causes Packit to error.

[skip changelog]
2026-07-06 17:26:40 +00:00
Frantisek Sumsal
453447b79b rpminspect: ignore test-coredump-stacktrace in annocheck
As this test is intentionally compiled with a minimal set of hardcoded
options, so it always generates a predictable stack trace.

[skip changelog]
2026-07-06 17:26:40 +00:00
Frantisek Sumsal
9d4edaa576 test: work around a kernel bug in virtio/vsock
There's a virtio/vsock bug in kernel 7.1-rc where a patch for a
potential overflow inadvertently shrunk the receive buffer's effective
size below what was configured, which eventually causes the vsock
connection to get reset with ENOBUFS, that kills the journal forwarding
over vsock:

read(7, ..., 16392): No buffer space available
Entry too big, skipped
read(8, ..., 16392): No buffer space available
Entry too big, skipped
read(12, ..., 16392): No buffer space available
Entry too big, skipped
Finishing after writing 6685 entries

This then affects other systemd components that try to write to the now
broken journal, causing them to fail as well.

Let's just bump the default vsock buffer size to work around this until
the kernel fix lands.

Pending fix: https://lore.kernel.org/netdev/20260518090656.134588-3-sgarzare@redhat.com/

[skip changelog]
2026-07-06 17:26:40 +00:00
Frantisek Sumsal
c53b2fb307 test: cap the number of parallel tests
Cap the number of parallel tests to 4 to not overwhelm beefier hosts.

I tried this with 8 jobs, but it often caused annoying timeouts in
nspawn-based tests; maybe this could be investigated and potentially
addressed in the future.

[skip changelog]
2026-07-06 17:26:40 +00:00
Yaakov Selkowitz
9bd26bb71f Fix ntpvendor for ELN
This has to match a registered vendor, and ELN is one case where the OS and
vendor name are different.

https://github.com/fedora-eln/eln/issues/567
2026-07-06 17:24:52 +00:00
Zbigniew Jędrzejewski-Szmek
de7b685908 Disable reqs for dlopen'ed libraries on CentOS
Unfortunately package-notes >= 0.18 are not available on CentoOS
Stream 9 and 10 right now. We actually want >= 0.20 for the best
expreience. Disable the requirement for now, to allow CI builds to
happen. This will need to be resolved before the builds are used for
real.

[skip changelog]
2026-07-06 12:26:31 +02:00
Zbigniew Jędrzejewski-Szmek
4830641844 Move portabled to systemd-container subpackage
Previously, the idea was that portabled is in -udev because it can be
used to implement generic services, incl. basic system functionality.
But it seems that nobody is doing that… People who _are_ packing
portables, are using them more like containers, i.e. to deliver
external payloads. So let's move it to the -container subpackage to
shrink -udev which is installed almost everywhere.

Also, fix bogus comment and fix typo, effectively moving updatectl to
-udev.
2026-07-03 17:04:38 +02:00
Zbigniew Jędrzejewski-Szmek
893fcd9978 Add missing conditionalization and more debugging
[skip changelog]
2026-07-03 17:04:38 +02:00
Zbigniew Jędrzejewski-Szmek
c783e74791 split-files: improve error message
[skip changelog]
2026-07-03 15:51:45 +02:00
Zbigniew Jędrzejewski-Szmek
ee2dff42d6 Add systemd-report-standalone
This adds the packaging required for
https://github.com/systemd/systemd/pull/42874. The build will work
with the changes here even before that the upstream changes are
merged and is in fact required for upstream CI to pass, so the plan
is to merge it early.

[skip changelog]
2026-07-03 15:00:53 +02:00
Zbigniew Jędrzejewski-Szmek
9c87a3f8ad Load libssl.so.4 rather than libssl.so.3 2026-06-27 22:10:56 +02:00
Zbigniew Jędrzejewski-Szmek
714b0799d2 Version 261.1
- The first batch of fixes post-release
2026-06-26 16:43:23 +02:00
Zbigniew Jędrzejewski-Szmek
054158500a Update to load openssl-4 rather than openssl-3
The autogenerated dependency (Requires:libcrypto.so.3()(64bit) in
systemd-udev.rpm) is causing a failure in coreos.cosa.build-and-test.
2026-06-19 21:44:06 +02:00
Zbigniew Jędrzejewski-Szmek
5a3e750ef8 Version 261
- Still some fixes after -rc4, incl. a change to how
  openssl/libcrypto is loaded and to imds service ordering
  at startup
2026-06-19 20:17:09 +02:00
Zbigniew Jędrzejewski-Szmek
4faee7ab7d Version 261~rc4
- New translations and various other fixes
2026-06-17 00:31:27 +02:00
Yaakov Selkowitz
8ff635a921 Rebuilt for openssl 4.0 2026-06-12 19:52:53 -04:00
Yaakov Selkowitz
0064f73d97 Rebuilt for openssl 4.0 2026-06-12 12:23:09 -04:00
Zbigniew Jędrzejewski-Szmek
14a9aac87e Use dlopen notes again
This requires updated dlopen-notes. A version dependency is introduced.

The levels of various dendencies were adjusted, see comments.

The motivation for this change is to make management of the dependencies
(Requires, Recommends, Suggests). Previously, we had to adjust the
depencencies whenever things were converted to dlopen, or the list
of libraries used was changed. This was tedious and hard to get right.
Now we have good metadata provided by upstream, so we mostly rely on
that only only do some overrides downstream.
2026-06-10 17:04:05 +02:00
Zbigniew Jędrzejewski-Szmek
720fa8259a Do not check ownership of /var/lib/systemd/timesync/ in rpm -V
rpm -V systemd-udev would report that /var/lib/systemd/timesync/ has
wrong ownership. This happens because create the directory via %ghost
and it ends up with the default root:root ownership in the rpm %files
list. We _could_ fix the owernship in the listing, but it's actually OK
if the directory is owned by root or even some other account, as long as
the service is not running. Systemd will change owernship to the
systemd-timesync user:group when starting the service. Disabling of the
ownership verification makes it easier to precreate the timestamp (c.f.
https://src.fedoraproject.org/rpms/systemd/pull-request/238). So let's
just disable the owernship check.
2026-06-10 15:07:53 +02:00
Zbigniew Jędrzejewski-Szmek
06bd9926f2 Version 261~rc3
- Various smaller and larger fixes
- A hint is emitted if init is called with the legacy
  telinit args (rhbz#2479961)
- Various messages for missing dlopened libraries have been
  downgraded (rhbz#2463540)
2026-06-04 18:28:12 +02:00
Zbigniew Jędrzejewski-Szmek
6ddbd499e8 Drop unused tree build dependency
Reported by Marián Konček.

[skip changelog]
2026-06-02 19:13:07 +02:00
Zbigniew Jędrzejewski-Szmek
bd81a14bfc Version 261~rc2
- A few fixes for this and that incl. rhbz#2481304, rhbz#2481466
2026-05-26 23:11:46 +02:00
Zbigniew Jędrzejewski-Szmek
9cb09470c9 Version 261~rc1
- explicit dependencies are added for various libraries loaded
  using dlopen()
2026-05-22 19:46:16 +02:00
Zbigniew Jędrzejewski-Szmek
7d16ad00bd Fix compilation with openssl 4.0 2026-05-22 18:18:43 +02:00
Zbigniew Jędrzejewski-Szmek
3770fa7c92 Revert "Use dlopen-notes to automatically generate library Recommends/Requires/Suggests"
This reverts commit ee6d0b9d27.
The approach with dlopen-notes is not fully cooked yet. In particular,
the case where the note is present in a shared library, but we'd like to
declare the dependency for a binary which is a different package, is
not supported by rpm. Let's revert for now and come back to this later.
2026-05-22 18:12:42 +02:00
Zbigniew Jędrzejewski-Szmek
8b3d1726f5 Add back various explit Requires
The idn feature is in libsystemd-shared, and systemd-resolved doesn't
contain any files that'd tie it to that shared library, so the
genarator doesn't generate this dependency. This is a fundamental
limitation of the rpm interface. Let's add a manual listing for now.

Similarly, systemd-udev would miss many relevant Requires.
2026-05-19 11:56:20 +02:00
d8abb91805 Drop scriptlet workarounds for upgrades from versions < 247
247 was in 2020, so this should be OK.
2026-05-19 11:15:03 +02:00
ee6d0b9d27 Use dlopen-notes to automatically generate library Recommends/Requires/Suggests 2026-05-19 11:14:25 +02:00
32a2038627 spec: drop duplicated line
[skip changelog]
2026-05-19 11:14:19 +02:00
Zbigniew Jędrzejewski-Szmek
ab743db0fe Downgrade kbd dependency to Recommends
Since upstream commit 3327a411be3ef4a203d23ae86e6c50b30d929d50, we
can downgrade the dep.
2026-05-12 12:32:45 +02:00
Yaakov Selkowitz
400494ada4 Update conditionals for RHEL 11
ELN (the future RHEL 11) tracks rawhide and therefore also has the latest
setup and sysusers changes.
2026-04-14 22:10:09 +00:00
Zbigniew Jędrzejewski-Szmek
207e2d0044 Stop building support for openssl engines
It seems that the headers are gone on openssl-4.0.0~beta1. But already
we're seeing build failurs on i686 because openssl-devel-engine is not
available. Most likely multilib setup was borked. So let's drop this
now and hope that the providers in f45 will be good enough.
2026-04-14 16:20:57 +02:00
Zbigniew Jędrzejewski-Szmek
36a234147f Upload sources
[skip changelog]
2026-03-23 21:08:43 +01:00
Zbigniew Jędrzejewski-Szmek
3681163f81 Version 260.1
- Fixes for crashes and misbehaviours in PID1 and other components
2026-03-23 21:06:28 +01:00
Zbigniew Jędrzejewski-Szmek
8f4f0f58e3 Version 260
- No significant changes since ~rc4
2026-03-17 22:16:42 +01:00
Zbigniew Jędrzejewski-Szmek
e3fab23aa0 Version 260~rc4
- Even more fixes, incl. a fix for a bad patch in ~rc3.
2026-03-14 00:34:55 +01:00
Zbigniew Jędrzejewski-Szmek
e4c1c2100b Version 260~rc3
- A bunch of bugfixes
- More sanitization for invalid values received from hardware and firmware
2026-03-12 19:48:11 +01:00
Zbigniew Jędrzejewski-Szmek
453696813e Fix typo in unit name in %post scriptlet 2026-03-06 13:50:04 +01:00
Hans de Goede
154edb7cdb Silence false positive "HWID match failed, no DT blob" error (rhbz#2444759) 2026-03-05 14:33:49 +01:00
Marcin Juszkiewicz
03b6637c35 riscv64 port has LTO disabled 2026-03-04 17:24:46 +01:00
Zbigniew Jędrzejewski-Szmek
ce1dec6a40 Version 260~rc2
- A bunch of bugfixes in various components and documentation
- Fix for GHSA-6pwp-j5vg-5j6m
2026-03-04 15:22:41 +01:00
Zbigniew Jędrzejewski-Szmek
809049777c Add patch for symlink creation error 2026-02-26 14:37:09 +01:00
Zbigniew Jędrzejewski-Szmek
6ff27708f7 Enable getty@.service through presets
This was first attempted in ec5e1b1ed7,
but then was reset. After the upgrade to v260-rc1 which includes the patch
to add [Install] to getty@.service, we need to do this, or we don't get a
autovt@.service symlink at all and gettys are not active.

This time, a scriptlet to keep the service enabled after upgrades is
added.
2026-02-26 14:35:14 +01:00
Zbigniew Jędrzejewski-Szmek
ba7807fbce Drop scriptlet for upgrades from versions <253 2026-02-26 13:40:11 +01:00
Zbigniew Jędrzejewski-Szmek
455f277188 Move support for tpm2 to systemd-udev subpackage
This was first attempted in ec5e1b1ed7, together
with some other changes. Moving of getty@.service was wrong, because it is
needed in containers. But moving of the tpm2 stuff should be fine.

List of affected files:
/usr/lib/systemd/system-generators/systemd-tpm2-generator
/usr/lib/systemd/system/sysinit.target.wants/systemd-tpm2-setup-early.service
/usr/lib/systemd/system/sysinit.target.wants/systemd-tpm2-setup.service
/usr/lib/systemd/system/systemd-tpm2-clear.service
/usr/lib/systemd/system/systemd-tpm2-setup-early.service
/usr/lib/systemd/system/systemd-tpm2-setup.service
/usr/lib/systemd/system/tpm2.target
/usr/lib/systemd/systemd-tpm2-clear
/usr/lib/systemd/systemd-tpm2-setup
/usr/share/man/man8/systemd-tpm2-clear.service.8.gz
/usr/share/man/man8/systemd-tpm2-generator.8.gz
/usr/share/man/man8/systemd-tpm2-setup-early.service.8.gz
/usr/share/man/man8/systemd-tpm2-setup.8.gz
/usr/share/man/man8/systemd-tpm2-setup.service.8.gz
2026-02-26 13:06:30 +01:00
Zbigniew Jędrzejewski-Szmek
0183bc784e Version 260~rc1
- See https://raw.githubusercontent.com/systemd/systemd/v260-rc1/NEWS.
  Too many changes to list or discuss here.
2026-02-25 22:05:36 +01:00
Luca Boccassi
23a1c1fed9 Install /usr/lib/systemd/boot/hwids/ in ukify package
For https://github.com/systemd/systemd/pull/40541
2026-02-25 12:58:09 +00:00
14 changed files with 419 additions and 326 deletions

View file

@ -1,88 +0,0 @@
From 61750e265ce3f7783a8dba831e91140f84ad89f2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 5 Nov 2025 17:52:16 +0100
Subject: [PATCH 1/3] Revert "units: drop runlevel[0-6].target"
This partially reverts commit e58ba80a40fb6e96543d56774a5bc5aa9cdadbf3.
The unit are still needed for compat.
---
units/meson.build | 27 ++++++++++++++++++++++-----
1 file changed, 22 insertions(+), 5 deletions(-)
diff --git a/units/meson.build b/units/meson.build
index 2e04c4aa2b..46eaac4073 100644
--- a/units/meson.build
+++ b/units/meson.build
@@ -1,5 +1,7 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
+with_runlevels = conf.get('HAVE_SYSV_COMPAT') == 1
+
units = [
{ 'file' : 'basic.target' },
{ 'file' : 'blockdev@.target' },
@@ -49,7 +51,7 @@ units = [
},
{
'file' : 'graphical.target',
- 'symlinks' : ['default.target'],
+ 'symlinks' : ['default.target'] + (with_runlevels ? ['runlevel5.target'] : []),
},
{ 'file' : 'halt.target' },
{
@@ -142,7 +144,10 @@ units = [
'conditions' : ['ENABLE_MACHINED'],
},
{ 'file' : 'modprobe@.service' },
- { 'file' : 'multi-user.target' },
+ {
+ 'file' : 'multi-user.target',
+ 'symlinks' : with_runlevels ? ['runlevel2.target', 'runlevel3.target', 'runlevel4.target'] : [],
+ },
{
'file' : 'systemd-mute-console.socket',
'symlinks' : ['sockets.target.wants/']
@@ -155,7 +160,10 @@ units = [
{ 'file' : 'nss-lookup.target' },
{ 'file' : 'nss-user-lookup.target' },
{ 'file' : 'paths.target' },
- { 'file' : 'poweroff.target' },
+ {
+ 'file' : 'poweroff.target',
+ 'symlinks' : with_runlevels ? ['runlevel0.target'] : [],
+ },
{ 'file' : 'printer.target' },
{
'file' : 'proc-sys-fs-binfmt_misc.automount',
@@ -180,7 +188,7 @@ units = [
},
{
'file' : 'reboot.target',
- 'symlinks' : ['ctrl-alt-del.target'],
+ 'symlinks' : ['ctrl-alt-del.target'] + (with_runlevels ? ['runlevel6.target'] : []),
},
{
'file' : 'remote-cryptsetup.target',
@@ -200,7 +208,10 @@ units = [
'symlinks' : ['initrd-root-device.target.wants/'],
},
{ 'file' : 'rescue.service.in' },
- { 'file' : 'rescue.target' },
+ {
+ 'file' : 'rescue.target',
+ 'symlinks' : with_runlevels ? ['runlevel1.target'] : [],
+ },
{ 'file' : 'rpcbind.target' },
{ 'file' : 'serial-getty@.service.in' },
{ 'file' : 'shutdown.target' },
@@ -1001,4 +1012,10 @@ else
dbussessionservicedir / 'org.freedesktop.systemd1.service'))
endif
+if conf.get('HAVE_SYSV_COMPAT') == 1
+ foreach i : [1, 2, 3, 4, 5]
+ install_emptydir(systemunitdir / 'runlevel@0@.target.wants'.format(i))
+ endforeach
+endif
+
subdir('user')

View file

@ -0,0 +1,42 @@
From 64a0066cfaa4dfcf25c5f6d3ae58df4f24dd1108 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Sat, 30 Aug 2025 13:55:56 +0200
Subject: [PATCH 1/2] core: create userdb root directory with correct label
Set up the /run/systemd/userdb directory with the default SELinux context
on creation.
With version 257.7-1 on Debian the directory was automatically created with the
correct label. Starting with version 258 (only tested with 258~rc3-1) it no
longer is. Regression introduced in 736349958efe34089131ca88950e2e5bb391d36a.
[zjs: edited the patch to apply comments from review and update the description.]
---
src/core/varlink.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/core/varlink.c b/src/core/varlink.c
index 6074c55ab1..acd51fc47e 100644
--- a/src/core/varlink.c
+++ b/src/core/varlink.c
@@ -8,6 +8,7 @@
#include "json-util.h"
#include "manager.h"
#include "metrics.h"
+#include "mkdir.h"
#include "path-util.h"
#include "pidref.h"
#include "string-util.h"
@@ -514,7 +515,11 @@ static int varlink_server_listen_many_idempotent_sentinel(
if (!known_fresh && varlink_server_contains_socket(s, address))
continue;
- r = sd_varlink_server_listen_address(s, address, 0666 | SD_VARLINK_SERVER_MODE_MKDIR_0755);
+ r = mkdir_parents_label(address, 0755);
+ if (r < 0)
+ log_warning_errno(r, "Failed to create parent directory of '%s', ignoring: %m", address);
+
+ r = sd_varlink_server_listen_address(s, address, 0666);
if (r < 0) {
log_error_errno(r, "Failed to bind to varlink socket '%s': %m", address);
break;

View file

@ -1,17 +1,17 @@
From 8d6d86d1d7e45eeae921e88adde55d6524027c96 Mon Sep 17 00:00:00 2001
From 786d3f382308d0119cce020e2c88a03ff96a25d9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
Date: Wed, 26 Nov 2025 22:29:53 +0100
Subject: [PATCH 3/3] machined: continue without resolve.hook socket
Subject: [PATCH 2/2] machined: continue without resolve.hook socket
---
src/machine/machined-varlink.c | 12 +++++++++---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/src/machine/machined-varlink.c b/src/machine/machined-varlink.c
index f83cbb8562..0b30cd0531 100644
index acc2137f83..d1c9453e41 100644
--- a/src/machine/machined-varlink.c
+++ b/src/machine/machined-varlink.c
@@ -894,9 +894,15 @@ static int manager_varlink_init_resolve_hook(Manager *m) {
@@ -904,9 +904,15 @@ static int manager_varlink_init_resolve_hook(Manager *m) {
r = sd_varlink_server_listen_address(s, VARLINK_PATH_MACHINED_RESOLVE_HOOK,
0666 | SD_VARLINK_SERVER_MODE_MKDIR_0755);

View file

@ -1,42 +0,0 @@
# The ptrace system call is used for interprocess services,
# communication and introspection (like synchronisation, signaling,
# debugging, tracing and profiling) of processes.
#
# Usage of ptrace is restricted by normal user permissions. Normal
# unprivileged processes cannot use ptrace on processes that they
# cannot send signals to or processes that are running set-uid or
# set-gid. Nevertheless, processes running under the same uid will
# usually be able to ptrace one another.
#
# Fedora enables the Yama security mechanism which restricts ptrace
# even further. Sysctl setting kernel.yama.ptrace_scope can have one
# of the following values:
#
# 0 - Normal ptrace security permissions.
# 1 - Restricted ptrace. Only child processes plus normal permissions.
# 2 - Admin-only attach. Only executables with CAP_SYS_PTRACE.
# 3 - No attach. No process may call ptrace at all. Irrevocable.
#
# For more information see Documentation/security/Yama.txt in the
# kernel sources.
#
# The default is 1., which allows tracing of child processes, but
# forbids tracing of arbitrary processes. This allows programs like
# gdb or strace to work when the most common way of having the
# debugger start the debuggee is used:
# gdb /path/to/program ...
# Attaching to already running programs is NOT allowed:
# gdb -p ...
# This default setting is suitable for the common case, because it
# reduces the risk that one hacked process can be used to attack other
# processes. (For example, a hacked firefox process in a user session
# will not be able to ptrace the keyring process and extract passwords
# stored only in memory.)
#
# Developers and administrators might want to disable those protections
# to be able to attach debuggers to existing processes. Use
# sysctl kernel.yama.ptrace_scope=0
# for change the setting temporarily, or copy this file to
# /etc/sysctl.d/20-yama-ptrace.conf to set it for future boots.
kernel.yama.ptrace_scope = 0

View file

@ -1,42 +0,0 @@
From 00d70f36a0866660693347009446b7f872a05bf4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Sat, 30 Aug 2025 13:55:56 +0200
Subject: [PATCH] core: create userdb root directory with correct label
Set up the /run/systemd/userdb directory with the default SELinux context
on creation.
With version 257.7-1 on Debian the directory was automatically created with the
correct label. Starting with version 258 (only tested with 258~rc3-1) it no
longer is. Regression introduced in 736349958efe34089131ca88950e2e5bb391d36a.
[zjs: edited the patch to apply comments from review and update the description.]
---
src/core/varlink.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/core/varlink.c b/src/core/varlink.c
index 99f12c59e5..71a8ffd0e5 100644
--- a/src/core/varlink.c
+++ b/src/core/varlink.c
@@ -5,6 +5,7 @@
#include "constants.h"
#include "errno-util.h"
#include "manager.h"
+#include "mkdir-label.h"
#include "path-util.h"
#include "pidref.h"
#include "string-util.h"
@@ -441,7 +442,11 @@ static int manager_varlink_init_system(Manager *m) {
if (!fresh && varlink_server_contains_socket(m->varlink_server, address))
continue;
- r = sd_varlink_server_listen_address(m->varlink_server, address, 0666 | SD_VARLINK_SERVER_MODE_MKDIR_0755);
+ r = mkdir_parents_label(address, 0755);
+ if (r < 0)
+ log_warning_errno(r, "Failed to create parent directory of '%s', ignoring: %m", address);
+
+ r = sd_varlink_server_listen_address(m->varlink_server, address, 0666);
if (r < 0)
return log_error_errno(r, "Failed to bind to varlink socket '%s': %m", address);
}

44
42668.patch Normal file
View file

@ -0,0 +1,44 @@
From e6f1190eb6be465432cfbab267a59c851ae990c5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@amutable.com>
Date: Fri, 19 Jun 2026 21:38:44 +0200
Subject: [PATCH] crypto-util: prefer openssl-4
Fedora has switched to openssl 4, and we generate a Requires dependency
on libcrypto for the systemd-udev subpackage, so preferring openssl-3
does the wrong thing. So the order in the dlopen note needs to be switched.
But in general, we want to get rid of openssl-3, so we want to load
openssl-4 in preference. Change the order in both places.
(The "compat" order can stay in 261-stable for other distros.)
---
src/shared/crypto-util.c | 3 +--
src/shared/crypto-util.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/shared/crypto-util.c b/src/shared/crypto-util.c
index ed6d2a269c772..b345475fa4043 100644
--- a/src/shared/crypto-util.c
+++ b/src/shared/crypto-util.c
@@ -339,8 +339,7 @@ int dlopen_libcrypto(int log_level) {
LIBCRYPTO_NOTE(SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED);
- // FIXME: switch order to prefer libcrypto.so.4 in a future version once it has stabilized
- FOREACH_STRING(soname, "libcrypto.so.3", "libcrypto.so.4") {
+ FOREACH_STRING(soname, "libcrypto.so.4", "libcrypto.so.3") {
r = dlopen_many_sym_or_warn(
&libcrypto_dl,
soname,
diff --git a/src/shared/crypto-util.h b/src/shared/crypto-util.h
index 980c1c60a2a5f..bd0cb7b67b8dd 100644
--- a/src/shared/crypto-util.h
+++ b/src/shared/crypto-util.h
@@ -37,7 +37,7 @@ int dlopen_libcrypto(int log_level);
SD_ELF_NOTE_DLOPEN("libcrypto", \
"Support for cryptographic operations", \
priority, \
- "libcrypto.so.3", "libcrypto.so.4")
+ "libcrypto.so.4", "libcrypto.so.3")
#define DLOPEN_LIBCRYPTO(log_level, priority) \
({ \

View file

@ -0,0 +1,38 @@
From 7be9032019015ddd61985e6a6721d813d62dad0b Mon Sep 17 00:00:00 2001
From: Luca Boccassi <luca.boccassi@gmail.com>
Date: Sat, 20 Jun 2026 15:21:26 +0100
Subject: [PATCH] ssl-util: prefer OpenSSL 4
For the next version we can switch to preferring the new version
---
src/shared/ssl-util.c | 3 +--
src/shared/ssl-util.h | 2 +-
2 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/shared/ssl-util.c b/src/shared/ssl-util.c
index 226120c70e66f..4b7ab2ec29f74 100644
--- a/src/shared/ssl-util.c
+++ b/src/shared/ssl-util.c
@@ -40,8 +40,7 @@ int dlopen_libssl(int log_level) {
LIBSSL_NOTE(SD_ELF_NOTE_DLOPEN_PRIORITY_SUGGESTED);
- // FIXME: switch order to prefer libssl.so.4 in a future version once it has stabilized
- FOREACH_STRING(soname, "libssl.so.3", "libssl.so.4") {
+ FOREACH_STRING(soname, "libssl.so.4", "libssl.so.3") {
r = dlopen_many_sym_or_warn(
&libssl_dl,
soname,
diff --git a/src/shared/ssl-util.h b/src/shared/ssl-util.h
index aa3b8308665ba..77b5c049f9e3a 100644
--- a/src/shared/ssl-util.h
+++ b/src/shared/ssl-util.h
@@ -12,7 +12,7 @@ int dlopen_libssl(int log_level);
SD_ELF_NOTE_DLOPEN("libssl", \
"Support for TLS", \
priority, \
- "libssl.so.3", "libssl.so.4")
+ "libssl.so.4", "libssl.so.3")
#define DLOPEN_LIBSSL(log_level, priority) \
({ \

66
99-kernel-hardening.conf Normal file
View file

@ -0,0 +1,66 @@
# This file is disabled by default. It provides a few kernel
# hardening settings. This file is automatically updated.
#
# Please read the Fedora hardening page for further information
# about this file (section 'Fedora-maintained (self-updating)
# hardening for general and average use cases' and
# section 'Fedora-maintained self-updating kernel hardening'):
# https://docs.fedoraproject.org/en-US/security/topics/hardening
#
# If you want to enable the hardening, create a symlink:
# sudo ln -s /usr/share/doc/systemd/99-kernel-hardening.conf /etc/sysctl.d/
# -> do NOT copy or move or hardlink this file because
# this would break the automatic updates!
#
#
# Enabling this ptrace restriction can cause issues to some software
# developers: the need to use ptrace is restricted in the hardening
# because of the security issues it may cause in some
# circumstances: to use applications like gdb or strace when the
# hardening is enabled, users need to temporarily enable ptrace
# during the runtime of their ptrace-dependent application.
# Enabling ptrace implies disabling yama.ptrace_scope (which is
# the security measure enabled below).
# You can enable temporarily ptrace with:
# sysctl kernel.yama.ptrace_scope=0
# You can subsequently disable it again with:
# sysctl kernel.yama.ptrace_scope=2
# -> it will be reset automatically after reboot.
# For more information, read the Fedora hardening page
# mentioned above.
#
# Details: https://docs.kernel.org/admin-guide/sysctl/net.html
# Details: https://wiki.archlinux.org/title/Security#BPF_hardening
# Minor / partially-related side note: Fedora's kernel is compiled
# with CONFIG_BPF_JIT_ALWAYS_ON=True
net.core.bpf_jit_harden = 2
# Details: https://docs.kernel.org/admin-guide/LSM/Yama.html
# Details: https://wiki.archlinux.org/title/Security#ptrace_scope
# Side note: 'setsebool -P deny_ptrace on' can add a
# largely-overlapping security layer to achieve redundancy in
# restricting ptrace: it is suggested to read the Fedora hardening
# page (link above) section 'Fedora-maintained (self-updating)
# hardening for general and average use cases' and section
# 'Fedora-maintained 'enable & forget' SELinux & firewalld hardening'
# for further information about this.
kernel.yama.ptrace_scope = 2
# Details: https://docs.kernel.org/admin-guide/sysctl/kernel.html#kptr-restrict
# Details: https://wiki.archlinux.org/title/Security#Restricting_access_to_kernel_pointers_in_the_proc_filesystem
# This is formally not adding security because Fedora and its
# downstream use pre-compiled kernels, but it increases
# the knowledge required for successful exploitation.
kernel.kptr_restrict = 2
# This is unlikely to cause exploitable attack surface in average use
# cases of OS that are appropriately pre-configured, but for the same
# reason it is unlikely to cause issues to the users.
# In case of a doubt, it mitigates some potential for attack surface,
# including some attack surface the user might create themselves by
# accident. Even if the latter applies, it is unlikely to cause an
# impact except mitigate exploitation
# Details: https://docs.kernel.org/admin-guide/sysctl/fs.html#protected-fifos
fs.protected_fifos = 2
# Details: https://docs.kernel.org/admin-guide/sysctl/fs.html#protected-regular
fs.protected_regular = 2

View file

@ -89,16 +89,23 @@ if [[ ! -e /dev/kvm ]]; then
fi
NPROC="$(nproc)"
if [[ "$NPROC" -ge 10 ]]; then
export TEST_JOURNAL_USE_TMP=1
NPROC="$((NPROC / 3))"
else
NPROC="$((NPROC - 1))"
if [[ "$NPROC" -gt 4 ]]; then
# Cap the number of parallel tests to 4 to not overwhelm larger hosts
NPROC=4
fi
# Workaround for a kernel 7.x virtio/vsock bug, where a patch for a potential overflow inadvertently shrunk
# the receive buffer's effective size below what was configured, which eventually causes the vsock connection
# to get reset with ENOBUFS, that kills the journal forwarding over vsock
#
# Pending fix: https://lore.kernel.org/netdev/20260518090656.134588-3-sgarzare@redhat.com/
sysctl -w net.core.rmem_max=16777216
sysctl -w net.core.wmem_max=16777216
# This test is only really useful if we're building with sanitizers and takes a long time, so let's skip it
# for now.
export TEST_SKIP="TEST-21-DFUZZER ${TEST_SKIP:-}"
export TEST_JOURNAL_USE_TMP=1
mkosi genkey
mkosi summary

View file

@ -17,6 +17,10 @@ prepare:
exclude:
- systemd-standalone-.*
execute:
how: tmt
script: exec plans/run-integration-tests.sh
duration: 2h
how: tmt
script: exec plans/run-integration-tests.sh
duration: 2h
adjust:
- when: distro == fedora-eln
execute:
script: echo skipped

View file

@ -1,4 +1,10 @@
# Disable badfuncs check that has tons of false positives.
annocheck:
ignore:
# This test is intentionally compiled with a minimal set of hardcoded
# options, so it always generates a predictable stack trace
- /usr/lib/systemd/tests/unit-tests/manual/test-coredump-stacktrace
# Disable badfuncs check that has tons of false positives.
badfuncs:
allowed:
/usr/lib/systemd/tests/unit-tests/*:

View file

@ -1 +1 @@
SHA512 (systemd-259.1.tar.gz) = 7cbeca5dad6413a876809200583854ddc706b7a69deff958eb1ca1afb726cf4dec014006c10d1945c450b754811d4b95a80fe1778cb3136997f6d11b11c0560e
SHA512 (systemd-261.2.tar.gz) = 876f043970cb65b39ae15fba39f23bf94c7c3d80569503d6e8ea2c8013c30ee40ce43cb55cbcb1cf14d5c3021aafc09c0f67473bbf742d8964bf9fa30693b971

View file

@ -1,7 +1,11 @@
import re, sys, os, collections
buildroot = sys.argv[1]
no_bootloader = '--no-bootloader' in sys.argv
potentially_empty_outputs = [
'standalone-report',
*(['boot'] if '--no-bootloader' in sys.argv else []),
]
known_files = '''
%ghost %config(noreplace) /etc/crypttab
@ -26,8 +30,8 @@ known_files = '''
%ghost %dir /var/lib/private/systemd
%ghost %dir /var/lib/private/systemd/journal-upload
%ghost /var/lib/private/systemd/journal-upload/state
%ghost %dir /var/lib/systemd/timesync
%ghost /var/lib/systemd/timesync/clock
%ghost %dir %verify(not user group) /var/lib/systemd/timesync
%ghost %verify(not user group) /var/lib/systemd/timesync/clock
%ghost %dir /var/lib/systemd/backlight
%ghost /var/lib/systemd/catalog/database
%ghost %dir /var/lib/systemd/coredump
@ -73,6 +77,7 @@ outputs = {suffix: open(f'.file-list-{suffix}', 'w')
'resolve',
'tests',
'standalone-repart',
'standalone-report',
'standalone-tmpfiles',
'standalone-sysusers',
'standalone-shutdown',
@ -94,10 +99,11 @@ for file in files(buildroot):
/usr/lib.*/(security|pkgconfig)$|
/usr/lib/rpm(/macros.d|)$|
/usr/lib/firewalld(/services|)$|
/usr/share/(locale|licenses|doc)| # no $
/usr/share/(locale|licenses)| # no $
LICENSE|
/etc(/pam\.d|/xdg|/X11|/X11/xinit|/X11.*\.d|)$|
/etc/(dnf|dnf/protected.d)$|
/usr/(src|lib/debug)| # no $
/usr/(src|lib/debug)| # no $
/run$|
/var(/cache|/log|/lib|/run|)$
''', n, re.X):
@ -106,6 +112,8 @@ for file in files(buildroot):
if n.endswith('.standalone'):
if 'repart' in n:
o = outputs['standalone-repart']
elif 'report' in n:
o = outputs['standalone-report']
elif 'tmpfiles' in n:
o = outputs['standalone-tmpfiles']
elif 'sysusers' in n:
@ -113,7 +121,7 @@ for file in files(buildroot):
elif 'shutdown' in n:
o = outputs['standalone-shutdown']
else:
assert False, 'Found .standalone not belonging to known packages'
assert False, f'Found {n} not belonging to known standalone packages'
elif '/security/pam_' in n or '/man8/pam_' in n:
o = outputs['pam']
@ -121,7 +129,7 @@ for file in files(buildroot):
o = outputs['rpm-macros']
elif '/usr/lib/systemd/tests' in n:
o = outputs['tests']
elif 'ukify' in n and '/man/' not in n:
elif ('ukify' in n or '/hwids/' in n) and '/man/' not in n:
o = outputs['ukify']
elif re.search(r'/libsystemd-core-.*\.so$', n):
o = outputs['main']
@ -151,6 +159,7 @@ for file in files(buildroot):
mount.ddi|
importctl|
portablectl|
portabled|portable1|
systemd-nspawn|
systemd\.nspawn|
systemd-vmspawn|
@ -233,8 +242,12 @@ for file in files(buildroot):
integritysetup|
integritytab|
remount-fs|
tpm2|
/initrd|
systemd-sysinstall|
systemd[.-]pcr|
systemd-imdsd|
systemd-loop|
/pcrlock\.d|
systemd-measure|
/boot$|
@ -244,17 +257,15 @@ for file in files(buildroot):
binfmt|
sysctl|
coredump|
homectl|
homed|home1|
sysupdate|updatctl|
oomd|
portabled|portable1
''', n, re.X): # coredumpctl, homectl, portablectl are included in the main package because
# they can be used to interact with remote daemons. Also, the user could be
# confused if those user-facing binaries are not available.
sysupdate|updatectl|
oomd
''', n, re.X):
o = outputs['udev']
elif re.search(r'''/boot/efi|
/usr/lib/systemd/boot|
/usr/lib/systemd/boot/efi|
sd-boot|systemd-boot\.|loader.conf
''', n, re.X):
o = outputs['boot']
@ -273,7 +284,8 @@ for file in files(buildroot):
prefix = known_files[n].split()[:-1]
elif file.is_dir(follow_symlinks=False):
prefix = ['%dir']
elif 'README' in n:
# Allow .conf files to be linked as config. They must not be %doc.
elif ('README' in n or '/doc/' in n) and not n.endswith('.conf'):
prefix = ['%doc']
elif n.startswith('/etc'):
prefix = ['%config(noreplace)']
@ -290,9 +302,10 @@ for file in files(buildroot):
for file in o:
print(f'{prefix}{n}{suffix}', file=file)
if [print(f'ERROR: no file names were written to {o.name}')
for name, o in outputs.items()
if (o.tell() == 0 and
not (no_bootloader and name == 'boot'))
]:
if [
print(f'ERROR: no file names were written to {o.name}')
for name, o in outputs.items()
if o.tell() == 0 and name not in potentially_empty_outputs
]:
sys.exit(1)

View file

@ -7,11 +7,6 @@
%global system_unit_dir %{pkgdir}/system
%global user_unit_dir %{pkgdir}/user
%if 0%{?__isa_bits} == 64
%global elf_bits (64bit)
%global elf_suffix ()%{elf_bits}
%endif
%bcond bzip2 1
%bcond gnutls 1
%bcond lz4 1
@ -23,7 +18,16 @@
# e.g. when re-building cryptsetup on a json-c SONAME-bump.
%bcond bootstrap 0
%bcond tests 1
%bcond lto 1
# When enabled, rely on filesystem(unmerged-sbin-symlinks) file triggers to
# create /usr/sbin symlinks instead of shipping them in the package. This
# avoids file conflicts when installing on merged-sbin systems and eliminates
# bootstrap ordering issues with the bin/sbin merge.
%bcond sbin_compat 1
# riscv64 has LTO disabled globally
%bcond lto %["%_arch" != "riscv64"]
# Build docs on 64-bit architectures only
%bcond docs %[%{?__isa_bits} >= 64]
@ -66,6 +70,11 @@
%define noarch_requires_version %{version}-%{release}
%endif
%if 0%{?__isa_bits} == 64
%global elf_bits (64bit)
%global elf_suffix ()%{elf_bits}
%endif
Name: systemd
Url: https://systemd.io
# Allow users to specify the version and release when building the rpm by
@ -73,7 +82,7 @@ Url: https://systemd.io
# But don't do that on OBS, otherwise the version subst fails, and will be
# like 257-123-gabcd257.1 instead of 257-123-gabcd
%if %{without obs}
Version: %{?version_override}%{!?version_override:259.1}
Version: %{?version_override}%{!?version_override:261.2}
%else
Version: %{?version_override}%{!?version_override:%(cat meson.version)}
%endif
@ -81,6 +90,9 @@ Release: %autorelease
%global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)
# Temporary macro to enable systemd-report.standalone
%bcond report_standalone %[ v"%{version}" >= v"261.999" || %{defined commit} ]
# For a breakdown of the licensing, see README
License: LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later
Summary: System and Service Manager
@ -107,7 +119,6 @@ Source6: inittab
Source7: sysctl.conf.README
Source8: systemd-journal-remote.xml
Source9: systemd-journal-gatewayd.xml
Source10: 20-yama-ptrace.conf
Source11: systemd-udev-trigger-no-reload.conf
# https://fedoraproject.org/wiki/How_to_filter_libabigail_reports
Source13: libabigail.abignore
@ -117,7 +128,7 @@ Source15: 10-oomd-per-slice-defaults.conf
Source16: 10-timeout-abort.conf
Source17: 10-map-count.conf
Source18: 60-block-scheduler.rules
Source19: 99-kernel-hardening.conf
Source20: macros.sysusers.compat
Source21: macros.sysusers
Source22: sysusers.attr
@ -142,17 +153,16 @@ Patch: https://github.com/systemd/systemd/pull/26494.patch
# https://bugzilla.redhat.com/show_bug.cgi?id=2251843
Patch: 30846.patch
# Again create runlevelX.target. Dropping those files breaks upgrades.
# https://bugzilla.redhat.com/show_bug.cgi?id=2411195
Patch: 0001-Revert-units-drop-runlevel-0-6-.target.patch
# userdb: create userdb root directory with correct label
# We can drop this after SELinux policy is updated to handle the transition.
Patch: 38769.patch
Patch: 0001-core-create-userdb-root-directory-with-correct-label.patch
# Workaround for https://bugzilla.redhat.com/show_bug.cgi?id=2415701
Patch: 0002-machined-continue-without-resolve.hook-socket.patch
# We want to depend on and load openssl-4 in preference
Patch: https://github.com/systemd/systemd/pull/42668.patch
Patch: https://github.com/systemd/systemd/commit/7be9032019015ddd61985e6a6721d813d62dad0b.patch
%endif
%ifarch %{ix86} x86_64 aarch64 riscv64
@ -177,6 +187,13 @@ BuildRequires: cryptsetup-devel
# We use the %%systemd_{post,preun,…} macros for various services.
BuildRequires: systemd-rpm-macros
%endif
%if !%{defined rhel} || 0%{?rhel} > 10
# Use dlopen-notes to generate Requires/Recommends from embedded metadata.
# Currently, package-notes are not available on Centos Stream 9 or 10.
BuildRequires: package-notes >= 0.20
%endif
BuildRequires: dbus-devel
BuildRequires: util-linux
# /usr/bin/getfacl is needed by test-acl-util
@ -203,7 +220,7 @@ BuildRequires: libcurl-devel
BuildRequires: kmod-devel
BuildRequires: elfutils-devel
BuildRequires: openssl-devel
%if 0%{?fedora} >= 41
%if 0%{?fedora} >= 41 && 0%{?fedora} < 45
BuildRequires: openssl-devel-engine
%endif
%if %{with gnutls}
@ -230,7 +247,6 @@ BuildRequires: docbook-style-xsl
BuildRequires: pkgconfig
BuildRequires: gperf
BuildRequires: gawk
BuildRequires: tree
BuildRequires: hostname
BuildRequires: python3
BuildRequires: python3-devel
@ -288,9 +304,15 @@ Requires: systemd-libs%{_isa} = %{version}-%{release}
%{?fedora:Recommends: systemd-resolved = %{version}-%{release}}
Requires: systemd-shared%{_isa} = %{version}-%{release}
Requires: /usr/bin/systemd-sysusers
# The standalone version doesn't Provide the _isa suffix,
# so this biases towards the common version.
Recommends: systemd-sysusers%{_isa} = %{version}-%{release}
%if %{defined rhel} && 0%{?rhel} <= 10
Requires: libzstd.so.1%{?elf_suffix}
%endif
Recommends: diffutils
Requires: (util-linux-core or util-linux)
Requires: (libbpf >= 2:1.4.7 if libbpf)
@ -307,7 +329,7 @@ Conflicts: initscripts < 9.56.1
%if 0%{?fedora}
Conflicts: fedora-release < 23-0.12
%endif
%if 0%{?fedora} >= 41
%if 0%{?fedora} >= 41 || 0%{?rhel} >= 11
BuildRequires: setup >= 2.15.0-3
BuildRequires: python3
Conflicts: setup < 2.15.0-3
@ -323,12 +345,16 @@ Conflicts: dracut < 060-2
Conflicts: dracut < 059-16
%endif
%if %{with report_standalone}
Conflicts: systemd-standalone-report
Provides: systemd-report = %{version}-%{release}
%endif
Conflicts: systemd-standalone-tmpfiles
Provides: systemd-tmpfiles = %{version}-%{release}
Conflicts: systemd-standalone-shutdown
Provides: systemd-shutdown = %{version}-%{release}
%if "%{_sbindir}" == "%{_bindir}"
%if %{with sbin_compat} || "%{_sbindir}" == "%{_bindir}"
# Compat symlinks for Requires in other packages.
# We rely on filesystem to create the symlinks for us.
Requires: filesystem(unmerged-sbin-symlinks)
@ -339,45 +365,42 @@ Provides: /usr/sbin/reboot
Provides: /usr/sbin/shutdown
%endif
%if %{defined rhel} && 0%{?rhel} <= 10
# libmount is always required, even in containers, so make it a hard dependency.
Requires: libmount.so.1%{?elf_suffix}
Requires: libmount.so.1(MOUNT_2.26)%{?elf_bits}
# Various systemd services have syscall filters so make libseccomp a hard dependency.
Requires: libseccomp.so.2%{?elf_suffix}
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
Recommends: libxkbcommon.so.0%{?elf_suffix}
Recommends: libidn2.so.0%{?elf_suffix}
Recommends: libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
Recommends: libpcre2-8.so.0%{?elf_suffix}
Recommends: libpwquality.so.1%{?elf_suffix}
Recommends: libpwquality.so.1(LIBPWQUALITY_1.0)%{?elf_bits}
%if 0%{?fedora}
Recommends: libqrencode.so.4%{?elf_suffix}
Requires: libacl.so.1%{?elf_suffix}
%endif
Recommends: libbpf.so.1%{?elf_suffix}
Recommends: libbpf.so.1(LIBBPF_0.4.0)%{?elf_bits}
# used by systemd-coredump and systemd-analyze
Recommends: libdw.so.1%{?elf_suffix}
Recommends: libdw.so.1(ELFUTILS_0.186)%{?elf_bits}
Recommends: libelf.so.1%{?elf_suffix}
Recommends: libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
%define dlopen_notes_features %{expand:
# Various systemd services have syscall filters so make libseccomp a hard dependency.
systemd:seccomp:required
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Recommends: libcryptsetup.so.12%{?elf_suffix}
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
# zstd is used for compression in the journal
systemd:zstd:required
# Libkmod is used to load modules.
Recommends: libkmod.so.2%{?elf_suffix}
# kmod_list_next, kmod_load_resources, kmod_module_get_initstate,
# kmod_module_get_module, kmod_module_get_name, kmod_module_new_from_lookup,
# kmod_module_probe_insert_module, kmod_module_unref, kmod_module_unref_list,
# kmod_new, kmod_set_log_fn, kmod_unref, kmod_validate_resources
# are part of LIBKMOD_5.
Recommends: libkmod.so.2(LIBKMOD_5)%{?elf_bits}
# Libkmod is used to load modules. Assume that if we need udevd, we certainly
# want to load modules, so make this into a hard dependency here.
systemd-udev:kmod:required
Recommends: libarchive.so.13%{?elf_suffix}
# We want to always use idn with resolved.
systemd-resolved:idn:required
# libcurl is required by systemd-imdsd and systemd-report.
# Downgrade the dep for now.
systemd:curl:recommended
systemd-udev:curl:recommended
# libssl + libcrypto are required by systemd-resolved/resolvectl.
# Downgrade the dep in the main package.
systemd:libssl:recommended
systemd:libcrypto:recommended
# Disable qrencode on non-fedora builds
%{!?fedora:*:qrencode:ignored}
}
%description
systemd is a system and service manager that runs as PID 1 and starts the rest
@ -467,6 +490,18 @@ Requires(preun): systemd%{_isa} = %{version}-%{release}
Requires(postun): systemd%{_isa} = %{version}-%{release}
Requires(post): grep
Requires: kmod >= 18-4
%if %{defined rhel} && 0%{?rhel} <= 10
# Libkmod is used to load modules. Assume that if we need udevd, we certainly
# want to load modules, so make this into a hard dependency here.
Requires: libkmod.so.2%{?elf_suffix}
Requires: libkmod.so.2(LIBKMOD_5)%{?elf_bits}
# udev uses libblkid in various builtins so make it a hard dependency.
Requires: libblkid.so.1%{?elf_suffix}
Requires: libblkid.so.1(BLKID_2.30)%{?elf_bits}
Requires: libfdisk.so.1%{?elf_suffix}
%endif
Provides: udev = %{version}
Provides: udev%{_isa} = %{version}
%if 0%{?fedora} || 0%{?rhel} >= 10
@ -484,6 +519,7 @@ Provides: systemd-timesyncd = %{version}-%{release}
%endif
Conflicts: systemd-networkd < %{version}-%{release}
%if %{defined rhel} && 0%{?rhel} <= 10
# Libkmod is used to load modules. Assume that if we need udevd, we certainly
# want to load modules, so make this into a hard dependency here.
Requires: libkmod.so.2%{?elf_suffix}
@ -491,29 +527,13 @@ Requires: libkmod.so.2(LIBKMOD_5)%{?elf_bits}
# udev uses libblkid in various builtins so make it a hard dependency.
Requires: libblkid.so.1%{?elf_suffix}
Requires: libblkid.so.1(BLKID_2.30)%{?elf_bits}
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Recommends: libcryptsetup.so.12%{?elf_suffix}
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
# used by systemd-coredump and systemd-analyze
Recommends: libdw.so.1%{?elf_suffix}
Recommends: libdw.so.1(ELFUTILS_0.186)%{?elf_bits}
Recommends: libelf.so.1%{?elf_suffix}
Recommends: libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
# used by home, cryptsetup, cryptenroll, logind
Recommends: libfido2.so.1%{?elf_suffix}
Recommends: libp11-kit.so.0%{?elf_suffix}
Recommends: libtss2-esys.so.0%{?elf_suffix}
Recommends: libtss2-mu.so.0%{?elf_suffix}
Recommends: libtss2-rc.so.0%{?elf_suffix}
%endif
# https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c9
Suggests: systemd-bootchart
# https://bugzilla.redhat.com/show_bug.cgi?id=1408878
Requires: kbd
# v261 handles missing setfont/loadkeys gracefully
Recommends: kbd
# https://bugzilla.redhat.com/show_bug.cgi?id=1753381
Provides: u2f-hidraw-policy = 1.0.2-40
@ -526,7 +546,7 @@ Provides: systemd-repart = %{version}-%{release}
Conflicts: xorg-x11-drv-evdev < 2.11.0
Conflicts: xorg-x11-drv-libinput < 1.5.0
%if "%{_sbindir}" == "%{_bindir}"
%if %{with sbin_compat} || "%{_sbindir}" == "%{_bindir}"
# Compat symlinks for Requires in other packages.
# We rely on filesystem to create the symlinks for us.
Requires: filesystem(unmerged-sbin-symlinks)
@ -626,6 +646,7 @@ Recommends: qemu-kvm-core
Recommends: qemu-device-display-virtio-gpu
Recommends: qemu-device-display-virtio-vga
%endif
# Bias the system towards libcurl-minimal if nothing pulls in full libcurl (#1997040)
Suggests: libcurl-minimal
License: LGPL-2.1-or-later
@ -644,6 +665,10 @@ License: LGPL-2.1-or-later
Requires: firewalld-filesystem
Provides: systemd-journal-gateway = %{version}-%{release}
Provides: systemd-journal-gateway%{_isa} = %{version}-%{release}
%if %{defined rhel} && 0%{?rhel} <= 10
Requires: libmicrohttpd.so.12%{?elf_suffix}
Requires: libcurl.so.4%{?elf_suffix}
%endif
# Bias the system towards libcurl-minimal if nothing pulls in full libcurl (#1997040)
Suggests: libcurl-minimal
@ -680,8 +705,10 @@ enabled for this to have any effect.
%package resolved
Summary: Network Name Resolution manager
Requires: systemd%{_isa} = %{version}-%{release}
%if %{defined rhel} && 0%{?rhel} <= 10
Requires: libidn2.so.0%{?elf_suffix}
Requires: libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
%endif
Requires(posttrans): grep
%description resolved
@ -723,7 +750,21 @@ RemovePathPostfixes: .standalone
%description standalone-repart
Standalone systemd-repart binary with no dependencies on the systemd-shared
library or other libraries from systemd-libs. This package conflicts with the
main systemd package and is meant for use on systems without systemd.
systemd-udev package and is meant for use on systems without systemd-udev.
%if %{with report_standalone}
%package standalone-report
Summary: Standalone systemd-report binaries for use on systems without systemd
Provides: systemd-report = %{version}-%{release}
Conflicts: systemd
RemovePathPostfixes: .standalone
%description standalone-report
Standalone systemd-report, systemd-report-basic, systemd-report-sign-plain,
binaries with no dependencies on the systemd-shared library or other libraries
from systemd-libs. This package conflicts with the main systemd package and
is meant for use on systems without systemd or with older version of it.
%endif
%package standalone-tmpfiles
Summary: Standalone systemd-tmpfiles binary for use on systems without systemd
@ -760,7 +801,30 @@ Standalone systemd-shutdown binary with no dependencies on the systemd-shared
library or other libraries from systemd-libs. This package conflicts with the
main systemd package and is meant for use in exitrds.
%define status %{shrink:
'**'
bzip2=%{?with_bzip2}%{!?with_bzip2:0}
gnutls=%{?with_gnutls}%{!?with_gnutls:0}
lz4=%{?with_lz4}%{!?with_lz4:0}
xz=%{?with_xz}%{!?with_xz:0}
zlib=%{?with_zlib}%{!?with_zlib:0}
zstd=%{?with_zstd}%{!?with_zstd:0}
bootstrap=%{?with_bootstrap}%{!?with_bootstrap:0}
tests=%{?with_tests}%{!?with_tests:0}
lto=%{?with_lto}%{!?with_lto:0}
docs=%{?with_docs}%{!?with_docs:0}
upstream=%{?with_upstream}%{!?with_upstream:0}
obs=%{?with_obs}%{!?with_obs:0}
report_standalone=%{?with_report_standalone}%{!?with_report_standalone:0}
fedora=%{?fedora}
rhel=%{?rhel}
_arch=%{_arch}
'**'}
%prep
# Print varius with's and without's to make it easier to figure out what is going on
echo %{status}
%if %{with obs}
# Recipe files in the OBS build are in a distro-specific dir, as they conflict (e.g. with SUSE ones)
mv %{_sourcedir}/%{name}.fedora/* %{_sourcedir}
@ -777,7 +841,13 @@ mv %{_sourcedir}/%{name}.fedora/* %{_sourcedir}
sed -r -i 's/^u!/u/' sysusers.d/*.conf*
%build
echo %{status}
%if 0%{?eln}
%global ntpvendor fedora
%else
%global ntpvendor %(source /etc/os-release; echo ${ID})
%endif
%{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1}
VMLINUX_H_PATH=''
@ -805,8 +875,6 @@ VMLINUX_H_PATH=$(%python3 -c '%find_vmlinux_h')
CONFIGURE_OPTS=(
-Dmode=release
-Dslow-tests=true
-Dsysvinit-path=/etc/rc.d/init.d
-Drc-local=/etc/rc.d/rc.local
-Dntp-servers='0.%{ntpvendor}.pool.ntp.org 1.%{ntpvendor}.pool.ntp.org 2.%{ntpvendor}.pool.ntp.org 3.%{ntpvendor}.pool.ntp.org'
-Ddns-servers=
-Dservice-watchdog=
@ -837,7 +905,6 @@ CONFIGURE_OPTS=(
-Daudit=enabled
-Delfutils=enabled
-Dlibcryptsetup=%[%{with bootstrap}?"disabled":"enabled"]
-Delfutils=enabled
-Drepart=enabled
-Dpwquality=enabled
-Dqrencode=%[%{defined rhel}?"disabled":"enabled"]
@ -845,7 +912,6 @@ CONFIGURE_OPTS=(
-Dmicrohttpd=enabled
-Dvmspawn=enabled
-Dlibidn2=enabled
-Dlibiptc=disabled
-Dlibcurl=enabled
-Dlibfido2=enabled
-Dxenctrl=%[0%{?have_xen}?"enabled":"disabled"]
@ -965,7 +1031,7 @@ sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user
%meson_install
# udev links
%if "%{_sbindir}" != "%{_bindir}"
%if !%{with sbin_compat} && "%{_sbindir}" != "%{_bindir}"
mkdir -p %{buildroot}/%{_sbindir}
ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
%endif
@ -1065,9 +1131,8 @@ EOF
install -Dm0644 -t %{buildroot}/usr/lib/firewalld/services/ %{SOURCE8} %{SOURCE9}
# Install additional docs
# https://bugzilla.redhat.com/show_bug.cgi?id=1234951
install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE10}
# Install kernel hardening file. Disabled by default.
install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE19}
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974
install -Dm0644 -t %{buildroot}%{system_unit_dir}/systemd-udev-trigger.service.d/ %{SOURCE11}
@ -1095,7 +1160,7 @@ install -Dm0644 -t %{buildroot}%{_prefix}/lib/udev/rules.d/ %{SOURCE18}
sed -i 's|#!/usr/bin/env python3|#!%{__python3}|' %{buildroot}/usr/lib/systemd/tests/run-unit-tests.py
%if 0%{?fedora} >= 42
%if 0%{?fedora} >= 42 || 0%{?rhel} >= 11
install -m 0644 -D %{SOURCE21} %{buildroot}%{_rpmconfigdir}/macros.d/macros.sysusers
%else
install -m 0644 -D %{SOURCE20} %{buildroot}%{_rpmconfigdir}/macros.d/macros.sysusers
@ -1114,20 +1179,20 @@ install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/network/ %{SOURCE25}
ln -s --relative %{buildroot}%{_bindir}/kernel-install %{buildroot}%{_sbindir}/installkernel
%endif
%if "%{_sbindir}" == "%{_bindir}"
%if %{with sbin_compat} || "%{_sbindir}" == "%{_bindir}"
# Systemd has the split-sbin option which is also used to select the directory
# for alias symlinks. We need to keep split-sbin=true for now, to support
# unmerged systems. Move the symlinks here instead.
mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/
%endif
%if 0%{?fedora} >= 41
%if 0%{?fedora} >= 41 || 0%{?rhel} >= 11
%if %{without upstream}
# This requires https://pagure.io/setup/pull-request/50
# and https://src.fedoraproject.org/rpms/setup/pull-request/10.
# We skip this on upstream builds so that new users and groups
# can be added without breaking the build.
%if 0%{?fedora} >= 43
%if 0%{?fedora} >= 43 || 0%{?rhel} >= 11
IGNORED=empower \
%{python3} %{SOURCE4} /usr/lib/sysusers.d/setup.conf %{buildroot}/usr/lib/sysusers.d/basic.conf
%else
@ -1188,6 +1253,10 @@ fi \
%post
systemd-machine-id-setup &>/dev/null || :
# This is for upgrades from previous versions before getty@.service needed to be enabled
[ $1 -gt 1 ] && systemctl is-enabled getty@tty1.service &>/dev/null && \
touch %{_localstatedir}/lib/rpm-state/systemd-getty-was-active || :
[ $1 -eq 1 ] || exit 0
# create /var/log/journal only on initial installation,
@ -1215,6 +1284,8 @@ if [ $1 -ge 2 ]; then
systemctl daemon-reexec || :
systemd-tmpfiles --create &>/dev/null || :
rm -f %{_localstatedir}/lib/rpm-state/systemd-getty-was-active || :
fi
%systemd_posttrans_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service
@ -1232,16 +1303,15 @@ fi
# This is for upgrades from previous versions before systemd restart was moved to %%postun
systemctl daemon-reexec || :
%triggerpostun -- systemd < 253~rc1-2
# This is for upgrades from previous versions where systemd-journald-audit.socket
# had a static enablement symlink.
# We use %%triggerpostun here because rpm doesn't allow a second %%triggerun with
# a different package version.
systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
%triggerpostun -- systemd < 260~rc1
if [ -f %{_localstatedir}/lib/rpm-state/systemd-getty-was-active ]; then
systemctl --no-reload enable getty@.service || :
fi
%global udev_services %{shrink:
cryptsetup-pre.target
cryptsetup.target
getty@.service
hibernate.target
hybrid-sleep.target
initrd-cleanup.service
@ -1304,6 +1374,7 @@ systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
systemd-pcrlock.socket
systemd-pcrlock@.service
systemd-pcrmachine.service
systemd-pcrosseparator.service
systemd-pcrphase-initrd.service
systemd-pcrphase-sysinit.service
systemd-pcrphase.service
@ -1320,7 +1391,7 @@ systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
systemd-suspend.service
systemd-sysctl.service
systemd-timesyncd.service
systemd-tmpfiles-clear.service
systemd-tmpfiles-clean.service
systemd-tmpfiles-setup-dev-early.service
systemd-tmpfiles-setup-dev.service
systemd-udev-load-credentials.service
@ -1342,18 +1413,6 @@ systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
}
%post udev
# Move old stuff around in /var/lib
mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/random-seed &>/dev/null
mv %{_localstatedir}/lib/backlight %{_localstatedir}/lib/systemd/backlight &>/dev/null
if [ -L %{_localstatedir}/lib/systemd/timesync ]; then
rm %{_localstatedir}/lib/systemd/timesync
mv %{_localstatedir}/lib/private/systemd/timesync %{_localstatedir}/lib/systemd/timesync
fi
if [ -f %{_localstatedir}/lib/systemd/clock ]; then
mkdir -p %{_localstatedir}/lib/systemd/timesync
mv %{_localstatedir}/lib/systemd/clock %{_localstatedir}/lib/systemd/timesync/.
fi
systemd-hwdb update &>/dev/null
%systemd_post %udev_services
@ -1362,11 +1421,6 @@ systemd-hwdb update &>/dev/null
/usr/lib/systemd/systemd-random-seed save 2>&1 | \
grep -v 'Failed to open /dev/urandom' || :
# Replace obsolete keymaps
# https://bugzilla.redhat.com/show_bug.cgi?id=1151958
grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null &&
sed -i.rpm.bak -r 's/^KEYMAP="?fi-latin[19]"?/KEYMAP="fi"/' /etc/vconsole.conf || :
%preun udev
%systemd_preun %udev_services
@ -1405,20 +1459,7 @@ fi
}
%post networkd
# systemd-networkd was split out in systemd-246.6-2.
# Ideally, we would have a trigger scriptlet to record enablement
# state when upgrading from systemd <= systemd-246.6-1. But, AFAICS,
# rpm doesn't allow us to trigger on another package, short of
# querying the rpm database ourselves, which seems risky. For rpm,
# systemd and systemd-networkd are completely unrelated. So let's use
# a hack to detect if an old systemd version is currently present in
# the file system.
# https://bugzilla.redhat.com/show_bug.cgi?id=1943263
if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-6].so &>/dev/null; then
echo "Skipping presets for systemd-networkd.service, seems we are upgrading from old systemd."
else
%systemd_post %networkd_services
fi
%systemd_post %networkd_services
%preun networkd
%systemd_preun %networkd_services
@ -1491,10 +1532,10 @@ fi
%global _docdir_fmt %{name}
%files -f %{name}.lang -f .file-list-main
%doc %{_pkgdocdir}
%exclude %{_pkgdocdir}/LICENSE*
# Only the licenses texts for the licenses in License line are included.
%license LICENSE.GPL2
%license LICENSE.LGPL2.1
%license LICENSES/MIT.txt
%ghost %dir %attr(0755,-,-) /etc/systemd/system/basic.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/bluetooth.target.wants
@ -1557,6 +1598,10 @@ fi
%files standalone-repart -f .file-list-standalone-repart
%if %{with report_standalone}
%files standalone-report -f .file-list-standalone-report
%endif
%files standalone-tmpfiles -f .file-list-standalone-tmpfiles
%files standalone-sysusers -f .file-list-standalone-sysusers