Skip to content

Commit

Permalink
openssl 3.0.1 static no-legacy (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
hemnstill authored Mar 9, 2022
1 parent 1a01464 commit 0f08ef5
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 13 deletions.
19 changes: 17 additions & 2 deletions .github/workflows/openssl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,21 @@ jobs:
tar -xf ./_musl.tar.gz
./openssl version
openssl-ubuntu-test:
needs: openssl-alpine-musl
runs-on: ubuntu-latest
container: ubuntu:20.04
steps:
- uses: actions/download-artifact@v2
with:
name: openssl-alpine-musl
path: .

- name: Test musl build on Ubuntu
run: |
tar -xf ./_musl.tar.gz
./openssl version
openssl-nanoserver-test:
needs: openssl-alpine-mingw
runs-on: windows-2022
Expand All @@ -95,7 +110,7 @@ jobs:
openssl-release:
runs-on: ubuntu-latest
needs: [openssl-alpine-test, openssl-nanoserver-test]
needs: [openssl-alpine-test, openssl-ubuntu-test, openssl-nanoserver-test]
steps:
- uses: actions/download-artifact@v2
with:
Expand All @@ -112,7 +127,7 @@ jobs:
cat _mingw.md >> body.md
- uses: ncipollo/release-action@v1
with:
tag: 'openssl-1_1_1m'
tag: 'openssl-3.0.1'
artifacts: './openssl*'
bodyFile: './body.md'
allowUpdates: true
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Standalone (static) tools:
- bsdtar 3.6.0 <https://github.com/libarchive/libarchive>
- pcre2grep 10.39 <https://github.com/PhilipHazel/pcre2>
- openssl 1_1_1m <https://github.com/openssl/openssl>
- openssl 3.0.1 <https://github.com/openssl/openssl>
12 changes: 6 additions & 6 deletions openssl/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,29 @@ apk add --no-cache alpine-sdk perl make linux-headers
echo "::endgroup::"

tool_name="openssl"
tool_version="1_1_1m"
tool_version="3.0.1"
echo "::set-output name=tool_name::$tool_name"
echo "::set-output name=tool_version::$tool_version"

download_url="https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_$tool_version.tar.gz"
download_url="https://github.com/openssl/openssl/archive/refs/tags/openssl-$tool_version.tar.gz"
echo "::group::prepare sources $download_url"

mkdir -p "$dp0/release" && cd "$dp0/release"
wget "$download_url" -O "tool-$tool_version.tar.gz"
tar -xf "tool-$tool_version.tar.gz" && cd "openssl-OpenSSL_$tool_version"
tar -xf "tool-$tool_version.tar.gz" && cd "openssl-openssl-$tool_version"

echo "::endgroup::"

echo "::group::build"

./Configure no-shared LDFLAGS='--static' linux-x86_64
./Configure no-shared no-tests no-legacy LDFLAGS='--static' linux-x86_64
make

echo "::endgroup::"

mkdir "$dp0/release/build" && cd "$dp0/release/build"
cp -f "$dp0/release/openssl-OpenSSL_$tool_version/apps/$tool_name" "$dp0/release/build/"
cp -f "$dp0/release/openssl-OpenSSL_$tool_version/apps/openssl.cnf" "$dp0/release/build/"
cp -f "$dp0/release/openssl-openssl-$tool_version/apps/$tool_name" "$dp0/release/build/"
cp -f "$dp0/release/openssl-openssl-$tool_version/apps/openssl.cnf" "$dp0/release/build/"

strip "$tool_name"
chmod +x "$tool_name"
Expand Down
8 changes: 4 additions & 4 deletions openssl/build_mingw.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@ apk add --no-cache alpine-sdk perl make linux-headers mingw-w64-gcc
echo "::endgroup::"

tool_name="openssl.exe"
tool_version="1_1_1m"
tool_version="3.0.1"
echo "::set-output name=tool_name::$tool_name"
echo "::set-output name=tool_version::$tool_version"

download_url="https://github.com/openssl/openssl/archive/refs/tags/OpenSSL_$tool_version.tar.gz"
download_url="https://github.com/openssl/openssl/archive/refs/tags/openssl-$tool_version.tar.gz"
echo "::group::prepare sources $download_url"

mkdir -p "$dp0/release" && cd "$dp0/release"
wget "$download_url" -O "tool-$tool_version.tar.gz"
tar -xf "tool-$tool_version.tar.gz" && cd "openssl-OpenSSL_$tool_version"
tar -xf "tool-$tool_version.tar.gz" && cd "openssl-openssl-$tool_version"

echo "::endgroup::"

Expand All @@ -31,7 +31,7 @@ make
echo "::endgroup::"

mkdir "$dp0/release/build" && cd "$dp0/release/build"
cp -f "$dp0/release/openssl-OpenSSL_$tool_version/apps/$tool_name" "$dp0/release/build/"
cp -f "$dp0/release/openssl-openssl-$tool_version/apps/$tool_name" "$dp0/release/build/"

{ printf 'SHA-256: %s
%s
Expand Down

0 comments on commit 0f08ef5

Please sign in to comment.