[packages/libselinux] - updated to 3.10

qboosh qboosh at pld-linux.org
Thu Apr 23 21:17:29 CEST 2026


commit bbc6e2ed79165d28afae1eaefc488376f9f397c8
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Thu Apr 23 21:18:11 2026 +0200

    - updated to 3.10

 libselinux-no-pip.patch | 10 +++----
 libselinux-x32.patch    | 75 -------------------------------------------------
 libselinux.spec         | 22 +++++++--------
 3 files changed, 15 insertions(+), 92 deletions(-)
---
diff --git a/libselinux.spec b/libselinux.spec
index 169ff05..97e54af 100644
--- a/libselinux.spec
+++ b/libselinux.spec
@@ -3,19 +3,18 @@
 %bcond_without	python	# Python 3 binding
 %bcond_without	ruby	# Ruby binding
 
-%define	sepol_ver	3.8
+%define	sepol_ver	3.10
 Summary:	SELinux library and simple utilities
 Summary(pl.UTF-8):	Biblioteka SELinux i proste narzędzia
 Name:		libselinux
-Version:	3.8.1
-Release:	2
+Version:	3.10
+Release:	1
 License:	Public Domain
 Group:		Libraries
 #Source0Download: https://github.com/SELinuxProject/selinux/wiki/Releases
 Source0:	https://github.com/SELinuxProject/selinux/releases/download/%{version}/%{name}-%{version}.tar.gz
-# Source0-md5:	769362224f270b441859d047197b3ec0
+# Source0-md5:	75d9c8c2e564fa76d9c2c1adba083499
 Patch0:		%{name}-no-pip.patch
-Patch1:		%{name}-x32.patch
 URL:		https://github.com/SELinuxProject/selinux/wiki
 %ifarch ppc ppc64 sparc sparcv9 sparc64
 BuildRequires:	gcc >= 5:3.4
@@ -142,7 +141,6 @@ Wiązania języka Ruby do biblioteki SELinux.
 %prep
 %setup -q
 %patch -P0 -p1
-%patch -P1 -p1
 
 %build
 %{__make} -j1 all %{?with_python:pywrap} %{?with_ruby:rubywrap} \
@@ -185,7 +183,7 @@ rm -rf $RPM_BUILD_ROOT
 %files
 %defattr(644,root,root,755)
 %doc LICENSE
-%attr(755,root,root) /%{_lib}/libselinux.so.*
+/%{_lib}/libselinux.so.1
 %{_mandir}/man5/customizable_types.5*
 %{_mandir}/man5/default_contexts.5*
 %{_mandir}/man5/default_type.5*
@@ -205,7 +203,7 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%attr(755,root,root) %{_libdir}/libselinux.so
+%{_libdir}/libselinux.so
 %{_pkgconfigdir}/libselinux.pc
 %{_includedir}/selinux
 %{_mandir}/man3/avc_*.3*
@@ -308,9 +306,9 @@ rm -rf $RPM_BUILD_ROOT
 %files -n python3-selinux
 %defattr(644,root,root,755)
 %dir %{py3_sitedir}/selinux
-%attr(755,root,root) %{py3_sitedir}/_selinux.cpython-*.so
-%attr(755,root,root) %{py3_sitedir}/selinux/_selinux.cpython-*.so
-%attr(755,root,root) %{py3_sitedir}/selinux/audit2why.cpython-*.so
+%{py3_sitedir}/_selinux.cpython-*.so
+%{py3_sitedir}/selinux/_selinux.cpython-*.so
+%{py3_sitedir}/selinux/audit2why.cpython-*.so
 %{py3_sitedir}/selinux/__init__.py
 %{py3_sitedir}/selinux/__pycache__
 %{py3_sitedir}/selinux-%{version}-py*.egg-info
@@ -319,5 +317,5 @@ rm -rf $RPM_BUILD_ROOT
 %if %{with ruby}
 %files -n ruby-selinux
 %defattr(644,root,root,755)
-%attr(755,root,root) %{ruby_vendorarchdir}/selinux.so
+%{ruby_vendorarchdir}/selinux.so
 %endif
diff --git a/libselinux-no-pip.patch b/libselinux-no-pip.patch
index e66aa75..fa0c334 100644
--- a/libselinux-no-pip.patch
+++ b/libselinux-no-pip.patch
@@ -1,10 +1,10 @@
---- libselinux-3.7/src/Makefile.orig	2024-06-26 17:30:41.000000000 +0200
-+++ libselinux-3.7/src/Makefile	2024-07-17 21:32:22.645249014 +0200
-@@ -191,7 +191,7 @@ install: all
- 	ln -sf --relative $(DESTDIR)$(SHLIBDIR)/$(LIBSO) $(DESTDIR)$(LIBDIR)/$(TARGET)
+--- libselinux-3.10/src/Makefile.orig	2026-02-02 03:01:16.000000000 +0100
++++ libselinux-3.10/src/Makefile	2026-04-23 21:03:10.282296773 +0200
+@@ -198,7 +198,7 @@ ifneq ($(DISABLE_SHARED),y)
+ endif
  
  install-pywrap: pywrap
