Zbigniew Jędrzejewski-Szmek 550422
#global commit c4b843473a75fb38ed5bf54e9d3cfb1cb3719efa
Zbigniew Jędrzejewski-Szmek 6a3bb3
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
Lennart Poettering 5db028
Zbigniew Jędrzejewski-Szmek c6d202
%global stable 1
Zbigniew Jędrzejewski-Szmek eb80e6
Lennart Poettering 391f9f
# We ship a .pc file but don't want to have a dep on pkg-config. We
Lennart Poettering 391f9f
# strip the automatically generated dep here and instead co-own the
Lennart Poettering 391f9f
# directory.
Lennart Poettering 391f9f
%global __requires_exclude pkg-config
Lennart Poettering 391f9f
Zbigniew Jędrzejewski-Szmek c9f04d
%global pkgdir %{_prefix}/lib/systemd
Zbigniew Jędrzejewski-Szmek c9f04d
%global system_unit_dir %{pkgdir}/system
Zbigniew Jędrzejewski-Szmek bb4127
%global user_unit_dir %{pkgdir}/user
Zbigniew Jędrzejewski-Szmek c9f04d
David Tardon b5ae70
%if 0%{?__isa_bits} == 64
David Tardon b5ae70
%global elf_bits (64bit)
David Tardon b5ae70
%global elf_suffix ()%{elf_bits}
David Tardon b5ae70
%endif
David Tardon b5ae70
Zbigniew Jędrzejewski-Szmek d1787c
# Bootstrap may be needed to break circular dependencies with cryptsetup,
Zbigniew Jędrzejewski-Szmek d1787c
# e.g. when re-building cryptsetup on a json-c SONAME-bump.
Björn Esser 265d91
%bcond_with    bootstrap
Zbigniew Jędrzejewski-Szmek 933c03
%bcond_without tests
Zbigniew Jędrzejewski-Szmek f10da8
%bcond_without lto
Zbigniew Jędrzejewski-Szmek 933c03
Zbigniew Jędrzejewski-Szmek 05f788
# Support for quick builds with rpmbuild --build-in-place.
Zbigniew Jędrzejewski-Szmek 05f788
# See README.build-in-place.
Zbigniew Jędrzejewski-Szmek 05f788
%bcond_with    inplace
Zbigniew Jędrzejewski-Szmek 05f788
Lennart Poettering cc49ef
Name:           systemd
Zbigniew Jędrzejewski-Szmek 6a3bb3
Url:            https://www.freedesktop.org/wiki/Software/systemd
Zbigniew Jędrzejewski-Szmek 05f788
%if %{without inplace}
Zbigniew Jędrzejewski-Szmek c6d202
Version:        252.1
Zbigniew Jędrzejewski-Szmek 05f788
%else
Zbigniew Jędrzejewski-Szmek 05f788
# determine the build information from local checkout
Zbigniew Jędrzejewski-Szmek 05f788
Version:        %(tools/meson-vcs-tag.sh . error | sed -r 's/-([0-9])/.^\1/; s/-g/_g/')
Zbigniew Jędrzejewski-Szmek 05f788
%endif
Zbigniew Jędrzejewski-Szmek 9acedf
Release:        %autorelease
Zbigniew Jędrzejewski-Szmek 05f788
Michal Schmidt 720afe
# For a breakdown of the licensing, see README
Michal Schmidt 720afe
License:        LGPLv2+ and MIT and GPLv2+
Zbigniew Jędrzejewski-Szmek 1478fa
Summary:        System and Service Manager
Michal Schmidt 77289e
Kay Sievers 5bd459
# download tarballs with "spectool -g systemd.spec"
Zbigniew Jędrzejewski-Szmek 6a3bb3
%if %{defined commit}
Zbigniew Jędrzejewski-Szmek 6a3bb3
Source0:        https://github.com/systemd/systemd%{?stable:-stable}/archive/%{commit}/%{name}-%{shortcommit}.tar.gz
Michal Schmidt 77289e
%else
Zbigniew Jędrzejewski-Szmek a74696
%if 0%{?stable}
Zbigniew Jędrzejewski-Szmek 3ba808
Source0:        https://github.com/systemd/systemd-stable/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
Zbigniew Jędrzejewski-Szmek da9dae
%else
Zbigniew Jędrzejewski-Szmek 3ba808
Source0:        https://github.com/systemd/systemd/archive/v%{version_no_tilde}/%{name}-%{version_no_tilde}.tar.gz
Michal Schmidt 77289e
%endif
Zbigniew Jędrzejewski-Szmek da9dae
%endif
Zbigniew Jędrzejewski-Szmek edb4e0
# This file must be available before %%prep.
Zbigniew Jędrzejewski-Szmek 6714fc
# It is generated during systemd build and can be found in build/src/core/.
Zbigniew Jędrzejewski-Szmek 8b4408
Source1:        triggers.systemd
Zbigniew Jędrzejewski-Szmek 17a6f3
Source2:        split-files.py
Zbigniew Jędrzejewski-Szmek 388cd9
Source3:        purge-nobody-user
Zbigniew Jędrzejewski-Szmek 0a8e7e
Michal Schmidt 77289e
# Prevent accidental removal of the systemd package
Zbigniew Jędrzejewski-Szmek 6d5bee
Source4:        yum-protect-systemd.conf
Kay Sievers 4463a3
Zbigniew Jędrzejewski-Szmek 6d5bee
Source5:        inittab
Zbigniew Jędrzejewski-Szmek 801ccd
Source6:        sysctl.conf.README
Zbigniew Jędrzejewski-Szmek b53cf7
Source7:        systemd-journal-remote.xml
Zbigniew Jędrzejewski-Szmek b53cf7
Source8:        systemd-journal-gatewayd.xml
Zbigniew Jędrzejewski-Szmek 90aeee
Source9:        20-yama-ptrace.conf
Zbigniew Jędrzejewski-Szmek 65fed7
Source10:       systemd-udev-trigger-no-reload.conf
Filipe Brandenburger 05bb38
Source12:       systemd-user
Zbigniew Jędrzejewski-Szmek 8a34ce
Source13:       libsystemd-shared.abignore
Michal Schmidt 77289e
834f04
Source14:       10-oomd-defaults.conf
7665e1
Source15:       10-oomd-per-slice-defaults.conf
834f04
Zbigniew Jędrzejewski-Szmek ced923
Source21:       macros.sysusers
Zbigniew Jędrzejewski-Szmek ced923
Source22:       sysusers.attr
Zbigniew Jędrzejewski-Szmek ced923
Source23:       sysusers.prov
Zbigniew Jędrzejewski-Szmek ced923
Source24:       sysusers.generate-pre.sh
Zbigniew Jędrzejewski-Szmek ced923
Zbigniew Jędrzejewski-Szmek 1d06cb
%if 0
Zbigniew Jędrzejewski-Szmek 35bb94
GIT_DIR=../../src/systemd/.git git format-patch-ab --no-signature -M -N v235..v235-stable
Zbigniew Jędrzejewski-Szmek 1d06cb
i=1; for j in 00*patch; do printf "Patch%04d:      %s\n" $i $j; i=$((i+1));done|xclip
Zbigniew Jędrzejewski-Szmek 3ce337
GIT_DIR=../../src/systemd/.git git diffab -M v233..master@{2017-06-15} -- hwdb/[67]* hwdb/parse_hwdb.py >hwdb.patch
Zbigniew Jędrzejewski-Szmek 1d06cb
%endif
Zbigniew Jędrzejewski-Szmek bb4127
Zbigniew Jędrzejewski-Szmek 4b2af1
# Backports of patches from upstream (0000–0499)
Zbigniew Jędrzejewski-Szmek 6384ab
#
Zbigniew Jędrzejewski-Szmek 95c9cf
# Any patches which are "in preparation" upstream should be listed here, rather
Zbigniew Jędrzejewski-Szmek 95c9cf
# than in the next section. Packit CI will drop any patches in this range before
Zbigniew Jędrzejewski-Szmek 95c9cf
# applying upstream pull requests.
Zbigniew Jędrzejewski-Szmek 5cd596
Yu Watanabe 38161d
Zbigniew Jędrzejewski-Szmek 98759c
# Those are downstream-only patches, but we don't want them in packit builds:
Zbigniew Jędrzejewski-Szmek 88c930
# https://bugzilla.redhat.com/show_bug.cgi?id=1738828
Zbigniew Jędrzejewski-Szmek 98759c
Patch0490:      use-bfq-scheduler.patch
Zbigniew Jędrzejewski-Szmek bca98c
Zbigniew Jędrzejewski-Szmek a88eae
%ifarch %{ix86} x86_64 aarch64
Zbigniew Jędrzejewski-Szmek a88eae
%global have_gnu_efi 1
Zbigniew Jędrzejewski-Szmek a88eae
%endif
Zbigniew Jędrzejewski-Szmek a88eae
Zbigniew Jędrzejewski-Szmek f314ba
BuildRequires:  gcc
Zbigniew Jędrzejewski-Szmek f314ba
BuildRequires:  gcc-c++
Zbigniew Jędrzejewski-Szmek 7993a9
BuildRequires:  clang
Zbigniew Jędrzejewski-Szmek abd738
BuildRequires:  coreutils
Lennart Poettering cc49ef
BuildRequires:  libcap-devel
Lennart Poettering 9254d8
BuildRequires:  libmount-devel
Zbigniew Jędrzejewski-Szmek 513853
BuildRequires:  libfdisk-devel
Zbigniew Jędrzejewski-Szmek 513853
BuildRequires:  libpwquality-devel
Lennart Poettering cc49ef
BuildRequires:  pam-devel
Lennart Poettering 7f4dce
BuildRequires:  libselinux-devel
Lennart Poettering 1c5eea
BuildRequires:  audit-libs-devel
Björn Esser 63698f
%if %{without bootstrap}
Michal Schmidt 90beab
BuildRequires:  cryptsetup-devel
Björn Esser 63698f
%endif
Michal Schmidt 7de90b
BuildRequires:  dbus-devel
Zbigniew Jędrzejewski-Szmek a6bdda
BuildRequires:  /usr/sbin/sfdisk
Björn Esser b5c68a
# /usr/bin/getfacl is needed by test-acl-util
Zbigniew Jędrzejewski-Szmek a6bdda
BuildRequires:  /usr/bin/getfacl
Lennart Poettering 5c28c3
BuildRequires:  libacl-devel
Kay Sievers 9ac884
BuildRequires:  gobject-introspection-devel
Kay Sievers 9ac884
BuildRequires:  libblkid-devel
Lennart Poettering 29f5e6
BuildRequires:  xz-devel
Zbigniew Jędrzejewski-Szmek ee5379
BuildRequires:  xz
Zbigniew Jędrzejewski-Szmek 56be25
BuildRequires:  lz4-devel
Zbigniew Jędrzejewski-Szmek ee5379
BuildRequires:  lz4
Zbigniew Jędrzejewski-Szmek 56be25
BuildRequires:  bzip2-devel
Zbigniew Jędrzejewski-Szmek c43292
BuildRequires:  libzstd-devel
Yu Watanabe dc44a1
BuildRequires:  libidn2-devel
Lennart Poettering 92a80a
BuildRequires:  libcurl-devel
Kay Sievers 9ac884
BuildRequires:  kmod-devel
Zbigniew Jędrzejewski-Szmek cfcb35
BuildRequires:  elfutils-devel
Zbigniew Jędrzejewski-Szmek 513853
BuildRequires:  openssl-devel
Zbigniew Jędrzejewski-Szmek cfcb35
BuildRequires:  gnutls-devel
Lennart Poettering 38a7fb
BuildRequires:  qrencode-devel
Lennart Poettering 09c908
BuildRequires:  libmicrohttpd-devel
Zbigniew Jędrzejewski-Szmek 572497
BuildRequires:  libxkbcommon-devel
Lennart Poettering 258b2a
BuildRequires:  iptables-devel
Zbigniew Jędrzejewski-Szmek ce6da6
BuildRequires:  pkgconfig(libfido2)
Zbigniew Jędrzejewski-Szmek 141af4
BuildRequires:  pkgconfig(tss2-esys)
Zbigniew Jędrzejewski-Szmek 141af4
BuildRequires:  pkgconfig(tss2-rc)
Zbigniew Jędrzejewski-Szmek 141af4
BuildRequires:  pkgconfig(tss2-mu)
Zbigniew Jędrzejewski-Szmek ce4156
BuildRequires:  pkgconfig(libbpf)
Zbigniew Jędrzejewski-Szmek 33320d
BuildRequires:  systemtap-sdt-devel
Lennart Poettering 38a7fb
BuildRequires:  libxslt
Lennart Poettering 38a7fb
BuildRequires:  docbook-style-xsl
Lennart Poettering 38a7fb
BuildRequires:  pkgconfig
Lennart Poettering 38a7fb
BuildRequires:  gperf
Kay Sievers b2cc25
BuildRequires:  gawk
Zbigniew Jędrzejewski-Szmek 25282c
BuildRequires:  tree
Zbigniew Jędrzejewski-Szmek b61052
BuildRequires:  hostname
Zbigniew Jędrzejewski-Szmek ec9ca0
BuildRequires:  python3dist(lxml)
Zbigniew Jędrzejewski-Szmek ec9ca0
BuildRequires:  python3dist(jinja2)
Zbigniew Jędrzejewski-Szmek b53cf7
BuildRequires:  firewalld-filesystem
Zbigniew Jędrzejewski-Szmek a88eae
%if 0%{?have_gnu_efi}
Kay Sievers ee6fc8
BuildRequires:  gnu-efi gnu-efi-devel
Kay Sievers ee6fc8
%endif
Lennart Poettering b73335
BuildRequires:  libseccomp-devel
Yu Watanabe a8ba7b
BuildRequires:  meson >= 0.43
Zbigniew Jędrzejewski-Szmek 83f115
BuildRequires:  gettext
Zbigniew Jędrzejewski-Szmek 47d443
# We use RUNNING_ON_VALGRIND in tests, so the headers need to be available
Zbigniew Jędrzejewski-Szmek 47d443
BuildRequires:  valgrind-devel
Zbigniew Jędrzejewski-Szmek 513853
BuildRequires:  pkgconfig(bash-completion)
Zbigniew Jędrzejewski-Szmek 39bdda
BuildRequires:  perl
Zbigniew Jędrzejewski-Szmek 39bdda
BuildRequires:  perl(IPC::SysV)
Zbigniew Jędrzejewski-Szmek 28e2d4
b02240
%ifnarch %ix86
b02240
# bpftool is not built for i368
b02240
BuildRequires:  bpftool
b02240
%global have_bpf 1
b02240
%endif
b02240
Zbigniew Jędrzejewski-Szmek b3fa87
%ifarch x86_64 aarch64
Zbigniew Jędrzejewski-Szmek b3fa87
# That package is only built for those two architectures
Zbigniew Jędrzejewski-Szmek b3fa87
BuildRequires:  xen-devel
Zbigniew Jędrzejewski-Szmek b3fa87
%endif
Zbigniew Jędrzejewski-Szmek b3fa87
Michal Schmidt 176680
Requires(post): coreutils
Zbigniew Jędrzejewski-Szmek 41d7c0
Requires(post): grep
Adam Williamson 71e781
# systemd-machine-id-setup requires libssl
Adam Williamson 71e781
Requires(post): openssl-libs
Zbigniew Jędrzejewski-Szmek 324bf5
Requires:       dbus >= 1.9.18
Zbigniew Jędrzejewski-Szmek 28e2d4
Requires:       %{name}-pam = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek c971c5
Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build)
Michal Schmidt b42e57
Requires:       %{name}-libs = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 2de2f6
%{?fedora:Recommends:     %{name}-networkd = %{version}-%{release}}
be0f56
%{?fedora:Recommends:     %{name}-resolved = %{version}-%{release}}
Harald Hoyer 60a0b6
Recommends:     diffutils
Zbigniew Jędrzejewski-Szmek 535a8b
Requires:       (util-linux-core or util-linux)
Zbigniew Jędrzejewski-Szmek 140d00
Recommends:     libxkbcommon%{?_isa}
Kay Sievers 3b11fb
Provides:       /bin/systemctl
Kay Sievers 8ec8f4
Provides:       /sbin/shutdown
Kay Sievers 9ac884
Provides:       syslog
Michal Schmidt 176680
Provides:       systemd-units = %{version}-%{release}
Kay Sievers 27bf94
Obsoletes:      system-setup-keyboard < 0.9
Kay Sievers 27bf94
Provides:       system-setup-keyboard = 0.9
Kay Sievers 5ccbe7
# systemd-sysv-convert was removed in f20: https://fedorahosted.org/fpc/ticket/308
Kay Sievers 5ccbe7
Obsoletes:      systemd-sysv < 206
Zbigniew Jędrzejewski-Szmek 8f85f1
# self-obsoletes so that dnf will install new subpackages on upgrade (#1260394)
be0f56
Obsoletes:      %{name} < 249~~
Kay Sievers 5ccbe7
Provides:       systemd-sysv = 206
Zbigniew Jędrzejewski-Szmek f5ff7e
Conflicts:      initscripts < 9.56.1
Dan Horák f08e79
%if 0%{?fedora}
911dec
Conflicts:      fedora-release < 23-0.12
Dan Horák f08e79
%endif
Zbigniew Jędrzejewski-Szmek 86b177
Obsoletes:      timedatex < 0.6-3
Zbigniew Jędrzejewski-Szmek a76023
Provides:       timedatex = 0.6-3
Zbigniew Jędrzejewski-Szmek b36512
Conflicts:      %{name}-standalone-tmpfiles < %{version}-%{release}^
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:       %{name}-tmpfiles = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b36512
Conflicts:      %{name}-standalone-sysusers < %{version}-%{release}^
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:       %{name}-sysusers = %{version}-%{release}
Lennart Poettering cc49ef
Zbigniew Jędrzejewski-Szmek 550422
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
David Tardon b5ae70
Recommends:     libidn2.so.0%{?elf_suffix}
David Tardon b5ae70
Recommends:     libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
David Tardon b5ae70
Recommends:     libpcre2-8.so.0%{?elf_suffix}
David Tardon b5ae70
Recommends:     libpwquality.so.1%{?elf_suffix}
David Tardon b5ae70
Recommends:     libpwquality.so.1(LIBPWQUALITY_1.0)%{?elf_bits}
David Tardon b5ae70
Recommends:     libqrencode.so.4%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libbpf.so.0%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libbpf.so.0(LIBBPF_0.4.0)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek b24b99
Zbigniew Jędrzejewski-Szmek b24b99
# used by systemd-coredump and systemd-analyze
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libdw.so.1%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libdw.so.1(ELFUTILS_0.186)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libelf.so.1%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek b24b99
Zbigniew Jędrzejewski-Szmek b24b99
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libcryptsetup.so.12%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek 550422
Lennart Poettering cc49ef
%description
Zbigniew Jędrzejewski-Szmek 013143
systemd is a system and service manager that runs as PID 1 and starts the rest
Zbigniew Jędrzejewski-Szmek 013143
of the system. It provides aggressive parallelization capabilities, uses socket
Zbigniew Jędrzejewski-Szmek 013143
and D-Bus activation for starting services, offers on-demand starting of
Zbigniew Jędrzejewski-Szmek 013143
daemons, keeps track of processes using Linux control groups, maintains mount
Zbigniew Jędrzejewski-Szmek 013143
and automount points, and implements an elaborate transactional dependency-based
Zbigniew Jędrzejewski-Szmek 013143
service control logic. systemd supports SysV and LSB init scripts and works as a
Zbigniew Jędrzejewski-Szmek 645d1b
replacement for sysvinit. Other parts of this package are a logging daemon,
Zbigniew Jędrzejewski-Szmek 013143
utilities to control basic system configuration like the hostname, date, locale,
Zbigniew Jędrzejewski-Szmek 013143
maintain a list of logged-in users, system accounts, runtime directories and
Zbigniew Jędrzejewski-Szmek 206f30
settings, and a logging daemons.
Zbigniew Jędrzejewski-Szmek f1413e
%if 0%{?stable}
Zbigniew Jędrzejewski-Szmek 24d7f1
This package was built from the %{version}-stable branch of systemd.
Zbigniew Jędrzejewski-Szmek b9896d
%endif
Lennart Poettering cc49ef
Michal Schmidt 998394
%package libs
Michal Schmidt 998394
Summary:        systemd libraries
Michal Schmidt 998394
License:        LGPLv2+ and MIT
Kay Sievers de8b13
Obsoletes:      libudev < 183
Nils Philippsen 581717
Obsoletes:      systemd < 185-4
Nils Philippsen 581717
Conflicts:      systemd < 185-4
Zbigniew Jędrzejewski-Szmek b3d8d3
Obsoletes:      systemd-compat-libs < 230
Zbigniew Jędrzejewski-Szmek 7ae71c
Obsoletes:      nss-myhostname < 0.4
Zbigniew Jędrzejewski-Szmek 7ae71c
Provides:       nss-myhostname = 0.4
Zbigniew Jędrzejewski-Szmek a64739
Provides:       nss-myhostname%{_isa} = 0.4
Michal Schmidt 998394
Michal Schmidt 998394
%description libs
Zbigniew Jędrzejewski-Szmek 28e2d4
Libraries for systemd and udev.
Zbigniew Jędrzejewski-Szmek 28e2d4
Zbigniew Jędrzejewski-Szmek 28e2d4
%package pam
Zbigniew Jędrzejewski-Szmek 28e2d4
Summary:        systemd PAM module
Zbigniew Jędrzejewski-Szmek 28e2d4
Requires:       %{name} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 28e2d4
Zbigniew Jędrzejewski-Szmek 28e2d4
%description pam
Zbigniew Jędrzejewski-Szmek 28e2d4
Systemd PAM module registers the session with systemd-logind.
Michal Schmidt 998394
Zbigniew Jędrzejewski-Szmek c9030f
%package rpm-macros
Zbigniew Jędrzejewski-Szmek c9030f
Summary:        Macros that define paths and scriptlets related to systemd
Zbigniew Jędrzejewski-Szmek e39424
BuildArch:      noarch
Zbigniew Jędrzejewski-Szmek c9030f
Zbigniew Jędrzejewski-Szmek c9030f
%description rpm-macros
Zbigniew Jędrzejewski-Szmek 5abc56
Just the definitions of rpm macros.
Zbigniew Jędrzejewski-Szmek 5abc56
Zbigniew Jędrzejewski-Szmek 5abc56
See
Zbigniew Jędrzejewski-Szmek 5abc56
https://docs.fedoraproject.org/en-US/packaging-guidelines/Scriptlets/#_systemd
Zbigniew Jędrzejewski-Szmek 5abc56
for information how to use those macros.
Zbigniew Jędrzejewski-Szmek c9030f
Lennart Poettering 9652b0
%package devel
Lennart Poettering 9652b0
Summary:        Development headers for systemd
Michal Schmidt 998394
License:        LGPLv2+ and MIT
Zbigniew Jędrzejewski-Szmek 9e71ab
Requires:       %{name}-libs%{?_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek aac22b
Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build)
Kay Sievers 6979d2
Provides:       libudev-devel = %{version}
Zbigniew Jędrzejewski-Szmek a64739
Provides:       libudev-devel%{_isa} = %{version}
Kay Sievers 973c8d
Obsoletes:      libudev-devel < 183
Lennart Poettering 9652b0
Lennart Poettering 9652b0
%description devel
Zbigniew Jędrzejewski-Szmek acdc55
Development headers and auxiliary files for developing applications linking
Zbigniew Jędrzejewski-Szmek acdc55
to libudev or libsystemd.
Lennart Poettering 9652b0
Zbigniew Jędrzejewski-Szmek c16b57
%package udev
Zbigniew Jędrzejewski-Szmek c16b57
Summary: Rule-based device node and kernel event manager
Zbigniew Jędrzejewski-Szmek 805327
License:        LGPLv2+
Zbigniew Jędrzejewski-Szmek 805327
Zbigniew Jędrzejewski-Szmek ec562b
Requires:       systemd%{?_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek c16b57
Requires(post):   systemd
Zbigniew Jędrzejewski-Szmek c16b57
Requires(preun):  systemd
Zbigniew Jędrzejewski-Szmek c16b57
Requires(postun): systemd
Zbigniew Jędrzejewski-Szmek b7ec95
Requires(post): grep
Zbigniew Jędrzejewski-Szmek c7c436
Requires:       kmod >= 18-4
Zbigniew Jędrzejewski-Szmek ec562b
# https://bodhi.fedoraproject.org/updates/FEDORA-2020-dd43dd05b1
Zbigniew Jędrzejewski-Szmek ec562b
Obsoletes:      systemd < 245.6-1
Zbigniew Jędrzejewski-Szmek c16b57
Provides:       udev = %{version}
Zbigniew Jędrzejewski-Szmek a64739
Provides:       udev%{_isa} = %{version}
Zbigniew Jędrzejewski-Szmek c16b57
Obsoletes:      udev < 183
Zbigniew Jędrzejewski-Szmek ec562b
Zbigniew Jędrzejewski-Szmek b24b99
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
Zbigniew Jędrzejewski-Szmek b24b99
# used by dissect, integritysetup, veritysetyp, growfs, repart, cryptenroll, home
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libcryptsetup.so.12%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libcryptsetup.so.12(CRYPTSETUP_2.4)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek b24b99
Zbigniew Jędrzejewski-Szmek b24b99
# used by systemd-coredump and systemd-analyze
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libdw.so.1%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libdw.so.1(ELFUTILS_0.186)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libelf.so.1%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libelf.so.1(ELFUTILS_1.7)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek b24b99
Zbigniew Jędrzejewski-Szmek b24b99
# used by home, cryptsetup, cryptenroll
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libfido2.so.1%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libtss2-esys.so.0%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libtss2-mu.so.0%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libtss2-rc.so.0%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Zbigniew Jędrzejewski-Szmek ef73cc
# https://bugzilla.redhat.com/show_bug.cgi?id=1377733#c9
Zbigniew Jędrzejewski-Szmek a4507e
Suggests:       systemd-bootchart
Zbigniew Jędrzejewski-Szmek 4ebba8
# https://bugzilla.redhat.com/show_bug.cgi?id=1408878
Zbigniew Jędrzejewski-Szmek 01e2d8
Requires:       kbd
Zbigniew Jędrzejewski-Szmek 805327
Zbigniew Jędrzejewski-Szmek 805327
# https://bugzilla.redhat.com/show_bug.cgi?id=1753381
Zbigniew Jędrzejewski-Szmek 805327
Provides:       u2f-hidraw-policy = 1.0.2-40
Zbigniew Jędrzejewski-Szmek 805327
Obsoletes:      u2f-hidraw-policy < 1.0.2-40
Zbigniew Jędrzejewski-Szmek c16b57
Zbigniew Jędrzejewski-Szmek c16b57
%description udev
Zbigniew Jędrzejewski-Szmek 013143
This package contains systemd-udev and the rules and hardware database needed to
Zbigniew Jędrzejewski-Szmek 013143
manage device nodes. This package is necessary on physical machines and in
Zbigniew Jędrzejewski-Szmek 013143
virtual machines, but not in containers.
Zbigniew Jędrzejewski-Szmek c16b57
Zbigniew Jędrzejewski-Szmek 206f30
This package also provides systemd-timesyncd, a network time protocol daemon.
Zbigniew Jędrzejewski-Szmek 206f30
Zbigniew Jędrzejewski-Szmek b24b99
It also contains tools to manage encrypted home areas and secrets bound to the
Zbigniew Jędrzejewski-Szmek 206f30
machine, and to create or grow partitions and make file systems automatically.
Zbigniew Jędrzejewski-Szmek b24b99
Zbigniew Jędrzejewski-Szmek 34bfce
%package container
Zbigniew Jędrzejewski-Szmek 34bfce
# Name is the same as in Debian
Zbigniew Jędrzejewski-Szmek 34bfce
Summary: Tools for containers and VMs
Zbigniew Jędrzejewski-Szmek 34bfce
Requires:       %{name}%{?_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 34bfce
Requires(post):   systemd
Zbigniew Jędrzejewski-Szmek 34bfce
Requires(preun):  systemd
Zbigniew Jędrzejewski-Szmek 34bfce
Requires(postun): systemd
Zbigniew Jędrzejewski-Szmek c16b57
# obsolete parent package so that dnf will install new subpackage on upgrade (#1260394)
Zbigniew Jędrzejewski-Szmek 34bfce
Obsoletes:      %{name} < 229-5
Zbigniew Jędrzejewski-Szmek 2731a2
# Bias the system towards libcurl-minimal if nothing pulls in full libcurl (#1997040)
Zbigniew Jędrzejewski-Szmek 2731a2
Suggests:       libcurl-minimal
Zbigniew Jędrzejewski-Szmek 34bfce
License:        LGPLv2+
Zbigniew Jędrzejewski-Szmek 34bfce
Zbigniew Jędrzejewski-Szmek 34bfce
%description container
Zbigniew Jędrzejewski-Szmek 34bfce
Systemd tools to spawn and manage containers and virtual machines.
Zbigniew Jędrzejewski-Szmek 34bfce
Zbigniew Jędrzejewski-Szmek 013143
This package contains systemd-nspawn, machinectl, systemd-machined, and
Zbigniew Jędrzejewski-Szmek 013143
systemd-importd.
Zbigniew Jędrzejewski-Szmek 34bfce
Zbigniew Jędrzejewski-Szmek b321c5
%package journal-remote
Zbigniew Jędrzejewski-Szmek b321c5
# Name is the same as in Debian
Zbigniew Jędrzejewski-Szmek b321c5
Summary:        Tools to send journal events over the network
Zbigniew Jędrzejewski-Szmek 0ab588
Requires:       %{name}%{?_isa} = %{version}-%{release}
Michal Schmidt 54952b
License:        LGPLv2+
Zbigniew Jędrzejewski-Szmek b53cf7
Requires:       firewalld-filesystem
Zbigniew Jędrzejewski-Szmek b321c5
Provides:       %{name}-journal-gateway = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek a64739
Provides:       %{name}-journal-gateway%{_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 5767bd
Obsoletes:      %{name}-journal-gateway < 227-7
Zbigniew Jędrzejewski-Szmek 2731a2
# Bias the system towards libcurl-minimal if nothing pulls in full libcurl (#1997040)
Zbigniew Jędrzejewski-Szmek 2731a2
Suggests:       libcurl-minimal
Michal Schmidt 54952b
Zbigniew Jędrzejewski-Szmek b321c5
%description journal-remote
Zbigniew Jędrzejewski-Szmek 013143
Programs to forward journal entries over the network, using encrypted HTTP, and
Zbigniew Jędrzejewski-Szmek 013143
to write journal files from serialized journal contents.
Zbigniew Jędrzejewski-Szmek b321c5
Zbigniew Jędrzejewski-Szmek 013143
This package contains systemd-journal-gatewayd, systemd-journal-remote, and
Zbigniew Jędrzejewski-Szmek 013143
systemd-journal-upload.
Michal Schmidt 54952b
f455b2
%package networkd
Robert Scheck 5acb5c
Summary:        System daemon that manages network configurations
f455b2
Requires:       %{name}%{?_isa} = %{version}-%{release}
f455b2
License:        LGPLv2+
f455b2
# https://src.fedoraproject.org/rpms/systemd/pull-request/34
f455b2
Obsoletes:      systemd < 246.6-2
f455b2
f455b2
%description networkd
Zbigniew Jędrzejewski-Szmek 013143
systemd-networkd is a system service that manages networks. It detects and
Zbigniew Jędrzejewski-Szmek 013143
configures network devices as they appear, as well as creating virtual network
Zbigniew Jędrzejewski-Szmek 013143
devices.
f455b2
be0f56
%package resolved
be0f56
Summary:        Network Name Resolution manager
be0f56
Requires:       %{name}%{?_isa} = %{version}-%{release}
be0f56
Obsoletes:      %{name} < 249~~
Zbigniew Jędrzejewski-Szmek b24b99
Requires:       libidn2.so.0%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek b24b99
Requires:       libidn2.so.0(IDN2_0.0.0)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek 4cc75b
Requires(posttrans): grep
be0f56
be0f56
%description resolved
Zbigniew Jędrzejewski-Szmek 013143
systemd-resolved is a system service that provides network name resolution to
Zbigniew Jędrzejewski-Szmek 013143
local applications. It implements a caching and validating DNS/DNSSEC stub
Zbigniew Jędrzejewski-Szmek 013143
resolver, as well as an LLMNR and MulticastDNS resolver and responder.
be0f56
834f04
%package oomd-defaults
834f04
Summary:        Configuration files for systemd-oomd
162770
Requires:       %{name} = %{version}-%{release}
834f04
License:        LGPLv2+
162770
BuildArch:      noarch
834f04
834f04
%description oomd-defaults
834f04
A set of drop-in files for systemd units to enable action from systemd-oomd,
834f04
a userspace out-of-memory (OOM) killer.
834f04
Zbigniew Jędrzejewski-Szmek bb4127
%package tests
Zbigniew Jędrzejewski-Szmek bb4127
Summary:       Internal unit tests for systemd
Zbigniew Jędrzejewski-Szmek bb4127
Requires:      %{name}%{?_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek bb4127
License:       LGPLv2+
Zbigniew Jędrzejewski-Szmek bb4127
Zbigniew Jędrzejewski-Szmek bb4127
%description tests
Zbigniew Jędrzejewski-Szmek 013143
"Installed tests" that are usually run as part of the build system. They can be
Zbigniew Jędrzejewski-Szmek 013143
useful to test systemd internals.
Zbigniew Jędrzejewski-Szmek bb4127
b50e9d
%package standalone-tmpfiles
b50e9d
Summary:       Standalone tmpfiles binary for use in non-systemd systems
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:      %{name}-tmpfiles = %{version}-%{release}
b50e9d
RemovePathPostfixes: .standalone
b50e9d
b50e9d
%description standalone-tmpfiles
Zbigniew Jędrzejewski-Szmek 013143
Standalone tmpfiles binary with no dependencies on the systemd-shared library or
Zbigniew Jędrzejewski-Szmek 013143
other libraries from systemd-libs. This package conflicts with the main systemd
Zbigniew Jędrzejewski-Szmek 013143
package and is meant for use in non-systemd systems.
b50e9d
b50e9d
%package standalone-sysusers
b50e9d
Summary:       Standalone sysusers binary for use in non-systemd systems
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:      %{name}-sysusers = %{version}-%{release}
b50e9d
RemovePathPostfixes: .standalone
b50e9d
b50e9d
%description standalone-sysusers
Zbigniew Jędrzejewski-Szmek 013143
Standalone sysusers binary with no dependencies on the systemd-shared library or
Zbigniew Jędrzejewski-Szmek 013143
other libraries from systemd-libs. This package conflicts with the main systemd
Zbigniew Jędrzejewski-Szmek 013143
package and is meant for use in non-systemd systems.
b50e9d
Lennart Poettering cc49ef
%prep
Zbigniew Jędrzejewski-Szmek 3ba808
%autosetup -n %{?commit:%{name}%{?stable:-stable}-%{commit}}%{!?commit:%{name}%{?stable:-stable}-%{version_no_tilde}} -p1
Harald Hoyer 2e2e24
Zbigniew Jędrzejewski-Szmek 3ce337
test -f src/login/systemd-user.in
Zbigniew Jędrzejewski-Szmek 3ce337
# Restore systemd-user pam config from before "removal of Fedora-specific bits".
Zbigniew Jędrzejewski-Szmek 3ce337
# We'll systemd process it and install in the right place.
Zbigniew Jędrzejewski-Szmek 3ce337
cp %{SOURCE12} src/login/systemd-user.in
Zbigniew Jędrzejewski-Szmek 3ce337
Lennart Poettering cc49ef
%build
Zbigniew Jędrzejewski-Szmek c971c5
%global ntpvendor %(source /etc/os-release; echo ${ID})
Michal Schmidt 10e6a8
%{!?ntpvendor: echo 'NTP vendor zone is not set!'; exit 1}
Michal Schmidt 10e6a8
Michal Schmidt c8f466
CONFIGURE_OPTS=(
Zbigniew Jędrzejewski-Szmek 550422
        -Dmode=release
Zbigniew Jędrzejewski-Szmek 83f115
        -Dsysvinit-path=/etc/rc.d/init.d
Zbigniew Jędrzejewski-Szmek 83f115
        -Drc-local=/etc/rc.d/rc.local
Zbigniew Jędrzejewski-Szmek 83f115
        -Dntp-servers='0.%{ntpvendor}.pool.ntp.org 1.%{ntpvendor}.pool.ntp.org 2.%{ntpvendor}.pool.ntp.org 3.%{ntpvendor}.pool.ntp.org'
Zbigniew Jędrzejewski-Szmek 14b2fa
        -Ddns-servers=
Zbigniew Jędrzejewski-Szmek a74696
        -Duser-path=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin
Zbigniew Jędrzejewski-Szmek 2ccb3a
        -Dservice-watchdog=
Zbigniew Jędrzejewski-Szmek f3e3e4
        -Ddev-kvm-mode=0666
Zbigniew Jędrzejewski-Szmek 83f115
        -Dkmod=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dxkbcommon=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dblkid=true
Zbigniew Jędrzejewski-Szmek 513853
        -Dfdisk=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dseccomp=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dima=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dselinux=true
b02240
        -Dbpf-framework=%[0%{?have_bpf}?"true":"false"]
Zbigniew Jędrzejewski-Szmek 83f115
        -Dapparmor=false
Zbigniew Jędrzejewski-Szmek 83f115
        -Dpolkit=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dxz=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dzlib=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dbzip2=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dlz4=true
Zbigniew Jędrzejewski-Szmek 65984c
        -Dzstd=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dpam=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dacl=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dsmack=true
Zbigniew Jędrzejewski-Szmek 513853
        -Dopenssl=true
Zbigniew Jędrzejewski-Szmek ce4156
        -Dcryptolib=openssl
Zbigniew Jędrzejewski-Szmek 513853
        -Dp11kit=true
Zbigniew Jędrzejewski-Szmek ee5cf7
        -Dgcrypt=false
Zbigniew Jędrzejewski-Szmek 83f115
        -Daudit=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Delfutils=true
Zbigniew Jędrzejewski-Szmek 807d24
        -Dlibcryptsetup=%[%{with bootstrap}?"false":"true"]
Zbigniew Jędrzejewski-Szmek 83f115
        -Delfutils=true
Zbigniew Jędrzejewski-Szmek 513853
        -Dpwquality=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dqrencode=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dgnutls=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dmicrohttpd=true
Yu Watanabe dc44a1
        -Dlibidn2=true
b7c95d
        -Dlibiptc=false
Zbigniew Jędrzejewski-Szmek 83f115
        -Dlibcurl=true
Zbigniew Jędrzejewski-Szmek ce6da6
        -Dlibfido2=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Defi=true
Zbigniew Jędrzejewski-Szmek 807d24
        -Dgnu-efi=%[%{?have_gnu_efi}?"true":"false"]
Zbigniew Jędrzejewski-Szmek 83f115
        -Dtpm=true
Zbigniew Jędrzejewski-Szmek 141af4
        -Dtpm2=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dhwdb=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dsysusers=true
b50e9d
        -Dstandalone-binaries=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Ddefault-kill-user-processes=false
Zbigniew Jędrzejewski-Szmek 89715a
        -Dfirst-boot-full-preset=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dtests=unsafe
Zbigniew Jędrzejewski-Szmek 83f115
        -Dinstall-tests=true
Yu Watanabe a8ba7b
        -Dtty-gid=5
Yu Watanabe a8ba7b
        -Dusers-gid=100
Zbigniew Jędrzejewski-Szmek 3e18b4
        -Dnobody-user=nobody
Zbigniew Jędrzejewski-Szmek 3e18b4
        -Dnobody-group=nobody
Zbigniew Jędrzejewski-Szmek 550422
        -Dcompat-mutable-uid-boundaries=true
Zbigniew Jędrzejewski-Szmek 98ea23
        -Dsplit-usr=false
Zbigniew Jędrzejewski-Szmek 98ea23
        -Dsplit-bin=true
Zbigniew Jędrzejewski-Szmek 807d24
        -Db_lto=%[%{with lto}?"true":"false"]
Zbigniew Jędrzejewski-Szmek cf6cab
        -Db_ndebug=false
Zbigniew Jędrzejewski-Szmek f1413e
        -Dman=true
Zbigniew Jędrzejewski-Szmek ee6588
        -Dversion-tag=%{version}-%{release}
Zbigniew Jędrzejewski-Szmek 3c4f94
        # https://bugzilla.redhat.com/show_bug.cgi?id=1906010
Zbigniew Jędrzejewski-Szmek 777626
        -Dshared-lib-tag=%{version_no_tilde}-%{release}
Neal Gompa f5157f
        -Dfallback-hostname="localhost"
Zbigniew Jędrzejewski-Szmek 0a6ab0
        -Ddefault-dnssec=no
28acb3
        -Ddefault-dns-over-tls=no
Zbigniew Jędrzejewski-Szmek 5a70c0
        # https://bugzilla.redhat.com/show_bug.cgi?id=1867830
Zbigniew Jędrzejewski-Szmek 5a70c0
        -Ddefault-mdns=no
Zbigniew Jędrzejewski-Szmek 0a6ab0
        -Ddefault-llmnr=resolve
Zbigniew Jędrzejewski-Szmek 34a8fa
        # https://bugzilla.redhat.com/show_bug.cgi?id=2028169
Zbigniew Jędrzejewski-Szmek 34a8fa
        -Dstatus-unit-format-default=combined
Zbigniew Jędrzejewski-Szmek bca98c
        -Doomd=true
Zbigniew Jędrzejewski-Szmek a49146
        -Dadm-gid=4
Zbigniew Jędrzejewski-Szmek a49146
        -Daudio-gid=63
Zbigniew Jędrzejewski-Szmek a49146
        -Dcdrom-gid=11
Zbigniew Jędrzejewski-Szmek a49146
        -Ddialout-gid=18
Zbigniew Jędrzejewski-Szmek a49146
        -Ddisk-gid=6
Zbigniew Jędrzejewski-Szmek e19aaa
        -Dinput-gid=104
Zbigniew Jędrzejewski-Szmek a49146
        -Dkmem-gid=9
Zbigniew Jędrzejewski-Szmek a49146
        -Dkvm-gid=36
Zbigniew Jędrzejewski-Szmek a49146
        -Dlp-gid=7
Zbigniew Jędrzejewski-Szmek e19aaa
        -Drender-gid=105
Zbigniew Jędrzejewski-Szmek e19aaa
        -Dsgx-gid=106
Zbigniew Jędrzejewski-Szmek a49146
        -Dtape-gid=33
Zbigniew Jędrzejewski-Szmek a49146
        -Dtty-gid=5
Zbigniew Jędrzejewski-Szmek a49146
        -Dusers-gid=100
Zbigniew Jędrzejewski-Szmek a49146
        -Dutmp-gid=22
Zbigniew Jędrzejewski-Szmek a49146
        -Dvideo-gid=39
Zbigniew Jędrzejewski-Szmek a49146
        -Dwheel-gid=10
Zbigniew Jędrzejewski-Szmek a49146
        -Dsystemd-journal-gid=190
Zbigniew Jędrzejewski-Szmek a49146
        -Dsystemd-network-uid=192
Zbigniew Jędrzejewski-Szmek a49146
        -Dsystemd-resolve-uid=193
Zbigniew Jędrzejewski-Szmek a49146
        # -Dsystemd-timesync-uid=, not set yet
Michal Schmidt c8f466
)
Michal Schmidt c8f466
Zbigniew Jędrzejewski-Szmek 387db8
%if %{without lto}
Zbigniew Jędrzejewski-Szmek 387db8
%global _lto_cflags %nil
Zbigniew Jędrzejewski-Szmek 387db8
%endif
Zbigniew Jędrzejewski-Szmek 387db8
Zbigniew Jędrzejewski-Szmek 05f788
# Do configuration. If doing an inplace build, try to do
Zbigniew Jędrzejewski-Szmek 05f788
# reconfiguration to pick up new options.
Zbigniew Jędrzejewski-Szmek 05f788
%if %{with inplace}
Zbigniew Jędrzejewski-Szmek 05f788
  command -v ccache 2>/dev/null && { CC="${CC:-ccache %__cc}"; CXX="${CXX:-ccache %__cxx}"; }
Zbigniew Jędrzejewski-Szmek 05f788
Zbigniew Jędrzejewski-Szmek 05f788
  [ -e %{_vpath_builddir}/build.ninja ] &&
Zbigniew Jędrzejewski-Szmek 05f788
  %__meson configure %{_vpath_builddir} "${CONFIGURE_OPTS[@]}" ||
Zbigniew Jędrzejewski-Szmek 05f788
%endif
Zbigniew Jędrzejewski-Szmek 05f788
{ %meson "${CONFIGURE_OPTS[@]}"; }
Zbigniew Jędrzejewski-Szmek e0b3ea
Zbigniew Jędrzejewski-Szmek c323a2
%meson_build
Zbigniew Jędrzejewski-Szmek c323a2
Zbigniew Jędrzejewski-Szmek e0b3ea
new_triggers=%{_vpath_builddir}/src/rpm/triggers.systemd.sh
Zbigniew Jędrzejewski-Szmek e0b3ea
if ! diff -u %{SOURCE1} ${new_triggers}; then
Zbigniew Jędrzejewski-Szmek e0b3ea
   echo -e "\n\n\nWARNING: triggers.systemd in Source1 is different!"
Zbigniew Jędrzejewski-Szmek e0b3ea
   echo -e "      cp $PWD/${new_triggers} %{SOURCE1}\n\n\n"
Zbigniew Jędrzejewski-Szmek e0b3ea
   sleep 5
Zbigniew Jędrzejewski-Szmek e0b3ea
fi
Zbigniew Jędrzejewski-Szmek e0b3ea
Lennart Poettering cc49ef
%install
Zbigniew Jędrzejewski-Szmek 83f115
%meson_install
Zbigniew Jędrzejewski-Szmek 6153dd
Lennart Poettering b79f2e
# udev links
Michal Schmidt c7b4b0
mkdir -p %{buildroot}/%{_sbindir}
Michal Schmidt c7b4b0
ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
Lennart Poettering 25a5a1
Zbigniew Jędrzejewski-Szmek 6d5bee
# Compatiblity and documentation files
Zbigniew Jędrzejewski-Szmek 6d5bee
touch %{buildroot}/etc/crypttab
Zbigniew Jędrzejewski-Szmek 6d5bee
chmod 600 %{buildroot}/etc/crypttab
Zbigniew Jędrzejewski-Szmek 6d5bee
Zbigniew Jędrzejewski-Szmek 83f115
# /etc/initab
Zbigniew Jędrzejewski-Szmek 51f362
install -Dm0644 -t %{buildroot}/etc/ %{SOURCE5}
Zbigniew Jędrzejewski-Szmek 6d5bee
Zbigniew Jędrzejewski-Szmek 83f115
# /etc/sysctl.conf compat
Zbigniew Jędrzejewski-Szmek c90404
install -Dm0644 %{SOURCE6} %{buildroot}/etc/sysctl.conf
Zbigniew Jędrzejewski-Szmek 801ccd
ln -s ../sysctl.conf %{buildroot}/etc/sysctl.d/99-sysctl.conf
Zbigniew Jędrzejewski-Szmek 801ccd
Lennart Poettering d44ba8
# Make sure these directories are properly owned
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{system_unit_dir}/basic.target.wants
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{system_unit_dir}/default.target.wants
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{system_unit_dir}/dbus.target.wants
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{system_unit_dir}/syslog.target.wants
Zbigniew Jędrzejewski-Szmek be4317
mkdir -p %{buildroot}/run
Zbigniew Jędrzejewski-Szmek c90404
mkdir -p %{buildroot}%{_localstatedir}/log
Zbigniew Jędrzejewski-Szmek 238e8e
touch %{buildroot}%{_localstatedir}/log/lastlog
Zbigniew Jędrzejewski-Szmek 238e8e
chmod 0664 %{buildroot}%{_localstatedir}/log/lastlog
Zbigniew Jędrzejewski-Szmek be4317
touch %{buildroot}/run/utmp
Zbigniew Jędrzejewski-Szmek b1a5d7
touch %{buildroot}%{_localstatedir}/log/{w,b}tmp
Zbigniew Jędrzejewski-Szmek b1a5d7
Lennart Poettering 54fb1a
# Make sure the user generators dir exists too
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{pkgdir}/system-generators
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{pkgdir}/user-generators
Lennart Poettering 54fb1a
Lennart Poettering 82a114
# Create new-style configuration files so that we can ghost-own them
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/hostname
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/vconsole.conf
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/locale.conf
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/machine-id
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/machine-info
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/localtime
Michal Schmidt c7b4b0
mkdir -p %{buildroot}%{_sysconfdir}/X11/xorg.conf.d
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/X11/xorg.conf.d/00-keyboard.conf
Lennart Poettering 82a114
Lennart Poettering 4481fb
# Make sure the shutdown/sleep drop-in dirs exist
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{pkgdir}/system-shutdown/
Zbigniew Jędrzejewski-Szmek c9f04d
mkdir -p %{buildroot}%{pkgdir}/system-sleep/
Lennart Poettering 4481fb
Lennart Poettering 545717
# Make sure directories in /var exist
Michal Schmidt c7b4b0
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/coredump
Michal Schmidt c7b4b0
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/catalog
Lennart Poettering 129881
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/backlight
Lennart Poettering 129881
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/rfkill
Zbigniew Jędrzejewski-Szmek b54bf1
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/linger
Yu Watanabe 9653e1
mkdir -p %{buildroot}%{_localstatedir}/lib/private
Yu Watanabe 9653e1
mkdir -p %{buildroot}%{_localstatedir}/log/private
Yu Watanabe 9653e1
mkdir -p %{buildroot}%{_localstatedir}/cache/private
Yu Watanabe 9653e1
mkdir -p %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload
Yu Watanabe d644e8
mkdir -p %{buildroot}%{_localstatedir}/lib/systemd/timesync
Yu Watanabe 9653e1
ln -s ../private/systemd/journal-upload %{buildroot}%{_localstatedir}/lib/systemd/journal-upload
Michal Schmidt c7b4b0
mkdir -p %{buildroot}%{_localstatedir}/log/journal
Michal Schmidt c7b4b0
touch %{buildroot}%{_localstatedir}/lib/systemd/catalog/database
Michal Schmidt c7b4b0
touch %{buildroot}%{_sysconfdir}/udev/hwdb.bin
Lennart Poettering b73335
touch %{buildroot}%{_localstatedir}/lib/systemd/random-seed
Yu Watanabe d644e8
touch %{buildroot}%{_localstatedir}/lib/systemd/timesync/clock
Yu Watanabe 9653e1
touch %{buildroot}%{_localstatedir}/lib/private/systemd/journal-upload/state
Lennart Poettering 545717
Michal Schmidt 3c3608
# Install yum protection fragment
Zbigniew Jędrzejewski-Szmek 184871
install -Dm0644 %{SOURCE4} %{buildroot}/etc/dnf/protected.d/systemd.conf
Michal Schmidt 3c3608
Zbigniew Jędrzejewski-Szmek 51f362
install -Dm0644 -t %{buildroot}/usr/lib/firewalld/services/ %{SOURCE7} %{SOURCE8}
Zbigniew Jędrzejewski-Szmek b53cf7
Zbigniew Jędrzejewski-Szmek 90aeee
# Install additional docs
Zbigniew Jędrzejewski-Szmek 90aeee
# https://bugzilla.redhat.com/show_bug.cgi?id=1234951
Zbigniew Jędrzejewski-Szmek 51f362
install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE9}
Zbigniew Jędrzejewski-Szmek 90aeee
Zbigniew Jędrzejewski-Szmek 65fed7
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974
Zbigniew Jędrzejewski-Szmek 65fed7
install -Dm0644 -t %{buildroot}%{system_unit_dir}/systemd-udev-trigger.service.d/ %{SOURCE10}
Zbigniew Jędrzejewski-Szmek 65fed7
Zbigniew Jędrzejewski-Szmek 147b75
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/ %{SOURCE13}
Zbigniew Jędrzejewski-Szmek 8a34ce
Zbigniew Jędrzejewski-Szmek 388cd9
install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3}
Zbigniew Jędrzejewski-Szmek 388cd9
834f04
# systemd-oomd default configuration
834f04
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/oomd.conf.d/ %{SOURCE14}
7665e1
install -Dm0644 -t %{buildroot}%{system_unit_dir}/user-.slice.d/ %{SOURCE15}
7665e1
install -Dm0644 -t %{buildroot}%{system_unit_dir}/system.slice.d/ %{SOURCE15}
7665e1
install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15}
834f04
Zbigniew Jędrzejewski-Szmek 47d443
sed -i 's|#!/usr/bin/env python3|#!%{__python3}|' %{buildroot}/usr/lib/systemd/tests/run-unit-tests.py
Zbigniew Jędrzejewski-Szmek 47d443
Zbigniew Jędrzejewski-Szmek ced923
install -m 0644 -D -t %{buildroot}%{_rpmconfigdir}/macros.d/ %{SOURCE21}
Zbigniew Jędrzejewski-Szmek ced923
install -m 0644 -D -t %{buildroot}%{_rpmconfigdir}/fileattrs/ %{SOURCE22}
Zbigniew Jędrzejewski-Szmek ced923
install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE23}
Zbigniew Jędrzejewski-Szmek ced923
install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE24}
Zbigniew Jędrzejewski-Szmek ced923
Zbigniew Jędrzejewski-Szmek b2ba74
%find_lang %{name}
Zbigniew Jędrzejewski-Szmek b2ba74
Zbigniew Jędrzejewski-Szmek 17a6f3
# Split files in build root into rpms. See split-files.py for the
Zbigniew Jędrzejewski-Szmek 17a6f3
# rules towards the end, anything which is an exception needs a line
Zbigniew Jędrzejewski-Szmek 17a6f3
# here.
Zbigniew Jędrzejewski-Szmek 17a6f3
python3 %{SOURCE2} %buildroot <
Yu Watanabe 9653e1
%ghost %config(noreplace) /etc/crypttab
Zbigniew Jędrzejewski-Szmek 58777c
%ghost %attr(0444,root,root) /etc/udev/hwdb.bin
Zbigniew Jędrzejewski-Szmek 17a6f3
/etc/inittab
Zbigniew Jędrzejewski-Szmek 388cd9
/usr/lib/systemd/purge-nobody-user
Yu Watanabe 9653e1
%ghost %config(noreplace) /etc/vconsole.conf
Zbigniew Jędrzejewski-Szmek 17a6f3
%ghost %config(noreplace) /etc/X11/xorg.conf.d/00-keyboard.conf
Zbigniew Jędrzejewski-Szmek 8c4c6d
%ghost %attr(0664,root,root) %verify(not group) /run/utmp
Zbigniew Jędrzejewski-Szmek 8c4c6d
%ghost %attr(0664,root,root) %verify(not group) /var/log/wtmp
Zbigniew Jędrzejewski-Szmek 8c4c6d
%ghost %attr(0660,root,root) %verify(not group) /var/log/btmp
Zbigniew Jędrzejewski-Szmek 8c4c6d
%ghost %attr(0664,root,root) %verify(not md5 size mtime group) /var/log/lastlog
Zbigniew Jędrzejewski-Szmek 17a6f3
%ghost %config(noreplace) /etc/hostname
Zbigniew Jędrzejewski-Szmek 17a6f3
%ghost %config(noreplace) /etc/localtime
Zbigniew Jędrzejewski-Szmek 17a6f3
%ghost %config(noreplace) /etc/locale.conf
Zbigniew Jędrzejewski-Szmek db26d9
%ghost %attr(0444,root,root) %config(noreplace) /etc/machine-id
Zbigniew Jędrzejewski-Szmek 17a6f3
%ghost %config(noreplace) /etc/machine-info
Yu Watanabe d15bd1
%ghost %attr(0700,root,root) %dir /var/cache/private
Yu Watanabe d15bd1
%ghost %attr(0700,root,root) %dir /var/lib/private
Yu Watanabe 9653e1
%ghost %dir /var/lib/private/systemd
Yu Watanabe 9653e1
%ghost %dir /var/lib/private/systemd/journal-upload
Yu Watanabe 9653e1
%ghost /var/lib/private/systemd/journal-upload/state
Yu Watanabe d644e8
%ghost %dir /var/lib/systemd/timesync
Yu Watanabe d644e8
%ghost /var/lib/systemd/timesync/clock
Yu Watanabe 9653e1
%ghost %dir /var/lib/systemd/backlight
Yu Watanabe 9653e1
%ghost /var/lib/systemd/catalog/database
Yu Watanabe 9653e1
%ghost %dir /var/lib/systemd/coredump
Yu Watanabe 9653e1
%ghost /var/lib/systemd/journal-upload
Yu Watanabe 9653e1
%ghost %dir /var/lib/systemd/linger
Zbigniew Jędrzejewski-Szmek 58777c
%ghost %attr(0600,root,root) /var/lib/systemd/random-seed
Yu Watanabe 9653e1
%ghost %dir /var/lib/systemd/rfkill
Zbigniew Jędrzejewski-Szmek 1ba983
%ghost %dir %verify(not mode group) /var/log/journal
Yu Watanabe 9653e1
%ghost %dir /var/log/journal/remote
Yu Watanabe d15bd1
%ghost %attr(0700,root,root) %dir /var/log/private
Zbigniew Jędrzejewski-Szmek 17a6f3
EOF
Zbigniew Jędrzejewski-Szmek 17a6f3
Lennart Poettering 064fee
%check
Zbigniew Jędrzejewski-Szmek 933c03
%if %{with tests}
Zbigniew Jędrzejewski-Szmek 4f4584
meson test -C %{_vpath_builddir} -t 6 --print-errorlogs
Zbigniew Jędrzejewski-Szmek 933c03
%endif
Zbigniew Jędrzejewski-Szmek 551967
Zbigniew Jędrzejewski-Szmek fc6511
#############################################################################################
Zbigniew Jędrzejewski-Szmek fc6511
Zbigniew Jędrzejewski-Szmek 8b4408
%include %{SOURCE1}
Zbigniew Jędrzejewski-Szmek fc6511
Lennart Poettering 01d495
%post
Zbigniew Jędrzejewski-Szmek b810fa
systemd-machine-id-setup &>/dev/null || :
5c5a95
Zbigniew Jędrzejewski-Szmek c4675f
# FIXME: move to %postun. We want to restart systemd *after* removing
Zbigniew Jędrzejewski-Szmek c4675f
# files from the old rpm. Right now we may still have bits the old
Zbigniew Jędrzejewski-Szmek c4675f
# setup if the files are not present in the new version. But before
Zbigniew Jędrzejewski-Szmek c4675f
# implement restarting of *other* services after the transaction, moving
Zbigniew Jędrzejewski-Szmek c4675f
# this would make things worse, increasing the number of warnings we get
Zbigniew Jędrzejewski-Szmek c4675f
# about needed daemon-reload.
Zbigniew Jędrzejewski-Szmek 274df2
Zbigniew Jędrzejewski-Szmek 274df2
oomd_state=$(systemctl is-active systemd-oomd 2>/dev/null || :)
Zbigniew Jędrzejewski-Szmek 274df2
Zbigniew Jędrzejewski-Szmek 274df2
# Work-around for #1931034. Remove after F34 is released.
Zbigniew Jędrzejewski-Szmek 274df2
if [ "$oomd_state" == "active" ]; then
Zbigniew Jędrzejewski-Szmek 274df2
   systemctl stop -q systemd-oomd 2>/dev/null || :
Zbigniew Jędrzejewski-Szmek 274df2
fi
Zbigniew Jędrzejewski-Szmek 274df2
5c5a95
systemctl daemon-reexec &>/dev/null || {
5c5a95
  # systemd v239 had bug #9553 in D-Bus authentication of the private socket,
5c5a95
  # which was later fixed in v240 by #9625.
5c5a95
  #
5c5a95
  # The end result is that a `systemctl daemon-reexec` call as root will fail
5c5a95
  # when upgrading from systemd v239, which means the system will not start
5c5a95
  # running the new version of systemd after this post install script runs.
5c5a95
  #
5c5a95
  # To work around this issue, let's fall back to using a `kill -TERM 1` to
5c5a95
  # re-execute the daemon when the `systemctl daemon-reexec` call fails.
5c5a95
  #
5c5a95
  # In order to prevent issues when the reason why the daemon-reexec failed is
5c5a95
  # not the aforementioned bug, let's only use this fallback when:
5c5a95
  #   - we're upgrading this RPM package; and
5c5a95
  #   - we confirm that systemd is running as PID1 on this system.
5c5a95
  if [ $1 -gt 1 ] && [ -d /run/systemd/system ] ; then
5c5a95
    kill -TERM 1 &>/dev/null || :
5c5a95
  fi
5c5a95
}
5c5a95
Zbigniew Jędrzejewski-Szmek 274df2
if [ "$oomd_state" == "active" ]; then
Zbigniew Jędrzejewski-Szmek 274df2
   systemctl start -q systemd-oomd 2>/dev/null || :
