From mboxrd@z Thu Jan 1 00:00:00 1970 From: John Darrington Subject: Re: ???guix publish??? as a content-addressed file server Date: Wed, 20 Jul 2016 18:04:47 +0200 Message-ID: <20160720160447.GA10507@jocasta.intra> References: <87bn1s9vrp.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="uAKRQypu60I7Lcqm" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:51922) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bPtze-0005Iu-Cd for guix-devel@gnu.org; Wed, 20 Jul 2016 12:05:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bPtzc-0000FX-4j for guix-devel@gnu.org; Wed, 20 Jul 2016 12:05:05 -0400 Content-Disposition: inline In-Reply-To: <87bn1s9vrp.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 Court??s Cc: guix-devel --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable It sounds like a usefull capability. But presumably it depends on your localhost having a TCP/IP stack and a http server installed. It would be better if it could just use a socket or even just the filesyste= m. J' On Wed, Jul 20, 2016 at 05:25:30PM +0200, Ludovic Court??s wrote: Hi! =20 Until now, if hydra.gnu.org had a source file in its store (the result of an ???origin???), you could get it via substitutes. However, with substitutes disabled, hydra.gnu.org was of no help, even though it did have the source file. =20 Commit ff6638d112d794c9c433731643711932452fd2ff helps address that: it augments ???guix publish??? such that it can be used as a content-addr= essed mirror for source files??. =20 If you run ???guix publish -p 9999??? on your machine, and if hello-2.10.tar.gz is in the store, then this URL: =20 http://localhost:9999/file/hello-2.10.tar.gz/sha256/0ssi1wpaf7plaswq= qjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i =20 ??? gives you hello-2.10.tar.gz. =20 This works by constructing the corresponding store file name, assuming the file being requested results from a fixed-output derivation using the same hash algorithm (SHA256 here) or was added with ???add-to-stor= e???. That the hash algorithm must match is a limitation, but it???s probably ???good enough??? for our purposes. =20 Eventually I think we???ll run it on our build farm and add the URL to ???%content-addressed-mirrors??? in (guix download). =20 Feedback welcome. :-) =20 Ludo???. =20 ?? https://lists.gnu.org/archive/html/guix-devel/2016-05/msg00450.html =20 --=20 Avoid eavesdropping. Send strong encryted email. PGP Public key ID: 1024D/2DE827B3=20 fingerprint =3D 8797 A26D 0854 2EAB 0285 A290 8A67 719C 2DE8 27B3 See http://sks-keyservers.net or any PGP keyserver for public key. --uAKRQypu60I7Lcqm Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iEYEARECAAYFAlePoR8ACgkQimdxnC3oJ7NF1gCfbh4pLnzk1zGN0zgYoYDC9cmL 2KIAn3Xdoh/LoyH04mjZIGtcLLPpJK8X =pmTz -----END PGP SIGNATURE----- --uAKRQypu60I7Lcqm--