From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Package file indexing Date: Sat, 23 Mar 2019 17:27:25 +0100 Message-ID: <87bm21y2s2.fsf_-_@gnu.org> References: <20190314204941.GA21065@jasmine.lan> <87mulx9kuv.fsf@nckx> <87zhpx846u.fsf@ambrevar.xyz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:54574) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h7jUY-0002lO-Pi for guix-devel@gnu.org; Sat, 23 Mar 2019 12:27:31 -0400 In-Reply-To: <87zhpx846u.fsf@ambrevar.xyz> (Pierre Neidhardt's message of "Thu, 14 Mar 2019 23:46:33 +0100") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: Pierre Neidhardt Cc: Guix-devel Hello, Pierre Neidhardt 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, with= out > more complexity than just another entry to the substitute index. =E2=80=98guix size=E2=80=99 uses substitute info (=E2=80=9Cnarinfos=E2=80= =9D) to determine the size of store items that are unavailable locally. However, there=E2=80=99s current= ly no source of information for file indexes. My suggestion would be to couple the distribution of file indexes with the substitute mechanism: if you=E2=80=99ve authorized a given substitute server, you=E2=80=99d also allow downloads of file lists signed by that ser= ver. An index could look like, say, a list of store item/file pairs. It would grow very quickly, which may not be very practical. =E2=80=98guix publish=E2=80=99 could update that list every time it =E2=80=9Cbakes=E2=80= =9D 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=E2=80=99d = call =E2=80=98guix substitute=E2=80=99 to fetch the file index from the substitu= te server, check its signature, cache it locally, and then look up the file. You should look at how NixOS does it for its =E2=80=98command-not-found=E2= =80=99 support (I think it=E2=80=99s part of NixOS, not Nix). IIRC they distribute an SQL= ite database, but it=E2=80=99s a pretty ad-hoc mechanism without authentication. Ludo=E2=80=99.