# Release from https://github.com/systemd/systemd or systemd-stable %undefine stable %if 0%{?__isa_bits} == 64 %global elf_bits (64bit) %global elf_suffix ()%{elf_bits} %endif %bcond bzip2 1 %bcond gnutls 1 %bcond lz4 1 %bcond xz 1 %bcond zlib 1 %bcond zstd 1 # Bootstrap may be needed to break circular dependencies with cryptsetup, # e.g. when re-building cryptsetup on a json-c SONAME-bump. %bcond bootstrap 0 %bcond tests 1 %bcond lto 1 # Build docs on 64-bit architectures only %bcond docs %[%{?__isa_bits} >= 64] # Build from git main %bcond upstream 0 # When bootstrap, libcryptsetup is disabled # but auto-features causes many options to be turned on # that depend on libcryptsetup (e.g. libcryptsetup-plugins, homed) %if %{with bootstrap} %global __meson_auto_features disabled %endif Name: systemd-extras Url: https://systemd.io Version: 257.9 Release: 2%{?dist} # 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 (optional components) %global github_version %(c=%{version}; echo ${c} | tr '~' '-') # download tarballs with "spectool -g systemd.spec" Source0: https://github.com/systemd/systemd%{?stable:-stable}/archive/v%{github_version}/systemd-%{github_version}.tar.gz # Sources for optional systemd components Source9000: systemd-network.sysusersd Source9001: systemd-timesync.sysusersd # Backports of patches from upstream (0000–0499) # Downstream-only patches (9000–9999) BuildRequires: gcc BuildRequires: gcc-c++ BuildRequires: clang BuildRequires: coreutils BuildRequires: libcap-devel BuildRequires: libmount-devel BuildRequires: libfdisk-devel BuildRequires: libpwquality-devel BuildRequires: pam-devel BuildRequires: libselinux-devel BuildRequires: audit-libs-devel %if %{without bootstrap} BuildRequires: cryptsetup-devel %endif BuildRequires: dbus-devel BuildRequires: util-linux # /usr/bin/getfacl is needed by test-acl-util BuildRequires: acl BuildRequires: libacl-devel BuildRequires: gobject-introspection-devel BuildRequires: libblkid-devel %if %{with xz} BuildRequires: xz-devel BuildRequires: xz %endif %if %{with lz4} BuildRequires: lz4-devel BuildRequires: lz4 %endif %if %{with bzip2} BuildRequires: bzip2-devel %endif %if %{with zstd} BuildRequires: libzstd-devel %endif BuildRequires: libidn2-devel BuildRequires: libcurl-devel BuildRequires: kmod-devel BuildRequires: elfutils-devel BuildRequires: openssl-devel %if %{with gnutls} BuildRequires: gnutls-devel %endif BuildRequires: libmicrohttpd-devel BuildRequires: libxkbcommon-devel BuildRequires: iptables-devel BuildRequires: pkgconfig(bash-completion) BuildRequires: pkgconfig(libarchive) BuildRequires: pkgconfig(libfido2) BuildRequires: pkgconfig(tss2-esys) BuildRequires: pkgconfig(tss2-rc) BuildRequires: pkgconfig(tss2-mu) BuildRequires: pkgconfig(libbpf) BuildRequires: systemtap-sdt-devel %if %{with docs} BuildRequires: libxslt BuildRequires: docbook-style-xsl %endif BuildRequires: pkgconfig BuildRequires: gperf BuildRequires: gawk BuildRequires: tree BuildRequires: hostname BuildRequires: python3 BuildRequires: python3-devel BuildRequires: python3dist(jinja2) BuildRequires: python3dist(lxml) BuildRequires: python3dist(pefile) BuildRequires: python3dist(pytest) %if 0%{?want_bootloader} BuildRequires: python3dist(pyelftools) %endif # gzip and lzma are provided by the stdlib BuildRequires: firewalld-filesystem BuildRequires: libseccomp-devel BuildRequires: meson >= 0.43 BuildRequires: gettext # We use RUNNING_ON_VALGRIND in tests, so the headers need to be available %ifarch %{valgrind_arches} BuildRequires: valgrind-devel %endif %ifnarch %ix86 # bpftool is not built for i386 BuildRequires: bpftool BuildRequires: kernel-devel %global have_bpf 1 %endif %description The systemd-extras package provides optional systemd components as sub- packages, such as systemd-networkd and systemd-timesyncd, which are not part of CentOS Stream %{?rhel} or Red Hat Enterprise Linux %{?rhel} (or possibly derivatives). This package was built from the %(c=%version; echo "v${c%.*}%{?stable:-stable}") branch of systemd. %package -n systemd-networkd Summary: System daemon that manages network configurations License: LGPL-2.1-or-later BuildRequires: systemd-rpm-macros Requires: dbus >= 1.9.18 Requires: (util-linux-core or util-linux) %{?systemd_requires} %{?sysusers_requires_compat} # Recommends to replace normal Requires deps for stuff that is dlopen()ed # See: objdump -j .note.dlopen -s /usr/lib/systemd/systemd-timesyncd Recommends: libbpf.so.1%{?elf_suffix} Recommends: libbpf.so.1(LIBBPF_0.4.0)%{?elf_bits} Recommends: libidn2.so.0%{?elf_suffix} Recommends: libidn2.so.0(IDN2_0.0.0)%{?elf_bits} Recommends: libtss2-esys.so.0%{?elf_suffix} Recommends: libtss2-rc.so.0%{?elf_suffix} Recommends: libtss2-mu.so.0%{?elf_suffix} Recommends: libcryptsetup.so.12%{?elf_suffix} Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits} %description -n systemd-networkd systemd-networkd is a system service that manages networks. It detects and configures network devices as they appear, as well as creating virtual network devices. %package -n systemd-networkd-defaults Summary: Configure network interfaces with networkd by default Requires: systemd-networkd = %{version}-%{release} License: MIT-0 BuildArch: noarch %description -n systemd-networkd-defaults This package contains a set of config files for systemd-networkd that cause it to configure network interfaces by default. Note that systemd-networkd needs to enabled for this to have any effect. %package -n systemd-timesyncd Summary: System daemon to synchronize local system clock with NTP server License: LGPL-2.1-or-later BuildRequires: systemd-rpm-macros Requires: dbus >= 1.9.18 Requires: (util-linux-core or util-linux) %{?systemd_requires} %{?sysusers_requires_compat} # Recommends to replace normal Requires deps for stuff that is dlopen()ed # See: objdump -j .note.dlopen -s /usr/lib/systemd/systemd-timesyncd Recommends: libidn2.so.0%{?elf_suffix} Recommends: libidn2.so.0(IDN2_0.0.0)%{?elf_bits} %description -n systemd-timesyncd systemd-timesyncd is a system service to synchronize the local system clock with a remote Network Time Protocol server. It specifically implements only SNTP; this minimalistic service will set the system clock for large offsets or slowly adjust it for smaller deltas. %prep %autosetup -n systemd%{?stable:-stable}-%{github_version} -p1 %build %global ntpvendor %(source /etc/os-release; echo ${ID}) %{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1} VMLINUX_H_PATH='' %if 0%{?have_bpf} %global find_vmlinux_h %{expand: import functools, glob, subprocess def cmp(a, b): c = subprocess.call(["rpmdev-vercmp", a, b], stdout=subprocess.DEVNULL) return {0:0, 11:+1, 12:-1}[c] choices = list(glob.glob("/usr/src/kernels/*/vmlinux.h")) assert choices print(max(choices, key=functools.cmp_to_key(cmp))) } # The build fails on ppc64le with # "GCC error "Must specify a BPF target arch via __TARGET_ARCH_xxx". # TODO: Remove this when libbpf checks for __powerpc64__ macro. %ifnarch ppc64le VMLINUX_H_PATH=$(%python3 -c '%find_vmlinux_h') %endif %endif 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= -Ddev-kvm-mode=0666 -Dkmod=enabled -Dxkbcommon=enabled -Dblkid=enabled -Dfdisk=enabled -Dseccomp=enabled -Dima=true -Dselinux=enabled -Dbpf-framework=%[0%{?have_bpf}?"enabled":"disabled"] -Dvmlinux-h=%[0%{?have_bpf}?"auto":"disabled"] -Dvmlinux-h-path="$VMLINUX_H_PATH" -Dapparmor=disabled -Dpolkit=enabled -Dxz=%[%{with xz}?"enabled":"disabled"] -Dzlib=%[%{with zlib}?"enabled":"disabled"] -Dbzip2=%[%{with bzip2}?"enabled":"disabled"] -Dlz4=%[%{with lz4}?"enabled":"disabled"] -Dzstd=%[%{with zstd}?"enabled":"disabled"] -Dpam=enabled -Dacl=enabled -Dsmack=true -Dopenssl=enabled -Dp11kit=enabled -Dgcrypt=disabled -Daudit=enabled -Delfutils=enabled -Dlibcryptsetup=%[%{with bootstrap}?"disabled":"enabled"] -Delfutils=enabled -Drepart=enabled -Dpwquality=enabled -Dqrencode=%[%{defined rhel}?"disabled":"enabled"] -Dgnutls=%[%{with gnutls}?"enabled":"disabled"] -Dmicrohttpd=enabled -Dvmspawn=enabled -Dlibidn2=enabled -Dlibiptc=disabled -Dlibcurl=enabled -Dlibfido2=enabled -Dxenctrl=%[0%{?have_xen}?"enabled":"disabled"] -Defi=true -Dtpm=true -Dtpm2=enabled -Dhwdb=true -Dsysusers=true -Dstandalone-binaries=true -Ddefault-kill-user-processes=false -Dfirst-boot-full-preset=true -Ddefault-network=true -Dtests=unsafe -Dinstall-tests=true -Dnobody-user=nobody -Dnobody-group=nobody -Dcompat-mutable-uid-boundaries=true -Dsplit-bin=true -Db_ndebug=false -Dman=%[%{with docs}?"enabled":"disabled"] -Dversion-tag=%{version}%[%{without upstream}?"-%{release}":""] # https://bugzilla.redhat.com/show_bug.cgi?id=1906010 -Dshared-lib-tag=%{version_no_tilde}%[%{without upstream}?"-%{release}":""] -Dlink-executor-shared=false -Dfallback-hostname="localhost" -Ddefault-dnssec=no -Ddefault-dns-over-tls=no # https://bugzilla.redhat.com/show_bug.cgi?id=1867830 -Ddefault-mdns=no -Ddefault-llmnr=resolve # https://bugzilla.redhat.com/show_bug.cgi?id=2028169 -Dstatus-unit-format-default=combined %if 0%{?fedora} # https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer -Ddefault-timeout-sec=45 -Ddefault-user-timeout-sec=45 %endif -Dconfigfiledir=/usr/lib -Doomd=true -Dadm-gid=4 -Dtty-gid=5 -Ddisk-gid=6 -Dlp-gid=7 -Dkmem-gid=9 -Dwheel-gid=10 -Dcdrom-gid=11 -Ddialout-gid=18 -Dutmp-gid=22 -Dtape-gid=33 -Dkvm-gid=36 -Dvideo-gid=39 -Daudio-gid=63 -Dusers-gid=100 -Dinput-gid=104 -Drender-gid=105 -Dsgx-gid=106 -Dsystemd-journal-gid=190 -Dsystemd-network-uid=192 -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. -Dbootloader=%[%{?want_bootloader}?"enabled":"disabled"] -Dukify=enabled %if 0%{?want_bootloader} && %{with obs} -Dsbat-distro-url=https://github.com/systemd/systemd -Dsbat-distro=upstream -Dsbat-distro-summary='Upstream build from git' %endif -Dlink-udev-shared=false -Dlink-networkd-shared=false -Dlink-timesyncd-shared=false ) %if %{without lto} %global _lto_cflags %nil %endif { %meson "${CONFIGURE_OPTS[@]}" %{?meson_extra_configure_options} ; } %meson_build %install %meson_install pushd %{buildroot} find . \( -type f -o -type l \) -print0 | \ grep -E -v '(net(work|dev)|time(sync|-set|-wait-sync))' -z -Z | \ xargs -0 --no-run-if-empty -n1 -IFILE rm -v FILE rm -f %{buildroot}%{_prefix}/lib/systemd/portable/profile/nonetwork/service.conf rm -f %{buildroot}%{_prefix}/lib/systemd/network/99-default.link rm -f %{buildroot}%{_prefix}/lib/systemd/system/network{-online,-pre,}.target rm -rf %{buildroot}%{_prefix}/lib/systemd/tests/ find . -type d -empty -delete popd # Config files that were moved under /usr. # We need to %ghost them so that they are not removed on upgrades. mkdir -p %{buildroot}%{_sysconfdir}/systemd/ touch %{buildroot}%{_sysconfdir}/systemd/networkd.conf \ %{buildroot}%{_sysconfdir}/systemd/timesyncd.conf mkdir -p %{buildroot}%{_sysconfdir}/systemd/network/ mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/timesync/ touch %{buildroot}%{_localstatedir}/lib/systemd/timesync/clock # Since systemd v250, systemd-network-generator is no longer part of systemd-networkd, see # also: https://github.com/systemd/systemd/commit/987dd89c775815831ae21736fe60aef59cb7a6fa rm -f %{buildroot}{%{_prefix}/lib/systemd,%{_unitdir},%{_mandir}/man8}/systemd-network-generator* %check # Nothing must link against libsystemd-shared.so for binary in $(find %{buildroot} -type f -executable); do ldd $binary 2>&1 | grep libsystemd-shared && exit 1 || : done %if %{with tests} meson test -C %{_vpath_builddir} -t 6 --print-errorlogs %endif %pre -n systemd-networkd %sysusers_create_compat %{SOURCE9000} %post -n systemd-networkd %systemd_post systemd-networkd.service systemd-networkd.socket systemd-networkd-wait-online.service systemd-networkd-persistent-storage.service %preun -n systemd-networkd %systemd_preun systemd-networkd.service systemd-networkd.socket systemd-networkd-wait-online.service systemd-networkd-persistent-storage.service %postun -n systemd-networkd %systemd_postun_with_restart systemd-networkd.service %pre -n systemd-timesyncd %sysusers_create_compat %{SOURCE9001} %post -n systemd-timesyncd %systemd_post systemd-timesyncd.service %preun -n systemd-timesyncd %systemd_preun systemd-timesyncd.service %postun -n systemd-timesyncd %systemd_postun_with_restart systemd-timesyncd.service %files -n systemd-networkd %license LICENSE.LGPL2.1 %dir %{_sysconfdir}/systemd/network/ %ghost %{_sysconfdir}/systemd/networkd.conf %{_bindir}/networkctl %dir %{_prefix}/lib/systemd/network/ %{_prefix}/lib/systemd/network/80-6rd-tunnel.link %{_prefix}/lib/systemd/network/80-container-vb.link %{_prefix}/lib/systemd/network/80-container-ve.link %{_prefix}/lib/systemd/network/80-container-vz.link %{_prefix}/lib/systemd/network/80-namespace-ns.link %{_prefix}/lib/systemd/network/80-vm-vt.link %{_prefix}/lib/systemd/network/80-6rd-tunnel.network %{_prefix}/lib/systemd/network/80-auto-link-local.network.example %{_prefix}/lib/systemd/network/80-container-host0-tun.network %{_prefix}/lib/systemd/network/80-container-host0.network %{_prefix}/lib/systemd/network/80-container-vb.network %{_prefix}/lib/systemd/network/80-container-ve.network %{_prefix}/lib/systemd/network/80-container-vz.network %{_prefix}/lib/systemd/network/80-namespace-ns.network %{_prefix}/lib/systemd/network/80-vm-vt.network %{_prefix}/lib/systemd/network/80-wifi-adhoc.network %{_prefix}/lib/systemd/network/80-wifi-ap.network.example %{_prefix}/lib/systemd/network/80-wifi-station.network.example %{_prefix}/lib/systemd/network/89-ethernet.network.example %{_prefix}/lib/systemd/networkd.conf %{_unitdir}/systemd-networkd-persistent-storage.service %{_unitdir}/systemd-networkd-wait-online.service %{_unitdir}/systemd-networkd-wait-online@.service %{_unitdir}/systemd-networkd.service %{_unitdir}/systemd-networkd.socket %{_prefix}/lib/systemd/systemd-networkd %{_prefix}/lib/systemd/systemd-networkd-wait-online %{_sysusersdir}/systemd-network.conf %{_tmpfilesdir}/systemd-network.conf %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPServer.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPv4Client.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.DHCPv6Client.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Link.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Manager.xml %{_datadir}/dbus-1/interfaces/org.freedesktop.network1.Network.xml %{_datadir}/dbus-1/system-services/org.freedesktop.network1.service %{_datadir}/dbus-1/system.d/org.freedesktop.network1.conf %{_datadir}/polkit-1/actions/org.freedesktop.network1.policy %{_datadir}/polkit-1/rules.d/systemd-networkd.rules %{_mandir}/man1/networkctl.1* %{_mandir}/man5/networkd.conf.5* %{_mandir}/man5/networkd.conf.d.5* %{_mandir}/man5/org.freedesktop.network1.5* %{_mandir}/man5/systemd.netdev.5* %{_mandir}/man5/systemd.network.5* %{_mandir}/man8/systemd-networkd-wait-online.8* %{_mandir}/man8/systemd-networkd-wait-online.service.8* %{_mandir}/man8/systemd-networkd-wait-online@.service.8* %{_mandir}/man8/systemd-networkd.8* %{_mandir}/man8/systemd-networkd.service.8* # "/usr/share/bash-completion/completions" is owned by "filesystem", no need to specify this explicitely in "Requires:" %{_datadir}/bash-completion/completions/networkctl # "/usr/share/zsh/site-functions" is owned by "filesystem", no need to specify this explicitely in "Requires:" %{_datadir}/zsh/site-functions/_networkctl %files -n systemd-networkd-defaults %{_prefix}/lib/systemd/network/80-auto-link-local.network %{_prefix}/lib/systemd/network/80-wifi-ap.network %{_prefix}/lib/systemd/network/80-wifi-station.network %{_prefix}/lib/systemd/network/89-ethernet.network %files -n systemd-timesyncd %license LICENSE.LGPL2.1 %ghost %{_sysconfdir}/systemd/timesyncd.conf %dir %{_prefix}/lib/systemd/ntp-units.d/ %{_prefix}/lib/systemd/ntp-units.d/80-systemd-timesync.list %{_unitdir}/systemd-time-wait-sync.service %{_unitdir}/systemd-timesyncd.service %{_unitdir}/time-set.target %{_prefix}/lib/systemd/systemd-time-wait-sync %{_prefix}/lib/systemd/systemd-timesyncd %{_prefix}/lib/systemd/timesyncd.conf %{_sysusersdir}/systemd-timesync.conf %{_datadir}/dbus-1/system-services/org.freedesktop.timesync1.service %{_datadir}/dbus-1/system.d/org.freedesktop.timesync1.conf %{_datadir}/polkit-1/actions/org.freedesktop.timesync1.policy %{_mandir}/man5/org.freedesktop.timesync1.5* %{_mandir}/man5/timesyncd.conf.5* %{_mandir}/man5/timesyncd.conf.d.5* %{_mandir}/man8/systemd-time-wait-sync.8* %{_mandir}/man8/systemd-time-wait-sync.service.8* %{_mandir}/man8/systemd-timesyncd.8* %{_mandir}/man8/systemd-timesyncd.service.8* %ghost %dir %{_localstatedir}/lib/systemd/timesync/ %ghost %{_localstatedir}/lib/systemd/timesync/clock %changelog * Sun Sep 14 2025 Robert Scheck 257.9-2 - Remove recommends for systemd-networkd-defaults to match Fedora * Fri Sep 12 2025 Robert Scheck 257.9-1 - Upgrade to 257.9 (and synchronize with systemd-257.9-2.fc42) * Mon May 15 2023 Robert Scheck 253.4-1 - Upgrade to 253.4 (and synchronize with systemd-253.4-1.fc39) * Sun Feb 27 2022 Robert Scheck 250.3-1 - Upgrade to 250.3 (and synchronize with systemd-250.3-6.fc37) * Tue Dec 14 2021 Robert Scheck 249.7-2 - Ship systemd-boot sub-package for x86_64 and aarch64 on RHEL 9 * Tue Dec 07 2021 Robert Scheck 249.7-1 - Upgrade to 249.7 (and synchronize with systemd-249.7-3.fc36) * Mon Jun 07 2021 Robert Scheck 248.3-1 - Upgrade to 248.3 (and synchronize with systemd-248.3-1.fc35) * Thu Jan 07 2021 Robert Scheck 247.2-2 - Do not ship systemd.net-naming-scheme(7) anymore (#1913780) * Sun Dec 20 2020 Robert Scheck 247.2-1 - Upgrade to 247.2 (and synchronize with systemd-247.2-1.fc34) * Sun Oct 11 2020 Robert Scheck 246.6-1 - Upgrade to 246.6 (and synchronize with systemd-246.6-3.fc34) * Sat Aug 08 2020 Robert Scheck 246.1-1 - Upgrade to 246.1 (and synchronize with systemd-246.1-1.fc33) * Tue Jun 02 2020 Robert Scheck 245.6-1 - Upgrade to 245.6 (and synchronize with systemd-245.6-1.fc33) * Mon Apr 20 2020 Robert Scheck 245.5-1 - Upgrade to 245.5 (and synchronize with systemd-245.5-1.fc33) * Sat Apr 04 2020 Robert Scheck 245.4-1 - Upgrade to 245.4 (and synchronize with systemd-245.4-1.fc33) * Fri Mar 27 2020 Robert Scheck 245.3-1 - Upgrade to 245.3 (and synchronize with systemd-245.3-1.fc33) * Sun Mar 08 2020 Robert Scheck 245-1 - Upgrade to 245 (and synchronize with systemd-245-1.fc33) * Tue Feb 11 2020 Robert Scheck 244.1-2 - Work around failing test-mountpoint-util (systemd#11505) * Sun Feb 09 2020 Robert Scheck 244.1-1 - Initial spec file based on systemd-244.1-2.fc32 (#1789146)