package/libselinux: revert "allow pip to use system-provided packages"

This reverts commit [1] which fails on the autobuilder because the patch
don't apply. This was incorrectly applied as it is specific for a
libselinux not part of 2025.02.x and fixes an error introduced by a pip
version not present in 2025.02.x [2].

[1] 32d1d7c367 package/libselinux: allow pip to use system-provided packages
[2] 285097051d package/python-pip: bumpp version to 25.3

Fixes: https://autobuild.buildroot.org/results/068/06854beaf880378da1b9ef75123de76465e5950f
Signed-off-by: Thomas Perale <thomas.perale@mind.be>
This commit is contained in:
Thomas Perale
2026-02-07 09:10:44 +01:00
parent 29bec88716
commit ae7e57a962
2 changed files with 0 additions and 55 deletions

View File

@@ -1,51 +0,0 @@
From 8cfe4535f23a7768ee5efa615d11563a8404777c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <cgzones@googlemail.com>
Date: Mon, 27 Oct 2025 22:40:59 +0100
Subject: [PATCH] libselinux/src/Makefile: build python module without
isolation
The "pip install" logic in libselinux/src/Makefile tries to get
setuptools from the network, which is not correct as during the
build/installation, there shouldn't be any network access, or
downloading of arbitrary resources from the network.
This causes build issues in Debian:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121121
And in Buildroot:
https://autobuild.buildroot.net/results/0e9/0e9de0c0d8b6ec57eea9f8834f02076b296ba4f1/build-end.log
To fix this, we use the --no-build-isolation pip install argument so
that pip install is allowed to use the system-provided setuptools,
instead of wanting to download this one.
This patch is derived from
https://sources.debian.org/src/libselinux/3.9-4/debian/patches/Build-python-module-without-isolation-Closes-1119155.patch,
with the change that --no-build-isolation is passed unconditionally,
regardless of whether $(DESTDIR) is empty or not.
Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Upstream: https://lore.kernel.org/selinux/20251227143911.1630813-1-thomas.petazzoni@bootlin.com/
---
libselinux/src/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libselinux/src/Makefile b/libselinux/src/Makefile
index e9141bb9..9bc10606 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -197,7 +197,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) .
install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux*.so $(DESTDIR)$(PYTHONLIBDIR)/
--
2.52.0

View File

@@ -35,12 +35,8 @@ LIBSELINUX_DEPENDENCIES += \
python3 \
python-setuptools \
host-python-pip \
host-python-setuptools \
host-swig
LIBSELINUX_MAKE_ENV += \
$(PKG_PYTHON_SETUPTOOLS_ENV)
LIBSELINUX_MAKE_OPTS += \
$(PKG_PYTHON_SETUPTOOLS_ENV) \
PYTHON=python$(PYTHON3_VERSION_MAJOR)