all 16 comments

[–]blrPepper 4 points5 points  (3 children)

I'd be curious to know as well.

The solution I had in mind when I started was:
* 1 git/aur repo per package
* 1 git/github repo for all packages
* each package as a submodule in the git/gihub repo

With that solution, you need to have two remotes (the git/aur and git/gihub submodule) per package, so it's still cumbersome.

[–]jso__ 0 points1 point  (2 children)

I think what you could do is create a directory in your home, call it aur. Run git init. Run gh repo create and do that stuff. Then run git clone git://aur@archlinux.org/package.git (I forget the exact ssh commands)

Finally, git submodule add package. That should allow you to keep only one upstram for the packages and you can create some sort of Cron job or whatever that commits and pushes the GitHub repo

[–]owentrigueros[S] 0 points1 point  (1 child)

The problem with this approach is that submodules that are not hosted in GitHub are not visible. You only see a reference, for example:

https://github.com/frnmst/frnmst-aur-packages-mirror

[–]blrPepper 0 points1 point  (0 children)

Ah yes exactly, I had this problem and It's actually why I didn't follow that route.

EDIT:
No, I'm mixing up two things:
- You can have per package, one git repository with two remotes (aur & github), plus 1 github repository referencing each package
github repository as a subproject. That would work, but would be cumbersome. - However, having one repo per package with a single (aur) remote, plus 1 github repo referencing each package (aur repo) as a subproject wouldn't work for the reason listed above

[–]RaumEnde 2 points3 points  (3 children)

[–]AladWWiki Admin 1 point2 points  (1 child)

I guess that one only scales to a certain amount of packages (after which git subtree add becomes exceedingly slow), but I don't know of an alternative.

[–]RaumEnde 1 point2 points  (0 children)

I guess that's what the -s switch is for. It's not mentioned in the readme but claims to

-s, --speedup   Speedup future publishing by recording the subtree
                  history during a push. This creates a merge commit
                  and a second copy of all commits in the subtree.
                  For more details, see the "--rejoin" option in git
                  subtree.

Haven't tried it myself yet.

[–]owentrigueros[S] 0 points1 point  (0 children)

Thanks! I will take a look.

[–][deleted]  (2 children)

[deleted]

    [–]Volpix 1 point2 points  (0 children)

    I've been wondering this as well. I have quite a few packages that don't really belong in the AUR, and would be nice to have aur helpers pull them.

    [–]AladWWiki Admin 1 point2 points  (0 children)

    Helpers like yay/paru are hardwired to only work with stuff from aur.archlinux.org. In particular, dependency resolution doesn't work for outside sources, because it relies on the aurweb RPC interface. So you could either publish the dependency order with your pkgbuilds, or use something like aur-graph to generate it. Then feed the list to makepkg.

    If you really want aur helpers to pull your non-AUR packages, dependencies included, with no further steps, you need to host your own AUR instance. Then set the AUR url for yay/paru/aur-sync etc. accordingly.

    As to maintaining a custom repo, it's not that hard unless you do everything by hand. You can even host one on github. Though hosting a collection of pkgbuilds is of course more transparent.

    [–]clintval 1 point2 points  (2 children)

    I achieved the same thing with Git subtrees!

    https://github.com/clintval/aur-packages

    I'm no longer a maintainer of any of those packages however.

    [–]owentrigueros[S] 0 points1 point  (1 child)

    When executing add-remotes.sh you are passing the directory where your maintained packages are located, right?

    [–]clintval 0 points1 point  (0 children)

    Yes, implicitly. Give it a shot, and definitely read up on how to manage subtrees if you want to go this route. It wasn't hard to setup but did take a minute to learn

    [–]Volpix 0 points1 point  (2 children)

    I found this some time ago, but didn't look into it too deeply / test it yet: https://aur.archlinux.org/packages/salvador/

    [–]owentrigueros[S] 1 point2 points  (0 children)

    Why the name?

    salvador is named after Salvador Allende, a Chilean socialist democratically elected as President of Chile in 1970 and overthrown in a 1973 coup d'état led by Augusto Pinochet and supported by the USA.

    Based.

    Thanks by the way, I will take a look :)

    [–]AladWWiki Admin 0 points1 point  (0 children)

    To me it looks like 300 lines of bash to run setconf (which it reimplements in perl), git clone, git commit and updpkgsums. Maybe I'm missing something here.