From patchwork Fri May 24 13:31:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Ludovic_Court=C3=A8s?= X-Patchwork-Id: 14057 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 C760B17040; Fri, 24 May 2019 14:37:40 +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 7B94D1700D for ; Fri, 24 May 2019 14:37:40 +0100 (BST) Received: from localhost ([127.0.0.1]:54781 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUAOB-0005yt-TY for patchwork@mira.cbaines.net; Fri, 24 May 2019 09:37:39 -0400 Received: from eggs.gnu.org ([209.51.188.92]:34526) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUAKi-0002jA-7D for guix-patches@gnu.org; Fri, 24 May 2019 09:34:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hUAKh-0000Mu-1u for guix-patches@gnu.org; Fri, 24 May 2019 09:34:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60956) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hUAKg-0000MX-TA for guix-patches@gnu.org; Fri, 24 May 2019 09:34:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hUAKg-00026y-L4 for guix-patches@gnu.org; Fri, 24 May 2019 09:34:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35880] [PATCH 0/7] Lzip support for 'guix publish' and 'guix substitute' Resent-From: Ludovic =?utf-8?q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 24 May 2019 13:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35880 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35880@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.15587047948036 (code B ref -1); Fri, 24 May 2019 13:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 24 May 2019 13:33:14 +0000 Received: from localhost ([127.0.0.1]:46267 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUAJu-00025X-8w for submit@debbugs.gnu.org; Fri, 24 May 2019 09:33:14 -0400 Received: from eggs.gnu.org ([209.51.188.92]:47788) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hUAJt-00025E-0T for submit@debbugs.gnu.org; Fri, 24 May 2019 09:33:13 -0400 Received: from lists.gnu.org ([209.51.188.17]:49366) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hUAJn-00087p-SW for submit@debbugs.gnu.org; Fri, 24 May 2019 09:33:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33887) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUAJm-0001gR-S9 for guix-patches@gnu.org; Fri, 24 May 2019 09:33:07 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:38653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hUAIn-0007aC-3W; Fri, 24 May 2019 09:32:05 -0400 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=36416 helo=gnu.org) by fencepost.gnu.org with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1hUAIm-0005a1-At; Fri, 24 May 2019 09:32:04 -0400 From: Ludovic =?utf-8?q?Court=C3=A8s?= Date: Fri, 24 May 2019 15:31:59 +0200 Message-Id: <20190524133159.22568-1-ludo@gnu.org> X-Mailer: git-send-email 2.21.0 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: , Cc: Pierre Neidhardt Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches Hi! As a followup to Pierre’s work on (guix lzlib), these patches implement ‘lzip’ support for ‘guix substitute’ and ‘guix publish’. With these, you can now run: ./pre-inst-env guix publish -Clzip … on one side, and on another machine: ./pre-inst-env guix-daemon --build-users-group=guixbuild and from there the client machine should be able to fetch lzip-compressed substitutes. These patches do not address the transitioning issue that we discussed earlier, where we have clients lacking lzip support talking to an lzip-capable server. As discussed earlier, clients will have to send a special HTTP header, ‘X-Guix-Accept-Encoding’. For the server-side, I’m still hesitating between implementing it in ‘guix publish’ or simply running two instances of ‘guix publish’ side-by-side (one gzip and one lzip) and letting nginx dispatch between the two. :-) Note that we’ll have to adjust our nginx mirror configs to take that header into account! Comments? Ludo’. Ludovic Courtès (7): lzlib: Add 'make-lzip-input-port/compressed'. utils: Test 'compressed-port' and 'decompressed-port' for both gzip and xz. utils: Support compression and decompression with lzip. publish: Add support for lzip. self: Add dependency on lzlib. gnu: guix: Add dependency on lzlib. lzlib: 'lzread!' never returns more than it was asked for. .dir-locals.el | 2 + doc/guix.texi | 25 +++++-- gnu/packages/package-management.scm | 1 + guix/lzlib.scm | 101 ++++++++++++++++++++++------ guix/scripts/publish.scm | 84 +++++++++++++++++------ guix/self.scm | 13 +++- guix/tests.scm | 1 + guix/utils.scm | 27 ++++++-- tests/lzlib.scm | 10 +++ tests/publish.scm | 36 ++++++++++ tests/utils.scm | 62 +++++++++++------ 11 files changed, 284 insertions(+), 78 deletions(-)