From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:46894) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWxe3-0008PO-GP for guix-patches@gnu.org; Sat, 01 Jun 2019 02:37:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWxO2-0002nc-94 for guix-patches@gnu.org; Sat, 01 Jun 2019 02:21:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51534) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hWxO2-0002mp-5g for guix-patches@gnu.org; Sat, 01 Jun 2019 02:21:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hWxO1-0006GC-UJ for guix-patches@gnu.org; Sat, 01 Jun 2019 02:21:01 -0400 Subject: [bug#36029] [PATCH 0/2] 'publish' and 'substitute' support several compression methods Resent-Message-ID: Received: from eggs.gnu.org ([209.51.188.92]:43552) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWxN2-0006KV-Bm for guix-patches@gnu.org; Sat, 01 Jun 2019 02:20:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hWxN1-0001Bo-A0 for guix-patches@gnu.org; Sat, 01 Jun 2019 02:20:00 -0400 From: Pierre Neidhardt In-Reply-To: <20190531144828.9585-1-ludo@gnu.org> References: <20190531144828.9585-1-ludo@gnu.org> Date: Sat, 01 Jun 2019 08:19:52 +0200 Message-ID: <87blzhzv1z.fsf@ambrevar.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: ludo@gnu.org, 36029@debbugs.gnu.org --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi! > One idea we discussed there was to allow clients to pass an > =E2=80=98X-Guix-Accepted-Encoding=E2=80=99 header in HTTP requests, and t= he server > would return an lzip narinfo or a gzip narinfo depending on that. > However, I thought that this was not very flexible, and that we > were bound to mess up with caching. > > This patch implements a different solution: =E2=80=98guix publish=E2=80= =99 can > be passed multiple =E2=80=98-C=E2=80=99 options, in which case it compres= ses > substitutes with all these compression methods. The corresponding > narinfo looks like this: > > --8<---------------cut here---------------start------------->8--- > StorePath: /gnu/store/9czlz7ss3187l2vi1hvrlkwlgrggdg5p-inkscape-0.92.4 > URL: nar/gzip/9czlz7ss3187l2vi1hvrlkwlgrggdg5p-inkscape-0.92.4 > Compression: gzip > FileSize: 40308611 > URL: nar/lzip/9czlz7ss3187l2vi1hvrlkwlgrggdg5p-inkscape-0.92.4 > Compression: lzip > FileSize: 19867767 > NarHash: sha256:1jv4nkq68a7zwqhi9inrnh340a4jxcpb91wq7d25hgw0nk8isbbk > NarSize: 136499024 > References: =E2=80=A6 > --8<---------------cut here---------------end--------------->8--- Huhu, inkscape's size is already halved ;) > IOW, it=E2=80=99s like before, except that there are multiple > URL/Compression/FileSize fields instead of just one of each. > > The trick is that old clients take the first occurrence of each > of these fields and ignore subsequent occurrences. In the example > above, they=E2=80=99d just take gzip and ignore the rest. Smart! I like it! I gave the patches a quick skim but I'm not very knowledgeable of those parts, so there is little for me to comment about I'm afraid. Other than that, excited to see .lz substitutes becoming a reality! =2D-=20 Pierre Neidhardt https://ambrevar.xyz/ --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEUPM+LlsMPZAEJKvom9z0l6S7zH8FAlzyGQgACgkQm9z0l6S7 zH8dAgf/SXx7YGiv68tfczqnM/3f/WCArkRehta5oFIyyLGzUOhPLilBvV+L2AUF 8sHDRUeiujoAI3ZzyoEF8ZPvGmMZe9paWsVzORN78KM/jR3dDknwMGbqwiucry0I 8cG7YeJPz0687cu2vlXgVqQF1RbfIHRtPmO85K4RiTdWnbO077zZEnONU/whwdE9 CONstwiTN/I5B4XcRe+VoeWANA+pYGcVa4o8eKdyVX4OtMCP6XyZtTk4BfTerrXl ThTGzoqBXRKOeKMnKlA1QUxxtliLtlTEm2BbJdLuw7bib55zpfOjiYNQw9146iYU ddls9fGeDgsTmW6on5T5DU7b/Bo52w== =lPN9 -----END PGP SIGNATURE----- --=-=-=--