feat: Add support for steamos without needing to break readonly mode - #46
Conversation
…nto scripts/install.sh
|
Really clean sysext setup — One thing before it lands: the sysext also stages the couchplay GUI binary + the .desktop/icon/metainfo, but package-helper.sh only bundles libs for the helper, not the GUI. Since the GUI goes through the Flatpak, mind making the sysext helper-only (drop the cp build/bin/couchplay line + the desktop/icon/metainfo copies) |
|
I'm hoping we can use the non flatpak binary long term. It makes the playstation and steam controller support work much better since the ui (where that logic lives) can access the raw devices without flatpak getting in the way. If we use the local binary then we would want it included in this package since it's the best way to add it to the correct places |
|
I might poke about trying to get all of that logic into the service, would fix that concern |
|
Let's put a pin in this mr for now, I'll do some tinkering |
|
The reason I was planning to keep the GUI Flatpak-only: shipping one native binary that matches every distro's Qt6/KF6 runtime is the real headache (the copy-relocation failures on Arch/SteamOS, etc.). The Flatpak bundles its own Qt/KDE runtime so it runs identically everywhere, and the plan is to route all privileged or Flatpak-gated operations — device access, user/process management, anything needing root or raw hardware — through the root helper service. The GUI stays thin, unprivileged, and sandboxed. |
|
Makes sense, I'll do some more poking around on this, Possibly get it to install the flatpak automatically |
…ode launcher integration
|
Updated to remove the gui pieces from the images and install the flatpak |
hikaps
left a comment
There was a problem hiding this comment.
The sysext layout is correct: usr/... tree, extension-release.couchplay.steamos with ID=_any (filename matches the couchplay.steamos extension name), mksquashfs -noappend -all-root. The couchplay.flatpak asset is supplied to both beta and tag releases by flatpak.yml, so install_sysext's three-asset lookup is satisfied. OS detection + --sysext/--tarball overrides + REAL_USER=${SUDO_USER:-deck} look right. Requesting changes for the two inline items.
Cross-PR (with #53): both PRs add a SteamOS update script — update-nonroot.sh (here) vs update-sysext.sh (#53) — divergent. Let's keep one (leaning #53's update-sysext.sh for the faster loop, Flatpak-source rebuild folded in as a flag). install.sh merges cleanly. Happy to land this first, then #53 rebases + we dedup.
|
|
||
| # Configure controller hidraw udev rules | ||
| print_info "Configuring udev rules..." | ||
| echo 'KERNEL=="hidraw*", SUBSYSTEM=="hidraw", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ce6", MODE="0666", TAG+="uaccess", TAG+="seat"' | tee /etc/udev/rules.d/99-couchplay-hidraw.rules |
There was a problem hiding this comment.
World-readable hidraw rule — MODE="0666" for idVendor=054c idProduct=0ce6 makes raw controller HID readable by any local process (real input-sniffing surface on multi-user/multi-seat), persists across reboots, and is unnecessary: the helper reads hidraw as root and bypasses DAC. Also misses the Steam Controller VID (28de) that #53's exit-chord reads. Drop the 0666 (or use a restrictive group ACL via the polkit-gated ownership flow).
| local manifest_copy="${TEMP_DIR}/io.github.hikaps.couchplay.json" | ||
| cp io.github.hikaps.couchplay.json "$manifest_copy" | ||
| # Replace the git source block with a local directory source block | ||
| sed -i 's|"type": "git"|"type": "dir"|' "$manifest_copy" |
There was a problem hiding this comment.
The git→dir Flatpak manifest rewrite is four literal sed substitutions on JSON. Any change to the source-block formatting (key order, spacing, extra keys — including this PR's own manifest edit) yields invalid JSON or a duplicate path key, failing flatpak-builder opaquely. Editing the manifest as JSON (jq/python) or shipping a dedicated local-build fragment would be more robust.
…ewrite - install.sh: remove MODE="0666" from the DualSense udev rule (helper reads hidraw as root; world-readable is unnecessary). uaccess/seat tags retained. - update-nonroot.sh: replace the 4 sed substitutions (which converted ALL git sources incl. polkit/polkit-qt to type:dir) with a jq rewrite that targets only the couchplay source by URL. Add jq to the dependency check.
…path) flatpak-builder rejects bare --filesystem=xdg-run (requires xdg-run/<name>), failing the build at finish-args validation since #46. The GUI's runtime-dir needs are its own sandbox XDG_RUNTIME_DIR (auto-accessible) and the sysext auto-install uses --talk-name=org.freedesktop.Flatpak (D-Bus), so the entry was both invalid and unnecessary.
#37