libsepol/libsepol.spec

122 lines
4.0 KiB
RPMSpec
Raw Normal View History

Summary: SELinux binary policy manipulation library
Name: libsepol
Version: 3.7
Release: 3%{?dist}
License: LGPL-2.1-or-later
Source0: https://github.com/SELinuxProject/selinux/releases/download/3.7/libsepol-3.7.tar.gz
Source1: https://github.com/SELinuxProject/selinux/releases/download/3.7/libsepol-3.7.tar.gz.asc
Source2: https://github.com/bachradsusi.gpg
2015-07-20 15:30:03 +00:00
URL: https://github.com/SELinuxProject/selinux/wiki
# $ git clone https://github.com/fedora-selinux/selinux.git
# $ cd selinux
# $ git format-patch -N libsepol-3.7 -- libsepol
# $ i=1; for j in 0*patch; do printf "Patch%04d: %s\n" $i $j; i=$((i+1));done
# Patch list start
Patch0001: 0001-libsepol-sepol_compute_sid-Do-not-destroy-uninitiali.patch
# Patch list end
2020-11-04 19:10:59 +00:00
BuildRequires: make
BuildRequires: gcc
2015-07-20 15:30:03 +00:00
BuildRequires: flex
BuildRequires: gnupg2
2020-11-20 09:38:10 +00:00
Obsoletes: %{name}-compat = 3.1-4
%description
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
kernel contains new architectural components originally developed to
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.
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 devel
Summary: Header files and libraries used to build policy manipulation tools
Requires: %{name}%{?_isa} = %{version}-%{release}
%description devel
2008-01-21 20:42:49 +00:00
The libsepol-devel package contains the libraries and header files
needed for developing applications that manipulate binary policies.
%package static
Summary: static libraries used to build policy manipulation tools
Requires: %{name}-devel%{?_isa} = %{version}-%{release}
2008-01-21 20:42:49 +00:00
%description static
The libsepol-static package contains the static libraries and header files
needed for developing applications that manipulate binary policies.
%package utils
Summary: SELinux libsepol utilities
Requires: %{name}%{?_isa} = %{version}-%{release}
%description utils
The libsepol-utils package contains the utilities
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
2023-12-14 08:16:10 +00:00
%autosetup -p 2 -n libsepol-%{version}
# sparc64 is an -fPIC arch, so we need to fix it here
%ifarch sparc64
sed -i 's/fpic/fPIC/g' src/Makefile
%endif
%build
%set_build_flags
CFLAGS="$CFLAGS -fno-semantic-interposition"
%make_build LIBDIR="%{_libdir}"
%install
2021-01-18 01:22:09 +00:00
mkdir -p ${RPM_BUILD_ROOT}%{_libdir}
mkdir -p ${RPM_BUILD_ROOT}%{_includedir}
mkdir -p ${RPM_BUILD_ROOT}%{_bindir}
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man3
mkdir -p ${RPM_BUILD_ROOT}%{_mandir}/man8
%make_install LIBDIR="%{_libdir}" SHLIBDIR="%{_libdir}"
rm -rf ${RPM_BUILD_ROOT}%{_mandir}/man8/gen*
rm -rf ${RPM_BUILD_ROOT}%{_mandir}/ru/man8
2006-05-11 18:23:26 +00:00
2008-01-21 20:42:49 +00:00
%files static
%{_libdir}/libsepol.a
2008-01-21 20:42:49 +00:00
%files devel
%{_libdir}/libsepol.so
%{_libdir}/pkgconfig/libsepol.pc
%{_includedir}/sepol/*.h
%{_mandir}/man3/*.3.gz
%dir %{_includedir}/sepol
2008-01-21 20:56:18 +00:00
%dir %{_includedir}/sepol/policydb
%{_includedir}/sepol/policydb/*.h
2015-07-20 15:30:03 +00:00
%dir %{_includedir}/sepol/cil
%{_includedir}/sepol/cil/*.h
%files
%license LICENSE
%{_libdir}/libsepol.so.2
%files utils
%{_bindir}/chkcon
%{_bindir}/sepol_check_access
%{_bindir}/sepol_compute_av
%{_bindir}/sepol_compute_member
%{_bindir}/sepol_compute_relabel
%{_bindir}/sepol_validate_transition
%{_mandir}/man8/chkcon.8.gz
%changelog
* Tue Oct 29 2024 Troy Dawson <tdawson@redhat.com> - 3.7-3
- Bump release for October 2024 mass rebuild:
Resolves: RHEL-64018
* Fri Aug 09 2024 Vit Mojzis <vmojzis@redhat.com> - 3.7-2
- sepol_compute_sid: Do not destroy uninitialized context (RHEL-34808)
%autochangelog