packaing: Add WITH_SMACK option to switch smack feature 89/309189/2 accepted/tizen_unified accepted/tizen_unified_x accepted/tizen/unified/20240409.135542 accepted/tizen/unified/20240409.155850 accepted/tizen/unified/x/20240411.011812
authorMarek Szyprowski <m.szyprowski@samsung.com>
Fri, 5 Apr 2024 10:00:55 +0000 (19:00 +0900)
committerChanwoo Choi <cw00.choi@samsung.com>
Fri, 5 Apr 2024 10:13:13 +0000 (19:13 +0900)
Add WITH_SMACK option to switch smack feature during compile time.
- If WITH_SMACK is 1, systemd requires SMACK feature for security.
- If WITH_SMACK is 0, systemd doesn't require SMACK feature.

Change-Id: If4a4a6f24d9f34b4cb44b28324341d46f2193d9f
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com>
packaging/systemd.spec

index 073ff31..fd3ad0f 100644 (file)
@@ -13,6 +13,7 @@
 %define WITH_DOC 0
 %define WITH_HOSTNAMED 0
 %define WITH_VIRT 1
+%define WITH_SMACK 1
 
 %define build_dir _build
 %define dbuspolicydir %{_datadir}/dbus-1
@@ -182,6 +183,9 @@ cp %{SOURCE8} .
 %define _vpath_builddir %{build_dir}
 %meson \
        -Dkdbus=true \
+%if ! 0%{?WITH_SMACK}
+       -Dsmack=false \
+%endif
 %if ! 0%{?WITH_VIRT}
        -Dvirt=false \
 %endif
@@ -228,7 +232,9 @@ cp %{SOURCE8} .
        -Drpmmacrosdir=%{_sysconfdir}/rpm/ \
        -Dsysvinit-path="" \
        -Dsysvrcnd-path="" \
+%if 0%{?WITH_SMACK}
        -Dsmack-run-label=System::Privileged \
+%endif
        -Dinstall-tests=true \
        -Ddefault-hierarchy=legacy \
        -Db_pie=true