Don't include hash for Chrome for Windows due to non-pinned installer URL (#27755)

- [x] Manual QA for all new/changed functionality
This commit is contained in:
Ian Littman
2025-04-03 15:24:14 -05:00
committed by GitHub
parent 41e5ba4776
commit 2811b2b4c6
3 changed files with 9 additions and 3 deletions
@@ -274,7 +274,10 @@ func (i *wingetIngester) ingestOne(ctx context.Context, input inputApp) (*mainta
out.Slug = input.Slug
out.InstallerURL = selectedInstaller.InstallerURL
out.UniqueIdentifier = input.UniqueIdentifier
out.SHA256 = strings.ToLower(selectedInstaller.InstallerSha256) // maintain consistency with darwin outputs SHAs
out.SHA256 = "no_check"
if !input.IgnoreHash {
out.SHA256 = strings.ToLower(selectedInstaller.InstallerSha256) // maintain consistency with darwin outputs SHAs
}
out.Version = m.PackageVersion
publisher := l.Publisher
if input.ProgramPublisher != "" {
@@ -347,6 +350,8 @@ type inputApp struct {
ProgramPublisher string `json:"program_publisher"`
UninstallType string `json:"uninstall_type"`
FuzzyMatchName bool `json:"fuzzy_match_name"`
// Whether to use "no_check" instead of the app's hash (e.g. for non-pinned download URLs)
IgnoreHash bool `json:"ignore_hash"`
}
type installerManifest struct {
@@ -5,5 +5,6 @@
"unique_identifier": "Google Chrome",
"installer_arch": "x64",
"installer_type": "msi",
"installer_scope": "machine"
"installer_scope": "machine",
"ignore_hash": true
}
@@ -8,7 +8,7 @@
"installer_url": "https://dl.google.com/dl/chrome/install/googlechromestandaloneenterprise64.msi",
"install_script_ref": "8959087b",
"uninstall_script_ref": "0a9e57c0",
"sha256": "26dc7c6c7c665c69e371afeebe12a1cf49ce395ba03eb0bfd644cef85de2ef5e"
"sha256": "no_check"
}
],
"refs": {