All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni via buildroot <buildroot@buildroot.org>
To: Bernd Kuhls <bernd@kuhls.net>
Cc: buildroot@buildroot.org, Julien Olivain <ju.o@free.fr>,
	Antoine Tenart <atenart@kernel.org>,
	Marcus Folkesson <marcus.folkesson@gmail.com>
Subject: Re: [Buildroot] [PATCH 1/1] package/libselinux: fix Python build errors
Date: Sat, 27 Dec 2025 16:05:05 +0100	[thread overview]
Message-ID: <20251227160505.42602460@windsurf> (raw)
In-Reply-To: <20251221171550.2356174-1-bernd@kuhls.net>

Hello Bernd,

On Sun, 21 Dec 2025 18:15:50 +0100
Bernd Kuhls <bernd@kuhls.net> wrote:

> 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

This makes no sense. The patch comes from Debian, so surely it is NOT
Buildroot-specific. That's just an excuse not to upstream it :-)

So I did send it upstream:

  https://lore.kernel.org/selinux/20251227143911.1630813-1-thomas.petazzoni@bootlin.com/

I don't know if it will be accepted of course, but at least I've tried.

> + 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) .

This patch was passing --no-build-isolation only when $(DESTDIR) was
not empty.

In the context of Buildroot, this means that --no-build-isolation was
passed for the target libselinux (which is installed with
DESTDIR=$(TARGET_DIR)), but --no-build-isolation was not passed for the
host libselinux (which is installed with prefix=$(HOST_DIR), but an
empty $(DESTDIR).

So, I've moved --no-build-isolation outside of this condition, which
solves the issue that your patch "package/libselinux: host-python3
needs SSL support" was trying to solve.

Also, as very often your patch was missing a very critical piece of
information: since when was this failing? Without this information, we
cannot merge your patches. We've asked you time and time again to
provide this important piece of information, but you continue to omit
this information, putting on the reviewers/maintainers the burden of
doing the necessary investigation. I would _really_ appreciate if you
could improve on this. Basically, *everytime* you send a patch fixing
something, it must *always* *always* *always* explain when the problem
was introduced.

Thanks a lot for your contributions!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

  reply	other threads:[~2025-12-27 15:05 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 [this message]
2026-01-07 17:49 ` Arnout Vandecappelle via buildroot

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=20251227160505.42602460@windsurf \
    --to=buildroot@buildroot.org \
    --cc=atenart@kernel.org \
    --cc=bernd@kuhls.net \
    --cc=ju.o@free.fr \
    --cc=marcus.folkesson@gmail.com \
    --cc=thomas.petazzoni@bootlin.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.