From 87b798864398614833c4141fab533371f41e117e Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Tue, 21 Feb 2023 15:14:32 -0500 Subject: [PATCH 1/8] Add cross compilers --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index a6b778933..901bf8d50 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -3,7 +3,7 @@ FROM $DOCKER_BASE_IMAGE USER root -RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-multilib +RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils gcc-multilib gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu ARG USER=docker ARG UID=1000 From 2b96f4bd16ecd3fbafa6f87d9e3e52c87d643aa8 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Tue, 21 Feb 2023 16:42:24 -0500 Subject: [PATCH 2/8] Add in liboqs --- Docker/Dockerfile | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 901bf8d50..f3faaaf6a 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -3,11 +3,18 @@ FROM $DOCKER_BASE_IMAGE USER root -RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils gcc-multilib gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu +ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils gcc-multilib gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu" +ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git" +RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \ + && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \ + && apt clean -y && rm -rf /var/lib/apt/lists/* ARG USER=docker ARG UID=1000 ARG GID=1000 RUN groupadd -f -g ${GID} docker && ( getent passwd ${UID} || useradd -ms /bin/bash ${USER} -u ${UID} -g ${GID} ) +# install liboqs +RUN git clone --single-branch https://github.com/open-quantum-safe/liboqs.git && cd liboqs && git checkout af76ca3b1f2fbc1f4f0967595f3bb07692fb3d82 && mkdir build && cd build && cmake -DOQS_USE_OPENSSL=0 .. && make -j8 all && make install && cd ../.. && rm -rf liboqs + USER ${UID}:${GID} \ No newline at end of file From 559db5f314f7f8dec209834924699d70fefaa7ae Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 22 Feb 2023 09:55:52 -0500 Subject: [PATCH 3/8] Build liboqs for distribution This makes it possible to use the library on same architecture but different processor type. --- Docker/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index f3faaaf6a..5b3e0fe50 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -15,6 +15,7 @@ ARG GID=1000 RUN groupadd -f -g ${GID} docker && ( getent passwd ${UID} || useradd -ms /bin/bash ${USER} -u ${UID} -g ${GID} ) # install liboqs -RUN git clone --single-branch https://github.com/open-quantum-safe/liboqs.git && cd liboqs && git checkout af76ca3b1f2fbc1f4f0967595f3bb07692fb3d82 && mkdir build && cd build && cmake -DOQS_USE_OPENSSL=0 .. && make -j8 all && make install && cd ../.. && rm -rf liboqs +RUN git clone --single-branch https://github.com/open-quantum-safe/liboqs.git && cd liboqs && git checkout af76ca3b1f2fbc1f4f0967595f3bb07692fb3d82 \ + && mkdir build && cd build && cmake -DOQS_DIST_BUILD=ON -DOQS_USE_OPENSSL=0 .. && make -j8 all && make install && cd ../.. && rm -rf liboqs USER ${UID}:${GID} \ No newline at end of file From 62748ba4515a00b6e578519f6c09c63499c6413b Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Wed, 22 Feb 2023 10:04:17 -0500 Subject: [PATCH 4/8] One more liboqs flag --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 5b3e0fe50..7f79ebcac 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -16,6 +16,6 @@ RUN groupadd -f -g ${GID} docker && ( getent passwd ${UID} || useradd -ms /bin/b # install liboqs RUN git clone --single-branch https://github.com/open-quantum-safe/liboqs.git && cd liboqs && git checkout af76ca3b1f2fbc1f4f0967595f3bb07692fb3d82 \ - && mkdir build && cd build && cmake -DOQS_DIST_BUILD=ON -DOQS_USE_OPENSSL=0 .. && make -j8 all && make install && cd ../.. && rm -rf liboqs + && mkdir build && cd build && cmake -DOQS_DIST_BUILD=ON -DOQS_USE_CPUFEATURE_INSTRUCTIONS=OFF -DOQS_USE_OPENSSL=0 .. && make -j8 all && make install && cd ../.. && rm -rf liboqs USER ${UID}:${GID} \ No newline at end of file From d98dd53f555cb142d9e230efdf826cf3b10f7e63 Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Thu, 23 Feb 2023 12:52:25 -0500 Subject: [PATCH 5/8] Add one more utility --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 7f79ebcac..c314bd7d5 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -3,7 +3,7 @@ FROM $DOCKER_BASE_IMAGE USER root -ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils gcc-multilib gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu" +ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-multilib gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu" ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git" RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \ && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \ From 392ddd1b4a619b1b19576852608d37e50226ea2f Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Fri, 24 Feb 2023 10:38:35 -0500 Subject: [PATCH 6/8] Remove conflicts --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index c314bd7d5..49109b47b 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -3,7 +3,7 @@ FROM $DOCKER_BASE_IMAGE USER root -ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-multilib gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu" +ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-multilib" ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git" RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \ && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \ From 7b96cd2220945fa32f1ba810ebd1560293fb202b Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Tue, 28 Feb 2023 09:29:23 -0500 Subject: [PATCH 7/8] Switch out gcc-multilib for more modern multiarch --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 49109b47b..685e121db 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -3,7 +3,7 @@ FROM $DOCKER_BASE_IMAGE USER root -ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-multilib" +ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu" ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git" RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \ && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \ From 41ce9afef41c6dbd4c2b58a7bc64bb859505c1cd Mon Sep 17 00:00:00 2001 From: Andras Fekete Date: Tue, 28 Feb 2023 11:19:09 -0500 Subject: [PATCH 8/8] Better dependency list Need 32bit compilation support as well as ARM/AARCH64 --- Docker/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Docker/Dockerfile b/Docker/Dockerfile index 685e121db..40af72cf2 100644 --- a/Docker/Dockerfile +++ b/Docker/Dockerfile @@ -3,7 +3,7 @@ FROM $DOCKER_BASE_IMAGE USER root -ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-arm-linux-gnueabi gcc-aarch64-linux-gnu" +ARG DEPS_WOLFSSL="build-essential autoconf libtool git gdb iputils-ping clang lldb bsdmainutils netcat gcc-multilib binutils-arm-linux-gnueabi binutils-aarch64-linux-gnu" ARG DEPS_LIBOQS="astyle cmake gcc ninja-build libssl-dev python3-pytest python3-pytest-xdist unzip xsltproc doxygen graphviz python3-yaml valgrind git" RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y apt-utils \ && apt install -y ${DEPS_WOLFSSL} ${DEPS_LIBOQS} \