SHA256
1
0
forked from pool/systemd

- spec: define %bootstrap with %bcond_with so it can be used with %when. Also

re-order the meson options a bit.

OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1273
This commit is contained in:
Franck Bui 2022-04-04 11:51:23 +00:00 committed by Git OBS Bridge
parent 2f014da78d
commit 23f39dbffd
7 changed files with 90 additions and 83 deletions

View File

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

View File

@ -7,7 +7,7 @@
%{_libdir}/libudev.so
%{_libdir}/pkgconfig/libsystemd.pc
%{_libdir}/pkgconfig/libudev.pc
%if ! %{bootstrap}
%if %{without bootstrap}
%{_mandir}/man3/SD_ALERT.3.gz
%{_mandir}/man3/SD_BUS_ERROR_ACCESS_DENIED.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/user.conf
%dir %{_binfmtdir}
%if ! %{bootstrap}
%if %{without bootstrap}
%dir %{_datadir}/bash-completion
%dir %{_datadir}/bash-completion/completions
%endif
@ -21,7 +21,7 @@
%dir %{_datadir}/polkit-1
%dir %{_datadir}/polkit-1/actions
%dir %{_datadir}/systemd
%if ! %{bootstrap}
%if %{without bootstrap}
%dir %{_datadir}/zsh
%dir %{_datadir}/zsh/site-functions
%endif
@ -122,7 +122,7 @@
%{_bindir}/systemd-tty-ask-password-agent
%{_bindir}/systemd-umount
%{_bindir}/timedatectl
%if ! %{bootstrap}
%if %{without bootstrap}
%{_datadir}/bash-completion/completions/busctl
%{_datadir}/bash-completion/completions/coredumpctl
%{_datadir}/bash-completion/completions/hostnamectl
@ -186,7 +186,7 @@
%{_datadir}/polkit-1/actions/org.freedesktop.timedate1.policy
%{_datadir}/systemd/kbd-model-map
%{_datadir}/systemd/language-fallback-map
%if ! %{bootstrap}
%if %{without bootstrap}
%{_datadir}/zsh/site-functions/_busctl
%{_datadir}/zsh/site-functions/_coredumpctl
%{_datadir}/zsh/site-functions/_hostnamectl
@ -219,7 +219,7 @@
%{_journalcatalogdir}/systemd.ru.catalog
%{_journalcatalogdir}/systemd.zh_CN.catalog
%{_journalcatalogdir}/systemd.zh_TW.catalog
%if ! 0%{bootstrap}
%if %{without bootstrap}
%{_mandir}/man1/busctl.1.gz
%{_mandir}/man1/hostnamectl.1.gz
%{_mandir}/man1/init.1.gz

View File

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

View File

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

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
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>

View File

