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

Arch Linux PKGBUILDs separation #16

Closed
pellettiero opened this issue Mar 17, 2017 · 17 comments
Closed

Arch Linux PKGBUILDs separation #16

pellettiero opened this issue Mar 17, 2017 · 17 comments

Comments

@pellettiero
Copy link

Hi, just wanted to suggest an edit for the Arch Linux PKGBUILDs.
Wouldn't it be better and cleaner if you separated the xurls package in xurls (uses the already compiled go releases from the Releases tab) and xurls-git for the latest upstream, please?
That way other users won't have to install go just to use your pretty cool piece of software. :)

Thank you!

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

Regarding xurls-git - it used to exist, but I dropped it because changes have slowed down in the past year (the tool is mostly done).

As for source vs binary - having to install go to build is perhaps unnecessary, but I'd rather have this than have a PKGBUILD that just downloads and packages a binary. I prefer source builds, and I'm sure most people do too.

After all, go isn't that heavy (~160MB) and you can delete it right after the build. And you can already download the binary on your own if you wish.

I hope my reasoning makes sense. Even if I reintroduced xurls-git, I'd still keep xurls building from source.

@pellettiero
Copy link
Author

pellettiero commented Mar 17, 2017

An alternative would be to package it under xurls-bin, and there are ways of automating it if you don't want to release two packages continuously on every commit, e.g.: https://wiki.archlinux.org/index.php/Go_package_guidelines and https://github.com/seletskiy/go-makepkg

EDIT btw I just remembered that github has a fixed link on the latest release, could be useful

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

You're absolutely right, I hadn't considered that option.

I used to host the git repo on GitHub (mvdan/aur-xurls), but stopped doing that when AUR 4.0 was deployed and it could host the repo.

I'll push it to GitHub again and you can do the PR adding the -bin version in that repo. My understanding is that this can be done in a single PKGBUILD.

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

There: https://github.com/mvdan/aur-xurls

Close this issue once you open a PR. If you don't want to do a PR, I'll have to admit that I'm too lazy to look into this and won't do it myself.

@pellettiero
Copy link
Author

pellettiero commented Mar 17, 2017

No, the PKGBUILDs should be two, xurls and xurls-git, according to the specifications, but the cool thing is that you can automate the release packaging by using specific tools.

Are you sure you don't want to change the package's name?

For example you just have to commit to GitHub as you always did, and then just launch a command that will generate the updated PKGBUILD with the changed version and everything, and you can commit that changes automatically or manually to the AUR.

Why work when you can just automate and be lazy at the same time? :)

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

Hmm, I remember seeing instances of a single PKGBUILD generating multiple packages, but I can't find the keyword for that now.

I'll look into the tool and get back.

@pellettiero
Copy link
Author

pellettiero commented Mar 17, 2017

The -git version PKGBUILD doesn't have to be updated every time because it automatically retrieves informations from the git upstream repo, such as the version or tag. There should be a guide on git packages in the wiki.

As for the normal version, you should use the tool I suggested or similar projects. Hell, you can even automate it with shell scripts, pretty nice :)

Thank you!

EDIT yep, there it is https://wiki.archlinux.org/index.php/VCS_package_guidelines

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

Wait, you're confusing me. What I was going to look into is xurls-bin, not xurls-git.

@pellettiero
Copy link
Author

ooh, ok, I may have misunderstood, could you explain better what would you like to have, please?

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

xurls tracking the latest stable and building it from source.
xurls-bin tracking the latest stable and downloading its binary from GitHub.

If I can accomplish that with small changes to my existing PKGBUILD, that's awesome. I'd rather do that than depend on a new tool to automate it, but that option is also OK.

@pellettiero
Copy link
Author

pellettiero commented Mar 17, 2017

OK, now that's clearer.
xurls's PKGBUILD should be OK, but I'm going to send a PR anyway to make sure it works without you updating the PKGBUILD every time.

As for xurls-bin (you'll have to create a new package in the AUR), you have to update its PKGBUILD every time you release a new version (in the Releases tab, the built ones) by the pkgver variable, and that's where the tool comes in, so you don't have to update it every single time, but it does it for you. You should read the README of the tool to find out how exactly it works.

Everything clear?

edit your PKGBUILD is already good actually, assuming you want to release a stable version.
That tool should take care of everything btw, play a little with it and see what you can do.
I'll send you the xurls-bin version in the meantime.

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

xurls's PKGBUILD should be OK, but I'm going to send a PR anyway to make sure it works without you updating the PKGBUILD every time.

Not sure what that PR will be like, so just file it and I'll review.

@pellettiero
Copy link
Author

I noticed that the releases are not compiled, but are just a tarball of the source code :(
Can you compile and upload the latest release, please?
Thanks

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

Oh, this is just me getting mixed up, sorry. I do this for other Go projects of mine, like: https://github.com/mvdan/sh/releases

Will upload them now.

@mvdan
Copy link
Owner

mvdan commented Mar 17, 2017

@pellettiero
Copy link
Author

Thank you!

@pellettiero
Copy link
Author

Sorry to keep you waiting!
I sent a PR here: https://github.com/mvdan/aur-xurls/pull/1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants