Skip to contentSkip to conversation

Github Actions: Add libreSSL actions

PATCH In review Arne Schwabe 2 participants 4 messages Aug 22, 2022

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 Github Actions: Add libreSSL actions

Also we don't officially support it, it is nice to know when we break it.

---
 .github/workflows/build.yaml | 63 ++++++++++++++++++++++++++++++++++++
 1 file changed, 63 insertions(+)
.github/workflows/build.yaml +63 -0
index f42469af6..dfa3953f0 100644
@@ -366,3 +366,66 @@ jobs:
         token: ${{ secrets.OPENVPN_BUILD_REPO_DISPATCH }}
         repository: openvpn/openvpn-build
         event-type: openvpn-commit
+
+  libressl:
+    strategy:
+      fail-fast: false
+      matrix:
+        os: [ubuntu-22.04]
+        ssllib: [libressl]
+        build: [ normal, asan ]
+        configureflags: ["--with-openssl-engine=no"]
+        include:
+          - build: asan
+            cflags: "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
+            ldflags: -fsanitize=address
+            cc: clang
+          - build: normal
+            cflags: "-O2 -g"
+            ldflags: ""
+            cc: gcc
+
+    name: "${{matrix.cc}} ${{matrix.build}} - ${{matrix.os}} - ${{matrix.ssllib}}"
+    runs-on: ${{matrix.os}}
+    env:
+      CFLAGS: ${{ matrix.cflags }}
+      LDFLAGS: ${{ matrix.ldflags }}
+      CC: ${{matrix.cc}}
+
+    steps:
+      - name: Install dependencies
+        run: sudo apt update && sudo apt install -y liblzo2-dev libpam0g-dev liblz4-dev linux-libc-dev man2html clang libcmocka-dev python3-docutils libtool automake autoconf pkg-config libcap-ng-dev
+      - name: "libressl: checkout"
+        uses: actions/[email protected]...
+        with:
+          path: libressl
+          repository: libressl-portable/portable
+          ref: v3.5.3
+      - name: "libressl: autogen.sh"
+        run: ./autogen.sh
+        working-directory: libressl
+      - name: "libressl: autoconf"
+        run: autoreconf -fvi
+        working-directory: libressl
+      - name: "libressl: configure"
+        run: ./configure --enable-openvpn
+        working-directory: libressl
+      - name: "libressl: make all"
+        run: make -j3
+        working-directory: libressl
+      - name: "libressl: make install"
+        run: sudo make install
+        working-directory: libressl
+      - name: "ldconfig"
+        run: sudo ldconfig
+      - name: Checkout OpenVPN
+        uses: actions/[email protected]...
+      - name: autoconf
+        run: autoreconf -fvi
+      - name: configure
+        run: ./configure --with-crypto-library=openssl ${{matrix.configureflags}}
+      - name: make all
+        run: make -j3
+      - name: make check
+        run: make check
+
Signature · 1 line
2.32.1 (Apple Git-133)
#1 lore raw

PATCH 2/2 Include libressl and macOS 12 to macOS github actions

---
 .github/workflows/build.yaml | 24 +++++++++++++++++-------
 1 file changed, 17 insertions(+), 7 deletions(-)
.github/workflows/build.yaml +17 -7
index dfa3953f0..6c2c3ef3e 100644
@@ -261,12 +261,12 @@ jobs:
         run: make check
 
   macos:
-    runs-on: macos-latest
     strategy:
       fail-fast: false
       matrix:
-        ossl: [ 1.1, 3 ]
+        ssllib: [ openssl11, openssl3, libressl]
         build: [ normal, asan ]
+        os: [macos-11, macos-12]
         include:
           - build: asan
             cflags: "-fsanitize=address -fno-optimize-sibling-calls -fsanitize-address-use-after-scope -fno-omit-frame-pointer -g -O1"
@@ -277,22 +277,32 @@ jobs:
             cflags: "-O2 -g"
             ldflags: ""
             configureflags: ""
+          - ssllib: openssl11
+            libdir: [email protected]...
+            configuressllib: ""
+          - ssllib: openssl3
+            libdir: [email protected]...
+            configuressllib: ""
+          - ssllib: libressl
+            libdir: libressl
+            configuressllib: "--with-openssl-engine=no"
 
-    name: "macOS - OpenSSL ${{matrix.ossl}} - ${{matrix.build}}"
+    runs-on: ${{matrix.os}}
+    name: "${{matrix.os}} - ${{matrix.libdir}} - ${{matrix.build}}"
     env:
       CFLAGS: ${{ matrix.cflags }}
       LDFLAGS: ${{ matrix.ldflags }}
-      OPENSSL_CFLAGS: -I/usr/local/opt/openssl@${{matrix.ossl}}/include
-      OPENSSL_LIBS: "-L/usr/local/opt/openssl@${{matrix.ossl}}/lib -lcrypto -lssl"
+      OPENSSL_CFLAGS: "-I/usr/local/opt/${{matrix.libdir}}/include"
+      OPENSSL_LIBS: "-L/usr/local/opt/${{matrix.libdir}}/lib -lcrypto -lssl"
     steps:
       - name: Install dependencies
-        run: brew install [email protected]... [email protected]... lzo lz4 man2html cmocka libtool automake autoconf
+        run: brew install [email protected]... [email protected]... lzo lz4 man2html cmocka libtool automake autoconf libressl
       - name: Checkout OpenVPN
         uses: actions/[email protected]...
       - name: autoconf
         run: autoreconf -fvi
       - name: configure
-        run: ./configure ${{matrix.configureflags}}
+        run: ./configure ${{matrix.configureflags}} ${{matrix.configuressllib}}
       - name: make all
         run: make -j4
       - name: make check
Signature · 1 line
2.32.1 (Apple Git-133)
Acked-by on v1 1/2
#3 lore raw
In reply to Arne Schwabe

Looks reasonable, and more test are always good. Tested by pushing to my GH repo, and it builds all green today (no good starting with "already broken" when nobody has much interest in working on it)

Your patch has been applied to the master branch.

commit a79f8034cc6797e39615d35bc7c6f601eec2f6ae

Author: Arne Schwabe
Date:   Mon Aug 22 20:41:46 2022 +0200
     Github Actions: Add libreSSL actions

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg25064.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering

Acked-by on v1 2/2
#2 lore raw

[Openvpn-devel] [PATCH applied] Re: Include libressl and macOS 12 to macOS github actions

In reply to Arne Schwabe

Same thing, "looks reasonable and all green on my github repo" :-)

Your patch has been applied to the master branch.

commit c0724527190d864b20fb3f5725ebdcadd8900697

Author: Arne Schwabe
Date:   Mon Aug 22 20:41:47 2022 +0200
     Include libressl and macOS 12 to macOS github actions

     Signed-off-by: Arne Schwabe <[email protected]...>
     Acked-by: Gert Doering <[email protected]...>
     Message-Id: <[email protected]...>
     URL: https://www.mail-archive.com/[email protected]/msg25065.html
     Signed-off-by: Gert Doering <[email protected]...>

--
kind regards,

Gert Doering