SHA256
1
0
forked from pool/libsepol
libsepol/libsepol.spec
Johannes Segitz 3c5f1f043d Accepting request 781799 from home:jsegitz:branches:security:SELinux
- Update to version 3.0
  * cil: Allow validatetrans rules to be resolved
  * cil: Report disabling an optional block only at high verbose levels
  * cil: do not dereference perm_value_to_cil when it has not been allocated
  * cil: fix mlsconstrain segfault
  * Further improve binary policy optimization
  * Make an unknown permission an error in CIL
  * Remove cil_mem_error_handler() function pointer
  * Use LIBSEPOL_3.0 and fix sepol_policydb_optimize symbol mapping
  * Add a function to optimize kernel policy
  * Add ebitmap_for_each_set_bit macro
  Dropped fnocommon.patch as it's included upstream

OBS-URL: https://build.opensuse.org/request/show/781799
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsepol?expand=0&rev=76
2020-03-05 10:13:43 +00:00

125 lines
3.9 KiB
RPMSpec

#
# spec file for package libsepol
#
# Copyright (c) 2020 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: libsepol
Version: 3.0
Release: 0
Summary: SELinux binary policy manipulation library
License: LGPL-2.1-or-later
Group: Development/Libraries/C and C++
URL: https://github.com/SELinuxProject/selinux/wiki/Releases
Source: https://github.com/SELinuxProject/selinux/releases/download/20191204/%{name}-%{version}.tar.gz
Source2: baselibs.conf
Patch1: remove_cil_mem_error_handler.patch
BuildRequires: flex
BuildRequires: pkgconfig
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
libsepol 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 utils
Summary: SELinux binary policy manipulation tools
Group: System/Base
%description utils
libsepol 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 -n libsepol1
Summary: SELinux binary policy manipulation library
Group: System/Libraries
%description -n libsepol1
libsepol 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.
(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.)
%package devel
Summary: Development files for SELinux's binary policy manipulation library
Group: Development/Libraries/C and C++
Requires: glibc-devel
Requires: libsepol1 = %{version}
%description devel
The libsepol-devel package contains the libraries and header files
needed for developing applications that manipulate binary SELinux
policies.
%package devel-static
Summary: Static archives for SELinux's binary policy manipulation library
Group: Development/Libraries/C and C++
Requires: libsepol-devel = %{version}
%description devel-static
The libsepol-devel-static package contains the static libraries
needed for developing applications that manipulate binary SELinux
policies.
%prep
%setup -q
%patch1 -p1
%build
%define _lto_cflags %{nil}
export CFLAGS="%{optflags}"
make %{?_smp_mflags}
%install
%make_install LIBDIR="%{_libdir}" SHLIBDIR="/%{_lib}"
%post -n libsepol1 -p /sbin/ldconfig
%postun -n libsepol1 -p /sbin/ldconfig
%files utils
%defattr(-,root,root)
%{_bindir}/chkcon
%{_mandir}/man8/*.8%{ext_man}
%{_mandir}/ru/man8/*.8%{ext_man}
%files -n libsepol1
%defattr(-,root,root)
/%{_lib}/libsepol.so.*
%files devel
%defattr(-,root,root)
%{_libdir}/libsepol.so
%{_mandir}/man3/*.3%{ext_man}
%{_includedir}/sepol/
%{_libdir}/pkgconfig/libsepol.pc
%files devel-static
%defattr(-,root,root)
%{_libdir}/libsepol.a
%changelog