The root helper, its unit, the group-scoped polkit rule and the install-kind
marker all shipped with the HOST package. A Steam Deck or a handheld has no host
package, so the client half of one-tap updates had nothing to stand on.
The client packages now ship their own copies — deliberately under their own
paths (`pf-update-client`, `punktfunk-client-update.service`,
`49-punktfunk-client-update.rules`, `/usr/share/punktfunk-client/install-kind`)
rather than sharing the host's. Two packages owning one path is a hard conflict
in dpkg, rpm and pacman alike, and the client marker needs its own DIRECTORY
too because the host RPM claims `%{_datadir}/punktfunk/*` with a glob — a
sibling file there would break `dnf install punktfunk punktfunk-client`.
`pf-update` grows the matching `apply-client` verb. The verb comes from a
root-owned unit's fixed ExecStart, never from the caller, so the zero-parameter
invariant holds; both verbs sweep every installed punktfunk package, and what
the verb selects is which marker is read and which binary the run-the-binary
gate executes afterwards. A client sysext is refused with its reason: the signed
feed carries the host image, and installing that over a client-only box is not
an update.
The opt-in group is created by both packages' scriptlets, idempotently, so
whichever lands first wins.
Also fixes the host's own helper install: it read `$R/target/release/pf-update`,
which is the source checkout, while build() exports CARGO_TARGET_DIR="$srcdir/
target" and every other binary in the file installs from `$T`. Both now read
`$T`.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
29 lines
1.3 KiB
Plaintext
29 lines
1.3 KiB
Plaintext
# pacman scriptlet for the GTK4 client — mirrors build-client-deb.sh's postinst.
|
|
_ensure_update_group() {
|
|
# The (empty) opt-in group for one-tap client updates — nobody is auto-added. Shared with
|
|
# punktfunk-host's scriptlet: `groupadd` is idempotent here, so whichever package lands first
|
|
# creates it and the other is a no-op.
|
|
getent group punktfunk-update >/dev/null 2>&1 || groupadd --system punktfunk-update 2>/dev/null || true
|
|
}
|
|
|
|
post_install() {
|
|
_ensure_update_group
|
|
udevadm control --reload-rules 2>/dev/null || true
|
|
udevadm trigger --subsystem-match=hidraw 2>/dev/null || true
|
|
update-desktop-database /usr/share/applications 2>/dev/null || true
|
|
# Apply the 32 MB UDP recv-buffer tuning now (also auto-applied at boot by systemd-sysctl).
|
|
sysctl -p /usr/lib/sysctl.d/99-punktfunk-client-net.conf >/dev/null 2>&1 || true
|
|
cat <<'MSG'
|
|
punktfunk-client installed.
|
|
punktfunk-client # GUI: discover hosts on the LAN + connect
|
|
punktfunk-client --connect HOST[:PORT] # direct / scripted (this is what the Decky plugin runs)
|
|
On a Steam Deck / AMD box, install 'libva-mesa-driver' for hardware (VAAPI) decode.
|
|
MSG
|
|
}
|
|
|
|
post_upgrade() {
|
|
_ensure_update_group
|
|
udevadm control --reload-rules 2>/dev/null || true
|
|
sysctl -p /usr/lib/sysctl.d/99-punktfunk-client-net.conf >/dev/null 2>&1 || true
|
|
}
|