Skip to content

Commit 6b09b5c

Browse files
Merge pull request #6690 from julek-wolfssl/packaging
Init deb packaging
2 parents 88ad5ce + b44d31d commit 6b09b5c

16 files changed

Lines changed: 442 additions & 159 deletions

File tree

.github/workflows/main.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ jobs:
3636
uses: ./.github/workflows/curl.yml
3737
krb5:
3838
uses: ./.github/workflows/krb5.yml
39+
packaging:
40+
uses: ./.github/workflows/packaging.yml
3941
# TODO: Currently this test fails. Enable it once it becomes passing.
4042
# haproxy:
4143
# uses: ./.github/workflows/haproxy.yml

.github/workflows/os-check.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
name: make check
2424
runs-on: ${{ matrix.os }}
2525
# This should be a safe limit for the tests to run.
26-
timeout-minutes: 8
26+
timeout-minutes: 14
2727
steps:
2828
- name: Build and test wolfSSL
2929
uses: wolfSSL/actions-build-autotools-project@v1
@@ -43,7 +43,7 @@ jobs:
4343
name: make user_setting.h
4444
runs-on: ${{ matrix.os }}
4545
# This should be a safe limit for the tests to run.
46-
timeout-minutes: 8
46+
timeout-minutes: 14
4747
steps:
4848
- name: Build and test wolfSSL
4949
uses: wolfSSL/actions-build-autotools-project@v1
@@ -66,7 +66,7 @@ jobs:
6666
name: make user_setting.h (testwolfcrypt only)
6767
runs-on: ${{ matrix.os }}
6868
# This should be a safe limit for the tests to run.
69-
timeout-minutes: 8
69+
timeout-minutes: 14
7070
steps:
7171
- name: Build and test wolfSSL
7272
uses: wolfSSL/actions-build-autotools-project@v1
@@ -87,7 +87,7 @@ jobs:
8787
name: make user_setting.h (with sed)
8888
runs-on: ${{ matrix.os }}
8989
# This should be a safe limit for the tests to run.
90-
timeout-minutes: 8
90+
timeout-minutes: 14
9191
steps:
9292
- uses: actions/checkout@v3
9393
- if: ${{ matrix.os == 'macos-latest' }}

.github/workflows/packaging.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Packaging Tests
2+
3+
on:
4+
workflow_call:
5+
6+
jobs:
7+
build_wolfssl:
8+
name: Package wolfSSL
9+
runs-on: ubuntu-latest
10+
# This should be a safe limit for the tests to run.
11+
timeout-minutes: 10
12+
steps:
13+
- name: Checkout wolfSSL
14+
uses: actions/checkout@v3
15+
16+
- name: Configure wolfSSL
17+
run: |
18+
autoreconf -ivf
19+
./configure --enable-distro --disable-examples --disable-silent-rules
20+
21+
- name: Build wolfSSL .deb
22+
run: make deb-docker
23+
24+
- name: Build wolfSSL .rpm
25+
run: make rpm-docker
26+
27+
- name: Confirm packages built
28+
run: |
29+
DEB_COUNT=$(find -name 'libwolfssl*.deb' | wc -l)
30+
if [ "$DEB_COUNT" != "2" ]; then
31+
echo Did not find exactly two deb packages!!!
32+
exit 1
33+
fi
34+
RPM_COUNT=$(find -name 'wolfssl*.rpm' | wc -l)
35+
if [ "$RPM_COUNT" != "4" ]; then
36+
echo Did not find exactly four rpm packages!!!
37+
exit 1
38+
fi

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,3 +424,8 @@ user_settings_asm.h
424424

425425
# MagicCrypto (ARIA Cipher)
426426
MagicCrypto
427+
428+
# debian packaging
429+
debian/changelog
430+
debian/control
431+
*.deb

Docker/packaging/debian/Dockerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
FROM debian:latest
2+
3+
RUN apt-get -y update
4+
RUN apt-get -y upgrade
5+
RUN apt-get install -y build-essential autoconf gawk debhelper lintian
6+

Docker/packaging/fedora/Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM fedora:latest
2+
3+
RUN dnf install -y make automake gcc rpmdevtools

INSTALL

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -309,3 +309,22 @@ We also have vcpkg ports for wolftpm, wolfmqtt and curl.
309309

310310
Run the benchmark against LMS/HSS with:
311311
$ ./wolfcrypt/benchmark/benchmark -lms_hss
312+
313+
18. Building for Debian, Ubuntu, Linux Mint, and derivatives
314+
315+
To generate a .deb package, configure wolfSSL with the desired
316+
configuration. Then run `make deb` to generate a Debian package
317+
with the current configuration. To build the package inside a
318+
Docker container, use `make deb-docker`. In both cases the
319+
resulting packages are placed in the root directory of the
320+
project.
321+
322+
18. Building for RHEL, Fedora, CentOS, SUSE, and openSUSE
323+
324+
To generate a .rpm package, configure wolfSSL with the desired
325+
configuration. Then run `make rpm` to generate a .rpm package
326+
with the current configuration. To build the package inside a
327+
Docker container, use `make rpm-docker`. In both cases the
328+
resulting packages are placed in the root directory of the
329+
project.
330+

Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ include examples/include.am
176176
include testsuite/include.am
177177
include tests/include.am
178178
include sslSniffer/sslSnifferTest/include.am
179+
include debian/include.am
179180
include rpm/include.am
180181
include linuxkm/include.am
181182
include zephyr/include.am

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ library written in ANSI C and targeted for embedded, RTOS, and
55
resource-constrained environments - primarily because of its small size, speed,
66
and feature set. It is commonly used in standard operating environments as well
77
because of its royalty-free pricing and excellent cross platform support.
8-
wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.2
8+
wolfSSL supports industry standards up to the current TLS 1.3 and DTLS 1.3
99
levels, is up to 20 times smaller than OpenSSL, and offers progressive ciphers
1010
such as ChaCha20, Curve25519, and Blake2b. User benchmarking and feedback
1111
reports dramatically better performance when using wolfSSL over OpenSSL.

configure.ac

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,9 @@ AS_IF([ test -n "$CFLAG_VISIBILITY" ], [
7171
AM_CFLAGS="$AM_CFLAGS $CFLAG_VISIBILITY"
7272
])
7373

74+
WOLFSSL_BUILD_DATE=$(date -R)
75+
AC_SUBST([WOLFSSL_BUILD_DATE])
76+
7477

7578
# Moved these size of and type checks before the library checks.
7679
# The library checks add the library to subsequent test compiles
@@ -9048,6 +9051,8 @@ AC_CONFIG_FILES([Makefile
90489051
wolfssl/version.h
90499052
wolfssl/options.h
90509053
support/wolfssl.pc
9054+
debian/control
9055+
debian/changelog
90519056
rpm/spec
90529057
wolfcrypt/test/test_paths.h
90539058
])

0 commit comments

Comments
 (0)