microsoft / winget-create

The Windows Package Manager Manifest Creator command-line tool (aka wingetcreate)
MIT License
472 stars 83 forks source link

zip Sha256 hash problem #527

Closed drshtmstry closed 3 months ago

drshtmstry commented 3 months ago

Automatic Validation ended with:

Installer Verification Analysis Context Information: Specified hash doesn't match. Actual hash: FECC3F9DD1B4072717C44476314B5C83CF66C46F81FF9A4C91E659F9080C5140 Expected hash: e1657ca239bcf53f60dd622a8476d51b8df3c2a3169f7b6082142942560627ed

3/27/2024 4:14:14 PM

Installer Validation

(Automated response - build 876.)

This seems to be a wingetcreate issue. wingetcreate adds individual file's hash (adb.exe in this case) instead of .zip file hash.

Originally posted by @drshtmstry in https://github.com/microsoft/winget-pkgs/issues/146663#issuecomment-2023211976

Trenly commented 3 months ago

I'm not able to replicate this - When I test using a zip file it seems to work

The package license |e.g. MIT License|
 [License] value is: test
The short package description
 [ShortDescription] value is: test

 Would you like to modify the optional default locale fields?: No
 Would you like to modify the optional installer fields?: No

Generating a preview of your manifests...
Version manifest preview:
# Created using wingetcreate 1.6.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.6.0.schema.json

PackageIdentifier: Test.Test
PackageVersion: 1.2.3
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.6.0

Installer manifest preview:
# Created using wingetcreate 1.6.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.6.0.schema.json

PackageIdentifier: Test.Test
PackageVersion: 1.2.3
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: platform-tools\adb.exe
  PortableCommandAlias: test
- RelativeFilePath: platform-tools\fastboot.exe
  PortableCommandAlias: test
Installers:
- InstallerUrl: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
  Architecture: x86
  InstallerSha256: FECC3F9DD1B4072717C44476314B5C83CF66C46F81FF9A4C91E659F9080C5140
ManifestType: installer
ManifestVersion: 1.6.0
drshtmstry commented 3 months ago

I'm not able to replicate this - When I test using a zip file it seems to work

The package license |e.g. MIT License|
 [License] value is: test
The short package description
 [ShortDescription] value is: test

 Would you like to modify the optional default locale fields?: No
 Would you like to modify the optional installer fields?: No

Generating a preview of your manifests...
Version manifest preview:
# Created using wingetcreate 1.6.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.version.1.6.0.schema.json

PackageIdentifier: Test.Test
PackageVersion: 1.2.3
DefaultLocale: en-US
ManifestType: version
ManifestVersion: 1.6.0

Installer manifest preview:
# Created using wingetcreate 1.6.1.0
# yaml-language-server: $schema=https://aka.ms/winget-manifest.installer.1.6.0.schema.json

PackageIdentifier: Test.Test
PackageVersion: 1.2.3
InstallerType: zip
NestedInstallerType: portable
NestedInstallerFiles:
- RelativeFilePath: platform-tools\adb.exe
  PortableCommandAlias: test
- RelativeFilePath: platform-tools\fastboot.exe
  PortableCommandAlias: test
Installers:
- InstallerUrl: https://dl.google.com/android/repository/platform-tools-latest-windows.zip
  Architecture: x86
  InstallerSha256: FECC3F9DD1B4072717C44476314B5C83CF66C46F81FF9A4C91E659F9080C5140
ManifestType: installer
ManifestVersion: 1.6.0

I used wingetcreate update Google.PlatformTools -v 35.0.1 -i command. I have also encountered same error previously when I submitted Ventoy.Ventoy zip package.

drshtmstry commented 3 months ago

@Trenly See the hash in screenshot here. image

Trenly commented 3 months ago

I see. . . Must be something specific to the update flow then