@ -18,14 +18,6 @@
%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 suse_version +suse.35.g8ef8dfd540
%define _testsuitedir /usr/lib/systemd/tests
@ -37,7 +29,13 @@
%define __when_2() %{expand:%%{?with_%{1}:%{2}}%%{!?with_%{1}:false}}
%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 importd
%bcond_with journal_remote
@ -50,6 +48,8 @@
%bcond_with experimental
%bcond_with testsuite
%else
%define mini %nil
%bcond_with bootstrap
%bcond_without coredump
%bcond_without importd
%bcond_without journal_remote
@ -76,7 +76,7 @@ Release: 0
Summary: A System and Session Manager
License: LGPL-2.1-or-later
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if ! %{bootstrap}
%if %{without bootstrap}
BuildRequires: docbook-xsl-stylesheets
BuildRequires: kbd
BuildRequires: libapparmor-devel
@ -114,7 +114,7 @@ BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(blkid) >= 2.26
BuildRequires: pkgconfig(libpci) >= 3
%if %{bootstrap}
%if %{with bootstrap}
#!BuildIgnore: dbus-1
Provides: systemd = %{version}-%{release}
Conflicts: systemd
@ -224,7 +224,7 @@ drop-in replacement for sysvinit.
%package doc
Summary: HTML documentation for systemd
License: LGPL-2.1-or-later
%if %{bootstrap}
%if %{with bootstrap}
Conflicts: systemd-doc
Requires: this-is-only-for-build-envs
%else
@ -242,7 +242,7 @@ Requires: libudev%{?mini}1 = %{version}-%{release}
Requires: systemd-rpm-macros
Provides: libudev%{?mini}-devel = %{version}-%{release}
Obsoletes: libudev%{?mini}-devel < %{version}-%{release}
%if %{bootstrap}
%if %{with bootstrap}
Provides: systemd-devel = %{version}-%{release}
Conflicts: systemd-devel
Provides: libudev-devel = %{version}-%{release}
@ -275,7 +275,7 @@ Please note that the content of this package is considered as deprecated.
%package -n libsystemd0%{?mini}
Summary: Component library for systemd
License: LGPL-2.1-or-later
%if %{bootstrap}
%if %{with bootstrap}
Conflicts: kiwi
Conflicts: libsystemd0
Provides: libsystemd0 = %{version}-%{release}
@ -319,7 +319,7 @@ Requires: group(kvm)
Requires(post): sed
Requires(post): coreutils
Requires(postun):coreutils
%if ! %{bootstrap}
%if %{without bootstrap}
BuildRequires: pkgconfig(libcryptsetup) >= 1.6.0
BuildRequires: pkgconfig(libkmod) >= 15
# Enable fido2 and tpm supports in systemd-cryptsetup, systemd-enroll. However
@ -340,7 +340,7 @@ Conflicts: dracut < 044.1
Conflicts: filesystem < 11.5
Conflicts: mkinitrd < 2.7.0
Conflicts: util-linux < 2.16
%if %{bootstrap}
%if %{with bootstrap}
Conflicts: udev
Provides: udev = %{version}-%{release}
%endif
@ -355,7 +355,7 @@ call tools to initialize a device, or load needed kernel modules.
%package -n libudev%{?mini}1
Summary: Dynamic library to access udev device information
License: LGPL-2.1-or-later
%if %{bootstrap}
%if %{with bootstrap}
Conflicts: kiwi
Conflicts: libudev1
Provides: libudev1 = %{version}-%{release}
@ -394,7 +394,7 @@ Obsoletes: nss-mymachines < %{version}-%{release}
Provides: nss-mymachines = %{version}-%{release}
Provides: systemd-container = %{version}-%{release}
Provides: systemd:%{_bindir}/systemd-nspawn
%if %{bootstrap}
%if %{with bootstrap}
Conflicts: systemd-container
Provides: systemd-container = %{version}-%{release}
%endif
@ -465,7 +465,7 @@ http://0pointer.net/blog/walkthrough-for-portable-services.html
https://systemd.io/PORTABLE_SERVICES
%endif
%if ! %{bootstrap}
%if %{without bootstrap}
%package -n nss-systemd
Summary: Plugin for local virtual host name resolution
License: LGPL-2.1-or-later
@ -634,7 +634,7 @@ The package contains: homed, pstore, repart, userdbd.
Have fun with these services at your own risk.
%endif
%if ! %{bootstrap}
%if %{without bootstrap}
%lang_package
%endif
@ -655,64 +655,65 @@ Have fun with these services at your own risk.
-Dsystem-gid-max=499 \
-Dadm-group=false \
-Dwheel-group=false \
-Dgshadow=false \
-Ddefault-hierarchy=unified \
-Ddefault-kill-user-processes=false \
-Dldconfig=false \
-Dpamconfdir=no \
-Dpamlibdir=%{_pam_moduledir} \
-Dxinitrcdir=%{xinitconfdir}/xinitrc.d \
-Drpmmacrosdir=no \
-Dcertificate-root=%{_sysconfdir}/pki/systemd \
%if %{with bootstrap}
-Dbashcompletiondir=no \
-Dzshcompletiondir=no \
%endif
%if %{without sysvcompat}
-Dsysvinit-path= \
-Dsysvrcnd-path= \
%endif
-Drc-local=/etc/init.d/boot.local \
-Dcreate-log-dirs=false \
-Dbump-proc-sys-fs-nr-open=false \
-Ddebug-shell=/bin/bash \
-Dseccomp=auto \
-Dselinux=auto \
-Dapparmor=auto \
-Dsmack=false \
\
-Dbump-proc-sys-fs-nr-open=false \
-Dgshadow=false \
-Dima=false \
-Delfutils=auto \
-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
-Dldconfig=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} \
-Dimportd=%{when importd} \
-Dmachined=%{when machined} \
-Dnetworkd=%{when networkd} \
-Dportabled=%{when portabled} \
-Dremote=%{when journal_remote} \
\
-Dkernel-install=%{when sd_boot} \
\
-Dgnu-efi=%{when sd_boot} \
-Dkernel-install=%{when sd_boot} \
-Dsbat-distro= \
\
-Dresolve=%{when resolved} \
-Ddns-servers='' \
\
-Ddefault-dnssec=no \
-Ddns-servers='' \
-Ddns-over-tls=%{when resolved openssl} \
\
-Dresolve=%{when resolved} \
\
-Dhomed=%{when experimental} \
-Dpstore=%{when experimental} \
-Drepart=%{when experimental} \
-Dhomed=%{when experimental} \
-Duserdb=%{when experimental} \
\
-Dtests=%{when testsuite unsafe} \
@ -933,7 +934,7 @@ rm %{buildroot}%{_testsuitedir}/test/test-keymap-util/kbd-model-map
find %{buildroot}%{_testsuitedir}/ -name .git\* -exec rm -fr {} \;
%endif
%if ! %{bootstrap}
%if %{without bootstrap}
%find_lang systemd
%endif
@ -962,7 +963,7 @@ if [ "$(stat -c%a %{_sysconfdir}/machine-id)" != 444 ]; then
chmod 444 %{_sysconfdir}/machine-id
fi
%if ! %{bootstrap}
%if %{without bootstrap}
pam-config --add --systemd || :
%endif
@ -1151,7 +1152,7 @@ fi
%sysusers_create systemd-coredump.conf
%endif
%if ! %{bootstrap}
%if %{without bootstrap}
%ldconfig_scriptlets -n nss-myhostname
%ldconfig_scriptlets -n nss-systemd
%endif
@ -1316,14 +1317,14 @@ fi
%{_sysusersdir}/systemd-coredump.conf
%config(noreplace) %{_sysconfdir}/systemd/coredump.conf
%dir %{_localstatedir}/lib/systemd/coredump
%if ! %{bootstrap}
%if %{without bootstrap}
%{_mandir}/man1/coredumpctl*
%{_mandir}/man5/coredump.conf*
%{_mandir}/man8/systemd-coredump*
%endif
%endif
%if ! %{bootstrap}
%if %{without bootstrap}
%files lang -f systemd.lang
%files -n nss-myhostname