From b91c3f02c3775a859fc90b251bfb688605f08fce Mon Sep 17 00:00:00 2001 From: Quim Muntal Date: Wed, 24 May 2023 15:31:08 +0000 Subject: [PATCH 1/3] simplify devcontainer --- .devcontainer/Dockerfile | 5 ----- .devcontainer/devcontainer.json | 19 +++++++++---------- 2 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 .devcontainer/Dockerfile diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile deleted file mode 100644 index 3432e00..0000000 --- a/.devcontainer/Dockerfile +++ /dev/null @@ -1,5 +0,0 @@ -ARG VARIANT=1.17-bullseye -FROM mcr.microsoft.com/devcontainers/go:0-${VARIANT} - -RUN apt-get update \ - && apt-get install -y build-essential diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index cdf1e72..90981ce 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,19 +2,18 @@ { "name": "Go", - "build": { - "dockerfile": "Dockerfile", - "args": { - "VARIANT": "1.17-bullseye", - } - }, "containerEnv": { - "GO_OPENSSL_VERSION_OVERRIDE": "1.1.0", + "GO_OPENSSL_VERSION_OVERRIDE": "1.1.1" }, - "onCreateCommand": "sh ${containerWorkspaceFolder}/scripts/openssl.sh ${GO_OPENSSL_VERSION_OVERRIDE}", + "features": { + "ghcr.io/devcontainers/features/go:1": {} + }, + "onCreateCommand": "sudo sh ${containerWorkspaceFolder}/scripts/openssl.sh ${GO_OPENSSL_VERSION_OVERRIDE}", "customizations": { "vscode": { - "extensions": ["golang.go"] + "extensions": [ + "golang.go" + ] } - }, + } } \ No newline at end of file From e802253f2dfe014f9bbaecc3ac47c46437a38bf0 Mon Sep 17 00:00:00 2001 From: Quim Muntal Date: Thu, 25 May 2023 14:03:12 +0000 Subject: [PATCH 2/3] remove devcontainer extensions object --- .devcontainer/devcontainer.json | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 90981ce..f837fc3 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -8,12 +8,5 @@ "features": { "ghcr.io/devcontainers/features/go:1": {} }, - "onCreateCommand": "sudo sh ${containerWorkspaceFolder}/scripts/openssl.sh ${GO_OPENSSL_VERSION_OVERRIDE}", - "customizations": { - "vscode": { - "extensions": [ - "golang.go" - ] - } - } + "onCreateCommand": "sudo sh ${containerWorkspaceFolder}/scripts/openssl.sh ${GO_OPENSSL_VERSION_OVERRIDE}" } \ No newline at end of file From 1973167ee4e8ce708e03dfe639828929fda62fe5 Mon Sep 17 00:00:00 2001 From: Quim Muntal Date: Fri, 26 May 2023 10:53:02 +0000 Subject: [PATCH 3/3] fix openssl3 install script --- scripts/openssl.sh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/scripts/openssl.sh b/scripts/openssl.sh index 3499de7..68f4756 100644 --- a/scripts/openssl.sh +++ b/scripts/openssl.sh @@ -13,24 +13,28 @@ case "$version" in sha256="82fa58e3f273c53128c6fe7e3635ec8cda1319a10ce1ad50a987c3df0deeef05" config="shared" make="build_libs" + install="" ;; "1.1.0") tag="OpenSSL_1_1_0l" sha256="e2acf0cf58d9bff2b42f2dc0aee79340c8ffe2c5e45d3ca4533dd5d4f5775b1d" config="shared" make="build_libs" + install="" ;; "1.1.1") tag="OpenSSL_1_1_1m" sha256="36ae24ad7cf0a824d0b76ac08861262e47ec541e5d0f20e6d94bab90b2dab360" config="shared" make="build_libs" + install="" ;; "3.0.1") tag="openssl-3.0.1"; sha256="2a9dcf05531e8be96c296259e817edc41619017a4bf3e229b4618a70103251d5" - config="shared enable-fips" - make="install_fips" + config="enable-fips" + make="build_libs" + install="install_fips" ;; *) echo >&2 "error: unsupported OpenSSL version '$version'" @@ -49,5 +53,8 @@ mv "openssl-$tag" "openssl-$version" cd "openssl-$version" ./config $config make -j$(nproc) $make +if [ -n "$install" ]; then + make $install +fi cp -H ./libcrypto.so "/usr/lib/libcrypto.so.${version}"