%define majver %(echo %version | cut -d. -f1-2) Name: libselinux Version: 3.7 Release: 1mamba Summary: A security enhancement to Linux that allows users and administrators more control over resources access Group: System/Libraries Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: https://github.com/SELinuxProject/selinux/ Source: https://github.com/SELinuxProject/selinux/archive/libselinux-%{version}.tar.gz Source1: selinux-config Patch0: libselinux-2.2.1-pkgconfig.patch License: Public Domain ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libpcre-devel %if "%{stage1}" != "1" BuildRequires: libpython3-devel BuildRequires: libsepol-devel %endif ## AUTOBUILDREQ-END BuildRequires: python3-devel >= 3.11.5-3mamba BuildRequires: libsepol-devel Requires: libsepol >= %{majver} Requires: libselinux-tools = %{version}-%{release} %description SELinux is a security enhancement to Linux that allows users and administrators more control over which users and applications can access which resources, such as files. Standard Linux access controls, such as file modes (-rwxr-xr-x) are modifiable by the user and applications that the user runs whereas SELinux access controls are determined by a policy loaded on the system and not changeable by careless users or misbehaving applications. SELinux also adds finer granularity to access controls. Instead of only being able to specify who can read, write or execute a file, for example, SELinux lets you specify who can unlink, append only, move a file and so on. SELinux allows you to specify access to many resources other than files as well, such as network resources and interprocess communication (IPC). %package devel Group: Development/Libraries Summary: Static libraries and headers for %{name} Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description devel SELinux is a security enhancement to Linux that allows users and administrators more control over which users and applications can access which resources, such as files. Standard Linux access controls, such as file modes (-rwxr-xr-x) are modifiable by the user and applications that the user runs whereas SELinux access controls are determined by a policy loaded on the system and not changeable by careless users or misbehaving applications. SELinux also adds finer granularity to access controls. Instead of only being able to specify who can read, write or execute a file, for example, SELinux lets you specify who can unlink, append only, move a file and so on. SELinux allows you to specify access to many resources other than files as well, such as network resources and interprocess communication (IPC). This package contains static libraries and header files need for development. %if "%{stage1}" != "1" %package -n python-selinux-py3 Group: System/Libraries Summary: Python bindings for libselinux Provides: python-libselinux = %{?epoch:%epoch:}%{version}-%{release} Obsoletes: python-libselinux < 3.4 Provides: libselinux-python Obsoletes: libselinux-python < 3.4 Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %{py3_requires} %description -n python-selinux-py3 The libselinux-python package contains the python bindings for developing SELinux applications. An interface for security-aware applications. This package contains the python interface library to libselinux. %endif %package tools Group: Development/Libraries Summary: Security Enhanced Linux utility programs Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release} %description tools This package contains the Security Enhanced Linux utility programs. %debug_package %prep %setup -q -n selinux-libselinux-%{version} #cd libselinux #%patch0 -p1 %build cd libselinux %if "%{_build}" != "%{_host}" %make CC=%{_target_platform}-gcc TLSFLAGS= \ LIBDIR=%{_libdir} \ SHLIBDIR=%{_libdir} %else %make CC=%{_target_platform}-gcc \ LIBDIR=%{_libdir} \ SHLIBDIR=%{_libdir} %endif %if "%{stage1}" != "1" %make pywrap LIBDIR=%{_libdir} \ LIBDIR=%{_libdir} \ SHLIBDIR=%{_libdir} %endif %install [ "%{buildroot}" != / ] && rm -rf %{buildroot} cd libselinux install -d -m0755 %{buildroot}%{python3_sitelib}/selinux %makeinstall \ LIBDIR=%{_libdir} \ SHLIBDIR=%{_libdir} \ %if "%{stage1}" != "1" PYTHON=%{__python3} \ install-pywrap %endif install -D -m0644 %{SOURCE1} %{buildroot}%{_sysconfdir}/selinux/config %clean [ "%{buildroot}" != / ] && rm -rf %{buildroot} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %{_libdir}/libselinux.so.* %doc libselinux/LICENSE %files devel %defattr(-,root,root) %dir %{_includedir}/selinux/ %{_includedir}/selinux/*.h %{_libdir}/libselinux.a %{_libdir}/libselinux.so %{_mandir}/man3/* %{_mandir}/man5/* #%lang(ru) %{_mandir}/ru/man5/* %{_libdir}/pkgconfig/libselinux.pc %files tools %defattr(-,root,root) %config(noreplace) %{_sysconfdir}/selinux/config %{_sbindir}/* %{_mandir}/man8/* #%lang(ru) %{_mandir}/ru/man8/* %if "%{stage1}" != "1" %files -n python-selinux-py3 %defattr(-,root,root) %dir %{python3_sitearch}/selinux-%{version}.dist-info %{python3_sitearch}/selinux-%{version}.dist-info/* %{python3_sitearch}/_selinux.cpython-*.so %dir %{python3_sitearch}/selinux %{python3_sitearch}/selinux/* %endif %changelog * Thu Jun 27 2024 Automatic Build System 3.7-1mamba - automatic version update by autodist * Sat Dec 16 2023 Automatic Build System 3.6-1mamba - automatic version update by autodist * Tue Sep 26 2023 Automatic Build System 3.5-2mamba - rebuilt by autoport with build requirements: python3-devel>=3.11.5-3mamba * Sat Feb 25 2023 Automatic Build System 3.5-1mamba - automatic version update by autodist * Sat Jul 16 2022 Automatic Build System 3.4-1mamba - automatic version update by autodist * Thu Nov 18 2021 Silvan Calarco 3.3-1mamba - update to 3.3 * Fri Mar 05 2021 Automatic Build System 3.2-1mamba - automatic version update by autodist * Fri Nov 27 2020 Silvan Calarco 3.1-2mamba - rebuilt with python3 * Sat Jul 11 2020 Automatic Build System 3.1-1mamba - automatic version update by autodist * Wed Dec 11 2019 Automatic Build System 3.0-1mamba - automatic version update by autodist * Sun Mar 24 2019 Automatic Build System 2.9-1mamba - automatic version update by autodist * Tue Sep 11 2018 Silvan Calarco 2.8-1mamba - update to 2.8 * Wed Nov 16 2016 Silvan Calarco 2.6-1mamba - update to 2.6 * Sat Feb 27 2016 Silvan Calarco 2.5-1mamba - update to 2.5 * Thu Dec 03 2015 Silvan Calarco 2.4-1mamba - update to 2.4 * Wed May 07 2014 Automatic Build System 2.3-1mamba - automatic version update by autodist * Tue Dec 31 2013 Automatic Build System 2.2.2-1mamba - automatic version update by autodist * Sun Dec 01 2013 Silvan Calarco 2.2.1-3mamba - really restore pkgconfig patch * Sat Nov 30 2013 Silvan Calarco 2.2.1-2mamba - restore pkgconfig patch * Thu Nov 07 2013 Automatic Build System 2.2.1-1mamba - automatic version update by autodist * Thu Oct 31 2013 Automatic Build System 2.2-1mamba - automatic version update by autodist * Wed Jul 24 2013 Silvan Calarco 2.1.13-3mamba - fix pkg-config patch, don't use Requires.private and Libs.private * Sat Jul 20 2013 Silvan Calarco 2.1.13-2mamba - add libpthread and libpcre in pkg-config file (needed in x86_64) * Wed Apr 24 2013 Automatic Build System 2.1.13-1mamba - automatic version update by autodist * Tue Sep 25 2012 Automatic Build System 2.1.12-1mamba - update to 2.1.12 * Mon Mar 12 2012 Automatic Build System 2.1.9-1mamba - update to 2.1.9 * Sat Apr 30 2011 Silvan Calarco 2.0.94-2mamba - added default /etc/selinux/config file with SELINUX=disabled and SELINUXTYPE=targeted * Tue Jun 22 2010 Automatic Build System 2.0.94-1mamba - automatic update by autodist * Tue Mar 23 2010 Silvan Calarco 2.0.85-1mamba - update to 2.0.85 * Fri Jan 09 2009 Silvan Calarco 2.0.65-1mamba - automatic update by autodist * Wed Apr 04 2007 Davide Madrisan 2.0.8-1mamba - update to version 2.0.8 by autospec * Fri Jan 06 2006 Silvan Calarco 1.28-1qilnx - update to version 1.28 by autospec * Wed Nov 02 2005 Silvan Calarco 1.26-1qilnx - update to version 1.26 by autospec * Sat Jun 04 2005 Silvan Calarco 1.22-1qilnx - package created by autospec