Zbigniew Jędrzejewski-Szmek 274df2
fi
Zbigniew Jędrzejewski-Szmek 274df2
Zbigniew Jędrzejewski-Szmek a49146
[ $1 -eq 1 ] || exit 0
Lennart Poettering fc3de1
Zbigniew Jędrzejewski-Szmek a49146
# create /var/log/journal only on initial installation,
Zbigniew Jędrzejewski-Szmek a49146
# and only if it's writable (it won't be in rpm-ostree).
Zbigniew Jędrzejewski-Szmek a49146
[ -w %{_localstatedir} ] && mkdir -p %{_localstatedir}/log/journal
Lennart Poettering 0bbe49
Zbigniew Jędrzejewski-Szmek a49146
[ -w %{_localstatedir} ] && journalctl --update-catalog || :
Zbigniew Jędrzejewski-Szmek a49146
systemd-sysusers || :
Zbigniew Jędrzejewski-Szmek a49146
systemd-tmpfiles --create &>/dev/null || :
Zbigniew Jędrzejewski-Szmek d01d53
Adam Williamson 8510ca
# We reset the enablement of all services upon initial installation
Adam Williamson 8510ca
# https://bugzilla.redhat.com/show_bug.cgi?id=1118740#c23
Adam Williamson 8510ca
# This will fix up enablement of any preset services that got installed
Adam Williamson 8510ca
# before systemd due to rpm ordering problems:
Zbigniew Jędrzejewski-Szmek 9434e6
# https://bugzilla.redhat.com/show_bug.cgi?id=1647172.
Zbigniew Jędrzejewski-Szmek 9434e6
# We also do this for user units, see
Zbigniew Jędrzejewski-Szmek 9434e6
# https://fedoraproject.org/wiki/Changes/Systemd_presets_for_user_units.
Zbigniew Jędrzejewski-Szmek d01d53
systemctl preset-all &>/dev/null || :
Zbigniew Jędrzejewski-Szmek d01d53
systemctl --global preset-all &>/dev/null || :
Lennart Poettering 3a1413
Zbigniew Jędrzejewski-Szmek c4675f
%postun
Zbigniew Jędrzejewski-Szmek c4675f
if [ $1 -eq 1 ]; then
Zbigniew Jędrzejewski-Szmek c4675f
   [ -w %{_localstatedir} ] && journalctl --update-catalog || :
