2011-05-23 16:20:28 +02:00
|
|
|
#
|
|
|
|
# spec file for package python-semanage
|
|
|
|
#
|
2023-02-24 09:43:08 +01:00
|
|
|
# Copyright (c) 2023 SUSE LLC
|
2011-05-23 16:20:28 +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-05-06 09:47:20 +02:00
|
|
|
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
2011-05-23 16:20:28 +02:00
|
|
|
#
|
|
|
|
|
2011-05-24 13:33:19 +02:00
|
|
|
|
2021-03-18 11:06:40 +01:00
|
|
|
%define soversion 2
|
|
|
|
%define libname libsemanage%{soversion}
|
2021-03-12 08:59:15 +01:00
|
|
|
|
2023-02-24 09:43:08 +01:00
|
|
|
%define libsepol_ver 3.5
|
|
|
|
%define libselinux_ver 3.5
|
2021-03-18 15:43:05 +01:00
|
|
|
|
2017-09-28 09:52:04 +02:00
|
|
|
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
|
2016-07-13 09:19:36 +02:00
|
|
|
Name: python-semanage
|
2023-02-24 09:43:08 +01:00
|
|
|
Version: 3.5
|
2016-07-13 09:19:36 +02:00
|
|
|
Release: 0
|
2016-07-26 14:14:00 +02:00
|
|
|
Summary: Python bindings for SELinux's policy management library
|
2018-03-09 08:25:24 +01:00
|
|
|
License: LGPL-2.1-only
|
2016-07-13 09:19:36 +02:00
|
|
|
Group: Development/Languages/Python
|
2020-03-05 11:11:12 +01:00
|
|
|
URL: https://github.com/SELinuxProject/selinux
|
2022-05-20 16:53:32 +02:00
|
|
|
Source0: https://github.com/SELinuxProject/selinux/releases/download/%{version}/libsemanage-%{version}.tar.gz
|
|
|
|
Source1: https://github.com/SELinuxProject/selinux/releases/download/%{version}/libsemanage-%{version}.tar.gz.asc
|
|
|
|
Source2: libsemanage.keyring
|
|
|
|
Source3: baselibs.conf
|
2020-06-15 09:22:03 +02:00
|
|
|
# PATCH-FIX-UPSTREAM bsc#1133102 LTO: Update map file to include new symbols and remove wildcards
|
2020-06-16 11:26:34 +02:00
|
|
|
# For now we need to disable this. This breaks e.g. shadow and also other packages in security:SELinux
|
|
|
|
# Patch0: libsemanage-update-map-file.patch
|
2017-09-28 09:52:04 +02:00
|
|
|
BuildRequires: %{python_module devel}
|
2013-11-07 11:20:19 +01:00
|
|
|
BuildRequires: audit-devel
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: bison
|
|
|
|
BuildRequires: flex
|
2012-10-23 12:01:57 +02:00
|
|
|
BuildRequires: libbz2-devel
|
2021-03-18 15:43:05 +01:00
|
|
|
BuildRequires: libselinux-devel >= %{libselinux_ver}
|
|
|
|
BuildRequires: libsepol-devel >= %{libsepol_ver}
|
2017-09-28 09:52:04 +02:00
|
|
|
BuildRequires: python-rpm-macros
|
2011-05-23 16:20:28 +02:00
|
|
|
BuildRequires: swig
|
2016-07-26 14:14:00 +02:00
|
|
|
# Ensure same version
|
2021-03-12 08:59:15 +01:00
|
|
|
Requires: %{libname} = %{version}
|
2017-09-28 09:52:04 +02:00
|
|
|
%python_subpackages
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%description
|
2016-07-26 14:14:00 +02:00
|
|
|
This package contains the Python bindings for developing
|
|
|
|
SELinux policy management applications.
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%prep
|
2011-05-23 16:26:25 +02:00
|
|
|
%setup -q -n libsemanage-%{version}
|
2020-06-04 12:54:18 +02:00
|
|
|
# Replace /usr/libexec with whatever the distro defines as libexecdir - across all files
|
|
|
|
grep /usr/libexec . -rl | xargs sed -i "s|/usr/libexec|%{_libexecdir}|g"
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%build
|
2021-03-18 11:06:40 +01:00
|
|
|
%make_build clean
|
2017-09-28 09:52:04 +02:00
|
|
|
%{python_expand # loop over possible pythons
|
2023-03-24 15:08:46 +01:00
|
|
|
%make_build PYTHON=$python CFLAGS="%{optflags} -fno-semantic-interposition -ffat-lto-objects" swigify
|
|
|
|
%make_build PYTHON=$python CFLAGS="%{optflags} -fno-semantic-interposition -ffat-lto-objects" \
|
2017-09-28 09:52:04 +02:00
|
|
|
LIBDIR="%{_libdir}" \
|
|
|
|
LIBEXECDIR="%{_libexecdir}" \
|
|
|
|
SHLIBDIR="%{_lib}" \
|
2021-08-16 15:20:13 +02:00
|
|
|
pywrap
|
2017-09-28 09:52:04 +02:00
|
|
|
}
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
mkdir -p %{buildroot}/%{_lib}
|
|
|
|
mkdir -p %{buildroot}%{_libdir}
|
|
|
|
mkdir -p %{buildroot}%{_includedir}
|
2017-09-28 09:52:04 +02:00
|
|
|
%{python_expand # loop over possible pythons
|
2018-11-08 12:21:37 +01:00
|
|
|
%make_install install-pywrap PYTHON="$python" \
|
Accepting request 638795 from home:pmonrealgonzalez:branches:security:SELinux
- update to version 2.8
* semanage fcontext -l now also lists home directory entries from
file_contexts.homedirs.
* libsemanage no longer deletes the tmp directory if there is an error
while committing the policy transaction, so that any temporary files
can be further inspected for debugging purposes (e.g. to examine a
particular line of the generated CIL module). The tmp directory will
be deleted upon the next transaction, so no manual removal is needed.
* When overriding PREFIX, BINDIR, SBINDIR, SHLIBDIR, LIBEXECDIR, etc.,
DESTDIR has to be removed from the definition. For example on Arch
Linux, SBINDIR="${pkgdir}/usr/bin" was changed to SBINDIR="/usr/bin".
* PYSITEDIR has been renamed PYTHONLIBDIR (and its definition changed).
- Clened with spec-cleaner
- update to version 2.8
* semanage fcontext -l now also lists home directory entries from
file_contexts.homedirs.
* libsemanage no longer deletes the tmp directory if there is an error
while committing the policy transaction, so that any temporary files
can be further inspected for debugging purposes (e.g. to examine a
particular line of the generated CIL module). The tmp directory will
be deleted upon the next transaction, so no manual removal is needed.
* When overriding PREFIX, BINDIR, SBINDIR, SHLIBDIR, LIBEXECDIR, etc.,
DESTDIR has to be removed from the definition. For example on Arch
Linux, SBINDIR="${pkgdir}/usr/bin" was changed to SBINDIR="/usr/bin".
* PYSITEDIR has been renamed PYTHONLIBDIR (and its definition changed).
- Clened with spec-cleaner
OBS-URL: https://build.opensuse.org/request/show/638795
OBS-URL: https://build.opensuse.org/package/show/security:SELinux/libsemanage?expand=0&rev=66
2018-10-01 09:40:16 +02:00
|
|
|
LIBDIR="%{_libdir}" \
|
|
|
|
LIBEXECDIR="%{_libexecdir}" \
|
2018-11-08 12:21:37 +01:00
|
|
|
SHLIBDIR="%{_libdir}"
|
2017-09-28 09:52:04 +02:00
|
|
|
}
|
2011-05-23 16:32:05 +02:00
|
|
|
|
|
|
|
# remove files contained in other packages
|
|
|
|
rm -rf %{buildroot}%{_sysconfdir}
|
2016-07-13 09:19:36 +02:00
|
|
|
%if "%{_lib}" == "lib64"
|
|
|
|
rm -rf %{buildroot}%{_libexecdir}
|
|
|
|
%else
|
|
|
|
rm -rf %{buildroot}%{_libexecdir}/selinux
|
|
|
|
%endif
|
2011-05-23 16:32:05 +02:00
|
|
|
rm -rf %{buildroot}%{_includedir}
|
|
|
|
rm -f %{buildroot}%{_libdir}/libsemanage.*
|
|
|
|
rm -rf %{buildroot}%{_libdir}/pkgconfig
|
|
|
|
rm -rf %{buildroot}%{_mandir}
|
2011-05-23 16:20:28 +02:00
|
|
|
|
2017-09-28 09:52:04 +02:00
|
|
|
%files %{python_files}
|
2011-05-23 16:32:05 +02:00
|
|
|
%{python_sitearch}/*
|
2011-05-23 16:20:28 +02:00
|
|
|
|
|
|
|
%changelog
|