2008-08-03 04:41:25 +02:00
|
|
|
#
|
2011-10-06 17:08:08 +02:00
|
|
|
# spec file for package libselinux
|
2008-08-03 04:41:25 +02:00
|
|
|
#
|
2019-01-04 15:49:04 +01:00
|
|
|
# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-08-03 04:41:25 +02:00
|
|
|
#
|
2008-08-22 19:31:21 +02:00
|
|
|
# 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.
|
|
|
|
|
2019-04-26 09:36:49 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2008-08-03 04:41:25 +02:00
|
|
|
#
|
|
|
|
|
|
|
|
|
2019-03-21 10:41:17 +01:00
|
|
|
%define libsepol_ver 2.9
|
2008-08-03 04:41:25 +02:00
|
|
|
Name: libselinux
|
2019-03-21 10:41:17 +01:00
|
|
|
Version: 2.9
|
2012-06-04 15:46:09 +02:00
|
|
|
Release: 0
|
2016-07-26 16:56:29 +02:00
|
|
|
Summary: SELinux runtime library and utilities
|
2019-05-24 14:37:42 +02:00
|
|
|
License: SUSE-Public-Domain
|
2016-07-26 16:56:29 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2018-12-12 10:16:33 +01:00
|
|
|
URL: https://github.com/SELinuxProject/selinux/wiki/Releases
|
2019-03-21 10:41:17 +01:00
|
|
|
Source: https://github.com/SELinuxProject/selinux/releases/download/20190315/%{name}-%{version}.tar.gz
|
2009-07-03 16:04:45 +02:00
|
|
|
Source1: selinux-ready
|
2010-01-14 15:19:14 +01:00
|
|
|
Source2: baselibs.conf
|
2017-08-03 10:16:09 +02:00
|
|
|
# PATCH-FIX-UPSTREAM Include <sys/uio.h> for readv prototype
|
|
|
|
Patch4: readv-proto.patch
|
2019-11-13 09:25:35 +01:00
|
|
|
Patch5: Use-Python-distutils-to-install-SELinux.patch
|
2013-11-07 11:18:12 +01:00
|
|
|
BuildRequires: fdupes
|
2013-05-27 10:46:56 +02:00
|
|
|
BuildRequires: libsepol-devel >= %{libsepol_ver}
|
|
|
|
BuildRequires: pcre-devel
|
2018-12-12 10:16:33 +01:00
|
|
|
BuildRequires: pkgconfig
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%description
|
2016-07-26 16:56:29 +02:00
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
security contexts and to obtain security policy decisions.
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%package -n libselinux1
|
2016-07-26 16:56:29 +02:00
|
|
|
Summary: SELinux runtime library
|
2012-06-04 15:46:09 +02:00
|
|
|
Group: System/Libraries
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%description -n libselinux1
|
2016-07-26 16:56:29 +02:00
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
security contexts and to obtain security policy decisions.
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2016-07-26 16:56:29 +02:00
|
|
|
(Security-enhanced Linux is a feature of the kernel and some
|
|
|
|
utilities that implement mandatory access control policies, such as
|
|
|
|
Type Enforcement, Role-based Access Control and Multi-Level
|
|
|
|
Security.)
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%package -n selinux-tools
|
2016-07-26 16:56:29 +02:00
|
|
|
Summary: SELinux command-line utilities
|
2012-06-04 15:46:09 +02:00
|
|
|
Group: System/Base
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%description -n selinux-tools
|
2016-07-26 16:56:29 +02:00
|
|
|
Security-enhanced Linux is a feature of the kernel and some
|
|
|
|
utilities that implement mandatory access control policies, such as
|
|
|
|
Type Enforcement, Role-based Access Control and Multi-Level
|
|
|
|
Security.
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2016-07-26 16:56:29 +02:00
|
|
|
This subpackage contains utilities to inspect and administer the
|
|
|
|
system's SELinux state.
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%package devel
|
2016-07-26 16:56:29 +02:00
|
|
|
Summary: Development files for the SELinux runtime library
|
2008-08-22 19:31:21 +02:00
|
|
|
Group: Development/Libraries/C and C++
|
2012-06-11 11:09:02 +02:00
|
|
|
Requires: glibc-devel
|
2009-07-03 16:04:45 +02:00
|
|
|
Requires: libselinux1 = %{version}
|
2013-05-27 10:46:56 +02:00
|
|
|
#Automatic dependency on libsepol-devel via pkgconfig
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%description devel
|
2016-07-26 16:56:29 +02:00
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
security contexts and to obtain security policy decisions.
|
|
|
|
|
2010-03-12 17:35:22 +01:00
|
|
|
This package contains the development files, which are
|
2008-08-22 19:31:21 +02:00
|
|
|
necessary to develop your own software using libselinux.
|
2008-08-03 04:41:25 +02:00
|
|
|
|
2010-03-12 17:35:22 +01:00
|
|
|
%package devel-static
|
2016-07-26 16:56:29 +02:00
|
|
|
Summary: Static archives for the SELinux runtime
|
2010-03-12 17:35:22 +01:00
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libselinux-devel = %{version}
|
2016-07-26 14:15:13 +02:00
|
|
|
Requires: pkgconfig(libpcre)
|
|
|
|
Requires: pkgconfig(libsepol)
|
2010-03-12 17:35:22 +01:00
|
|
|
|
|
|
|
%description devel-static
|
2016-07-26 16:56:29 +02:00
|
|
|
libselinux provides an interface to get and set process and file
|
|
|
|
security contexts and to obtain security policy decisions.
|
|
|
|
|
2010-03-12 17:35:22 +01:00
|
|
|
This package contains the static development files, which are
|
|
|
|
necessary to develop your own software using libselinux.
|
|
|
|
|
2008-08-03 04:41:25 +02:00
|
|
|
%prep
|
2018-12-10 22:42:31 +01:00
|
|
|
%setup -q
|
2017-08-03 10:16:09 +02:00
|
|
|
%patch4 -p1
|
2019-11-13 09:25:35 +01:00
|
|
|
%patch5 -p2
|
2017-08-03 10:16:09 +02:00
|
|
|
|
2008-08-03 04:41:25 +02:00
|
|
|
%build
|
2019-04-26 09:36:49 +02:00
|
|
|
%define _lto_cflags %{nil}
|
2018-12-12 10:16:33 +01:00
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CC="gcc" CFLAGS="%{optflags}"
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%install
|
2018-12-12 10:16:33 +01:00
|
|
|
mkdir -p %{buildroot}/%{_lib}
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
|
|
|
mkdir -p %{buildroot}%{_sbindir}
|
|
|
|
make DESTDIR=%{buildroot} LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}" BINDIR="%{_sbindir}" install
|
|
|
|
rm -f %{buildroot}%{_sbindir}/compute_*
|
|
|
|
rm -f %{buildroot}%{_sbindir}/deftype
|
|
|
|
rm -f %{buildroot}%{_sbindir}/execcon
|
|
|
|
rm -f %{buildroot}%{_sbindir}/getenforcemode
|
|
|
|
rm -f %{buildroot}%{_sbindir}/getfilecon
|
|
|
|
rm -f %{buildroot}%{_sbindir}/getpidcon
|
|
|
|
rm -f %{buildroot}%{_sbindir}/mkdircon
|
|
|
|
rm -f %{buildroot}%{_sbindir}/policyvers
|
|
|
|
rm -f %{buildroot}%{_sbindir}/setfilecon
|
|
|
|
rm -f %{buildroot}%{_sbindir}/selinuxconfig
|
|
|
|
rm -f %{buildroot}%{_sbindir}/selinuxdisable
|
|
|
|
rm -f %{buildroot}%{_sbindir}/getseuser
|
|
|
|
rm -f %{buildroot}%{_sbindir}/selinux_check_securetty_context
|
|
|
|
mv %{buildroot}%{_sbindir}/getdefaultcon %{buildroot}%{_sbindir}/selinuxdefcon
|
|
|
|
mv %{buildroot}%{_sbindir}/getconlist %{buildroot}%{_sbindir}/selinuxconlist
|
|
|
|
install -m 0755 %{SOURCE1} %{buildroot}%{_sbindir}/selinux-ready
|
2013-11-07 11:18:12 +01:00
|
|
|
# Remove duplicate files
|
|
|
|
%fdupes -s %{buildroot}%{_mandir}
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%post -n libselinux1 -p /sbin/ldconfig
|
|
|
|
%postun -n libselinux1 -p /sbin/ldconfig
|
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%files -n selinux-tools
|
2008-08-03 04:41:25 +02:00
|
|
|
%{_sbindir}/avcstat
|
|
|
|
%{_sbindir}/getenforce
|
|
|
|
%{_sbindir}/getsebool
|
|
|
|
%{_sbindir}/matchpathcon
|
2016-07-13 09:22:28 +02:00
|
|
|
%{_sbindir}/selabel_digest
|
|
|
|
%{_sbindir}/selabel_lookup
|
2018-12-12 09:31:21 +01:00
|
|
|
%{_sbindir}/selinux_check_access
|
2016-07-13 09:22:28 +02:00
|
|
|
%{_sbindir}/selabel_lookup_best_match
|
|
|
|
%{_sbindir}/selabel_partial_match
|
2008-08-03 04:41:25 +02:00
|
|
|
%{_sbindir}/selinuxconlist
|
|
|
|
%{_sbindir}/selinuxdefcon
|
|
|
|
%{_sbindir}/selinuxenabled
|
|
|
|
%{_sbindir}/setenforce
|
|
|
|
%{_sbindir}/togglesebool
|
2018-12-12 09:31:21 +01:00
|
|
|
#%#{_sbindir}/selinux_restorecon
|
2009-07-03 16:04:45 +02:00
|
|
|
%{_sbindir}/selinux-ready
|
2012-07-25 15:33:06 +02:00
|
|
|
%{_sbindir}/selinuxexeccon
|
2013-01-31 16:22:24 +01:00
|
|
|
%{_sbindir}/sefcontext_compile
|
2008-08-03 04:41:25 +02:00
|
|
|
%{_mandir}/man5/*
|
2019-03-21 10:41:17 +01:00
|
|
|
%{_mandir}/ru/man5/*
|
2008-08-03 04:41:25 +02:00
|
|
|
%{_mandir}/man8/*
|
2019-03-21 10:41:17 +01:00
|
|
|
%{_mandir}/ru/man8/*
|
2008-08-22 19:31:21 +02:00
|
|
|
|
|
|
|
%files -n libselinux1
|
|
|
|
/%{_lib}/libselinux.so.*
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%{_libdir}/libselinux.so
|
2016-07-26 16:56:29 +02:00
|
|
|
%{_includedir}/selinux/
|
2008-08-03 04:41:25 +02:00
|
|
|
%{_mandir}/man3/*
|
2010-03-12 17:35:22 +01:00
|
|
|
%{_libdir}/pkgconfig/libselinux.pc
|
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%{_libdir}/libselinux.a
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%changelog
|