chore: pin the installer and write the pack event

This commit is contained in:
Abdessamad Derraz committed 2026-11-11 17:22:51 +01:00
1 parent 6e1df7b694
commit 209dc1b662
5 files changed
+89 -17

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@
# and Invoke-WebRequest throws on a cut transfer before the hash is read:
# the site's build rewrites this line there (scripts/sitebootstrap.py).
$mismatchAdvice = "The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
$defaultInstallSha256 = "26fef8daf6087201d43e1c1cb5b69e255358f38f28ca1e45782984a0240dc7d3"
$defaultInstallSha256 = "e9e2ecce0d716d7ec6035a580eb2fff1fcd207f6b323752a360d4c666afe2b9f"
# The pin above refuses any changed byte: this cap only stops a body that
# cannot be the installer (a sign-in portal's page) before it is hashed.
$maximumInstallerBytes = 8MB
+1 -1
View File
@@ -23,7 +23,7 @@ DEFAULT_INSTALL_URL="https://raw.githubusercontent.com/Abdess/retrobios/main/ins
# curl or wget stop on a cut transfer before the hash is read: the site's
# build rewrites this line there (scripts/sitebootstrap.py).
MISMATCH_ADVICE="The download was most likely cut short: try again. Within minutes of an update of this project the two files can come from caches of different ages. Waiting five minutes settles that."
DEFAULT_INSTALL_SHA256="26fef8daf6087201d43e1c1cb5b69e255358f38f28ca1e45782984a0240dc7d3"
DEFAULT_INSTALL_SHA256="e9e2ecce0d716d7ec6035a580eb2fff1fcd207f6b323752a360d4c666afe2b9f"
# The pin above refuses any changed byte: this cap only stops a body that
# cannot be the installer (a sign-in portal's page) before it is hashed.
MAX_INSTALLER_BYTES=8388608
+8 -8
View File
@@ -27,8 +27,8 @@
{
"dest": "roms/ports/retrobios/install.py",
"repo_path": "install.py",
"size": 1285762,
"sha256": "26fef8daf6087201d43e1c1cb5b69e255358f38f28ca1e45782984a0240dc7d3",
"size": 1329027,
"sha256": "e9e2ecce0d716d7ec6035a580eb2fff1fcd207f6b323752a360d4c666afe2b9f",
"executable": false
},
{
@@ -71,8 +71,8 @@
"muos": {
"archive": {
"dest": "ARCHIVE/RetroBIOS.muxapp",
"size": 1339387,
"sha256": "7060180b1a8d93573eee7a7a083a3903822743f52d8a06a9691b40a04ecbafb6"
"size": 1382652,
"sha256": "8ed6c5418093bf40bec41197b99a67c1f244100dc1eba51a83e456620fb434b4"
},
"members": [
{
@@ -92,8 +92,8 @@
{
"name": "RetroBIOS/install.py",
"repo_path": "install.py",
"size": 1285762,
"sha256": "26fef8daf6087201d43e1c1cb5b69e255358f38f28ca1e45782984a0240dc7d3",
"size": 1329027,
"sha256": "e9e2ecce0d716d7ec6035a580eb2fff1fcd207f6b323752a360d4c666afe2b9f",
"executable": false
},
{
@@ -166,8 +166,8 @@
{
"dest": ".config/modules/retrobios/install.py",
"repo_path": "install.py",
"size": 1285762,
"sha256": "26fef8daf6087201d43e1c1cb5b69e255358f38f28ca1e45782984a0240dc7d3",
"size": 1329027,
"sha256": "e9e2ecce0d716d7ec6035a580eb2fff1fcd207f6b323752a360d4c666afe2b9f",
"executable": false
},
{
+75 -4
View File
@@ -43,6 +43,7 @@
"removed",
"restored",
"backup",
"pack",
"end"
]
}
@@ -147,6 +148,9 @@
{
"$ref": "#/$defs/backup"
},
{
"$ref": "#/$defs/pack"
},
{
"$ref": "#/$defs/end"
}
@@ -178,7 +182,8 @@
"dry-run",
"list",
"remove",
"restore"
"restore",
"pack"
]
}
}
@@ -1022,7 +1027,8 @@
"dry-run",
"list",
"remove",
"restore"
"restore",
"pack"
]
},
"installed": {
@@ -1151,7 +1157,9 @@
"listed",
"made",
"deleted",
"not_deleted"
"not_deleted",
"planned",
"failed"
]
},
"choice": {
@@ -1352,7 +1360,70 @@
"listed",
"made",
"deleted",
"not_deleted"
"not_deleted",
"planned",
"failed"
]
},
"message": {
"type": "string"
}
}
},
"pack": {
"type": "object",
"additionalProperties": false,
"required": [
"event",
"platform",
"path",
"files",
"bytes",
"size",
"parts",
"status",
"message"
],
"properties": {
"event": {
"const": "pack"
},
"platform": {
"type": "string"
},
"path": {
"type": "string"
},
"files": {
"type": "integer",
"minimum": 0
},
"bytes": {
"type": "integer",
"minimum": 0
},
"size": {
"type": "integer",
"minimum": 0
},
"parts": {
"type": "array",
"items": {
"type": "string"
}
},
"status": {
"enum": [
"applied",
"written",
"unreadable",
"not_written",
"listed",
"made",
"deleted",
"not_deleted",
"planned",
"failed"
]
},
"message": {
+4 -3
View File
@@ -39,11 +39,11 @@ KEY_TYPES: dict[str, dict] = {
"folder", "dest", "system", "name", "bios_dir", "path", "member",
"list_version", "installed_version", "board", "core", "date", "moved_to",
), _TEXT),
"mode": {"enum": ["install", "check", "dry-run", "list", "remove", "restore"]},
"mode": {"enum": ["install", "check", "dry-run", "list", "remove", "restore", "pack"]},
"source": {"enum": ["remove", "install"]},
"state": {"enum": ["present", "wrong_hash", "missing"]},
"status": {"enum": ["applied", "written", "unreadable", "not_written", "listed", "made",
"deleted", "not_deleted"]},
"deleted", "not_deleted", "planned", "failed"]},
**dict.fromkeys((
"files", "files_done", "files_total", "bytes", "bytes_done", "bytes_total",
"bytes_local", "bytes_network", "size", "present", "missing", "wrong_hash",
@@ -52,7 +52,8 @@ KEY_TYPES: dict[str, dict] = {
), _COUNT),
**dict.fromkeys(("truncated", "ok", "interrupted", "required_only", "applied", "info",
"backup"), _FLAG),
**dict.fromkeys(("systems", "other_drives", "dests", "written", "choice"), _NAMES),
**dict.fromkeys(("systems", "other_drives", "dests", "written", "choice", "parts"),
_NAMES),
**dict.fromkeys(("platforms", "failed", "skipped", "left_out", "kept", "found",
"fallback"), _RECORDS),
}