You are not logged in.

#1 2024-08-12 13:48:50

burny02
Member
Registered: 2021-07-01
Posts: 129

Share YAY cache

Hi

I've recently installed nginx to be able to share pacman installations between 3 or my machines.

This works nicely

I was wondering if there was a way to do something similar to avoid rebuilding of yay packages?

I tried changing the build directory

yay --builddir /mnt/NAS/Fast/yay-cache --save

But it seems to be slow when trying to install from another machine - Slower than installing directly (although it doesn't download anything)

In the example I am trying for example; it is still extracting the deb, generating the PKGINFO etc, compressing package

Any ideas?

Thanks in advance

Offline

#2 2024-08-12 13:53:56

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

Re: Share YAY cache

Why would you want the build directory on the NAS?  Just put the built packages in a custom repo on the NAS, then just install them with pacman.

You might be interested in Alad's helper (I always forget the name, aur-utils, or aur-tools, or similar) as it makes this easier than yay.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2024-08-12 13:56:00

burny02
Member
Registered: 2021-07-01
Posts: 129

Re: Share YAY cache

I'm not particularly clued into what is the best way to do this.

I assumed putting the cache and telling yay to NOT rebuild would give that expected outcome, i.e. not having to rebuild for 3 machines

Offline

#4 2024-08-12 16:17:30

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,651

Re: Share YAY cache

You're downloading the deb into the nas, read it from there to decompress it onto the NAS, then read it from there again to tar/compress it into the arch package on the NAS, ie. you're causing a lot of network filesystem traffic.

You only want to set PKGDEST, https://man.archlinux.org/man/core/pacm … .conf.5.en

Online

#5 2024-08-12 17:02:31

burny02
Member
Registered: 2021-07-01
Posts: 129

Re: Share YAY cache

I want to do this for all my yay components, i.e. lots of software across multiple computers

Is the only way to do this - Using pacman to install the files individually from that cache ? (.tar.zst/tar.xz that is created by the first machine)

Last edited by burny02 (2024-08-12 17:02:49)

Offline

#6 2024-08-12 18:21:12

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

Re: Share YAY cache

What other way would you want?  Pacman is the only way to install packages on any arch system.  In the build directory you can also use `makepkg -i` but if the package is already built, this really does nothing but hand it off to `pacman -U ...` anyways.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#7 2024-08-12 18:26:33

burny02
Member
Registered: 2021-07-01
Posts: 129

Re: Share YAY cache

I'd like to be able to reuse my yay builds across multiple pc without having to rebuild them, or without having to manually specify each package with pacman -U -  Ideally!

Offline

#8 2024-08-12 18:44:26

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

Re: Share YAY cache

What's wrong with `pacman -U ...`?  How would you prefer to specify which packages should be installed on each system?  If you create a custom repo on the NAS you can just install them with `pacman -S <pkgname>` so you wouldn't need the full path.  But I'm not sure that'd really be that different for the initial install.  The benefit of the custom repo is then newly built versions posted to the repo on your NAS will get included in regular system updates for all the other machines (so your regular `pacman -Syu` will upgrade any of these packages).

Last edited by Trilby (2024-08-12 18:53:22)


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#9 2024-08-12 19:03:57

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 14,576

Re: Share YAY cache

I'd like to be able to reuse my yay builds across multiple pc without having to rebuild them, or without having to manually specify each package with pacman -U -  Ideally!

There is no such thing as yay builds .
yay is a pacman wrapper that internally uses pacman & makepkg to install/build stuff .

Create a custom repo for aur packages, add it to your pacman.conf and your nginx server.
Then you can use pacman or your favorite-tool-that-uses-pacman-under-the-hood to access all those packages.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#10 2024-08-12 19:50:51

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 71,651

Re: Share YAY cache

Your problem is

man yay wrote:

       --builddir <dir>
              Directory to use for Building AUR Packages. This directory is also used  as  the  AUR
              cache when deciding if Yay should skip builds.

so w/ yay you cannot (from what I can tell) split build and storage dir and you absolutely don't want to *build* on the NAS.
So this is a dead end.
You can still locally build using yay and distribute the packges from the NAS using a local repo or you can abandon yay and allow makepkg to locally build a package but use the nas as storage (so that as long as you don't force rebuilds, makepkg on any system will benefit from the pre-build packages of every other system)
There is no "I just use yay over the NAS that that's also gonna perform well".

Online

#11 2024-08-12 21:09:21

burny02
Member
Registered: 2021-07-01
Posts: 129

Re: Share YAY cache

I just tried the custom repo route.

I think this is dead - It's more effort than it is worth, to build locally and then think about which may or not be needed and then move them over individually

At least the pacman nginx caching works very well without any input

Offline

#12 2024-08-12 22:02:45

bulletmark
Member
From: Brisbane, Australia
Registered: 2013-10-22
Posts: 704

Re: Share YAY cache

This may be of interest: https://github.com/bulletmark/pacpush

Offline

#13 2024-08-13 00:13:10

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

Re: Share YAY cache

burny02 wrote:

I just tried the custom repo route... It's more effort than it is worth

That's why I suggested this:

Trilby wrote:

You might be interested in Alad's helper (I always forget the name, aur-utils, or aur-tools, or similar) as it makes this easier than yay.


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#14 2024-08-13 09:34:04

burny02
Member
Registered: 2021-07-01
Posts: 129

Re: Share YAY cache

Just tried this method

Don't particularly like it to be honest, again more effort than it is worth

It's still very manual in conjunction with yay, and would work better if one computer was the 'master' where all the building happens etc (This isn't the case)
It does seem like a very useful tool, though

Offline

#15 2024-08-13 10:37:43

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,193
Website

Re: Share YAY cache

Mod note: moving to AUR Issues.


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

Board footer

Powered by FluxBB