feat: release and install rkd-activity (#1143) #7
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/1143-plugins-release-and-install-rkd-activity-pa"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
rkd-activity merged in #6 but users could only get it with a Rust toolchain: the release pipeline and install.sh only knew rkd-terminal. This makes a release build and attach rkd-activity for Linux, lets the same install.sh install it (
… | sh -s -- rkd-activity), and puts every crate on one workspace version so the next tag (v0.6.0) releases rkd-activity with the rest. No tag is pushed here; cutting v0.6.0 is the owner's call.Refs nanoya-biz/rkd#1143
Type of change
Screenshots / recording
Tooling change, so the pair is the installer's output. Same command, same fake v0.6.0 release (built with this branch's
package-release.shfrom real host builds of both plugins, served asfile://throughRKD_*_BASE_URL+RKD_*_INSECURE_TEST=1),unamefaked to Linux x86_64,*_NO_SERVICE=1. BEFORE runsgit show origin/main:install.sh; AFTER runs this branch's.BEFORE — origin/main:
install.sh | sh -s -- rkd-activityignores the argument and installs rkd-terminalAFTER — this PR: the same command installs rkd-activity, with its own settings
The installed binary is byte-identical (
cmp) to thecargo build --releaseoutput it was packaged from. The release workflow itself only runs on a tag, so there is no before/after of a real release run.What changed
[workspace.package] version = "0.5.0", each crateversion.workspace = true; rkd-activity goes 0.1.0 → 0.5.0 (Cargo.lock updated). A tagvX.Y.Zreleases all plugins at X.Y.Z, so v0.6.0 bumps rkd-activity too.release-guard.shnow checks the tag against the workspace version and refuses anylocal/*crate that sets its own. Written down in local/README.md's new Releases section and the root README's "Adding a plugin" step 4.build-linuxbuilds-p rkd-terminal -p rkd-activityin one zigbuild per target and packages + static-checks both;package-release.shtakes the plugin from the binary's file name (onlyrkd-terminal/rkd-activityaccepted). Assets:rkd-activity-<tag>-{x86_64,aarch64}-unknown-linux-musl.tar.gz+.sha256.rkd-activity installbails there (LINUX_ONLY), so a macOS build would only report null and could not run as a service.build-macosstays rkd-terminal only; install.sh refuses rkd-activity on Darwin with that reason.terminal/activityshorthands accepted, anything else refused). All guarantees are the same code path: https only, sha256 verified (fail closed without a tool), no sudo, refuses root, refuses a bin dir others can write, atomic rename, runs<plugin> install. Settings are per plugin:RKD_ACTIVITY_VERSION/_BIN/_NO_SERVICE/_BASE_URL/_INSECURE_TEST; theRKD_TERMINAL_*ones do not leak into rkd-activity. The prefix comes from a fixed case list, so theevalthat reads${VAR}_NAMEonly ever sees literals. Asking for a release older than rkd-activity says so instead of a bare download error.install-scriptjob runsscripts/test-install.sh, which now covers rkd-activity too (no workflow step change needed, comment updated).test-release.shgains workspace-version guard cases andpackage-release.shcases for both plugins.Test plan
Automated:
cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warnings(host, aarch64-apple-darwin)cargo clippy --target x86_64-pc-windows-msvc --workspace --all-targets --locked -- -D warningscargo test --workspace --lockedpasses locallyREQUIRE_SHELLCHECK=1 dash scripts/test-install.shand undersh— all checks pass (31 new checks for rkd-activity and plugin selection: install,activityshorthand, aarch64, pinned version, other plugin's version ignored, no-service, custom bin with a space, macOS refused, riscv refused with cargo hint, root refused, http refused, other plugin's insecure switch ignored, bad checksum, release without an activity build, archive holding the wrong binary, unknown plugin)REQUIRE_SHELLCHECK=1 sh scripts/test-release.sh— all checks pass;shellcheck -s sh install.sh scripts/*.shcleanRKD_TERMINAL_*(24 failures), allowing rkd-activity on Darwin, dropping the guard's per-crate check, packaging under a fixedrkd-terminalnamerelease-guard.sh v0.5.0 HEAD HEADpasses on this tree,v0.6.0is refused (version mismatch)Manual:
package-release.sh→ local fake release dir →install.sh rkd-activity→ binary installed, identical to the buildReview checklist
console.log/dbg!/ commented-out code left behindMigrations and breaking changes
test-vectors.json's activityhelloexample still says"version":"0.1.0", which is sample data, not asserted against the crate.Notes for the reviewer
Not done on purpose: no tag or release (v0.6.0 is yours: bump
[workspace.package] versionto 0.6.0, merge, tag the merge on main); systemd hardening stays deferred per the issue. Unverified until the first tag: the release workflow's real run (zigbuild of rkd-activity for aarch64 musl in particular; rkd-activity has the same dependency set as rkd-terminal minus portable-pty, so it should link the same way). Therelease-guardrefuses any futurelocal/*crate that sets its own version, which is the point but also means a new plugin must useversion.workspace = true.https://claude.ai/code/session_01S6WwLMTpMtw1RuCgBY8JGt