diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..85132a6 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,41 @@ +name: Build piaware packages + +on: [ push, pull_request ] + +jobs: + build: + name: Build piaware packages + strategy: + fail-fast: false + matrix: + image: + - ubuntu-22.04 + - ubuntu-22.04-arm + - ubuntu-24.04 + - ubuntu-24.04-arm + runs-on: ${{ matrix.image }} + steps: + - name: Check out repository + uses: actions/checkout@v6 + - name: Prepare environment vars + run: | + echo "BUILDDIR=${{ runner.temp }}/build" >>$GITHUB_ENV + - name: Install early build prerequisites + run: | + sudo apt-get update + sudo apt-get install -y --no-install-recommends devscripts equivs + - name: Prepare build tree + run: | + . /etc/os-release + $GITHUB_WORKSPACE/sensible-build.sh $VERSION_CODENAME $BUILDDIR + - name: Install build prerequisites + run: | + cd ${{ runner.temp }} && mk-build-deps --tool "apt-get -y -o Debug::pkgProblemResolver=yes --no-install-recommends" --root-cmd sudo --install --remove $BUILDDIR/debian/control + - name: Build package + run: | + cd $BUILDDIR && dpkg-buildpackage -b --no-sign + - name: Upload artifacts + uses: actions/upload-artifact@v6 + with: + name: piaware-${{ matrix.image }} + path: ${{ runner.temp }}/*.deb diff --git a/cx_Freeze-8.5.0.patch b/cx_Freeze-8.5.0.patch new file mode 100644 index 0000000..025114a --- /dev/null +++ b/cx_Freeze-8.5.0.patch @@ -0,0 +1,21 @@ +diff -ur cx_Freeze-8.5.0/pyproject.toml cx_Freeze-8.5.0.new/pyproject.toml +--- cx_Freeze-8.5.0/pyproject.toml ++++ cx_Freeze-8.5.0.new/pyproject.toml +@@ -49,8 +49,7 @@ + ] + dynamic = ["version"] + keywords = ["cx-freeze cxfreeze cx_Freeze freeze python"] +-license = "PSF-2.0" +-license-files = ["LICENSE.md"] ++license = {text = "PSF-2.0"} + readme = "README.md" + requires-python = ">=3.10" + +@@ -105,6 +104,7 @@ + + [tool.setuptools] + include-package-data = true ++license-files = ["LICENSE.md"] + zip-safe = false + + [tool.setuptools.dynamic] diff --git a/freeze-core-0.4.2.patch b/freeze-core-0.4.2.patch new file mode 100644 index 0000000..44856e3 --- /dev/null +++ b/freeze-core-0.4.2.patch @@ -0,0 +1,20 @@ +diff -ur freeze-core-0.4.2/pyproject.toml freeze-core-0.4.2.new/pyproject.toml +--- freeze-core-0.4.2/pyproject.toml ++++ freeze-core-0.4.2.new/pyproject.toml +@@ -39,8 +39,7 @@ + ] + dynamic = ["version"] + keywords = ["freeze-core freeze cx-freeze cxfreeze cx_Freeze python"] +-license = "MIT" +-license-files = ["LICENSE"] ++license = {text = "MIT"} + readme = "README.md" + requires-python = ">=3.10" + +@@ -68,6 +67,7 @@ + + [tool.setuptools] + include-package-data = true ++license-files = ["LICENSE"] + package-dir = {"" = "src"} + zip-safe = false diff --git a/sensible-build.sh b/sensible-build.sh index dc53c67..d707969 100755 --- a/sensible-build.sh +++ b/sensible-build.sh @@ -59,23 +59,15 @@ case $dist in targetdist=trixie extraversion="" ;; - xenial) - # not tested - debdist=stretch - targetdist=xenial - extraversion="~ubuntu1604+" - ;; - bionic) - # not tested - debdist=buster - targetdist=bionic - extraversion="~ubuntu1804+" + jammy) + debdist=bullseye + targetdist=jammy + extraversion="~ubuntu2204+" ;; - disco) - # not tested - debdist=buster - targetdist=disco - extraversion="~ubuntu1904+" + noble) + debdist=trixie + targetdist=noble + extraversion="~ubuntu2404+" ;; *) echo "unknown build distribution $1" >&2 diff --git a/trixie/rules b/trixie/rules index 7717e2b..d7906d0 100644 --- a/trixie/rules +++ b/trixie/rules @@ -7,6 +7,9 @@ export DEB_BUILD_MAINT_OPTIONS = hardening=+all DPKG_EXPORT_BUILDFLAGS = 1 include /usr/share/dpkg/default.mk +# we need nocaseglob +SHELL := /bin/bash + PYTHON3 := /usr/bin/$(shell py3versions -d) VENV=$(CURDIR)/debian/venv @@ -70,10 +73,12 @@ build_mlat-client: $(VENV)/bin/python -m build --skip-dependency-check --no-isolation --wheel --outdir $(CURDIR)/wheels freeze-core-0.4.2 $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/freeze_core-0.4.2*.whl $(VENV)/bin/python -m build --skip-dependency-check --no-isolation --wheel --outdir $(CURDIR)/wheels cx_Freeze-8.5.0 - $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/cx_freeze-8.5.0*.whl + # nb: trixie and noble produce wheels with different capitalization + shopt -s nocaseglob; $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/cx_freeze-8.5.0*.whl # build mlat-client proper $(VENV)/bin/python -m build --skip-dependency-check --no-isolation --wheel --outdir $(CURDIR)/wheels mlat-client - $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/mlatclient-*.whl + # nb: trixie and noble produce wheels with different capitalization + shopt -s nocaseglob; $(VENV)/bin/python -m pip install --no-index --no-deps --ignore-installed --require-virtualenv $(CURDIR)/wheels/mlatclient-*.whl install_mlat-client: # newer cxfreeze deletes --target-dir (see cxfreeze issue #1300), so we have to freeze to a temporary directory and