diff --git a/.rashin-reviewer.yaml b/.rashin-reviewer.yaml index 27f2fcd7f..7a549f8be 100644 --- a/.rashin-reviewer.yaml +++ b/.rashin-reviewer.yaml @@ -21,10 +21,12 @@ tools: rules: allow: - # Wallpapers, fonts and the prebuilt shell installer are large on purpose. + # Wallpapers, fonts, the prebuilt shell installer and vendored upstream + # source bundles are large on purpose. large-file: - "ryoku/assets/wallpapers/**" - "**/fonts/**" - "ryoku-shell-installer/ryoku-shell-install" + - "release/packages/*/*.bundle" # The R2 retention Worker logs through console.log; wrangler tail reads it. debug-leftover: ["release/r2-retention/**"] diff --git a/fedora/packages/rpm/fetch/ryoku-keysounds-profiles.sh b/fedora/packages/rpm/fetch/ryoku-keysounds-profiles.sh index 2ebb3b29b..810fcb9f8 100755 --- a/fedora/packages/rpm/fetch/ryoku-keysounds-profiles.sh +++ b/fedora/packages/rpm/fetch/ryoku-keysounds-profiles.sh @@ -2,11 +2,13 @@ set -euo pipefail : "${RYOKU_FETCH_TREE:?}" -commit=326252a13e7bef4f1c35d08ef0189b5af6f8ba02 -dest="$RYOKU_FETCH_TREE/.rpm-ryoku-keysounds-profiles/mechvibes" +package=ryoku-keysounds-profiles +bundle="$RYOKU_FETCH_TREE/release/packages/$package/mechvibes.bundle" +commit=8d18b40792c7ce859a898ce0e840a0c01112888c +dest="$RYOKU_FETCH_TREE/.rpm-$package/mechvibes" rm -rf "$dest" mkdir -p "${dest%/*}" -git clone -q https://github.com/hainguyents13/mechvibes.git "$dest" +git clone -q "$bundle" "$dest" git -C "$dest" checkout -q --detach "$commit" [[ $(git -C "$dest" rev-parse HEAD) == "$commit" ]] printf '%s\n' "$commit" > "$dest/.ryoku-source-commit" diff --git a/nix/packages/ryoku-keysounds.nix b/nix/packages/ryoku-keysounds.nix index 899b9e845..afb5a10ac 100644 --- a/nix/packages/ryoku-keysounds.nix +++ b/nix/packages/ryoku-keysounds.nix @@ -4,16 +4,16 @@ }: let - mechvibesSrc = pkgs.fetchFromGitHub { - owner = "hainguyents13"; - repo = "mechvibes"; - - rev = "326252a13e7bef4f1c35d08ef0189b5af6f8ba02"; - - # Exact source used by Ryoku 0.59.7 for the shipped switch - # recording profiles. - hash = "sha256-+pEyeTzOLQXwGltFuRGGzTl0jFz8Jwbj2/u8Yiu6nmE="; - }; + # The eleven Mechvibes packs the shipped profiles use, vendored as a git + # bundle beside the Arch recipe (upstream rewrote its history for Mechvibes 3 + # and the pinned commit is gone), unpacked here without touching the network. + mechvibesSrc = pkgs.runCommand "mechvibes-src" { + nativeBuildInputs = [ pkgs.git ]; + } '' + git clone -q ${src}/release/packages/ryoku-keysounds-profiles/mechvibes.bundle $out + git -C $out checkout -q 8d18b40792c7ce859a898ce0e840a0c01112888c + rm -rf $out/.git + ''; in pkgs.hyprlandPlugins.mkHyprlandPlugin { diff --git a/release/CHANGELOG.md b/release/CHANGELOG.md index 4a74e9dcd..63e6916cd 100644 --- a/release/CHANGELOG.md +++ b/release/CHANGELOG.md @@ -1,6 +1,11 @@ # Release / Packaging Changelog ## Unreleased +- **The key-sound profiles build from a vendored Mechvibes bundle.** Upstream + rewrote its history for Mechvibes 3 and the pinned commit vanished, which + failed every publish at `ryoku-keysounds-profiles`. The eleven packs and + their licence now ship as `mechvibes.bundle` beside the recipe, used by the + Arch, Fedora, Void and Nix builds and the plugin Makefile. - **The desktop package carries the Zsh startup template.** Fresh installers and Doctor can seed it without relying on CachyOS skeleton files or replacing a user's `.zshrc`. diff --git a/release/packages/ryoku-keysounds-profiles/PKGBUILD b/release/packages/ryoku-keysounds-profiles/PKGBUILD index 45ee31721..54bf65203 100644 --- a/release/packages/ryoku-keysounds-profiles/PKGBUILD +++ b/release/packages/ryoku-keysounds-profiles/PKGBUILD @@ -7,9 +7,12 @@ # /usr/bin/ryoku-keysounds-import no matter which, or both, are installed. # # The profiles are real switch recordings cut from the MIT-licensed Mechvibes -# packs (github.com/hainguyents13/mechvibes, src/audio), fetched here as a -# pinned git source and sliced by ryoku-keysounds-import (see -# ryoku/keysounds/profiles.txt for the pack behind each profile). +# packs (github.com/hainguyents13/mechvibes, src/audio) and sliced by +# ryoku-keysounds-import (see ryoku/keysounds/profiles.txt for the pack behind +# each profile). The packs come from mechvibes.bundle beside this recipe: a +# git bundle of the eleven packs and licence at upstream commit 326252a1, +# which upstream's Mechvibes 3 history rewrite made unreachable. Refresh it +# with payload.sh's bundle notes and update sha256sums. pkgname=ryoku-keysounds-profiles pkgver=${RYOKU_PKGVER:-0.1.0} pkgrel=1 @@ -17,11 +20,17 @@ pkgdesc="Key-sound sample profiles (real switch recordings) and the Mechvibes im arch=('x86_64') url="https://ryoku.dev" license=('GPL-3.0-or-later' 'MIT') -# python runs the importer, ffmpeg cuts and normalises each sample, git fetches -# the pinned Mechvibes tree. +# python runs the importer, ffmpeg cuts and normalises each sample, git opens +# the vendored Mechvibes bundle. makedepends=('git' 'python' 'ffmpeg') -source=("mechvibes::git+https://github.com/hainguyents13/mechvibes.git#commit=326252a13e7bef4f1c35d08ef0189b5af6f8ba02") -sha256sums=('SKIP') +source=("mechvibes.bundle") +noextract=("mechvibes.bundle") +sha256sums=('5ec21776bc0989cb3a4bbcdf88084bf7d1caa9a2a9e1dd7084ad76f1e8095e32') + +prepare() { + git clone -q "$srcdir/mechvibes.bundle" "$srcdir/mechvibes" + git -C "$srcdir/mechvibes" checkout -q 8d18b40792c7ce859a898ce0e840a0c01112888c +} _repo="$startdir/../../.." diff --git a/release/packages/ryoku-keysounds-profiles/mechvibes.bundle b/release/packages/ryoku-keysounds-profiles/mechvibes.bundle new file mode 100644 index 000000000..c6cce2798 Binary files /dev/null and b/release/packages/ryoku-keysounds-profiles/mechvibes.bundle differ diff --git a/release/packages/ryoku-keysounds-profiles/payload.sh b/release/packages/ryoku-keysounds-profiles/payload.sh index 6f54946a0..6b284307d 100755 --- a/release/packages/ryoku-keysounds-profiles/payload.sh +++ b/release/packages/ryoku-keysounds-profiles/payload.sh @@ -8,8 +8,15 @@ set -euo pipefail _repo=$RYOKU_SRC _keysounds="$_repo/ryoku/keysounds" -MECHVIBES_URL=https://github.com/hainguyents13/mechvibes.git -MECHVIBES_COMMIT=326252a13e7bef4f1c35d08ef0189b5af6f8ba02 +# mechvibes.bundle holds the eleven packs profiles.txt names plus the MIT +# licence, as one commit cut from upstream 326252a13e7bef4f1c35d08ef0189b5af6f8ba02 +# (src/audio). Upstream rewrote its history for Mechvibes 3 on 2026-10-31 and +# that commit no longer exists there, so every lane builds from the bundle. To +# refresh: copy the packs and LICENSE into a fresh repo, commit, then +# `git bundle create mechvibes.bundle main` and update the commit and the +# PKGBUILD sha256sums. +MECHVIBES_BUNDLE="$_repo/release/packages/ryoku-keysounds-profiles/mechvibes.bundle" +MECHVIBES_COMMIT=8d18b40792c7ce859a898ce0e840a0c01112888c stage_prebuilt() { [[ -n ${RYOKU_PREBUILT_DIR:-} ]] || return 1 @@ -20,13 +27,12 @@ stage_prebuilt() { # The real switch recordings, cut from the MIT-licensed Mechvibes packs named in # profiles.txt by ryoku-keysounds-import. The recipe is the [ryoku] build's, and # Void's and Fedora's too, so it lives here once. MECHVIBES names a checkout; -# unset, one is cloned at the pinned commit (Arch hands in its makepkg source). +# unset, one is cloned from the vendored bundle (Arch hands in its makepkg source). sounds() { local mech=${MECHVIBES:-$RYOKU_BUILD_DIR/mechvibes} if [[ ! -d $mech/src/audio ]]; then - git init -q "$mech" - git -C "$mech" fetch -q --depth 1 "$MECHVIBES_URL" "$MECHVIBES_COMMIT" - git -C "$mech" checkout -q FETCH_HEAD + git clone -q "$MECHVIBES_BUNDLE" "$mech" + git -C "$mech" checkout -q "$MECHVIBES_COMMIT" fi rm -rf "$RYOKU_BUILD_DIR/sounds" local name pack diff --git a/ryoku/hyprland/plugins/keysounds/Makefile b/ryoku/hyprland/plugins/keysounds/Makefile index d8a0c6d3a..018339072 100644 --- a/ryoku/hyprland/plugins/keysounds/Makefile +++ b/ryoku/hyprland/plugins/keysounds/Makefile @@ -17,8 +17,10 @@ endif CXXFLAGS ?= -O2 CXXFLAGS += -shared -fPIC -std=c++2b -Wall -MECHVIBES_URL = https://github.com/hainguyents13/mechvibes.git -MECHVIBES_COMMIT = 326252a13e7bef4f1c35d08ef0189b5af6f8ba02 +# The packs come from the vendored bundle beside the profiles package (see +# release/packages/ryoku-keysounds-profiles/payload.sh for why). +MECHVIBES_BUNDLE = $(CURDIR)/../../../../release/packages/ryoku-keysounds-profiles/mechvibes.bundle +MECHVIBES_COMMIT = 8d18b40792c7ce859a898ce0e840a0c01112888c MECHVIBES ?= $(or $(XDG_CACHE_HOME),$(HOME)/.cache)/ryoku/mechvibes PROFILES ?= $(CURDIR)/../../../keysounds/profiles.txt IMPORTER ?= $(shell command -v ryoku-keysounds-import 2>/dev/null || echo $(CURDIR)/../../../keysounds/ryoku-keysounds-import) @@ -29,9 +31,8 @@ keysounds.so: main.cpp $(CXX) $(CXXFLAGS) $(LDFLAGS) $(EXTRA_FLAGS) main.cpp -o keysounds.so `pkg-config --cflags --libs hyprland pixman-1 libdrm libcanberra` $(MECHVIBES)/src/audio: - git init -q "$(MECHVIBES)" - git -C "$(MECHVIBES)" fetch -q --depth 1 "$(MECHVIBES_URL)" "$(MECHVIBES_COMMIT)" - git -C "$(MECHVIBES)" checkout -q FETCH_HEAD + git clone -q "$(MECHVIBES_BUNDLE)" "$(MECHVIBES)" + git -C "$(MECHVIBES)" checkout -q "$(MECHVIBES_COMMIT)" sounds: $(PROFILES) $(MECHVIBES)/src/audio rm -rf sounds