From patchwork Sat Jun 1 06:19:52 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Pierre Neidhardt X-Patchwork-Id: 17050 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 149F51706F; Sat, 1 Jun 2019 07:37:53 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id B0A201701C for ; Sat, 1 Jun 2019 07:37:52 +0100 (BST) Received: from localhost ([127.0.0.1]:53591 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hWxeK-0000et-1Q for patchwork@mira.cbaines.net; Sat, 01 Jun 2019 02:37:52 -0400 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 X-Loop: help-debbugs@gnu.org Subject: [bug#36029] [PATCH 0/2] 'publish' and 'substitute' support several compression methods Resent-From: Pierre Neidhardt Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 01 Jun 2019 06:21:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36029 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: ludo@gnu.org, 36029@debbugs.gnu.org X-Debbugs-Original-To: Ludovic =?utf-8?q?Court=C3=A8s?= , guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155937000823989 (code B ref -1); Sat, 01 Jun 2019 06:21:01 +0000 Received: (at submit) by debbugs.gnu.org; 1 Jun 2019 06:20:08 +0000 Received: from localhost ([127.0.0.1]:36845 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWxNA-0006Er-IK for submit@debbugs.gnu.org; Sat, 01 Jun 2019 02:20:08 -0400 Received: from eggs.gnu.org ([209.51.188.92]:57411) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hWxN8-0006EO-M9 for submit@debbugs.gnu.org; Sat, 01 Jun 2019 02:20:06 -0400 Received: from lists.gnu.org ([209.51.188.17]:38209) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hWxN3-0001GS-J6 for submit@debbugs.gnu.org; Sat, 01 Jun 2019 02:20:01 -0400 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 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:33527) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hWxN1-00018H-3Z; Sat, 01 Jun 2019 02:19:59 -0400 X-Originating-IP: 92.169.116.19 Received: from bababa (lfbn-1-4117-19.w92-169.abo.wanadoo.fr [92.169.116.19]) (Authenticated sender: pierre@atlas.engineer) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 272E01C0005; Sat, 1 Jun 2019 06:19:55 +0000 (UTC) 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 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi! > One idea we discussed there was to allow clients to pass an > ‘X-Guix-Accepted-Encoding’ header in HTTP requests, and the 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: ‘guix publish’ can > be passed multiple ‘-C’ options, in which case it compresses > 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: … > --8<---------------cut here---------------end--------------->8--- Huhu, inkscape's size is already halved ;) > IOW, it’s 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’d 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!