Skip to content

Commit

Permalink
Merge pull request #792 from aschnell/master
Browse files Browse the repository at this point in the history
- enable SELinux per default
  • Loading branch information
aschnell committed Mar 21, 2023
2 parents 1e70c42 + 561f1b3 commit df8165a
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 9 deletions.
2 changes: 1 addition & 1 deletion Makefile.repo
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions package/snapper.changes
Original file line number Diff line number Diff line change
@@ -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

Expand Down
17 changes: 9 additions & 8 deletions snapper.spec.in
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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}

Expand Down

0 comments on commit df8165a

Please sign in to comment.