Zbigniew Jędrzejewski-Szmek c4675f
   systemd-tmpfiles --create &>/dev/null || :
Zbigniew Jędrzejewski-Szmek 7ae71c
fi
Zbigniew Jędrzejewski-Szmek 7ae71c
Zbigniew Jędrzejewski-Szmek c4675f
%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
Zbigniew Jędrzejewski-Szmek c4675f
Zbigniew Jędrzejewski-Szmek c4675f
# FIXME: systemd-logind.service is excluded (https://github.com/systemd/systemd/pull/17558)
Zbigniew Jędrzejewski-Szmek c4675f
# FIXME: user@*.service needs to be restarted, but using systemctl --user daemon-reexec
Zbigniew Jędrzejewski-Szmek c4675f
be0f56
%triggerun resolved -- systemd < 246.1-1
Zbigniew Jędrzejewski-Szmek a5acce
# This is for upgrades from previous versions before systemd-resolved became the default.
Zbigniew Jędrzejewski-Szmek a5acce
systemctl --no-reload preset systemd-resolved.service &>/dev/null || :
Zbigniew Jędrzejewski-Szmek a5acce
Zbigniew Jędrzejewski-Szmek 390551
if systemctl -q is-enabled systemd-resolved.service &>/dev/null; then
Zbigniew Jędrzejewski-Szmek 390551
  systemctl -q is-enabled NetworkManager.service 2>/dev/null && \
