From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id mKC5CCCEAGBpbwAA0tVLHw (envelope-from ) for ; Thu, 14 Jan 2021 17:49:20 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id QGdZBCCEAGATMQAAB5/wlQ (envelope-from ) for ; Thu, 14 Jan 2021 17:49:20 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 882F9940484 for ; Thu, 14 Jan 2021 17:49:19 +0000 (UTC) Received: from localhost ([::1]:51016 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l06kI-000348-CO for larch@yhetil.org; Thu, 14 Jan 2021 12:49:18 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:36550) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l06k2-00032X-W2 for guix-patches@gnu.org; Thu, 14 Jan 2021 12:49:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55812) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l06k2-0006uD-K4 for guix-patches@gnu.org; Thu, 14 Jan 2021 12:49:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l06k2-0007zE-HV for guix-patches@gnu.org; Thu, 14 Jan 2021 12:49:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#45773] [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Jan 2021 17:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 45773 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Maxim Cournoyer Received: via spool by 45773-submit@debbugs.gnu.org id=B45773.161064649430631 (code B ref 45773); Thu, 14 Jan 2021 17:49:02 +0000 Received: (at 45773) by debbugs.gnu.org; 14 Jan 2021 17:48:14 +0000 Received: from localhost ([127.0.0.1]:39123 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l06jG-0007xy-47 for submit@debbugs.gnu.org; Thu, 14 Jan 2021 12:48:14 -0500 Received: from eggs.gnu.org ([209.51.188.92]:42986) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l06jE-0007xi-Ir; Thu, 14 Jan 2021 12:48:12 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]:55144) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l06j9-0006a2-AT; Thu, 14 Jan 2021 12:48:07 -0500 Received: from [2a01:e0a:1d:7270:af76:b9b:ca24:c465] (port=49450 helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1l06j8-0004Kw-Ip; Thu, 14 Jan 2021 12:48:07 -0500 From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <20210110200535.24377-1-maxim.cournoyer@gmail.com> <20210113174021.23960-1-maxim.cournoyer@gmail.com> Date: Thu, 14 Jan 2021 18:48:04 +0100 In-Reply-To: <20210113174021.23960-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Wed, 13 Jan 2021 12:40:21 -0500") Message-ID: <877dof4dgr.fsf_-_@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: 45774@debbugs.gnu.org, 45773@debbugs.gnu.org Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -2.86 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 882F9940484 X-Spam-Score: -2.86 X-Migadu-Scanner: scn0.migadu.com X-TUID: OG67a1pMyqcl Hi! Maxim Cournoyer skribis: > Before this change, only plain directories, tar or zip archives were supp= orted > as the source of a package for the GNU build system; anything else would = cause > the unpack phase to fail. Origins relying on snippets would suffer from = the > same problem. > > This change adds the support to use files of the following extensions: .g= z, > .Z, .bz2, .lz, and .xz, even when they are not tarballs. Files of unknown > extensions are treated as uncompressed files and supported as well. > > * guix/packages.scm (patch-and-repack): Only add the compressor utility t= o the > PATH when the file is compressed. Bind more inputs in the mlet, and use = them > for decompressing single files. Adjust decompression and compression rou= tines. > [decompression-type]: Return #f when no known compression extension is us= ed. > [tarball?]: New nested procedure. > * guix/build/utils.scm (compressor, tarball?): New procedures. Move > %xz-parallel-args to the new 'compression helpers' section. > * tests/packages.scm: Add tests. Add missing copyright year for Jan. > * guix/build/gnu-build-system.scm (first-subdirectory): Return #f when no > sub-directory was found. > (unpack): Support more file types, including uncompressed plain files. > --- > guix/build/gnu-build-system.scm | 24 ++++++-- > guix/build/utils.scm | 47 ++++++++++----- > guix/packages.scm | 100 +++++++++++++++++--------------- > guix/tests.scm | 40 ++++++++++++- > tests/builders.scm | 40 ++++++++++++- > tests/packages.scm | 69 +++++++++++++++++++++- > 6 files changed, 247 insertions(+), 73 deletions(-) How frequent is it for an origin to be a regular file other than an archive? The underlying question for me is: will this generalization and increased complexity pay off? WDYT? There are aspects of the patch that I find welcome regardless, such as the improved handling of compression helpers. Thanks, Ludo=E2=80=99.