Name: pocketds Version: 1 Release: 20260517124326%{?dist} Summary: Meta packages for the AYANEO Pocket DS Fedora port License: GPL-2.0-or-later URL: https://gitlab.com/linux-pocketds BuildArch: noarch Source0: README.md %global debug_package %{nil} %description Meta-package family for the AYANEO Pocket DS Fedora port. Contains a device-support base and one marker subpackage per desktop profile (KDE Plasma, KDE Plasma Mobile, GNOME, Phosh). The actual desktop package set is chosen at image-build time by mkosi via dnf comps groups (@kde-desktop, @gnome-desktop, @phosh-desktop, @kde-mobile); the profile subpackages here only declare device-side dependencies and serve as a per-image marker so `rpm -q pocketds-` identifies the chosen desktop. # ───────────────────────────────────────────────────────────────────────── # Base — mandatory device support, picked up by every profile. # ───────────────────────────────────────────────────────────────────────── %package base Summary: AYANEO Pocket DS device support (kernel, firmware, ABL, etc.) # kernel ships /boot/Image (boot.img-wrapped) with the embedded busybox # initramfs and the rocknix-patched config. Requires: kernel # systemd-pam owns /usr/lib64/security/pam_systemd.so. It's a separate # subpackage from systemd proper and the mkosi minimal install doesn't # pull it in transitively. Without it the session PAM stack runs without # pam_systemd, /run/user/$UID is never created, XDG_RUNTIME_DIR is never # exported, and kwin_wayland_wrapper aborts on first launch with # qFatal("Could not create wayland socket: XDG_RUNTIME_DIR not set"). The # `-session optional pam_systemd.so` line in /etc/pam.d/system-auth is a # silent no-op when the .so is missing, so the session opens "successfully" # and the failure surfaces only when KWin tries to bind /run/user/$UID/ # wayland-0. Diagnosed from the kwin_wayland_wr coredump on a fc44 build # where pam_systemd.so was absent from /usr/lib64/security/. Requires: systemd-pam # Vendor blobs: ADSP/CDSP, ATH12K WCN7850, SM8550-APS-tplg, vpu30_p4, plus # the AYANEO-signed Adreno 740 GPU triplet (SQE/GMU/zap). pocketds-firmware # is the rootfs-side delivery; the same a740 blobs are also baked into the # kernel-builtin busybox initramfs via the standalone pocketds-initramfs # repo, which is what fixes early-probe before the rootfs is mounted. Requires: pocketds-firmware # udev hwdb + InputPlumber capability_map for the AYANEO MCU. Requires: pocketds-userspace # Linux firmware for non-Pocket-DS bits the kernel still touches # (ath12k, wcn7850-bt, qrtr). Requires: linux-firmware # Fedora's qcom-firmware ships the rest of the Qualcomm SoC blobs # (genXXXX_sqe.fw.xz / gmu_gen*.bin / etc. for non-740 variants) and is # kept here as a soft companion to pocketds-gpu-firmware -- the latter # carries the AYANEO-signed a740 zap shader that qcom-firmware can't # redistribute and the early-boot path needs. Requires: qcom-firmware # Mesa + Vulkan stack — kept in base because every profile needs it. Requires: mesa-dri-drivers mesa-vulkan-drivers Requires: mesa-libGL mesa-libEGL mesa-libgbm Requires: libdrm vulkan-loader # Audio. Requires: pipewire pipewire-pulseaudio wireplumber alsa-utils # Networking. Requires: NetworkManager NetworkManager-wifi iwd wpa_supplicant # Input layer (composite virtual gamepad). Requires: inputplumber # Calibration UI (analog sticks). Requires: gamepadcalibration # Power. Requires: power-profiles-daemon upower # Bluetooth. Requires: bluez bluez-tools # Archive tooling — `tar` not in the minimal base; convenient to # have on a desktop image for zipping logs / unpacking releases. Requires: tar gzip xz zstd unzip # Default monospace fonts. The mkosi minimal install pulls in # default-fonts-core-sans (Cantarell/Noto Sans) but NOT the matching # default-fonts-core-mono, so fontconfig's "Monospace" alias falls # through to whatever else is on the system -- on this image that's # urw-base35-nimbus-mono-ps-fonts, a PostScript Type1-derived OTF with # broken hinting and limited Unicode coverage. Result: GNOME Terminal / # Konsole render with garbled glyph metrics. default-fonts-core-mono is # noarch and pulls Liberation Mono + DejaVu Sans Mono via Recommends, # which is what fontconfig should resolve "Monospace" to. Requires: default-fonts-core-mono # For steam Requires: wget gtk2 lsof %description base Device-support base for the AYANEO Pocket DS. Pulls in the rocknix- patched kernel + DTB, vendor firmware, the ROCKNIX-signed ABL, InputPlumber for the MCU gamepad, the analog stick calibration tool, the Mesa/Vulkan stack, audio (PipeWire) and networking (NetworkManager + iwd) bits. Every desktop profile builds on this. # ───────────────────────────────────────────────────────────────────────── # Marker subpackages. Each pulls in pocketds-base + a *minimum* per-DE # add-on; the bulk of the desktop comes from the dnf comps group named # in mkosi.conf. (@kde-desktop, @gnome-desktop, …). # ───────────────────────────────────────────────────────────────────────── %package kde Summary: KDE Plasma desktop profile marker for the Pocket DS Requires: pocketds-base = %{version}-%{release} Conflicts: pocketds-kde-mobile pocketds-gnome pocketds-phosh pocketds-steamos %description kde Marker for the KDE Plasma desktop profile. The Plasma 6 stack itself is installed via the @kde-desktop and @kde-apps comps groups in mkosi.conf.kde — those pull in plasma-workspace, plasma-desktop, kwin, plasma-pa, plasma-nm, dolphin, konsole, kate, the breeze theme, and the Plasma greeter (sddm or plasma-login depending on the Fedora release default). %package kde-mobile Summary: KDE Plasma Mobile profile marker for the Pocket DS Requires: pocketds-base = %{version}-%{release} Conflicts: pocketds-kde pocketds-gnome pocketds-phosh pocketds-steamos %description kde-mobile Marker for the KDE Plasma Mobile profile. The Plasma Mobile shell is installed via the @kde-mobile and @kde-mobile-apps comps groups in mkosi.conf.kde-mobile. %package gnome Summary: GNOME desktop profile marker for the Pocket DS Requires: pocketds-base = %{version}-%{release} Conflicts: pocketds-kde pocketds-kde-mobile pocketds-phosh pocketds-steamos %description gnome Marker for the GNOME desktop profile. The GNOME stack itself is installed via the @gnome-desktop comps group in mkosi.conf.gnome — that pulls in gnome-shell, mutter, gnome-control-center, GDM, and the gnome-* app set. %package phosh Summary: Phosh (mobile-friendly GNOME) profile marker for the Pocket DS Requires: pocketds-base = %{version}-%{release} Conflicts: pocketds-kde pocketds-kde-mobile pocketds-gnome pocketds-steamos %description phosh Marker for the Phosh (Phone Shell) profile. The Phosh stack is installed via the @phosh-desktop comps group in mkosi.conf.phosh. %package steamos Summary: SteamOS-style game-handheld profile marker for the Pocket DS Requires: pocketds-base = %{version}-%{release} # KDE Plasma is the underlying desktop shell — same comps groups as the # kde profile pull in @kde-desktop / @kde-apps via mkosi.conf.steamos. # The Steam stack, dual-screen toolbox, flip-companion and the Flip-DS # gamescope fork land via dedicated COPR packages, depended on here so # `dnf install pocketds-steamos` brings the whole thing in one shot. Requires: pocketds-steam Requires: pocketds-screen-toolbox # flip-companion: AYANEO Flip/Pocket DS bottom-screen companion app # (virtual keyboard, live stats, KWin window-shuttle). Weak dep so a # user yanking it doesn't break the meta-package. Recommends: flip-companion # Flip-DS-tuned gamescope fork (DRM lease for the bottom panel, # --ignore-touch-device, etc.). Weak dep for the same reason; absence # falls back to the stock Plasma session. Recommends: gamescope-flipds Conflicts: pocketds-kde pocketds-kde-mobile pocketds-gnome pocketds-phosh %description steamos Marker for the SteamOS-style game-handheld profile. Builds on the same Plasma 6 desktop as pocketds-kde (installed via @kde-desktop / @kde-apps in mkosi.conf.steamos), and layers on: * pocketds-steam — Switchdeck-derived native ARM64 Steam client + first-boot bootstrap of Proton 11 (ARM64) and the Steam Linux Runtime * pocketds-screen-toolbox — kscreen-doctor wrappers + a Plasma 6 applet for one-tap DSI-1 / DSI-2 layout switches (top-only / bottom-only / both / swap-primary / rotate) * flip-companion — Slint/Rust app for the bottom panel (OSK, live stats, KWin window shuttle) * gamescope-flipds — mmogr's Flip-DS gamescope fork with DRM lease + ignore-touch-device support, for Steam Big Picture / gamescope-session %prep %build %install mkdir -p %{buildroot}%{_docdir}/%{name} cp %{SOURCE0} %{buildroot}%{_docdir}/%{name}/ %post base # All system-state mutations the Pocket DS image needs at install # time. Idempotent — safe on first install, upgrade, and re-run. # pocketds-base Requires every package whose presence the script # assumes (kernel, firmware bundles, plasmalogin via the Plasma # group, firewalld, systemd, etc.) so by the time %post runs all # the binaries / unit files / firmware blobs are in place. # 1. Default to graphical.target. anaconda's run-initial-setup # historically pivoted on this; we still use it as the boot # target signal for downstream wizards / autostart logic. /usr/bin/systemctl set-default graphical.target >/dev/null 2>&1 || : ln -sf /usr/lib/systemd/system/graphical.target \ /etc/systemd/system/default.target # 2. plasmalogin = Plasma 6's greeter (replaces SDDM in F44). # Wire it as the system's display-manager.service. Only when # plasmalogin is actually installed (KDE images); on GNOME images # GDM owns display-manager.service via its own scriptlet. if [ -e /usr/lib/systemd/system/plasmalogin.service ]; then /usr/bin/systemctl enable plasmalogin.service >/dev/null 2>&1 || : ln -sf /usr/lib/systemd/system/plasmalogin.service \ /etc/systemd/system/display-manager.service fi # 2a. GDM autologin (GNOME images). The KDE side ships its autologin via # /etc/plasmalogin.conf.d/10-pocketds-autologin.conf in pocketds- # userspace; GDM doesn't support drop-ins, so we sed-edit the stock # /etc/gdm/custom.conf in place. Idempotent: the grep guard skips # when AutomaticLogin is already set (re-run on upgrade is a no-op). # Conditional on the file existing, so this is also a no-op on KDE # images where gdm isn't installed. if [ -f /etc/gdm/custom.conf ] && \ ! /usr/bin/grep -q '^AutomaticLogin=' /etc/gdm/custom.conf; then /usr/bin/sed -i \ -e 's|^\[daemon\]$|[daemon]\nAutomaticLoginEnable=True\nAutomaticLogin=pocketds|' \ /etc/gdm/custom.conf fi # 3. Skip Fedora's first-boot wizard: anaconda's initial-setup # can't get DRM master from a system service without a logind # session; verified on the Pocket DS, kwin_wayland fails # 'Permission denied' on every drmModeSet. Mask the unit and # rely on the default user we create below instead. /usr/bin/systemctl mask initial-setup.service >/dev/null 2>&1 || : # 4. NetworkManager owns Wi-Fi; networkd is fallback only. # networkd-wait-online would block boot for ~90s if enabled. /usr/bin/systemctl mask systemd-networkd-wait-online.service >/dev/null 2>&1 || : # 4a/4b. InputPlumber + pocketds-mode-listener are enabled via the # systemd preset shipped by pocketds-userspace # (/usr/lib/systemd/system-preset/95-pocketds.preset). Doing it # via preset rather than `systemctl enable` here is necessary # because mkosi runs %post under a non-systemd PID 1, where # `systemctl enable` silently no-ops -- the wants/ symlinks # never get written. systemd-update-helper / preset apply # handles this correctly. # 5. Default user: pocketds:ayaneo, in `wheel` (sudoers via # /etc/sudoers.d/10-wheel-nopasswd shipped by pocketds-userspace). # Only create on first install; never overwrite a user who's # already on the system (idempotency for upgrades + manual edits). if ! /usr/bin/getent passwd pocketds >/dev/null; then /usr/sbin/useradd --create-home --groups wheel --shell /bin/bash \ --password '$6$1IrJtgNP1.e10RGD$bP57cz9qERPm7/oRzmAHwJV5yKQgOLoM2SbzcS28nC.zQ11p4L6kMajLNr6z3LKLHYdoXmB8FmZMQG9AoYnD6.' \ pocketds || : fi # 6. firewalld: stock DefaultZone is 'public' which blocks mdns / # samba-client / dhcpv6-client inbound. Flip to FedoraWorkstation # (same zone the F44 Workstation Spin uses) which permits those # out of the box. if [ -f /etc/firewalld/firewalld.conf ]; then /usr/bin/sed -i 's/^DefaultZone=.*/DefaultZone=FedoraWorkstation/' \ /etc/firewalld/firewalld.conf /usr/bin/grep -q '^DefaultZone=' /etc/firewalld/firewalld.conf || \ echo 'DefaultZone=FedoraWorkstation' >> /etc/firewalld/firewalld.conf fi # 7. /storage first-boot resize marker: pocketds-fs-resize.service # (in pocketds-initramfs) reads this on first boot to grow the # STORAGE partition to fill the SD/eMMC. install -d -m 0755 /storage 2>/dev/null || : : > /storage/.please_resize_me 2>/dev/null || : # 8. Pre-decompress every *.xz under /usr/lib/firmware. The kernel # is built without CONFIG_FW_LOADER_COMPRESS_XZ (enabling it # triggered a GPU-probe oops with a register dump on the # device). Fedora's qcom-firmware / chunks of linux-firmware # ship .xz blobs — without decompression the kernel logs # 'Direct firmware load for X failed -2' on probe. /usr/bin/find /usr/lib/firmware -type f -name '*.xz' -print0 \ 2>/dev/null | /usr/bin/xargs -0 -r /usr/bin/unxz -f 2>/dev/null || : # Fix per-device alias symlinks that still carry .xz on both ends # (e.g. SM8550-HDK-tplg.bin.xz -> ../kaanapali/Kaanapali-MTP-tplg.bin.xz): /usr/bin/find /usr/lib/firmware -type l -name '*.xz' 2>/dev/null \ | while read -r link; do target=$(/usr/bin/readlink "$link") || continue new_link=${link%.xz} new_target=${target%.xz} /usr/bin/rm -f "$link" /usr/bin/ln -s "$new_target" "$new_link" done %files base %doc %{_docdir}/%{name}/README.md %files kde %doc %{_docdir}/%{name}/README.md %files kde-mobile %doc %{_docdir}/%{name}/README.md %files gnome %doc %{_docdir}/%{name}/README.md %files phosh %doc %{_docdir}/%{name}/README.md %files steamos %doc %{_docdir}/%{name}/README.md %changelog * Wed May 06 2026 Pocket DS Maintainers - %{version}-%{release} - Release auto-stamped from build_timestamp; full history in git log