Zbigniew Jędrzejewski-Szmek 390551
  ! test -L /etc/resolv.conf 2>/dev/null && \
Zbigniew Jędrzejewski-Szmek 96b789
  ! mountpoint /etc/resolv.conf &>/dev/null && \
Zbigniew Jędrzejewski-Szmek c8f86d
  grep -q 'Generated by NetworkManager' /etc/resolv.conf 2>/dev/null && \
Zbigniew Jędrzejewski-Szmek c8f86d
  echo -e '/etc/resolv.conf was generated by NetworkManager.\nRemoving it to let systemd-resolved manage this file.' && \
Zbigniew Jędrzejewski-Szmek d5c124
  mv -v /etc/resolv.conf /etc/resolv.conf.orig-with-nm && \
Zbigniew Jędrzejewski-Szmek d5c124
  ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf 2>/dev/null || :
Zbigniew Jędrzejewski-Szmek c8f86d
Zbigniew Jędrzejewski-Szmek c8f86d
  systemctl start systemd-resolved.service &>/dev/null || :
Zbigniew Jędrzejewski-Szmek a5acce
fi
Zbigniew Jędrzejewski-Szmek a5acce
Zbigniew Jędrzejewski-Szmek 025758
%triggerpostun -- systemd < 247.3-2
Zbigniew Jędrzejewski-Szmek 025758
# This is for upgrades from previous versions before oomd-defaults is available.
Zbigniew Jędrzejewski-Szmek 025758
# We use %%triggerpostun here because rpm doesn't allow a second %%triggerun with
Zbigniew Jędrzejewski-Szmek 025758
# a different package version.
Michel Alexandre Salim 9a909c
systemctl --no-reload preset systemd-oomd.service &>/dev/null || :
Michel Alexandre Salim 9a909c
Zbigniew Jędrzejewski-Szmek 3c872d
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-timesyncd.service %{?have_gnu_efi:systemd-boot-update.service}
Zbigniew Jędrzejewski-Szmek b7ec95
Zbigniew Jędrzejewski-Szmek c16b57
%post udev
Zbigniew Jędrzejewski-Szmek b7ec95
# Move old stuff around in /var/lib
Zbigniew Jędrzejewski-Szmek b7ec95
mv %{_localstatedir}/lib/random-seed %{_localstatedir}/lib/systemd/random-seed &>/dev/null
Zbigniew Jędrzejewski-Szmek b7ec95
mv %{_localstatedir}/lib/backlight %{_localstatedir}/lib/systemd/backlight &>/dev/null
Yu Watanabe d644e8
if [ -L %{_localstatedir}/lib/systemd/timesync ]; then
Yu Watanabe d644e8
    rm %{_localstatedir}/lib/systemd/timesync
