All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/ca-certificates: always use host-python3
@ 2021-03-25 12:46 John Keeping
  2021-03-25 13:07 ` John Keeping
  0 siblings, 1 reply; 2+ messages in thread
From: John Keeping @ 2021-03-25 12:46 UTC (permalink / raw)
  To: buildroot

When no Python package is selected for the target, ca-certificate
defaults to host-python (as opposed to host-python3).  However, with
many packages using the meson build system, which requires host-python3,
it is likely that this results in both Python 2 and Python 3 being built
for the host.

One option would be to flip the default to use host-python3 when no
target Python package is selected, but Python 2 is no longer supported
and the package is marked as deprecated so it makes sense to just
require host-python3 here.

Signed-off-by: John Keeping <john@metanate.com>
---
 package/ca-certificates/ca-certificates.mk | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/ca-certificates/ca-certificates.mk b/package/ca-certificates/ca-certificates.mk
index 5c24d4be49..86e64f4270 100644
--- a/package/ca-certificates/ca-certificates.mk
+++ b/package/ca-certificates/ca-certificates.mk
@@ -7,11 +7,7 @@
 CA_CERTIFICATES_VERSION = 20200601
 CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz
 CA_CERTIFICATES_SITE = http://snapshot.debian.org/archive/debian/20200602T145955Z/pool/main/c/ca-certificates
-CA_CERTIFICATES_DEPENDENCIES = host-openssl
-# ca-certificates can be built with either python 2 or python 3
-# but it must be at least python 2.7
-CA_CERTIFICATES_DEPENDENCIES += \
-	$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
+CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3
 CA_CERTIFICATES_LICENSE = GPL-2.0+ (script), MPL-2.0 (data)
 CA_CERTIFICATES_LICENSE_FILES = debian/copyright
 
-- 
2.31.0

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

* [Buildroot] [PATCH] package/ca-certificates: always use host-python3
  2021-03-25 12:46 [Buildroot] [PATCH] package/ca-certificates: always use host-python3 John Keeping
@ 2021-03-25 13:07 ` John Keeping
  0 siblings, 0 replies; 2+ messages in thread
From: John Keeping @ 2021-03-25 13:07 UTC (permalink / raw)
  To: buildroot

On Thu, 25 Mar 2021 12:46:16 +0000
John Keeping <john@metanate.com> wrote:

> When no Python package is selected for the target, ca-certificate
> defaults to host-python (as opposed to host-python3).  However, with
> many packages using the meson build system, which requires host-python3,
> it is likely that this results in both Python 2 and Python 3 being built
> for the host.
> 
> One option would be to flip the default to use host-python3 when no
> target Python package is selected, but Python 2 is no longer supported
> and the package is marked as deprecated so it makes sense to just
> require host-python3 here.

I did some extra testing after sending this (I know it's the wrong
order...) and it seems that the host-python3 support in ca-certificates
is broken.

ca-certificates does indeed build with Python 3, but mozilla/Makefile
runs the command:

	python certdata2pem.py

but host-python3 doesn't install a "python" command, so it falls back to
the system Python.

This is patched upstream by [1] which switches across to Python 3, so
it's probably best to drop this and wait for the next package bump,
unless we want to backport that change.

[1] https://salsa.debian.org/debian/ca-certificates/-/commit/55f449b221ce215f7037507822cbd4f4b67af7b4

> Signed-off-by: John Keeping <john@metanate.com>
> ---
>  package/ca-certificates/ca-certificates.mk | 6 +-----
>  1 file changed, 1 insertion(+), 5 deletions(-)
> 
> diff --git a/package/ca-certificates/ca-certificates.mk b/package/ca-certificates/ca-certificates.mk
> index 5c24d4be49..86e64f4270 100644
> --- a/package/ca-certificates/ca-certificates.mk
> +++ b/package/ca-certificates/ca-certificates.mk
> @@ -7,11 +7,7 @@
>  CA_CERTIFICATES_VERSION = 20200601
>  CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz
>  CA_CERTIFICATES_SITE = http://snapshot.debian.org/archive/debian/20200602T145955Z/pool/main/c/ca-certificates
> -CA_CERTIFICATES_DEPENDENCIES = host-openssl
> -# ca-certificates can be built with either python 2 or python 3
> -# but it must be at least python 2.7
> -CA_CERTIFICATES_DEPENDENCIES += \
> -	$(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python)
> +CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python3
>  CA_CERTIFICATES_LICENSE = GPL-2.0+ (script), MPL-2.0 (data)
>  CA_CERTIFICATES_LICENSE_FILES = debian/copyright
>  

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

end of thread, other threads:[~2021-03-25 13:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-25 12:46 [Buildroot] [PATCH] package/ca-certificates: always use host-python3 John Keeping
2021-03-25 13:07 ` John Keeping

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.