2008-08-05 04:42:57 +02:00
|
|
|
#
|
2011-02-23 11:02:51 +01:00
|
|
|
# spec file for package libsemanage
|
2008-08-05 04:42:57 +02:00
|
|
|
#
|
2016-07-13 09:19:36 +02:00
|
|
|
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
2008-08-05 04:42:57 +02:00
|
|
|
#
|
2008-09-02 12:29:51 +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-05 04:42:57 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
2011-05-24 13:33:19 +02:00
|
|
|
|
2016-07-13 09:19:36 +02:00
|
|
|
Name: libsemanage
|
|
|
|
Version: 2.5
|
|
|
|
Release: 0
|
|
|
|
Summary: SELinux binary policy manipulation library
|
|
|
|
License: LGPL-2.1+
|
|
|
|
Group: System/Libraries
|
|
|
|
Url: https://github.com/SELinuxProject/selinux/wiki/Releases
|
|
|
|
Source: https://raw.githubusercontent.com/wiki/SELinuxProject/selinux/files/releases/20160223/%{name}-%{version}.tar.gz
|
|
|
|
Source1: baselibs.conf
|
|
|
|
Source2: semanage.conf
|
2016-07-14 16:27:12 +02:00
|
|
|
Patch0: suse_path.patch
|
2013-11-07 11:20:19 +01:00
|
|
|
BuildRequires: audit-devel
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: bison
|
2013-11-07 11:20:19 +01:00
|
|
|
BuildRequires: fdupes
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: flex
|
2011-09-22 13:24:33 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2012-08-01 09:57:49 +02:00
|
|
|
BuildRequires: libselinux-devel
|
|
|
|
BuildRequires: libsepol-devel
|
2011-09-22 13:24:33 +02:00
|
|
|
BuildRequires: libustr-devel
|
2008-08-05 04:42:57 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
|
|
|
|
%description
|
2010-03-09 15:46:15 +01:00
|
|
|
Security-enhanced Linux is a feature of the Linux kernel and a number
|
|
|
|
of utilities with enhanced security functionality designed to add
|
|
|
|
mandatory access controls to Linux. The Security-enhanced Linux
|
2008-09-02 12:29:51 +02:00
|
|
|
kernel contains new architectural components originally developed to
|
2010-03-09 15:46:15 +01:00
|
|
|
improve the security of the Flask operating system. These
|
|
|
|
architectural components provide general support for the enforcement
|
|
|
|
of many kinds of mandatory access control policies, including those
|
|
|
|
based on the concepts of Type Enforcement, Role-based Access
|
|
|
|
Control, and Multi-level Security.
|
2008-08-05 04:42:57 +02:00
|
|
|
|
2010-03-09 15:46:15 +01:00
|
|
|
libsemanage provides an API for the manipulation of SELinux binary policies.
|
|
|
|
It is used by checkpolicy (the policy compiler) and similar tools, as well
|
|
|
|
as by programs like load_policy that need to perform specific transformations
|
|
|
|
on binary policies such as customizing policy boolean settings.
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%package -n libsemanage1
|
|
|
|
Summary: SELinux binary policy manipulation library
|
2011-05-23 16:20:28 +02:00
|
|
|
Group: System/Libraries
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%description -n libsemanage1
|
2010-03-09 15:46:15 +01:00
|
|
|
Security-enhanced Linux is a feature of the Linux kernel and a
|
2008-09-02 12:29:51 +02:00
|
|
|
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-05 04:42:57 +02:00
|
|
|
components provide general support for the enforcement of many kinds of
|
|
|
|
mandatory access control policies, including those based on the
|
2010-03-09 15:46:15 +01:00
|
|
|
concepts of Type Enforcement, Role-based Access Control, and
|
2008-08-05 04:42:57 +02:00
|
|
|
Multi-level Security.
|
|
|
|
|
|
|
|
libsemanage provides an API for the manipulation of SELinux binary
|
|
|
|
policies. It is used by checkpolicy (the policy compiler) and similar
|
|
|
|
tools, as well as by programs like load_policy that need to perform
|
|
|
|
specific transformations on binary policies such as customizing policy
|
|
|
|
boolean settings.
|
|
|
|
|
|
|
|
%package devel
|
2010-03-09 15:46:15 +01:00
|
|
|
Summary: Header files and libraries used to build policy manipulation tools
|
|
|
|
Group: Development/Libraries
|
2016-07-13 09:19:36 +02:00
|
|
|
# FIXME: use correct group, see "https://en.opensuse.org/openSUSE:Package_group_guidelines"
|
2011-05-23 16:20:28 +02:00
|
|
|
Requires: libsemanage1 = %{version}
|
|
|
|
Requires: libustr-devel
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%description devel
|
2010-03-09 15:46:15 +01:00
|
|
|
The semanage-devel package contains the libraries and header files
|
|
|
|
needed for developing applications that manipulate binary policies.
|
2008-08-05 04:42:57 +02:00
|
|
|
|
2010-03-09 15:46:15 +01:00
|
|
|
%package devel-static
|
|
|
|
Summary: SELinux binary policy manipulation library
|
|
|
|
Group: System/Libraries
|
|
|
|
Requires: libsemanage-devel
|
2008-08-05 04:42:57 +02:00
|
|
|
|
2010-03-09 15:46:15 +01:00
|
|
|
%description devel-static
|
|
|
|
The semanage-static package contains the static libraries
|
|
|
|
needed for developing applications that manipulate binary policies.
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%prep
|
|
|
|
%setup -q
|
2016-07-14 16:27:12 +02:00
|
|
|
%patch0 -p0
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%build
|
2016-07-13 09:19:36 +02:00
|
|
|
make %{?_smp_mflags} clean
|
|
|
|
make -j1 CFLAGS="%{optflags}" CC="gcc"
|
|
|
|
make -j1 CFLAGS="%{optflags}" LIBDIR="%{_libdir}" LIBEXECDIR="%{_libexecdir}" SHLIBDIR="%{_lib}" CC="gcc" all
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%install
|
2011-05-23 16:20:28 +02:00
|
|
|
mkdir -p %{buildroot}/%{_lib}
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
2016-07-13 09:19:36 +02:00
|
|
|
make DESTDIR=%{buildroot} LIBDIR="%{buildroot}%{_libdir}" LIBEXECDIR="%{buildroot}%{_libexecdir}" SHLIBDIR="%{buildroot}/%{_lib}" install
|
|
|
|
ln -sf %{_libdir}/libsemanage.so.1 %{buildroot}/%{_libdir}/libsemanage.so
|
2014-02-12 10:12:21 +01:00
|
|
|
cp %{SOURCE2} %{buildroot}%{_sysconfdir}/selinux/semanage.conf
|
2013-11-07 11:20:19 +01:00
|
|
|
# Remove duplicate files
|
|
|
|
%fdupes -s %{buildroot}%{_mandir}
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%post -n libsemanage1 -p /sbin/ldconfig
|
|
|
|
%postun -n libsemanage1 -p /sbin/ldconfig
|
|
|
|
|
|
|
|
%files -n libsemanage1
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %{_sysconfdir}/selinux
|
|
|
|
%config(noreplace) %{_sysconfdir}/selinux/semanage.conf
|
2016-07-13 09:19:36 +02:00
|
|
|
%{_libdir}/libsemanage.so.*
|
2008-08-05 04:42:57 +02:00
|
|
|
|
|
|
|
%files devel
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libsemanage.so
|
2010-03-09 15:46:15 +01:00
|
|
|
%{_libdir}/pkgconfig/libsemanage.pc
|
2016-07-13 09:19:36 +02:00
|
|
|
%dir %{_libexecdir}/selinux
|
|
|
|
%{_libexecdir}/selinux/semanage_migrate_store
|
2008-08-05 04:42:57 +02:00
|
|
|
%dir %{_includedir}/semanage
|
|
|
|
%{_includedir}/semanage/*.h
|
|
|
|
%{_mandir}/man3/*
|
2012-08-01 14:02:55 +02:00
|
|
|
%{_mandir}/man5/*
|
2008-08-05 04:42:57 +02:00
|
|
|
|
2010-03-09 15:46:15 +01:00
|
|
|
%files devel-static
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%{_libdir}/libsemanage.a
|
|
|
|
|
2008-08-05 04:42:57 +02:00
|
|
|
%changelog
|