Yu Watanabe d644e8
    mv %{_localstatedir}/lib/private/systemd/timesync %{_localstatedir}/lib/systemd/timesync
Yu Watanabe d644e8
fi
Yu Watanabe d644e8
if [ -f %{_localstatedir}/lib/systemd/clock ] ; then
Yu Watanabe d644e8
    mkdir -p %{_localstatedir}/lib/systemd/timesync
Yu Watanabe d644e8
    mv %{_localstatedir}/lib/systemd/clock %{_localstatedir}/lib/systemd/timesync/.
Yu Watanabe d644e8
fi
Zbigniew Jędrzejewski-Szmek b7ec95
Zbigniew Jędrzejewski-Szmek b810fa
udevadm hwdb --update &>/dev/null
Zbigniew Jędrzejewski-Szmek 764adb
Zbigniew Jędrzejewski-Szmek b7ec95
%systemd_post %udev_services
Zbigniew Jędrzejewski-Szmek 764adb
Zbigniew Jędrzejewski-Szmek 764adb
# Try to save the random seed, but don't complain if /dev/urandom is unavailable
Zbigniew Jędrzejewski-Szmek 764adb
/usr/lib/systemd/systemd-random-seed save 2>&1 | \
Zbigniew Jędrzejewski-Szmek 764adb
    grep -v 'Failed to open /dev/urandom' || :
