File selinux-sandbox.spec of Package selinux-sandbox
#
# spec file for package selinux-sandbox
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: selinux-sandbox
BuildArch: noarch
Version: 3.9
Release: 0
Summary: SELinux sandbox helper
License: GPL-2.0-or-later
Group: System/Management
URL: https://github.com/SELinuxProject/selinux/wiki
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz
Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz.asc
Source2: selinux-sandbox.keyring
BuildRequires: libcap-ng-devel
BuildRequires: libselinux-devel
Requires(pre): permissions
Requires(post): %fillup_prereq
%description
Run an application within a tightly confined SELinux domain. The default
sandbox domain only allows applications the ability to read and write stdin,
stdout and any other file descriptors handed to it.
%lang_package
%prep
%setup -q
%build
export CFLAGS="%{optflags}"
%make_build LIBDIR="%{_libdir}"
%install
%make_install
mkdir %{buildroot}%{_fillupdir}/
mv %{buildroot}%{_sysconfdir}/sysconfig/sandbox %{buildroot}%{_fillupdir}/sysconfig.sandbox
%find_lang selinux-sandbox
%post
%{fillup_only -n sandbox}
%set_permissions %{_sbindir}/seunshare
%verifyscript
%verify_permissions -e %{_sbindir}/seunshare
%files
%{_bindir}/sandbox
%{_mandir}/man5/sandbox.5%{?ext_man}
%{_mandir}/man8/sandbox.8%{?ext_man}
%{_mandir}/man8/seunshare.8%{?ext_man}
%{_datadir}/sandbox/sandboxX.sh
%{_datadir}/sandbox/start
%{_fillupdir}/sysconfig.sandbox
%dir /usr/share/sandbox
%attr(4755,root,root) %{_sbindir}/seunshare
%files lang -f %{name}.lang
%{_datadir}/locale/*/LC_MESSAGES/selinux-sandbox.mo
%changelog