Skip to content

Commit 61d4a40

Browse files
committed
Revert 'Cleanup Debian packaging flow' - causing issues
This reverts commit b337f3d70de6b2cba8c6c8c9b9d59e8b8a8e8e8e. Reverts the debug flag support and other changes from PR wolfSSL#278 that are causing workflow issues.
1 parent 773822f commit 61d4a40

File tree

8 files changed

+51
-74
lines changed

8 files changed

+51
-74
lines changed

.github/workflows/debian-package.yml

Lines changed: 24 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -7,23 +7,13 @@ on:
77
branches: [ '*' ]
88

99
jobs:
10-
build_wolfprovider:
11-
uses: ./.github/workflows/build-wolfprovider.yml
12-
with:
13-
wolfssl_ref: master
14-
openssl_ref: openssl-3.5.0
15-
1610
libwolfprov-standalone:
1711
runs-on: ubuntu-22.04
1812
# Important: use Debian Bookworm for compatibility
1913
container:
2014
image: debian:bookworm # or debian:bookworm-slim
2115
env:
2216
DEBIAN_FRONTEND: noninteractive
23-
strategy:
24-
matrix:
25-
debug_flag: [ '', '--debug' ]
26-
needs: build_wolfprovider
2717
steps:
2818
- name: Set up environment
2919
run: |
@@ -67,42 +57,34 @@ jobs:
6757
# List all tags
6858
git tag -l
6959
70-
- name: Download wolfSSL packages
71-
uses: actions/download-artifact@v4
72-
with:
73-
name: wolfssl-debian-packages-${{ github.sha }}
74-
path: /tmp/wolfssl-artifacts
75-
76-
- name: Download OpenSSL/wolfProvider packages
77-
uses: actions/download-artifact@v4
78-
with:
79-
name: openssl-wolfprov-debian-packages-${{ github.sha }}
80-
path: /tmp/openssl-wolfprov-artifacts
81-
82-
- name: Install wolfSSL debian packages from artifact
60+
- name: Install wolfssl debian package
8361
run: |
84-
set -e
85-
echo "WolfSSL artifacts:"
86-
ls -la /tmp/wolfssl-artifacts || true
87-
88-
# Install wolfSSL runtime and headers (from our artifact, not apt)
89-
wolfssl_debs=$(ls -1 /tmp/wolfssl-artifacts/*.deb 2>/dev/null || true)
90-
if [ -n "$wolfssl_debs" ]; then
91-
echo "Installing wolfSSL packages: $wolfssl_debs"
92-
apt install -y $wolfssl_debs
93-
else
94-
echo "ERROR: No wolfSSL .deb files found in artifact"
95-
exit 1
96-
fi
62+
mkdir -p "/tmp/wolfssl-pkg"
63+
cd "/tmp/wolfssl-pkg"
64+
65+
# Install wolfssl packages
66+
chmod +x $GITHUB_WORKSPACE/debian/install-wolfssl.sh
67+
$GITHUB_WORKSPACE/debian/install-wolfssl.sh \
68+
$GITHUB_WORKSPACE/.github/packages/debian-wolfssl.tar.gz \
69+
"/tmp/wolfssl-pkg"
9770
98-
# Copy wolfSSL debs into the unified artifacts directory for later upload
71+
# Create wolfprov-packages directory and move wolfssl files there
9972
mkdir -p "/tmp/wolfprov-packages"
100-
cp -v /tmp/wolfssl-artifacts/*.deb /tmp/wolfprov-packages/ 2>/dev/null || true
73+
echo "Moving wolfssl files to artifacts directory..."
74+
75+
# Copy all wolfssl-related files (source and binary packages)
76+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.deb" -exec cp {} /tmp/wolfprov-packages/ \;
77+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.dsc" -exec cp {} /tmp/wolfprov-packages/ \;
78+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.tar.gz" -exec cp {} /tmp/wolfprov-packages/ \;
79+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.orig.tar.gz" -exec cp {} /tmp/wolfprov-packages/ \;
80+
81+
echo "WolfSSL files in artifacts directory:"
82+
ls -la /tmp/wolfprov-packages/*wolfssl* || true
10183
10284
- name: Build Debian package
10385
run: |
10486
# Bypass the warning prompt with 'yes Y'
105-
yes Y | ./scripts/build-wolfprovider.sh --debian ${{ matrix.debug_flag }}
87+
yes Y | ./scripts/build-wolfprovider.sh --debian $FIPS_FLAG
10688
10789
# List generated packages
10890
echo "Generated Packages:"
@@ -220,12 +202,12 @@ jobs:
220202
if: always()
221203
uses: actions/upload-artifact@v4
222204
with:
223-
name: wolfprovider-debian-packages-${{ github.sha }}${{ matrix.debug_flag }}
205+
name: wolfprovider-debian-packages
224206
path: |
225207
/tmp/wolfprov-packages/*.deb
226208
/tmp/wolfprov-packages/*.dsc
227209
/tmp/wolfprov-packages/*.tar.gz
228-
retention-days: 2
210+
retention-days: 7
229211

230212
libwolfprov-with-openssl:
231213
runs-on: ubuntu-22.04
@@ -238,7 +220,7 @@ jobs:
238220
- name: Download artifacts from previous job
239221
uses: actions/download-artifact@v4
240222
with:
241-
name: debian-package-test-artifacts-${{ github.sha }}
223+
name: wolfprovider-debian-packages
242224
path: /tmp/artifacts
243225

244226
- name: Set up environment

.gitignore

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,20 @@ debian/libwolfprov*
112112
debian/libssl-dev*
113113
debian/openssl*
114114
debian/libssl3*
115-
!debian/*.install
116-
!debian/*.postinst
117-
!debian/*.postrm
118-
!debian/*.docs
119-
!debian/*.links
115+
!debian/libwolfprov.install
116+
!debian/libwolfprov.postinst
117+
!debian/libwolfprov.postrm
118+
!debian/libwolfprov-dev.docs
119+
!debian/libwolfprov-dev.install
120+
!debian/openssl.cnf
121+
!debian/openssl.install
122+
!debian/openssl.postinst
123+
!debian/openssl.postrm
124+
!debian/libssl3.postinst
125+
!debian/libssl3.postrm
126+
!debian/libssl3.install
127+
!debian/libssl3.docs
128+
!debian/libssl3.install
129+
!debian/libssl3.postinst
130+
!debian/libssl3.postrm
120131

debian/control

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ Build-Depends:
88
debhelper-compat (= 13),
99
devscripts,
1010
dh-exec,
11+
openssl,
1112
git,
1213
pkgconf,
1314
libwolfssl-dev

debian/libssl-dev.install

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
#!/usr/bin/dh-exec
22
usr/include/openssl/**
3+
usr/lib/${DEB_HOST_MULTIARCH}/libcrypto.so
4+
usr/lib/${DEB_HOST_MULTIARCH}/libssl.so
35
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/openssl.pc
46
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/libcrypto.pc
57
usr/lib/${DEB_HOST_MULTIARCH}/pkgconfig/libssl.pc

debian/libssl-dev.links

Lines changed: 0 additions & 7 deletions
This file was deleted.

debian/rules

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ ifeq ($(WOLFSSL_ISFIPS),1)
2121
VARIANT := fips
2222
VARIANT_DESC := FIPS build
2323
VARIANT_PROVIDES := libwolfprov-fips
24-
VERSION := $(BASEVER)-fips
24+
VERSION := $(BASEVER)+fips
2525
FIPS_FLAG := --enable-fips
2626
PROVIDER_CONF := provider-fips.conf
2727
else
@@ -33,21 +33,12 @@ else
3333
FIPS_FLAG :=
3434
endif
3535

36-
# Debug build flag
37-
WOLFPROV_DEBUG?=0
38-
ifeq ($(WOLFPROV_DEBUG),1)
39-
VARIANT := $(VARIANT)-debug
40-
VARIANT_DESC := $(VARIANT_DESC) with debug logs
41-
VERSION := $(VERSION)-debug
42-
endif
43-
4436
override_dh_auto_configure:
4537
# None, handled below
4638

4739
override_dh_auto_build:
48-
# Always build OpenSSL with wolfProvider as the default provider even
49-
# if we choose not to use it.
50-
WOLFPROV_BUILD_DEBIAN=1 WOLFPROV_DEBUG=$(WOLFPROV_DEBUG) ./scripts/build-wolfprovider.sh --replace-default $(FIPS_FLAG)
40+
# Always build OpenSSL with wolfProvider as the default provider
41+
WOLFPROV_BUILD_DEBIAN=1 ./scripts/build-wolfprovider.sh --replace-default $(FIPS_FLAG)
5142

5243
override_dh_auto_install:
5344
# Detect OpenSSL library directory (lib or lib64)
@@ -60,8 +51,8 @@ override_dh_auto_install:
6051

6152
# Install OpenSSL shared libraries for libssl3 package
6253
install -d $(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)
63-
install -m755 ./openssl-install/$(OPENSSL_LIB_DIR)/libssl.so.3 \
64-
./openssl-install/$(OPENSSL_LIB_DIR)/libcrypto.so.3 \
54+
install -m755 ./openssl-install/$(OPENSSL_LIB_DIR)/libssl.so* \
55+
./openssl-install/$(OPENSSL_LIB_DIR)/libcrypto.so* \
6556
$(DESTDIR)/usr/lib/$(DEB_HOST_MULTIARCH)/
6657

6758
# Install OpenSSL headers and dev files for libssl-dev package

scripts/build-debian.sh

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ set -euo pipefail
2020

2121
PKG_NAME="libwolfprov"
2222

23-
WOLFSSL_ISFIPS=${WOLFSSL_ISFIPS:-0}
24-
WOLFPROV_DEBUG=${WOLFPROV_DEBUG:-0}
25-
2623
# Step 1: Determine the repo root
2724
REPO_ROOT=$(git rev-parse --show-toplevel)
2825
cd "$REPO_ROOT"
@@ -113,7 +110,7 @@ git archive --format=tar.gz --prefix="${TARBALL_PREFIX}/" \
113110

114111
# Step 10: Build package
115112
echo "⚙️ Building package..."
116-
# Use nostrip to avoid building the -dbgsym package
117-
DEB_BUILD_OPTIONS="nostrip" debuild -e WOLFSSL_ISFIPS -e WOLFPROV_DEBUG -us -uc
113+
WOLFSSL_ISFIPS=${WOLFSSL_ISFIPS:-0}
114+
debuild -e WOLFSSL_ISFIPS -us -uc
118115

119116
echo "✅ Build completed for version $VERSION"

scripts/build-wolfprovider.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ fi
144144

145145
if [ -n "$build_debian" ]; then
146146
echo "Building Debian package..."
147-
WOLFSSL_ISFIPS=${WOLFSSL_ISFIPS:-0} WOLFPROV_DEBUG=${WOLFPROV_DEBUG:-0} ./scripts/build-debian.sh
147+
WOLFSSL_ISFIPS=${WOLFSSL_ISFIPS:-0} ./scripts/build-debian.sh
148148
exit $?
149149
fi
150150

0 commit comments

Comments
 (0)