Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🤖 Add bindiff.vm #970

Merged
merged 1 commit into from
Apr 3, 2024
Merged

🤖 Add bindiff.vm #970

merged 1 commit into from
Apr 3, 2024

Conversation

vm-packages
Copy link
Contributor

Automated PR from #969 🚀

@vm-packages vm-packages added the 🆕 package New package request/idea/PR label Apr 1, 2024
@emtuls emtuls force-pushed the package-bindiff branch 2 times, most recently from ba6e58f to 38c392d Compare April 2, 2024 03:34
@emtuls
Copy link
Member

emtuls commented Apr 2, 2024

This PR also includes a few changes and additions to common.vm:

There were a few things missing from VM-Uninstall-With-Uninstaller:

  • Removing the shortcut
  • Removing the toolDir from $RAW_TOOLS_DIR.
  • Updated an argument to be more consistent with other functions: softwareName was renamed to toolName.

I added an automatic icon finder for MSI files (VM-Get-MSIInstallerPathByProductName), which is the only way to get the .ico for bindiff automatically unless we package the .ico ourselves.

  • This is used inside of VM-Install-With-Installer when the function is called with $fileType = 'MSI'.
  • Also added the ability to add a path to an iconLocation via argument to VM-Install-With-Installer, but this wasn't necessary for bindiff, since I could grab it from the installer.

I wasn't able to add the automatic icon finder functionality to VM-Install-Shortcut because it didn't exactly make sense there based on how we currently use it.

  • It would need to know that we were using an MSI file to install the tool, which isn't something that it currently can do.
  • $executablePath would likely be an .exe, and in the case of BinDiff, it's actually a completely different file type, so this won't work.

@emtuls emtuls requested a review from Ana06 April 2, 2024 03:44
@emtuls emtuls force-pushed the package-bindiff branch from 38c392d to c2ca595 Compare April 2, 2024 03:48
@emtuls emtuls self-assigned this Apr 2, 2024
@emtuls emtuls linked an issue Apr 2, 2024 that may be closed by this pull request
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have tried to install this package locally (after a reboot) and I get the following error:

Chocolatey v2.2.2
Attempting to build package from 'bindiff.vm.nuspec'.
Successfully created package 'C:\Users\flare\Desktop\built_pkgs\bindiff.vm.8.0.0.20240401.nupkg'
Upgrading the following packages:
bindiff.vm
By upgrading, you accept licenses for the packages.

bindiff.vm v8.0.0.20240401 (forced)
bindiff.vm package files upgrade completed. Performing other installation steps.
Downloading bindiff.vm
  from 'https://github.com/google/bindiff/releases/download/v8/bindiff8.msi'

Download of bindiff8.msi (68.89 MB) completed.
Hashes match.
C:\Tools\BinDiff\bindiff8.msi
Installing bindiff.vm...
WARNING: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\bindiff.vm_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error.
2024/04/02 14:09:07 [bindiff.vm] vm.common.psm1 [+] ERROR : Running ["C:\Windows\System32\msiexec.exe" /i "C:\Tools\BinDiff\bindiff8.msi" /qn /norestart ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\bindiff.vm_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
At C:\ProgramData\chocolatey\helpers\functions\Start-ChocolateyProcessAsAdmin.ps1:379 char:9
+         throw "Running [`"$exeToRun`" $wrappedStatements] was not suc ...
+         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ERROR: Running ["C:\Windows\System32\msiexec.exe" /i "C:\Tools\BinDiff\bindiff8.msi" /qn /norestart ] was not successful. Exit code was '1603'. Exit code indicates the following: Generic MSI Error. This is a local environment error, not an issue with a package or the MSI itself - it could mean a pending reboot is necessary prior to install or something else (like the same version is already installed). Please see MSI log if available. If not, try again adding '--install-arguments="'/l*v c:\bindiff.vm_msi_install.log'"'. Then search the MSI Log for "Return Value 3" and look above that for the error..
The upgrade of bindiff.vm was NOT successful.
Error while running 'C:\ProgramData\chocolatey\lib\bindiff.vm\tools\chocolateyinstall.ps1'.
 See log for details.

Chocolatey upgraded 0/1 packages. 1 packages failed.
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).

Failures
 - bindiff.vm (exited 1603) - Error while running 'C:\ProgramData\chocolatey\lib\bindiff.vm\tools\chocolateyinstall.ps1'.
 See log for details.

@emtuls
Copy link
Member

emtuls commented Apr 2, 2024

Interesting...I did not run into that issue at all. I will look into it, but I'm not sure how effective my testing will be if I can't hit that case.

@emtuls emtuls force-pushed the package-bindiff branch from c2ca595 to e38e1a6 Compare April 2, 2024 18:36
@emtuls
Copy link
Member

emtuls commented Apr 2, 2024

I was able to reproduce the error. It seems that a reboot had installed the MS Redistributable packages and uninstalling them and attempting to install BinDiff produced this error.

I will add that as a requirement. :)

@emtuls emtuls force-pushed the package-bindiff branch from e38e1a6 to a342301 Compare April 2, 2024 19:38
Copy link
Member

@Ana06 Ana06 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It install now correctly for me, thanks @emtuls!

@Ana06 Ana06 merged commit f75d0df into main Apr 3, 2024
6 checks passed
@Ana06
Copy link
Member

Ana06 commented Apr 3, 2024

@emtuls you have added several new packages recently. Do you think we should add them to the default configuration please send a PR in flare-vm 😉

@emtuls emtuls deleted the package-bindiff branch April 3, 2024 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🆕 package New package request/idea/PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Package proposal: bindiff.vm
3 participants