gopass icon indicating copy to clipboard operation
gopass copied to clipboard

Packaging: Winget

Open dominikschulz opened this issue 3 years ago • 16 comments

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

We should consider if we can support that.

dominikschulz avatar Jun 27 '21 07:06 dominikschulz

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

quhxl avatar Aug 16 '21 23:08 quhxl

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

dominikschulz avatar Aug 17 '21 12:08 dominikschulz

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

quhxl avatar Aug 30 '21 22:08 quhxl

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 avatar Sep 02 '21 07:09 dominikschulz

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.

dominikschulz avatar May 30 '22 18:05 dominikschulz

I can look into it tomorrow 👍🏻

AnomalRoil avatar May 30 '22 20:05 AnomalRoil

@AnomalRoil Any chance you could look into this?

dominikschulz avatar Dec 04 '22 10:12 dominikschulz

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 avatar Apr 19 '23 11:04 slokhorst

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 avatar May 06 '23 17:05 slokhorst

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.

slokhorst avatar May 06 '23 17:05 slokhorst

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

dominikschulz avatar May 08 '23 07:05 dominikschulz

@slokhorst TLS 1.2 should be available now.

dominikschulz avatar May 08 '23 11:05 dominikschulz

@dominikschulz thanks! The check is successful now.

Now we wait for a review of the PR.

slokhorst avatar May 09 '23 04:05 slokhorst

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

slokhorst avatar May 13 '23 05:05 slokhorst

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

dominikschulz avatar May 13 '23 14:05 dominikschulz

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).

dpprdan avatar Jul 18 '23 09:07 dpprdan