Skip to content
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

Distributing Qri on AUR #1094

Open
b5 opened this issue Feb 5, 2020 · 4 comments
Open

Distributing Qri on AUR #1094

b5 opened this issue Feb 5, 2020 · 4 comments
Labels
chore Changes to the build process or auxiliary tools and libraries such as documentation generation

Comments

@b5
Copy link
Member

b5 commented Feb 5, 2020

I've talked to 4 people in the past two weeks using Arch. Arch Linux users use AUR as a backing registry for pacman. It would be great if we can get the Qri CLI registered

cc @davidgasquez, who pointed me in the right direction!

In the meantime, let's get a copy of the latest binary complied for a few different linux architectures up & attached to our GitHub releases page.

@b5 b5 added the chore Changes to the build process or auxiliary tools and libraries such as documentation generation label Feb 5, 2020
@davidgasquez
Copy link

Hey there! Excited to help a bit with this one. First, you'll need to get an AUR account before doing anything so you're the maintainer and owner of the packages.

In the AUR, is common to find two versions of each Go package. For Yay, you can find yay-bin and yay-git. For popular Go packages that are already included on the official repositories, users maintain the -git package that will clone and build the tool from source(hugo-git, terraform-git, ...). There's a View PKGBUILD button on the right side of the website that will show the actual PKGBUILD that is using. The qri one will be really similar.

The Arch Wiki has a pretty extensive wiki on how to create a valid package. There's also information about Go packages and VCS. That said, I feel the leanest way to get qri there would be distributing a qri-bin using the latest Github release. Basically, that's what Yay is doing in its PKGBUILD (also kubeclt-bin). The version would need to be updated on the file manually with each new release!

In the other hand, if you want to have a qri-git, this is the summary of the steps required form the wiki:

  1. Download the source tarball of the software to package.
  2. Try compiling the package and installing it into an arbitrary directory.
  3. Copy over the prototype /usr/share/pacman/PKGBUILD.proto and rename it to PKGBUILD in a temporary working directory.
  4. Edit the PKGBUILD according to the needs of your package.
  5. Run makepkg and check whether the package builds correctly.

That's basically what is doing the yay-git PKGBUILD.

The last part is uploading the PKGBUILD following the AUR submission guidelines.

@davidgasquez
Copy link

Just found an example of publishing to AUR from the CI. Keybase is publishing their PKGBUILD to AUR using Jenkins.

@b5
Copy link
Member Author

b5 commented Feb 19, 2020

Quick update on this. I'm literally stuck waiting on an email from the AUR signup right now. The keybase example is amazing (I ❤️ their codebase very much).

Another possible route would be switching to goreleaser, and using this comment as a guide. Part of my concern is we have a number of different places to support (brew, chocolaty, etc). Feels like we need a framework here.

Whatever solution we choose, I'll keep updating here with progress on the AUR side

@feep
Copy link
Contributor

feep commented Feb 26, 2020

@davidgasquez, very thorough, thanks.

@b5, after you get AUR account, it is basically just a build chore.

Only bit to add:

In the AUR, is common to find two versions of each Go package. For Yay, you can find yay-bin and yay-git.

Sometimes, there are three. True in the case of yay as well.

  • yay: current release, builds from source
  • yay-bin: current release, installed as binary
  • yay-git: dev version, git master or such, builds from source

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Changes to the build process or auxiliary tools and libraries such as documentation generation
Projects
None yet
Development

No branches or pull requests

3 participants