mirror of
https://github.com/jmcorgan/fips.git
synced 2026-07-22 07:48:26 +00:00
Add OpenWrt .apk packaging for OpenWrt 25+, where apk-tools is the mandatory package manager. The existing .ipk continues to cover OpenWrt 24.x and earlier. Built SDK-free like the .ipk: it reuses the cargo-zigbuild cross-compile and the shared installed-filesystem payload under openwrt-ipk/files, and assembles the ADB container with the official `apk mkpkg` applet from apk-tools 3.0.5 built from source, so no OpenWrt SDK image is needed. The package-openwrt workflow is refactored so a single compile-binaries job cross-compiles and strips each arch once; both the .ipk and .apk packagers consume the binaries via a new --bin-dir flag instead of each recompiling. A build-apk job (aarch64, x86_64) builds apk-tools, packages, and structurally verifies the .apk with `apk adbdump`. Releases now publish .apk artifacts and checksums alongside .ipk; the release download is scoped to fips_* so the shared raw-binary artifacts are not swept into the published release. apk-version.sh maps a release tag or commit height to an apk-tools-valid version, covered by a case-table test. Packages are unsigned, installed with `apk add --allow-untrusted`, matching the .ipk posture. Also fix the OpenWrt control socket: the init script now pre-creates /run/fips before starting the daemon, the procd equivalent of the systemd unit's RuntimeDirectory=fips. Without it, on a fresh boot the daemon resolves its control socket to /tmp (since /run/fips does not yet exist), while fips-gateway later creates /run/fips for its own gateway.sock, leaving fipsctl/fipstop resolving a /run/fips/control.sock the daemon never bound.
48 lines
1.3 KiB
Makefile
48 lines
1.3 KiB
Makefile
# FIPS Packaging Makefile
|
|
#
|
|
# Builds release packages for supported target platforms.
|
|
# All outputs are placed in deploy/ at the project root.
|
|
#
|
|
# Usage:
|
|
# make deb Build a Debian/Ubuntu .deb package
|
|
# make tarball Build a systemd install tarball
|
|
# make ipk Build an OpenWrt .ipk package (opkg, OpenWrt 24.x and earlier)
|
|
# make apk Build an OpenWrt .apk package (apk-tools, mandatory on OpenWrt 25+)
|
|
# make aur Build fips-git AUR package and validate with namcap
|
|
# make pkg Build a macOS .pkg installer
|
|
# make zip Build a Windows .zip package
|
|
# make all Build deb and tarball (default)
|
|
# make clean Remove deploy/ directory
|
|
|
|
SHELL := /bin/bash
|
|
PACKAGING_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
|
|
PROJECT_ROOT := $(abspath $(PACKAGING_DIR)/..)
|
|
|
|
.PHONY: all deb tarball ipk apk aur pkg zip clean
|
|
|
|
all: deb tarball
|
|
|
|
deb:
|
|
@bash $(PACKAGING_DIR)/debian/build-deb.sh
|
|
|
|
tarball:
|
|
@bash $(PACKAGING_DIR)/systemd/build-tarball.sh
|
|
|
|
ipk:
|
|
@bash $(PACKAGING_DIR)/openwrt-ipk/build-ipk.sh
|
|
|
|
apk:
|
|
@bash $(PACKAGING_DIR)/openwrt-apk/build-apk.sh
|
|
|
|
aur:
|
|
@bash $(PACKAGING_DIR)/aur/build-aur.sh
|
|
|
|
pkg:
|
|
@bash $(PACKAGING_DIR)/macos/build-pkg.sh
|
|
|
|
zip:
|
|
@powershell -File $(PACKAGING_DIR)/windows/build-zip.ps1
|
|
|
|
clean:
|
|
rm -rf $(PROJECT_ROOT)/deploy
|