Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

- enable SELinux per default #792

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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