You are not logged in.

#1 2016-11-16 20:27:07

darkbasic
Member
Registered: 2015-06-22
Posts: 33

Local AUR-like helper

Hi,
I currently manage my own PKGBUILDs manually, compiling them with makepkg etc... I also use pacaur, an awesome AUR helper, for AUR packages.
I would like to use an AUR-like helper for my local PKGBUILDs, like if I was going to upload my own PKGBUILDs to the AUR. Pointing the AUR-like helper to the local path (or to an external git repo) would allow fe to fetch and compile my own PKGBUILDs like if they were on the AUR. On Gentoo I achieve it with local overlays, but how can I achieve it on Arch? Note that I don't want to create a local repository with my compiled packages, I want to create a local repository with my PKGBUILDs.

Offline

#2 2016-11-17 05:04:37

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Local AUR-like helper

Not really sure what you are looking for. Any AUR helper can download whatever AUR packages you want, and you said these PKGBUILDs will be uploaded...

For managing AUR packages, see my signature... but it doesn't build the packages. I usually just use a for loop to run makepkg in each subdirectory. wink
Also, @Alad's "aurutils" helper has a bunch of standalone tools that can be used to manage a custom repo from a collection of PKGBUILDs.

...

As I understand it, Gentoo overlays are for pulling in other peoples' custom packages. There is no great trick to using the ones already on your computer.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#3 2016-11-17 13:10:26

darkbasic
Member
Registered: 2015-06-22
Posts: 33

Re: Local AUR-like helper

Eschwartz wrote:

Any AUR helper can download whatever AUR packages you want, and you said these PKGBUILDs will be uploaded...

I said "like if I was going to upload my own PKGBUILDs to the AUR" smile
I don't really want to upload the ones which will be of no use for anyone except me, so I would like to have something like a "private" AUR. I would love to have my AUR-like helper to fetch my AUR-like PKGBUILDs from a git repository or a local path and build them. Such a way it would be easier for me to commit a modification to a PKGBUILD and have it easily installed. A priority system would prevent packages from the official AUR repo to overwrite packages from your own private repo, also such a system would save a lot of time if you plan to install the same package on multiple machines and don't want to deal with the hassle of a build server.

Offline

#4 2016-11-17 14:04:47

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,523
Website

Re: Local AUR-like helper

Er ... what?

cd /path/to/stuff
makepkg -si

What else do you need?  You could make that a shell function if you really wanted:

function local_pkg() {
   cd /path/to/builds/$1
   makepkg -si
}

"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#5 2016-11-17 14:35:23

darkbasic
Member
Registered: 2015-06-22
Posts: 33

Re: Local AUR-like helper

Let me try to explain it better... Let's say I forked a couple of AUR packages and I maintain my own versions. From time to time I add some patches, I modify some build options, I force new dependencies etc.. I also want to install these packages on all my desktop PCs (home and office) and all my laptops (again home and office).
I just issued an update to my PKGBUILD, which adds a new dependency (and the PKGBUILD for such dependency) plus a small patch to make it work with the new dependency. I also switched the git branch to the "fixes" branch.
An helper would download the new PKGBUILD from the git repo, it would also download the patch and the new dependencies. Since there is a new dep it will automatically compile and install it and since I'm pulling from git it will take advantage of the cached content, simply checking out the new branch. It wuold also avoid me to repeat these tasks on all my PCs.
You can't say "it's useless, you can script everything" because AUR helpers were born exactly to script such things and if you want to script them right to handle complex cases it's an hard task (as everybody who tried to write an AUR helper knows). I'm just asking if there is an AUR-like helper which allows to automate the very same tasks for PKBUILDs in a personal git repo or in a local path.
I don't think I'm asking a stupid thing because thousands of Gentoo users face the same use case every day and Arch already has all the necessary tools to handle something similar (because a centralized AUR + AUR helpers already exist).

Offline

#6 2016-11-17 15:21:24

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: Local AUR-like helper

No, sorry. Arch workflows assume that AUR maintainers will maintain the canonical "good" version of a PKGBUILD, and no AUR helpers know how to prioritize a third layer in addition to the repos+AUR.
I guess because Gentoo has no centralized overlays (by definition), you get that for free since the Gentoo package manager already needs to know how to sort potentially dozens of overlays which might have conflicting packages. Because the AUR is centralized, there is only one version of a package (unless it was renamed).

What you can try, is customizepkg (there are a couple takes on it, in the AUR). It will allow you to patch/apply specific modifications to a PKGBUILD.
yaourt at least, knows how to use customizepkg on any packages that have been overridden (including repo packages, which will be built from the ABS).

...

What I do, is keep a local checkout of many of the AUR packages I use in /var/aur, using `git pull --rebase` to update and keep custom changes on top. yaourt won't search for updates to a package that is already up to date because it was manually built and installed. smile

Or more generally, keep your desired repo/superdirectory of PKGBUILDs... and use a for loop to run `makepkg -sri` in each subdirectory. Then, afterwards, run yaourt for non-customized packages. Optionally, help improve an AUR helper to learn how to do that.

Last edited by eschwartz (2016-11-17 15:23:34)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#7 2016-11-17 15:49:51

darkbasic
Member
Registered: 2015-06-22
Posts: 33

Re: Local AUR-like helper

Yeah there is something similar to customizepkg in Gentoo, but it's native to portage. Unfortunately it seems pacaur doesn't and will never support customizepkg: https://github.com/rmarquis/pacaur/issues/12

Offline

Board footer

Powered by FluxBB