lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Feat: Bring back PPA from Deprecation

Open mahyarmirrashed opened this issue 1 year ago • 11 comments

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.

mahyarmirrashed avatar Jun 22 '23 05:06 mahyarmirrashed

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

lucsmachado avatar Jul 17 '23 19:07 lucsmachado

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

jesseduffield avatar Jul 22 '23 02:07 jesseduffield

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:

  • build a .deb source package following the instructions on the Ubuntu Packaging Guide
  • create a Launchpad account and upload it
  • repeat for every release

Does anybody have familiarity with the first step?

lucsmachado avatar Jul 23 '23 18:07 lucsmachado

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 avatar Jul 23 '23 18:07 mahyarmirrashed

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.

mahyarmirrashed avatar Aug 07 '23 07:08 mahyarmirrashed

It needs access to its own files in the XDG_CONFIG_HOME location

jesseduffield avatar Aug 07 '23 11:08 jesseduffield

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.

mahyarmirrashed avatar Aug 21 '23 00:08 mahyarmirrashed

@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

jesseduffield avatar Aug 21 '23 00:08 jesseduffield

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.

mahyarmirrashed avatar Aug 21 '23 03:08 mahyarmirrashed

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/

jesseduffield avatar Aug 21 '23 07:08 jesseduffield

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?

Vortigern-The-Grey avatar Mar 22 '24 20:03 Vortigern-The-Grey