From eed98a569b78f04b824110fc9d01b6c6a4047751 Mon Sep 17 00:00:00 2001 From: Marek Szyprowski Date: Fri, 5 Apr 2024 19:00:55 +0900 Subject: [PATCH] packaing: Add WITH_SMACK option to switch smack feature 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 Signed-off-by: Chanwoo Choi --- packaging/systemd.spec | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packaging/systemd.spec b/packaging/systemd.spec index 073ff31..fd3ad0f 100644 --- a/packaging/systemd.spec +++ b/packaging/systemd.spec @@ -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 -- 2.7.4