Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/libselinux: fix Python build errors
@ 2025-12-21 17:15 Bernd Kuhls
  2025-12-27 15:05 ` Thomas Petazzoni via buildroot
  2026-01-07 17:49 ` Arnout Vandecappelle via buildroot
  0 siblings, 2 replies; 3+ messages in thread
From: Bernd Kuhls @ 2025-12-21 17:15 UTC (permalink / raw)
  To: buildroot; +Cc: Julien Olivain, Antoine Tenart, Marcus Folkesson

Fixes:
https://autobuild.buildroot.org/results/953/953b8c6d7da0f150ec56760c4a3191e630c01381/

Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
Co-Authored-By: Julien Olivain <ju.o@free.fr>
---
 ...uild-python-module-without-isolation.patch | 41 +++++++++++++++++++
 package/libselinux/libselinux.mk              |  4 ++
 2 files changed, 45 insertions(+)
 create mode 100644 package/libselinux/0003-Build-python-module-without-isolation.patch

diff --git a/package/libselinux/0003-Build-python-module-without-isolation.patch b/package/libselinux/0003-Build-python-module-without-isolation.patch
new file mode 100644
index 0000000000..9614efa6c8
--- /dev/null
+++ b/package/libselinux/0003-Build-python-module-without-isolation.patch
@@ -0,0 +1,41 @@
+From: =?utf-8?q?Christian_G=C3=B6ttsche?= <cgzones@googlemail.com>
+Date: Mon, 27 Oct 2025 22:40:59 +0100
+Subject: Build python module without isolation (Closes: #1119155)
+
+Let pip find the system installed setuptools.
+
+Downloaded from
+https://sources.debian.org/src/libselinux/3.9-4/debian/patches/Build-python-module-without-isolation-Closes-1119155.patch
+
+Used by Debian to fix a build error:
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1119155
+
+Building the Buildroot package breaks with a different error:
+
+      ModuleNotFoundError: No module named '_sysconfigdata__linux_aarch64-linux-gnu'
+
+which is also fixed by this patch, most likely both are caused by
+incorrect usage of python-pip by libselinux:
+https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1121121#29
+
+Upstream: buildroot-specific
+
+[Bernd: rebased after patch 0002 was applied]
+Signed-off-by: Bernd Kuhls <bernd@kuhls.net>
+---
+ src/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index 261c22d..29057a8 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -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 --prefix=$(PREFIX) `test -n "$(DESTDIR)" && echo --root $(DESTDIR) --ignore-installed --no-deps --no-build-isolation` $(PYTHON_SETUP_ARGS) .
+ 	install -m 644 $(SWIGPYOUT) $(DESTDIR)$(PYTHONLIBDIR)/selinux/__init__.py
+ 	ln -sf --relative $(DESTDIR)$(PYTHONLIBDIR)/selinux/_selinux*.so $(DESTDIR)$(PYTHONLIBDIR)/
+ 
diff --git a/package/libselinux/libselinux.mk b/package/libselinux/libselinux.mk
index 405c4a9f21..a77ee7659a 100644
--- a/package/libselinux/libselinux.mk
+++ b/package/libselinux/libselinux.mk
@@ -35,8 +35,12 @@ 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)
-- 
2.47.3

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-01-07 17:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-21 17:15 [Buildroot] [PATCH 1/1] package/libselinux: fix Python build errors Bernd Kuhls
2025-12-27 15:05 ` Thomas Petazzoni via buildroot
2026-01-07 17:49 ` Arnout Vandecappelle via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox