[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Package file indexing

From: Ludovic Courtès
Subject: Package file indexing
Date: Sat, 23 Mar 2019 17:27:25 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)


Pierre Neidhardt <address@hidden> skribis:

> I haven't though through the details, but I am under the impression that the
> file listing could be retrieve with the same mechanism as "guix size", i.e. 
> from
> the substitute index.  I think it would work well on the build farm, without
> more complexity than just another entry to the substitute index.

‘guix size’ uses substitute info (“narinfos”) to determine the size of
store items that are unavailable locally.  However, there’s currently no
source of information for file indexes.

My suggestion would be to couple the distribution of file indexes with
the substitute mechanism: if you’ve authorized a given substitute
server, you’d also allow downloads of file lists signed by that server.

An index could look like, say, a list of store item/file pairs.  It
would grow very quickly, which may not be very practical.  ‘guix
publish’ could update that list every time it “bakes” a nar.

The daemon could have a special RPC: you give it a file name and it
returns a store item (or package+version?) or #f.  Internally it’d call
‘guix substitute’ to fetch the file index from the substitute server,
check its signature, cache it locally, and then look up the file.

You should look at how NixOS does it for its ‘command-not-found’ support
(I think it’s part of NixOS, not Nix).  IIRC they distribute an SQLite
database, but it’s a pretty ad-hoc mechanism without authentication.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]