teknoraver / rpms / systemd

Forked from rpms/systemd 2 months ago
Clone

Blame systemd.spec

Zbigniew Jędrzejewski-Szmek b64db8
#global commit 1781de18ab8ebc3e42a607851d8effb3b0355c87
Zbigniew Jędrzejewski-Szmek 6a3bb3
%{?commit:%global shortcommit %(c=%{commit}; echo ${c:0:7})}
Lennart Poettering 5db028
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 58b044
%bcond bzip2     1
Zbigniew Jędrzejewski-Szmek 58b044
%bcond gnutls    1
Zbigniew Jędrzejewski-Szmek 58b044
%bcond lz4       1
Zbigniew Jędrzejewski-Szmek 58b044
%bcond xz        1
Zbigniew Jędrzejewski-Szmek 58b044
%bcond zlib      1
Zbigniew Jędrzejewski-Szmek 58b044
%bcond zstd      1
Stewart Smith 379f9b
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.
Stewart Smith 5c840a
%bcond bootstrap 0
Stewart Smith 5c840a
%bcond tests     1
Stewart Smith 5c840a
%bcond lto       1
Zbigniew Jędrzejewski-Szmek 976e1b
%bcond docs      1
Zbigniew Jędrzejewski-Szmek 933c03
a95f14
# Build from git main
Zbigniew Jędrzejewski-Szmek 58b044
%bcond upstream  0
Zbigniew Jędrzejewski-Szmek 05f788
U2FsdGVkX1 ebf352
# When bootstrap, libcryptsetup is disabled
U2FsdGVkX1 ebf352
# but auto-features causes many options to be turned on
U2FsdGVkX1 ebf352
# that depend on libcryptsetup (e.g. libcryptsetup-plugins, homed)
U2FsdGVkX1 ebf352
%if %{with bootstrap}
U2FsdGVkX1 ebf352
%global __meson_auto_features disabled
U2FsdGVkX1 ebf352
%endif
U2FsdGVkX1 ebf352
Zbigniew Jędrzejewski-Szmek 74810c
# Override %%autorelease. This is ugly, but rpmautospec doesn't implement
Zbigniew Jędrzejewski-Szmek 74810c
# autorelease correctly if the macro is conditionalized in the Release field.
Zbigniew Jędrzejewski-Szmek 74810c
%{?release_override:%global autorelease %{release_override}%{?dist}}
Zbigniew Jędrzejewski-Szmek 491a9e
Lennart Poettering cc49ef
Name:           systemd
Zbigniew Jędrzejewski-Szmek 54a3b6
Url:            https://systemd.io
0a51fe
# Allow users to specify the version and release when building the rpm by 
0a51fe
# setting the %%version_override and %%release_override macros.
Zbigniew Jędrzejewski-Szmek d38cac
Version:        %{?version_override}%{!?version_override:256.5}
Zbigniew Jędrzejewski-Szmek 74810c
Release:        %autorelease
Zbigniew Jędrzejewski-Szmek 05f788
Zbigniew Jędrzejewski-Szmek 68db5d
%global stable %(c="%version"; [ "$c" = "${c#*.*}" ]; echo $?)
Zbigniew Jędrzejewski-Szmek 68db5d
Michal Schmidt 720afe
# For a breakdown of the licensing, see README
Zbigniew Jędrzejewski-Szmek 0dfb1a
License:        LGPL-2.1-or-later AND MIT AND GPL-2.0-or-later
Zbigniew Jędrzejewski-Szmek 1478fa
Summary:        System and Service Manager
Michal Schmidt 77289e
Kay Sievers 5bd459
# download tarballs with "spectool -g systemd.spec"
608445
%if %{defined branch}
608445
Source0:        https://github.com/systemd/systemd/archive/refs/heads/%{branch}.tar.gz
608445
%elif %{defined commit}
Zbigniew Jędrzejewski-Szmek 4a29ab
Source0:        https://github.com/systemd/systemd/archive/%{commit}/%{name}-%{shortcommit}.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 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 c56891
Source4:        test_sysusers_defined.py
Zbigniew Jędrzejewski-Szmek 0a8e7e
Michal Schmidt 77289e
# Prevent accidental removal of the systemd package
Zbigniew Jędrzejewski-Szmek 694729
Source5:        yum-protect-systemd.conf
Zbigniew Jędrzejewski-Szmek 694729
Zbigniew Jędrzejewski-Szmek 694729
Source6:        inittab
Zbigniew Jędrzejewski-Szmek 694729
Source7:        sysctl.conf.README
Zbigniew Jędrzejewski-Szmek 694729
Source8:        systemd-journal-remote.xml
Zbigniew Jędrzejewski-Szmek 694729
Source9:        systemd-journal-gatewayd.xml
Zbigniew Jędrzejewski-Szmek 694729
Source10:       20-yama-ptrace.conf
Zbigniew Jędrzejewski-Szmek 694729
Source11:       systemd-udev-trigger-no-reload.conf
Zbigniew Jędrzejewski-Szmek 3f4143
# https://fedoraproject.org/wiki/How_to_filter_libabigail_reports
Zbigniew Jędrzejewski-Szmek 3f4143
Source13:       .abignore
Michal Schmidt 77289e
834f04
Source14:       10-oomd-defaults.conf
7665e1
Source15:       10-oomd-per-slice-defaults.conf
Zbigniew Jędrzejewski-Szmek 55ee78
Source16:       10-timeout-abort.conf
Alessandro Astone aedd54
Source17:       10-map-count.conf
00babc
Source18:       60-block-scheduler.rules
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
Thomas Haller aff167
Source25:       98-default-mac-none.link
Thomas Haller aff167
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
Zbigniew Jędrzejewski-Szmek 79828f
%if 0%{?fedora} < 40 && 0%{?rhel} < 10
Zbigniew Jędrzejewski-Szmek 8fe1f0
# Work-around for dracut issue: run generators directly when we are in initrd
Zbigniew Jędrzejewski-Szmek 8fe1f0
# https://bugzilla.redhat.com/show_bug.cgi?id=2164404
Zbigniew Jędrzejewski-Szmek 8fe1f0
# Drop when dracut-060 is available.
Zbigniew Jędrzejewski-Szmek a94605
Patch0010:      https://github.com/systemd/systemd/pull/26494.patch
Zbigniew Jędrzejewski-Szmek 8fe1f0
%endif
Zbigniew Jędrzejewski-Szmek 8fe1f0
Zbigniew Jędrzejewski-Szmek 8d080f
# Requested in https://bugzilla.redhat.com/show_bug.cgi?id=2298422
Zbigniew Jędrzejewski-Szmek 8d080f
Patch0011:      https://github.com/systemd/systemd/pull/33738.patch
Zbigniew Jędrzejewski-Szmek 8d080f
Zbigniew Jędrzejewski-Szmek 98759c
# Those are downstream-only patches, but we don't want them in packit builds:
Zbigniew Jędrzejewski-Szmek 7ec963
# https://bugzilla.redhat.com/show_bug.cgi?id=2251843
Zbigniew Jędrzejewski-Szmek 7ec963
Patch0491:      https://github.com/systemd/systemd/pull/30846.patch
Zbigniew Jędrzejewski-Szmek bca98c
Zbigniew Jędrzejewski-Szmek b3e1d5
# Soft-disable tmpfiles --purge until a good use case comes up.
Zbigniew Jędrzejewski-Szmek b3e1d5
Patch0492:      0001-tmpfiles-make-purge-hard-to-mis-use.patch
104532
Zbigniew Jędrzejewski-Szmek 2a3fc2
# Adjust upstream config to use our shared stack
Zbigniew Jędrzejewski-Szmek 7ec963
Patch0499:      fedora-use-system-auth-in-pam-systemd-user.patch
Zbigniew Jędrzejewski-Szmek 2a3fc2
David Abdurachmanov ac2364
%ifarch %{ix86} x86_64 aarch64 riscv64
Zbigniew Jędrzejewski-Szmek e8cc28
%global want_bootloader 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
f9fe17
BuildRequires:  rpmdevtools
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
b375f9
BuildRequires:  util-linux
Björn Esser b5c68a
# /usr/bin/getfacl is needed by test-acl-util
b375f9
BuildRequires:  acl
Lennart Poettering 5c28c3
BuildRequires:  libacl-devel
Kay Sievers 9ac884
BuildRequires:  gobject-introspection-devel
Kay Sievers 9ac884
BuildRequires:  libblkid-devel
Stewart Smith 379f9b
%if %{with xz}
Lennart Poettering 29f5e6
BuildRequires:  xz-devel
Zbigniew Jędrzejewski-Szmek ee5379
BuildRequires:  xz
Stewart Smith 379f9b
%endif
Stewart Smith 379f9b
%if %{with lz4}
Zbigniew Jędrzejewski-Szmek 56be25
BuildRequires:  lz4-devel
Zbigniew Jędrzejewski-Szmek ee5379
BuildRequires:  lz4
Stewart Smith 379f9b
%endif
Stewart Smith 379f9b
%if %{with bzip2}
Zbigniew Jędrzejewski-Szmek 56be25
BuildRequires:  bzip2-devel
Stewart Smith 379f9b
%endif
Stewart Smith 379f9b
%if %{with zstd}
Zbigniew Jędrzejewski-Szmek c43292
BuildRequires:  libzstd-devel
Stewart Smith 379f9b
%endif
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
Yaakov Selkowitz c96f54
%if 0%{?fedora} >= 41 || 0%{?rhel} >= 11
Zbigniew Jędrzejewski-Szmek 9cbad9
BuildRequires:  openssl-devel-engine
Zbigniew Jędrzejewski-Szmek 9cbad9
%endif
Stewart Smith 379f9b
%if %{with gnutls}
Zbigniew Jędrzejewski-Szmek cfcb35
BuildRequires:  gnutls-devel
Stewart Smith 379f9b
%endif
Zbigniew Jędrzejewski-Szmek 79828f
%if 0%{?fedora}
Lennart Poettering 38a7fb
BuildRequires:  qrencode-devel
Yaakov Selkowitz 4980b3
%endif
Lennart Poettering 09c908
BuildRequires:  libmicrohttpd-devel
Zbigniew Jędrzejewski-Szmek 572497
BuildRequires:  libxkbcommon-devel
Lennart Poettering 258b2a
BuildRequires:  iptables-devel
Zbigniew Jędrzejewski-Szmek c29942
BuildRequires:  pkgconfig(bash-completion)
Zbigniew Jędrzejewski-Szmek c29942
BuildRequires:  pkgconfig(libarchive)
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
Zbigniew Jędrzejewski-Szmek 976e1b
%if %{with docs}
Lennart Poettering 38a7fb
BuildRequires:  libxslt
Lennart Poettering 38a7fb
BuildRequires:  docbook-style-xsl
Zbigniew Jędrzejewski-Szmek 976e1b
%endif
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
67561d
BuildRequires:  python3
Zbigniew Jędrzejewski-Szmek 903ce8
BuildRequires:  python3-devel
Zbigniew Jędrzejewski-Szmek ec9ca0
BuildRequires:  python3dist(jinja2)
Zbigniew Jędrzejewski-Szmek 903ce8
BuildRequires:  python3dist(lxml)
Zbigniew Jędrzejewski-Szmek 903ce8
BuildRequires:  python3dist(pefile)
Zbigniew Jędrzejewski-Szmek 79828f
%if 0%{?fedora}
Zbigniew Jędrzejewski-Szmek 903ce8
BuildRequires:  python3dist(pillow)
Zbigniew Jędrzejewski-Szmek 1fa992
BuildRequires:  python3dist(pytest-flakes)
Yaakov Selkowitz 5982ae
%endif
Yaakov Selkowitz 5982ae
BuildRequires:  python3dist(pytest)
Zbigniew Jędrzejewski-Szmek e8cc28
%if 0%{?want_bootloader}
Zbigniew Jędrzejewski-Szmek e8cc28
BuildRequires:  python3dist(pyelftools)
Zbigniew Jędrzejewski-Szmek e8cc28
%endif
Zbigniew Jędrzejewski-Szmek 903ce8
# gzip and lzma are provided by the stdlib
Zbigniew Jędrzejewski-Szmek b53cf7
BuildRequires:  firewalld-filesystem
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 e3e947
%ifarch %{valgrind_arches}
Zbigniew Jędrzejewski-Szmek 47d443
BuildRequires:  valgrind-devel
Zbigniew Jędrzejewski-Szmek e3e947
%endif
c5d3af
%if %{defined rhel} && 0%{?rhel} < 10
c5d3af
BuildRequires: rsync
c5d3af
%endif
a95f14
b02240
%ifnarch %ix86
b02240
# bpftool is not built for i368
b02240
BuildRequires:  bpftool
f9fe17
BuildRequires:  kernel-devel
b02240
%global have_bpf 1
b02240
%endif
b02240
Yaakov Selkowitz 3c935d
%if 0%{?fedora}
Zbigniew Jędrzejewski-Szmek b3fa87
%ifarch x86_64 aarch64
Yu Watanabe 49575f
%global have_xen 1
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
Yaakov Selkowitz 3c935d
%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 14701a
Requires:       %{name}-pam%{_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek c971c5
Requires(meta): (%{name}-rpm-macros = %{version}-%{release} if rpm-build)
Zbigniew Jędrzejewski-Szmek 14701a
Requires:       %{name}-libs%{_isa} = %{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)
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 c56891
%if 0%{?fedora} >= 41
Zbigniew Jędrzejewski-Szmek c56891
BuildRequires:  setup >= 2.15.0-3
Zbigniew Jędrzejewski-Szmek c56891
BuildRequires:  python3
Zbigniew Jędrzejewski-Szmek c56891
Conflicts:      setup < 2.15.0-3
980ede
Conflicts:      selinux-policy-any < 41.3
Zbigniew Jędrzejewski-Szmek c56891
%endif
Zbigniew Jędrzejewski-Szmek 8fe1f0
7db154
%if 0%{?fedora} >= 41 || 0%{?rhel} >= 10
Zbigniew Jędrzejewski-Szmek 9ebc19
# Make sure that dracut supports systemd-executor and the renames done for v255,
Zbigniew Jędrzejewski-Szmek 9ebc19
# and dlopen libraries and read-only fs in initrd.
Zbigniew Jędrzejewski-Szmek 9ebc19
Conflicts:      dracut < 060-2
3f68c5
%elif 0%{?fedora} || %{without upstream}
Zbigniew Jędrzejewski-Szmek 8fe1f0
# Make sure that dracut supports systemd-executor and the renames done for v255.
Zbigniew Jędrzejewski-Szmek 8fe1f0
Conflicts:      dracut < 059-16
Zbigniew Jędrzejewski-Szmek 8fe1f0
%endif
Zbigniew Jędrzejewski-Szmek 10915a
Zbigniew Jędrzejewski-Szmek 86b177
Obsoletes:      timedatex < 0.6-3
Zbigniew Jędrzejewski-Szmek a76023
Provides:       timedatex = 0.6-3
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:      %{name}-standalone-tmpfiles
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:       %{name}-tmpfiles = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:      %{name}-standalone-sysusers
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:       %{name}-sysusers = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:      %{name}-standalone-shutdown
Zbigniew Jędrzejewski-Szmek 5448e2
Provides:       %{name}-shutdown = %{version}-%{release}
Lennart Poettering cc49ef
Zbigniew Jędrzejewski-Szmek a37923
%if "%{_sbindir}" == "%{_bindir}"
Zbigniew Jędrzejewski-Szmek a37923
# Compat symlinks for Requires in other packages.
Zbigniew Jędrzejewski-Szmek a37923
# We rely on filesystem to create the symlinks for us.
Zbigniew Jędrzejewski-Szmek a37923
Requires:       filesystem(unmerged-sbin-symlinks)
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/halt
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/init
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/poweroff
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/reboot
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/runlevel
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/shutdown
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/telinit
Zbigniew Jędrzejewski-Szmek a37923
%endif
Zbigniew Jędrzejewski-Szmek a37923
Zbigniew Jędrzejewski-Szmek 550422
# Recommends to replace normal Requires deps for stuff that is dlopen()ed
Zbigniew Jędrzejewski-Szmek a3524f
Recommends:     libxkbcommon.so.0%{?elf_suffix}
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}
Zbigniew Jędrzejewski-Szmek 79828f
%if 0%{?fedora}
David Tardon b5ae70
Recommends:     libqrencode.so.4%{?elf_suffix}
Yaakov Selkowitz 4980b3
%endif
6775af
Recommends:     libbpf.so.1%{?elf_suffix}
6775af
Recommends:     libbpf.so.1(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
Zbigniew Jędrzejewski-Szmek 7740ae
# Libkmod is used to load modules.
Zbigniew Jędrzejewski-Szmek 7740ae
Recommends:     libkmod.so.2%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek 7740ae
# kmod_list_next, kmod_load_resources, kmod_module_get_initstate,
Zbigniew Jędrzejewski-Szmek 7740ae
# kmod_module_get_module, kmod_module_get_name, kmod_module_new_from_lookup,
Zbigniew Jędrzejewski-Szmek 7740ae
# kmod_module_probe_insert_module, kmod_module_unref, kmod_module_unref_list,
Zbigniew Jędrzejewski-Szmek 7740ae
# kmod_new, kmod_set_log_fn, kmod_unref, kmod_validate_resources
Zbigniew Jędrzejewski-Szmek 7740ae
# are part of LIBKMOD_5.
Zbigniew Jędrzejewski-Szmek 7740ae
Recommends:     libkmod.so.2(LIBKMOD_5)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek 7740ae
a95f14
Recommends:     libarchive.so.13%{?elf_suffix}
a95f14
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 68db5d
This package was built from the %(c=%version; echo "v${c%.*}-stable") branch of systemd.
Zbigniew Jędrzejewski-Szmek b9896d
%endif
Lennart Poettering cc49ef
Michal Schmidt 998394
%package libs
Michal Schmidt 998394
Summary:        systemd libraries
Zbigniew Jędrzejewski-Szmek 0dfb1a
License:        LGPL-2.1-or-later 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
Zbigniew Jędrzejewski-Szmek 0dfb1a
License:        LGPL-2.1-or-later AND MIT
Zbigniew Jędrzejewski-Szmek 732bdc
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 eb6fe3
License:        LGPL-2.1-or-later
Zbigniew Jędrzejewski-Szmek 805327
Zbigniew Jędrzejewski-Szmek 732bdc
Requires:       systemd%{_isa} = %{version}-%{release}
David Tardon 2e32a3
Requires(post):   systemd%{_isa} = %{version}-%{release}
David Tardon 2e32a3
Requires(preun):  systemd%{_isa} = %{version}-%{release}
David Tardon 2e32a3
Requires(postun): systemd%{_isa} = %{version}-%{release}
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
a9807c
%if 0%{?fedora} || 0%{?rhel} >= 10
Zbigniew Jędrzejewski-Szmek 9a522c
Requires:       (grubby > 8.40-72 if grubby)
Zbigniew Jędrzejewski-Szmek 9a522c
Requires:       (sdubby > 1.0-3 if sdubby)
a9807c
%endif
9378a0
# A backport of systemd-timesyncd is shipped as a separate package in EPEL so
9378a0
# let's make sure we properly handle that.
9378a0
%if 0%{?rhel}
9378a0
Conflicts:      systemd-timesyncd < %{version}-%{release}
9378a0
Obsoletes:      systemd-timesyncd < %{version}-%{release}
9378a0
Provides:       systemd-timesyncd = %{version}-%{release}
9378a0
%endif
Zbigniew Jędrzejewski-Szmek ec562b
Zbigniew Jędrzejewski-Szmek 7740ae
# Libkmod is used to load modules. Assume that if we need udevd, we certainly
Zbigniew Jędrzejewski-Szmek 7740ae
# want to load modules, so make this into a hard dependency here.
Zbigniew Jędrzejewski-Szmek 7740ae
Requires:       libkmod.so.2%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek 7740ae
Requires:       libkmod.so.2(LIBKMOD_5)%{?elf_bits}
Zbigniew Jędrzejewski-Szmek 7740ae
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 58eb55
# used by home, cryptsetup, cryptenroll, logind
Zbigniew Jędrzejewski-Szmek b24b99
Recommends:     libfido2.so.1%{?elf_suffix}
Zbigniew Jędrzejewski-Szmek 58eb55
Recommends:     libp11-kit.so.0%{?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 54a3b6
# self-obsoletes to install both packages after split of systemd-boot
Zbigniew Jędrzejewski-Szmek 54a3b6
Obsoletes:      systemd-udev < 252.2^
Zbigniew Jędrzejewski-Szmek 54a3b6
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:      %{name}-standalone-repart
Zbigniew Jędrzejewski-Szmek 92ef78
Provides:       %{name}-repart = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 92ef78
Zbigniew Jędrzejewski-Szmek a37923
%if "%{_sbindir}" == "%{_bindir}"
Zbigniew Jędrzejewski-Szmek a37923
# Compat symlinks for Requires in other packages.
Zbigniew Jędrzejewski-Szmek a37923
# We rely on filesystem to create the symlinks for us.
Zbigniew Jędrzejewski-Szmek a37923
Requires:       filesystem(unmerged-sbin-symlinks)
Zbigniew Jędrzejewski-Szmek a37923
Provides:       /usr/sbin/udevadm
Zbigniew Jędrzejewski-Szmek a37923
%endif
Zbigniew Jędrzejewski-Szmek a37923
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 e8cc28
%if 0%{?want_bootloader}
Zbigniew Jędrzejewski-Szmek 903ce8
%package ukify
Zbigniew Jędrzejewski-Szmek 903ce8
Summary:        Tool to build Unified Kernel Images
Zbigniew Jędrzejewski-Szmek 903ce8
Requires:       %{name} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 58eb55
b9ec39
Requires:       systemd-boot
Zbigniew Jędrzejewski-Szmek 58eb55
Requires:       python3dist(pefile)
Zbigniew Jędrzejewski-Szmek 79828f
%if 0%{?fedora}
Zbigniew Jędrzejewski-Szmek 58eb55
Requires:       python3dist(zstd)
8ae009
%endif
46dc8f
Requires:       python3dist(cryptography)
28076e
%if 0%{?fedora}
Zbigniew Jędrzejewski-Szmek 58eb55
Recommends:     python3dist(pillow)
28076e
%endif
Zbigniew Jędrzejewski-Szmek 58eb55
Zbigniew Jędrzejewski-Szmek ec5f3a
# for tests
Zbigniew Jędrzejewski-Szmek ec5f3a
%ifarch riscv64
Zbigniew Jędrzejewski-Szmek ec5f3a
# 2.42 received support for riscv64 + efi targets
Zbigniew Jędrzejewski-Szmek ec5f3a
%global binutils_version_req >= 2.42
Zbigniew Jędrzejewski-Szmek ec5f3a
%endif
Zbigniew Jędrzejewski-Szmek ec5f3a
BuildRequires:  binutils %{?binutils_version_req}
Zbigniew Jędrzejewski-Szmek ec5f3a
Zbigniew Jędrzejewski-Szmek 903ce8
BuildArch:      noarch
Zbigniew Jędrzejewski-Szmek 903ce8
Zbigniew Jędrzejewski-Szmek 903ce8
%description ukify
Zbigniew Jędrzejewski-Szmek 903ce8
This package provides ukify, a script that combines a kernel image, an initrd,
Zbigniew Jędrzejewski-Szmek 903ce8
with a command line, and possibly PCR measurements and other metadata, into a
Zbigniew Jędrzejewski-Szmek 903ce8
Unified Kernel Image (UKI).
Zbigniew Jędrzejewski-Szmek 903ce8
Zbigniew Jędrzejewski-Szmek 54a3b6
%package boot-unsigned
Zbigniew Jędrzejewski-Szmek 54a3b6
Summary: UEFI boot manager (unsigned version)
Zbigniew Jędrzejewski-Szmek 54a3b6
Zbigniew Jędrzejewski-Szmek 54a3b6
Provides: systemd-boot-unsigned-%{efi_arch} = %version-%release
Zbigniew Jędrzejewski-Szmek 732bdc
Provides: systemd-boot = %version-%release
Zbigniew Jędrzejewski-Szmek 732bdc
Provides: systemd-boot%{_isa} = %version-%release
Zbigniew Jędrzejewski-Szmek 189f5d
# A provides with just the version, no release or dist, used to build systemd-boot
Zbigniew Jędrzejewski-Szmek 189f5d
Provides: version(systemd-boot-unsigned) = %version
Zbigniew Jędrzejewski-Szmek 189f5d
Provides: version(systemd-boot-unsigned)%{_isa} = %version
Zbigniew Jędrzejewski-Szmek 54a3b6
Zbigniew Jędrzejewski-Szmek 54a3b6
# self-obsoletes to install both packages after split of systemd-boot
Zbigniew Jędrzejewski-Szmek 54a3b6
Obsoletes:      systemd-udev < 252.2^
Zbigniew Jędrzejewski-Szmek 54a3b6
Zbigniew Jędrzejewski-Szmek 54a3b6
%description boot-unsigned
Zbigniew Jędrzejewski-Szmek 54a3b6
systemd-boot (short: sd-boot) is a simple UEFI boot manager. It provides a
Zbigniew Jędrzejewski-Szmek 54a3b6
graphical menu to select the entry to boot and an editor for the kernel command
Zbigniew Jędrzejewski-Szmek 54a3b6
line. systemd-boot supports systems with UEFI firmware only.
Zbigniew Jędrzejewski-Szmek 54a3b6
Zbigniew Jędrzejewski-Szmek 54a3b6
This package contains the unsigned version. Install systemd-boot instead to get
Zbigniew Jędrzejewski-Szmek 54a3b6
the version that works with Secure Boot.
Zbigniew Jędrzejewski-Szmek 778f8e
%endif
Zbigniew Jędrzejewski-Szmek 54a3b6
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 732bdc
Requires:       %{name}%{_isa} = %{version}-%{release}
David Tardon 2e32a3
Requires(post):   systemd%{_isa} = %{version}-%{release}
David Tardon 2e32a3
Requires(preun):  systemd%{_isa} = %{version}-%{release}
David Tardon 2e32a3
Requires(postun): systemd%{_isa} = %{version}-%{release}
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 eb6fe3
License:        LGPL-2.1-or-later
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 1c9810
This package contains systemd-nspawn, systemd-vmspawn, machinectl,
Zbigniew Jędrzejewski-Szmek 1c9810
systemd-machined, and 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 732bdc
Requires:       %{name}%{_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek eb6fe3
License:        LGPL-2.1-or-later
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
Zbigniew Jędrzejewski-Szmek 732bdc
Requires:       %{name}%{_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek 95a386
%{?fedora:Recommends:     %{name}-udev = %{version}-%{release}}
Zbigniew Jędrzejewski-Szmek eb6fe3
License:        LGPL-2.1-or-later
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
Zbigniew Jędrzejewski-Szmek f93a13
%package networkd-defaults
Zbigniew Jędrzejewski-Szmek f93a13
Summary:        Configure network interfaces with networkd by default
Zbigniew Jędrzejewski-Szmek f93a13
Requires:       %{name}-networkd = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek f93a13
License:        MIT-0
Zbigniew Jędrzejewski-Szmek f93a13
BuildArch:      noarch
Zbigniew Jędrzejewski-Szmek f93a13
Zbigniew Jędrzejewski-Szmek f93a13
%description networkd-defaults
Zbigniew Jędrzejewski-Szmek f93a13
This package contains a set of config files for systemd-networkd that cause it
Zbigniew Jędrzejewski-Szmek f93a13
to configure network interfaces by default. Note that systemd-networkd needs to
Zbigniew Jędrzejewski-Szmek f93a13
enabled for this to have any effect.
Zbigniew Jędrzejewski-Szmek f93a13
be0f56
%package resolved
be0f56
Summary:        Network Name Resolution manager
Zbigniew Jędrzejewski-Szmek 732bdc
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
Zbigniew Jędrzejewski-Szmek 5cae6a
Requires:       %{name}-udev = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek eb6fe3
License:        LGPL-2.1-or-later
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 732bdc
Requires:      %{name}%{_isa} = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek bd2499
# This dependency is provided transitively. Also add it explicitly to
Zbigniew Jędrzejewski-Szmek bd2499
# appease rpminspect, https://github.com/rpminspect/rpminspect/issues/1231:
Zbigniew Jędrzejewski-Szmek bd2499
Requires:      %{name}-libs%{_isa} = %{version}-%{release}
ae8a47
Requires:      python3dist(psutil)
Zbigniew Jędrzejewski-Szmek bd2499
Zbigniew Jędrzejewski-Szmek eb6fe3
License:       LGPL-2.1-or-later
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
Zbigniew Jędrzejewski-Szmek 903ce8
%package standalone-repart
Zbigniew Jędrzejewski-Szmek 903ce8
Summary:       Standalone systemd-repart binary for use on systems without systemd
d64ddb
Provides:      %{name}-repart = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:     %{name}-udev
Zbigniew Jędrzejewski-Szmek 3889da
Suggests:      coreutils-single
Zbigniew Jędrzejewski-Szmek 903ce8
RemovePathPostfixes: .standalone
Zbigniew Jędrzejewski-Szmek 903ce8
Zbigniew Jędrzejewski-Szmek 903ce8
%description standalone-repart
Zbigniew Jędrzejewski-Szmek 903ce8
Standalone systemd-repart binary with no dependencies on the systemd-shared library or
Zbigniew Jędrzejewski-Szmek 903ce8
other libraries from systemd-libs. This package conflicts with the main systemd
Zbigniew Jędrzejewski-Szmek 903ce8
package and is meant for use on systems without systemd.
Zbigniew Jędrzejewski-Szmek 903ce8
b50e9d
%package standalone-tmpfiles
Zbigniew Jędrzejewski-Szmek 903ce8
Summary:       Standalone systemd-tmpfiles binary for use on systems without systemd
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:      %{name}-tmpfiles = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:     %{name}
Zbigniew Jędrzejewski-Szmek 3889da
Suggests:      coreutils-single
b50e9d
RemovePathPostfixes: .standalone
b50e9d
b50e9d
%description standalone-tmpfiles
Zbigniew Jędrzejewski-Szmek 903ce8
Standalone systemd-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 903ce8
package and is meant for use on systems without systemd.
b50e9d
b50e9d
%package standalone-sysusers
Zbigniew Jędrzejewski-Szmek 903ce8
Summary:       Standalone systemd-sysusers binary for use on systems without systemd
Zbigniew Jędrzejewski-Szmek 27c0d4
Provides:      %{name}-sysusers = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:     %{name}
Zbigniew Jędrzejewski-Szmek 3889da
Suggests:      coreutils-single
b50e9d
RemovePathPostfixes: .standalone
b50e9d
b50e9d
%description standalone-sysusers
Zbigniew Jędrzejewski-Szmek 903ce8
Standalone systemd-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 903ce8
package and is meant for use on systems without systemd.
Zbigniew Jędrzejewski-Szmek 903ce8
Zbigniew Jędrzejewski-Szmek 903ce8
%package standalone-shutdown
Zbigniew Jędrzejewski-Szmek 903ce8
Summary:       Standalone systemd-shutdown binary for use on systems without systemd
d64ddb
Provides:      %{name}-shutdown = %{version}-%{release}
Zbigniew Jędrzejewski-Szmek b7800e
Conflicts:     %{name}
Zbigniew Jędrzejewski-Szmek 3889da
Suggests:      coreutils-single
Zbigniew Jędrzejewski-Szmek 903ce8
RemovePathPostfixes: .standalone
Zbigniew Jędrzejewski-Szmek 903ce8
Zbigniew Jędrzejewski-Szmek 903ce8
%description standalone-shutdown
Zbigniew Jędrzejewski-Szmek 903ce8
Standalone systemd-shutdown binary with no dependencies on the systemd-shared library or
Zbigniew Jędrzejewski-Szmek 903ce8
other libraries from systemd-libs. This package conflicts with the main systemd
Zbigniew Jędrzejewski-Szmek 903ce8
package and is meant for use in exitrds.
b50e9d
Lennart Poettering cc49ef
%prep
608445
%if %{defined branch}
608445
%autosetup -n %{name}-%{branch} -p1
608445
%elif %{defined commit}
608445
%autosetup -n %{name}-%{commit} -p1
608445
%else
608445
%autosetup -n %{name}-%{version_no_tilde} -p1
608445
%endif
Harald Hoyer 2e2e24
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
f9fe17
VMLINUX_H_PATH=''
f9fe17
f9fe17
%if 0%{?have_bpf}
f9fe17
f9fe17
%global find_vmlinux_h %{expand:
f9fe17
import functools, glob, subprocess
f9fe17
def cmp(a, b):
f9fe17
  c = subprocess.call(["rpmdev-vercmp", a, b], stdout=subprocess.DEVNULL)
f9fe17
  return {0:0, 11:+1, 12:-1}[c]
f9fe17
choices = list(glob.glob("/usr/src/kernels/*/vmlinux.h"))
f9fe17
assert choices
f9fe17
print(max(choices, key=functools.cmp_to_key(cmp)))
f9fe17
}
f9fe17
f9fe17
# The build fails on ppc64le with
f9fe17
# "GCC error "Must specify a BPF target arch via __TARGET_ARCH_xxx".
f9fe17
# TODO: Remove this when libbpf checks for __powerpc64__ macro.
f9fe17
%ifnarch ppc64le
f9fe17
VMLINUX_H_PATH=$(%python3 -c '%find_vmlinux_h')
f9fe17
%endif
f9fe17
%endif
f9fe17
Michal Schmidt c8f466
CONFIGURE_OPTS=(
2822a0
        -Dmode=%[%{with upstream}?"developer":"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 e8cc28
        -Dkmod=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dxkbcommon=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dblkid=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dfdisk=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dseccomp=enabled
Zbigniew Jędrzejewski-Szmek 83f115
        -Dima=true
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dselinux=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dbpf-framework=%[0%{?have_bpf}?"enabled":"disabled"]
f9fe17
        -Dvmlinux-h=%[0%{?have_bpf}?"auto":"disabled"]
f9fe17
        -Dvmlinux-h-path="$VMLINUX_H_PATH"
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dapparmor=disabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dpolkit=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dxz=%[%{with xz}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dzlib=%[%{with zlib}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dbzip2=%[%{with bzip2}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dlz4=%[%{with lz4}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dzstd=%[%{with zstd}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dpam=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dacl=enabled
Zbigniew Jędrzejewski-Szmek 83f115
        -Dsmack=true
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dopenssl=enabled
Zbigniew Jędrzejewski-Szmek ce4156
        -Dcryptolib=openssl
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dp11kit=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dgcrypt=disabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Daudit=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Delfutils=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dlibcryptsetup=%[%{with bootstrap}?"disabled":"enabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Delfutils=enabled
U2FsdGVkX1 ebf352
        -Drepart=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dpwquality=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dqrencode=%[%{defined rhel}?"disabled":"enabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dgnutls=%[%{with gnutls}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dmicrohttpd=enabled
Yu Watanabe e36c89
        -Dvmspawn=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dlibidn2=enabled
Yu Watanabe e36c89
        -Dlibiptc=disabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dlibcurl=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dlibfido2=enabled
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dxenctrl=%[0%{?have_xen}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek 83f115
        -Defi=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dtpm=true
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dtpm2=enabled
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 f93a13
        -Ddefault-network=true
Zbigniew Jędrzejewski-Szmek 83f115
        -Dtests=unsafe
Zbigniew Jędrzejewski-Szmek 83f115
        -Dinstall-tests=true
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-bin=true
Zbigniew Jędrzejewski-Szmek cf6cab
        -Db_ndebug=false
Zbigniew Jędrzejewski-Szmek 976e1b
        -Dman=%[%{with docs}?"enabled":"disabled"]
74b3ef
        -Dversion-tag=%{version}%[%{without upstream}?"-%{release}":""]
Zbigniew Jędrzejewski-Szmek 3c4f94
        # https://bugzilla.redhat.com/show_bug.cgi?id=1906010
74b3ef
        -Dshared-lib-tag=%{version_no_tilde}%[%{without upstream}?"-%{release}":""]
Zbigniew Jędrzejewski-Szmek 1cc4f8
        -Dlink-executor-shared=false
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
a8c5c7
%if 0%{?fedora}
ba02e9
        # https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer
ba02e9
        -Ddefault-timeout-sec=45
ba02e9
        -Ddefault-user-timeout-sec=45
a8c5c7
%endif
Zbigniew Jędrzejewski-Szmek 29eb35
        -Dconfigfiledir=/usr/lib
Zbigniew Jędrzejewski-Szmek bca98c
        -Doomd=true
Zbigniew Jędrzejewski-Szmek 3a8ac5
Zbigniew Jędrzejewski-Szmek a49146
        -Dadm-gid=4
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dtty-gid=5
Zbigniew Jędrzejewski-Szmek a49146
        -Ddisk-gid=6
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dlp-gid=7
Zbigniew Jędrzejewski-Szmek a49146
        -Dkmem-gid=9
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dwheel-gid=10
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dcdrom-gid=11
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Ddialout-gid=18
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dutmp-gid=22
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dtape-gid=33
Zbigniew Jędrzejewski-Szmek a49146
        -Dkvm-gid=36
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dvideo-gid=39
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Daudio-gid=63
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dusers-gid=100
Zbigniew Jędrzejewski-Szmek 3a8ac5
        -Dinput-gid=104
Zbigniew Jędrzejewski-Szmek e19aaa
        -Drender-gid=105
Zbigniew Jędrzejewski-Szmek e19aaa
        -Dsgx-gid=106
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
Zbigniew Jędrzejewski-Szmek e8cc28
        # For now, let's build the bootloader in the same places where we
Zbigniew Jędrzejewski-Szmek e8cc28
        # built with gnu-efi. Later on, we might want to extend coverage, but
Zbigniew Jędrzejewski-Szmek e8cc28
        # considering that that support is untested, let's not do this now.
Zbigniew Jędrzejewski-Szmek e8cc28
        # Note, ukify requires bootloader, let's also explicitly enable/disable it
Zbigniew Jędrzejewski-Szmek e8cc28
        # here for https://github.com/systemd/systemd/pull/24175.
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dbootloader=%[%{?want_bootloader}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
        -Dukify=%[%{?want_bootloader}?"enabled":"disabled"]
Zbigniew Jędrzejewski-Szmek e8cc28
)
Zbigniew Jędrzejewski-Szmek 01af05
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
dc3dcc
{ %meson "${CONFIGURE_OPTS[@]}" %{?meson_extra_configure_options} ; }
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
Zbigniew Jędrzejewski-Szmek 32656b
sed -r 's|/system/|/user/|g' %{SOURCE16} >10-timeout-abort.conf.user
Zbigniew Jędrzejewski-Szmek 32656b
Lennart Poettering cc49ef
%install
Zbigniew Jędrzejewski-Szmek 83f115
%meson_install
Zbigniew Jędrzejewski-Szmek 6153dd
Lennart Poettering b79f2e
# udev links
Zbigniew Jędrzejewski-Szmek a37923
%if "%{_sbindir}" != "%{_bindir}"
Michal Schmidt c7b4b0
mkdir -p %{buildroot}/%{_sbindir}
Michal Schmidt c7b4b0
ln -sf ../bin/udevadm %{buildroot}%{_sbindir}/udevadm
Zbigniew Jędrzejewski-Szmek a37923
%endif
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 4c7acd
# Config files that were moved under /usr.
Zbigniew Jędrzejewski-Szmek 4c7acd
# We need to %ghost them so that they are not removed on upgrades.
Zbigniew Jędrzejewski-Szmek 4c7acd
touch %{buildroot}/etc/systemd/coredump.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/homed.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/journald.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/journal-remote.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/journal-upload.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/logind.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/networkd.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/oomd.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/pstore.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/resolved.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/sleep.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/system.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/timesyncd.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/systemd/user.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/udev/udev.conf \
Zbigniew Jędrzejewski-Szmek 4c7acd
      %{buildroot}/etc/udev/iocost.conf
Zbigniew Jędrzejewski-Szmek 4c7acd
Zbigniew Jędrzejewski-Szmek 694729
install -D -t %{buildroot}/usr/lib/systemd/ %{SOURCE3}
Zbigniew Jędrzejewski-Szmek 694729
Zbigniew Jędrzejewski-Szmek 83f115
# /etc/initab
Zbigniew Jędrzejewski-Szmek 694729
install -Dm0644 -t %{buildroot}/etc/ %{SOURCE6}
Zbigniew Jędrzejewski-Szmek 6d5bee
Zbigniew Jędrzejewski-Szmek 83f115
# /etc/sysctl.conf compat
Zbigniew Jędrzejewski-Szmek 694729
install -Dm0644 %{SOURCE7} %{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 694729
install -Dm0644 %{SOURCE5} %{buildroot}/etc/dnf/protected.d/systemd.conf
Michal Schmidt 3c3608
Zbigniew Jędrzejewski-Szmek 694729
install -Dm0644 -t %{buildroot}/usr/lib/firewalld/services/ %{SOURCE8} %{SOURCE9}
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 694729
install -Dm0644 -t %{buildroot}%{_pkgdocdir}/ %{SOURCE10}
Zbigniew Jędrzejewski-Szmek 90aeee
Zbigniew Jędrzejewski-Szmek 65fed7
# https://bugzilla.redhat.com/show_bug.cgi?id=1378974
Zbigniew Jędrzejewski-Szmek 694729
install -Dm0644 -t %{buildroot}%{system_unit_dir}/systemd-udev-trigger.service.d/ %{SOURCE11}
Zbigniew Jędrzejewski-Szmek 65fed7
Zbigniew Jędrzejewski-Szmek 147b75
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/ %{SOURCE13}
Zbigniew Jędrzejewski-Szmek 8a34ce
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}/system.slice.d/ %{SOURCE15}
7665e1
install -Dm0644 -t %{buildroot}%{user_unit_dir}/slice.d/ %{SOURCE15}
a8c5c7
%if 0%{?fedora}
Zbigniew Jędrzejewski-Szmek 55ee78
# https://fedoraproject.org/wiki/Changes/Shorter_Shutdown_Timer
Zbigniew Jędrzejewski-Szmek 55ee78
install -Dm0644 -t %{buildroot}%{system_unit_dir}/service.d/ %{SOURCE16}
Zbigniew Jędrzejewski-Szmek 55ee78
install -Dm0644 10-timeout-abort.conf.user %{buildroot}%{user_unit_dir}/service.d/10-timeout-abort.conf
a8c5c7
%endif
Thomas Haller aff167
Alessandro Astone aedd54
# https://fedoraproject.org/wiki/Changes/IncreaseVmMaxMapCount
Alessandro Astone aedd54
install -Dm0644 -t %{buildroot}%{_prefix}/lib/sysctl.d/ %{SOURCE17}
Alessandro Astone aedd54
00babc
# As requested in https://bugzilla.redhat.com/show_bug.cgi?id=1738828.
00babc
# Test results are that bfq seems to behave better and more consistently on
00babc
# typical hardware. The kernel does not have a configuration option to set the
00babc
# default scheduler, and it currently needs to be set by userspace.
00babc
install -Dm0644 -t %{buildroot}%{_prefix}/lib/udev/rules.d/ %{SOURCE18}
00babc
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}
Panu Matilainen dce828
# Use rpm's own sysusers provides where available
Yaakov Selkowitz 9c05b4
%if ! (0%{?fedora} >= 39 || 0%{?rhel} >= 10)
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}
Panu Matilainen dce828
%endif
Zbigniew Jędrzejewski-Szmek ced923
install -m 0755 -D -t %{buildroot}%{_rpmconfigdir}/ %{SOURCE24}
Zbigniew Jędrzejewski-Szmek ced923
Zbigniew Jędrzejewski-Szmek 55ee78
# https://bugzilla.redhat.com/show_bug.cgi?id=2107754
Zbigniew Jędrzejewski-Szmek 55ee78
install -Dm0644 -t %{buildroot}%{_prefix}/lib/systemd/network/ %{SOURCE25}
Zbigniew Jędrzejewski-Szmek 55ee78
12d1f0
%if 0%{?fedora} || 0%{?rhel} >= 10
Zbigniew Jędrzejewski-Szmek 360975
ln -s --relative %{buildroot}%{_bindir}/kernel-install %{buildroot}%{_sbindir}/installkernel
12d1f0
%endif
Zbigniew Jędrzejewski-Szmek f66faf
Zbigniew Jędrzejewski-Szmek cffa08
%if "%{_sbindir}" == "%{_bindir}"
Zbigniew Jędrzejewski-Szmek cffa08
# Systemd has the split-sbin option which is also used to select the directory
Zbigniew Jędrzejewski-Szmek cffa08
# for alias symlinks. We need to keep split-sbin=true for now, to support
Zbigniew Jędrzejewski-Szmek cffa08
# unmerged systems. Move the symlinks here instead.
Zbigniew Jędrzejewski-Szmek cffa08
mv -v %{buildroot}/usr/sbin/* %{buildroot}%{_bindir}/
Zbigniew Jędrzejewski-Szmek cffa08
%endif
Zbigniew Jędrzejewski-Szmek cffa08
Zbigniew Jędrzejewski-Szmek c56891
%if 0%{?fedora} >= 41
Zbigniew Jędrzejewski-Szmek c56891
# This requires https://pagure.io/setup/pull-request/50
Zbigniew Jędrzejewski-Szmek c56891
# and https://src.fedoraproject.org/rpms/setup/pull-request/10.
Zbigniew Jędrzejewski-Szmek c56891
%{python3} %{SOURCE4} /usr/lib/sysusers.d/20-setup-{users,groups}.conf %{buildroot}/usr/lib/sysusers.d/basic.conf
Zbigniew Jędrzejewski-Szmek c56891
rm %{buildroot}/usr/lib/sysusers.d/basic.conf
Zbigniew Jędrzejewski-Szmek c56891
%endif
Zbigniew Jędrzejewski-Szmek c56891
Zbigniew Jędrzejewski-Szmek 38291e
# Disable sshd_config.d/20-systemd-userdb.conf for now.
Zbigniew Jędrzejewski-Szmek 38291e
# This option may override an existing AuthorizedKeysCommand setting
Zbigniew Jędrzejewski-Szmek 38291e
# (or be ineffective, depending on the order of configuration).
Zbigniew Jędrzejewski-Szmek 38291e
# See https://github.com/systemd/systemd/issues/33648.
Zbigniew Jędrzejewski-Szmek 38291e
rm %{buildroot}/etc/ssh/sshd_config.d/20-systemd-userdb.conf
Zbigniew Jędrzejewski-Szmek 38291e
mv %{buildroot}/usr/lib/tmpfiles.d/20-systemd-userdb.conf{,.example}
Zbigniew Jędrzejewski-Szmek 38291e
Zbigniew Jędrzejewski-Szmek b2ba74
%find_lang %{name}
Zbigniew Jędrzejewski-Szmek b2ba74
Zbigniew Jędrzejewski-Szmek b8d376
# Split files in build root into rpms
Zbigniew Jędrzejewski-Szmek 453bbc
python3 %{SOURCE2} %buildroot %{!?want_bootloader:--no-bootloader}
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 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 4e7c10
if [ $1 -ge 1 ]; then
Zbigniew Jędrzejewski-Szmek 4e7c10
  [ -w %{_localstatedir} ] && journalctl --update-catalog || :
Zbigniew Jędrzejewski-Szmek 4e7c10
Zbigniew Jędrzejewski-Szmek 4e7c10
  systemctl daemon-reexec || :
Zbigniew Jędrzejewski-Szmek 4e7c10
Zbigniew Jędrzejewski-Szmek 4e7c10
  systemd-tmpfiles --create &>/dev/null || :
Zbigniew Jędrzejewski-Szmek 7ae71c
fi
Zbigniew Jędrzejewski-Szmek 7ae71c
Zbigniew Jędrzejewski-Szmek 5cae6a
%systemd_postun_with_restart systemd-timedated.service systemd-hostnamed.service systemd-journald.service systemd-localed.service systemd-userdbd.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 c4c8de
Zbigniew Jędrzejewski-Szmek 65d9b4
# This is the expanded form of %%systemd_user_daemon_reexec. We
Zbigniew Jędrzejewski-Szmek 11c465
# can't use the macro because we define it ourselves.
Zbigniew Jędrzejewski-Szmek 11c465
if [ $1 -ge 1 ] && [ -x "/usr/lib/systemd/systemd-update-helper" ]; then
Zbigniew Jędrzejewski-Szmek 11c465
    # Package upgrade, not uninstall
Zbigniew Jędrzejewski-Szmek 11c465
    /usr/lib/systemd/systemd-update-helper user-reexec || :
Zbigniew Jędrzejewski-Szmek 11c465
fi
Zbigniew Jędrzejewski-Szmek c4675f
Zbigniew Jędrzejewski-Szmek c6f7df
%triggerun -- systemd < 256
Zbigniew Jędrzejewski-Szmek c6f7df
# This is for upgrades from previous versions before systemd restart was moved to %%postun
Zbigniew Jędrzejewski-Szmek c6f7df
systemctl daemon-reexec || :
Zbigniew Jędrzejewski-Szmek c6f7df
Zbigniew Jędrzejewski-Szmek efa3d3
%triggerpostun -- systemd < 253~rc1-2
Zbigniew Jędrzejewski-Szmek efa3d3
# This is for upgrades from previous versions where systemd-journald-audit.socket
Zbigniew Jędrzejewski-Szmek efa3d3
# had a static enablement symlink.
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.
Zbigniew Jędrzejewski-Szmek efa3d3
systemctl --no-reload preset systemd-journald-audit.socket &>/dev/null || :
Zbigniew Jędrzejewski-Szmek efa3d3
Zbigniew Jędrzejewski-Szmek 5cae6a
%global udev_services systemd-udev{d,-settle,-trigger}.service systemd-udevd-{control,kernel}.socket systemd-homed.service %{?want_bootloader:systemd-boot-update.service} systemd-oomd.service systemd-portabled.service systemd-pstore.service systemd-timesyncd.service remote-cryptsetup.target
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
Zbigniew Jędrzejewski-Szmek a37923
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
Zbigniew Jędrzejewski-Szmek cd0e29
%postun networkd
Zbigniew Jędrzejewski-Szmek cd0e29
%systemd_postun_with_restart systemd-networkd.service
Zbigniew Jędrzejewski-Szmek cd0e29
%systemd_postun systemd-networkd-wait-online.service
Zbigniew Jędrzejewski-Szmek cd0e29
Zbigniew Jędrzejewski-Szmek cd0e29
%post resolved
Zbigniew Jędrzejewski-Szmek cd0e29
[ $1 -eq 1 ] || exit 0
Zbigniew Jędrzejewski-Szmek cd0e29
# Initial installation
Zbigniew Jędrzejewski-Szmek cd0e29
Zbigniew Jędrzejewski-Szmek cd0e29
touch %{_localstatedir}/lib/rpm-state/systemd-resolved.initial-installation
Zbigniew Jędrzejewski-Szmek cd0e29
Zbigniew Jędrzejewski-Szmek cd0e29
# Related to https://bugzilla.redhat.com/show_bug.cgi?id=1943263
Zbigniew Jędrzejewski-Szmek cd0e29
if ls /usr/lib/systemd/libsystemd-shared-24[0-8].so &>/dev/null; then
Zbigniew Jędrzejewski-Szmek cd0e29
    echo "Skipping presets for systemd-resolved.service, seems we are upgrading from old systemd."
Zbigniew Jędrzejewski-Szmek cd0e29
    exit 0
Zbigniew Jędrzejewski-Szmek cd0e29
fi
Zbigniew Jędrzejewski-Szmek cd0e29
Zbigniew Jędrzejewski-Szmek cd0e29
%systemd_post systemd-resolved.service
Zbigniew Jędrzejewski-Szmek cd0e29
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
Zbigniew Jędrzejewski-Szmek cd0e29
%postun resolved
Zbigniew Jędrzejewski-Szmek cd0e29
%systemd_postun_with_restart 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.
Peter Robinson f216cc
%license LICENSE.GPL2
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 e8cc28
%if 0%{?want_bootloader}
Zbigniew Jędrzejewski-Szmek 903ce8
%files ukify -f .file-list-ukify
Zbigniew Jędrzejewski-Szmek 54a3b6
%files boot-unsigned -f .file-list-boot
Zbigniew Jędrzejewski-Szmek 778f8e
%endif
Zbigniew Jędrzejewski-Szmek 54a3b6
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
Zbigniew Jędrzejewski-Szmek f93a13
%files networkd-defaults -f .file-list-networkd-defaults
Zbigniew Jędrzejewski-Szmek f93a13
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
Zbigniew Jędrzejewski-Szmek 903ce8
%files standalone-repart -f .file-list-standalone-repart
Zbigniew Jędrzejewski-Szmek 903ce8
b50e9d
%files standalone-tmpfiles -f .file-list-standalone-tmpfiles
b50e9d
b50e9d
%files standalone-sysusers -f .file-list-standalone-sysusers
b50e9d
Zbigniew Jędrzejewski-Szmek 903ce8
%files standalone-shutdown -f .file-list-standalone-shutdown
Zbigniew Jędrzejewski-Szmek 903ce8
2b6870
%clean
2b6870
rm -rf $RPM_BUILD_ROOT
2b6870
rm -f 10-timeout-abort.conf.user
2b6870
rm -f .file-list-*
2b6870
rm -f %{name}.lang
2b6870
Rahul Sundaram 7a392d
%changelog
Zbigniew Jędrzejewski-Szmek 99fbfc
%autochangelog