Skip to content

Commit 13c29c1

Browse files
authored
Merge pull request #73 from gasbytes/env-patch-rules-file
Environment variables patch for the debian/rules file to make it work with custom paths too.
2 parents cae1404 + 5994fa4 commit 13c29c1

4 files changed

Lines changed: 33 additions & 9 deletions

File tree

.github/workflows/deb.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,13 @@ jobs:
5959
echo "$OUT"
6060
echo "$OUT" | grep -q "ENTER: _gnutls_wolfssl_init" \
6161
|| { echo "::error ::wrapper not initialised – FAIL"; exit 1; }
62+
63+
- name: Run unit tests
64+
run: |
65+
TEST_RESULT=0
66+
cd wolfssl-gnutls-wrapper
67+
${{ matrix.provider }} make test || TEST_RESULT=$?
68+
if [ "$TEST_RESULT" -ne 0 ]; then
69+
echo "Tests failed: TEST_RESULT=$TEST_RESULT"
70+
exit 1
71+
fi

debian/gnutls-wolfssl.install

Lines changed: 0 additions & 1 deletion
This file was deleted.

debian/rules

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
#!/usr/bin/make -f
22

3+
GNUTLS_INSTALL ?= /opt/gnutls
4+
PROVIDER_PATH ?= /opt/wolfssl-gnutls-wrapper
5+
6+
export GNUTLS_INSTALL
7+
export PROVIDER_PATH
8+
9+
GNUTLS_INSTALL_REL := $(patsubst /%,%,$(GNUTLS_INSTALL))
10+
PROVIDER_PATH_REL := $(patsubst /%,%,$(PROVIDER_PATH))
11+
312
FIPS_ARG :=
413

514
ifneq (,$(filter fips,$(DEB_BUILD_PROFILES)))
@@ -18,16 +27,23 @@ endif
1827
dh $@ --buildsystem=makefile
1928

2029
override_dh_auto_configure:
21-
:
30+
echo "$(GNUTLS_INSTALL_REL)/*" > debian/gnutls-wolfssl.install
31+
echo "$(PROVIDER_PATH_REL)/*" > debian/wolfssl-gnutls-wrapper.install
2232

2333
override_dh_auto_build:
2434
:
2535

2636
override_dh_auto_install:
27-
-sudo rm -rf /opt/gnutls /opt/wolfssl-gnutls-wrapper
28-
37+
-sudo rm -rf $(GNUTLS_INSTALL) $(PROVIDER_PATH)
38+
2939
./setup.sh $(FIPS_ARG)
30-
31-
mkdir -p $(CURDIR)/debian/tmp/opt
32-
cp -a /opt/gnutls $(CURDIR)/debian/tmp/opt/
33-
cp -a /opt/wolfssl-gnutls-wrapper $(CURDIR)/debian/tmp/opt/
40+
41+
mkdir -p $(CURDIR)/debian/tmp$(dir $(GNUTLS_INSTALL))
42+
mkdir -p $(CURDIR)/debian/tmp$(dir $(PROVIDER_PATH))
43+
44+
cp -a $(GNUTLS_INSTALL) $(CURDIR)/debian/tmp$(GNUTLS_INSTALL)
45+
cp -a $(PROVIDER_PATH) $(CURDIR)/debian/tmp$(PROVIDER_PATH)
46+
47+
override_dh_clean:
48+
dh_clean
49+
rm -f debian/gnutls-wolfssl.install debian/wolfssl-gnutls-wrapper.install

debian/wolfssl-gnutls-wrapper.install

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)