From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id 8AZXDFWRAGDYagAA0tVLHw (envelope-from ) for ; Thu, 14 Jan 2021 18:45:41 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id aCApCFWRAGCWVgAAbx9fmQ (envelope-from ) for ; Thu, 14 Jan 2021 18:45:41 +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 BC58C9402A2 for ; Thu, 14 Jan 2021 18:45:40 +0000 (UTC) Received: from localhost ([::1]:38578 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1l07cp-0000qj-Kf for larch@yhetil.org; Thu, 14 Jan 2021 13:45:39 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:54850) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1l07bI-0000Oh-2w for guix-patches@gnu.org; Thu, 14 Jan 2021 13:44:04 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:55888) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1l07bG-000445-IV for guix-patches@gnu.org; Thu, 14 Jan 2021 13:44:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1l07bG-0000sd-G4 for guix-patches@gnu.org; Thu, 14 Jan 2021 13:44: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: Maxim Cournoyer Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 14 Jan 2021 18:44: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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Received: via spool by 45773-submit@debbugs.gnu.org id=B45773.16106498343354 (code B ref 45773); Thu, 14 Jan 2021 18:44:02 +0000 Received: (at 45773) by debbugs.gnu.org; 14 Jan 2021 18:43:54 +0000 Received: from localhost ([127.0.0.1]:39199 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l07b7-0000s1-M8 for submit@debbugs.gnu.org; Thu, 14 Jan 2021 13:43:53 -0500 Received: from mail-qv1-f41.google.com ([209.85.219.41]:44801) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l07b6-0000rk-I0; Thu, 14 Jan 2021 13:43:52 -0500 Received: by mail-qv1-f41.google.com with SMTP id d11so2776289qvo.11; Thu, 14 Jan 2021 10:43:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-transfer-encoding; bh=i679i1YM9Pc1tsnNCnVzfHyLBuHp7YFj3ZdxMElAqmg=; b=bon9fCKv7pSfe+x1pcKPeLxi9jaHSKfGmn9hOKhM4J70m1ZkC0+BD6Xapdh48VfxAF CVTr58nVpdiwj9q6RCMFnBI3PNnD5i7/cwlVws7FWwE8KuPddpRBP1j7PHIAjutpFuaB Njx2LFZsCJgY0y4jjOe2z+sk8ha0L6KJbSxAJw4UWa2+dJ+8ZfUASVvgRmeLzndqCVMU rEhDzSmS75jcEmWhqXx3x20l5KVc08GG02ZHHxonihy1387fLHx3tXGIziRmQb++h/tA es+HkYik544yc6SgenUGMpcjCvdwZ9Vr6c1FKiICahb1iMRJeZEE894cwKlVmMe5TtZg PzJg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to :message-id:user-agent:mime-version:content-transfer-encoding; bh=i679i1YM9Pc1tsnNCnVzfHyLBuHp7YFj3ZdxMElAqmg=; b=cgMH1rG84iZqojXUJBPc6MPzwgJK1D61GdfnvtzJIul5m515Cst5GRjNNcnmtTlAU0 LHsQ0JSBATXa8n3KEpMDUa/8KQCHO2ojU+o+mRagZsRcj359iryLFA8ZvES5ubgDdBwK GVALeZl9I9GjgyU/2TikyU0onS0VeEsVHXQZ/5p9ohMHr16g1zMrNyX0k7ZagEY7mWi0 dt2rFHPUbkjfPdFVUaqqmkVI1bLrp2ci2zIabW16a2xY3JE7vUkhcv1AQ8OK+ZHGSARF e7VSfytDe7tcXewW7sQqfjgFlmVxYcCTAhr1WC65VKKBlUHvUEYLEPcKe8/3jTTPbKsL gNQw== X-Gm-Message-State: AOAM533cI1HNPW/5cJX/TaDzd+kRjxzkrxL3fTbR1LWSJLXmk5fV55oK mlRvwCNvokKW6dX7G/lDgo47tQL0mKpaAw== X-Google-Smtp-Source: ABdhPJxdUj83w0epSv7j9Ag45A2ITlVqsP55iDxSLuVtxwQsh8Kk4w+0FjmzMdWO87j2vCJ3k2Kn1g== X-Received: by 2002:a0c:a789:: with SMTP id v9mr8309957qva.41.1610649826924; Thu, 14 Jan 2021 10:43:46 -0800 (PST) Received: from hurd (dsl-157-252.b2b2c.ca. [66.158.157.252]) by smtp.gmail.com with ESMTPSA id z9sm3360485qts.66.2021.01.14.10.43.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Jan 2021 10:43:44 -0800 (PST) From: Maxim Cournoyer References: <20210110200535.24377-1-maxim.cournoyer@gmail.com> <20210113174021.23960-1-maxim.cournoyer@gmail.com> <877dof4dgr.fsf_-_@gnu.org> Date: Thu, 14 Jan 2021 13:43:43 -0500 In-Reply-To: <877dof4dgr.fsf_-_@gnu.org> ("Ludovic =?UTF-8?Q?Court=C3=A8s?="'s message of "Thu, 14 Jan 2021 18:48:04 +0100") Message-ID: <87k0sfl5pc.fsf@gmail.com> 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: -1.26 Authentication-Results: aspmx1.migadu.com; dkim=fail (headers rsa verify failed) header.d=gmail.com header.s=20161025 header.b=bon9fCKv; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); 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: BC58C9402A2 X-Spam-Score: -1.26 X-Migadu-Scanner: scn1.migadu.com X-TUID: mn6QXFYwGVyo Hi Ludovic, Ludovic Court=C3=A8s writes: > Hi! > > Maxim Cournoyer skribis: > >> Before this change, only plain directories, tar or zip archives were sup= ported >> 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: .= gz, >> .Z, .bz2, .lz, and .xz, even when they are not tarballs. Files of unkno= wn >> extensions are treated as uncompressed files and supported as well. >> >> * guix/packages.scm (patch-and-repack): Only add the compressor utility = to the >> PATH when the file is compressed. Bind more inputs in the mlet, and use= them >> for decompressing single files. Adjust decompression and compression ro= utines. >> [decompression-type]: Return #f when no known compression extension is u= sed. >> [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? I think consistency is the main driver here. The url-fetch method supports single file sources; it makes sense that the other components handling sources support it as well. It's hard to judge of the popularity of such a feature when it's never been available; but some use cases come to mind such as single Emacs package file. I've made use of such feature for the new texlive-updmap.cfg definition in . > There are aspects of the patch that I find welcome regardless, such as > the improved handling of compression helpers. Great! Thanks for looking at it. Maxim