Accepting request 967294 from Base:System

- Import commit e43a1b018899266b764ab81afb9c30fb417675c6
  1c229f8fc1 cryptsetup: fall back to traditional unlocking if any TPM2 operation fails
  8881f21539 cryptsetup: fix typo
  5882148902 journald: make use of CLAMP() in cache_space_refresh()
  6ee0601f73 journald: make sure journal_file_open() doesn't leave a corrupted file around after failing (bsc#1198114)
  fe928f3d49 fs-util: make sure openat_report_new() initializes return param also on shortcut
  3881af1806 fs-util: fix typos in comments
  96060b73ba journal-file: port journal_file_open() to openat_report_new()
  611d9955bb fs-util: add openat_report_new() wrapper around openat()
  f16edb41d4 network: ignore all errors in loading .network files (bsc#1197968)
  5422730a7b meson: build kernel-install man page when necessary
  45c627cfc2 build: include status of TPM2 in the feature string show by --version
- Drop 0001-meson-build-kernel-install-man-page-when-necessary.patch
  It's been merged in the SUSE git repo.

- spec: define %bootstrap with %bcond_with so it can be used with %when. Also
  re-order the meson options a bit.

- spec: make sure /lib exists when installing conf files in /lib/modprobe.d

  This includes the following bug fixes:
    - upstream commit 34357545590d4791d1acbbeb07ae8f7636e187cb (bsc#1198093)

OBS-URL: https://build.opensuse.org/request/show/967294
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=356
This commit is contained in:
Dominique Leuenberger 2022-04-07 22:27:23 +00:00 committed by Git OBS Bridge
parent 9cdcd2bbdc
commit 303f28f4c1
10 changed files with 127 additions and 180 deletions

View File

@ -1,90 +0,0 @@
From fecffebc9a0f4e2309e9d8d561c0b0c4b6678b0b Mon Sep 17 00:00:00 2001
From: Franck Bui <fbui@suse.com>
Date: Thu, 31 Mar 2022 11:17:10 +0200
Subject: [PATCH 1/1] meson: build kernel-install man page when necessary
---
man/rules/meson.build | 2 +-
meson.build | 5 ++++-
shell-completion/bash/meson.build | 2 +-
shell-completion/zsh/meson.build | 2 +-
src/kernel-install/meson.build | 2 --
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/man/rules/meson.build b/man/rules/meson.build
index aaa69d3038..f10abdaf0d 100644
--- a/man/rules/meson.build
+++ b/man/rules/meson.build
@@ -30,7 +30,7 @@ manpages = [
['journalctl', '1', [], ''],
['journald.conf', '5', ['journald.conf.d', 'journald@.conf'], ''],
['kernel-command-line', '7', [], ''],
- ['kernel-install', '8', [], ''],
+ ['kernel-install', '8', [], 'ENABLE_KERNEL_INSTALL'],
['libudev', '3', [], ''],
['loader.conf', '5', [], 'HAVE_GNU_EFI'],
['locale.conf', '5', [], ''],
diff --git a/meson.build b/meson.build
index e68791b8b4..311895db5e 100644
--- a/meson.build
+++ b/meson.build
@@ -1675,6 +1675,9 @@ else
endif
conf.set10('ENABLE_IMPORTD', have)
+want_kernel_install = get_option('kernel-install')
+conf.set10('ENABLE_KERNEL_INSTALL', want_kernel_install)
+
want_homed = get_option('homed')
if want_homed != 'false'
have = (conf.get('HAVE_OPENSSL') == 1 and
@@ -4143,7 +4146,7 @@ foreach tuple : [
['hwdb'],
['importd'],
['initrd'],
- ['kernel-install', get_option('kernel-install')],
+ ['kernel-install'],
['localed'],
['logind'],
['machined'],
diff --git a/shell-completion/bash/meson.build b/shell-completion/bash/meson.build
index 963a11b6ce..ae6a61e555 100644
--- a/shell-completion/bash/meson.build
+++ b/shell-completion/bash/meson.build
@@ -31,7 +31,7 @@ items = [['busctl', ''],
['systemd-path', ''],
['systemd-run', ''],
['udevadm', ''],
- ['kernel-install', ''],
+ ['kernel-install', 'ENABLE_KERNEL_INSTALL'],
['bootctl', 'HAVE_GNU_EFI'],
['coredumpctl', 'ENABLE_COREDUMP'],
['homectl', 'ENABLE_HOMED'],
diff --git a/shell-completion/zsh/meson.build b/shell-completion/zsh/meson.build
index 6dca9dd595..bac531798c 100644
--- a/shell-completion/zsh/meson.build
+++ b/shell-completion/zsh/meson.build
@@ -22,7 +22,7 @@ items = [['_busctl', ''],
['_systemd-path', ''],
['_systemd-run', ''],
['_udevadm', ''],
- ['_kernel-install', ''],
+ ['_kernel-install', 'ENABLE_KERNEL_INSTALL'],
['_sd_hosts_or_user_at_host', ''],
['_sd_outputmodes', ''],
['_sd_unit_files', ''],
diff --git a/src/kernel-install/meson.build b/src/kernel-install/meson.build
index 508058f1cf..abc3520b62 100644
--- a/src/kernel-install/meson.build
+++ b/src/kernel-install/meson.build
@@ -1,7 +1,5 @@
# SPDX-License-Identifier: LGPL-2.1-or-later
-want_kernel_install = get_option('kernel-install')
-
if want_kernel_install
install_data('kernel-install',
install_mode : 'rwxr-xr-x',
--
2.34.1

View File

@ -3,7 +3,7 @@
# #
%dir %{_sysconfdir}/systemd/nspawn %dir %{_sysconfdir}/systemd/nspawn
%{_bindir}/systemd-nspawn %{_bindir}/systemd-nspawn
%if ! %{bootstrap} %if %{without bootstrap}
%{_datadir}/bash-completion/completions/systemd-nspawn %{_datadir}/bash-completion/completions/systemd-nspawn
%{_datadir}/zsh/site-functions/_systemd-nspawn %{_datadir}/zsh/site-functions/_systemd-nspawn
%{_mandir}/man1/systemd-nspawn.1.gz %{_mandir}/man1/systemd-nspawn.1.gz

View File

@ -7,7 +7,7 @@
%{_libdir}/libudev.so %{_libdir}/libudev.so
%{_libdir}/pkgconfig/libsystemd.pc %{_libdir}/pkgconfig/libsystemd.pc
%{_libdir}/pkgconfig/libudev.pc %{_libdir}/pkgconfig/libudev.pc
%if ! %{bootstrap} %if %{without bootstrap}
%{_mandir}/man3/SD_ALERT.3.gz %{_mandir}/man3/SD_ALERT.3.gz
%{_mandir}/man3/SD_BUS_ERROR_ACCESS_DENIED.3.gz %{_mandir}/man3/SD_BUS_ERROR_ACCESS_DENIED.3.gz
%{_mandir}/man3/SD_BUS_ERROR_ADDRESS_IN_USE.3.gz %{_mandir}/man3/SD_BUS_ERROR_ADDRESS_IN_USE.3.gz

View File

@ -8,7 +8,7 @@
%config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf %config(noreplace) %{_sysconfdir}/systemd/timesyncd.conf
%config(noreplace) %{_sysconfdir}/systemd/user.conf %config(noreplace) %{_sysconfdir}/systemd/user.conf
%dir %{_binfmtdir} %dir %{_binfmtdir}
%if ! %{bootstrap} %if %{without bootstrap}
%dir %{_datadir}/bash-completion %dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions %dir %{_datadir}/bash-completion/completions
%endif %endif
@ -21,7 +21,7 @@
%dir %{_datadir}/polkit-1 %dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions %dir %{_datadir}/polkit-1/actions
%dir %{_datadir}/systemd %dir %{_datadir}/systemd
%if ! %{bootstrap} %if %{without bootstrap}
%dir %{_datadir}/zsh %dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions %dir %{_datadir}/zsh/site-functions
%endif %endif
@ -122,7 +122,7 @@
%{_bindir}/systemd-tty-ask-password-agent %{_bindir}/systemd-tty-ask-password-agent
%{_bindir}/systemd-umount %{_bindir}/systemd-umount
%{_bindir}/timedatectl %{_bindir}/timedatectl
%if ! %{bootstrap} %if %{without bootstrap}
%{_datadir}/bash-completion/completions/busctl %{_datadir}/bash-completion/completions/busctl
%{_datadir}/bash-completion/completions/coredumpctl %{_datadir}/bash-completion/completions/coredumpctl
%{_datadir}/bash-completion/completions/hostnamectl %{_datadir}/bash-completion/completions/hostnamectl
@ -186,7 +186,7 @@
%{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy %{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
%{_datadir}/systemd/kbd-model-map %{_datadir}/systemd/kbd-model-map
%{_datadir}/systemd/language-fallback-map %{_datadir}/systemd/language-fallback-map
%if ! %{bootstrap} %if %{without bootstrap}
%{_datadir}/zsh/site-functions/_busctl %{_datadir}/zsh/site-functions/_busctl
%{_datadir}/zsh/site-functions/_coredumpctl %{_datadir}/zsh/site-functions/_coredumpctl
%{_datadir}/zsh/site-functions/_hostnamectl %{_datadir}/zsh/site-functions/_hostnamectl
@ -219,7 +219,7 @@
%{_journalcatalogdir}/systemd.ru.catalog %{_journalcatalogdir}/systemd.ru.catalog
%{_journalcatalogdir}/systemd.zh_CN.catalog %{_journalcatalogdir}/systemd.zh_CN.catalog
%{_journalcatalogdir}/systemd.zh_TW.catalog %{_journalcatalogdir}/systemd.zh_TW.catalog
%if ! 0%{bootstrap} %if %{without bootstrap}
%{_mandir}/man1/busctl.1.gz %{_mandir}/man1/busctl.1.gz
%{_mandir}/man1/hostnamectl.1.gz %{_mandir}/man1/hostnamectl.1.gz
%{_mandir}/man1/init.1.gz %{_mandir}/man1/init.1.gz

View File

@ -2,12 +2,12 @@
# Please keep the list sorted (with `LC_ALL=C sort`). # Please keep the list sorted (with `LC_ALL=C sort`).
# #
%config(noreplace) %{_sysconfdir}/udev/udev.conf %config(noreplace) %{_sysconfdir}/udev/udev.conf
%if ! %{bootstrap} %if %{without bootstrap}
# %%dir %{_libdir}/cryptsetup # %%dir %{_libdir}/cryptsetup
%dir %{_modulesloaddir} %dir %{_modulesloaddir}
%endif %endif
%dir %{_prefix}/lib/udev %dir %{_prefix}/lib/udev
%if ! %{bootstrap} %if %{without bootstrap}
%dir %{_sysconfdir}/modules-load.d %dir %{_sysconfdir}/modules-load.d
%endif %endif
%dir %{_sysconfdir}/udev %dir %{_sysconfdir}/udev
@ -20,19 +20,19 @@
%ghost %attr(444, root, root) %{_sysconfdir}/udev/hwdb.bin %ghost %attr(444, root, root) %{_sysconfdir}/udev/hwdb.bin
%ghost %attr(644, root, root) %{_prefix}/lib/udev/compat-symlink-generation %ghost %attr(644, root, root) %{_prefix}/lib/udev/compat-symlink-generation
%ghost %{_localstatedir}/lib/systemd/backlight %ghost %{_localstatedir}/lib/systemd/backlight
%if ! %{bootstrap} %if %{without bootstrap}
%{_bindir}/systemd-cryptenroll %{_bindir}/systemd-cryptenroll
%endif %endif
%{_bindir}/systemd-hwdb %{_bindir}/systemd-hwdb
%{_bindir}/udevadm %{_bindir}/udevadm
%if ! %{bootstrap} %if %{without bootstrap}
%{_datadir}/bash-completion/completions/udevadm %{_datadir}/bash-completion/completions/udevadm
%endif %endif
%{_datadir}/pkgconfig/udev.pc %{_datadir}/pkgconfig/udev.pc
%if ! %{bootstrap} %if %{without bootstrap}
%{_datadir}/zsh/site-functions/_udevadm %{_datadir}/zsh/site-functions/_udevadm
%endif %endif
%if ! %{bootstrap} %if %{without bootstrap}
# %%{_libdir}/cryptsetup/libcryptsetup-token-systemd-fido2.so # %%{_libdir}/cryptsetup/libcryptsetup-token-systemd-fido2.so
# %%{_libdir}/cryptsetup/libcryptsetup-token-systemd-pkcs11.so # %%{_libdir}/cryptsetup/libcryptsetup-token-systemd-pkcs11.so
# %%{_libdir}/cryptsetup/libcryptsetup-token-systemd-tpm2.so # %%{_libdir}/cryptsetup/libcryptsetup-token-systemd-tpm2.so
@ -92,30 +92,30 @@
%{_prefix}/lib/udev/v4l_id %{_prefix}/lib/udev/v4l_id
%{_systemd_util_dir}/network/99-default.link %{_systemd_util_dir}/network/99-default.link
%{_systemd_util_dir}/systemd-backlight %{_systemd_util_dir}/systemd-backlight
%if ! %{bootstrap} %if %{without bootstrap}
%{_systemd_util_dir}/systemd-cryptsetup %{_systemd_util_dir}/systemd-cryptsetup
%endif %endif
%{_systemd_util_dir}/systemd-growfs %{_systemd_util_dir}/systemd-growfs
%if ! %{bootstrap} %if %{without bootstrap}
%{_systemd_util_dir}/systemd-integritysetup %{_systemd_util_dir}/systemd-integritysetup
%endif %endif
%{_systemd_util_dir}/systemd-makefs %{_systemd_util_dir}/systemd-makefs
%if ! %{bootstrap} %if %{without bootstrap}
%{_systemd_util_dir}/systemd-modules-load %{_systemd_util_dir}/systemd-modules-load
%endif %endif
%{_systemd_util_dir}/systemd-network-generator %{_systemd_util_dir}/systemd-network-generator
%{_systemd_util_dir}/systemd-rfkill %{_systemd_util_dir}/systemd-rfkill
%{_systemd_util_dir}/systemd-udevd %{_systemd_util_dir}/systemd-udevd
%if ! %{bootstrap} %if %{without bootstrap}
%{_systemd_util_dir}/systemd-veritysetup %{_systemd_util_dir}/systemd-veritysetup
%endif %endif
%{_systemd_util_dir}/systemd-volatile-root %{_systemd_util_dir}/systemd-volatile-root
%if ! %{bootstrap} %if %{without bootstrap}
%{_systemdgeneratordir}/systemd-cryptsetup-generator %{_systemdgeneratordir}/systemd-cryptsetup-generator
%endif %endif
%{_systemdgeneratordir}/systemd-fstab-generator %{_systemdgeneratordir}/systemd-fstab-generator
%{_systemdgeneratordir}/systemd-gpt-auto-generator %{_systemdgeneratordir}/systemd-gpt-auto-generator
%if ! %{bootstrap} %if %{without bootstrap}
%{_systemdgeneratordir}/systemd-integritysetup-generator %{_systemdgeneratordir}/systemd-integritysetup-generator
%{_systemdgeneratordir}/systemd-veritysetup-generator %{_systemdgeneratordir}/systemd-veritysetup-generator
%endif %endif
@ -175,20 +175,20 @@
%{_udevrulesdir}/75-net-description.rules %{_udevrulesdir}/75-net-description.rules
%{_udevrulesdir}/75-probe_mtd.rules %{_udevrulesdir}/75-probe_mtd.rules
%{_udevrulesdir}/78-sound-card.rules %{_udevrulesdir}/78-sound-card.rules
%if ! %{bootstrap} %if %{without bootstrap}
%{_udevrulesdir}/80-drivers.rules %{_udevrulesdir}/80-drivers.rules
%endif %endif
%{_udevrulesdir}/80-net-setup-link.rules %{_udevrulesdir}/80-net-setup-link.rules
%{_udevrulesdir}/81-net-dhcp.rules %{_udevrulesdir}/81-net-dhcp.rules
%{_udevrulesdir}/90-vconsole.rules %{_udevrulesdir}/90-vconsole.rules
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/cryptsetup-pre.target %{_unitdir}/cryptsetup-pre.target
%{_unitdir}/cryptsetup.target %{_unitdir}/cryptsetup.target
%{_unitdir}/initrd-root-device.target.wants/remote-cryptsetup.target %{_unitdir}/initrd-root-device.target.wants/remote-cryptsetup.target
%{_unitdir}/initrd-root-device.target.wants/remote-veritysetup.target %{_unitdir}/initrd-root-device.target.wants/remote-veritysetup.target
%endif %endif
%{_unitdir}/initrd-udevadm-cleanup-db.service %{_unitdir}/initrd-udevadm-cleanup-db.service
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/integritysetup-pre.target %{_unitdir}/integritysetup-pre.target
%{_unitdir}/integritysetup.target %{_unitdir}/integritysetup.target
%{_unitdir}/kmod-static-nodes.service %{_unitdir}/kmod-static-nodes.service
@ -197,25 +197,25 @@
%endif %endif
%{_unitdir}/sockets.target.wants/systemd-udevd-control.socket %{_unitdir}/sockets.target.wants/systemd-udevd-control.socket
%{_unitdir}/sockets.target.wants/systemd-udevd-kernel.socket %{_unitdir}/sockets.target.wants/systemd-udevd-kernel.socket
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/sysinit.target.wants/cryptsetup.target %{_unitdir}/sysinit.target.wants/cryptsetup.target
%{_unitdir}/sysinit.target.wants/integritysetup.target %{_unitdir}/sysinit.target.wants/integritysetup.target
%{_unitdir}/sysinit.target.wants/kmod-static-nodes.service %{_unitdir}/sysinit.target.wants/kmod-static-nodes.service
%endif %endif
%{_unitdir}/sysinit.target.wants/systemd-hwdb-update.service %{_unitdir}/sysinit.target.wants/systemd-hwdb-update.service
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/sysinit.target.wants/systemd-modules-load.service %{_unitdir}/sysinit.target.wants/systemd-modules-load.service
%endif %endif
%{_unitdir}/sysinit.target.wants/systemd-tmpfiles-setup-dev.service %{_unitdir}/sysinit.target.wants/systemd-tmpfiles-setup-dev.service
%{_unitdir}/sysinit.target.wants/systemd-udev-trigger.service %{_unitdir}/sysinit.target.wants/systemd-udev-trigger.service
%{_unitdir}/sysinit.target.wants/systemd-udevd.service %{_unitdir}/sysinit.target.wants/systemd-udevd.service
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/sysinit.target.wants/veritysetup.target %{_unitdir}/sysinit.target.wants/veritysetup.target
%{_unitdir}/system-systemd\x2dcryptsetup.slice %{_unitdir}/system-systemd\x2dcryptsetup.slice
%endif %endif
%{_unitdir}/systemd-backlight@.service %{_unitdir}/systemd-backlight@.service
%{_unitdir}/systemd-hwdb-update.service %{_unitdir}/systemd-hwdb-update.service
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/systemd-modules-load.service %{_unitdir}/systemd-modules-load.service
%endif %endif
%{_unitdir}/systemd-network-generator.service %{_unitdir}/systemd-network-generator.service
@ -228,7 +228,7 @@
%{_unitdir}/systemd-udevd-kernel.socket %{_unitdir}/systemd-udevd-kernel.socket
%{_unitdir}/systemd-udevd.service %{_unitdir}/systemd-udevd.service
%{_unitdir}/systemd-volatile-root.service %{_unitdir}/systemd-volatile-root.service
%if ! %{bootstrap} %if %{without bootstrap}
%{_unitdir}/veritysetup-pre.target %{_unitdir}/veritysetup-pre.target
%{_unitdir}/veritysetup.target %{_unitdir}/veritysetup.target
%endif %endif

View File

@ -8,7 +8,7 @@
%dir %{_systemd_util_dir}/boot/efi %dir %{_systemd_util_dir}/boot/efi
%{_bindir}/bootctl %{_bindir}/bootctl
%{_bindir}/kernel-install %{_bindir}/kernel-install
%if ! %{bootstrap} %if %{without bootstrap}
%{_datadir}/bash-completion/completions/bootctl %{_datadir}/bash-completion/completions/bootctl
%{_datadir}/bash-completion/completions/kernel-install %{_datadir}/bash-completion/completions/kernel-install
%{_datadir}/zsh/site-functions/_bootctl %{_datadir}/zsh/site-functions/_bootctl

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:ed75c74660149af8a8fe454169f9cd295aa329c2638d2de8474d8eed869112d5
size 7626056

View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:6633132c53177f605c5744b6cc412c823e32249545ffd0520ac56ef33c270d9c
size 7626800

View File

@ -1,3 +1,35 @@
-------------------------------------------------------------------
Wed Apr 6 09:55:10 UTC 2022 - Franck Bui <fbui@suse.com>
- Import commit e43a1b018899266b764ab81afb9c30fb417675c6
1c229f8fc1 cryptsetup: fall back to traditional unlocking if any TPM2 operation fails
8881f21539 cryptsetup: fix typo
5882148902 journald: make use of CLAMP() in cache_space_refresh()
6ee0601f73 journald: make sure journal_file_open() doesn't leave a corrupted file around after failing (bsc#1198114)
fe928f3d49 fs-util: make sure openat_report_new() initializes return param also on shortcut
3881af1806 fs-util: fix typos in comments
96060b73ba journal-file: port journal_file_open() to openat_report_new()
611d9955bb fs-util: add openat_report_new() wrapper around openat()
f16edb41d4 network: ignore all errors in loading .network files (bsc#1197968)
5422730a7b meson: build kernel-install man page when necessary
45c627cfc2 build: include status of TPM2 in the feature string show by --version
- Drop 0001-meson-build-kernel-install-man-page-when-necessary.patch
It's been merged in the SUSE git repo.
-------------------------------------------------------------------
Mon Apr 4 11:40:30 UTC 2022 - Franck Bui <fbui@suse.com>
- spec: define %bootstrap with %bcond_with so it can be used with %when. Also
re-order the meson options a bit.
-------------------------------------------------------------------
Mon Apr 4 08:49:40 UTC 2022 - Franck Bui <fbui@suse.com>
- spec: make sure /lib exists when installing conf files in /lib/modprobe.d
------------------------------------------------------------------- -------------------------------------------------------------------
Thu Mar 31 12:03:19 UTC 2022 - Franck Bui <fbui@suse.com> Thu Mar 31 12:03:19 UTC 2022 - Franck Bui <fbui@suse.com>
@ -95,6 +127,10 @@ Tue Mar 8 09:41:42 UTC 2022 - Franck Bui <fbui@suse.com>
See https://github.com/openSUSE/systemd/blob/SUSE/v250/NEWS for See https://github.com/openSUSE/systemd/blob/SUSE/v250/NEWS for
details. details.
This includes the following bug fixes:
- upstream commit 34357545590d4791d1acbbeb07ae8f7636e187cb (bsc#1198093)
* Rebased 0001-conf-parser-introduce-early-drop-ins.patch * Rebased 0001-conf-parser-introduce-early-drop-ins.patch
0001-restore-var-run-and-var-lock-bind-mount-if-they-aren.patch 0001-restore-var-run-and-var-lock-bind-mount-if-they-aren.patch

View File

@ -18,16 +18,8 @@
%global flavor @BUILD_FLAVOR@%{nil} %global flavor @BUILD_FLAVOR@%{nil}
%if "%{flavor}" == "mini"
%define bootstrap 1
%define mini -mini
%else
%define bootstrap 0
%define mini %nil
%endif
%define min_kernel_version 4.5 %define min_kernel_version 4.5
%define suse_version +suse.35.g8ef8dfd540 %define suse_version +suse.47.ge43a1b0188
%define _testsuitedir /usr/lib/systemd/tests %define _testsuitedir /usr/lib/systemd/tests
%define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit %define xinitconfdir %{?_distconfdir}%{!?_distconfdir:%{_sysconfdir}}/X11/xinit
@ -37,7 +29,13 @@
%define __when_2() %{expand:%%{?with_%{1}:%{2}}%%{!?with_%{1}:false}} %define __when_2() %{expand:%%{?with_%{1}:%{2}}%%{!?with_%{1}:false}}
%define when() %{expand:%%__when_%# %{*}} %define when() %{expand:%%__when_%# %{*}}
%if %{bootstrap} %define __when_not_1() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:true}}
%define __when_not_2() %{expand:%%{?with_%{1}:false}%%{!?with_%{1}:%{2}}}
%define when_not() %{expand:%%__when_not_%# %{*}}
%if "%{flavor}" == "mini"
%define mini -mini
%bcond_without bootstrap
%bcond_with coredump %bcond_with coredump
%bcond_with importd %bcond_with importd
%bcond_with journal_remote %bcond_with journal_remote
@ -50,6 +48,8 @@
%bcond_with experimental %bcond_with experimental
%bcond_with testsuite %bcond_with testsuite
%else %else
%define mini %nil
%bcond_with bootstrap
%bcond_without coredump %bcond_without coredump
%bcond_without importd %bcond_without importd
%bcond_without journal_remote %bcond_without journal_remote
@ -76,7 +76,7 @@ Release: 0
Summary: A System and Session Manager Summary: A System and Session Manager
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if ! %{bootstrap} %if %{without bootstrap}
BuildRequires: docbook-xsl-stylesheets BuildRequires: docbook-xsl-stylesheets
BuildRequires: kbd BuildRequires: kbd
BuildRequires: libapparmor-devel BuildRequires: libapparmor-devel
@ -114,7 +114,7 @@ BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(blkid) >= 2.26 BuildRequires: pkgconfig(blkid) >= 2.26
BuildRequires: pkgconfig(libpci) >= 3 BuildRequires: pkgconfig(libpci) >= 3
%if %{bootstrap} %if %{with bootstrap}
#!BuildIgnore: dbus-1 #!BuildIgnore: dbus-1
Provides: systemd = %{version}-%{release} Provides: systemd = %{version}-%{release}
Conflicts: systemd Conflicts: systemd
@ -209,7 +209,6 @@ Patch1000: 1000-Revert-getty-Pass-tty-to-use-by-agetty-via-stdin.patch
# upstream and need an urgent fix. Even in this case, the patches are # upstream and need an urgent fix. Even in this case, the patches are
# temporary and should be removed as soon as a fix is merged by # temporary and should be removed as soon as a fix is merged by
# upstream. # upstream.
Patch6000: 0001-meson-build-kernel-install-man-page-when-necessary.patch
%description %description
Systemd is a system and service manager, compatible with SysV and LSB Systemd is a system and service manager, compatible with SysV and LSB
@ -224,7 +223,7 @@ drop-in replacement for sysvinit.
%package doc %package doc
Summary: HTML documentation for systemd Summary: HTML documentation for systemd
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
%if %{bootstrap} %if %{with bootstrap}
Conflicts: systemd-doc Conflicts: systemd-doc
Requires: this-is-only-for-build-envs Requires: this-is-only-for-build-envs
%else %else
@ -242,7 +241,7 @@ Requires: libudev%{?mini}1 = %{version}-%{release}
Requires: systemd-rpm-macros Requires: systemd-rpm-macros
Provides: libudev%{?mini}-devel = %{version}-%{release} Provides: libudev%{?mini}-devel = %{version}-%{release}
Obsoletes: libudev%{?mini}-devel < %{version}-%{release} Obsoletes: libudev%{?mini}-devel < %{version}-%{release}
%if %{bootstrap} %if %{with bootstrap}
Provides: systemd-devel = %{version}-%{release} Provides: systemd-devel = %{version}-%{release}
Conflicts: systemd-devel Conflicts: systemd-devel
Provides: libudev-devel = %{version}-%{release} Provides: libudev-devel = %{version}-%{release}
@ -275,7 +274,7 @@ Please note that the content of this package is considered as deprecated.
%package -n libsystemd0%{?mini} %package -n libsystemd0%{?mini}
Summary: Component library for systemd Summary: Component library for systemd
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
%if %{bootstrap} %if %{with bootstrap}
Conflicts: kiwi Conflicts: kiwi
Conflicts: libsystemd0 Conflicts: libsystemd0
Provides: libsystemd0 = %{version}-%{release} Provides: libsystemd0 = %{version}-%{release}
@ -319,7 +318,7 @@ Requires: group(kvm)
Requires(post): sed Requires(post): sed
Requires(post): coreutils Requires(post): coreutils
Requires(postun):coreutils Requires(postun):coreutils
%if ! %{bootstrap} %if %{without bootstrap}
BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0 BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0
BuildRequires: pkgconfig(libkmod) >= 15 BuildRequires: pkgconfig(libkmod) >= 15
# Enable fido2 and tpm supports in systemd-cryptsetup, systemd-enroll. However # Enable fido2 and tpm supports in systemd-cryptsetup, systemd-enroll. However
@ -340,7 +339,7 @@ Conflicts: dracut < 044.1
Conflicts: filesystem < 11.5 Conflicts: filesystem < 11.5
Conflicts: mkinitrd < 2.7.0 Conflicts: mkinitrd < 2.7.0
Conflicts: util-linux < 2.16 Conflicts: util-linux < 2.16
%if %{bootstrap} %if %{with bootstrap}
Conflicts: udev Conflicts: udev
Provides: udev = %{version}-%{release} Provides: udev = %{version}-%{release}
%endif %endif
@ -355,7 +354,7 @@ call tools to initialize a device, or load needed kernel modules.
%package -n libudev%{?mini}1 %package -n libudev%{?mini}1
Summary: Dynamic library to access udev device information Summary: Dynamic library to access udev device information
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
%if %{bootstrap} %if %{with bootstrap}
Conflicts: kiwi Conflicts: kiwi
Conflicts: libudev1 Conflicts: libudev1
Provides: libudev1 = %{version}-%{release} Provides: libudev1 = %{version}-%{release}
@ -394,7 +393,7 @@ Obsoletes: nss-mymachines < %{version}-%{release}
Provides: nss-mymachines = %{version}-%{release} Provides: nss-mymachines = %{version}-%{release}
Provides: systemd-container = %{version}-%{release} Provides: systemd-container = %{version}-%{release}
Provides: systemd:%{_bindir}/systemd-nspawn Provides: systemd:%{_bindir}/systemd-nspawn
%if %{bootstrap} %if %{with bootstrap}
Conflicts: systemd-container Conflicts: systemd-container
Provides: systemd-container = %{version}-%{release} Provides: systemd-container = %{version}-%{release}
%endif %endif
@ -465,7 +464,7 @@ http://0pointer.net/blog/walkthrough-for-portable-services.html
https://systemd.io/PORTABLE_SERVICES https://systemd.io/PORTABLE_SERVICES
%endif %endif
%if ! %{bootstrap} %if %{without bootstrap}
%package -n nss-systemd %package -n nss-systemd
Summary: Plugin for local virtual host name resolution Summary: Plugin for local virtual host name resolution
License: LGPL-2.1-or-later License: LGPL-2.1-or-later
@ -634,7 +633,7 @@ The package contains: homed, pstore, repart, userdbd.
Have fun with these services at your own risk. Have fun with these services at your own risk.
%endif %endif
%if ! %{bootstrap} %if %{without bootstrap}
%lang_package %lang_package
%endif %endif
@ -655,45 +654,46 @@ Have fun with these services at your own risk.
-Dsystem-gid-max=499 \ -Dsystem-gid-max=499 \
-Dadm-group=false \ -Dadm-group=false \
-Dwheel-group=false \ -Dwheel-group=false \
-Dgshadow=false \
-Ddefault-hierarchy=unified \ -Ddefault-hierarchy=unified \
-Ddefault-kill-user-processes=false \ -Ddefault-kill-user-processes=false \
-Dldconfig=false \
-Dpamconfdir=no \ -Dpamconfdir=no \
-Dpamlibdir=%{_pam_moduledir} \ -Dpamlibdir=%{_pam_moduledir} \
-Dxinitrcdir=%{xinitconfdir}/xinitrc.d \ -Dxinitrcdir=%{xinitconfdir}/xinitrc.d \
-Drpmmacrosdir=no \ -Drpmmacrosdir=no \
-Dcertificate-root=%{_sysconfdir}/pki/systemd \ -Dcertificate-root=%{_sysconfdir}/pki/systemd \
%if %{with bootstrap}
-Dbashcompletiondir=no \
-Dzshcompletiondir=no \
%endif
%if %{without sysvcompat} %if %{without sysvcompat}
-Dsysvinit-path= \ -Dsysvinit-path= \
-Dsysvrcnd-path= \ -Dsysvrcnd-path= \
%endif %endif
-Drc-local=/etc/init.d/boot.local \ -Drc-local=/etc/init.d/boot.local \
-Dcreate-log-dirs=false \ -Dcreate-log-dirs=false \
-Dbump-proc-sys-fs-nr-open=false \
-Ddebug-shell=/bin/bash \ -Ddebug-shell=/bin/bash \
-Dseccomp=auto \ \
-Dselinux=auto \ -Dbump-proc-sys-fs-nr-open=false \
-Dapparmor=auto \ -Dgshadow=false \
-Dsmack=false \
-Dima=false \ -Dima=false \
-Delfutils=auto \ -Dldconfig=false \
-Doomd=false \
%if %{bootstrap}
-Defi=false \
-Dbashcompletiondir=no \
-Dzshcompletiondir=no \
-Dtranslations=false \
-Dnss-myhostname=false \
-Dnss-systemd=false \
%else
-Defi=true \
-Dtpm=true \
-Dtpm2=true \
-Dman=true \
-Dhtml=true \
%endif
-Dlibcryptsetup-plugins=false \ -Dlibcryptsetup-plugins=false \
-Doomd=false \
-Dsmack=false \
\
-Dapparmor=%{when_not bootstrap} \
-Defi=%{when_not bootstrap} \
-Delfutils=%{when_not bootstrap} \
-Dhtml=%{when_not bootstrap} \
-Dman=%{when_not bootstrap} \
-Dnss-myhostname=%{when_not bootstrap} \
-Dnss-systemd=%{when_not bootstrap} \
-Dseccomp=%{when_not bootstrap} \
-Dselinux=%{when_not bootstrap} \
-Dtpm=%{when_not bootstrap} \
-Dtpm2=%{when_not bootstrap} \
-Dtranslations=%{when_not bootstrap} \
\
-Dcoredump=%{when coredump} \ -Dcoredump=%{when coredump} \
-Dimportd=%{when importd} \ -Dimportd=%{when importd} \
-Dmachined=%{when machined} \ -Dmachined=%{when machined} \
@ -701,18 +701,18 @@ Have fun with these services at your own risk.
-Dportabled=%{when portabled} \ -Dportabled=%{when portabled} \
-Dremote=%{when journal_remote} \ -Dremote=%{when journal_remote} \
\ \
-Dkernel-install=%{when sd_boot} \
-Dgnu-efi=%{when sd_boot} \ -Dgnu-efi=%{when sd_boot} \
-Dkernel-install=%{when sd_boot} \
-Dsbat-distro= \ -Dsbat-distro= \
\ \
-Dresolve=%{when resolved} \
-Ddns-servers='' \
-Ddefault-dnssec=no \ -Ddefault-dnssec=no \
-Ddns-servers='' \
-Ddns-over-tls=%{when resolved openssl} \ -Ddns-over-tls=%{when resolved openssl} \
-Dresolve=%{when resolved} \
\ \
-Dhomed=%{when experimental} \
-Dpstore=%{when experimental} \ -Dpstore=%{when experimental} \
-Drepart=%{when experimental} \ -Drepart=%{when experimental} \
-Dhomed=%{when experimental} \
-Duserdb=%{when experimental} \ -Duserdb=%{when experimental} \
\ \
-Dtests=%{when testsuite unsafe} \ -Dtests=%{when testsuite unsafe} \
@ -774,8 +774,9 @@ rm -f %{buildroot}/etc/systemd/system/default.target
install -m0644 -D --target-directory=%{buildroot}%{_pam_vendordir} %{SOURCE2} install -m0644 -D --target-directory=%{buildroot}%{_pam_vendordir} %{SOURCE2}
# kmod keeps insisting on using /lib on SLE. # kmod keeps insisting on using /lib on SLE.
if [ "%{_modprobedir}" != /usr/lib/modprobe.d ]; then if [ "$(realpath %{_modprobedir})" != /usr/lib/modprobe.d ]; then
mv %{buildroot}/usr/lib/modprobe.d %{buildroot}%{_modprobedir} mkdir -p %{buildroot}%{_modprobedir}
mv %{buildroot}/usr/lib/modprobe.d/* %{buildroot}%{_modprobedir}/
fi fi
# don't enable wall ask password service, it spams every console (bnc#747783) # don't enable wall ask password service, it spams every console (bnc#747783)
@ -932,7 +933,7 @@ rm %{buildroot}%{_testsuitedir}/test/test-keymap-util/kbd-model-map
find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \; find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \;
%endif %endif
%if ! %{bootstrap} %if %{without bootstrap}
%find_lang systemd %find_lang systemd
%endif %endif
@ -961,7 +962,7 @@ if [ "$(stat -c%a %{_sysconfdir}/machine-id)" != 444 ]; then
chmod 444 %{_sysconfdir}/machine-id chmod 444 %{_sysconfdir}/machine-id
fi fi
%if ! %{bootstrap} %if %{without bootstrap}
pam-config --add --systemd || : pam-config --add --systemd || :
%endif %endif
@ -1150,7 +1151,7 @@ fi
%sysusers_create systemd-coredump.conf %sysusers_create systemd-coredump.conf
%endif %endif
%if ! %{bootstrap} %if %{without bootstrap}
%ldconfig_scriptlets -n nss-myhostname %ldconfig_scriptlets -n nss-myhostname
%ldconfig_scriptlets -n nss-systemd %ldconfig_scriptlets -n nss-systemd
%endif %endif
@ -1315,14 +1316,14 @@ fi
%{_sysusersdir}/systemd-coredump.conf %{_sysusersdir}/systemd-coredump.conf
%config(noreplace) %{_sysconfdir}/systemd/coredump.conf %config(noreplace) %{_sysconfdir}/systemd/coredump.conf
%dir %{_localstatedir}/lib/systemd/coredump %dir %{_localstatedir}/lib/systemd/coredump
%if ! %{bootstrap} %if %{without bootstrap}
%{_mandir}/man1/coredumpctl* %{_mandir}/man1/coredumpctl*
%{_mandir}/man5/coredump.conf* %{_mandir}/man5/coredump.conf*
%{_mandir}/man8/systemd-coredump* %{_mandir}/man8/systemd-coredump*
%endif %endif
%endif %endif
%if ! %{bootstrap} %if %{without bootstrap}
%files lang -f systemd.lang %files lang -f systemd.lang
%files -n nss-myhostname %files -n nss-myhostname