jesseduffield / lazygit

simple terminal UI for git commands
MIT License
51.54k stars 1.81k forks source link

Feat: Bring back PPA from Deprecation #2736

Open mahyarmirrashed opened 1 year ago

mahyarmirrashed commented 1 year ago

Is your feature request related to a problem? Please describe. I'm really frustrated that there is not a way to have a PPA or something on apt for Ubuntu people. I have to use Ubuntu at work and it's annoying having to install it from source and not having it automatically checking for updates.

Describe the solution you'd like I would like a PPA to be brought back from deprecation and become a valid installation mechanism.

Describe alternatives you've considered I tried installing it with go but, that was cumbersome and I did not like that go installed itself in my home directory. Also, even after I ran go install, the binary was not showing up.

Additional context I would be open to helping maintaining and adding the PPA for this repo if I could have some guidance. I've never done it before but, I would be open to trying it.

lucsmachado commented 1 year ago

Would also be interested and available to help maintain the PPA for this repo.

jesseduffield commented 1 year ago

I'm in favour, though I have zero experience with PPA stuff!

lucsmachado commented 1 year ago

I'm poking around the docs for Launchpad (Ubuntu's platform for creating and distributing PPAs), and it looks doable. Apparently we would need to:

Does anybody have familiarity with the first step?

mahyarmirrashed commented 1 year ago

I'm currently in the process of doing some .deb packaging for my stuff at work. I can update in a few days based on what I learn there.

mahyarmirrashed commented 1 year ago

Okay, so I've sort of learned how to do it. At my workplace, we're using PyBuilder. That needs a .bld file and a .pof file for configuring how Debian should be created.

For the Debian itself, we need to define the post-installation steps with a postinst file and how to remove it with a prerm file. I don't imagine LazyGit needs access to any sort of storage to store files right? If it does, there might be some additional configuration that would be needed.

jesseduffield commented 1 year ago

It needs access to its own files in the XDG_CONFIG_HOME location

mahyarmirrashed commented 1 year ago

I looked into it some more and there be an easier solution with debuild: https://blog.packagecloud.io/buildling-debian-packages-with-debuild/. This is what the rpi-imager project is doing: https://github.com/raspberrypi/rpi-imager We just have to configure ours to do something similar. I will try that out. How does the build process for the changes in this project work? I am assuming that the process is that we would build the latest on every change in this GitHub project and then get it published to launchpad somehow for deployment. I am also not certain on what the process is to get it included in the default repositories rather than having it as a PPA but, one step at a time.

jesseduffield commented 1 year ago

@mahyarmirrashed if you can it would be good to trigger a new release based on new tags starting with 'v' e.g. 'v0.20.0'. Basing it off the master branch also works but will be less stable

mahyarmirrashed commented 1 year ago

I'm pretty sure that we can do that. I will verify when implementing, but, I think that is an option in GitHub actions to only run the workflow if the tag is prefixed with something if we have added a new tag. It'll probably be nice to have a folder in the .github/workflows folder for all the package creation workflows. And, in the root of the project, to hold all the package creation dependencies (e.g. like the debian folder required for creating Debians.

jesseduffield commented 1 year ago

That sounds reasonable to me.

FWIW goreleaser (which we're already using for homebrew) supports linux packages (though I'm not well-versed enough in linux to know if PPAs are included) https://goreleaser.com/customization/nfpm/

Vortigern-The-Grey commented 6 months ago

If a ppa does end up getting built, would it be possible for the straight .deb files to be made available, for us on Debian and derivatives? Also, could arm64 .deb files be included in this process?

omnicortex commented 3 weeks ago

+1

mahyarmirrashed commented 3 weeks ago

Looking at this again, this seems like the most Kosher way to do this: https://github.com/Debian/dh-make-golang?tab=readme-ov-file