From 26f6231c47cffb817a791ac792a413dc362cbec391054c45a72c3cc045f1f6e8 Mon Sep 17 00:00:00 2001 From: Franck Bui Date: Mon, 14 Feb 2022 07:34:49 +0000 Subject: [PATCH] - systemd.spec: explicitely turn on/off build options OBS-URL: https://build.opensuse.org/package/show/Base:System/systemd?expand=0&rev=1248 --- systemd.changes | 8 ++++ systemd.spec | 98 ++++++++++++++++++------------------------------- 2 files changed, 43 insertions(+), 63 deletions(-) diff --git a/systemd.changes b/systemd.changes index 0ab20e79..5f793260 100644 --- a/systemd.changes +++ b/systemd.changes @@ -1,3 +1,11 @@ +------------------------------------------------------------------- +Mon Feb 14 07:31:49 UTC 2022 - Franck Bui + +- systemd.spec: explicitely turn on/off build options + + Hence a feature can't be accidentally turned on/off because its dep is pulled + in or removed due to another feature being turned on/off. + ------------------------------------------------------------------- Fri Feb 4 15:22:43 UTC 2022 - Franck Bui diff --git a/systemd.spec b/systemd.spec index 4ef6b10e..33e1c2b4 100644 --- a/systemd.spec +++ b/systemd.spec @@ -17,7 +17,7 @@ # -# The git repository used to track all Suse specific changes can be +# The git repository used to track all SUSE specific changes can be # found at: https://github.com/openSUSE/systemd. # @@ -35,6 +35,9 @@ %define suse_version +suse.82.g117bd7f14a %define _testsuitedir /usr/lib/systemd/tests +# Similar to %with but returns true/false +%define when() %{expand:%%{?with_%{1}:true}%%{!?with_%{1}:false}} + %if 0%{?bootstrap} %bcond_with coredump %bcond_with importd @@ -134,6 +137,8 @@ BuildRequires: gnu-efi #!BuildIgnore: dbus-1 Requires: this-is-only-for-build-envs Provides: systemd = %{version}-%{release} +Conflicts: kiwi +Conflicts: systemd %else # the buildignore is important for bootstrapping #!BuildIgnore: udev @@ -157,11 +162,6 @@ Requires(post): findutils Requires(post): systemd-presets-branding Requires(post): pam-config >= 0.79-5 %endif - -%if 0%{?bootstrap} -Conflicts: kiwi -Conflicts: systemd -%endif Conflicts: filesystem < 11.5 Conflicts: mkinitrd < 2.7.0 Conflicts: sysvinit @@ -623,13 +623,21 @@ Have fun with these services at your own risk. -Dsplit-bin=true \ -Dsystem-uid-max=499 \ -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=%{_distconfdir}/X11/xinit/xinitrc.d \ -Drpmmacrosdir=no \ -Dcertificate-root=%{_sysconfdir}/pki/systemd \ - -Ddefault-hierarchy=unified \ - -Ddefault-kill-user-processes=false \ +%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 \ @@ -641,17 +649,6 @@ Have fun with these services at your own risk. -Dima=false \ -Delfutils=auto \ -Doomd=false \ -%if %{with experimental} - -Dpstore=true \ - -Drepart=true \ - -Dhomed=true \ - -Duserdb=true \ -%else - -Dpstore=false \ - -Drepart=false \ - -Dhomed=false \ - -Duserdb=false \ -%endif %if 0%{?bootstrap} -Dbashcompletiondir=no \ -Dzshcompletiondir=no \ @@ -663,53 +660,28 @@ Have fun with these services at your own risk. -Dman=true \ -Dhtml=true \ %endif -%if %{without coredump} - -Dcoredump=false \ -%endif -%if %{without sd_boot} - -Defi=false \ - -Dgnu-efi=false \ -%else - -Defi=true \ - -Dgnu-efi=true \ -%endif -%if %{without importd} - -Dimportd=false \ -%endif -%if %{without journal_remote} - -Dremote=false \ -%endif -%if %{without portabled} - -Dportabled=false \ -%endif -%if %{without machined} - -Dmachined=false \ -%endif -%if %{without networkd} - -Dnetworkd=false \ -%endif -%if %{without resolved} - -Dresolve=false \ -%else + -Dcoredump=%{when coredump} \ + -Dimportd=%{when importd} \ + -Dmachined=%{when machined} \ + -Dnetworkd=%{when networkd} \ + -Dportabled=%{when portabled} \ + -Dremote=%{when journal_remote} \ + \ + -Defi=%{when sd_boot} \ + -Dgnu-efi=%{when sd_boot} \ + \ + -Dresolve=%{when resolved} \ -Ddns-servers='' \ -Ddefault-dnssec=no \ -Ddns-over-tls=openssl \ -%endif -%if %{without sysvcompat} - -Dsysvinit-path= \ - -Dsysvrcnd-path= \ -%endif -%if %{with testsuite} - -Dtests=unsafe \ - -Dinstall-tests=true \ -%else - -Dtests=false \ - -Dinstall-tests=false \ -%endif - -Dadm-group=false \ - -Dwheel-group=false \ - -Dgshadow=false \ - -Dldconfig=false + \ + -Dpstore=%{when experimental} \ + -Drepart=%{when experimental} \ + -Dhomed=%{when experimental} \ + -Duserdb=%{when experimental} \ + \ + -Dtests=%{?with_testsuite:unsafe}%{!?with_testsuite:false} \ + -Dinstall-tests=%{when testsuite} %meson_build