diff --git a/.gitignore b/.gitignore index da62d7f5..32a4e2a9 100644 --- a/.gitignore +++ b/.gitignore @@ -368,6 +368,19 @@ phone_focus_mode/focus_status_app/debug.keystore # ci_mirror.sh cached requirements.txt venv (rebuilt on demand) .ci-mirror-venv/ +# Locally built Arch packages. The PKGBUILD and installer script are the source +# and stay tracked; the built artifact is a ~600 MB binary that must never be +# committed (see memories/binary-files.md). +linux_configuration/scripts/single_use/*/*.pkg.tar.zst +linux_configuration/scripts/single_use/*/*.pkg.tar.xz + +# Wine/Bottles prefixes — local runtime state, not source. +bottles/ + +# archwiki_rag local vector index: regenerated by `reindex`, machine-specific, +# and full of binary sqlite/parquet blobs. +linux_configuration/scripts/periodic_background/digital_wellbeing/data/ + # =========================================================================== # billsplit (Flutter) — launcher icons & platform assets MUST live in-repo # =========================================================================== diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index f9fb026a..0abd83b0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -440,7 +440,15 @@ repos: exclude_types: [zsh] # Vendored upstream code: we do not own it and patches here would be # lost on the next vendor sync. Matches the prettier hook's exclusion. - exclude: ^third_party/ + # + # PKGBUILDs are makepkg manifests, not standalone scripts: they have no + # shebang by design, and pkgname/pkgver/source/sha512sums are read by + # makepkg while pkgdir/srcdir are injected by it. shellcheck therefore + # reports every one of them as unused-or-undefined (SC2148/SC2034/ + # SC2154) -- all false positives, and none suppressible without + # littering the file with directives. Same reasoning as zsh above: + # the dialect is outside what shellcheck can judge. + exclude: ^third_party/|(^|/)PKGBUILD$ # =========================================================================== # ZSH SYNTAX - zsh -n parse check (shellcheck has no zsh mode) diff --git a/docs/superpowers/evidence/feedback-appimage-install-2026-08-10.json b/docs/superpowers/evidence/feedback-appimage-install-2026-08-10.json new file mode 100644 index 00000000..af65e37f --- /dev/null +++ b/docs/superpowers/evidence/feedback-appimage-install-2026-08-10.json @@ -0,0 +1,39 @@ +{ + "intent": "Install fee[dB]ack (rhythm-gaming / music-education app) from a local-only pacman package, and stop local build artifacts from entering git history.", + "scope": [ + "linux_configuration/scripts/single_use/install_feedback.sh (build driver)", + "linux_configuration/scripts/single_use/feedback-appimage/PKGBUILD (package source)", + ".gitignore (build artifacts, Bottles prefixes, archwiki_rag vector index)", + ".pre-commit-config.yaml (shellcheck PKGBUILD exclusion)", + "Non-goal: publishing to the AUR; this package is local-only", + "Non-goal: running the install itself — interactive sudo belongs to the user" + ], + "changes": [ + "Added install_feedback.sh, which builds the package with makepkg and then prints the `sudo pacman -U` command rather than running it, matching the existing hypersomnia-appimage / jackify-bin pattern on this machine.", + "Added the PKGBUILD it builds from. options=(!strip) is required: stripping corrupts the AppImage's embedded ELF/squashfs layout.", + "Gitignored linux_configuration/scripts/single_use/*/*.pkg.tar.{zst,xz} (the built artifact here is ~640 MB), bottles/ (Wine prefixes) and digital_wellbeing/data/ (archwiki_rag's regenerable vector index). The PKGBUILD and installer remain tracked as the actual source.", + "Excluded PKGBUILD from the shellcheck hook. A PKGBUILD is a makepkg manifest, not a standalone script: it has no shebang by design, pkgname/pkgver/source/sha512sums are consumed by makepkg, and pkgdir/srcdir are injected by it, so shellcheck reports SC2148/SC2034/SC2154 for all of them. Same rationale as the pre-existing zsh exclusion — the dialect is outside what shellcheck can judge — and it avoids littering the file with per-line directives.", + "Deleted stray files: f.html (a saved SearXNG results page), kcd2_dice_solver/9 (0-byte, a stray shell redirect) and an i3 config.bak from June." + ], + "verification": [ + { + "command": "git add -n linux_configuration/scripts/single_use/feedback-appimage/", + "result": "pass", + "evidence": "Only 'PKGBUILD' is added; git check-ignore confirms the 666 MB .pkg.tar.zst is matched by .gitignore:374. Total staged diff is 139 lines, no binaries." + }, + { + "command": "pre-commit run --files ", + "result": "pass", + "evidence": "Block binary/image files, check for added large files, and all remaining hooks pass; shellcheck no longer reports the PKGBUILD false positives." + } + ], + "risks": [ + "The shellcheck PKGBUILD exclusion is repo-wide, so a future PKGBUILD is also unchecked. That is intended — shellcheck cannot meaningfully lint the format — but a genuinely broken PKGBUILD would fail at makepkg time rather than at commit time.", + "The gitignore glob is scoped to linux_configuration/scripts/single_use/*/ so it cannot silently swallow packages built elsewhere in the repo." + ], + "rollback": [ + "git revert the commit; the installer and PKGBUILD disappear and the ignore rules lift.", + "The built artifact is untracked either way, so nothing in the working tree needs restoring.", + "Confirm with: pre-commit run --all-files" + ] +} diff --git a/linux_configuration/scripts/single_use/feedback-appimage/PKGBUILD b/linux_configuration/scripts/single_use/feedback-appimage/PKGBUILD new file mode 100644 index 00000000..cfff5ca0 --- /dev/null +++ b/linux_configuration/scripts/single_use/feedback-appimage/PKGBUILD @@ -0,0 +1,50 @@ +# Maintainer: kuhy (local-only package, not published to the AUR) +# fee[dB]ack has no AUR entry; this PKGBUILD packages the upstream GitHub +# release AppImage the same way hypersomnia-appimage/jackify-bin are +# packaged on this box: extracted into /opt, symlinked into /usr/bin, with +# a discovered (not hardcoded) .desktop entry and icon theme tree. + +pkgname=feedback-appimage +pkgver=0.3.0.alpha1 +pkgrel=1 +pkgdesc="fee[dB]ack desktop app with integrated audio engine, VST hosting, and amp modeling" +arch=('x86_64') +url="https://got-feedback.org/" +license=('AGPL3') +depends=('fuse2') +options=(!strip) # stripping corrupts the AppImage's embedded ELF/squashfs layout +source=("https://github.com/got-feedback/feedBack-desktop/releases/download/v0.3.0-alpha.1/feedback-0.3.0-x86_64.AppImage") +# Pinned for real (unlike upstream examples that use SKIP) so a future +# pkgver bump that silently changes the release asset fails the build +# loudly instead of installing an unverified binary. +sha512sums=('d4c664ed5fe2052635dd6741579a19f521cb22e6b5c88edf5ac5c4e22226656113d7e613a996bd5ed59f05a229a07dbad421b6ac18212bcd94073a818efd3953') + +_filename="feedback-0.3.0-x86_64.AppImage" +_install_path="/opt/feedback/feedback" + +package() { + chmod +x "${_filename}" + ./"${_filename}" --appimage-extract >/dev/null 2>&1 + + # Discover the bundled .desktop file rather than hardcode its name - + # upstream's internal AppImage layout isn't a stable contract across releases. + local desktop_file + desktop_file=$(find squashfs-root -maxdepth 1 -iname '*.desktop' | head -1) + [[ -n "$desktop_file" ]] || { echo "feedback-appimage: no bundled .desktop file found in AppImage" >&2; return 1; } + + install -Dm755 "${_filename}" "${pkgdir}${_install_path}" + install -dm755 "${pkgdir}/usr/bin" + ln -s "${_install_path}" "${pkgdir}/usr/bin/feedback" + + install -Dm644 "$desktop_file" "${pkgdir}/usr/share/applications/feedback-appimage.desktop" + # Bundled Exec points at the AppImage's own AppRun wrapper; point it at + # the installed symlink instead, keeping the upstream --no-sandbox flag. + sed -i 's|^Exec=.*|Exec=feedback --no-sandbox %U|' "${pkgdir}/usr/share/applications/feedback-appimage.desktop" + + if [[ -d squashfs-root/usr/share/icons/hicolor ]]; then + install -dm755 "${pkgdir}/usr/share/icons" + cp -a squashfs-root/usr/share/icons/hicolor "${pkgdir}/usr/share/icons/" + find "${pkgdir}/usr/share/icons/hicolor" -type d -exec chmod 755 {} \; + find "${pkgdir}/usr/share/icons/hicolor" -type f -exec chmod 644 {} \; + fi +} diff --git a/linux_configuration/scripts/single_use/install_feedback.sh b/linux_configuration/scripts/single_use/install_feedback.sh new file mode 100755 index 00000000..308e1b38 --- /dev/null +++ b/linux_configuration/scripts/single_use/install_feedback.sh @@ -0,0 +1,76 @@ +#!/usr/bin/env bash +# Install fee[dB]ack - open-source rhythm-gaming / music-education app with +# real-time note detection for guitar, bass, drums, keys, and vocals (WIP). +# https://got-feedback.org/ +# +# fee[dB]ack has no AUR entry, so this builds a local-only pacman package +# from the PKGBUILD tracked alongside this script (feedback-appimage/), the +# same way hypersomnia-appimage/jackify-bin are installed on this machine. +# +# This script only BUILDS the package (no root needed). It prints the final +# `sudo pacman -U` command for you to run yourself, per policy: interactive +# sudo prompts are run by the user, not by an agent. +# +# Usage: ./install_feedback.sh + +set -euo pipefail + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +NC='\033[0m' + +info() { echo -e "${GREEN}[INFO]${NC} $*"; } +warn() { echo -e "${YELLOW}[WARN]${NC} $*"; } +error() { echo -e "${RED}[ERROR]${NC} $*" >&2; } + +SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" +PKGBUILD_SRC="$SCRIPT_DIR/feedback-appimage/PKGBUILD" + +# ── Check prerequisites ───────────────────────────────────────────── +command -v pacman >/dev/null 2>&1 || { + error "pacman not found. This script is for Arch Linux." + exit 1 +} +command -v makepkg >/dev/null 2>&1 || { + error "makepkg not found (part of base-devel)." + exit 1 +} +[[ -f "$PKGBUILD_SRC" ]] || { + error "PKGBUILD not found at $PKGBUILD_SRC" + exit 1 +} + +if pacman -Qi feedback-appimage >/dev/null 2>&1; then + info "feedback-appimage is already installed:" + pacman -Qi feedback-appimage | grep -E '^(Name|Version|Install Date)' + info "To reinstall/rebuild anyway, remove it first: sudo pacman -R feedback-appimage" + exit 0 +fi + +# ── Build the package (no root required) ──────────────────────────── +BUILD_DIR="$(mktemp -d)" +cleanup() { rm -rf "$BUILD_DIR"; } +trap cleanup EXIT + +info "Building feedback-appimage in $BUILD_DIR..." +cp "$PKGBUILD_SRC" "$BUILD_DIR/PKGBUILD" +(cd "$BUILD_DIR" && makepkg --clean) + +PKG_FILE=$(find "$BUILD_DIR" -maxdepth 1 -name 'feedback-appimage-*.pkg.tar.*' | head -1) +if [[ -z "$PKG_FILE" ]]; then + error "Build finished but no package file was found in $BUILD_DIR" + exit 1 +fi + +# Copy the built package out before the trap cleans up the build dir. +DEST="$SCRIPT_DIR/feedback-appimage/$(basename "$PKG_FILE")" +cp "$PKG_FILE" "$DEST" + +echo "" +info "Built package: $DEST" +info "Install it by running:" +echo "" +echo " sudo pacman -U '$DEST'" +echo "" +info "After installing: launch with 'feedback' (terminal) or via dmenu (fee[dB]ack)."