Giter Club home page Giter Club logo

Comments (8)

nroi avatar nroi commented on June 8, 2024

Thanks for your feedback!

cpcache currently does not support any functionality related to AUR.

Please correct me if I misunderstood your use case: I assume you have multiple machines that all fetch their pacman packages from a single machine that runs cpcache, and you want cpcache to also host packages built with yay?

If that's the case, then I don't see any easy way to implement this functionality. cpcache serves files via HTTP, and AUR helpers like yay only fetch the PKGBUILD and related files via HTTP in order to build the actual package locally. I just glanced through the man page of yay, and the only kind of cache it supports is a local cache directory, but no HTTP mirrors.

So I guess that file systems like SSHFS or NFS are better suited for this use case.

from cpcache.

anthr76 avatar anthr76 commented on June 8, 2024

Hey there @nroi. I think a better implementation would be working with something like Aurutils and aurto. They create local repositories that server build AUR packages. They're built as root (in chroot) then the user owns them. It would be great if there was a way for cpcache to serve the repository along with the cache. Adding something in the toml to point to the custom repo. In aurto's case it sits in

https://github.com/alexheretic/aurto

Here's the project

from cpcache.

anthr76 avatar anthr76 commented on June 8, 2024

It would be nice not to have to setup another webserver to serve these packages and just take advantage of cpcache

from cpcache.

nroi avatar nroi commented on June 8, 2024

Interesting, I didn't know of aurto yet. It changes your pacman config to include a local repository:

[aurto]
SigLevel = Optional TrustAll
Server = file:///var/cache/pacman/aurto

So all that would be required by cpcache is the ability to define local repositories in the TOML config, e.g. a mapping like:

[[localrepo]]
name = "aurto"
location = "/var/cache/pacman/aurto"

# Allow to define additional localrepos:
# [[localrepo]]
# name = "another_local_repo"
# location = "/var/cache/pacman/another_local_repo"

For incoming GET requests, it would then check if the path refers to a localrepo.

Each client that intends to use the AUR cache would have to modify its pacman config:

pacman.conf:

Include = /etc/pacman.d/aurto

/etc/pacman.d/aurto:

[aurto]
SigLevel = Optional TrustAll
Server = http://localhost:7070/aurto

I have to look into this in more detail, but at first glance, it seems this can be implemented without too much effort.

from cpcache.

anthr76 avatar anthr76 commented on June 8, 2024

This is exactly an implementation I was looking for and I though it would be great for your project ! I have to constantly build linux-mainline, and it would be great just to pull a pre-compiled package from my server. Any contributions you'd like me to make I would be happy to help!

from cpcache.

nroi avatar nroi commented on June 8, 2024

I'm going to test this before pushing the new version to AUR.

from cpcache.

anthr76 avatar anthr76 commented on June 8, 2024

This is so cool ! I can do some testing tomorrow. Thank you so much

from cpcache.

nroi avatar nroi commented on June 8, 2024

I pushed the new version to AUR and explained the configuration in the README.

I don't use many AUR packages myself, so in case there are some issues related to this functionality: feedback is always welcome.

from cpcache.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.