packaging: Do not require WITH_... macros to be explicitly defined
authorŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 21 Mar 2024 08:45:52 +0000 (09:45 +0100)
committerŁukasz Stelmach <l.stelmach@samsung.com>
Thu, 21 Mar 2024 08:45:52 +0000 (09:45 +0100)
Change-Id: I1496d79b626da11085caceec32e1748bb5b16836
Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
packaging/systemd.spec

index 015b04d..95465ab 100644 (file)
@@ -72,7 +72,7 @@ BuildRequires:  libblkid-devel >= 2.20
 BuildRequires:  libcap-devel
 BuildRequires:  libgcrypt-devel
 BuildRequires:  libkmod-devel >= 14
-%if %{?WITH_DOC}
+%if 0%{?WITH_DOC}
 BuildRequires:  xsltproc
 BuildRequires:  docbook-xsl-stylesheets
 %endif
@@ -169,22 +169,22 @@ cp %{SOURCE8} .
 %define _vpath_srcdir .
 %define _vpath_builddir %{build_dir}
 %meson \
-%if ! %{?WITH_VIRT}
+%if ! 0%{?WITH_VIRT}
        -Dvirt=false \
 %endif
-%if ! %{?WITH_RANDOMSEED}
+%if ! 0%{?WITH_RANDOMSEED}
        -Drandomseed=false \
 %endif
-%if ! %{?WITH_COREDUMP}
+%if ! 0%{?WITH_COREDUMP}
        -Dcoredump=false \
 %endif
-%if ! %{?WITH_BACKLIGHT}
+%if ! 0%{?WITH_BACKLIGHT}
        -Dbacklight=false \
 %endif
-%if ! %{?WITH_TIMEDATED}
+%if ! 0%{?WITH_TIMEDATED}
        -Dtimedated=false \
 %endif
-%if ! %{?WITH_RFKILL}
+%if ! 0%{?WITH_RFKILL}
        -Drfkill=false \
 %endif
        -Defi=false \
@@ -197,17 +197,17 @@ cp %{SOURCE8} .
        -Dtimesyncd=false \
        -Dresolve=false \
        -Dnetworkd=false \
-%if ! %{?WITH_MACHINED}
+%if ! 0%{?WITH_MACHINED}
        -Dmachined=false \
 %endif
-%if ! %{?WITH_HOSTNAMED}
+%if ! 0%{?WITH_HOSTNAMED}
        -Dhostnamed=false \
 %endif
        -Dimportd=false \
        -Denvironment-d=false \
        -Dnss-systemd=false \
        -Dgcrypt=false \
-%if ! %{?WITH_DOC}
+%if ! 0%{?WITH_DOC}
        -Dman=false \
 %endif
        -Dportabled=false \
@@ -323,8 +323,9 @@ rm -rf %{buildroot}/%{_prefix}/lib/systemd/system/systemd-volatile-root.service
 rm -rf %{buildroot}/%{_prefix}/lib/systemd/system/systemd-tmpfiles-clean.timer
 rm -rf %{buildroot}/%{_prefix}/lib/systemd/system/systemd-tmpfiles-clean.service
 rm -rf %{buildroot}/%{_prefix}/lib/systemd/system/timers.target.wants/systemd-tmpfiles-clean.timer
-rm -rf %{buildroot}/%{_prefix}/lib/systemd/system/systemd-remount-fs.service
-rm -rf %{buildroot}/%{_prefix}/lib/systemd/system/local-fs.target.wants/systemd-remount-fs.service
+rm -rf %{buildroot}/%{_prefix}/lib/systemd/user/systemd-tmpfiles-clean.timer
+rm -rf %{buildroot}/%{_prefix}/lib/systemd/user/systemd-tmpfiles-clean.service
+rm -rf %{buildroot}/%{_prefix}/lib/systemd/user/systemd-tmpfiles-setup.service
 
 # Exclude ELF binaries
 rm -f %{buildroot}/%{_prefix}/lib/systemd/systemd-update-utmp
@@ -345,10 +346,10 @@ install -D -m 755 %{_builddir}/%{name}-%{version}/send-booting-done %{buildroot}
 install -D -m 755 %{_builddir}/%{name}-%{version}/wait-target-done %{buildroot}%{_prefix}/lib/systemd/
 
 # Shell Completion
