Skip to content

Commit

Permalink
In progress attempts to add more packages (#69)
Browse files Browse the repository at this point in the history
  • Loading branch information
joshschmelzle authored Jan 28, 2025
1 parent 5b64fb2 commit 73bb866
Show file tree
Hide file tree
Showing 43 changed files with 696 additions and 116 deletions.
74 changes: 49 additions & 25 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,39 @@ on:
- all
- iw
- wlanpi-linux-firmware
- iperf2
- iperf3
- wavemon
- wpasupplicant
- hostapd
default: all

jobs:
matrix-prep:
runs-on: ubuntu-24.04-arm
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
if [ "${{ github.event.inputs.packages }}" = "all" ]; then
echo 'matrix={"package": ["iw", "wlanpi-linux-firmware", "iperf2", "iperf3", "wavemon", "wpasupplicant", "hostapd"], "distro": ["bullseye", "bookworm"], "arch": ["arm64"]}' >> $GITHUB_OUTPUT
else
echo 'matrix={"package": ["${{ github.event.inputs.packages }}"], "distro": ["bullseye", "bookworm"], "arch": ["arm64"]}' >> $GITHUB_OUTPUT
fi
build:
name: package ${{ matrix.package }}+${{ matrix.arch }}
runs-on: 'ubuntu-24.04-arm'
needs: matrix-prep
name: Build package ${{ matrix.package }}+${{ matrix.distro }}+${{ matrix.arch }}
runs-on: ubuntu-24.04-arm

strategy:
fail-fast: false
matrix:
distro: [bullseye,bookworm]
package: [iw,wlanpi-linux-firmware]
arch: [arm64]
matrix: ${{fromJson(needs.matrix-prep.outputs.matrix)}}

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install dependencies
run: |
Expand All @@ -43,27 +59,35 @@ jobs:
- name: Build package ${{ matrix.package }}
id: build-package
run: |
./package.sh --arch=${{ matrix.arch }} --package=${{ matrix.package }}
./package.sh --arch=${{ matrix.arch }} --package=${{ matrix.package }} --distro=${{ matrix.distro }}
- name: Check debootstrap logs
if: failure()
run: |
for distro in bullseye bookworm; do
logfile="/srv/chroot/${distro}-${{ matrix.arch }}-sbuild/debootstrap/debootstrap.log"
if [ -f "$logfile" ]; then
echo "=== $distro logs ==="
cat "$logfile"
fi
done
- name: Upload package ${{ matrix.package }}
- name: Upload debootstrap logs
if: failure()
uses: actions/upload-artifact@v4
if: ${{ steps.build-package.outputs.deb-package != '' }}
with:
name: ${{ matrix.package }}-${{ matrix.arch }}-${{ steps.build-package.outputs.package-version }}
path: ${{ steps.build-package.outputs.deb-package }}
name: debootstrap-${{ matrix.package }}-${{ matrix.distro }}-${{ matrix.arch }}-logs
path: /srv/chroot/${{ matrix.distro }}-${{ matrix.arch }}-sbuild/debootstrap/debootstrap.log

- name: Upload armhf package to raspbian/${{ matrix.distro }}
if: matrix.arch == 'armhf'
uses: danielmundi/upload-packagecloud@main
- name: Upload package ${{ matrix.package }} to GitHub
uses: actions/upload-artifact@v4
if: ${{ steps.build-package.outputs.deb-package != '' }}
with:
package-name: ${{ steps.build-package.outputs.deb-package }}
packagecloud-username: wlanpi
packagecloud-repo: dev
packagecloud-distrib: raspbian/${{ matrix.distro }}
packagecloud-token: ${{ secrets.PACKAGECLOUD_TOKEN }}
name: ${{ matrix.package }}-${{ matrix.arch }}-${{ matrix.distro }}-${{ steps.build-package.outputs.package-version }}
path: ${{ steps.build-package.outputs.deb-package }}

- name: Upload arm64 package to debian/${{ matrix.distro }}
if: matrix.arch == 'arm64'
- name: Upload arm64 package to packagecloud debian/${{ matrix.distro }}
if: ${{ matrix.arch == 'arm64' && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
uses: danielmundi/upload-packagecloud@main
with:
package-name: ${{ steps.build-package.outputs.deb-package }}
Expand All @@ -74,7 +98,7 @@ jobs:

- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
if: ${{ steps.build-package.outputs.deb-package != '' }}
if: ${{ steps.build-package.outputs.deb-package != '' && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
with:
token: ${{ secrets.GITHUB_TOKEN }}
add-paths: debians
Expand All @@ -86,11 +110,11 @@ jobs:
assignees: danielmundi

slack-workflow-status:
if: always()
if: ${{ always() && (github.repository_owner == 'WLAN-Pi') && (! github.event.pull_request.head.repo.fork) }}
name: Post Workflow Status to Slack
needs:
- build
runs-on: 'ubuntu-22.04'
runs-on: ubuntu-24.04-arm
steps:
- name: Slack Workflow Notification
uses: Gamesight/slack-workflow-status@master
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
*.tar.xz
/iw
/wavemon
/iperf2
/iperf3
/hostapd
/wpasupplicant
/wlanpi-linux-firmware
.DS_Store
commit_msg.txt
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,31 @@
# wlanpi-misc-packages

Packaging miscellaneous binaries, like firmware and iw. Goal is to have a package with newer code than the ones currently available from official repositories.

## Testing

### Local

```
# Build a specific package
./package.sh --package iperf2
# Force clean rebuild
./package.sh --clean --force-sync --package iperf3
# Build all packages
./package.sh --all
```

Depends

```
sudo apt-get update
sudo apt-get install -y \
devscripts \
build-essential \
sbuild \
schroot \
debootstrap \
qemu-user-static
```
6 changes: 6 additions & 0 deletions backports/autoconf-2.71/debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

autoconf-2.71 (2.71-0wlanpi0) bullseye; urgency=medium

* Backported version 2.71 for WLAN Pi builds

-- Josh Schmelzle <[email protected]> Mon, 27 Jan 2025 00:00:00 +0000
13 changes: 13 additions & 0 deletions backports/autoconf-2.71/debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Source: autoconf-2.71
Section: devel
Priority: optional
Maintainer: Josh Schmelzle <[email protected]>
Build-Depends: debhelper-compat (= 12), m4, perl
Standards-Version: 4.5.0

Package: autoconf-2.71
Architecture: all
Depends: ${misc:Depends}, m4, perl
Provides: autoconf (= 2.71)
Description: Automatic configure script builder (backported 2.71)
Custom backport of autoconf 2.71 for WLAN Pi package builds
8 changes: 8 additions & 0 deletions backports/autoconf-2.71/debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/usr/bin/make -f
export DH_VERBOSE = 1

%:
dh $@

override_dh_auto_configure:
./configure --prefix=/usr
1 change: 1 addition & 0 deletions backports/autoconf-2.71/debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
20 changes: 20 additions & 0 deletions backports/build-autoconf.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash
# backports/build-autoconf.sh

set -e

AUTOCONF_VERSION="2.71"
AUTOCONF_DIR="autoconf-${AUTOCONF_VERSION}"
AUTOCONF_TAR="autoconf-${AUTOCONF_VERSION}.tar.gz"
AUTOCONF_URL="https://ftp.gnu.org/gnu/autoconf/${AUTOCONF_TAR}"

# Download and extract autoconf if needed
if [ ! -d "${AUTOCONF_DIR}" ]; then
wget -N "${AUTOCONF_URL}"
tar xf "${AUTOCONF_TAR}"
cp -r debian "${AUTOCONF_DIR}/"
fi

# Build autoconf package
cd "${AUTOCONF_DIR}"
dpkg-buildpackage -us -uc
5 changes: 5 additions & 0 deletions debians/hostapd/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
hostapd (2.11-0wlanpi0) unstable; urgency=medium

* Initial WLAN Pi package for hostapd

-- Josh Schmelzle <[email protected]> Sun, 26 Jan 2025 00:00:00 +0000
20 changes: 20 additions & 0 deletions debians/hostapd/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Source: hostapd
Section: net
Priority: optional
Maintainer: Josh Schmelzle <[email protected]>
Build-Depends: debhelper-compat (= 12),
libdbus-1-dev,
libssl-dev,
libnl-3-dev,
libnl-genl-3-dev,
libnl-route-3-dev,
libreadline-dev,
pkg-config,
libpcsc-lite-dev [!armhf !arm64] | libpcsclite-dev
Standards-Version: 4.5.0
Homepage: https://w1.fi/wpa_supplicant/

Package: hostapd
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: IEEE 802.11 AP and IEEE 802.1X/WPA/WPA2/WPA3/EAP Authenticator
34 changes: 34 additions & 0 deletions debians/hostapd/patches/add-config.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
diff --git a/hostapd/.config b/hostapd/.config
new file mode 100644
index 000000000..2c26c16a8
--- /dev/null
+++ b/hostapd/.config
@@ -0,0 +1,28 @@
+CONFIG_DRIVER_HOSTAP=y
+CONFIG_DRIVER_NL80211=y
+CONFIG_LIBNL32=y
+CONFIG_RSN_PREAUTH=y
+CONFIG_EAP=y
+CONFIG_ERP=y
+CONFIG_EAP_MD5=y
+CONFIG_EAP_TLS=y
+CONFIG_EAP_MSCHAPV2=y
+CONFIG_EAP_PEAP=y
+CONFIG_EAP_GTC=y
+CONFIG_EAP_TTLS=y
+CONFIG_PKCS12=y
+CONFIG_IPV6=y
+CONFIG_IEEE80211AC=y
+CONFIG_IEEE80211AX=y
+CONFIG_IEEE80211BE=y
+CONFIG_SAE=y
+CONFIG_SAE_PK=y
+CONFIG_MBO=y
+CONFIG_TAXONOMY=y
+CONFIG_FILS=y
+CONFIG_FILS_SK_PFS=y
+CONFIG_WPA_CLI_EDIT=y
+CONFIG_OWE=y
+CONFIG_NO_TKIP=y
+CONFIG_DPP=y
+CONFIG_DPP2=y
1 change: 1 addition & 0 deletions debians/hostapd/patches/series
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
add-config.patch
12 changes: 12 additions & 0 deletions debians/hostapd/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/make -f

export DH_VERBOSE = 1

%:
dh $@ --with=autoreconf

override_dh_auto_configure:
cd hostapd && $(MAKE)

override_dh_auto_install:
cd hostapd && $(MAKE) install DESTDIR=$(CURDIR)/debian/hostapd
1 change: 1 addition & 0 deletions debians/hostapd/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
5 changes: 5 additions & 0 deletions debians/iperf2/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
iperf2 (2.1.9-0wlanpi0) unstable; urgency=medium

* Initial WLAN Pi package for iperf2

-- Josh Schmelzle <[email protected]> Sun, 26 Jan 2025 00:00:00 +0000
16 changes: 16 additions & 0 deletions debians/iperf2/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Source: iperf2
Section: net
Priority: optional
Maintainer: Josh Schmelzle <[email protected]>
Build-Depends: debhelper-compat (= 12), autotools-dev
standards-Version: 4.5.0
Homepage: https://iperf2.sourceforge.io/

Package: iperf2
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Internet Protocol bandwidth measuring tool
Iperf2 is a tool for active measurements of the maximum achievable
bandwidth on IP networks. It supports tuning of various parameters
related to timing, protocols, and buffers. For each test it reports
the measured throughput, loss, and other parameters.
15 changes: 15 additions & 0 deletions debians/iperf2/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/make -f

export DH_VERBOSE = 1

%:
dh $@ --with autoreconf

override_dh_auto_clean:
[ ! -f Makefile ] || $(MAKE) distclean
dh_auto_clean

override_dh_auto_configure:
./configure --prefix=/usr

override_dh_auto_test:
1 change: 1 addition & 0 deletions debians/iperf2/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
5 changes: 5 additions & 0 deletions debians/iperf3/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
iperf3 (3.18-0wlanpi0) unstable; urgency=medium

* Initial WLAN Pi package for iperf3

-- Josh Schmelzle <[email protected]> Sun, 26 Jan 2025 00:00:00 +0000
18 changes: 18 additions & 0 deletions debians/iperf3/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
Source: iperf3
Section: net
Priority: optional
Maintainer: Josh Schmelzle <[email protected]>
Build-Depends: debhelper-compat (= 12),
autotools-dev,
autoconf-2.71 | autoconf (>= 2.71~)
Standards-Version: 4.5.0
Homepage: https://github.com/esnet/iperf

Package: iperf3
Architecture: any
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: Internet Protocol bandwidth measuring tool
Iperf3 is a tool for active measurements of the maximum achievable
bandwidth on IP networks. It supports tuning of various parameters
related to timing, protocols, and buffers. For each test it reports
the measured throughput, loss, and other parameters.
15 changes: 15 additions & 0 deletions debians/iperf3/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/make -f

export DH_VERBOSE = 1

%:
dh $@ --with autoreconf

override_dh_auto_clean:
[ ! -f Makefile ] || $(MAKE) distclean
dh_auto_clean

override_dh_auto_configure:
./configure --prefix=/usr

override_dh_auto_test:
1 change: 1 addition & 0 deletions debians/iperf3/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
5 changes: 5 additions & 0 deletions debians/wavemon/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
wavemon (0.9.6-0wlanpi1) bullseye; urgency=medium

* Initial WLAN Pi package for wavemon

-- Josh Schmelzle <[email protected]> Thu, 09 Jan 2025 00:00:00 +0000
Loading

0 comments on commit 73bb866

Please sign in to comment.