diff --git a/tests/test_site_r3_wiki.py b/tests/test_site_r3_wiki.py index 8804d314..6a06f1ce 100644 --- a/tests/test_site_r3_wiki.py +++ b/tests/test_site_r3_wiki.py @@ -198,8 +198,9 @@ class SetupsWithoutAPage(unittest.TestCase): for words in ("--dest", "ES-DE", "LaunchBox", "iPhone"): with self.subTest(words=words): self.assertIn(words, section) - # No folder is written: the copy names none it cannot cite. - self.assertNotRegex(section, r"[~/\\][A-Za-z]") + # No folder is written: the copy names none it cannot cite. Link + # targets are pages of this site, not folders. + self.assertNotRegex(re.sub(r"\]\([^)]*\)", "]", section), r"[~/\\][A-Za-z]") def test_the_installer_fills_the_emulators_a_launcher_starts(self): installer = _flat(_wiki("installer.md")) @@ -234,11 +235,12 @@ class ExitStatusAndPinnedInstaller(unittest.TestCase): with self.subTest(field=field): self.assertIn(f'"{field}"', fields) - def test_a_packager_pins_installer_and_lists_to_one_tag(self): + def test_a_packager_pins_installer_and_lists_to_one_commit(self): + # No release carries the installer yet: the section pins a commit. section = _section(self.text, "One line") - self.assertIn("releases/download/", section) + self.assertIn("raw.githubusercontent.com/Abdess/retrobios/$commit", section) self.assertIn("$base/install.py", section) - self.assertIn("RETROBIOS_REF=", section) + self.assertIn("RETROBIOS_REF=$commit", section) self.assertIn('os.environ.get("RETROBIOS_REF"', self.source) diff --git a/tests/test_site_r4_wiki.py b/tests/test_site_r4_wiki.py index af97a7c3..ec3d4aa1 100644 --- a/tests/test_site_r4_wiki.py +++ b/tests/test_site_r4_wiki.py @@ -262,15 +262,18 @@ class PinnedInstaller(unittest.TestCase): self.assertIn(f"dist/{name}", upload) self.assertIn("install/*.json", upload) - def test_the_installer_page_names_the_release_addresses(self): + def test_the_installer_page_pins_one_commit(self): + # v2026.10.10 carries no install.py: until a release does, the + # section pins a commit, never a release address. text = _wiki("installer.md") section = _flat(_section(text, "For packagers")) - for words in ("releases/download/", "--manifest retroarch.json", - "sha256sum --check", "SHA256SUMS.txt", "releases/latest/download/", - "release-process.md#verifying-a-release"): + for words in ("raw.githubusercontent.com/Abdess/retrobios/$commit", + '"$base/install/retroarch.json"', "--manifest retroarch.json", + "sha256sum --check", "RETROBIOS_REF=$commit"): with self.subTest(words=words): self.assertIn(words, section) - self.assertNotIn("raw.githubusercontent.com/Abdess/retrobios//install.py", text) + self.assertNotIn("releases/download/", section) + self.assertNotIn("releases/latest/download/", section) terms = _front(text)["terms"] for word in ("manifest", "events", "exit code", "schema"): with self.subTest(term=word): diff --git a/wiki/installer.md b/wiki/installer.md index 63c0693d..29916557 100644 --- a/wiki/installer.md +++ b/wiki/installer.md @@ -1,7 +1,7 @@ --- level: setup order: 100 -terms: manifest, events, exit code, schema +terms: manifest, events, exit code, schema, packager, pin, reproducible --- # All installer options @@ -47,24 +47,21 @@ python install.py ### For packagers { #for-packagers } A package that must not change under its users takes the installer and its -file list from one release. Each release carries `install.py`, `install.sh`, -`install.ps1` and the file list of every platform (`retroarch.json` and the -others from `install/`), all listed in the signed `SHA256SUMS.txt`: +file list from one commit. `install.sh` of that commit pins the SHA-256 of its +`install.py`, and `RETROBIOS_REF` makes the installer download every file from +the same commit: ```bash -base=https://github.com/Abdess/retrobios/releases/download/ -curl -fsSLO "$base/install.py" -O "$base/retroarch.json" -O "$base/SHA256SUMS.txt" -sha256sum --check --ignore-missing SHA256SUMS.txt -RETROBIOS_REF= python3 install.py --manifest retroarch.json +commit= +base=https://raw.githubusercontent.com/Abdess/retrobios/$commit +curl -fsSLO "$base/install.py" -O "$base/install/retroarch.json" +pin=$(curl -fsSL "$base/install.sh" | sed -n 's/^DEFAULT_INSTALL_SHA256="\(.*\)"$/\1/p') +echo "$pin install.py" | sha256sum --check +RETROBIOS_REF=$commit python3 install.py --manifest retroarch.json ``` -For contributors: [Verifying a release](release-process.md#verifying-a-release) -checks the signature of the list. Each release deletes the previous tag and its assets, -so `releases/latest/download/install.py` and the other files under -`releases/latest/download/` are the stable addresses: they serve the latest -release, whose `SHA256SUMS.txt` names the bytes. v2026.10.10 and the releases -before it carry neither the installer nor the file lists. What `RETROBIOS_REF` -does not pin is listed under [Environment overrides](#environment-overrides). +What `RETROBIOS_REF` does not pin is listed under +[Environment overrides](#environment-overrides). ## Passing options