Repository navigation
build(package): ship precompressed assets as an optional package, add apk packages - #449
Merged
Merged
Conversation
A server hosting doona's directory, including honk's UI hosting, can only send compressed responses when the text assets carry .br and .gz siblings. Shipping them inside the program archive would grow every install, including routers, so tools/package.sh now writes them to a separate reproducible archive, doona-precompressed-<version>.tar.gz, and leaves the program archive byte-identical to before. Each sibling is brotli -q 11 or gzip -9 -n of a text asset of at least 1 KiB, kept only when smaller. The new nfpm config, the APKBUILD subpackage and the OpenWrt package install the siblings into doona's directory and depend on doona; nfpm pins the same doona version per format.
Zakkaus
force-pushed
the
feat/package-precompress
branch
from
October 4, 2026 07:56
8007ef7 to
934e770
Compare
nfpm's apk output is rejected by apk-tools, so Alpine and OpenWrt 25.12 users had no package. Two new jobs build them from the existing recipes against the archives of the same run: tools/package-alpine.sh runs abuild in a pinned Alpine 3.24 container and tools/package-openwrt.sh runs the pinned OpenWrt 25.12 SDK. Each run generates its own signing key and the release attaches the public half; OpenWrt signs only its index, which is attached as doona-openwrt.adb. The nfpm packaging moves out of the build job and runs next to the two apk jobs; it also builds doona-precompressed. A sums job collects every package and writes SHA256SUMS, so the release job still only uploads. workflow_dispatch packages package.json's version from a branch and keeps the files as run artifacts, skipping the Check wait and the release.
Zakkaus
force-pushed
the
feat/package-precompress
branch
from
October 4, 2026 08:01
934e770 to
020740b
Compare
The OpenWrt Makefile pins doona-precompressed to the same doona with EXTRA_DEPENDS, as utils/vim does for vim-runtime, derives PKG_VERSION from PKG_REAL_VERSION and downloads every archive unconditionally, as net/v2raya does. The APKBUILD derives the tag from pkgver, names its split functions with a leading underscore and moves the fonts with amove, per the aports coding style. Neither repository has a placeholder hash, so the packaging scripts fill the hashes with `make package/doona/check FIXUP=1` and `abuild checksum`, and the release run keeps the filled recipes as artifacts under the default retention.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Ships the
.brand.gzsiblings of the text assets as an optional package instead of adding them to the main archive, and adds Alpine and OpenWrt 25.12 apk packages to releases.Precompressed assets
tools/package.shwrites the siblings (brotli -q 11, gzip -9 -n, text assets of at least 1 KiB, kept only when smaller) into a separate, reproducibledoona-precompressed-<version>.tar.gz. The program archive is byte-identical to the one main produces; the fonts archive too.doona-precompressed(doona-web-precompressedfor the deb) for deb, rpm, ipk and Arch viainstall/nfpm/doona-precompressed.yaml, as an APKBUILD subpackage and in the OpenWrt Makefile. It installs into doona's directory and contains only the sibling files. The nfpm packages depend on exactly the same doona version per format (checked: dpkg, rpm, pacman and opkg metadata; rpm needs its owndoona = <v>form). The OpenWrt Makefile depends ondoonawithout a version, because its DEPENDS syntax rejects a version condition; all three come from one source build there.apk packages in CI
alpine:tools/package-alpine.shrunsabuildwithinstall/alpine/APKBUILDinalpine:3.24.2(pinned by digest) against the archives of the run. It builds doona, doona-doc, doona-fonts and doona-precompressed, signed with a key made byabuild-keygen -nfor this run. The public key is attached asdoona-alpine.rsa.pub.openwrt-apk:tools/package-openwrt.shbuildsinstall/openwrt/doona/Makefileinopenwrt/sdk:x86-64-25.12.5(pinned by digest; the packages are PKGARCH all). The local archives indl/replace the downloads. The OpenWrt SDK does not sign individual apk files, only the index, so the release attaches the signed index asdoona-openwrt.adband the run's public key asdoona-openwrt.pem. You can install with that key (apk add -X <dir>/doona-openwrt.adb doona) or withapk add --allow-untrusted ./doona-*.apk.--allow-untrustedworks, and key plus index works.Workflow
build:nfpm(deb, rpm, ipk, Arch),alpineandopenwrt-apk. nfpm stays one job rather than a matrix: the four formats take seconds, so a matrix would add four job start-ups and split the renaming across them.sumsmerges the artifacts and writesSHA256SUMSover every asset.releaseneeds all of them and still runs no commands.workflow_dispatchpackages package.json's version from a branch and skipsverifiedandrelease; the files stay as run artifacts. A tag push runs as before, plus the new jobs.Test run: https://github.com/Zakkaus/doona/actions/runs/37187597277 (success; 35 entries in SHA256SUMS, all verified).
Checks:
pnpm check, actionlint, shellcheck,sh -n/bash -n,tools/ci-workflows.test.mjs.