You are not logged in.

#1 2023-12-14 00:40:55

Brocellous
Member
Registered: 2017-11-27
Posts: 146

Pacman cache server discovery

Not sure where the appropriate forum for this discussion is but...

It appears the upcoming release of pacman 7.0 will add support for "cache servers", which are like regular mirrors but

1. don't need to host the db files
2. will be silently skipped when the requested files aren't found without being disabled, so they may feasibly hold only a subset of packages.

IIUC, considering the above, and pacman's support for a variety of request schemes via libcurl, just about every Arch Linux installation is about to become a valid cache server. E.g. this already works today:

[~ desktop.lan]$ sudo pacman -Uw scp://laptop.lan//var/cache/pacman/pkg/pacman-6.0.2-8-x86_64.pkg.tar.zst
:: Retrieving packages...
 pacman-6.0.2-8-x86_64                          922.0 KiB  1537 KiB/s 00:01 [###########################################] 100%
loading packages...
resolving dependencies...
Packages (1) pacman-6.0.2-8
Total Download Size:  0.00 MiB
:: Proceed with download? [Y/n]

assuming valid key for $USER@laptop.lan is accessible without further auth (e.g. via ssh-agent). When CacheServer is added, a laptop.lan that runs sshd could simply be added to the mirrorlist and just werk.

What I'm wondering today is what strategy might be employed, perhaps in a future pacman release, or with another external tool, for cache server discovery on the local lan. I think the above is awesome and would be amazing if it could work automatically without configuring all of my peer Arch installations on the local network. An obvious candidate is dns-sd, but there would be details to hammer out. I'm pleased to find there is prior art in this area in pacserve [1] [2] from @Xyne, but it is my feeling that projects like these could be greatly simplified, even to the point of integrating them in pacman upstream or possibly pacman-contrib, with the use of the CacheServer directive, or if not, perhaps that could be enabled by further no-too-big changes to pacman. Thoughts? Maybe just a standardized dns-sd service name would be a start.


[1] https://xyne.dev/projects/pacserve/
[2] https://wiki.archlinux.org/title/Pacserve

Offline

#2 2023-12-14 15:52:38

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,801

Re: Pacman cache server discovery

Moving to Pacman and Package Update Issues


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2023-12-15 03:38:27

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,399
Website

Re: Pacman cache server discovery

This will not be part of pacman.

Offline

#4 2023-12-15 04:21:14

Brocellous
Member
Registered: 2017-11-27
Posts: 146

Re: Pacman cache server discovery

I mean, I haven't even really suggested specific features. I just mean that most of it now _already is_ part of pacman so I think it's worth discussing what actually remains to be implemented to achieve a functional lan cache, and then consider where those features might be implemented.

Offline

#5 2023-12-15 06:57:20

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,399
Website

Re: Pacman cache server discovery

To clarify, I consider everything surrounding cache server discovery on the local lan is out of scope for implementation in pacman.  Hence my statement of "this will not be part of pacman" stands.

Offline

Board footer

Powered by FluxBB