feat: make packs reproducible byte for byte

Two builds of the same pack from the same inputs produced different
archives. Of 67 members, 65 were already identical: only README.txt
and manifest.json differed, both stamped with the wall clock by
writestr and the second carrying a generated timestamp. Generated
members now use the epoch the archive rebuilder already applies, and
the timestamp comes from the database snapshot the pack was built
from, so the same data yields the same bytes.

Install manifests skipped archived platforms, which is why RetroPie
had none; archived means upstream is no longer scraped, not that the
packs stopped shipping. A target-filtered manifest also had no record
of its filter beyond the filename, so it carries one the way a
region-filtered manifest already does.
This commit is contained in:
Abdessamad Derraz committed 2026-08-11 00:55:42 +02:00
1 parent dc14089932
commit 24e9b820ae
3 files changed
+370 -63

No files matched your search

+181 -35
View File
@@ -4,37 +4,136 @@
"title": "RetroBIOS installer manifest",
"type": "object",
"additionalProperties": false,
"required": ["manifest_version", "source", "regions", "platform", "display_name", "version", "generated", "base_destination", "detect", "standalone_copies", "total_files", "total_size", "total_omitted", "omitted_files", "files"],
"required": [
"manifest_version",
"source",
"regions",
"platform",
"display_name",
"version",
"generated",
"base_destination",
"detect",
"standalone_copies",
"total_files",
"total_size",
"total_omitted",
"omitted_files",
"files"
],
"properties": {
"manifest_version": { "const": 2 },
"source": { "enum": ["full", "platform", "truth"] },
"regions": { "type": "array", "items": { "type": "string" }, "uniqueItems": true },
"platform": { "type": "string", "minLength": 1 },
"display_name": { "type": "string", "minLength": 1 },
"version": { "type": "string" },
"generated": { "type": "string", "format": "date-time" },
"base_destination": { "type": "string" },
"detect": { "type": "array", "items": { "type": "object" } },
"standalone_copies": { "type": "array", "items": { "type": "object" } },
"total_files": { "type": "integer", "minimum": 0 },
"total_size": { "type": "integer", "minimum": 0 },
"total_omitted": { "type": "integer", "minimum": 0 },
"manifest_version": {
"const": 2
},
"source": {
"enum": [
"full",
"platform",
"truth"
]
},
"regions": {
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
},
"target": {
"type": "string",
"minLength": 1,
"description": "Hardware target this manifest was filtered for; absent when unfiltered"
},
"platform": {
"type": "string",
"minLength": 1
},
"display_name": {
"type": "string",
"minLength": 1
},
"version": {
"type": "string"
},
"generated": {
"type": "string",
"format": "date-time"
},
"base_destination": {
"type": "string"
},
"detect": {
"type": "array",
"items": {
"type": "object"
}
},
"standalone_copies": {
"type": "array",
"items": {
"type": "object"
}
},
"total_files": {
"type": "integer",
"minimum": 0
},
"total_size": {
"type": "integer",
"minimum": 0
},
"total_omitted": {
"type": "integer",
"minimum": 0
},
"omitted_files": {
"type": "array",
"items": {
"type": "object",
"additionalProperties": false,
"required": ["dest", "name", "system", "required", "reason", "cores"],
"required": [
"dest",
"name",
"system",
"required",
"reason",
"cores"
],
"properties": {
"dest": { "type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$" },
"name": { "type": "string", "minLength": 1 },
"system": { "type": "string" },
"required": { "type": "boolean" },
"reason": { "enum": ["hash_mismatch", "not_found", "external", "user_provided"] },
"dest": {
"type": "string",
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"
},
"name": {
"type": "string",
"minLength": 1
},
"system": {
"type": "string"
},
"required": {
"type": "boolean"
},
"reason": {
"enum": [
"hash_mismatch",
"not_found",
"external",
"user_provided"
]
},
"cores": {
"oneOf": [
{ "type": "null" },
{ "type": "array", "items": { "type": "string" }, "uniqueItems": true }
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
]
}
}
@@ -45,27 +144,74 @@
"items": {
"type": "object",
"additionalProperties": false,
"required": ["dest", "sha1", "sha256", "size", "repo_path", "cores"],
"required": [
"dest",
"sha1",
"sha256",
"size",
"repo_path",
"cores"
],
"properties": {
"dest": { "type": "string", "pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$" },
"sha1": { "type": "string", "pattern": "^[a-f0-9]{40}$" },
"sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" },
"size": { "type": "integer", "minimum": 0 },
"repo_path": { "type": "string" },
"dest": {
"type": "string",
"pattern": "^(?!/)(?!.*(?:^|/)\\.\\.(?:/|$)).+$"
},
"sha1": {
"type": "string",
"pattern": "^[a-f0-9]{40}$"
},
"sha256": {
"type": "string",
"pattern": "^[a-f0-9]{64}$"
},
"size": {
"type": "integer",
"minimum": 0
},
"repo_path": {
"type": "string"
},
"cores": {
"oneOf": [
{ "type": "null" },
{ "type": "array", "items": { "type": "string" }, "uniqueItems": true }
{
"type": "null"
},
{
"type": "array",
"items": {
"type": "string"
},
"uniqueItems": true
}
]
},
"storage": { "const": "release" },
"release_asset": { "type": "string", "pattern": "^[^/\\\\]+$" }
"storage": {
"const": "release"
},
"release_asset": {
"type": "string",
"pattern": "^[^/\\\\]+$"
}
},
"oneOf": [
{ "required": ["release_asset"] },
{
"properties": { "repo_path": { "type": "string", "pattern": "^bios/" } },
"not": { "required": ["release_asset"] }
"required": [
"release_asset"
]
},
{
"properties": {
"repo_path": {
"type": "string",
"pattern": "^bios/"
}
},
"not": {
"required": [
"release_asset"
]
}
}
]
}