Skip to content

Commit b0f41cb

Browse files
committed
Rebase for .deb CI testing
1 parent 1b4d674 commit b0f41cb

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+388
-248
lines changed

.github/scripts/check-workflow-result.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,6 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
6060
"curl-8_4_0")
6161
EXPECTED_FAILS="9 31 39 41 44 46 61 64 65 70 71 72 73 88 153 154 158 163 166 167 168 169 170 171 173 186 206 245 246 258 259 273 277 327 335 388 420 444 540 551 552 554 565 579 584 643 645 646 647 648 649 650 651 652 653 654 666 667 668 669 670 671 672 673 977 1001 1002 1030 1053 1060 1061 1071 1072 1079 1095 1105 1133 1136 1151 1155 1158 1160 1161 1186 1187 1189 1190 1191 1192 1193 1194 1195 1196 1198 1199 1229 1284 1285 1286 1293 1315 1404 1412 1415 1418 1437 1568 1903 1905 1916 1917 1964 2024 2026 2027 2028 2030 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2073 2076 2200 2201 2202 2203 2204 3017 3018"
6262
;;
63-
"master")
64-
EXPECTED_FAILS="9 31 39 41 44 46 61 64 65 70 71 72 73 88 153 154 158 163 166 167 168 169 170 171 173 186 206 245 246 258 259 273 277 327 335 388 420 444 483 540 551 552 554 565 579 584 643 645 646 647 648 649 650 651 652 653 654 666 667 668 669 670 671 672 673 695 977 1001 1002 1030 1053 1060 1061 1071 1072 1079 1095 1105 1133 1136 1151 1155 1158 1160 1161 1186 1187 1189 1190 1191 1192 1193 1194 1195 1196 1198 1199 1229 1284 1285 1286 1293 1315 1404 1412 1415 1418 1437 1476 1568 1608 1610 1615 1654 1660 1903 1905 1916 1917 1964 2024 2026 2027 2028 2030 2058 2059 2060 2061 2062 2063 2064 2065 2066 2067 2068 2069 2073 2076 2200 2201 2202 2203 2204 3017 3018"
65-
;;
6663
*)
6764
echo "Error: Unknown curl version: $CURL_VERSION"
6865
exit 1
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
# install-packages.sh
3+
#
4+
# Copyright (C) 2006-2025 wolfSSL Inc.
5+
#
6+
# This file is part of wolfProvider.
7+
#
8+
# wolfProvider is free software; you can redistribute it and/or modify
9+
# it under the terms of the GNU General Public License as published by
10+
# the Free Software Foundation; either version 3 of the License, or
11+
# (at your option) any later version.
12+
#
13+
# wolfProvider is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
# GNU General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU General Public License
19+
# along with wolfProvider. If not, see <http://www.gnu.org/licenses/>.
20+
21+
set -e
22+
23+
echo "WolfSSL artifacts:"
24+
ls -la /tmp/wolfssl-artifacts || true
25+
echo "OpenSSL/wolfProvider artifacts:"
26+
ls -la /tmp/openssl-wolfprov-artifacts || true
27+
28+
# Install wolfSSL first
29+
wolfssl_debs=$(ls -1 /tmp/wolfssl-artifacts/*.deb 2>/dev/null || true)
30+
if [ -n "$wolfssl_debs" ]; then
31+
echo "Installing wolfSSL packages: $wolfssl_debs"
32+
apt install -y $wolfssl_debs
33+
fi
34+
35+
# Install OpenSSL packages (runtime + development headers)
36+
openssl_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/openssl_[0-9]*.deb 2>/dev/null || true)
37+
libssl3_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/libssl3_[0-9]*.deb 2>/dev/null || true)
38+
libssl_dev_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/libssl-dev_[0-9]*.deb 2>/dev/null || true)
39+
40+
# Install in dependency order: libssl3 first, then openssl, then dev headers
41+
if [ -n "$libssl3_debs" ]; then
42+
echo "Installing libssl3: $libssl3_debs"
43+
apt install -y $libssl3_debs
44+
fi
45+
if [ -n "$openssl_debs" ]; then
46+
echo "Installing openssl: $openssl_debs"
47+
apt install -y $openssl_debs
48+
fi
49+
if [ -n "$libssl_dev_debs" ]; then
50+
echo "Installing libssl-dev: $libssl_dev_debs"
51+
apt install -y $libssl_dev_debs
52+
fi
53+
54+
# Install wolfProvider main package only (no dev/debug needed for testing)
55+
wolfprov_main=$(ls -1 /tmp/openssl-wolfprov-artifacts/libwolfprov_[0-9]*.deb 2>/dev/null | head -n1 || true)
56+
57+
if [ -z "$wolfprov_main" ]; then
58+
echo "ERROR: libwolfprov main package not found in artifacts"
59+
ls -la /tmp/openssl-wolfprov-artifacts
60+
exit 1
61+
fi
62+
63+
echo "Installing wolfProvider main package: $wolfprov_main"
64+
apt install -y "$wolfprov_main"

.github/workflows/asan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Asan Test
44
on:
55
push:
66
branches: [ "*" ]
7-
pull_request:
8-
branches: [ "*" ]
7+
#pull_request:
8+
#branches: [ "*" ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/bind9.yml

Lines changed: 31 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,40 +20,54 @@ jobs:
2020
openssl_ref: ${{ matrix.openssl_ref }}
2121
strategy:
2222
matrix:
23-
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
23+
# Test 5.8.2 since our .deb is based on that version
24+
wolfssl_ref: [ 'v5.8.2-stable' ]
2425
openssl_ref: [ 'openssl-3.5.0' ]
2526

2627
test_bind:
2728
runs-on: ubuntu-22.04
2829
needs: build_wolfprovider
2930
# This should be a safe limit for the tests to run.
3031
timeout-minutes: 20
32+
container:
33+
image: debian:bookworm
34+
env:
35+
DEBIAN_FRONTEND: noninteractive
3136
strategy:
3237
fail-fast: false
3338
matrix:
39+
# Dont test osp master since it might be too unstable
3440
bind_ref: [ 'v9.18.28' ]
35-
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
41+
wolfssl_ref: [ 'v5.8.2-stable' ]
3642
openssl_ref: [ 'openssl-3.5.0' ]
3743
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
3844
steps:
45+
- name: Set up environment
46+
run: |
47+
apt-get update
48+
apt-get install -y git sudo build-essential autoconf automake \
49+
libtool pkg-config libjansson-dev check ca-certificates dpkg-dev
50+
3951
- name: Checkout wolfProvider
4052
uses: actions/checkout@v4
4153
with:
4254
fetch-depth: 1
4355

44-
- name: Retrieving wolfSSL/wolfProvider from cache
45-
uses: actions/cache/restore@v4
46-
id: wolfprov-cache
56+
- name: Download wolfSSL packages
57+
uses: actions/download-artifact@v4
4758
with:
48-
path: |
49-
wolfssl-install
50-
wolfprov-install
51-
openssl-install/lib64
52-
openssl-install/include
53-
openssl-install/bin
59+
name: wolfssl-debian-packages-${{ github.sha }}
60+
path: /tmp/wolfssl-artifacts
5461

55-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
56-
fail-on-cache-miss: true
62+
- name: Download OpenSSL/wolfProvider packages
63+
uses: actions/download-artifact@v4
64+
with:
65+
name: openssl-wolfprov-debian-packages-${{ github.sha }}
66+
path: /tmp/openssl-wolfprov-artifacts
67+
68+
- name: Install wolfSSL/OpenSSL/wolfprov packages
69+
run: |
70+
$GITHUB_WORKSPACE/.github/scripts/install-packages.sh
5771
5872
- name: Install bind9 test dependencies
5973
run: |
@@ -86,8 +100,10 @@ jobs:
86100
- name: Build and test bind9 with wolfProvider
87101
working-directory: bind9
88102
run: |
89-
# Set up the environment for wolfProvider
90-
source $GITHUB_WORKSPACE/scripts/env-setup
103+
# wolfProvider is already loaded as the default provider
104+
echo "Current OpenSSL providers:"
105+
openssl list -providers
106+
openssl list -providers | grep -q "wolfSSL Provider" || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1)
91107
92108
autoreconf -ivf
93109
./configure

.github/workflows/build-wolfprovider.yml

Lines changed: 76 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,87 +18,103 @@ jobs:
1818
build_wolfprovider_common:
1919
name: Build wolfProvider
2020
runs-on: ubuntu-22.04
21+
# Run inside Debian Bookworm to match packaging environment
22+
container:
23+
image: debian:bookworm
24+
env:
25+
DEBIAN_FRONTEND: noninteractive
2126
timeout-minutes: 20
2227
outputs:
2328
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
2429
steps:
30+
- name: Set up environment
31+
run: |
32+
apt-get update
33+
apt-get install -y \
34+
build-essential \
35+
devscripts \
36+
debhelper \
37+
dh-autoreconf \
38+
libtool \
39+
pkg-config \
40+
git \
41+
wget \
42+
curl \
43+
ca-certificates \
44+
openssl \
45+
dpkg-dev \
46+
lintian \
47+
fakeroot \
48+
dh-exec \
49+
equivs \
50+
expect \
51+
xxd
52+
53+
- name: Ensure the working directory safe
54+
run: |
55+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
56+
2557
- name: Checkout wolfProvider
2658
uses: actions/checkout@v4
2759
with:
2860
fetch-depth: 1
2961

30-
- name: Get OpenSSL commit hash
31-
id: openssl-ref
62+
- name: Fetch tags (for Debian versioning)
3263
run: |
33-
sha=$(./scripts/resolve-ref.sh "${{ inputs.openssl_ref }}" "openssl/openssl")
34-
echo "ref=$sha" >> "$GITHUB_OUTPUT"
35-
env:
36-
# Used token to bypass rate limits
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
git fetch --tags --force --prune
3865
39-
- name: Get WolfSSL commit hash
40-
id: wolfssl-ref
66+
- name: Install wolfSSL Debian packages from repo tarball
4167
run: |
42-
sha=$(./scripts/resolve-ref.sh "${{ inputs.wolfssl_ref }}" "wolfssl/wolfssl")
43-
echo "ref=$sha" >> "$GITHUB_OUTPUT"
44-
env:
45-
# Used token to bypass rate limits
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
mkdir -p "/tmp/wolfssl-pkg"
69+
chmod +x $GITHUB_WORKSPACE/debian/install-wolfssl.sh
70+
$GITHUB_WORKSPACE/debian/install-wolfssl.sh \
71+
$GITHUB_WORKSPACE/.github/packages/debian-wolfssl.tar.gz \
72+
"/tmp/wolfssl-pkg"
4773
48-
# Look for a cached version of OpenSSL
49-
- name: Checking OpenSSL in cache
50-
uses: actions/cache/restore@v4
51-
id: openssl-cache
52-
with:
53-
path: |
54-
openssl-install
55-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
56-
lookup-only: false
74+
# Stage wolfSSL debs into artifacts directory
75+
mkdir -p "/tmp/wolfprov-packages"
76+
echo "Moving wolfssl files to artifacts directory..."
5777
58-
# Look for a cached version of WolfSSL
59-
- name: Checking WolfSSL in cache
60-
uses: actions/cache/restore@v4
61-
id: wolfssl-cache
62-
with:
63-
path: |
64-
wolfssl-install
65-
key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }}
66-
lookup-only: false
78+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.deb" -exec cp {} /tmp/wolfprov-packages/ \;
79+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.dsc" -exec cp {} /tmp/wolfprov-packages/ \;
80+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.tar.gz" -exec cp {} /tmp/wolfprov-packages/ \;
81+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.orig.tar.gz" -exec cp {} /tmp/wolfprov-packages/ \;
6782
68-
- name: Build wolfProvider
83+
- name: Build Debian packages (wolfProvider + OpenSSL)
6984
run: |
70-
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh
85+
yes Y | ./scripts/build-wolfprovider.sh --debian
7186
72-
# Save the wolfProvider outputs for use by the parent jobs.
73-
# Note that we don't try to restore since it will likely always
74-
# be a cache miss.
75-
- name: Save wolfProvider into cache
76-
uses: actions/cache/save@v4
77-
with:
78-
path: |
79-
wolfssl-install
80-
wolfprov-install
81-
openssl-install/lib64
82-
openssl-install/include
83-
openssl-install/bin
84-
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
87+
echo "Generated packages in parent dir:"
88+
ls -la ../ || true
89+
ls -la ../*.deb ../*.dsc ../*.tar.gz 2>/dev/null || true
90+
91+
- name: Collect package artifacts
92+
run: |
93+
mkdir -p "/tmp/wolfprov-packages"
94+
mv ../*.deb /tmp/wolfprov-packages/ 2>/dev/null || true
95+
mv ../*.dsc /tmp/wolfprov-packages/ 2>/dev/null || true
96+
mv ../*.tar.gz /tmp/wolfprov-packages/ 2>/dev/null || true
97+
echo "Artifacts to upload:"
98+
ls -la /tmp/wolfprov-packages || true
8599
86-
# If openssl cache miss, save it to the cache
87-
- name: Save OpenSSL into cache
88-
if: steps.openssl-cache.outputs.cache-hit != 'true'
89-
uses: actions/cache/save@v4
90-
with:
100+
- name: Upload wolfSSL packages
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: wolfssl-debian-packages-${{ github.sha }}
91104
path: |
92-
openssl-install
93-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
105+
/tmp/wolfprov-packages/*wolfssl*.deb
106+
retention-days: 7
94107

95-
- name: Save WolfSSL into cache
96-
if: steps.wolfssl-cache.outputs.cache-hit != 'true'
97-
uses: actions/cache/save@v4
98-
with:
108+
- name: Upload OpenSSL/wolfProvider packages
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: openssl-wolfprov-debian-packages-${{ github.sha }}
99112
path: |
100-
wolfssl-install
101-
key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }}
113+
/tmp/wolfprov-packages/*openssl*.deb
114+
/tmp/wolfprov-packages/*libssl3*.deb
115+
/tmp/wolfprov-packages/*libssl-dev*.deb
116+
/tmp/wolfprov-packages/*libwolfprov*.deb
117+
retention-days: 7
102118

103119
- name: Print errors
104120
if: ${{ failure() }}

0 commit comments

Comments
 (0)