fe9921cc1c
apple / swift (push) Successful in 53s
android / android (push) Failing after 2m8s
ci / web (push) Successful in 36s
ci / docs-site (push) Successful in 39s
ci / bench (push) Successful in 1m38s
ci / rust (push) Successful in 4m59s
decky / build-publish (push) Successful in 16s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 6s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 5s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 4s
flatpak / build-publish (push) Failing after 2s
deb / build-publish (push) Failing after 2m58s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Has been cancelled
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Has been cancelled
docker / deploy-docs (push) Successful in 17s
The stale code a default install/upgrade got was a TAG LEAK: deb.yml/rpm.yml shared
`tags: ['v*']` with the Apple-client release.yml, so the v0.1.0/v0.1.1 tags cut to ship
the macOS app ALSO published host packages versioned 0.1.1 — which outranks every rolling
0.0.1~ciN / 0.0.1-0.ciN build in both registries (dpkg/rpm version compares confirm), so
`apt install`/`rpm-ostree install` silently fetched ~99-commits-stale code while the READMEs
claimed auto-tracking. Two fixes:
- Decouple host publishing from Apple `v*` tags: deb.yml/rpm.yml now trigger on `host-v*`
only, so a client tag can never poison the host channel again.
- Bump the rolling base 0.0.1 -> 0.2.0 (deb `0.2.0~ciN`, rpm `0.2.0-0.ciN`): sits ABOVE the
stray 0.1.1 yet BELOW a future 0.2.0 tag, and still climbs monotonically by run number — so
`apt upgrade`/`rpm-ostree upgrade` genuinely move forward. Spec default + build scripts +
PKGBUILD pkgver bumped to match.
Build provenance (so a stale/shadowed host is detectable): build.rs stamps PUNKTFUNK_BUILD_VERSION
(set by CI = the full package version, e.g. 0.2.0~ci120.g802e98d; falls back to the crate version
for a plain `cargo build`) into the binary via rustc-env. Surfaced in `punktfunk-host --version`,
the startup log, and the mgmt /health + /host `version` field (was a hardcoded CARGO_PKG_VERSION).
Deliberately env-driven, not git-derived — the RPM builds from a git-archive tarball with no .git.
Version computed BEFORE the build in deb.yml; the spec %build exports it from %{version}-%{release}
(and gains --locked for reproducibility parity with the .deb path). Validated: plain build reports
0.0.1, env-stamped build reports 0.2.0~ci999.gdeadbee.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
46 lines
2.2 KiB
Bash
Executable File
46 lines
2.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the punktfunk-host RPM from the committed tree, for the Gitea RPM registry (Bazzite).
|
|
#
|
|
# Counterpart to ../debian/build-deb.sh. The library Requires (libavcodec.so.NN, …) are
|
|
# auto-generated by rpmbuild from the binary it links — so build this in the Fedora 43 image
|
|
# (ci/fedora-rpm.Dockerfile) to match Bazzite's sonames. libcuda is excluded in the spec.
|
|
#
|
|
# Usage: PF_VERSION=0.0.1 [PF_RELEASE=0.ci42.gdeadbee] bash packaging/rpm/build-rpm.sh
|
|
# Output: dist/punktfunk-<version>-<release>.<arch>.rpm (+ the -debuginfo/-debugsource subpkgs)
|
|
set -euo pipefail
|
|
|
|
PF_VERSION="${PF_VERSION:-0.2.0}"
|
|
PF_RELEASE="${PF_RELEASE:-1}"
|
|
# PF_WITH_WEB=1 builds the punktfunk-web subpackage too (needs `bun` on PATH — present in the CI
|
|
# builder image, not in a plain mock chroot). Default off so a bare `rpmbuild`/COPR still works.
|
|
WEB_OPT=()
|
|
[ "${PF_WITH_WEB:-0}" = "1" ] && WEB_OPT=(--with web)
|
|
ROOTDIR="$(cd "$(dirname "$0")/../.." && pwd)"
|
|
cd "$ROOTDIR"
|
|
|
|
TOP="$(mktemp -d)"
|
|
trap 'rm -rf "$TOP"' EXIT
|
|
mkdir -p "$TOP"/{SOURCES,SPECS,BUILD,BUILDROOT,RPMS,SRPMS}
|
|
|
|
# Source tarball with the prefix %autosetup expects (punktfunk-<version>/). From HEAD so the
|
|
# build is reproducible from a commit (CI checks one out); the spec is read from the working
|
|
# tree directly, so spec edits apply without a re-commit.
|
|
git archive --format=tar.gz --prefix="punktfunk-${PF_VERSION}/" \
|
|
-o "$TOP/SOURCES/punktfunk-${PF_VERSION}.tar.gz" HEAD
|
|
|
|
# --nodeps: the spec's BuildRequires (cargo, rust, *-devel) are for COPR's mock chroot, which
|
|
# resolves them from RPMs. Our builder image provides the toolchain via rustup (so
|
|
# rust-toolchain.toml's pinned channel works) and the -devel libs via dnf, neither of which
|
|
# rpmbuild's RPM-level check sees — skip it; a genuinely missing dep fails the compile/link.
|
|
rpmbuild -bb --nodeps "${WEB_OPT[@]}" \
|
|
--define "_topdir $TOP" \
|
|
--define "pf_version ${PF_VERSION}" \
|
|
--define "pf_release ${PF_RELEASE}" \
|
|
packaging/rpm/punktfunk.spec
|
|
|
|
mkdir -p dist
|
|
find "$TOP/RPMS" -name '*.rpm' -exec cp -v {} dist/ \;
|
|
echo "== Requires (must NOT contain libcuda) =="
|
|
rpm -qp --requires dist/punktfunk-${PF_VERSION}-*.rpm 2>/dev/null | grep -iE 'cuda|nvidia' \
|
|
&& echo " !! NVIDIA/CUDA leak !!" || echo " clean"
|