gopasspw / gopass

The slightly more awesome standard unix password manager for teams
https://www.gopass.pw/
MIT License
5.91k stars 496 forks source link

Packaging: Winget #1949

Open dominikschulz opened 3 years ago

dominikschulz commented 3 years ago

Windows is getting a new, official cli package manager: https://github.com/microsoft/winget-cli

We should consider if we can support that.

quhxl commented 3 years ago

To get the support, a silent installer without packaging in a zip file needs to be released.

dominikschulz commented 3 years ago

What is a silent installer? We don't have any installer. Can you provide any further context, links, etc.?

quhxl commented 3 years ago

An installer puts the program in the proper folder and adds the program to the registry so that it can be uninstalled through the control panel. It also adds it to the start menu and does many other things. With a silent installer, these steps are done without human input. Installers that allow this are for example msix, msi, nsis, or inno. With these the silent installation is done by a command line argument. To distribute the program on winget such an installer has to be added to the releases. This must not be in a .zip file. To be added to winget you should simply create an issue in the winget repo.

Further information: https://docs.microsoft.com/en-us/windows/package-manager/package/ or https://github.com/microsoft/winget-pkgs/blob/master/README.md and https://docs.microsoft.com/en-us/windows/msix/overview

dominikschulz commented 3 years ago

Ok, thanks a lot. That helps partly. But I still have no idea how this can work with our release process and Linux-based infrastructure.

Maybe some familiar with these things on Windows could help out here.

I hear people are successfully using gopass and Windows and I'd love to make it as convenient as possible for them, but personally I don't use Windows.

dominikschulz commented 2 years ago

I've prepared an example in https://github.com/dominikschulz/winget-pkgs/tree/gopass but it turns out I can't contribute to that repo myself.

So if anyone could take care of getting that into winget-pkgs that'd be great.

AnomalRoil commented 2 years ago

I can look into it tomorrow 👍🏻

dominikschulz commented 1 year ago

@AnomalRoil Any chance you could look into this?

slokhorst commented 1 year ago

This would be much appreciated! Is there anything holding this back? Does the package at https://github.com/dominikschulz/winget-pkgs/tree/gopass need additional testing or can we just open a PR at microsoft/winget-pkgs?

slokhorst commented 1 year ago

I've updated @dominikschulz 's manifest and submitted it as PR: https://github.com/microsoft/winget-pkgs/pull/106108

If it gets accepted, it would probably be useful to update the manifest automatically when a new version is released via the CI/CD pipeline, see https://github.com/microsoft/winget-create#using-windows-package-manager-manifest-creator-in-a-cicd-pipeline

Also, not really related to winget but more to Windows packaging in general, while testing, I noticed that the MSI installer puts the binary in %LOCALAPPDATA%\gopass\gopass.exe ($env:LOCALAPPDATA\gopass\gopass.exe for PowerShell), but is not automatically added to the PATH. I'm not very familiar with Windows packaging so I'm not sure what possible here.

slokhorst commented 1 year ago

Hmm, the PR isn't passing the automated check, because https://www.gopass.pw/ apparently doesn't support TLS 1.2 but TLS 1.3 only.

dominikschulz commented 1 year ago

@slokhorst Thanks! I think we can allow TLS 1.2, but that's so weird that they still don't support 1.3 ...

dominikschulz commented 1 year ago

@slokhorst TLS 1.2 should be available now.

slokhorst commented 1 year ago

@dominikschulz thanks! The check is successful now.

Now we wait for a review of the PR.

slokhorst commented 1 year ago

The PR has been merged so you can now install gopass on Windows with:

winget install gopass.gopass

I've opened a PR to mention this in the readme: https://github.com/gopasspw/gopass/pull/2591

Next up: update the winget manifest automatically when a new version is released via the CI/CD pipeline, see https://github.com/microsoft/winget-create#using-windows-package-manager-manifest-creator-in-a-cicd-pipeline

dominikschulz commented 1 year ago

@slokhorst Nice, thanks a lot! Let's keep this issue open to follow up on the release integration.

dpprdan commented 1 year ago

goreleaser recently gained winget support

see chezmoi for an implementation example (note that chezmoi uses a portable install (i.e. zip files), not an msi installer).