--	CFLAGS="$(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) -m pip install --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR) --ignore-installed --no-deps` $(PYTHON_SETUP_ARGS) .
+-	CFLAGS="$(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) -m pip install --no-build-isolation --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR) --ignore-installed --no-deps` $(PYTHON_SETUP_ARGS) .
 +	CFLAGS="$(CPPFLAGS) $(CFLAGS) $(SWIG_CFLAGS)" $(PYTHON) setup.py install --skip-build --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR)` $(PYTHON_SETUP_ARGS)
  	install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
  	ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux$(PYCEXT) $(DESTDIR)$(PYTHONLIBDIR)/_selinux$(PYCEXT)
diff --git a/libselinux-x32.patch b/libselinux-x32.patch
deleted file mode 100644
index b3ce5f8..0000000
--- a/libselinux-x32.patch
+++ /dev/null
@@ -1,75 +0,0 @@
-From edf4812be9c7dd266c54d9cc6c9e06f10f12564f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?=D0=BD=D0=B0=D0=B1?= <nabijaczleweli at nabijaczleweli.xyz>
-Date: Sat, 22 Feb 2025 23:09:30 +0100
-Subject: [PATCH 1/2] Don't inject matchpathcon_filespec_add64() ifdef
- __x86_64__
-X-Mutt-PGP: OS
-
-As the code notes, it wants to add an
-  /* ABI backwards-compatible shim for non-LFS 32-bit systems */
-it tries to detect these with
-  #if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && __BITS_PER_LONG < 64
-which is correct with the added precondition that the ino_t /without/
--D_FILE_OFFSET_BITS=64 /was actually/ u32
-(i.e. it conflates /all/ ILP32 systems into being non-LFS).
-
-This is not the case on x32, for example, which is LFS; thus, the
-  static_assert(sizeof(unsigned long) == sizeof(__ino_t), "inode size mismatch");
-assertion fails (__ino_t is the "kernel ino_t" type,
-which generally corresponds to the kernel's ulong, which is u64 on x32).
-
-The correct spelling of the test for this is
-  #if (...) && sizeof(__ino_t) == 4
-but this is not statically solvable with the preprocessor.
-
-Thus, we need to explcitly special-case this.
-__x86_64__ indicates one of two ABIs (LP64 (amd64) or ILP32 (x32)),
-both of which have ino_t=u64, and is the macro used for defining
-__INO_T_TYPE in the system headers, so it's the best fit here.
-
-Fixes: commit 9395cc0322 ("Always build for LFS mode on 32-bit archs.")
-Closes: #463
-Closes: Debian#1098481
----
- libselinux/include/selinux/selinux.h | 2 +-
- libselinux/src/matchpathcon.c        | 4 ++--
- 2 files changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/libselinux/include/selinux/selinux.h b/libselinux/include/selinux/selinux.h
-index f3cf5a20..318e273f 100644
---- libselinux/include/selinux/selinux.h
-+++ libselinux/include/selinux/selinux.h
-@@ -537,7 +537,7 @@ extern int matchpathcon_index(const char *path,
-    with the same inode (e.g. due to multiple hard links).  If so, then
-    use the latter of the two specifications based on their order in the 
-    file contexts configuration.  Return the used specification index. */
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && __BITS_PER_LONG < 64
-+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && __BITS_PER_LONG < 64 && !defined(__x86_64__)
- #define matchpathcon_filespec_add matchpathcon_filespec_add64
- #endif
- extern int matchpathcon_filespec_add(ino_t ino, int specind, const char *file);
-diff --git a/libselinux/src/matchpathcon.c b/libselinux/src/matchpathcon.c
-index 51f0e4ff..61f27274 100644
---- libselinux/src/matchpathcon.c
-+++ libselinux/src/matchpathcon.c
-@@ -261,7 +261,7 @@ int matchpathcon_filespec_add(ino_t ino, int specind, const char *file)
- 	return -1;
- }
- 
--#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && __BITS_PER_LONG < 64
-+#if defined(_FILE_OFFSET_BITS) && _FILE_OFFSET_BITS == 64 && __BITS_PER_LONG < 64 && !defined(__x86_64__)
- /* alias defined in the public header but we undefine it here */
- #undef matchpathcon_filespec_add
- 
-@@ -282,7 +282,7 @@ int matchpathcon_filespec_add(unsigned long ino, int specind,
- }
- #else
- 
--static_assert(sizeof(unsigned long) == sizeof(ino_t), "inode size mismatch");
-+static_assert(sizeof(uint64_t) == sizeof(ino_t), "inode size mismatch");
- 
- #endif
- 
--- 
-2.42.0
-
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/libselinux.git/commitdiff/bbc6e2ed79165d28afae1eaefc488376f9f397c8



More information about the pld-cvs-commit mailing list