From e6c9069e0bfbb0fa30d3799fc4fcbe782edfc72b Mon Sep 17 00:00:00 2001 From: soubarnak Date: Fri, 6 Nov 2026 09:42:12 +0530 Subject: [PATCH] fix(void): use concrete release-download URL for xbps client registration Replace the self-referential placeholder in the root README, the release-notes template, and the Void packaging README with the concrete per-tag download prefix the build-xbps job attaches the signed repo to. Static docs default TAG to the current version; release.yml renders github.ref_name at publish time. Fixes #29 --- .github/workflows/release.yml | 2 +- README.md | 3 ++- packaging/void/README.md | 3 ++- tests/test_void_signed_repo.py | 31 +++++++++++++++++++++++++++++++ 4 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ca8c10..5f386f1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -298,7 +298,7 @@ jobs: ```bash # as root (the files come from this release's assets): cp .plist /var/db/xbps/keys/ - echo 'repository=' > /etc/xbps.d/voculinux.conf + echo 'repository=https://github.com/${{ github.repository }}/releases/download/${{ github.ref_name }}/' > /etc/xbps.d/voculinux.conf sudo xbps-install -Sy voculinux ``` Answer `Y` at the fingerprint prompt only after checking it diff --git a/README.md b/README.md index 9cb2986..c177c8d 100644 --- a/README.md +++ b/README.md @@ -250,7 +250,8 @@ templates in `packaging/void/srcpkgs/`. Details: [packaging/void/README.md](pack ```bash # as root on the Void system (the files come from the release assets): cp .plist /var/db/xbps/keys/ -echo 'repository=' > /etc/xbps.d/voculinux.conf +TAG=v0.18.5 # match the release you install from +echo "repository=https://github.com/VocaHQ/vocalinux/releases/download/${TAG}/" > /etc/xbps.d/voculinux.conf ``` Prefer the release notes for the exact repository URL. On first sync, diff --git a/packaging/void/README.md b/packaging/void/README.md index 56f076a..61827fb 100644 --- a/packaging/void/README.md +++ b/packaging/void/README.md @@ -172,7 +172,8 @@ openssl genrsa -out xbps-sign-key.pem 4096 ```sh # as root on the Void system (the release notes carry the repo URL): cp .plist /var/db/xbps/keys/ -echo 'repository=' > /etc/xbps.d/voculinux.conf +TAG=v0.18.5 # match the release you install from +echo "repository=https://github.com/VocaHQ/vocalinux/releases/download/${TAG}/" > /etc/xbps.d/voculinux.conf xbps-install -Sy voculinux ``` diff --git a/tests/test_void_signed_repo.py b/tests/test_void_signed_repo.py index ffde3e6..1b57dde 100644 --- a/tests/test_void_signed_repo.py +++ b/tests/test_void_signed_repo.py @@ -266,6 +266,37 @@ def test_release_workflow_attaches_signed_repo_to_release() -> None: assert marker in text, f"the xbps job must attach {marker} to the release" +#: Concrete release-download prefix every client snippet must name. The +#: xbps job attaches the signed repo flat to the tag release with +#: ``gh release upload "${{ github.ref_name }}"``, so the repository URL is +#: the per-tag download prefix below. +CONCRETE_REPO_DOWNLOAD = "https://github.com/VocaHQ/vocalinux/releases/download/" + + +def test_client_registration_names_concrete_repo_url() -> None: + """No self-referential placeholder: every client snippet names the + concrete release-download URL the xbps job attaches the repo to.""" + workflow = _release_workflow_text() + root = ROOT_README.read_text(encoding="utf-8") + void_readme = README.read_text(encoding="utf-8") + for name, text in ( + ("release.yml", workflow), + ("README.md", root), + ("packaging/void/README.md", void_readme), + ): + assert ( + "" not in text + ), f"{name} still carries the self-referential repo-URL placeholder" + assert "repository=<" not in text, f"{name} still carries a placeholder repository URL" + assert CONCRETE_REPO_DOWNLOAD in root, "root README must name the concrete release download URL" + assert ( + CONCRETE_REPO_DOWNLOAD in void_readme + ), "void README must name the concrete release download URL" + assert ( + "releases/download/${{ github.ref_name }}" in workflow + ), "release.yml must render the concrete per-tag download URL at publish time" + + def test_root_readme_registers_the_void_repo() -> None: """Root README: Void install from the signed repo, not just the track README.""" text = ROOT_README.read_text(encoding="utf-8")