systemd/systemd.spec

1152 lines
42 KiB
RPMSpec
Raw Normal View History

2020-10-20 15:33:29 +00:00
#global commit c4b843473a75fb38ed5bf54e9d3cfb1cb3719efa
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
2012-08-08 10:09:51 +00:00
2012-09-13 12:43:03 +00:00
# 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.
%global __requires_exclude pkg-config
%global pkgdir %{_prefix}/lib/systemd
%global system_unit_dir %{pkgdir}/system
2017-03-02 16:30:49 +00:00
%global user_unit_dir %{pkgdir}/user
%if 0%{?__isa_bits} == 64
%global elf_bits (64bit)
%global elf_suffix ()%{elf_bits}
%endif
2022-01-07 16:52:31 +00:00
# Bootstrap may be needed to break circular dependencies with cryptsetup,
# e.g. when re-building cryptsetup on a json-c SONAME-bump.
2020-04-21 17:51:17 +00:00
%bcond_with bootstrap
%bcond_without tests
%bcond_without lto
# Support for quick builds with rpmbuild --build-in-place.
# See README.build-in-place.
%bcond_with inplace
2010-06-22 04:16:32 +00:00
Name: systemd
Url: https://systemd.io
%if %{without inplace}
2023-06-01 14:44:52 +00:00
Version: 253.5
%else
# determine the build information from local checkout
Version: %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
%endif
2022-10-25 07:00:02 +00:00
Release: %autorelease
2023-03-03 17:17:58 +00:00
%global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)
# For a breakdown of the licensing, see README
License: LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later
2016-11-03 23:00:42 +00:00
Summary: System and Service Manager
2015-07-29 21:32:39 +00:00
# download tarballs with "spectool -g systemd.spec"
%if %{defined commit}
Source0: https://github.com/systemd/systemd%{?stable:-stable}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
%else
2019-11-22 13:57:07 +00:00
%if 0%{?stable}
Source0: https://github.com/systemd/systemd-stable/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
2019-11-19 12:27:41 +00:00
%else
Source0: https://github.com/systemd/systemd/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
%endif
2019-11-19 12:27:41 +00:00
%endif
# This file must be available before %%prep.
2018-10-29 00:53:24 +00:00
# It is generated during systemd build and can be found in build/src/core/.
Source1: triggers.systemd
Source2: split-files.py
2018-02-21 14:23:30 +00:00
Source3: purge-nobody-user
2015-05-20 04:34:19 +00:00
# Prevent accidental removal of the systemd package
Source4: yum-protect-systemd.conf
2015-09-17 22:43:10 +00:00
Source5: inittab
Source6: sysctl.conf.README
2015-01-06 02:08:08 +00:00
Source7: systemd-journal-remote.xml
Source8: systemd-journal-gatewayd.xml
2015-06-27 18:00:14 +00:00
Source9: 20-yama-ptrace.conf
Source10: systemd-udev-trigger-no-reload.conf
Source13: libsystemd-shared.abignore
Source14: 10-oomd-defaults.conf
Source15: 10-oomd-per-slice-defaults.conf
Source16: 10-timeout-abort.conf
Source17: 10-map-count.conf
2020-02-07 15:34:30 +00:00
Source21: macros.sysusers
Source22: sysusers.attr
Source23: sysusers.prov
Source24: sysusers.generate-pre.sh
Source25: 98-default-mac-none.link
%if 0
GIT_DIR=../../src/systemd/.git git format-patch-ab --no-signature -M -N v235..v235-stable
i=1; for j in 00*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done|xclip
GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[67]* hwdb/parse_hwdb.py >hwdb.patch
%endif
2017-03-02 16:30:49 +00:00
# Backports of patches from upstream (00000499)
2021-03-23 00:08:51 +00:00
#
2022-05-06 18:48:00 +00:00
# Any patches which are "in preparation" upstream should be listed here, rather
# than in the next section. Packit CI will drop any patches in this range before
# applying upstream pull requests.
# https://github.com/systemd/systemd/issues/26488
# https://bugzilla.redhat.com/show_bug.cgi?id=2164404
2023-03-03 17:56:53 +00:00
Patch0001: https://github.com/systemd/systemd/pull/26494.patch
2022-05-19 10:39:10 +00:00
# Those are downstream-only patches, but we don't want them in packit builds:
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828
2022-05-19 10:39:10 +00:00
Patch0490: use-bfq-scheduler.patch
2020-11-12 12:08:11 +00:00
# Adjust upstream config to use our shared stack
Patch0491: fedora-use-system-auth-in-pam-systemd-user.patch
2017-02-14 23:59:10 +00:00
%ifarch %{ix86} x86_64 aarch64
%global have_gnu_efi 1
%endif
BuildRequires: gcc
BuildRequires: gcc-c++
2021-12-25 14:29:02 +00:00
BuildRequires: clang
BuildRequires: coreutils
2010-06-22 04:16:32 +00:00
BuildRequires: libcap-devel
2014-12-10 23:01:54 +00:00
BuildRequires: libmount-devel
2020-02-05 12:21:04 +00:00
BuildRequires: libfdisk-devel
BuildRequires: libpwquality-devel
2010-06-22 04:16:32 +00:00
BuildRequires: pam-devel
2010-07-24 01:05:02 +00:00
BuildRequires: libselinux-devel
2010-09-14 15:51:38 +00:00
BuildRequires: audit-libs-devel
%if %{without bootstrap}
BuildRequires: cryptsetup-devel
%endif
BuildRequires: dbus-devel
BuildRequires: /usr/sbin/sfdisk
# /usr/bin/getfacl is needed by test-acl-util
BuildRequires: /usr/bin/getfacl
2011-07-13 21:28:44 +00:00
BuildRequires: libacl-devel
2013-03-07 22:46:46 +00:00
BuildRequires: gobject-introspection-devel
BuildRequires: libblkid-devel
2012-01-11 03:44:49 +00:00
BuildRequires: xz-devel
BuildRequires: xz
2015-11-19 13:46:22 +00:00
BuildRequires: lz4-devel
BuildRequires: lz4
2015-11-19 13:46:22 +00:00
BuildRequires: bzip2-devel
2020-06-30 07:40:20 +00:00
BuildRequires: libzstd-devel
2017-12-12 05:28:37 +00:00
BuildRequires: libidn2-devel
2014-08-19 23:48:42 +00:00
BuildRequires: libcurl-devel
2013-03-07 22:46:46 +00:00
BuildRequires: kmod-devel
2014-07-22 03:04:01 +00:00
BuildRequires: elfutils-devel
2020-02-05 12:21:04 +00:00
BuildRequires: openssl-devel
2014-07-22 03:04:01 +00:00
BuildRequires: gnutls-devel
%if %{undefined rhel}
2012-08-23 01:27:58 +00:00
BuildRequires: qrencode-devel
%endif
2012-09-28 00:38:31 +00:00
BuildRequires: libmicrohttpd-devel
BuildRequires: libxkbcommon-devel
2015-02-16 20:54:03 +00:00
BuildRequires: iptables-devel
BuildRequires: pkgconfig(libfido2)
2021-05-06 13:30:27 +00:00
BuildRequires: pkgconfig(tss2-esys)
BuildRequires: pkgconfig(tss2-rc)
BuildRequires: pkgconfig(tss2-mu)
BuildRequires: pkgconfig(libbpf)
2021-05-23 20:05:07 +00:00
BuildRequires: systemtap-sdt-devel
2012-08-23 01:27:58 +00:00
BuildRequires: libxslt
BuildRequires: docbook-style-xsl
BuildRequires: pkgconfig
BuildRequires: gperf
BuildRequires: gawk
2015-12-02 04:53:29 +00:00
BuildRequires: tree
2019-03-29 15:06:48 +00:00
BuildRequires: hostname
BuildRequires: python3
BuildRequires: python3-devel
BuildRequires: python3dist(jinja2)
BuildRequires: python3dist(lxml)
BuildRequires: python3dist(pefile)
%if %{undefined rhel}
BuildRequires: python3dist(pillow)
BuildRequires: python3dist(pytest-flakes)
%endif
BuildRequires: python3dist(pytest)
BuildRequires: python3dist(zstd)
# gzip and lzma are provided by the stdlib
2015-01-06 02:08:08 +00:00
BuildRequires: firewalld-filesystem
2014-02-20 00:12:13 +00:00
BuildRequires: libseccomp-devel
2017-12-12 05:27:09 +00:00
BuildRequires: meson >= 0.43
2017-07-02 00:16:12 +00:00
BuildRequires: gettext
2018-12-21 19:08:58 +00:00
# We use RUNNING_ON_VALGRIND in tests, so the headers need to be available
BuildRequires: valgrind-devel
2020-02-05 12:21:04 +00:00
BuildRequires: pkgconfig(bash-completion)
2020-11-12 11:22:25 +00:00
BuildRequires: perl
BuildRequires: perl(IPC::SysV)
2022-04-12 08:26:11 +00:00
%ifnarch %ix86
# bpftool is not built for i368
BuildRequires: bpftool
%global have_bpf 1
%endif
2023-02-02 01:14:52 +00:00
%if 0%{?fedora}
%ifarch x86_64 aarch64
# That package is only built for those two architectures
BuildRequires: xen-devel
%endif
2023-02-02 01:14:52 +00:00
%endif
2012-01-22 19:46:45 +00:00
Requires(post): coreutils
Requires(post): grep
# systemd-machine-id-setup requires libssl
Requires(post): openssl-libs
Requires: dbus >= 1.9.18
Requires: %{name}-pam = %{version}-%{release}
2022-02-24 07:01:43 +00:00
Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build)
Requires: %{name}-libs = %{version}-%{release}
%{?fedora:Recommends: %{name}-networkd = %{version}-%{release}}
%{?fedora:Recommends: %{name}-resolved = %{version}-%{release}}
Recommends: diffutils
Requires: (util-linux-core or util-linux)
Recommends: libxkbcommon%{_isa}
Provides: /bin/systemctl
2012-01-26 13:37:41 +00:00
Provides: /sbin/shutdown
2013-03-07 22:46:46 +00:00
Provides: syslog
2012-01-22 19:46:45 +00:00
Provides: systemd-units = %{version}-%{release}
Obsoletes: system-setup-keyboard < 0.9
Provides: system-setup-keyboard = 0.9
# systemd-sysv-convert was removed in f20: https://fedorahosted.org/fpc/ticket/308
Obsoletes: systemd-sysv < 206
# self-obsoletes so that dnf will install new subpackages on upgrade (#1260394)
Obsoletes: %{name} < 249~~
Provides: systemd-sysv = 206
Conflicts: initscripts < 9.56.1
%if 0%{?fedora}
Conflicts: fedora-release < 23-0.12
%endif
2020-03-08 11:12:39 +00:00
Obsoletes: timedatex < 0.6-3
2019-09-21 22:05:52 +00:00
Provides: timedatex = 0.6-3
Conflicts: %{name}-standalone-repart < %{version}-%{release}^
Provides: %{name}-repart = %{version}-%{release}
Conflicts: %{name}-standalone-tmpfiles < %{version}-%{release}^
Provides: %{name}-tmpfiles = %{version}-%{release}
Conflicts: %{name}-standalone-sysusers < %{version}-%{release}^
Provides: %{name}-sysusers = %{version}-%{release}
Conflicts: %{name}-standalone-shutdown < %{version}-%{release}^
Provides: %{name}-shutdown = %{version}-%{release}
2010-06-22 04:16:32 +00:00
2020-10-20 15:33:29 +00:00
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
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 %{undefined rhel}
Recommends: libqrencode.so.4%{?elf_suffix}
%endif
Recommends: libbpf.so.0%{?elf_suffix}
Recommends: libbpf.so.0(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}
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Recommends: libcryptsetup.so.12%{?elf_suffix}
Recommends: libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
2020-10-20 15:33:29 +00:00
2010-06-22 04:16:32 +00:00
%description
systemd is a system and service manager that runs as PID 1 and starts the rest
of the system. It provides aggressive parallelization capabilities, uses socket
and D-Bus activation for starting services, offers on-demand starting of
daemons, keeps track of processes using Linux control groups, maintains mount
and automount points, and implements an elaborate transactional dependency-based
service control logic. systemd supports SysV and LSB init scripts and works as a
replacement for sysvinit. Other parts of this package are a logging daemon,
utilities to control basic system configuration like the hostname, date, locale,
maintain a list of logged-in users, system accounts, runtime directories and
2022-01-04 16:41:56 +00:00
settings, and a logging daemons.
2019-07-30 19:39:02 +00:00
%if 0%{?stable}
2023-03-03 17:17:58 +00:00
This package was built from the %(c=%version; echo "v${c%.*}-stable") branch of systemd.
%endif
2010-06-22 04:16:32 +00:00
%package libs
Summary: systemd libraries
License: LGPL-2.1-or-later AND MIT
Obsoletes: libudev < 183
Obsoletes: systemd < 185-4
Conflicts: systemd < 185-4
2016-05-22 03:56:03 +00:00
Obsoletes: systemd-compat-libs < 230
Obsoletes: nss-myhostname < 0.4
Provides: nss-myhostname = 0.4
Provides: nss-myhostname%{_isa} = 0.4
%description libs
Libraries for systemd and udev.
%package pam
Summary: systemd PAM module
Requires: %{name} = %{version}-%{release}
%description pam
Systemd PAM module registers the session with systemd-logind.
%package rpm-macros
Summary: Macros that define paths and scriptlets related to systemd
2018-11-02 10:53:19 +00:00
BuildArch: noarch
%description rpm-macros
Just the definitions of rpm macros.
See
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd
for information how to use those macros.
2011-07-27 21:25:36 +00:00
%package devel
Summary: Development headers for systemd
License: LGPL-2.1-or-later AND MIT
Requires: %{name}-libs%{_isa} = %{version}-%{release}
Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build)
2012-06-05 16:33:49 +00:00
Provides: libudev-devel = %{version}
Provides: libudev-devel%{_isa} = %{version}
Obsoletes: libudev-devel < 183
2011-07-27 21:25:36 +00:00
%description devel
2015-06-17 18:49:27 +00:00
Development headers and auxiliary files for developing applications linking
to libudev or libsystemd.
2011-07-27 21:25:36 +00:00
2015-11-12 06:12:17 +00:00
%package udev
Summary: Rule-based device node and kernel event manager
2023-02-08 11:31:21 +00:00
License: LGPL-2.1-or-later
Requires: systemd%{_isa} = %{version}-%{release}
2015-11-12 06:12:17 +00:00
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
Requires(post): grep
Requires: kmod >= 18-4
# https://bodhi.fedoraproject.org/updates/FEDORA-2020-dd43dd05b1
Obsoletes: systemd < 245.6-1
2015-11-12 06:12:17 +00:00
Provides: udev = %{version}
Provides: udev%{_isa} = %{version}
2015-11-12 06:12:17 +00:00
Obsoletes: udev < 183
# 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}
# https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c9
Suggests: systemd-bootchart
# https://bugzilla.redhat.com/show_bug.cgi?id=1408878
Requires: kbd
# https://bugzilla.redhat.com/show_bug.cgi?id=1753381
Provides: u2f-hidraw-policy = 1.0.2-40
Obsoletes: u2f-hidraw-policy < 1.0.2-40
2015-11-12 06:12:17 +00:00
# self-obsoletes to install both packages after split of systemd-boot
Obsoletes: systemd-udev < 252.2^
2015-11-12 06:12:17 +00:00
%description udev
This package contains systemd-udev and the rules and hardware database needed to
manage device nodes. This package is necessary on physical machines and in
virtual machines, but not in containers.
2015-11-12 06:12:17 +00:00
2022-01-04 16:41:56 +00:00
This package also provides systemd-timesyncd, a network time protocol daemon.
It also contains tools to manage encrypted home areas and secrets bound to the
2022-01-04 16:41:56 +00:00
machine, and to create or grow partitions and make file systems automatically.
%if 0%{?have_gnu_efi}
%package ukify
Summary: Tool to build Unified Kernel Images
Requires: %{name} = %{version}-%{release}
# We prefer llvm-objcopy over objcopy.
Requires: (llvm or binutils)
Recommends: llvm
Requires: python3dist(pefile)
Requires: python3dist(zstd)
Recommends: python3dist(pillow)
BuildArch: noarch
%description ukify
This package provides ukify, a script that combines a kernel image, an initrd,
with a command line, and possibly PCR measurements and other metadata, into a
Unified Kernel Image (UKI).
%package boot-unsigned
Summary: UEFI boot manager (unsigned version)
Provides: systemd-boot-unsigned-%{efi_arch} = %version-%release
Provides: systemd-boot = %version-%release
Provides: systemd-boot%{_isa} = %version-%release
# A provides with just the version, no release or dist, used to build systemd-boot
Provides: version(systemd-boot-unsigned) = %version
Provides: version(systemd-boot-unsigned)%{_isa} = %version
# self-obsoletes to install both packages after split of systemd-boot
Obsoletes: systemd-udev < 252.2^
%description boot-unsigned
systemd-boot (short: sd-boot) is a simple UEFI boot manager. It provides a
graphical menu to select the entry to boot and an editor for the kernel command
line. systemd-boot supports systems with UEFI firmware only.
This package contains the unsigned version. Install systemd-boot instead to get
the version that works with Secure Boot.
%endif
2015-11-12 04:46:42 +00:00
%package container
# Name is the same as in Debian
Summary: Tools for containers and VMs
Requires: %{name}%{_isa} = %{version}-%{release}
2015-11-12 04:46:42 +00:00
Requires(post): systemd
Requires(preun): systemd
Requires(postun): systemd
2015-11-12 06:12:17 +00:00
# obsolete parent package so that dnf will install new subpackage on upgrade (#1260394)
2015-11-12 04:46:42 +00:00
Obsoletes: %{name} < 229-5
# Bias the system towards libcurl-minimal if nothing pulls in full libcurl (#1997040)
Suggests: libcurl-minimal
2023-02-08 11:31:21 +00:00
License: LGPL-2.1-or-later
2015-11-12 04:46:42 +00:00
%description container
Systemd tools to spawn and manage containers and virtual machines.
This package contains systemd-nspawn, machinectl, systemd-machined, and
systemd-importd.
2015-11-12 04:46:42 +00:00
%package journal-remote
# Name is the same as in Debian
Summary: Tools to send journal events over the network
Requires: %{name}%{_isa} = %{version}-%{release}
2023-02-08 11:31:21 +00:00
License: LGPL-2.1-or-later
2015-01-06 02:08:08 +00:00
Requires: firewalld-filesystem
Provides: %{name}-journal-gateway = %{version}-%{release}
Provides: %{name}-journal-gateway%{_isa} = %{version}-%{release}
Obsoletes: %{name}-journal-gateway < 227-7
# Bias the system towards libcurl-minimal if nothing pulls in full libcurl (#1997040)
Suggests: libcurl-minimal
%description journal-remote
Programs to forward journal entries over the network, using encrypted HTTP, and
to write journal files from serialized journal contents.
This package contains systemd-journal-gatewayd, systemd-journal-remote, and
systemd-journal-upload.
%package networkd
Summary: System daemon that manages network configurations
Requires: %{name}%{_isa} = %{version}-%{release}
2023-02-08 11:31:21 +00:00
License: LGPL-2.1-or-later
# https://src.fedoraproject.org/rpms/systemd/pull-request/34
Obsoletes: systemd < 246.6-2
%description 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 resolved
Summary: Network Name Resolution manager
Requires: %{name}%{_isa} = %{version}-%{release}
Obsoletes: %{name} < 249~~
Requires: libidn2.so.0%{?elf_suffix}
Requires: libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
Requires(posttrans): grep
%description resolved
systemd-resolved is a system service that provides network name resolution to
local applications. It implements a caching and validating DNS/DNSSEC stub
resolver, as well as an LLMNR and MulticastDNS resolver and responder.
%package oomd-defaults
Summary: Configuration files for systemd-oomd
2021-05-18 16:06:15 +00:00
Requires: %{name} = %{version}-%{release}
2023-02-08 11:31:21 +00:00
License: LGPL-2.1-or-later
2021-05-18 16:06:15 +00:00
BuildArch: noarch
%description oomd-defaults
A set of drop-in files for systemd units to enable action from systemd-oomd,
a userspace out-of-memory (OOM) killer.
2017-03-02 16:30:49 +00:00
%package tests
Summary: Internal unit tests for systemd
Requires: %{name}%{_isa} = %{version}-%{release}
2023-02-08 11:31:21 +00:00
License: LGPL-2.1-or-later
2017-03-02 16:30:49 +00:00
%description tests
"Installed tests" that are usually run as part of the build system. They can be
useful to test systemd internals.
2017-03-02 16:30:49 +00:00
%package standalone-repart
Summary: Standalone systemd-repart binary for use on systems without systemd
Provides: %{name}-repart = %{version}-%{release}
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.
%package standalone-tmpfiles
Summary: Standalone systemd-tmpfiles binary for use on systems without systemd
Provides: %{name}-tmpfiles = %{version}-%{release}
RemovePathPostfixes: .standalone
%description standalone-tmpfiles
Standalone systemd-tmpfiles 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.
%package standalone-sysusers
Summary: Standalone systemd-sysusers binary for use on systems without systemd
Provides: %{name}-sysusers = %{version}-%{release}
RemovePathPostfixes: .standalone
%description standalone-sysusers
Standalone systemd-sysusers 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.
%package standalone-shutdown
Summary: Standalone systemd-shutdown binary for use on systems without systemd
Provides: %{name}-shutdown = %{version}-%{release}
RemovePathPostfixes: .standalone
%description standalone-shutdown
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.
2010-06-22 04:16:32 +00:00
%prep
%autosetup -n %{?commit:%{name}%{?stable:-stable}-%{commit}}%{!?commit:%{name}%{?stable:-stable}-%{version_no_tilde}} -p1
# We want to update sd-boot from packaging scriptlets after package update.
# Let's disable the service.
sed -r -i '/^enable systemd-boot-update.service/d' presets/90-systemd.preset
sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user
%generate_buildrequires
%if 0%{?have_gnu_efi}
if grep -q gnu-efi meson_options.txt; then
echo 'gnu-efi'
echo 'gnu-efi-devel'
else
echo 'python3dist(pyelftools)'
fi
%endif
2010-06-22 04:16:32 +00:00
%build
2022-02-24 07:01:43 +00:00
%global ntpvendor %(source /etc/os-release; echo ${ID})
%{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1}
CONFIGURE_OPTS=(
2020-10-20 15:33:29 +00:00
-Dmode=release
2017-07-02 00:16:12 +00:00
-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'
resolve: remove the fallback dns server list DNS questions (which necessarilly include IP addresses) are personally indentifying information in the sense of GDPR (https://gdpr.eu/eu-gdpr-personal-data/ explicitly lists IP address as PII). Sending those packets to Google or Cloudflare is "forwarding" this PII to them. GDPR says that information which is not enough to identify individuals still needs to be protected because it may be combined with other information or processed with improved technology later. So even though the information in DNS alone it not very big, it may be interpreted as protected information in various scenarios. When Fedora is installed by an end-user, they must have the reasonable expectation that Fedora will contant Fedora servers for updates and status checks and such. But the case of DNS packets is different, because the dns servers are not under our control. While most of the time the information leak through DNS is negligible, we can't rule out scenarios where it could be considered more important. Another thing to consider is that ISP and other local internet access mechanisms are probably worse overall for privacy compared to google and cloudflare dns servers. Nevertheless, they are more obvious to users and fit better in the regulatory framework, because there are local laws that govern them and implicitic or explicit agreements for their use. Whereas US-based servers are foreign and are covered by different rules. The fallback DNS servers don't matter most of the time because NetworkManager will include the servers from a DHCP lease. So hopefully users will not see any effect from the change done in this patch. Right now I think it is better to avoid the legal and privacy risk. If it turns out this change causes noticable problems, we might want to reconsider. In particular we could use the fallback servers only in containers and such which are not "personal" machines and there is no particular person attached to them. https://lists.fedoraproject.org/archives/list/devel@lists.fedoraproject.org/message/3C4KESHIMZDB6XCFO4EOBEDV4Q2AVVQ5/ I think we could provide a default dns server list more reasonably if there was some kind of privacy policy published by Fedora and users could at least learn about those defaults. Sadly, we don't have any relevant privacy policy (https://pagure.io/Fedora-Council/tickets/issue/53).
2020-10-06 11:19:04 +00:00
-Ddns-servers=
2019-11-22 13:57:07 +00:00
-Duser-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
-Dservice-watchdog=
2017-07-13 15:35:31 +00:00
-Ddev-kvm-mode=0666
2017-07-02 00:16:12 +00:00
-Dkmod=true
-Dxkbcommon=true
-Dblkid=true
2020-02-05 12:21:04 +00:00
-Dfdisk=true
2017-07-02 00:16:12 +00:00
-Dseccomp=true
-Dima=true
-Dselinux=true
2022-04-12 08:26:11 +00:00
-Dbpf-framework=%[0%{?have_bpf}?"true":"false"]
2017-07-02 00:16:12 +00:00
-Dapparmor=false
-Dpolkit=true
-Dxz=true
-Dzlib=true
-Dbzip2=true
-Dlz4=true
-Dzstd=true
2017-07-02 00:16:12 +00:00
-Dpam=true
-Dacl=true
-Dsmack=true
2020-02-05 12:21:04 +00:00
-Dopenssl=true
-Dcryptolib=openssl
2020-02-05 12:21:04 +00:00
-Dp11kit=true
-Dgcrypt=false
2017-07-02 00:16:12 +00:00
-Daudit=true
-Delfutils=true
2021-06-16 10:33:24 +00:00
-Dlibcryptsetup=%[%{with bootstrap}?"false":"true"]
2017-07-02 00:16:12 +00:00
-Delfutils=true
2020-02-05 12:21:04 +00:00
-Dpwquality=true
-Dqrencode=%[%{defined rhel}?"false":"true"]
2017-07-02 00:16:12 +00:00
-Dgnutls=true
-Dmicrohttpd=true
2017-12-12 05:28:37 +00:00
-Dlibidn2=true
2021-11-19 16:29:38 +00:00
-Dlibiptc=false
2017-07-02 00:16:12 +00:00
-Dlibcurl=true
-Dlibfido2=true
2017-07-02 00:16:12 +00:00
-Defi=true
-Dtpm=true
2021-05-06 13:30:27 +00:00
-Dtpm2=true
2017-07-02 00:16:12 +00:00
-Dhwdb=true
-Dsysusers=true
-Dstandalone-binaries=true
2017-07-02 00:16:12 +00:00
-Ddefault-kill-user-processes=false
-Dfirst-boot-full-preset=true
2017-07-02 00:16:12 +00:00
-Dtests=unsafe
-Dinstall-tests=true
2017-12-12 05:27:09 +00:00
-Dtty-gid=5
-Dusers-gid=100
-Dnobody-user=nobody
-Dnobody-group=nobody
2020-10-20 15:33:29 +00:00
-Dcompat-mutable-uid-boundaries=true
2018-03-05 21:31:56 +00:00
-Dsplit-usr=false
-Dsplit-bin=true
2021-06-16 10:33:24 +00:00
-Db_lto=%[%{with lto}?"true":"false"]
-Db_ndebug=false
2019-07-30 19:39:02 +00:00
-Dman=true
-Dversion-tag=%{version}-%{release}
2022-03-29 20:07:50 +00:00
# https://bugzilla.redhat.com/show_bug.cgi?id=1906010
-Dshared-lib-tag=%{version_no_tilde}-%{release}
-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
2023-02-02 19:46:37 +00:00
# https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer
-Ddefault-timeout-sec=45
-Ddefault-user-timeout-sec=45
2020-11-12 12:08:11 +00:00
-Doomd=true
-Dadm-gid=4
-Daudio-gid=63
-Dcdrom-gid=11
-Ddialout-gid=18
-Ddisk-gid=6
-Dinput-gid=104
-Dkmem-gid=9
-Dkvm-gid=36
-Dlp-gid=7
-Drender-gid=105
-Dsgx-gid=106
-Dtape-gid=33
-Dtty-gid=5
-Dusers-gid=100
-Dutmp-gid=22
-Dvideo-gid=39
-Dwheel-gid=10
-Dsystemd-journal-gid=190
-Dsystemd-network-uid=192
-Dsystemd-resolve-uid=193
# -Dsystemd-timesync-uid=, not set yet
)
if grep gnu-efi meson_options.txt; then
CONFIGURE_OPTS+=( -Dgnu-efi=%[%{?have_gnu_efi}?"true":"false"] )
else
# 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.
CONFIGURE_OPTS+=( -Dbootloader=%[%{?have_gnu_efi}?"true":"false"] )
fi
2021-01-13 12:52:14 +00:00
%if %{without lto}
%global _lto_cflags %nil
%endif
# Do configuration. If doing an inplace build, try to do
# reconfiguration to pick up new options.
%if %{with inplace}
command -v ccache 2>/dev/null && { CC="${CC:-ccache %__cc}"; CXX="${CXX:-ccache %__cxx}"; }
[ -e %{_vpath_builddir}/build.ninja ] &&
%__meson configure %{_vpath_builddir} "${CONFIGURE_OPTS[@]}" ||
%endif
{ %meson "${CONFIGURE_OPTS[@]}"; }
%meson_build
new_triggers=%{_vpath_builddir}/src/rpm/triggers.systemd.sh
if ! diff -u %{SOURCE1} ${new_triggers}; then
echo -e "\n\n\nWARNING: triggers.systemd in Source1 is different!"
echo -e " cp $PWD/${new_triggers} %{SOURCE1}\n\n\n"
sleep 5
fi
2010-06-22 04:16:32 +00:00
%install
2017-07-02 00:16:12 +00:00
%meson_install
2016-07-26 19:12:35 +00:00
# udev links
mkdir -p %{buildroot}/%{_sbindir}
ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
2010-07-24 00:51:34 +00:00
# Compatiblity and documentation files
touch %{buildroot}/etc/crypttab
chmod 600 %{buildroot}/etc/crypttab
2017-07-02 00:16:12 +00:00
# /etc/initab
2016-10-07 11:32:48 +00:00
install -Dm0644 -t %{buildroot}/etc/ %{SOURCE5}
2017-07-02 00:16:12 +00:00
# /etc/sysctl.conf compat
2015-01-19 21:11:51 +00:00
install -Dm0644 %{SOURCE6} %{buildroot}/etc/sysctl.conf
ln -s ../sysctl.conf %{buildroot}/etc/sysctl.d/99-sysctl.conf
2010-09-14 00:38:13 +00:00
# Make sure these directories are properly owned
mkdir -p %{buildroot}%{system_unit_dir}/basic.target.wants
mkdir -p %{buildroot}%{system_unit_dir}/default.target.wants
mkdir -p %{buildroot}%{system_unit_dir}/dbus.target.wants
mkdir -p %{buildroot}%{system_unit_dir}/syslog.target.wants
mkdir -p %{buildroot}/run
2015-01-19 21:11:51 +00:00
mkdir -p %{buildroot}%{_localstatedir}/log
touch %{buildroot}%{_localstatedir}/log/lastlog
chmod 0664 %{buildroot}%{_localstatedir}/log/lastlog
touch %{buildroot}/run/utmp
touch %{buildroot}%{_localstatedir}/log/{w,b}tmp
2012-02-11 01:46:33 +00:00
# Make sure the user generators dir exists too
mkdir -p %{buildroot}%{pkgdir}/system-generators
mkdir -p %{buildroot}%{pkgdir}/user-generators
2012-02-11 01:46:33 +00:00
2011-04-21 01:39:20 +00:00
# Create new-style configuration files so that we can ghost-own them
touch %{buildroot}%{_sysconfdir}/hostname
touch %{buildroot}%{_sysconfdir}/vconsole.conf
touch %{buildroot}%{_sysconfdir}/locale.conf
touch %{buildroot}%{_sysconfdir}/machine-id
touch %{buildroot}%{_sysconfdir}/machine-info
touch %{buildroot}%{_sysconfdir}/localtime
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
2011-04-21 01:39:20 +00:00
2012-07-03 19:12:08 +00:00
# Make sure the shutdown/sleep drop-in dirs exist
mkdir -p %{buildroot}%{pkgdir}/system-shutdown/
mkdir -p %{buildroot}%{pkgdir}/system-sleep/
2012-07-03 19:12:08 +00:00
2013-03-07 22:27:37 +00:00
# Make sure directories in /var exist
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog
2014-07-03 20:15:11 +00:00
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/rfkill
2016-04-10 15:21:43 +00:00
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/linger
mkdir -p %{buildroot}%{_localstatedir}/lib/private
mkdir -p %{buildroot}%{_localstatedir}/log/private
mkdir -p %{buildroot}%{_localstatedir}/cache/private
mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/timesync
ln -s ../private/systemd/journal-upload %{buildroot}%{_localstatedir}/lib/systemd/journal-upload
mkdir -p %{buildroot}%{_localstatedir}/log/journal
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
2014-02-20 00:12:13 +00:00
touch %{buildroot}%{_localstatedir}/lib/systemd/random-seed
touch %{buildroot}%{_localstatedir}/lib/systemd/timesync/clock
touch %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload/state
2013-03-07 22:27:37 +00:00
# Install yum protection fragment
install -Dm0644 %{SOURCE4} %{buildroot}/etc/dnf/protected.d/systemd.conf
2016-10-07 11:32:48 +00:00
install -Dm0644 -t %{buildroot}/usr/lib/firewalld/services/ %{SOURCE7} %{SOURCE8}
2015-01-06 02:08:08 +00:00
2015-06-27 18:00:14 +00:00
# Install additional docs
# https://bugzilla.redhat.com/show_bug.cgi?id=1234951
2016-10-07 11:32:48 +00:00
install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE9}
2015-06-27 18:00:14 +00:00
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974
install -Dm0644 -t %{buildroot}%{system_unit_dir}/systemd-udev-trigger.service.d/ %{SOURCE10}
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/ %{SOURCE13}
2018-02-21 14:23:30 +00:00
install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3}
# systemd-oomd default configuration
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14}
install -Dm0644 -t %{buildroot}%{system_unit_dir}/system.slice.d/ %{SOURCE15}
install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15}
# https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer
install -Dm0644 -t %{buildroot}%{system_unit_dir}/service.d/ %{SOURCE16}
install -Dm0644 10-timeout-abort.conf.user %{buildroot}%{user_unit_dir}/service.d/10-timeout-abort.conf
# https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
install -Dm0644 -t %{buildroot}%{_prefix}/lib/sysctl.d/ %{SOURCE17}
2018-12-21 19:08:58 +00:00
sed -i 's|#!/usr/bin/env python3|#!%{__python3}|' %{buildroot}/usr/lib/systemd/tests/run-unit-tests.py
2020-02-07 15:34:30 +00:00
install -m 0644 -D -t %{buildroot}%{_rpmconfigdir}/macros.d/ %{SOURCE21}
install -m 0644 -D -t %{buildroot}%{_rpmconfigdir}/fileattrs/ %{SOURCE22}
install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE23}
install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE24}
# https://bugzilla.redhat.com/show_bug.cgi?id=2107754
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/network/ %{SOURCE25}
2014-02-20 00:47:27 +00:00
%find_lang %{name}
# Split files in build root into rpms. See split-files.py for the
# rules towards the end, anything which is an exception needs a line
# here.
python3 %{SOURCE2} %buildroot <<EOF
%ghost %config(noreplace) /etc/crypttab
%ghost %attr(0444,root,root) /etc/udev/hwdb.bin
/etc/inittab
2018-02-21 14:23:30 +00:00
/usr/lib/systemd/purge-nobody-user
%ghost %config(noreplace) /etc/vconsole.conf
%ghost %config(noreplace) /etc/X11/xorg.conf.d/00-keyboard.conf
Specify owner of utmp/wtmp/btmp/lastlog as root in the rpm listing The analysis in 1ba983e0be490dbff1085e8f0c6fe2af1d4290e2 was wrong. Both systemd-journal and utmp need to be created. For some reason rpm reports only the first group which is not available. It was complaining about systemd-journal, and when that was "fixed", it started complaining about utmp. Let's apply the same logic here. Non-root users of files owned by utmp group should only matter after a reboot, and tmpfiles will adjust the ownership. Running transaction Running scriptlet: filesystem-3.16-2.fc36.x86_64 1/1 Preparing : 1/1 Installing : libgcc-12.0.1-0.8.fc37.x86_64 1/76 Running scriptlet: libgcc-12.0.1-0.8.fc37.x86_64 1/76 Installing : fedora-release-identity-basic-37-0.2.noarch 2/76 Installing : tzdata-2021e-4.fc36.noarch 3/76 Installing : pcre2-syntax-10.39-1.fc36.1.noarch 4/76 Installing : ncurses-base-6.2-9.20210508.fc36.noarch 5/76 Installing : fedora-gpg-keys-37-0.1.noarch 6/76 Installing : fedora-release-37-0.2.noarch 7/76 Installing : fedora-release-common-37-0.2.noarch 8/76 Installing : fedora-repos-rawhide-37-0.1.noarch 9/76 Installing : fedora-repos-37-0.1.noarch 10/76 Installing : setup-2.13.9.1-3.fc36.noarch 11/76 Running scriptlet: setup-2.13.9.1-3.fc36.noarch 11/76 Installing : filesystem-3.16-2.fc36.x86_64 12/76 Installing : basesystem-11-13.fc36.noarch 13/76 Installing : glibc-minimal-langpack-2.35-2.fc37.x86_64 14/76 Installing : glibc-common-2.35-2.fc37.x86_64 15/76 Running scriptlet: glibc-2.35-2.fc37.x86_64 16/76 Installing : glibc-2.35-2.fc37.x86_64 16/76 Running scriptlet: glibc-2.35-2.fc37.x86_64 16/76 Installing : ncurses-libs-6.2-9.20210508.fc36.x86_64 17/76 Installing : bash-5.1.16-2.fc36.x86_64 18/76 Running scriptlet: bash-5.1.16-2.fc36.x86_64 18/76 Installing : libuuid-2.38-0.2.fc36.x86_64 19/76 Installing : libcap-2.48-4.fc36.x86_64 20/76 Installing : libattr-2.5.1-4.fc36.x86_64 21/76 Installing : libacl-2.3.1-3.fc36.x86_64 22/76 Installing : libzstd-1.5.2-1.fc36.x86_64 23/76 Installing : xz-libs-5.2.5-8.fc36.x86_64 24/76 Installing : zlib-1.2.11-31.fc36.x86_64 25/76 Installing : bzip2-libs-1.0.8-11.fc36.x86_64 26/76 Installing : libcap-ng-0.8.2-9.fc36.x86_64 27/76 Installing : audit-libs-3.0.7-1.fc36.x86_64 28/76 Installing : libsepol-3.3-3.fc36.x86_64 29/76 Installing : libxcrypt-4.4.28-1.fc37.x86_64 30/76 Installing : lz4-libs-1.9.3-4.fc36.x86_64 31/76 Installing : pcre2-10.39-1.fc36.1.x86_64 32/76 Installing : libselinux-3.3-4.fc36.x86_64 33/76 Installing : libsemanage-3.3-3.fc37.x86_64 34/76 Installing : shadow-utils-2:4.11.1-2.fc37.x86_64 35/76 Installing : sed-4.8-10.fc36.x86_64 36/76 Installing : dbus-common-1:1.13.20-3.fc36.noarch 37/76 Running scriptlet: dbus-common-1:1.13.20-3.fc36.noarch 37/76 Installing : alternatives-1.19-2.fc36.x86_64 38/76 Installing : expat-2.4.6-1.fc37.x86_64 39/76 Installing : gmp-1:6.2.1-2.fc36.x86_64 40/76 Installing : json-c-0.15-3.fc36.x86_64 41/76 Installing : libargon2-20171227-8.fc36.x86_64 42/76 Installing : libeconf-0.4.0-3.fc36.x86_64 43/76 Installing : pam-libs-1.5.2-11.fc37.x86_64 44/76 Installing : libffi-3.4.2-8.fc36.x86_64 45/76 Installing : p11-kit-0.24.1-2.fc36.x86_64 46/76 Installing : libgpg-error-1.44-1.fc36.x86_64 47/76 Installing : libgcrypt-1.10.0-1.fc36.x86_64 48/76 Installing : systemd-libs-250.3-4.fc37.x86_64 49/76 Running scriptlet: dbus-broker-29-5.fc36.x86_64 50/76 useradd warning: dbus's uid 81 outside of the SYS_UID_MIN 201 and SYS_UID_MAX 999 range. Installing : dbus-broker-29-5.fc36.x86_64 50/76 Running scriptlet: dbus-broker-29-5.fc36.x86_64 50/76 Installing : dbus-1:1.13.20-3.fc36.x86_64 51/76 Installing : libseccomp-2.5.3-2.fc36.x86_64 52/76 Installing : libsmartcols-2.38-0.2.fc36.x86_64 53/76 Installing : libtasn1-4.18.0-2.fc36.x86_64 54/76 Installing : p11-kit-trust-0.24.1-2.fc36.x86_64 55/76 Running scriptlet: p11-kit-trust-0.24.1-2.fc36.x86_64 55/76 Installing : libunistring-1.0-1.fc36.x86_64 56/76 Installing : libidn2-2.3.2-4.fc36.x86_64 57/76 Installing : pcre-8.45-1.fc36.1.x86_64 58/76 Installing : grep-3.7-2.fc36.x86_64 59/76 Installing : crypto-policies-20220203-2.git112f859.fc36.noarch 60/76 Running scriptlet: crypto-policies-20220203-2.git112f859.fc36.noarch 60/76 Installing : coreutils-common-9.0-3.fc36.x86_64 61/76 Installing : openssl-libs-1:3.0.0-1.fc36.x86_64 62/76 Installing : coreutils-9.0-3.fc36.x86_64 63/76 Running scriptlet: ca-certificates-2021.2.52-3.fc36.noarch 64/76 Installing : ca-certificates-2021.2.52-3.fc36.noarch 64/76 Running scriptlet: ca-certificates-2021.2.52-3.fc36.noarch 64/76 Installing : libblkid-2.38-0.2.fc36.x86_64 65/76 Running scriptlet: libblkid-2.38-0.2.fc36.x86_64 65/76 Installing : libmount-2.38-0.2.fc36.x86_64 66/76 Installing : util-linux-core-2.38-0.2.fc36.x86_64 67/76 Running scriptlet: util-linux-core-2.38-0.2.fc36.x86_64 67/76 Installing : libfdisk-2.38-0.2.fc36.x86_64 68/76 Installing : kmod-libs-29-7.fc36.x86_64 69/76 Installing : cryptsetup-libs-2.4.3-2.fc36.x86_64 70/76 Installing : device-mapper-libs-1.02.175-7.fc36.x86_64 71/76 Installing : device-mapper-1.02.175-7.fc36.x86_64 72/76 Installing : systemd-pam-250.3-4.fc37.x86_64 73/76 Installing : systemd-resolved-250.3-4.fc37.x86_64 74/76 Running scriptlet: systemd-resolved-250.3-4.fc37.x86_64 74/76 Installing : systemd-networkd-250.3-4.fc37.x86_64 75/76 Running scriptlet: systemd-networkd-250.3-4.fc37.x86_64 75/76 Installing : systemd-250.3-4.fc37.x86_64 76/76 warning: group utmp does not exist - using root warning: group utmp does not exist - using root warning: group utmp does not exist - using root warning: group utmp does not exist - using root Running scriptlet: systemd-250.3-4.fc37.x86_64 76/76 Creating group 'utmp' with GID 22. Creating group 'input' with GID 104. Creating group 'kvm' with GID 36. Creating group 'render' with GID 105. Creating group 'sgx' with GID 106. Creating group 'systemd-journal' with GID 190. Creating group 'systemd-network' with GID 192. Creating user 'systemd-network' (systemd Network Management) with UID 192 and GID 192. Creating group 'systemd-oom' with GID 999. Creating user 'systemd-oom' (systemd Userspace OOM Killer) with UID 999 and GID 999. Creating group 'systemd-resolve' with GID 193. Creating user 'systemd-resolve' (systemd Resolver) with UID 193 and GID 193. Running scriptlet: filesystem-3.16-2.fc36.x86_64 76/76 Running scriptlet: ca-certificates-2021.2.52-3.fc36.noarch 76/76 Running scriptlet: systemd-resolved-250.3-4.fc37.x86_64 76/76 '/etc/resolv.conf' -> '../run/systemd/resolve/stub-resolv.conf' Running scriptlet: systemd-250.3-4.fc37.x86_64 76/76
2022-02-23 22:53:12 +00:00
%ghost %attr(0664,root,root) %verify(not group) /run/utmp
%ghost %attr(0664,root,root) %verify(not group) /var/log/wtmp
%ghost %attr(0660,root,root) %verify(not group) /var/log/btmp
%ghost %attr(0664,root,root) %verify(not md5 size mtime group) /var/log/lastlog
%ghost %config(noreplace) /etc/hostname
%ghost %config(noreplace) /etc/localtime
%ghost %config(noreplace) /etc/locale.conf
%ghost %attr(0444,root,root) %config(noreplace) /etc/machine-id
%ghost %config(noreplace) /etc/machine-info
%ghost %attr(0700,root,root) %dir /var/cache/private
%ghost %attr(0700,root,root) %dir /var/lib/private
%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 /var/lib/systemd/backlight
%ghost /var/lib/systemd/catalog/database
%ghost %dir /var/lib/systemd/coredump
%ghost /var/lib/systemd/journal-upload
%ghost %dir /var/lib/systemd/linger
%ghost %attr(0600,root,root) /var/lib/systemd/random-seed
%ghost %dir /var/lib/systemd/rfkill
%ghost %dir %verify(not mode group) /var/log/journal
%ghost %dir /var/log/journal/remote
%ghost %attr(0700,root,root) %dir /var/log/private
EOF
2015-02-16 18:24:46 +00:00
%check
%if %{with tests}
2020-07-09 07:54:04 +00:00
meson test -C %{_vpath_builddir} -t 6 --print-errorlogs
%endif
2015-05-30 22:18:12 +00:00
#############################################################################################
%include %{SOURCE1}
%post
systemd-machine-id-setup &>/dev/null || :
# FIXME: move to %postun. We want to restart systemd *after* removing
# files from the old rpm. Right now we may still have bits the old
# setup if the files are not present in the new version. But before
# implement restarting of *other* services after the transaction, moving
# this would make things worse, increasing the number of warnings we get
# about needed daemon-reload.
oomd_state=$(systemctl is-active systemd-oomd 2>/dev/null || :)
# Work-around for #1931034. Remove after F34 is released.
if [ "$oomd_state" == "active" ]; then
systemctl stop -q systemd-oomd 2>/dev/null || :
fi
systemctl daemon-reexec &>/dev/null || {
# systemd v239 had bug #9553 in D-Bus authentication of the private socket,
# which was later fixed in v240 by #9625.
#
# The end result is that a `systemctl daemon-reexec` call as root will fail
# when upgrading from systemd v239, which means the system will not start
# running the new version of systemd after this post install script runs.
#
# To work around this issue, let's fall back to using a `kill -TERM 1` to
# re-execute the daemon when the `systemctl daemon-reexec` call fails.
#
# In order to prevent issues when the reason why the daemon-reexec failed is
# not the aforementioned bug, let's only use this fallback when:
# - we're upgrading this RPM package; and
# - we confirm that systemd is running as PID1 on this system.
if [ $1 -gt 1 ] && [ -d /run/systemd/system ] ; then
kill -TERM 1 &>/dev/null || :
fi
}
if [ "$oomd_state" == "active" ]; then
systemctl start -q systemd-oomd 2>/dev/null || :
fi
[ $1 -eq 1 ] || exit 0
2013-10-02 02:10:00 +00:00
# create /var/log/journal only on initial installation,
# and only if it's writable (it won't be in rpm-ostree).
[ -w %{_localstatedir} ] && mkdir -p %{_localstatedir}/log/journal
2014-03-25 19:59:29 +00:00
[ -w %{_localstatedir} ] && journalctl --update-catalog || :
systemd-sysusers || :
systemd-tmpfiles --create &>/dev/null || :
# We reset the enablement of all services upon initial installation
# https://bugzilla.redhat.com/show_bug.cgi?id=1118740#c23
# This will fix up enablement of any preset services that got installed
# before systemd due to rpm ordering problems:
# https://bugzilla.redhat.com/show_bug.cgi?id=1647172.
# We also do this for user units, see
# https://fedoraproject.org/wiki/Changes/Systemd_presets_for_user_units.
systemctl preset-all &>/dev/null || :
systemctl --global preset-all &>/dev/null || :
2013-01-08 02:00:08 +00:00
%postun
if [ $1 -eq 1 ]; then
[ -w %{_localstatedir} ] && journalctl --update-catalog || :
systemd-tmpfiles --create &>/dev/null || :
fi
%systemd_postun_with_restart systemd-timedated.service systemd-portabled.service systemd-homed.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.service systemd-oomd.service
# FIXME: systemd-logind.service is excluded (https://github.com/systemd/systemd/pull/17558)
# FIXME: user@*.service needs to be restarted, but using systemctl --user daemon-reexec
%triggerun resolved -- systemd < 246.1-1
# This is for upgrades from previous versions before systemd-resolved became the default.
systemctl --no-reload preset systemd-resolved.service &>/dev/null || :
if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then
systemctl -q is-enabled NetworkManager.service 2>/dev/null && \
! test -L /etc/resolv.conf 2>/dev/null && \
! mountpoint /etc/resolv.conf &>/dev/null && \
2020-08-07 15:27:02 +00:00
grep -q 'Generated by NetworkManager' /etc/resolv.conf 2>/dev/null && \
echo -e '/etc/resolv.conf was generated by NetworkManager.\nRemoving it to let systemd-resolved manage this file.' && \
2020-08-17 17:15:12 +00:00
mv -v /etc/resolv.conf /etc/resolv.conf.orig-with-nm && \
ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf 2>/dev/null || :
2020-08-07 15:27:02 +00:00
systemctl start systemd-resolved.service &>/dev/null || :
fi
%triggerun -- systemd < 247.3-2
2021-02-16 17:59:45 +00:00
# This is for upgrades from previous versions before oomd-defaults is available.
systemctl --no-reload preset systemd-oomd.service &>/dev/null || :
%triggerpostun -- systemd < 253~rc1-2
# This is for upgrades from previous versions where systemd-journald-audit.socket
# had a static enablement symlink.
2021-02-16 17:59:45 +00:00
# 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 || :
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service}
2015-11-12 06:12:17 +00:00
%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
udevadm hwdb --update &>/dev/null
%systemd_post %udev_services
# Try to save the random seed, but don't complain if /dev/urandom is unavailable
/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 &&
2018-02-09 13:50:35 +00:00
sed -i.rpm.bak -r 's/^KEYMAP="?fi-latin[19]"?/KEYMAP="fi"/' /etc/vconsole.conf || :
2015-11-12 06:12:17 +00:00
%preun udev
%systemd_preun %udev_services
2015-11-12 06:12:17 +00:00
%postun udev
# Restart some services.
# Others are either oneshot services, or sockets, and restarting them causes issues (#1378974)
%systemd_postun_with_restart systemd-udevd.service systemd-timesyncd.service
2015-11-12 06:12:17 +00:00
%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
%post journal-remote
%systemd_post %journal_remote_units_restart %journal_remote_units_norestart
2015-01-06 02:08:08 +00:00
%firewalld_reload
%preun journal-remote
%systemd_preun %journal_remote_units_restart %journal_remote_units_norestart
if [ $1 -eq 1 ] ; then
if [ -f %{_localstatedir}/lib/systemd/journal-upload/state -a ! -L %{_localstatedir}/lib/systemd/journal-upload ] ; then
mkdir -p %{_localstatedir}/lib/private/systemd/journal-upload
mv %{_localstatedir}/lib/systemd/journal-upload/state %{_localstatedir}/lib/private/systemd/journal-upload/.
rmdir %{_localstatedir}/lib/systemd/journal-upload || :
fi
fi
%postun journal-remote
%systemd_postun_with_restart %journal_remote_units_restart
2015-01-06 02:08:08 +00:00
%firewalld_reload
%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 systemd-networkd.service systemd-networkd-wait-online.service
fi
%preun networkd
%systemd_preun systemd-networkd.service systemd-networkd-wait-online.service
%preun resolved
if [ $1 -eq 0 ] ; then
systemctl disable --quiet \
systemd-resolved.service \
>/dev/null || :
if [ -L /etc/resolv.conf ] && \
realpath /etc/resolv.conf | grep ^/run/systemd/resolve/; then
rm -f /etc/resolv.conf # no longer useful
# if network manager is enabled, move to it instead
[ -f /run/NetworkManager/resolv.conf ] && \
systemctl -q is-enabled NetworkManager.service &>/dev/null && \
ln -fsv ../run/NetworkManager/resolv.conf /etc/resolv.conf
fi
fi
%post resolved
[ $1 -eq 1 ] || exit 0
# Initial installation
touch %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation
# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263
if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then
echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd."
exit 0
fi
%systemd_post systemd-resolved.service
%posttrans resolved
[ -e %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation ] || exit 0
rm %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation
# Initial installation
# Create /etc/resolv.conf symlink.
# (https://bugzilla.redhat.com/show_bug.cgi?id=1873856)
#
# We would also create it using tmpfiles, but let's do this here too
# before NetworkManager gets a chance. (systemd-tmpfiles invocation
# above does not do this, because the line is marked with ! and
# tmpfiles is invoked without --boot in the scriptlet.)
#
# *Create* the symlink if nothing is present yet.
# (https://bugzilla.redhat.com/show_bug.cgi?id=2032085)
#
# *Override* the symlink if systemd is running. Don't do it if systemd
# is not running, because that will immediately break DNS resolution,
# since systemd-resolved is also not running
# (https://bugzilla.redhat.com/show_bug.cgi?id=1891847).
#
# Also don't create the symlink to the stub when the stub is disabled (#1891847 again).
if systemctl -q is-enabled systemd-resolved.service &>/dev/null &&
! systemd-analyze cat-config systemd/resolved.conf 2>/dev/null |
grep -iqE '^DNSStubListener\s*=\s*(no?|false|0|off)\s*$'; then
if ! test -e /etc/resolv.conf && ! test -L /etc/resolv.conf; then
ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || :
elif test -d /run/systemd/system/ &&
! mountpoint /etc/resolv.conf &>/dev/null; then
ln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || :
fi
fi
%global _docdir_fmt %{name}
%files -f %{name}.lang -f .file-list-main
2015-01-19 21:11:51 +00:00
%doc %{_pkgdocdir}
%exclude %{_pkgdocdir}/LICENSE*
# Only the licenses texts for the licenses in License line are included.
%license LICENSE.GPL2 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
%ghost %dir %attr(0755,-,-) /etc/systemd/system/default.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/getty.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/graphical.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/local-fs.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/machines.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/multi-user.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/network-online.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/printer.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/remote-fs.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/sockets.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/sysinit.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/system-update.target.wants
%ghost %dir %attr(0755,-,-) /etc/systemd/system/timers.target.wants
2021-11-24 09:00:32 +00:00
%ghost %dir %attr(0700,-,-) /var/lib/portables
%ghost %dir %attr(0755,-,-) /var/lib/rpm-state/systemd
%files libs -f .file-list-libs
%license LICENSE.LGPL2.1
2014-07-24 20:41:23 +00:00
%files pam -f .file-list-pam
%files rpm-macros -f .file-list-rpm-macros
%files resolved -f .file-list-resolve
%files devel -f .file-list-devel
%files udev -f .file-list-udev
2015-11-12 06:12:17 +00:00
%if 0%{?have_gnu_efi}
%files ukify -f .file-list-ukify
%files boot-unsigned -f .file-list-boot
%endif
%files container -f .file-list-container
2021-11-24 09:00:32 +00:00
%ghost %dir %attr(0700,-,-) /var/lib/machines
%files journal-remote -f .file-list-remote
%files networkd -f .file-list-networkd
%files oomd-defaults -f .file-list-oomd-defaults
%files tests -f .file-list-tests
2017-03-02 16:30:49 +00:00
%files standalone-repart -f .file-list-standalone-repart
%files standalone-tmpfiles -f .file-list-standalone-tmpfiles
%files standalone-sysusers -f .file-list-standalone-sysusers
%files standalone-shutdown -f .file-list-standalone-shutdown
2010-06-11 06:18:33 +00:00
%changelog
2022-08-08 11:09:36 +00:00
%autochangelog