From 561f1b3e257765b928c5ecd63b977cb948403bab Mon Sep 17 00:00:00 2001 From: Arvin Schnell Date: Tue, 21 Mar 2023 10:24:12 +0100 Subject: [PATCH] - enable SELinux per default --- Makefile.repo | 2 +- package/snapper.changes | 6 ++++++ snapper.spec.in | 17 +++++++++-------- 3 files changed, 16 insertions(+), 9 deletions(-) diff --git a/Makefile.repo b/Makefile.repo index 0db54d95..085f2706 100644 --- a/Makefile.repo +++ b/Makefile.repo @@ -11,7 +11,7 @@ endif PREFIX = /usr configure: all - ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB) + ./configure --prefix=$(PREFIX) --libdir=$(PREFIX)/$(LIB) --enable-selinux all: aclocal diff --git a/package/snapper.changes b/package/snapper.changes index ecf4441b..042f59a6 100644 --- a/package/snapper.changes +++ b/package/snapper.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Tue Mar 21 08:51:05 CET 2023 - aschnell@suse.com + +- enable SELinux (and allow to disable via conditional build) + (bsc#1209515) + ------------------------------------------------------------------- Thu Feb 23 11:14:58 CET 2023 - aschnell@suse.com diff --git a/snapper.spec.in b/snapper.spec.in index f99b18ea..0a0024aa 100644 --- a/snapper.spec.in +++ b/snapper.spec.in @@ -1,7 +1,7 @@ # # spec file for package snapper # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,9 @@ %define pam_security_dir /%{_lib}/security %endif +# Optionally build without SELinux support +%bcond_without selinux + # Optionally build with test coverage reporting %bcond_with coverage @@ -95,10 +98,12 @@ BuildRequires: libzypp(plugin:commit) BuildRequires: pam-devel %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} || 0%{?scientificlinux_version} BuildRequires: json-c-devel -BuildRequires: libselinux-devel %else BuildRequires: libjson-c-devel %endif +%if %{with selinux} +BuildRequires: libselinux-devel +%endif BuildRequires: zlib-devel %if %{with coverage} BuildRequires: lcov @@ -131,17 +136,13 @@ export CXXFLAGS="%{optflags} -DNDEBUG" autoreconf -fvi %configure \ --docdir="%{_defaultdocdir}/snapper" \ -%if %{with coverage} - --enable-coverage \ -%endif + %{?with_coverage:--enable-coverage} \ --with-pam-security="%{pam_security_dir}" \ %if ! 0%{?suse_version} --disable-rollback \ --disable-btrfs-quota \ %endif -%if 0%{?fedora_version} || 0%{?rhel_version} - --enable-selinux \ -%endif + %{?with_selinux:--enable-selinux} \ --disable-silent-rules --disable-ext4 make %{?_smp_mflags} -- 2.47.3