packaging(rpm): Fedora 44 build + ship the KDE session unit & host.env
Three changes to make a reproducible Fedora KDE host install: - ci/fedora-rpm.Dockerfile: parameterize the Fedora base (ARG FEDORA_VERSION, default 43) so the same builder produces the Bazzite (F43, libavcodec.so.61) and Fedora 44 (libavcodec.so.62) RPMs. A binary RPM is soname-coupled to its base, so each target Fedora needs its own build/channel. - spec: install punktfunk-kde-session.service (was in the tree but never packaged) with its ExecStart repointed from the dev source tree to the installed run-headless-kde.sh. This is the headless `kwin --virtual` session (KWIN_WAYLAND_NO_PERMISSION_CHECKS=1) the kwin backend needs — an interactive Plasma session refuses to hand its privileged zkde_screencast protocol to an external client, so a dedicated session is required. Not enabled by default (kwin hosts opt in). - ship packaging/kde/host.env as host.env.kde — the ready KWin appliance config (wayland-kde). Validated live on a Fedora 44 KDE box (RTX 4090): KWin virtual output + zero-copy dmabuf->CUDA->NVENC. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -1,11 +1,15 @@
|
|||||||
# CI builder for the punktfunk RPM — Fedora 43 to match Bazzite's base (so the RPM's
|
# CI builder for the punktfunk RPM. The Fedora version is parameterized so one Dockerfile
|
||||||
# auto-generated library Requires, e.g. libavcodec.so.NN, pin to exactly what the target
|
# serves every target whose ffmpeg soname must match: Fedora 43 == Bazzite's base (group
|
||||||
# runs). Used by .gitea/workflows/rpm.yml; built+pushed by .gitea/workflows/docker.yml.
|
# "bazzite"), Fedora 44 == the Fedora KDE spin (group "fedora-44"). The RPM's auto-generated
|
||||||
|
# library Requires (e.g. libavcodec.so.NN) pin to exactly what the chosen base — and thus the
|
||||||
|
# target — ships. Used by .gitea/workflows/rpm.yml; built+pushed by .gitea/workflows/docker.yml.
|
||||||
#
|
#
|
||||||
# docker build -f ci/fedora-rpm.Dockerfile -t punktfunk-fedora-rpm ci
|
# docker build --build-arg FEDORA_VERSION=43 -f ci/fedora-rpm.Dockerfile -t punktfunk-fedora-rpm ci
|
||||||
|
# docker build --build-arg FEDORA_VERSION=44 -f ci/fedora-rpm.Dockerfile -t punktfunk-fedora44-rpm ci
|
||||||
#
|
#
|
||||||
# Mirrors ci/rust-ci.Dockerfile (the Ubuntu workspace builder) for the rpmbuild side.
|
# Mirrors ci/rust-ci.Dockerfile (the Ubuntu workspace builder) for the rpmbuild side.
|
||||||
FROM fedora:43
|
ARG FEDORA_VERSION=43
|
||||||
|
FROM fedora:${FEDORA_VERSION}
|
||||||
|
|
||||||
# RPM Fusion (free + nonfree) provides the NVENC-capable ffmpeg-devel the host links against.
|
# RPM Fusion (free + nonfree) provides the NVENC-capable ffmpeg-devel the host links against.
|
||||||
RUN dnf -y install \
|
RUN dnf -y install \
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
# punktfunk host config for a Fedora/Ubuntu KDE Plasma appliance (kwin backend).
|
||||||
|
# Copy to ~/.config/punktfunk/host.env. Pairs with punktfunk-kde-session.service, which brings
|
||||||
|
# up a headless `kwin --virtual` on wayland-kde (with KWIN_WAYLAND_NO_PERMISSION_CHECKS=1 so the
|
||||||
|
# host can bind KWin's privileged zkde_screencast protocol — an interactive Plasma session will
|
||||||
|
# NOT hand that protocol to an external client). The host streams a per-client virtual output
|
||||||
|
# from that session, captured zero-copy (dmabuf -> CUDA -> NVENC) on NVIDIA.
|
||||||
|
WAYLAND_DISPLAY=wayland-kde
|
||||||
|
XDG_CURRENT_DESKTOP=KDE
|
||||||
|
PUNKTFUNK_COMPOSITOR=kwin
|
||||||
|
PUNKTFUNK_VIDEO_SOURCE=virtual
|
||||||
|
PUNKTFUNK_ZEROCOPY=1
|
||||||
|
PUNKTFUNK_INPUT_BACKEND=libei
|
||||||
@@ -140,6 +140,13 @@ install -Dm0644 scripts/punktfunk-host.service %{buildroot}%{_userunitdir}/punkt
|
|||||||
# %{_bindir}. Rewrite it so a fresh install (no hand-rolled unit) starts the installed binary.
|
# %{_bindir}. Rewrite it so a fresh install (no hand-rolled unit) starts the installed binary.
|
||||||
sed -i 's#%h/punktfunk/target/release/punktfunk-host#%{_bindir}/punktfunk-host#' %{buildroot}%{_userunitdir}/punktfunk-host.service
|
sed -i 's#%h/punktfunk/target/release/punktfunk-host#%{_bindir}/punktfunk-host#' %{buildroot}%{_userunitdir}/punktfunk-host.service
|
||||||
|
|
||||||
|
# Optional headless KDE session unit (the kwin streaming appliance): brings up `kwin --virtual` on
|
||||||
|
# wayland-kde via the packaged run-headless-kde.sh, so the host's kwin backend has a session whose
|
||||||
|
# privileged screencast protocol it can bind. Repoint its ExecStart from the dev source tree to the
|
||||||
|
# installed script. NOT enabled by default — only kwin-backend hosts (e.g. Fedora/Ubuntu KDE) need it.
|
||||||
|
install -Dm0644 scripts/punktfunk-kde-session.service %{buildroot}%{_userunitdir}/punktfunk-kde-session.service
|
||||||
|
sed -i 's#%h/punktfunk/scripts/headless/run-headless-kde.sh#%{_datadir}/%{name}/headless/run-headless-kde.sh#' %{buildroot}%{_userunitdir}/punktfunk-kde-session.service
|
||||||
|
|
||||||
# --- client subpackage ---
|
# --- client subpackage ---
|
||||||
install -Dm0755 target/release/punktfunk-client %{buildroot}%{_bindir}/punktfunk-client
|
install -Dm0755 target/release/punktfunk-client %{buildroot}%{_bindir}/punktfunk-client
|
||||||
install -Dm0644 packaging/linux/io.unom.Punktfunk.desktop \
|
install -Dm0644 packaging/linux/io.unom.Punktfunk.desktop \
|
||||||
@@ -154,6 +161,7 @@ install -Dm0755 scripts/headless/run-headless-kde.sh %{buildroot}%{_datadir}/%
|
|||||||
install -Dm0755 scripts/headless/run-headless-sway.sh %{buildroot}%{_datadir}/%{name}/headless/run-headless-sway.sh
|
install -Dm0755 scripts/headless/run-headless-sway.sh %{buildroot}%{_datadir}/%{name}/headless/run-headless-sway.sh
|
||||||
install -Dm0644 scripts/host.env.example %{buildroot}%{_datadir}/%{name}/host.env.example
|
install -Dm0644 scripts/host.env.example %{buildroot}%{_datadir}/%{name}/host.env.example
|
||||||
install -Dm0644 packaging/bazzite/host.env %{buildroot}%{_datadir}/%{name}/host.env.bazzite
|
install -Dm0644 packaging/bazzite/host.env %{buildroot}%{_datadir}/%{name}/host.env.bazzite
|
||||||
|
install -Dm0644 packaging/kde/host.env %{buildroot}%{_datadir}/%{name}/host.env.kde
|
||||||
install -Dm0644 docs/api/openapi.json %{buildroot}%{_datadir}/%{name}/openapi.json
|
install -Dm0644 docs/api/openapi.json %{buildroot}%{_datadir}/%{name}/openapi.json
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@@ -163,6 +171,7 @@ install -Dm0644 docs/api/openapi.json %{buildroot}%{_datadir}/%
|
|||||||
%{_udevrulesdir}/60-punktfunk.rules
|
%{_udevrulesdir}/60-punktfunk.rules
|
||||||
%{_prefix}/lib/sysctl.d/99-punktfunk-net.conf
|
%{_prefix}/lib/sysctl.d/99-punktfunk-net.conf
|
||||||
%{_userunitdir}/punktfunk-host.service
|
%{_userunitdir}/punktfunk-host.service
|
||||||
|
%{_userunitdir}/punktfunk-kde-session.service
|
||||||
%dir %{_datadir}/%{name}
|
%dir %{_datadir}/%{name}
|
||||||
%{_datadir}/%{name}/*
|
%{_datadir}/%{name}/*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user