Since 3c739b95ee ("sandbox: enable keytoc in hosttools_defconfig") the
hosttools_defconfig also builds keytoc a tool required to inject
cryptographic keys in a device tree.
This software needs openssl to be compiled. However, as barebox-ci is
using Debian as the base of its container, the openssl package given by
apt is compiled with the glibc.

In order to compile keytoc with musl, build a version of openssl against
musl in the barebox-ci container.

Signed-off-by: Thomas Bonnefille <[email protected]>
---
Hello, I added the support to build openssl against Musl, this fixes the
commit 3c739b9 in CI.
Another patch has been sent previously to fix this issue
(https://lore.kernel.org/barebox/[email protected]/)

I didn't find it in the 'next' branch of the Github repository
(git.pengutronix.de seems down on my side) and I assumed it wasn't
applied so I didn't include a revert commit for it.
---
 test/Containerfile | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/test/Containerfile b/test/Containerfile
index 296835d080..00f24a210f 100644
--- a/test/Containerfile
+++ b/test/Containerfile
@@ -118,4 +118,17 @@ ENV LLVM_SUFFIX=-${LLVM_VERSION}
 RUN ln -Ts /usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/linux/ \
            
/usr/lib/llvm-${LLVM_VERSION}/lib/clang/${LLVM_VERSION}/lib/x86_64-pc-linux-gnu
 
+ENV OPENSSL_VERSION=3.5.6
+ENV PKG_CONFIG_PATH=/opt/openssl-musl/lib64/pkgconfig
+RUN cd /tmp && \
+       wget 
https://github.com/openssl/openssl/releases/download/openssl-$OPENSSL_VERSION/openssl-$OPENSSL_VERSION.tar.gz
 && \
+       echo "deae7c80cba99c4b4f940ecadb3c3338b13cb77418409238e57d7f31f2a3b736 
openssl-$OPENSSL_VERSION.tar.gz" | sha256sum --check --status && \
+       tar -xzf openssl-$OPENSSL_VERSION.tar.gz && \
+       cd openssl-$OPENSSL_VERSION && \
+       ./Configure linux-x86_64 no-shared no-tests no-secure-memory 
no-afalgeng \
+               --prefix=/opt/openssl-musl --openssldir=/opt/openssl-musl/ssl 
CC=musl-gcc && \
+       make -j$(nproc) && make install_sw && \
+       ln -s /opt/openssl-musl/include/openssl /usr/include/x86_64-linux-musl 
&& \
+       rm -rf /tmp/openssl-$OPENSSL_VERSION.tar.gz 
/tmp/openssl-$OPENSSL_VERSION
+
 USER barebox:barebox

---
base-commit: 4705656eeeaba0dd3617b69172328daf4dbf9060
change-id: 20260806-add-openssl-musl-to-ci-f086904d4648

Best regards,
--  
Thomas Bonnefille <[email protected]>


Reply via email to