From: Arnout Vandecappelle via buildroot <buildroot@buildroot.org>
To: Bernd Kuhls <bernd@kuhls.net>
Cc: Arnout Vandecappelle <arnout@rnout.be>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/libselinux: fix Python build errors
Date: Wed, 7 Jan 2026 18:49:46 +0100 [thread overview]
Message-ID: <20260107174946.225560-1-arnout@rnout.be> (raw)
In-Reply-To: <20251221171550.2356174-1-bernd@kuhls.net>
In reply of:
> 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>
Applied to 2025.02.x and 2025.11.x. Thanks
> ---
> ...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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2026-01-07 17:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
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 message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260107174946.225560-1-arnout@rnout.be \
--to=buildroot@buildroot.org \
--cc=arnout@rnout.be \
--cc=bernd@kuhls.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox