-
Notifications
You must be signed in to change notification settings - Fork 14
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
[feature] self upgrading release binary #50
Comments
I do not know of any distributions that ships go-passbolt-cli in their repositories, which is why i always planned to provide my own deb and rpm repositories for easy updates but got stalled due to my limited time and low demand. Would having generic deb and rpm repositories solve your Issue? I think building an Updater from Scratch would be quite complex since it would also need to handle things like man pages and shell completions. The security implications would also have to be considered. |
i have initially found this lib which can do the heavy lifing (also includes security aspects like checksum verification) https://github.com/creativeprojects/go-selfupdate
yes, it would. But it also implies user should add custom repos to their system |
I don't see how that library can update additional files like man pages or shell completions (maybe i missed it?). Also if anything goes wrong and can't start it anymore there is no possibility to downgrade again. I generally dislike the Windows Style Self updating. I don't see adding custom repositories as such a big deal (you also have to do that if you are installing the passbolt server). go-passbolt-cli Simply is not big enough to be included in distros. I tried to avoid having to add custom repos by looking into packaging the CLI as a Flatpak instead but their CLI Support has "Issues" we would have to work around flatpak/flatpak#1188 . |
Yes, The lib i shared does not handle man pages & shell completions.
yes, flatpaks are not ideal for CLIs. We have to add an alias & no support for man pages AFAIK |
In the meantime, go-passbolt-cli has been added as a nixpkg https://search.nixos.org/packages?channel=24.05&show=go-passbolt-cli&from=0&size=50&sort=relevance&type=packages&query=go-passbolt-cli |
I have also packaged for opensuse tumbleweed https://build.opensuse.org/request/show/1181068 It takes a few days to land in the main repositories! |
Cool, i will add that to the Readme once it has been released |
Sure, i will let you know |
@speatzle Now accepted to opensuse tumbleweed! https://build.opensuse.org/package/show/openSUSE:Factory/go-passbolt-cli |
It might also reflect here https://repology.org/project/go:passbolt-cli/versions shortly |
Cool, i will give it a spin this weekend. |
btw is this project still community driven or made official ? since i set the disclaimer in pkg info as well
|
Yes, this Project is still Community Driven. |
Hey @kskarthik It Seems to work well but both shell completions and man pages seem to be missing making it hard to use, could you add those to the package? You can see how to generate them here: https://github.com/passbolt/go-passbolt-cli/blob/main/.github/workflows/.release.yml |
Sure, I will |
just added shell completions & man page support https://build.opensuse.org/package/rdiff/security:privacy/go-passbolt-cli?opackage=go-passbolt-cli&oproject=openSUSE%3AFactory&rev=4 Will reflect in tumbleweed in a few days |
do you have the
|
Yes, it was installed automatically:
|
ok, https://build.opensuse.org/projects/openSUSE:Factory/packages/go-passbolt-cli/files/go-passbolt-cli.spec?expand=1 L94 is where the bash completions go |
i can see the bash completions listed. do you find any anomaly?
|
should the completions match the binary name ? |
Moving to file to match the binary name and restarting bash fixed it for me
|
ok, i will correct it upstream too |
The idea is to have similar feature to
deno upgrade
&bun upgrade
in which the user can upgrade the existing binary using a cli flag.This will be a useful feature for many users whose distributions which always do not ship with latest versions of the cli
I wish to work on this patch if we can agree on implementing such feature.
The text was updated successfully, but these errors were encountered: