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
|
|
|
#
|
2015-07-30 14:06:49 +02:00
|
|
|
# Copyright (c) 2015 SUSE LINUX Products 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.
|
|
|
|
|
2008-08-03 04:41:25 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
|
2014-05-19 09:31:10 +02:00
|
|
|
%define libsepol_ver 2.3
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
Name: libselinux
|
2014-05-19 09:31:10 +02:00
|
|
|
Version: 2.3
|
2012-06-04 15:46:09 +02:00
|
|
|
Release: 0
|
2012-07-25 13:14:53 +02:00
|
|
|
Url: http://userspace.selinuxproject.org/
|
2008-08-03 04:41:25 +02:00
|
|
|
Summary: SELinux library and simple utilities
|
2012-11-27 15:46:54 +01:00
|
|
|
License: GPL-2.0 and SUSE-Public-Domain
|
2012-06-04 15:46:09 +02:00
|
|
|
Group: System/Libraries
|
2013-05-27 10:46:56 +02:00
|
|
|
|
2014-05-19 12:09:35 +02:00
|
|
|
Source: http://userspace.selinuxproject.org/releases/20140506/%{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
|
2013-11-07 11:18:12 +01:00
|
|
|
Patch1: %{name}-2.2-ruby.patch
|
2008-08-03 04:41:25 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
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
|
|
|
|
BuildRequires: pkg-config
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%description
|
2008-08-22 19:31:21 +02:00
|
|
|
Security-enhanced Linux is a feature of the Linux(R) kernel and a
|
|
|
|
number of utilities with enhanced security functionality designed to
|
|
|
|
add mandatory access controls to Linux. The Security-enhanced Linux
|
|
|
|
kernel contains new architectural components originally developed to
|
|
|
|
improve the security of the Flask operating system. These architectural
|
2008-08-03 04:41:25 +02:00
|
|
|
components provide general support for the enforcement of many kinds of
|
|
|
|
mandatory access control policies, including those based on the
|
2008-08-22 19:31:21 +02:00
|
|
|
concepts of Type Enforcement(R), Role-based Access Control, and
|
2008-08-03 04:41:25 +02:00
|
|
|
Multi-level Security.
|
|
|
|
|
|
|
|
libselinux provides an API for SELinux applications to get and set
|
|
|
|
process and file security contexts and to obtain security policy
|
|
|
|
decisions. Required for any applications that use the SELinux API.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package -n libselinux1
|
|
|
|
Summary: SELinux library and simple utilities
|
2012-06-04 15:46:09 +02:00
|
|
|
Group: System/Libraries
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%description -n libselinux1
|
2008-08-22 19:31:21 +02:00
|
|
|
Security-enhanced Linux is a feature of the Linux(R) kernel and a
|
|
|
|
number of utilities with enhanced security functionality designed to
|
|
|
|
add mandatory access controls to Linux. The Security-enhanced Linux
|
|
|
|
kernel contains new architectural components originally developed to
|
|
|
|
improve the security of the Flask operating system. These architectural
|
2008-08-03 04:41:25 +02:00
|
|
|
components provide general support for the enforcement of many kinds of
|
|
|
|
mandatory access control policies, including those based on the
|
2008-08-22 19:31:21 +02:00
|
|
|
concepts of Type Enforcement(R), Role-based Access Control, and
|
2008-08-03 04:41:25 +02:00
|
|
|
Multi-level Security.
|
|
|
|
|
|
|
|
libselinux provides an API for SELinux applications to get and set
|
|
|
|
process and file security contexts and to obtain security policy
|
|
|
|
decisions. Required for any applications that use the SELinux API.
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%package -n selinux-tools
|
2008-08-03 04:41:25 +02:00
|
|
|
Summary: SELinux library and simple 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
|
|
|
|
Security-enhanced Linux is a feature of the Linux(R) kernel and a
|
|
|
|
number of utilities with enhanced security functionality designed to
|
|
|
|
add mandatory access controls to Linux. The Security-enhanced Linux
|
|
|
|
kernel contains new architectural components originally developed to
|
|
|
|
improve the security of the Flask operating system. These architectural
|
2008-08-03 04:41:25 +02:00
|
|
|
components provide general support for the enforcement of many kinds of
|
|
|
|
mandatory access control policies, including those based on the
|
2008-08-22 19:31:21 +02:00
|
|
|
concepts of Type Enforcement(R), Role-based Access Control, and
|
2008-08-03 04:41:25 +02:00
|
|
|
Multi-level Security.
|
|
|
|
|
|
|
|
libselinux provides an API for SELinux applications to get and set
|
|
|
|
process and file security contexts and to obtain security policy
|
|
|
|
decisions. Required for any applications that use the SELinux API.
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-08-22 19:31:21 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development Include Files and Libraries for SELinux
|
|
|
|
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
|
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
|
|
|
|
Summary: Static development Include Files and Libraries for SELinux
|
|
|
|
Group: Development/Libraries/C and C++
|
|
|
|
Requires: libselinux-devel = %{version}
|
|
|
|
|
|
|
|
%description devel-static
|
|
|
|
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
|
|
|
|
%setup -q
|
2012-06-04 15:46:09 +02:00
|
|
|
%patch1
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%build
|
2011-10-06 17:08:08 +02:00
|
|
|
make %{?_smp_mflags} LIBDIR="%{_libdir}" CC="%{__cc}" CFLAGS="$RPM_OPT_FLAGS"
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p $RPM_BUILD_ROOT/%{_lib}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_libdir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_includedir}
|
|
|
|
mkdir -p $RPM_BUILD_ROOT%{_sbindir}
|
2008-08-22 19:31:21 +02:00
|
|
|
make DESTDIR="$RPM_BUILD_ROOT" LIBDIR="$RPM_BUILD_ROOT%{_libdir}" SHLIBDIR="$RPM_BUILD_ROOT/%{_lib}" BINDIR="$RPM_BUILD_ROOT%{_sbindir}" install
|
2008-08-03 04:41:25 +02:00
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/compute_*
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/deftype
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/execcon
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/getenforcemode
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/getfilecon
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/getpidcon
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/mkdircon
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/policyvers
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/setfilecon
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/selinuxconfig
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/selinuxdisable
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/getseuser
|
|
|
|
rm -f $RPM_BUILD_ROOT%{_sbindir}/selinux_check_securetty_context
|
|
|
|
mv $RPM_BUILD_ROOT%{_sbindir}/getdefaultcon $RPM_BUILD_ROOT%{_sbindir}/selinuxdefcon
|
|
|
|
mv $RPM_BUILD_ROOT%{_sbindir}/getconlist $RPM_BUILD_ROOT%{_sbindir}/selinuxconlist
|
2009-07-03 16:04:45 +02:00
|
|
|
install -m 0755 %{SOURCE1} $RPM_BUILD_ROOT%{_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
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_sbindir}/avcstat
|
|
|
|
%{_sbindir}/getenforce
|
|
|
|
%{_sbindir}/getsebool
|
|
|
|
%{_sbindir}/matchpathcon
|
|
|
|
%{_sbindir}/selinuxconlist
|
|
|
|
%{_sbindir}/selinuxdefcon
|
|
|
|
%{_sbindir}/selinuxenabled
|
|
|
|
%{_sbindir}/setenforce
|
|
|
|
%{_sbindir}/togglesebool
|
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/*
|
|
|
|
%{_mandir}/man8/*
|
2008-08-22 19:31:21 +02:00
|
|
|
|
|
|
|
%files -n libselinux1
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
/%{_lib}/libselinux.so.*
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/libselinux.so
|
|
|
|
%dir %{_includedir}/selinux
|
|
|
|
%{_includedir}/selinux/*
|
|
|
|
%{_mandir}/man3/*
|
2010-03-12 17:35:22 +01:00
|
|
|
%{_libdir}/pkgconfig/libselinux.pc
|
|
|
|
|
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root,-)
|
|
|
|
%{_libdir}/libselinux.a
|
2008-08-03 04:41:25 +02:00
|
|
|
|
|
|
|
%changelog
|