Zbigniew Jędrzejewski-Szmek b7ec95
Zbigniew Jędrzejewski-Szmek b7ec95
# Replace obsolete keymaps
Zbigniew Jędrzejewski-Szmek b7ec95
# https://bugzilla.redhat.com/show_bug.cgi?id=1151958
Zbigniew Jędrzejewski-Szmek b7ec95
grep -q -E '^KEYMAP="?fi-latin[19]"?' /etc/vconsole.conf 2>/dev/null &&
Zbigniew Jędrzejewski-Szmek fb4de3
    sed -i.rpm.bak -r 's/^KEYMAP="?fi-latin[19]"?/KEYMAP="fi"/' /etc/vconsole.conf || :
Zbigniew Jędrzejewski-Szmek c16b57
Zbigniew Jędrzejewski-Szmek c16b57
%preun udev
Zbigniew Jędrzejewski-Szmek b7ec95
%systemd_preun %udev_services
Zbigniew Jędrzejewski-Szmek c16b57
Zbigniew Jędrzejewski-Szmek c16b57
%postun udev
Zbigniew Jędrzejewski-Szmek c4675f
# Restart some services.
Zbigniew Jędrzejewski-Szmek 839cce
# Others are either oneshot services, or sockets, and restarting them causes issues (#1378974)
Zbigniew Jędrzejewski-Szmek c4675f
%systemd_postun_with_restart systemd-udevd.service systemd-timesyncd.service
Zbigniew Jędrzejewski-Szmek c16b57
Michal Schmidt 54952b
Zbigniew Jędrzejewski-Szmek a49146
%global journal_remote_units_restart systemd-journal-gatewayd.service systemd-journal-remote.service systemd-journal-upload.service
Zbigniew Jędrzejewski-Szmek a49146
%global journal_remote_units_norestart systemd-journal-gatewayd.socket systemd-journal-remote.socket
Zbigniew Jędrzejewski-Szmek b321c5
%post journal-remote
Zbigniew Jędrzejewski-Szmek a49146
%systemd_post %journal_remote_units_restart %journal_remote_units_norestart
Zbigniew Jędrzejewski-Szmek b53cf7
%firewalld_reload
Michal Schmidt 54952b
Zbigniew Jędrzejewski-Szmek b321c5
%preun journal-remote
Zbigniew Jędrzejewski-Szmek a49146
%systemd_preun %journal_remote_units_restart %journal_remote_units_norestart
Yu Watanabe f59138
if [ $1 -eq 1 ] ; then
Yu Watanabe f59138
    if [ -f %{_localstatedir}/lib/systemd/journal-upload/state -a ! -L %{_localstatedir}/lib/systemd/journal-upload ] ; then
Yu Watanabe f59138
        mkdir -p %{_localstatedir}/lib/private/systemd/journal-upload
Yu Watanabe f59138
        mv %{_localstatedir}/lib/systemd/journal-upload/state %{_localstatedir}/lib/private/systemd/journal-upload/.
Yu Watanabe e0aa12
        rmdir %{_localstatedir}/lib/systemd/journal-upload || :
Yu Watanabe f59138
    fi
