+-------------------------------------------------------------------
+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
#
# 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
%define pam_security_dir /%{_lib}/security
%endif
+# Optionally build without SELinux support
+%bcond_without selinux
+
# Optionally build with test coverage reporting
%bcond_with coverage
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
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}