fix GitHub workflow working directories in MinGW builds
PATCH 1/1 fix GitHub workflow working directories in MinGW builds
replace hardcoded directory names with env variable version info bump pkcs11-helper version to 1.29.0
bump OpenSSL version to 1.1.1n
add OpenSSL version to cache key
use release file for pkcs11-helper archive
use OpenSSL URL endpoint with all/current versions
--- .github/workflows/build.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
.github/workflows/build.yaml +18 -18
@@ -19,8 +19,8 @@ jobs: env: MAKEFLAGS: -j3 LZO_VERSION: "2.10" - PKCS11_HELPER_VERSION: "1.26" - OPENSSL_VERSION: "1.1.1j" + PKCS11_HELPER_VERSION: "1.29.0" + OPENSSL_VERSION: "1.1.1n" TAP_WINDOWS_VERSION: "9.23.3" CHOST: ${{ matrix.chost }} TARGET: ${{ matrix.target }}
@@ -46,20 +46,20 @@ jobs: uses: actions/[email protected]... with: path: '~/mingw/' - key: ${{ matrix.target }}-mingw-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} + key: ${{ matrix.target }}-mingw-${{ env.OPENSSL_VERSION }}-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} # Repeating if: steps.cache.outputs.cache-hit != 'true' # on every step for building dependencies is ugly but # I haven't found a better solution so far. - - name: Download mingw depnendencies + - name: Download mingw dependencies if: steps.cache.outputs.cache-hit != 'true' run: | wget -c -P download-cache/ "https://build.openvpn.net/downloads/releases/tap-windows-${TAP_WINDOWS_VERSION}.zip" wget -c -P download-cache/ "https://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz" - wget -c -P download-cache/ "https://github.com/OpenSC/pkcs11-helper/archive/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.gz" - wget -c -P download-cache/ "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" - tar zxf "download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.gz" + wget -c -P download-cache/ "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-${PKCS11_HELPER_VERSION}/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" + wget -c -P download-cache/ "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" + tar jxf "download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" tar zxf "download-cache/lzo-${LZO_VERSION}.tar.gz" unzip download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip
@@ -67,56 +67,56 @@ jobs: - name: Configure OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: ./Configure --cross-compile-prefix=${CHOST}- shared ${{ matrix.target }} no-capieng --prefix="${HOME}/mingw/opt" --openssldir="${HOME}/mingw/opt" -static-libgcc - working-directory: "./openssl-1.1.1j" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: Build OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: make - working-directory: "./openssl-1.1.1j/" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: Install OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: make install - working-directory: "./openssl-1.1.1j/" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: autoreconf pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: autoreconf -iv - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: configure pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: OPENSSL_LIBS="-L${HOME}/mingw/opt/lib -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig ./configure --host=${CHOST} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu --disable-crypto-engine-gnutls --disable-crypto-engine-nss --disable-crypto-engine-polarssl --disable-crypto-engine-mbedtls - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: build pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: make all - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: install pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: make install - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: Configure lzo if: steps.cache.outputs.cache-hit != 'true' run: ./configure --host=${CHOST} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" - name: build lzo if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" run: make - name: install lzo if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" run: make install - name: copy tap-windows.h header if: steps.cache.outputs.cache-hit != 'true' - run: cp ./tap-windows-9.23.3/include/tap-windows.h ${HOME}/mingw/opt/include/ + run: cp ./tap-windows-${TAP_WINDOWS_VERSION}/include/tap-windows.h ${HOME}/mingw/opt/include/ - name: configure OpenVPN run: PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig DCO_SOURCEDIR=$(realpath ../ovpn-dco-win) LDFLAGS=-L$HOME/mingw/opt/lib CFLAGS=-I$HOME/mingw/opt/include OPENSSL_LIBS="-L${HOME}/opt/lib -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PREFIX=$HOME/mingw/opt LZO_CFLAGS=-I$HOME/mingw/opt/include LZO_LIBS="-L${HOME}/mingw/opt/lib -llzo2" ./configure --host=${CHOST} --disable-lz4 --enable-dco
--
2.30.2
I recall that link "
https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" becomes broken as soon as new version is released.
that is the way how openssl warns you to update.
"old" links are immutable.
пн, 25 апр. 2022 г. в 00:27, Marc Becker <[email protected]...>:
Quoted 169 lines
replace hardcoded directory names with env variable version info bump pkcs11-helper version to 1.29.0
bump OpenSSL version to 1.1.1n
add OpenSSL version to cache key
use release file for pkcs11-helper archive
use OpenSSL URL endpoint with all/current versionsSigned-off-by Marc Becker <[email protected]...>--- .github/workflows/build.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-).github/workflows/build.yaml +4
-4@@ -19,8 +19,8 @@ jobs: env: MAKEFLAGS: -j3 LZO_VERSION: "2.10" - PKCS11_HELPER_VERSION: "1.26" - OPENSSL_VERSION: "1.1.1j" + PKCS11_HELPER_VERSION: "1.29.0" + OPENSSL_VERSION: "1.1.1n" TAP_WINDOWS_VERSION: "9.23.3" CHOST: ${{ matrix.chost }} TARGET: ${{ matrix.target }}@@ -46,20 +46,20 @@ jobs: uses: actions/[email protected]... with: path: '~/mingw/' - key: ${{ matrix.target }}-mingw-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} + key: ${{ matrix.target }}-mingw-${{ env.OPENSSL_VERSION }}-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} # Repeating if: steps.cache.outputs.cache-hit != 'true' # on every step for building dependencies is ugly but # I haven't found a better solution so far. - - name: Download mingw depnendencies + - name: Download mingw dependencies if: steps.cache.outputs.cache-hit != 'true' run: | wget -c -P download-cache/ "https://build.openvpn.net/downloads/releases/tap-windows-${TAP_WINDOWS_VERSION}.zip
"
wget -c -P download-cache/ "
https://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz
"
- wget -c -P download-cache/ "
https://github.com/OpenSC/pkcs11-helper/archive/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.gz
"
- wget -c -P download-cache/ "
https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz
"
- tar zxf
"download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.gz"
+ wget -c -P download-cache/ "
https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-${PKCS11_HELPER_VERSION}/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2
"
+ wget -c -P download-cache/ "
https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz"
+ tar jxf
"download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2"tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" tar zxf "download-cache/lzo-${LZO_VERSION}.tar.gz" unzip download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip.github/workflows/build.yaml +0
-0@@ -67,56 +67,56 @@ jobs: - name: Configure OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: ./Configure --cross-compile-prefix=${CHOST}- shared ${{matrix.target }} no-capieng --prefix="${HOME}/mingw/opt" --openssldir="${HOME}/mingw/opt" -static-libgcc
.github/workflows/build.yaml +4
-4- working-directory: "./openssl-1.1.1j" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: Build OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: make - working-directory: "./openssl-1.1.1j/" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: Install OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: make install - working-directory: "./openssl-1.1.1j/" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: autoreconf pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: autoreconf -iv - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION}}"
- name: configure pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: OPENSSL_LIBS="-L${HOME}/mingw/opt/lib -lssl -lcrypto"OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig ./configure --host=${CHOST} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu --disable-crypto-engine-gnutls --disable-crypto-engine-nss --disable-crypto-engine-polarssl --disable-crypto-engine-mbedtls
.github/workflows/build.yaml +1
-1- working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION}}"
- name: build pkcs11-helper
if: steps.cache.outputs.cache-hit != 'true'
run: make all.github/workflows/build.yaml +1
-1- working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION}}"
- name: install pkcs11-helper
if: steps.cache.outputs.cache-hit != 'true'
run: make install.github/workflows/build.yaml +1
-1- working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION}}"
- name: Configure lzo if: steps.cache.outputs.cache-hit != 'true' run: ./configure --host=${CHOST} --program-prefix=''--libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu
.github/workflows/build.yaml +3
-4- working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" - name: build lzo if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" run: make - name: install lzo if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" run: make install - name: copy tap-windows.h header if: steps.cache.outputs.cache-hit != 'true' - run: cp ./tap-windows-9.23.3/include/tap-windows.h${HOME}/mingw/opt/include/
+ run: cp./tap-windows-${TAP_WINDOWS_VERSION}/include/tap-windows.h${HOME}/mingw/opt/include/- name: configure OpenVPN
run: PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig
DCO_SOURCEDIR=$(realpath ../ovpn-dco-win) LDFLAGS=-L$HOME/mingw/opt/lib CFLAGS=-I$HOME/mingw/opt/include OPENSSL_LIBS="-L${HOME}/opt/lib -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PREFIX=$HOME/mingw/opt LZO_CFLAGS=-I$HOME/mingw/opt/include LZO_LIBS="-L${HOME}/mingw/opt/lib -llzo2" ./configure --host=${CHOST} --disable-lz4 --enable-dco --
2.30.2_______________________________________________
Openvpn-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openvpn-devel
Quoted 1 line
"old" links are immutable. The "old" links also do not provide the latest versions (currently 1.1.1n & 3.0.2). While the mirrors do follow the logic of having only the latest version on top level, it seams on the main site all versions can be fetched via this pattern (tested). This way building a matrix with [ 1.0.2, 1.1.1n, 3.0.2 ] should also be possible with little effort. It also does not require version→subpath magic for pre-3.0 versions (when OpenSSL introduced sane versioning).
PATCH v2 1/1 fix GitHub workflow working directories in MinGW builds
In reply to Marc Beckerreplace hardcoded directory names with env variable version info bump pkcs11-helper version to 1.29.0
bump OpenSSL version to 1.1.1n
add OpenSSL version to cache key
use release file for pkcs11-helper archive
use OpenSSL URL endpoint with all/current versions
---
fix whitespace (lost during SMTP transfer, retry with base64)
.github/workflows/build.yaml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-)
.github/workflows/build.yaml +18 -18
@@ -19,8 +19,8 @@ jobs: env: MAKEFLAGS: -j3 LZO_VERSION: "2.10" - PKCS11_HELPER_VERSION: "1.26" - OPENSSL_VERSION: "1.1.1j" + PKCS11_HELPER_VERSION: "1.29.0" + OPENSSL_VERSION: "1.1.1n" TAP_WINDOWS_VERSION: "9.23.3" CHOST: ${{ matrix.chost }} TARGET: ${{ matrix.target }}
@@ -46,20 +46,20 @@ jobs: uses: actions/[email protected]... with: path: '~/mingw/' - key: ${{ matrix.target }}-mingw-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} + key: ${{ matrix.target }}-mingw-${{ env.OPENSSL_VERSION }}-${{ env.LZO_VERSION }}-${{ env.PKCS11_HELPER_VERSION }}-${{ env.TAP_WINDOWS_VERSION }} # Repeating if: steps.cache.outputs.cache-hit != 'true' # on every step for building dependencies is ugly but # I haven't found a better solution so far. - - name: Download mingw depnendencies + - name: Download mingw dependencies if: steps.cache.outputs.cache-hit != 'true' run: | wget -c -P download-cache/ "https://build.openvpn.net/downloads/releases/tap-windows-${TAP_WINDOWS_VERSION}.zip" wget -c -P download-cache/ "https://www.oberhumer.com/opensource/lzo/download/lzo-${LZO_VERSION}.tar.gz" - wget -c -P download-cache/ "https://github.com/OpenSC/pkcs11-helper/archive/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.gz" - wget -c -P download-cache/ "https://www.openssl.org/source/old/1.1.1/openssl-${OPENSSL_VERSION}.tar.gz" - tar zxf "download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.gz" + wget -c -P download-cache/ "https://github.com/OpenSC/pkcs11-helper/releases/download/pkcs11-helper-${PKCS11_HELPER_VERSION}/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" + wget -c -P download-cache/ "https://www.openssl.org/source/openssl-${OPENSSL_VERSION}.tar.gz" + tar jxf "download-cache/pkcs11-helper-${PKCS11_HELPER_VERSION}.tar.bz2" tar zxf "download-cache/openssl-${OPENSSL_VERSION}.tar.gz" tar zxf "download-cache/lzo-${LZO_VERSION}.tar.gz" unzip download-cache/tap-windows-${TAP_WINDOWS_VERSION}.zip
@@ -67,56 +67,56 @@ jobs: - name: Configure OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: ./Configure --cross-compile-prefix=${CHOST}- shared ${{ matrix.target }} no-capieng --prefix="${HOME}/mingw/opt" --openssldir="${HOME}/mingw/opt" -static-libgcc - working-directory: "./openssl-1.1.1j" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: Build OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: make - working-directory: "./openssl-1.1.1j/" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: Install OpenSSL if: steps.cache.outputs.cache-hit != 'true' run: make install - working-directory: "./openssl-1.1.1j/" + working-directory: "./openssl-${{ env.OPENSSL_VERSION }}" - name: autoreconf pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: autoreconf -iv - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: configure pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: OPENSSL_LIBS="-L${HOME}/mingw/opt/lib -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig ./configure --host=${CHOST} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu --disable-crypto-engine-gnutls --disable-crypto-engine-nss --disable-crypto-engine-polarssl --disable-crypto-engine-mbedtls - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: build pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: make all - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: install pkcs11-helper if: steps.cache.outputs.cache-hit != 'true' run: make install - working-directory: "./pkcs11-helper-pkcs11-helper-1.26" + working-directory: "./pkcs11-helper-${{ env.PKCS11_HELPER_VERSION }}" - name: Configure lzo if: steps.cache.outputs.cache-hit != 'true' run: ./configure --host=${CHOST} --program-prefix='' --libdir=${HOME}/mingw/opt/lib --prefix=${HOME}/mingw/opt --build=x86_64-pc-linux-gnu - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" - name: build lzo if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" run: make - name: install lzo if: steps.cache.outputs.cache-hit != 'true' - working-directory: "./lzo-2.10" + working-directory: "./lzo-${{ env.LZO_VERSION }}" run: make install - name: copy tap-windows.h header if: steps.cache.outputs.cache-hit != 'true' - run: cp ./tap-windows-9.23.3/include/tap-windows.h ${HOME}/mingw/opt/include/ + run: cp ./tap-windows-${TAP_WINDOWS_VERSION}/include/tap-windows.h ${HOME}/mingw/opt/include/ - name: configure OpenVPN run: PKG_CONFIG_PATH=${HOME}/mingw/opt/lib/pkgconfig DCO_SOURCEDIR=$(realpath ../ovpn-dco-win) LDFLAGS=-L$HOME/mingw/opt/lib CFLAGS=-I$HOME/mingw/opt/include OPENSSL_LIBS="-L${HOME}/opt/lib -lssl -lcrypto" OPENSSL_CFLAGS=-I$HOME/mingw/opt/include PREFIX=$HOME/mingw/opt LZO_CFLAGS=-I$HOME/mingw/opt/include LZO_LIBS="-L${HOME}/mingw/opt/lib -llzo2" ./configure --host=${CHOST} --disable-lz4 --enable-dco
Signature · 1 line
2.30.2
Applied (changes look reasonable and simplify future version bumps), and verified that everything builds in my GH repo and that it does, indeed, build with pkcs11-helper 1.29.0 (.bz2!) and OpenSSL 1.1.1n.
Your patch has been applied to the master branch.
commit 33abca041519b3f72bb6cc3eea81eb987e72d178
Author: Marc Becker Date: Mon Apr 25 23:58:22 2022 +0200
fix GitHub workflow working directories in MinGW builds
Signed-off-by: Marc Becker <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg24202.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering