[buildbot] docker: fix Python cryptography build failure

LEDE Commits lede-commits at lists.infradead.org
Sat Mar 6 07:07:56 GMT 2021


ynezz pushed a commit to buildbot.git, branch master:
https://git.openwrt.org/92a90e32d4909b6da336ab10a9867df0afb3facf

commit 92a90e32d4909b6da336ab10a9867df0afb3facf
Author: Petr Štetiar <ynezz at true.cz>
AuthorDate: Tue Mar 2 15:13:22 2021 +0100

    docker: fix Python cryptography build failure
    
    It seems like recent Python cryptography package versions need Rust
    compiler present for OpenSSL wrapper, which leads to following error:
    
     generating cffi module 'build/temp.linux-x86_64-3.7/_openssl.c'
     running build_rust
     ...
     error: Can not find Rust compiler
    
    There is following note regarding this issue in the documentation:
    
     If you are on RHEL/CentOS/Fedora/Debian/Ubuntu or another distribution
     derived from the preceding list, then you should upgrade pip (in a
     virtual environment!) and attempt to install cryptography again before
     trying to install the Rust toolchain. These platforms will receive a
     binary wheel and require no compiler if you have an updated pip!
    
    So fix this by recommended pip update.
    
    References: https://cryptography.io/en/latest/installation.html#rust
    Signed-off-by: Petr Štetiar <ynezz at true.cz>
---
 docker/buildmaster/Dockerfile | 1 +
 docker/buildslave/Dockerfile  | 1 +
 2 files changed, 2 insertions(+)

diff --git a/docker/buildmaster/Dockerfile b/docker/buildmaster/Dockerfile
index cc85aab..9e10041 100644
--- a/docker/buildmaster/Dockerfile
+++ b/docker/buildmaster/Dockerfile
@@ -26,6 +26,7 @@ RUN \
 	apt-get clean && \
 	localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
 
+RUN pip3 install -U pip
 RUN \
 	pip3 install \
 		"buildbot-www==$BUILDBOT_VERSION" \
diff --git a/docker/buildslave/Dockerfile b/docker/buildslave/Dockerfile
index 2da6910..31eb720 100644
--- a/docker/buildslave/Dockerfile
+++ b/docker/buildslave/Dockerfile
@@ -34,6 +34,7 @@ RUN \
 	apt-get clean && \
 	localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8
 
+RUN pip3 install -U pip
 RUN pip3 install \
 		"buildbot-worker==$BUILDBOT_VERSION" \
 		pyOpenSSL \



More information about the lede-commits mailing list