提交记录修改scripts/guest-os/collect-macos-sshfs-sources.mjs+3 −2看文件
修改scripts/guest-os/macos-sshfs-dependencies.json+1 −0看文件
| @@ -23,8 +23,9 @@ export function inspectDependency(name, prefix) { | ||
| 23 | 23 | const spec = lock[name]; |
| 24 | 24 | const formula = join(prefix, '.brew', `${name}.rb`); |
| 25 | 25 | const receipt = JSON.parse(readFileSync(join(prefix, 'INSTALL_RECEIPT.json'))); |
| 26 | 删除: if (sha256(formula) !== spec.formulaSha256 || receipt.source?.spec !== 'stable' || receipt.source?.versions?.stable !== spec.version) { | |
| 27 | 删除: throw new Error(`${name}: installed formula/version differs from the reviewed SSHFS dependency lock; update the source lock before building.`); | |
| 26 | 新增: const formulaDigest = sha256(formula); | |
| 27 | 新增: if (![spec.formulaSha256, ...(spec.additionalFormulaSha256 ?? [])].includes(formulaDigest) || receipt.source?.spec !== 'stable' || receipt.source?.versions?.stable !== spec.version) { | |
| 28 | 新增: throw new Error(`${name}: installed formula/version differs from the reviewed SSHFS dependency lock; actual version=${receipt.source?.versions?.stable}, formulaSHA256=${formulaDigest}. Update the source lock before building.`); | |
| 28 | 29 | } |
| 29 | 30 | // The raw receipt can contain personal paths. Keep only build identity fields. |
| 30 | 31 | const selected = Object.fromEntries(['homebrew_version', 'compiler', 'arch', 'built_as_bottle', 'poured_from_bottle', 'built_on', 'used_options', 'runtime_dependencies'].map(key => [key, receipt[key]])); |
| @@ -24,6 +24,7 @@ | ||
| 24 | 24 | "gettext": { |
| 25 | 25 | "version": "1.0", |
| 26 | 26 | "formulaSha256": "dd8d1b5914bb96c9c59140dd8cf76ad1d270f65a88111a395f79fe22106367c6", |
| 27 | 新增: "additionalFormulaSha256": ["74dbc9cbf1c427c148b5d5247adfb43957b5d02be20a4e1d162aa903f0dd614e"], | |
| 27 | 28 | "url": "https://ftp.gnu.org/gnu/gettext/gettext-1.0.tar.gz", |
| 28 | 29 | "sha256": "85d99b79c981a404874c02e0342176cf75c7698e2b51fe41031cf6526d974f1a" |
| 29 | 30 | }, |

