Skip to contentSkip to conversation

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

PATCH Applied Thomas Perale via buildroot 1 participant 2 messages Feb 7 – Feb 13

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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

---
 ...akefile-build-python-module-without-.patch | 51 -------------------
 package/libselinux/libselinux.mk              |  4 --
 2 files changed, 55 deletions(-)
 delete mode 100644 package/libselinux/0003-libselinux-src-Makefile-build-python-module-without-.patch
package/libselinux/0003-libselinux-src-Makefile-build-python-module-without-.patch deleted +0 -51
deleted file mode 100644
index 7f4a76515b..0000000000
@@ -1,51 +0,0 @@
-From 8cfe4535f23a7768ee5efa615d11563a8404777c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <[email protected]>
-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 <[email protected]>
-Signed-off-by: Thomas Petazzoni <[email protected]>
-Upstream: https://lore.kernel.org/selinux/[email protected]/
----
- 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
-
package/libselinux/libselinux.mk +0 -4
index 7bc33392d5..360ab063ca 100644
@@ -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)
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
#1 lore raw

In reply of:

Quoted 10 lines

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

Applied to 2025.02.x. Thanks

Quoted 87 lines
---
 ...akefile-build-python-module-without-.patch | 51 -------------------
 package/libselinux/libselinux.mk              |  4 --
 2 files changed, 55 deletions(-)
 delete mode 100644 package/libselinux/0003-libselinux-src-Makefile-build-python-module-without-.patch
package/libselinux/0003-libselinux-src-Makefile-build-python-module-without-.patch deleted +0 -51
deleted file mode 100644
index 7f4a76515b..0000000000
@@ -1,51 +0,0 @@
-From 8cfe4535f23a7768ee5efa615d11563a8404777c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Christian=20G=C3=B6ttsche?= <[email protected]>
-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 <[email protected]>
-Signed-off-by: Thomas Petazzoni <[email protected]>
-Upstream: https://lore.kernel.org/selinux/[email protected]/
----
- 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
-
package/libselinux/libselinux.mk +0 -4
index 7bc33392d5..360ab063ca 100644
@@ -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)
Signature · 6 lines
2.52.0

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot

_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot