paru icon indicating copy to clipboard operation
paru copied to clipboard

[Feature Request] Work with custom `PKGBUILD`s

Open stevenxxiu opened this issue 3 years ago • 8 comments

Have you checked the readme and man page for this feature? Yes.

Have you checked previous issues for this feature? Yes.

Besides the packages that I installed in AUR, I also have some custom Git packages that aren't in the AUR. (The reason they aren't, is because they're packages with some custom patches of mine, so I don't think they're applicable to everyone.)

I used to have a Python script that just checks if these packages are out-of-date, and updates them if they are. But I think it's much more convenient to use Paru for this instead.

I symlinked my custom packages into ~/.cache/paru/clone/, and updated ~/.cache/paru/devel.json. I discovered today that Paru doesn't appear to check updates for these packages despite there being an update in the package's Git repo.

Debugging this, it appears that Paru did indeed see an update and put it in the updates variable in devel.rs's possible_devel_updates(). However it seems that the function filter_devel_updates() in devel.rs removes any non-AUR package.

Can there be a way to allow Paru to include custom PKGBUILDs, and upgrade those packages too?

I quite love Paru, thanks for making it!

stevenxxiu avatar Nov 12 '21 14:11 stevenxxiu

Paru can only check updates from the aur. Supporting external sutff is out of scope and won't be implemented unless maybe it can be done in a clean way that integrates well.

Morganamilo avatar Nov 15 '21 10:11 Morganamilo

Here I'm just interested with Git packages. So I just need to pretend the package is in the AUR.

Correct me if I'm wrong, but I think this will be fine if filter_devel_updates() doesn't trim any package if it's not in the AUR. I think then the modification to Paru is really quite small.

Would that be alright?

stevenxxiu avatar Nov 15 '21 10:11 stevenxxiu

For starters paru relies on the aur metadata to get info about a package.

-U can deal with pkgbuilds but it's special cased. I would like to make that more general at some point. That would have to be done first.

Morganamilo avatar Nov 15 '21 11:11 Morganamilo

So this is a milestone for v2, which is still a while off. But as of now this is basically fully functional in paru-git

Add:

[REPONAME]
Git = https://github.com/user/pkgbuilds/

To your paru.conf and there you have it

You will need to run paru -Sya so sync these repos.

You can then install packages with paru -S foo or paru -S REPONAME/foo.

There's a few extra options to configure this.

  • Depth configures how deeply to recurse to find pkgbuilds, the default is 3.
  • SkipReview can be specified in the repo to skip the review process for just that repo`.
  • GenerateSrcinfo force generates srcinfo files, this is for is a repo has outdated srcinfo files.
  • Path can be specified instead of Git to point to a local file path.

There's no documentation on this as of yet as it's very much beta, but feel free to test it out.

Morganamilo avatar Sep 03 '22 20:09 Morganamilo

What about build order? Personally for me repo specific option with list of packages would be cool enough, i could finally ditch my script to build most of kde

Seqularise avatar Sep 04 '22 19:09 Seqularise

Repo is top priority, then custom repos, then aur

Morganamilo avatar Sep 04 '22 19:09 Morganamilo

I mean inside this custom repo, if i have in this repo pacman-git and paru-git i want to build pacman first

Seqularise avatar Sep 04 '22 19:09 Seqularise

Well it builds packages based on what targets you give, not the whole thing at once. But paru shouldn't build something without solving deps anyway.

Morganamilo avatar Sep 04 '22 19:09 Morganamilo

So this is a milestone for v2, which is still a while off. But as of now this is basically fully functional in paru-git

Add:

[REPONAME]
Git = https://github.com/user/pkgbuilds/

To your paru.conf and there you have it

You will need to run paru -Sya so sync these repos.

You can then install packages with paru -S foo or paru -S REPONAME/foo.

There's a few extra options to configure this.

  • Depth configures how deeply to recurse to find pkgbuilds, the default is 3.
  • SkipReview can be specified in the repo to skip the review process for just that repo`.
  • GenerateSrcinfo force generates srcinfo files, this is for is a repo has outdated srcinfo files.
  • Path can be specified instead of Git to point to a local file path.

There's no documentation on this as of yet as it's very much beta, but feel free to test it out.

I am getting error: unknown section error. It the syntax changed?

mio-19 avatar Jun 24 '23 11:06 mio-19

Are you running paru-git?

Morganamilo avatar Jun 24 '23 11:06 Morganamilo

When updating to a new Paru commit https://github.com/Morganamilo/paru/commit/d97bb0a7c346660d9166f1fd4583d8530677a14f recently, my custom repo is no longer recognized.

My /etc/paru.conf looks like:

...

#
# Custom Repo
#
[steven]
Depth = 1
SkipReview
Path = /home/steven/os/linux/dev/packages/

Update:

My bad, setting Depth = 2 fixes things.

stevenxxiu avatar Nov 11 '23 08:11 stevenxxiu