package/ca-certificates: depend on host-python or host-python3
PATCH v2 1/1 package/ca-certificates: depend on host-python or host-python3
The ca-certificates Makefile directly calls python but if python3 has been selected then it is possible for $(HOST_DIR)/usr/bin/python to not exist in the PATH at the time ca-certificates is built. This means the Makefile will use python installed on the build host. If the build hosts python is less than python 2.7 then the build will fail.
ca-certificates will build using host-python3. Fix the issue by depending on host-python3 if python3 is being used otherwise depend on host-python.
This fixes:
http://autobuild.buildroot.net/results/a2a4fed293c836b9cf63ff2aaa463b0704dec07e/
http://autobuild.buildroot.net/results/bbed4afa8e30382b8892062f31ba64cbb0ea14e4/
http://autobuild.buildroot.net/results/1af5562be3c0d233cea81834a898f7ac6ae48271/
---
Changes v1 -> v2
- Depend on host-python or host-python3 instead of directly calling $(HOST_DIR)/usr/bin/python2 (Suggested by Arnout Vandecappelle)
- Added comments to ca-certificates.mk (Suggested by Arnout Vandecappelle)
--- package/ca-certificates/ca-certificates.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
package/ca-certificates/ca-certificates.mk +5 -1
@@ -7,7 +7,11 @@ CA_CERTIFICATES_VERSION = 20160104 CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz CA_CERTIFICATES_SITE = http://snapshot.debian.org/archive/debian/20160104T220912Z/pool/main/c/ca-certificates -CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python +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_LICENSE = GPLv2+ (script), MPLv2.0 (data) CA_CERTIFICATES_LICENSE_FILES = debian/copyright
Signature · 1 line
2.8.0
PATCH v2 1/1 package/ca-certificates: depend on host-python or host-python3
Quoted 5 lines · Martin Bark
The ca-certificates
Makefiledirectly calls python but if python3 has been selected then it is possible for $(HOST_DIR)/usr/bin/python to not exist in the PATH at the time ca-certificates is built. This means theMakefilewill use python installed on the build host. If the build hosts python is less than python 2.7 then the build will fail.
I'm not sure if this explanation if very clear...
Quoted 26 lines
ca-certificates will build using host-python3. Fix the issue by depending on host-python3 if python3 is being used otherwise depend on host-python.
This fixes:
http://autobuild.buildroot.net/results/a2a4fed293c836b9cf63ff2aaa463b0704dec07e/
http://autobuild.buildroot.net/results/bbed4afa8e30382b8892062f31ba64cbb0ea14e4/
http://autobuild.buildroot.net/results/1af5562be3c0d233cea81834a898f7ac6ae48271/Cc Arnout Vandecappelle (Essensium/Mind) <[email protected]>Signed-off-by Martin Bark <[email protected]>---
Changes v1 -> v2
- Depend on host-python or host-python3 instead of directly calling $(HOST_DIR)/usr/bin/python2 (Suggested by Arnout Vandecappelle)
- Added comments to ca-certificates.mk (Suggested by Arnout Vandecappelle)--- package/ca-certificates/ca-certificates.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)package/ca-certificates/ca-certificates.mk +0
-0
package/ca-certificates/ca-certificates.mk line 12
Quoted 7 lines
package/ca-certificates/ca-certificates.mk +3
-1@@ -7,7 +7,11 @@ CA_CERTIFICATES_VERSION = 20160104 CA_CERTIFICATES_SOURCE = ca-certificates_$(CA_CERTIFICATES_VERSION).tar.xz CA_CERTIFICATES_SITE = http://snapshot.debian.org/archive/debian/20160104T220912Z/pool/main/c/ca-certificates -CA_CERTIFICATES_DEPENDENCIES = host-openssl host-python +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
But this explanation definitely is clear, and that's the most important.
Regards,
Arnout
Quoted 6 lines
package/ca-certificates/ca-certificates.mk +2
-0+CA_CERTIFICATES_DEPENDENCIES += \ + $(if $(BR2_PACKAGE_PYTHON3),host-python3,host-python) CA_CERTIFICATES_LICENSE = GPLv2+ (script), MPLv2.0 (data) CA_CERTIFICATES_LICENSE_FILES = debian/copyright
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH v2 1/1 package/ca-certificates: depend on host-python or host-python3
In reply to Martin BarkHello,
Quoted 17 lines · Martin Bark
The ca-certificates
Makefiledirectly calls python but if python3 has been selected then it is possible for $(HOST_DIR)/usr/bin/python to not exist in the PATH at the time ca-certificates is built. This means theMakefilewill use python installed on the build host. If the build hosts python is less than python 2.7 then the build will fail.ca-certificates will build using host-python3. Fix the issue by depending on host-python3 if python3 is being used otherwise depend on host-python.
This fixes:
http://autobuild.buildroot.net/results/a2a4fed293c836b9cf63ff2aaa463b0704dec07e/
http://autobuild.buildroot.net/results/bbed4afa8e30382b8892062f31ba64cbb0ea14e4/
http://autobuild.buildroot.net/results/1af5562be3c0d233cea81834a898f7ac6ae48271/Cc Arnout Vandecappelle (Essensium/Mind) <[email protected]>Signed-off-by Martin Bark <[email protected]>
Quoted 8 lines
---
Changes v1 -> v2
- Depend on host-python or host-python3 instead of directly calling $(HOST_DIR)/usr/bin/python2 (Suggested by Arnout Vandecappelle)
- Added comments to ca-certificates.mk (Suggested by Arnout Vandecappelle)--- package/ca-certificates/ca-certificates.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
As suggested by Arnout, I've rewritten the commit log to make it clearer why we need to depend on host-python or host-python3. Then I've applied your patch. Thanks!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com