feedback: local-only pacman package build, and ignore build artifacts

fee[dB]ack has no AUR entry, so install_feedback.sh builds a local
package from the PKGBUILD tracked beside it, the same way
hypersomnia-appimage and jackify-bin are installed here. The script only
builds and then prints the `sudo pacman -U` line to run, since
interactive sudo prompts belong to the user rather than an agent.

The built .pkg.tar.zst is ~640 MB, so it is gitignored along with the
Bottles prefixes and the archwiki_rag vector index — all three are local
runtime state that is regenerable and must never enter the history (see
memories/binary-files.md). The PKGBUILD and the installer are the
source and stay tracked.

Exclude PKGBUILDs from shellcheck. A PKGBUILD is a makepkg manifest,
not a standalone script: it has no shebang by design, pkgname/pkgver/
source/sha512sums are read by makepkg, and pkgdir/srcdir are injected by
it, so shellcheck flags every one as unused or undefined. The same
reasoning already excludes zsh — the dialect is outside what shellcheck
can judge — and the alternative was a directive on nearly every line.

Also drops three stray files: a saved search-results page, a 0-byte file
from a mistyped redirect, and a June i3 config backup superseded by git.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YQLwdquDCNmWtvgi3Lk72J
This commit is contained in:
Krzysztof Rudnicki 2026-08-10 15:31:11 +02:00
parent 86565bdef6
commit 91061edc14
5 changed files with 187 additions and 1 deletions

13
.gitignore vendored
View File

@ -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
# ===========================================================================

View File

@ -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)

View File

@ -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 <changed-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"
]
}

View File

@ -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
}

View File

@ -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)."