Compare commits

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

20 commits

Author SHA1 Message Date
Zbigniew Jędrzejewski-Szmek
b243575a28 Require systemd-libs and systemd-shared to be in the same version
... (rhbz#2404143)

(cherry picked from commit 79c9db1bc8)
(cherry picked from commit 75240e80fc)
2025-10-15 13:56:26 +02:00
Zbigniew Jędrzejewski-Szmek
eaa82f1830 Version 257.10 2025-10-13 21:56:14 +02:00
Zbigniew Jędrzejewski-Szmek
5fe99f055c Fix unit name in scriptlet
[80/89] Installing systemd-udev-0:258~rc3-1.fc44.x86_64
>>> Running %post scriptlet: systemd-udev-0:258~rc3-1.fc44.x86_64
>>> Finished %post scriptlet: systemd-udev-0:258~rc3-1.fc44.x86_64
>>> Scriptlet output:
>>> Failed to preset unit: Unit system-systemdx2dcryptsetup.slice does not exist

(cherry picked from commit 2289d65726)
2025-09-04 13:52:12 +02:00
Zbigniew Jędrzejewski-Szmek
bfb8f19e51 Version 257.9 2025-09-04 12:26:09 +02:00
Zbigniew Jędrzejewski-Szmek
2ced76e0c0 Version 257.8 2025-09-04 12:06:52 +02:00
Zbigniew Jędrzejewski-Szmek
b4a4a8f8cd Version 257.7
- Fixes for systemd itself, systemd-repart, systemd-resolved,
  systemd-vmspawn, systemd-networkd, resolvectl, bootctl, the shared
  library code, man pages, shell completions, and tests.
- Hardware database is updated.

(cherry picked from commit 5d30fd3b26)
2025-06-27 11:35:50 +02:00
Zbigniew Jędrzejewski-Szmek
25c3c12efd Do not mark symlinks as %ghost
When testing build reproducibility, we got the following result:

+ rpmdiff cache/rpms/systemd-257.6-1.fc43/systemd-257.6-1.fc43.x86_64.rpm \
          cache/build/systemd-257.6-1.fc43/rebuild/systemd-257.6-1.fc43.x86_64.rpm
......V..F. /etc/xdg/systemd/user

This is because we'd apply %ghost to a symlink to a directory, if the directory
stat reported 0 blocks. It seems that this depends on the filesystem type or
something and didn't pop up in previous rebuilds.

The first chunk is a noop to increase clarity.

The resulting difference from this patch in the file list:
$ diff -u systemd-257.6-build/systemd-257.6/.file-list-main{.0,}
-%config(noreplace) %ghost /etc/xdg/systemd/user
+%config(noreplace) /etc/xdg/systemd/user

(cherry picked from commit 7de88c66bd)
2025-06-27 11:35:45 +02:00
Zbigniew Jędrzejewski-Szmek
dae92c11b6 Version 257.6
- Fix for local information disclosure in systemd-coredump (CVE-2025-4598)
- Fixes for systemd itself, run0, systemd-networkd, "secure" pager,
  man pages, shell completions, sd-boot, sd-varlink
- Hardware database update

(cherry picked from commit ed6b885327)
2025-05-29 19:21:22 +02:00
Zbigniew Jędrzejewski-Szmek
ecc89e18c1 Restore /usr/lib/rpm/sysusers.generate-pre.sh
... (rhbz#2363673)

Fixup for d70176a086. The macros were
restored, but not the helper script.
2025-05-08 15:06:09 +02:00
Zbigniew Jędrzejewski-Szmek
00c27a99b1 Move mount.ddi symlinks to -container subpackage
Those symlinks point to systemd-dissect, so with just the main subpackage installed,
the symlink was dangling.

(cherry picked from commit 2192e86112)
2025-05-08 15:00:11 +02:00
LuK1337
0a968609a5 Revert "Disable freezing of user sessions"
This breaks suspend on my machine as of Linux 6.14, furthermore both
linked issues in rhbz#2321268 are closed and fixed in Linux upstream.

This reverts commit 6162965002.

(cherry picked from commit 451184cbea)
2025-05-08 15:00:11 +02:00
LuK1337
7310dda29a Backport adb/fastboot udev rules (BZ#2356537)
(cherry picked from commit f6af46db12)
2025-05-08 14:59:46 +02:00
Zbigniew Jędrzejewski-Szmek
fff5f18f9e Backport CI fix
(cherry picked from commit f6b814cc0f)
2025-04-10 15:53:09 +02:00
Zbigniew Jędrzejewski-Szmek
18475fd0dc Version 257.5
- A lot of small fixes in various components

(cherry picked from commit d304477023)
2025-04-10 08:07:08 +02:00
Daan De Meyer
9d263ec9b1 Download commit archives via full sha instead of short one
Both work and if we do full sha we can retrieve the full sha from the
source filename in the source rpm later on which is useful for various
use cases.

[skip changelog]

(cherry picked from commit 1126a7c6b8)
2025-04-10 08:06:45 +02:00
Daan De Meyer
3d961b036d Relax dependencies from noarch packages on archful packages for OBS builds
In OBS, noarch packages are shared between all architectures and
independent architectures can be rebuilt automatically without all
the other architectures getting rebuilt. This can result in the noarch
packages being newer than the archful packages for some architectures,
which means our current strict deps from the noarch packages on the
archful packages can't be satisfied.

To address this problem, let's relax the dependencies from the noarch
packages on the archful packages for OBS builds. Let's only do this for
OBS builds because this isn't an issue on Fedora as it's impossible to
build a package for only some of the architectures.

(cherry picked from commit 13d523f84d)
2025-04-10 08:06:14 +02:00
Zbigniew Jędrzejewski-Szmek
563d4a61f4 Add more services to %post for udev and networkd
Noticed in https://bugzilla.redhat.com/show_bug.cgi?id=2348669#c25.

Most of those units listed don't have an [Install] section, and of those that
have, almost all were disabled by default. This might be something to fix, e.g.
we might want to enable systemd-udev-load-credentials.service, this is
something to consider. But it's clearer if we list all the units that those
packages ship. In priciple somebody might ship a preset to enable them.
Anyway, the impact of this change is much smaller than might seem at first.
But systemd-network-generator.service has an [Install] section and is preset
to true, so not listing it in the scriptlets was a visible bug.

There's the additional caveat that systemd-network-generator.service is coowned
by two packages. The current system does not have a way of handling this
properly, because unit enablement is tied to the package install state. Let's
just call the scriptlet for this unit twice for now. I think that's not going
to cause any real problem.

(cherry picked from commit d1380dc114)
2025-04-10 08:06:00 +02:00
Zbigniew Jędrzejewski-Szmek
8a8df7278d Fix paths for /usr/sbin/nologin and related progs
I noticed that systemd-sysusers creates accounts with /usr/bin/nologin.
On merged systems is fine, but would not work for systems where
/usr/sbin is still a separate directory and /usr/bin/nologin does not
exist. This problem occurs because the meson configuration script discovers
the location using $PATH, which on recent builds results in /usr/bin always.
Just specify all the paths so that we don't depend on the presence and
order of paths in $PATH.

(cherry picked from commit 6f0d03443d)
2025-04-10 08:05:49 +02:00
Yaakov Selkowitz
ccb745be62 Limit sdubby dependency to Fedora
dnf repoclosure raises an error even when a boolean dependency is
missing.  While technically a bug in dnf, since these dependencies
are already conditional, simply adjusting the condition is simplest.

https://github.com/rpm-software-management/dnf-plugins-core/issues/549
(cherry picked from commit e346d9f33e)
2025-04-10 08:03:56 +02:00
Zbigniew Jędrzejewski-Szmek
d70176a086 Revert "Neuter sysusers macros"
It turns out that rpm-ostree might not be ready for this change.
https://github.com/coreos/rpm-ostree/issues/5333
https://gitlab.com/fedora/ostree/sig/-/issues/70
(maybe https://github.com/fedora-silverblue/issue-tracker/issues/636)

This reverts commit 1bdfa29ce2.

We don't actually need this change in F42, it's fine it only happens
in rawhide.
2025-03-12 11:16:46 +01:00
3 changed files with 157 additions and 26 deletions

View file

@ -1 +1 @@
SHA512 (systemd-257.4.tar.gz) = dfa0f6de38fa30daffabf6b02d6533ca4e7027188186d7e2e9648b99dad5c4afa30773138f18a34111e7bb2e6ddae8302284429b98b580e757dc67535846afbe
SHA512 (systemd-257.10.tar.gz) = 49a2c8cc1cd91363d90165a1145dcc417d524afd428917dad332e4b057ed9fc3ddb5b4beafab094b02a85d930c8aef9b63c8c9c1bc76ef3bdf0ce38a7d46466f

View file

@ -149,6 +149,7 @@ for file in files(buildroot):
elif re.search(r'''mymachines|
machinectl|
mount.ddi|
importctl|
portablectl|
systemd-nspawn|
@ -269,13 +270,13 @@ for file in files(buildroot):
if n in known_files:
prefix = known_files[n].split()[:-1]
elif file.is_dir() and not file.is_symlink():
elif file.is_dir(follow_symlinks=False):
prefix = ['%dir']
elif 'README' in n:
prefix = ['%doc']
elif n.startswith('/etc'):
prefix = ['%config(noreplace)']
if file.stat().st_size == 0:
if not file.is_symlink() and file.stat().st_size == 0:
prefix += ['%ghost']
else:
prefix = []

View file

@ -1,6 +1,3 @@
#global commit 1781de18ab8ebc3e42a607851d8effb3b0355c87
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
# We ship a .pc file but don't want to have a dep on pkg-config. We
# strip the automatically generated dep here and instead co-own the
# directory.
@ -46,6 +43,23 @@
# autorelease correctly if the macro is conditionalized in the Release field.
%{?release_override:%global autorelease %{release_override}%{?dist}}
# In OBS, noarch packages are shared between all architectures and
# independent architectures can be rebuilt automatically without all
# the other architectures getting rebuilt. This can result in the noarch
# packages being newer than the archful packages for some architectures,
# which means our current strict deps from the noarch packages on the
# archful packages can't be satisfied.
#
# To address this problem, let's relax the dependencies from the noarch
# packages on the archful packages for OBS builds. Let's only do this for
# OBS builds because this isn't an issue on Fedora as it's impossible to
# build a package for only some of the architectures.
%if %{with obs}
%define noarch_requires_version %{version}
%else
%define noarch_requires_version %{version}-%{release}
%endif
Name: systemd
Url: https://systemd.io
# Allow users to specify the version and release when building the rpm by
@ -53,7 +67,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:257.4}
Version: %{?version_override}%{!?version_override:257.10}
%else
Version: %{?version_override}%{!?version_override:%(cat meson.version)}
%endif
@ -73,7 +87,7 @@ Source0: https://github.com/systemd/systemd/archive/v%{version}/%{name}-%
%elif %{defined branch}
Source0: https://github.com/systemd/systemd/archive/refs/heads/%{branch}.tar.gz
%elif %{defined commit}
Source0: https://github.com/systemd/systemd/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Source0: https://github.com/systemd/systemd/archive/%{commit}/%{name}-%{commit}.tar.gz
%endif
# This file must be available before %%prep.
# It is generated during systemd build and can be found at build/src/rpm/triggers.systemd.sh.
@ -115,6 +129,8 @@ Patch: https://github.com/systemd/systemd/pull/26494.patch
%endif
%if %{without upstream}
# Those are downstream-only patches, but we don't want them in packit builds.
# Temporarily drop use of PrivateTmp=disconnected. This is causing failures
# in various places:
# https://bugzilla.redhat.com/show_bug.cgi?id=2334015
@ -125,7 +141,6 @@ Patch: 0001-Revert-units-use-PrivateTmp-disconnected-instead-of-.patch
# https://fedoraproject.org/wiki/Changes/RPMSuportForSystemdSysusers.
Patch: 0002-sysusers-emit-audit-events-for-user-and-group-creati.patch
# Those are downstream-only patches, but we don't want them in packit builds:
# https://bugzilla.redhat.com/show_bug.cgi?id=2251843
Patch: https://github.com/systemd/systemd/pull/30846.patch
%endif
@ -368,6 +383,7 @@ Summary: systemd libraries
License: LGPL-2.1-or-later AND MIT
Provides: nss-myhostname = 0.4
Provides: nss-myhostname%{_isa} = 0.4
Conflicts: systemd-shared < %{version}-%{release}
%description libs
Libraries for systemd and udev.
@ -375,6 +391,7 @@ Libraries for systemd and udev.
%package shared
Summary: Internal systemd shared library
License: LGPL-2.1-or-later AND MIT
Conflicts: systemd-libs < %{version}-%{release}
%description shared
Internal libraries used by various systemd binaries.
@ -431,6 +448,8 @@ Provides: udev = %{version}
Provides: udev%{_isa} = %{version}
%if 0%{?fedora} || 0%{?rhel} >= 10
Requires: (grubby > 8.40-72 if grubby)
%endif
%if 0%{?fedora}
Requires: (sdubby > 1.0-3 if sdubby)
%endif
# A backport of systemd-timesyncd is shipped as a separate package in EPEL so
@ -495,7 +514,7 @@ machine, and to create or grow partitions and make file systems automatically.
%package ukify
Summary: Tool to build Unified Kernel Images
Requires: %{name} = %{version}-%{release}
Requires: %{name} = %{noarch_requires_version}
Requires: (systemd-boot if %{shrink:(
filesystem(x86-32) or
@ -619,7 +638,7 @@ devices.
%package networkd-defaults
Summary: Configure network interfaces with networkd by default
Requires: %{name}-networkd = %{version}-%{release}
Requires: %{name}-networkd = %{noarch_requires_version}
License: MIT-0
BuildArch: noarch
@ -642,7 +661,7 @@ resolver, as well as an LLMNR and MulticastDNS resolver and responder.
%package oomd-defaults
Summary: Configuration files for systemd-oomd
Requires: %{name}-udev = %{version}-%{release}
Requires: %{name}-udev = %{noarch_requires_version}
License: LGPL-2.1-or-later
BuildArch: noarch
@ -857,6 +876,19 @@ CONFIGURE_OPTS=(
-Dsystemd-resolve-uid=193
# -Dsystemd-timesync-uid=, not set yet
# Make sure we use the original paths to maintain compatibility
# with unmerged systems
-Dquotaon-path=/usr/sbin/quotaon
-Dquotacheck-path=/usr/sbin/quotacheck
-Dkmod-path=/usr/bin/kmod
-Dkexec-path=/usr/sbin/kexec
-Dsulogin-path=/usr/sbin/sulogin
-Dmount-path=/usr/bin/mount
-Dumount-path=/usr/bin/umount
-Dloadkeys-path=/usr/bin/loadkeys
-Dsetfont-path=/usr/bin/setfont
-Dnologin-path=/usr/sbin/nologin
# For now, let's build the bootloader in the same places where we
# built with gnu-efi. Later on, we might want to extend coverage, but
# considering that that support is untested, let's not do this now.
@ -1028,7 +1060,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} >= 43
install -m 0644 -D %{SOURCE21} %{buildroot}%{_rpmconfigdir}/macros.d/macros.sysusers
%else
install -m 0644 -D %{SOURCE20} %{buildroot}%{_rpmconfigdir}/macros.d/macros.sysusers
@ -1074,15 +1106,6 @@ mv %{buildroot}/usr/lib/tmpfiles.d/20-systemd-userdb.conf{,.example}
install -m 0644 -t %{buildroot}%{_prefix}/lib/pam.d/ %{SOURCE26}
# Disable freezing of user sessions while we're working out the details.
mkdir -p %{buildroot}/usr/lib/systemd/system/service.d/
cat >>%{buildroot}/usr/lib/systemd/system/service.d/50-keep-warm.conf <<EOF
# Disable freezing of user sessions to work around kernel bugs.
# See https://bugzilla.redhat.com/show_bug.cgi?id=2321268
[Service]
Environment=SYSTEMD_SLEEP_FREEZE_USER_SESSIONS=0
EOF
%find_lang %{name}
# Split files in build root into rpms
@ -1168,7 +1191,106 @@ systemctl daemon-reexec || :
# a different package version.
systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-homed.service %{?want_bootloader:systemd-boot-update.service} systemd-oomd.service systemd-portabled.service systemd-pstore.service systemd-timesyncd.service remote-cryptsetup.target
%global udev_services %{shrink:
cryptsetup-pre.target
cryptsetup.target
hibernate.target
hybrid-sleep.target
initrd-cleanup.service
initrd-fs.target
initrd-parse-etc.service
initrd-root-device.target
initrd-root-fs.target
initrd-switch-root.service
initrd-switch-root.target
initrd-udevadm-cleanup-db.service
initrd-usr-fs.target
initrd.target
integritysetup-pre.target
integritysetup.target
kmod-static-nodes.service
proc-sys-fs-binfmt_misc.automount
proc-sys-fs-binfmt_misc.mount
quotaon-root.service
quotaon@.service
remote-cryptsetup.target
remote-veritysetup.target
sleep.target
suspend-then-hibernate.target
suspend.target
system-systemd\\x2dcryptsetup.slice
system-systemd\\x2dveritysetup.slice
systemd-backlight@.service
systemd-binfmt.service
systemd-bless-boot.service
systemd-bsod.service
systemd-coredump.socket
systemd-coredump@.service
systemd-fsck-root.service
systemd-fsck@.service
systemd-growfs-root.service
systemd-growfs@.service
systemd-hibernate-clear.service
systemd-hibernate-resume.service
systemd-hibernate.service
systemd-homed-activate.service
systemd-homed-firstboot.service
systemd-homed.service
systemd-hwdb-update.service
systemd-hybrid-sleep.service
systemd-modules-load.service
systemd-network-generator.service
systemd-oomd.service
systemd-oomd.socket
systemd-pcrextend.socket
systemd-pcrextend@.service
systemd-pcrfs-root.service
systemd-pcrfs@.service
systemd-pcrlock-file-system.service
systemd-pcrlock-firmware-code.service
systemd-pcrlock-firmware-config.service
systemd-pcrlock-machine-id.service
systemd-pcrlock-make-policy.service
systemd-pcrlock-secureboot-authority.service
systemd-pcrlock-secureboot-policy.service
systemd-pcrlock.socket
systemd-pcrlock@.service
systemd-pcrmachine.service
systemd-pcrphase-initrd.service
systemd-pcrphase-sysinit.service
systemd-pcrphase.service
systemd-portabled.service
systemd-pstore.service
systemd-quotacheck-root.service
systemd-quotacheck@.service
systemd-random-seed.service
systemd-remount-fs.service
systemd-repart.service
systemd-rfkill.service
systemd-rfkill.socket
systemd-suspend-then-hibernate.service
systemd-suspend.service
systemd-sysctl.service
systemd-timesyncd.service
systemd-tmpfiles-setup-dev-early.service
systemd-tmpfiles-setup-dev.service
systemd-udev-load-credentials.service
systemd-udev-settle.service
systemd-udev-trigger.service
systemd-udevd-control.socket
systemd-udevd-kernel.socket
systemd-udevd.service
systemd-vconsole-setup.service
systemd-volatile-root.service
veritysetup-pre.target
veritysetup.target
%{?want_bootloader:
systemd-boot-random-seed.service
systemd-boot-update.service
systemd-bootctl.socket
systemd-bootctl@.service
}
}
%post udev
# Move old stuff around in /var/lib
@ -1202,7 +1324,7 @@ grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null &&
%posttrans udev
# Restart some services.
# Others are either oneshot services, or sockets, and restarting them causes issues (#1378974)
%systemd_posttrans_with_restart systemd-udevd.service systemd-timesyncd.service
%systemd_posttrans_with_restart systemd-udevd.service systemd-timesyncd.service systemd-homed.service systemd-oomd.service systemd-portabled.service
%global journal_remote_units_restart systemd-journal-gatewayd.service systemd-journal-remote.service systemd-journal-upload.service
%global journal_remote_units_norestart systemd-journal-gatewayd.socket systemd-journal-remote.socket
@ -1224,6 +1346,14 @@ fi
%systemd_posttrans_with_restart %journal_remote_units_restart
%firewalld_reload
%global networkd_services %{shrink:
systemd-networkd.service
systemd-networkd.socket
systemd-networkd-wait-online.service
systemd-network-generator.service
systemd-networkd-persistent-storage.service
}
%post networkd
# systemd-networkd was split out in systemd-246.6-2.
# Ideally, we would have a trigger scriptlet to record enablement
@ -1237,11 +1367,11 @@ fi
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 systemd-networkd.service systemd-networkd-wait-online.service
%systemd_post %networkd_services
fi
%preun networkd
%systemd_preun systemd-networkd.service systemd-networkd-wait-online.service
%systemd_preun %networkd_services
%posttrans networkd
%systemd_posttrans_with_restart systemd-networkd.service