Files
punktfunk/packaging/bootc/Containerfile
T
enricobuehler 802e98d3a3
ci / rust (push) Successful in 1m13s
android / android (push) Failing after 1m42s
ci / web (push) Successful in 27s
ci / bench (push) Successful in 1m50s
decky / build-publish (push) Successful in 11s
deb / build-publish (push) Failing after 2m38s
apple / swift (push) Successful in 54s
ci / docs-site (push) Successful in 32s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 2m57s
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
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 2m33s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 5m20s
docker / deploy-docs (push) Successful in 17s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 5m11s
feat(packaging): bundle the web console into the RPM / Arch / bootc host packages
The punktfunk-web management console (pairing + status) shipped only via apt. Extend it
to the other HOST packaging methods, mirroring the Debian punktfunk-web .deb (flatpak is
the client, correctly excluded):

- rpm/punktfunk.spec: new noarch `punktfunk-web` subpackage (the .output bundle + a
  /usr/bin/punktfunk-web-server node launcher + both systemd --user units + web-init.sh +
  web.env.example), gated behind `%bcond_with web`. OFF by default because building the
  Nitro/Node SSR bundle needs `bun`, which a plain rpmbuild / COPR mock chroot lacks. Host
  package weak-Recommends punktfunk-web.
- ci/fedora-rpm.Dockerfile: install bun (+ unzip) so the CI builder can build the console.
- rpm.yml: build `PF_WITH_WEB=1` (Prep bootstraps bun to stay green pre-image-rebuild); the
  publish loop already globs the new noarch rpm into the registry. build-rpm.sh: `--with web`
  when PF_WITH_WEB=1.
- bootc/Containerfile: install from the Gitea RPM registry (which carries punktfunk-web)
  instead of COPR — `dnf5 install punktfunk punktfunk-web`.
- arch/PKGBUILD: opt-in `punktfunk-web` split member (PF_WITH_WEB=1 appends it + bun) so a
  default makepkg still builds host+client with no JS tooling — matching the spec's bcond.
- docs: packaging/README, rpm/README, copr/README (the no-bun caveat), bazzite/README
  (Path B rewritten COPR→Gitea registry), arch/README — enable + journal-password steps.

Reviewed across methods by an adversarial multi-agent pass (rpm/ci/arch/bootc/consistency
lenses, each blocking finding 3x-verified); fixed the two it confirmed real — the Arch
bun-mandatory regression (now opt-in) and the stale COPR wording in bazzite Path B.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-15 09:56:58 +00:00

49 lines
2.6 KiB
Docker

# bootc / OCI image layer that bakes punktfunk into a Bazzite-based atomic image.
#
# Bazzite is already a bootc image (Fedora Atomic + gamescope + PipeWire + the NVIDIA
# stack), so we layer punktfunk on top: enable RPM Fusion (for the NVENC ffmpeg) and our
# COPR, install the package, and pre-enable the udev rule. Build + push this image, then
# `bootc switch` (or rebase) a Bazzite host onto it for an image-based, atomic install —
# no per-host `rpm-ostree install` drift.
#
# podman build -t ghcr.io/<you>/bazzite-punktfunk -f packaging/bootc/Containerfile .
# podman push ghcr.io/<you>/bazzite-punktfunk
# # on the target Bazzite host:
# sudo bootc switch ghcr.io/<you>/bazzite-punktfunk # then reboot
#
# Pick the base tag that matches your hardware (NVIDIA shown). See ublue-os/bazzite tags.
ARG BASE_IMAGE=ghcr.io/ublue-os/bazzite-nvidia:stable
FROM ${BASE_IMAGE}
# punktfunk's RPMs come from unom's Gitea RPM registry (the recommended path — see
# packaging/rpm/README). Use it rather than COPR specifically because it carries the
# punktfunk-web management console subpackage, which COPR's mock chroot can't build (no `bun`).
# Group "bazzite" == the Fedora 43 base; override for a different base. Gitea signs the repo
# metadata (repo_gpgcheck=1); the packages themselves are unsigned (gpgcheck=0).
ARG PUNKTFUNK_RPM_GROUP=bazzite
# RPM Fusion nonfree provides the NVENC-capable ffmpeg-libs punktfunk records/encodes with.
# (Bazzite usually has RPM Fusion enabled already; this is belt-and-suspenders.)
RUN dnf5 -y install \
https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm \
https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm \
|| true
# Add the Gitea RPM repo and install the host + the web console (punktfunk-web pulls nodejs).
RUN printf '%s\n' \
'[gitea-unom-punktfunk]' \
'name=punktfunk (unom)' \
"baseurl=https://git.unom.io/api/packages/unom/rpm/${PUNKTFUNK_RPM_GROUP}" \
'enabled=1' 'gpgcheck=0' 'repo_gpgcheck=1' \
'gpgkey=https://git.unom.io/api/packages/unom/rpm/repository.key' \
> /etc/yum.repos.d/punktfunk.repo \
&& dnf5 -y install punktfunk punktfunk-web \
&& dnf5 clean all
# The udev rule + systemd *user* units ship in the RPMs; nothing else to enable at image build
# time (host + console run per-user in the graphical session, enabled after first boot with
# `systemctl --user enable --now punktfunk-host punktfunk-web`).
# bootc image hygiene: the container build must leave a clean ostree commit.
RUN ostree container commit