-%if ! %{?WITH_BASH_COMPLETION}
+%if ! 0%{?WITH_BASH_COMPLETION}
 rm -rf %{buildroot}/%{_datadir}/bash-completion/*
 %endif
-%if ! %{?WITH_ZSH_COMPLETION}
+%if ! 0%{?WITH_ZSH_COMPLETION}
 rm -rf %{buildroot}/%{_datadir}/zsh/site-functions/*
 %endif
 
@@ -383,7 +384,7 @@ install -m 0644 %{SOURCE6} %{buildroot}%{dbuspolicydir}/system.d/org.tizen.syste
 
 %post
 /usr/bin/systemd-machine-id-setup > /dev/null 2>&1 || :
-%if %{?WITH_RANDOMSEED}
+%if 0%{?WITH_RANDOMSEED}
 /usr/lib/systemd/systemd-random-seed save > /dev/null 2>&1 || :
 %endif
 /usr/bin/systemctl daemon-reexec > /dev/null 2>&1 || :
@@ -398,14 +399,14 @@ chsmack %{_bindir}/kernel-install -a "System::Tools"
 chsmack %{_bindir}/machinectl -a "System::Tools"
 %endif
 chsmack %{_bindir}/systemd-run -a "System::Tools"
-%if %{?WITH_HOSTNAMED}
+%if 0%{?WITH_HOSTNAMED}
 chsmack %{_bindir}/hostnamectl -a "System::Tools"
 %endif
 chsmack %{_bindir}/localectl -a "System::Tools"
-%if %{?WITH_COREDUMP}
+%if 0%{?WITH_COREDUMP}
 chsmack %{_bindir}/coredumpctl -a "System::Tools"
 %endif
-%if %{?WITH_TIMEDATED}
+%if 0%{?WITH_TIMEDATED}
 chsmack %{_bindir}/timedatectl -a "System::Tools"
 %endif
 chsmack %{_bindir}/systemd -a "System::Tools"
@@ -430,7 +431,7 @@ chsmack %{_bindir}/udevadm -a "System::Tools"
 chsmack %{_bindir}/systemd-escape -a "System::Tools"
 chsmack %{_bindir}/systemd-path -a "System::Tools"
 chsmack %{_prefix}/lib/systemd/* -a "System::Tools"
-%if %{?WITH_VIRT}
+%if 0%{?WITH_VIRT}
 chsmack %{_bindir}/systemd-detect-virt -a "System::Tools"
 %endif
 
@@ -472,7 +473,7 @@ fi
 %config %{_sysconfdir}/pam.d/systemd-user
 %{_bindir}/busctl
 %{_bindir}/kernel-install
-%if %{?WITH_MACHINED}
+%if 0%{?WITH_MACHINED}
 %{_bindir}/machinectl
 %endif
 %{_bindir}/systemd-run
@@ -481,14 +482,14 @@ fi
 %{_prefix}/lib/kernel/install.d/00-entry-directory.install
 %{_prefix}/lib/kernel/install.d/50-depmod.install
 %{_prefix}/lib/kernel/install.d/90-loaderentry.install
-%if %{?WITH_HOSTNAMED}
+%if 0%{?WITH_HOSTNAMED}
 %{_bindir}/hostnamectl
 %endif
 %{_bindir}/localectl
-%if %{?WITH_COREDUMP}
+%if 0%{?WITH_COREDUMP}
 %{_bindir}/coredumpctl
 %endif
-%if %{?WITH_TIMEDATED}
+%if 0%{?WITH_TIMEDATED}
 %{_bindir}/timedatectl
 %endif
 %dir %{_sysconfdir}/systemd
@@ -498,10 +499,10 @@ fi
 %dir %{_sysconfdir}/sysctl.d
 %dir %{_sysconfdir}/modules-load.d
 %dir %{_sysconfdir}/binfmt.d
-%if %{?WITH_BASH_COMPLETION}
+%if 0%{?WITH_BASH_COMPLETION}
 %{_datadir}/bash-completion/*
 %endif
-%if %{?WITH_ZSH_COMPLETION}
+%if 0%{?WITH_ZSH_COMPLETION}
 %dir %{_datadir}/zsh/site-functions
 %{_datadir}/zsh/site-functions/*
 %endif
@@ -522,19 +523,19 @@ fi
 %dir %{_prefix}/lib/firmware
 %dir %{_prefix}/lib/firmware/updates
 %dir %{_datadir}/systemd
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.systemd1.conf
-%if %{?WITH_HOSTNAMED}
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.hostname1.conf
+%config(noreplace) %{dbuspolicydir}/system.d/org.freedesktop.systemd1.conf
+%if 0%{?WITH_HOSTNAMED}
+%config(noreplace) %{dbuspolicydir}/system.d/org.freedesktop.hostname1.conf
 %endif
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.login1.conf
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.locale1.conf
-%if %{?WITH_TIMEDATED}
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.timedate1.conf
+%config(noreplace) %{dbuspolicydir}/system.d/org.freedesktop.login1.conf
+%config(noreplace) %{dbuspolicydir}/system.d/org.freedesktop.locale1.conf
+%if 0%{?WITH_TIMEDATED}
+%config(noreplace) %{dbuspolicydir}/system.d/org.freedesktop.timedate1.conf
 %endif
-%if %{?WITH_MACHINED}
-%config(noreplace) %{_sysconfdir}/dbus-1/system.d/org.freedesktop.machine1.conf
+%if 0%{?WITH_MACHINED}
+%config(noreplace) %{dbuspolicydir}/system.d/org.freedesktop.machine1.conf
 %endif
-%if %{?WITH_COREDUMP}
+%if 0%{?WITH_COREDUMP}
 %config(noreplace) %{_sysconfdir}/systemd/coredump.conf
 %endif
 %config(noreplace) %{_sysconfdir}/systemd/system.conf
@@ -542,6 +543,7 @@ fi
 %config(noreplace) %{_sysconfdir}/systemd/logind.conf
 %config(noreplace) %{_sysconfdir}/systemd/journald.conf
 %config(noreplace) %{_sysconfdir}/udev/udev.conf
+%config(noreplace) %{_sysconfdir}/systemd/sleep.conf
 %{_sysconfdir}/xdg/systemd
 %ghost %config(noreplace) %{_sysconfdir}/hostname
 %ghost %config(noreplace) %{_sysconfdir}/vconsole.conf
@@ -568,14 +570,16 @@ fi
 %{_bindir}/systemd-cgtop
 %{_bindir}/systemd-delta
 %{_bindir}/systemd-inhibit
+%{_bindir}/systemd-id128
 %{_bindir}/udevadm
 %{_bindir}/systemd-escape
 %{_bindir}/systemd-path
+%{_bindir}/systemd-mount
+%{_bindir}/systemd-umount
 %{_prefix}/lib/sysctl.d/*.conf
 %{_prefix}/lib/systemd/systemd
 %{_prefix}/lib/systemd/system
-%exclude %{_prefix}/lib/systemd/resolv.conf
-%if %{?WITH_VIRT}
+%if 0%{?WITH_VIRT}
 %{_bindir}/systemd-detect-virt
 %endif
 
@@ -594,12 +598,12 @@ fi
 %{_prefix}/lib/systemd/user/paths.target
 %{_prefix}/lib/systemd/user/smartcard.target
 %{_prefix}/lib/systemd/user/timers.target
-%exclude %{_prefix}/lib/systemd/network/80-container-ve.network
-%exclude %{_prefix}/lib/systemd/network/80-container-host0.network
-%exclude %{_prefix}/lib/systemd/network/80-container-vz.network
 %{_prefix}/lib/systemd/user/default.target
+%exclude %{_prefix}/lib/systemd/user/graphical-session.target
+%exclude %{_prefix}/lib/systemd/user/graphical-session-pre.target
 %{_prefix}/lib/systemd/network/99-default.link
 %exclude %{_prefix}/lib/systemd/system-preset/90-systemd.preset
+%exclude %{_prefix}/lib/systemd/user-preset/90-systemd.preset
 %{_prefix}/lib/systemd/user/delayed.target
 %{_prefix}/lib/systemd/user/user-delayed-target-trigger.service
 %{_prefix}/lib/systemd/user/default.target.wants/user-delayed-target-trigger.service
@@ -607,27 +611,30 @@ fi
 %{_prefix}/lib/systemd/user/default.target.wants/user-default-target-done.service
 %{_prefix}/lib/systemd/user/user-delayed-target-done.service
 %{_prefix}/lib/systemd/user/delayed.target.wants/user-delayed-target-done.service
-%{_sysconfdir}/dbus-1/system.d/org.tizen.system.conf
+%{dbuspolicydir}/system.d/org.tizen.system.conf
+%exclude %{_prefix}/lib/modprobe.d/systemd.conf
 
-%{_prefix}/lib/systemd/libsystemd-shared-231.so
-%{_prefix}/lib/systemd/libsystemd-shared.so
+%{_prefix}/lib/systemd/libsystemd-shared-%{version}.so
 %{_prefix}/lib/systemd/systemd-*
 %dir %{_prefix}/lib/systemd/catalog
 %{_prefix}/lib/systemd/catalog/systemd.catalog
 %{_prefix}/lib/udev
 %{_prefix}/lib/systemd/system-generators/systemd-getty-generator
 %{_prefix}/lib/systemd/system-generators/systemd-system-update-generator
-%{_prefix}/lib/tmpfiles.d/etc.conf
 %{_prefix}/lib/tmpfiles.d/home.conf
 %{_prefix}/lib/tmpfiles.d/journal-nocow.conf
 %{_prefix}/lib/tmpfiles.d/legacy.conf
 %{_prefix}/lib/tmpfiles.d/pamconsole-tmp.conf
 %{_prefix}/lib/tmpfiles.d/systemd.conf
 %{_prefix}/lib/tmpfiles.d/systemd-nologin.conf
+%if 0%{?WITH_MACHINED}
 %{_prefix}/lib/tmpfiles.d/systemd-nspawn.conf
+%endif
 %{_prefix}/lib/tmpfiles.d/tmp.conf
 %{_prefix}/lib/tmpfiles.d/var.conf
 %{_prefix}/lib/tmpfiles.d/x11.conf
+%{_prefix}/lib/tmpfiles.d/static-nodes-permissions.conf
+%{_prefix}/lib/tmpfiles.d/systemd-tmp.conf
 %{_sbindir}/init
 %{_sbindir}/reboot
 %{_sbindir}/halt
@@ -641,15 +648,18 @@ fi
 %{_datadir}/systemd/language-fallback-map
 %{_datadir}/dbus-1/services/org.freedesktop.systemd1.service
 %{_datadir}/dbus-1/system-services/org.freedesktop.systemd1.service
-%if %{?WITH_HOSTNAMED}
+%if 0%{?WITH_HOSTNAMED}
 %{_datadir}/dbus-1/system-services/org.freedesktop.hostname1.service
 %endif
 %{_datadir}/dbus-1/system-services/org.freedesktop.login1.service
 %{_datadir}/dbus-1/system-services/org.freedesktop.locale1.service
-%if %{?WITH_TIMEDATED}
+%exclude %{_datadir}/polkit-1/actions/org.freedesktop.systemd1.policy
+%exclude %{_datadir}/polkit-1/actions/org.freedesktop.login1.policy
+%exclude %{_datadir}/polkit-1/actions/org.freedesktop.locale1.policy
+%if 0%{?WITH_TIMEDATED}
 %{_datadir}/dbus-1/system-services/org.freedesktop.timedate1.service
 %endif
-%if %{?WITH_MACHINED}
+%if 0%{?WITH_MACHINED}
 %{_datadir}/dbus-1/system-services/org.freedesktop.machine1.service
 %endif
 %dir %{_datadir}/factory/
@@ -682,7 +692,7 @@ fi
 %{_libdir}/libsystemd.so.*
 %{_libdir}/libudev.so.*
 %{_libdir}/libnss_myhostname.so.2
-%if %{?WITH_MACHINED}
+%if 0%{?WITH_MACHINED}
 %{_libdir}/libnss_mymachines.so.2
 %endif
 
@@ -722,6 +732,6 @@ fi
 %{_prefix}/lib/dbus-tests/test-suites/systemd-tests/
 %{_prefix}/lib/dbus-tests/runner/systemd-tests
 
-%if %{?WITH_DOC}
+%if 0%{?WITH_DOC}
 %docs_package
 %endif