Yu Watanabe f59138
fi
Michal Schmidt 54952b
Zbigniew Jędrzejewski-Szmek b321c5
%postun journal-remote
Zbigniew Jędrzejewski-Szmek a49146
%systemd_postun_with_restart %journal_remote_units_restart
Zbigniew Jędrzejewski-Szmek b53cf7
%firewalld_reload
Michal Schmidt 54952b
Zbigniew Jędrzejewski-Szmek b6a836
%post networkd
Zbigniew Jędrzejewski-Szmek d6a160
# systemd-networkd was split out in systemd-246.6-2.
Zbigniew Jędrzejewski-Szmek d6a160
# Ideally, we would have a trigger scriptlet to record enablement
Zbigniew Jędrzejewski-Szmek d6a160
# state when upgrading from systemd <= systemd-246.6-1. But, AFAICS,
Zbigniew Jędrzejewski-Szmek d6a160
# rpm doesn't allow us to trigger on another package, short of
Zbigniew Jędrzejewski-Szmek d6a160
# querying the rpm database ourselves, which seems risky. For rpm,
Zbigniew Jędrzejewski-Szmek d6a160
# systemd and systemd-networkd are completely unrelated.  So let's use
Zbigniew Jędrzejewski-Szmek d6a160
# a hack to detect if an old systemd version is currently present in
Zbigniew Jędrzejewski-Szmek d6a160
# the file system.
Zbigniew Jędrzejewski-Szmek d6a160
# https://bugzilla.redhat.com/show_bug.cgi?id=1943263
Zbigniew Jędrzejewski-Szmek d6a160
if [ $1 -eq 1 ] && ls /usr/lib/systemd/libsystemd-shared-24[0-6].so &>/dev/null; then
Zbigniew Jędrzejewski-Szmek d6a160
    echo "Skipping presets for systemd-networkd.service, seems we are upgrading from old systemd."
Zbigniew Jędrzejewski-Szmek d6a160
else
Zbigniew Jędrzejewski-Szmek d6a160
    %systemd_post systemd-networkd.service systemd-networkd-wait-online.service
Zbigniew Jędrzejewski-Szmek d6a160
fi
Zbigniew Jędrzejewski-Szmek b6a836
f455b2
%preun networkd
Zbigniew Jędrzejewski-Szmek b6a836
%systemd_preun systemd-networkd.service systemd-networkd-wait-online.service
f455b2
be0f56
%preun resolved
be0f56
if [ $1 -eq 0 ] ; then
be0f56
        systemctl disable --quiet \
be0f56
                systemd-resolved.service \
be0f56
                >/dev/null || :
Zbigniew Jędrzejewski-Szmek 7f4e19
        if [ -L /etc/resolv.conf ] && \
Zbigniew Jędrzejewski-Szmek 7f4e19
            realpath /etc/resolv.conf | grep ^/run/systemd/resolve/; then
Zbigniew Jędrzejewski-Szmek 7f4e19
                rm -f /etc/resolv.conf # no longer useful
27cc5e
                # if network manager is enabled, move to it instead
27cc5e
                [ -f /run/NetworkManager/resolv.conf ] && \
27cc5e
                systemctl -q is-enabled NetworkManager.service &>/dev/null && \
Zbigniew Jędrzejewski-Szmek 7f4e19
                    ln -fsv ../run/NetworkManager/resolv.conf /etc/resolv.conf
27cc5e
        fi
be0f56
fi
be0f56
be0f56
%post resolved
Zbigniew Jędrzejewski-Szmek 4047e4
[ $1 -eq 1 ] || exit 0
Zbigniew Jędrzejewski-Szmek 4047e4
# Initial installation
Zbigniew Jędrzejewski-Szmek b764a2
Zbigniew Jędrzejewski-Szmek bab6df
touch %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation
Zbigniew Jędrzejewski-Szmek bab6df
be0f56
# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263
Zbigniew Jędrzejewski-Szmek b764a2
if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then
be0f56
    echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd."
Zbigniew Jędrzejewski-Szmek b764a2
    exit 0
be0f56
fi
Zbigniew Jędrzejewski-Szmek b764a2
Zbigniew Jędrzejewski-Szmek b764a2
%systemd_post systemd-resolved.service
Zbigniew Jędrzejewski-Szmek b764a2
Zbigniew Jędrzejewski-Szmek 4cc75b
%posttrans resolved
Zbigniew Jędrzejewski-Szmek bab6df
[ -e %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation ] || exit 0
Zbigniew Jędrzejewski-Szmek bab6df
rm %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation
Zbigniew Jędrzejewski-Szmek 4047e4
# Initial installation
Zbigniew Jędrzejewski-Szmek 4047e4
be0f56
# Create /etc/resolv.conf symlink.
Zbigniew Jędrzejewski-Szmek bab6df
# (https://bugzilla.redhat.com/show_bug.cgi?id=1873856)
Zbigniew Jędrzejewski-Szmek bab6df
#
Zbigniew Jędrzejewski-Szmek bab6df
# We would also create it using tmpfiles, but let's do this here too
Zbigniew Jędrzejewski-Szmek bab6df
# before NetworkManager gets a chance. (systemd-tmpfiles invocation
Zbigniew Jędrzejewski-Szmek bab6df
# above does not do this, because the line is marked with ! and
Zbigniew Jędrzejewski-Szmek bab6df
# tmpfiles is invoked without --boot in the scriptlet.)
be0f56
#
Zbigniew Jędrzejewski-Szmek 7f4e19
# *Create* the symlink if nothing is present yet.
Zbigniew Jędrzejewski-Szmek 7f4e19
# (https://bugzilla.redhat.com/show_bug.cgi?id=2032085)
Zbigniew Jędrzejewski-Szmek 7f4e19
#
Zbigniew Jędrzejewski-Szmek 7f4e19
# *Override* the symlink if systemd is running. Don't do it if systemd
Zbigniew Jędrzejewski-Szmek 7f4e19
# is not running, because that will immediately break DNS resolution,
Zbigniew Jędrzejewski-Szmek 7f4e19
# since systemd-resolved is also not running
Zbigniew Jędrzejewski-Szmek 7f4e19
# (https://bugzilla.redhat.com/show_bug.cgi?id=1891847).
be0f56
#
be0f56
# Also don't create the symlink to the stub when the stub is disabled (#1891847 again).
Zbigniew Jędrzejewski-Szmek 7f4e19
if systemctl -q is-enabled systemd-resolved.service &>/dev/null &&
Zbigniew Jędrzejewski-Szmek 7f4e19
   ! systemd-analyze cat-config systemd/resolved.conf 2>/dev/null |
Zbigniew Jędrzejewski-Szmek 7f4e19
        grep -iqE '^DNSStubListener\s*=\s*(no?|false|0|off)\s*$'; then
Zbigniew Jędrzejewski-Szmek 7f4e19
Zbigniew Jędrzejewski-Szmek 5e7fc4
  if ! test -e /etc/resolv.conf && ! test -L /etc/resolv.conf; then
Zbigniew Jędrzejewski-Szmek 5e7fc4
    ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || :
Zbigniew Jędrzejewski-Szmek 7f4e19
  elif test -d /run/systemd/system/ &&
Zbigniew Jędrzejewski-Szmek 7f4e19
     ! mountpoint /etc/resolv.conf &>/dev/null; then
Zbigniew Jędrzejewski-Szmek 5e7fc4
    ln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || :
Zbigniew Jędrzejewski-Szmek 7f4e19
  fi
be0f56
fi
be0f56
Zbigniew Jędrzejewski-Szmek 994aac
%global _docdir_fmt %{name}
Zbigniew Jędrzejewski-Szmek 994aac
Zbigniew Jędrzejewski-Szmek 0078f9
%files -f %{name}.lang -f .file-list-main
Zbigniew Jędrzejewski-Szmek c90404
%doc %{_pkgdocdir}
Zbigniew Jędrzejewski-Szmek 620e0c
%exclude %{_pkgdocdir}/LICENSE*
Zbigniew Jędrzejewski-Szmek 620e0c
# Only the licenses texts for the licenses in License line are included.
Lennart Poettering 836567
%license LICENSE.GPL2 LICENSE.LGPL2.1
Zbigniew Jędrzejewski-Szmek 620e0c
%license LICENSES/MIT.txt
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/basic.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/bluetooth.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/default.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/getty.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/graphical.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/local-fs.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/machines.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/multi-user.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/network-online.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/printer.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/remote-fs.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/sockets.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/sysinit.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/system-update.target.wants
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /etc/systemd/system/timers.target.wants
Zbigniew Jędrzejewski-Szmek d1ad6b
%ghost %dir %attr(0700,-,-) /var/lib/portables
Zbigniew Jędrzejewski-Szmek d13ecf
%ghost %dir %attr(0755,-,-) /var/lib/rpm-state/systemd
Zbigniew Jędrzejewski-Szmek 17a6f3
Zbigniew Jędrzejewski-Szmek 17a6f3
%files libs -f .file-list-libs
Zbigniew Jędrzejewski-Szmek 994aac
%license LICENSE.LGPL2.1
Zbigniew Jędrzejewski-Szmek a547c7
Zbigniew Jędrzejewski-Szmek 17a6f3
%files pam -f .file-list-pam
Zbigniew Jędrzejewski-Szmek 17a6f3
Zbigniew Jędrzejewski-Szmek c9030f
%files rpm-macros -f .file-list-rpm-macros
Zbigniew Jędrzejewski-Szmek c9030f
be0f56
%files resolved -f .file-list-resolve
be0f56
Zbigniew Jędrzejewski-Szmek 17a6f3
%files devel -f .file-list-devel
Zbigniew Jędrzejewski-Szmek 17a6f3
Zbigniew Jędrzejewski-Szmek 17a6f3
%files udev -f .file-list-udev
Zbigniew Jędrzejewski-Szmek c16b57
Zbigniew Jędrzejewski-Szmek 17a6f3
%files container -f .file-list-container
Zbigniew Jędrzejewski-Szmek d1ad6b
%ghost %dir %attr(0700,-,-) /var/lib/machines
Harald Hoyer 7f4276
Zbigniew Jędrzejewski-Szmek 17a6f3
%files journal-remote -f .file-list-remote
Michal Schmidt 54952b
f455b2
%files networkd -f .file-list-networkd
f455b2
834f04
%files oomd-defaults -f .file-list-oomd-defaults
834f04
Zbigniew Jędrzejewski-Szmek 17a6f3
%files tests -f .file-list-tests
Zbigniew Jędrzejewski-Szmek bb4127
b50e9d
%files standalone-tmpfiles -f .file-list-standalone-tmpfiles
b50e9d
b50e9d
%files standalone-sysusers -f .file-list-standalone-sysusers
b50e9d
Rahul Sundaram 7a392d
%changelog
Zbigniew Jędrzejewski-Szmek 99fbfc
%autochangelog