From mboxrd@z Thu Jan 1 00:00:00 1970 From: Pierre Neidhardt Subject: Re: Package file indexing Date: Mon, 25 Mar 2019 09:46:40 +0100 Message-ID: <87imw7cpe7.fsf@bababa.i-did-not-set--mail-host-address--so-tickle-me> References: <20190314204941.GA21065@jasmine.lan> <87mulx9kuv.fsf@nckx> <87zhpx846u.fsf@ambrevar.xyz> <87bm21y2s2.fsf_-_@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:33127) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h8LFl-0004hh-6T for guix-devel@gnu.org; Mon, 25 Mar 2019 04:46:46 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h8LFk-0001RN-3K for guix-devel@gnu.org; Mon, 25 Mar 2019 04:46:45 -0400 In-Reply-To: <87bm21y2s2.fsf_-_@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: Guix-devel --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! Thanks for the details, Ludo! Ludovic Court=C3=A8s writes: > An index could look like, say, a list of store item/file pairs. It > would grow very quickly, which may not be very practical. I think we might need some form of rotation and discard the old indexes to avoid growing up indefinitely. Well, we will see once we've started using it! > =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. I think you meant "store itemS" (plural), no? > Internally it=E2=80=99d call =E2=80=98guix substitute=E2=80=99 to fetch t= he 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 =E2=80=98command-not-found= =E2=80=99 support > (I think it=E2=80=99s part of NixOS, not Nix). IIRC they distribute an S= QLite > database, but it=E2=80=99s a pretty ad-hoc mechanism without authenticati= on. I could work on this, but that seems like a lot of work, especially for me who knows nothing about the daemon (but hey, it's a great opportunity to learn!). Would anyone else like to pick this up? Otherwise I'll keep this on my todo list. Cheers! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlyYlXAACgkQm9z0l6S7 zH9RMQgAh0qvBdNCx4fnbHoKb2OsEafGqvAiZefvOCM+OycD42SVDlnWHWiyLFYp WZJVA59ERaDrCYcG7txftEL4bqdhjm14f8I3WxczyqtBjlh6QJrCaug3iLhiSWTq ra5o+UOMdGHD1czITKSXcKOjw1PbMuiJKCe+QlgDpZpqvO1BiKASuWtPJr+D+eSd CyjzHTrQerWN47UiF5z/vq2r6ev2w8ygnmGcaqJ6C7c7sIzHdQqyLhTE4hVNaVOi 38m4AH8GzXOCImMXBtylaogTZ0LbtgeYlcZ+1q6cg15WvpG5Y1NHT5OiPSJn7JCF 55EZ1mkFsXmWll00H8p1cdywda9xgQ== =+sLA -----END PGP SIGNATURE----- --=-=-=--