From unknown Wed Jun 18 23:10:17 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#45773 <45773@debbugs.gnu.org> To: bug#45773 <45773@debbugs.gnu.org> Subject: Status: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. Reply-To: bug#45773 <45773@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:10:17 +0000 retitle 45773 [PATCH core-updates 0/1] Allow patch-and-repack to work with = plain files. reassign 45773 guix-patches submitter 45773 Maxim Cournoyer severity 45773 normal tag 45773 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 10 15:03:03 2021 Received: (at submit) by debbugs.gnu.org; 10 Jan 2021 20:03:03 +0000 Received: from localhost ([127.0.0.1]:55003 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kygvW-0005Fi-Qi for submit@debbugs.gnu.org; Sun, 10 Jan 2021 15:03:03 -0500 Received: from lists.gnu.org ([209.51.188.17]:38222) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kygvW-0005FQ-08 for submit@debbugs.gnu.org; Sun, 10 Jan 2021 15:03:02 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:38960) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kygvV-00073n-Pv for guix-patches@gnu.org; Sun, 10 Jan 2021 15:03:01 -0500 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]:40266) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kygvU-0003QV-38 for guix-patches@gnu.org; Sun, 10 Jan 2021 15:03:01 -0500 Received: by mail-io1-xd2c.google.com with SMTP id r9so15595096ioo.7 for ; Sun, 10 Jan 2021 12:02:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=0w5hhl22QWx5oERXuGDjTyVxzo66BN9ItgfmYsisqEA=; b=dh3Qm7U/WOrFuEWo4x8HZ3qpM8fICMI+xcTJLeV6X05JGCz3xyDaKkLIGAypqvZNkp wrNZkuqq3z4ovwImhCSjAP+J23mugHF9GFOrDC9U+CMM4B8/KqUHyJzzHzKvJhZDv3Ih JLgHgWGIUDFrpj+XdVwpvHbR1w/IsW6Y3ajvPezRE/S6sl0Aey9zOaFhkdmR1btaHpxB GNvGLKGm47a1dy+WRfUjzdDhgZlIH9N9f/C5+LbRNDKnj6qLT5MYdt7ZEHKyL4tRdoJS tq63vhgFxcTTVexOt1jFyKjLZvQqXD974P87zQTbXZYS7v9CNZwUeV45gagC7L1Evf3+ /cRg== 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:date:message-id:mime-version :content-transfer-encoding; bh=0w5hhl22QWx5oERXuGDjTyVxzo66BN9ItgfmYsisqEA=; b=FGfHJBwU7OaN1se/j4Qxe7XdEgGwFPs1mnY43xwMPKxGUgoNh2N03VEnQ1CgdC8LRL lxcm/pRQWANCFkTyVnTQWWO/7lKIu10GqTC5yZltQ84ZnGzfbx4RkNa/H+IH+fTqcWor urxx318A6NgSnvTr/gCJbiblV9DzAcxBuHeEOc8iZw7h5NzBuwrP2eMjm99OvYxog5z7 C6x72GZ6tpV21Y0ooMFrl0EmxGRiODYlY5aF6yUZIVuaBWxGZTEpyrqSj+7lW0qBmCbh g8b3ciLKMiHPYU/nQvtaleqCuJN6D0vvRqIJLcNnA5BdPeSJNSiSqllWe+HprUqwTJOn zBcg== X-Gm-Message-State: AOAM5308x836vtCOMCCx2gWl7vjPihWwClGOCxGiDFId5XDUvVDUJ+9q bzJZFQpCw7J/fB7sd9t54rBCH+ToolaysQ== X-Google-Smtp-Source: ABdhPJyXJfcYkVQPODR7fOuElj68g6mtTBLHEN3iL6I3ow3OGGAcAMYEwE22ZMB3rLJjOgm1QyHaYQ== X-Received: by 2002:a5d:8d8b:: with SMTP id b11mr12646252ioj.68.1610308978982; Sun, 10 Jan 2021 12:02:58 -0800 (PST) Received: from localhost.localdomain (dsl-205-233-124-188.b2b2c.ca. [205.233.124.188]) by smtp.gmail.com with ESMTPSA id m8sm9582813ioh.16.2021.01.10.12.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 12:02:58 -0800 (PST) From: Maxim Cournoyer To: guix-patches@gnu.org Subject: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. Date: Sun, 10 Jan 2021 15:02:31 -0500 Message-Id: <20210110200231.24214-1-maxim.cournoyer@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=2607:f8b0:4864:20::d2c; envelope-from=maxim.cournoyer@gmail.com; helo=mail-io1-xd2c.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit Cc: Maxim Cournoyer X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) While attempting to reproduce the now closed issue , I stumbled upon another annoyance, which is that the patch-and-repack procedure used as part of an origin derivation didn't support single files, so the following failed, for example: <#part type="text/plain" filename="/home/maxim/src/guix-core-updates/repro.scm" disposition=inline description="Script exhibiting problem"> <#/part> The following patch fixes that, allowing to use plain files with any of the already supported compressors, or non-tarball archived that would include a single directory (the same convention as used for our tarballs). Maxim Cournoyer (1): guix: packages: Allow patch-and-repack to work with plain files. guix/packages.scm | 96 +++++++++++++++++++++++++++++++--------------- tests/packages.scm | 87 +++++++++++++++++++++++++++++++++++++++-- 2 files changed, 149 insertions(+), 34 deletions(-) -- 2.29.2 From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 10 17:00:09 2021 Received: (at control) by debbugs.gnu.org; 10 Jan 2021 22:00:09 +0000 Received: from localhost ([127.0.0.1]:55067 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyikr-00057E-I5 for submit@debbugs.gnu.org; Sun, 10 Jan 2021 17:00:09 -0500 Received: from mail-il1-f169.google.com ([209.85.166.169]:35923) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyikp-000552-JT for control@debbugs.gnu.org; Sun, 10 Jan 2021 17:00:08 -0500 Received: by mail-il1-f169.google.com with SMTP id x15so618763ilk.3 for ; Sun, 10 Jan 2021 14:00:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=6k9B2g2tmU9SpiWIcoswIQb8dz6ZryZBBc8k7OwG9yc=; b=ZyGmNAsfRFpS2tfz5Blk0i6fs3G/H2t4Ebxa6i1ldjq8IAwMmZy9L45bOtRV4AiVC+ 0Gyvh3OryXYTwO7oXPigMQWkpvIEun2A/GjTWV0EQ/tT7xbAUpXGE9zKIciZiOEFEmLH Oy1kKLrAEr+sJHhYWDCyca/3vvyGTYB2ZS4mBJRmIq/Rwop+jkRsFW0gg+qdsWzrCAFp k812FBvHucgNY/eBl83uRw/Z5HHKcqANzeaXV9mkN9vpOVXGkUY+Q1SwFpTfDGiFdXxL Mc+2jmTQFt3gkH4NlpZckQoZ3pkjXYirbbroDXEsUobQcBRGkBnEwf38776ztE5hy7V5 9cMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=6k9B2g2tmU9SpiWIcoswIQb8dz6ZryZBBc8k7OwG9yc=; b=HoHB0zAVrBxoD52U3rt/vy8EQmMzTM+gxN/vtwe4InlMkgZCNKEyr8sYjZRbFGGEwr /mTZxX4ERCtfDntI6oIetq7j1lbiLvTnJLQJoTCtL8eDUo4wFxKt23Q+BvefcobQ7rzO HkVopmwPIUuDtseMnc8MyH8EtdsuwdTSoC+MD4ans4efZc+3SEJUn0xep4wpwYH1K9q7 cXTxL7W0Sdmv2HIQnWmV/NLsHlCThiL+6awKRA92grdqti0T+A/GdrlCXzg9GqdmE5Kb yQUQSlVo3qb1EVwHN+oDJGQIahvhU/uj6RYtbvJ6lmTN7RLpI7hYb6nbL1pI/2Qf9W/O ztUw== X-Gm-Message-State: AOAM532dtFKvAvZOLybK4RJD24QcICQlciqwysfkY4KbKQKZNEKRvL35 IaWWFcuqvkXb+f8IoACj3pqA71/8ZvNKOg== X-Google-Smtp-Source: ABdhPJx95HjAnNlOZwNdZEIEoxJNsq+qU68iHEjk9e5rwo6ylqvYFHYKZQU11W371gT9K8olDZ7ZHA== X-Received: by 2002:a05:6e02:50e:: with SMTP id d14mr9685891ils.248.1610316001646; Sun, 10 Jan 2021 14:00:01 -0800 (PST) Received: from hurd (dsl-205-233-124-188.b2b2c.ca. [205.233.124.188]) by smtp.gmail.com with ESMTPSA id t14sm10099354iof.23.2021.01.10.14.00.01 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 14:00:01 -0800 (PST) Date: Sun, 10 Jan 2021 17:00:00 -0500 Message-Id: <87sg784fmn.fsf@gmail.com> To: control@debbugs.gnu.org From: Maxim Cournoyer Subject: control message for bug #45774 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 45774 45773 quit From debbugs-submit-bounces@debbugs.gnu.org Sun Jan 10 17:08:00 2021 Received: (at 45773) by debbugs.gnu.org; 10 Jan 2021 22:08:00 +0000 Received: from localhost ([127.0.0.1]:55079 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyisS-0005hz-0T for submit@debbugs.gnu.org; Sun, 10 Jan 2021 17:08:00 -0500 Received: from mail-il1-f169.google.com ([209.85.166.169]:45113) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kyisI-0005gn-0a for 45773@debbugs.gnu.org; Sun, 10 Jan 2021 17:07:58 -0500 Received: by mail-il1-f169.google.com with SMTP id y13so8453088ilm.12 for <45773@debbugs.gnu.org>; Sun, 10 Jan 2021 14:07:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:date:in-reply-to:message-id:user-agent :mime-version; bh=GeHxFP91v8IKyXIOUT86+eJZA9SRLVG81XMKucNTQ3s=; b=P7ZncPQuqanAn5HKyCNDqQGUyU9CEmghfmyQsRc90ttHGexMqrOMc3ZqFBxHvph1M1 64KLmlZfok4yNwiebNDWIT9vKeK03rfGaskCeRRnCQyG06fsi2vk20FaTIVO9HJMuGuk 9UndPM3z0ojok1HQ1P5ZDkwX47ppN5eXsbBUksXAO65D4n66JlwnM2HQw/fMAvZidtge tet5CA7AfwxmukQzRC6wyrp4A7AV3byPe9HYFN2zYyL699lKqIWv1fccZ1YmXfIR/Vaf IlUD9vYZsw4u4jQ7NFWl/j6pwb/VFuqnCBvZ0tela2HSRyt/U2hNTGtVAwuyS1SQ0XW4 5NFQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:date:in-reply-to :message-id:user-agent:mime-version; bh=GeHxFP91v8IKyXIOUT86+eJZA9SRLVG81XMKucNTQ3s=; b=GjnhVE6zFdhEy7LQQdqeRDGGb3MdEZgTP56qm6R20bD699y9x0KI36kUGs1ItoaM4E CeTtAxHVeNscRH4jch7zCuNdB7EiQnxxvOBUHB5+C9XXcHRSAysDngsMDJOeZpiLT+Kj HQXBHdgidw0eviE5ev8JPoAvwVlAzYSoSbTPqIM1yAGEwNRfqtJhuBCRSS92lnF/Vdoz gEFTy8yz6A5ItwOS4cJbLyXoTf1cTGL71kO897/FOJfyocaXJnzJ0AwgViLzUgTVUCwQ AWzPfOS7uXhzfEAfe4wIZRAsG7lnR3l2yoj4yjTWaBWJ/FKlGduqskvII/oBO6cSdVgg IMwA== X-Gm-Message-State: AOAM5313RxzYEIZQPuqSrTXtdnbym7vAUgsuaFV+SYVFn4vduiz/h0wr dRts85l2gBbSgXotxU2ZLwOSLYlMpXrXgg== X-Google-Smtp-Source: ABdhPJx5fR8ZYH3LCF/1EjuS+5PbD1TohmXFMmTDR7Zu6lx+0OB98//ILb7QFaf1BeomLWxGO8pqMA== X-Received: by 2002:a05:6e02:1908:: with SMTP id w8mr13206897ilu.229.1610316464547; Sun, 10 Jan 2021 14:07:44 -0800 (PST) Received: from hurd (dsl-205-233-124-188.b2b2c.ca. [205.233.124.188]) by smtp.gmail.com with ESMTPSA id f2sm10085895iop.6.2021.01.10.14.07.43 for <45773@debbugs.gnu.org> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 10 Jan 2021 14:07:43 -0800 (PST) From: Maxim Cournoyer To: 45773@debbugs.gnu.org Subject: Re: bug#45773: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. References: <20210110200231.24214-1-maxim.cournoyer@gmail.com> Date: Sun, 10 Jan 2021 17:07:43 -0500 In-Reply-To: <20210110200231.24214-1-maxim.cournoyer@gmail.com> (Maxim Cournoyer's message of "Sun, 10 Jan 2021 15:02:31 -0500") Message-ID: <87o8hw4f9s.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45773 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) --=-=-= Content-Type: text/plain Hello, Maxim Cournoyer writes: > While attempting to reproduce the now closed issue > , I stumbled upon another annoyance, which > is that the patch-and-repack procedure used as part of an origin derivation > didn't support single files, so the following failed, for example: > > <#part type="text/plain" filename="/home/maxim/src/guix-core-updates/repro.scm" disposition=inline description="Script exhibiting problem"> > <#/part> That didn't work out well :-). Here's the attachment that I meant to send along the cover letter. --=-=-= Content-Type: text/plain Content-Disposition: inline; filename=repro.scm ;;; Run script with: ./pre-inst-env guile -e main -s repro.scm (use-modules (gnu packages base) (gnu packages bootstrap) (guix build utils) (guix derivations) (guix download) (guix packages) (guix store)) (define %test-file-uri "https://raw.githubusercontent.com/realgud/realgud/master/realgud/common/bp-image-data.el") (define (main _) (let ((source (origin (method url-fetch) (uri %test-file-uri) (modules '((guix build utils))) (patch-inputs `(("tar" ,%bootstrap-coreutils&co) ("xz" ,%bootstrap-coreutils&co) ("locales" ,glibc-utf8-locales))) (snippet '(begin (with-fluids ((%default-port-encoding "ISO-8859-1") (%default-port-conversion-strategy 'error)) (substitute* "bp-image-data.el" (("something") "something else"))))) (sha256 (base32 "1qpn2zhh2qw579bhgjyxvf670r4kibaxls589hkm2yhwfvsjvs68"))))) (with-store store (build-derivations store (list (run-with-store store (origin->derivation source))))))) --=-=-= Content-Type: text/plain Thanks, Maxim --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 14 12:48:14 2021 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: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Maxim Cournoyer Subject: Re: bug#45773: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. 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-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 45773 Cc: 45774@debbugs.gnu.org, 45773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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. From debbugs-submit-bounces@debbugs.gnu.org Thu Jan 14 13:43:54 2021 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 To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#45773: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. 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?= =?utf-8?Q?=22'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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45773 Cc: 45774@debbugs.gnu.org, 45773@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) 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 From debbugs-submit-bounces@debbugs.gnu.org Mon Jan 25 09:20:20 2021 Received: (at control) by debbugs.gnu.org; 25 Jan 2021 14:20:20 +0000 Received: from localhost ([127.0.0.1]:38314 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l42j6-000347-0r for submit@debbugs.gnu.org; Mon, 25 Jan 2021 09:20:20 -0500 Received: from mail-qt1-f171.google.com ([209.85.160.171]:34160) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l42j4-00033s-00 for control@debbugs.gnu.org; Mon, 25 Jan 2021 09:20:18 -0500 Received: by mail-qt1-f171.google.com with SMTP id c1so9749145qtc.1 for ; Mon, 25 Jan 2021 06:20:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:message-id:to:from:subject; bh=gCFvmYJDzj2a+bw8ruHcvq/HWZbcD8xbFxFcvg/Jlrs=; b=YUijOT+J8gaQTUITUjj6UF912hnAXlSU5GSoUVdSPtuIgbFB4Gl977s/j933yX9OUx UM52wxwk7mCu7JndM1f1rdJ98uW1qLcdTT8aGKR//O6TdJWgcniiVlk0KJGaoPkUMn2Y Xb3fe/FLHMUSFQBccSkjGJodguFGVXQyOtds+7735V4c6IMpmS854/bEbEKFZmqBWQgP FNLL68eKSDd4YBUuJQVVD68W2Ek6lrEWEBpF0F+PRovppQIDBFo/Nadgui8mzboaDtCD 1tAwEq32e1CWyG15lCfmI5+Lt7VBlC3icMXIiITjlW+eoKALTT9YkMBEM5Bkr1AiXoGT iPOQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:to:from:subject; bh=gCFvmYJDzj2a+bw8ruHcvq/HWZbcD8xbFxFcvg/Jlrs=; b=StOVxHg3moyXi8BWYq/6CYpE8cI0dLxgpz4mjf5PT4Xoo8indseDPVqSjQHy7a2PLh F89NpPFgS0Pj+1/QrhsTVpLBITKjVklzU4NcZieXEFa3qT+lBGf3/KidTpCZzfi3dIJD zE51/Dnfv5fo6aZZMxmb+ZVAwG37ET+nBWcOptF8mVxZqZBIGRor9NgyvOal0QSED8bP oOJWpvAsjHw2/i07RT5uquUGAsPcGUK8KBNSepUS0A4FZ23bfoyhgqwt7nopfeZRHHnJ wc7g2/LNvoKQNq+ip6hO8mF84lIHk1esBL+MS6ZElTYwg+SeuC3Vlmt34//q/hhrmqZa cGPQ== X-Gm-Message-State: AOAM532gglYf+gXSqbm7VB8XESGpVC75hsBpk2dB8AHZNd9b7PyqBgeD mDsPgCEpujhWGuZ8+A0VSl0q/52ssNY= X-Google-Smtp-Source: ABdhPJwF78J+GetwexlgAbOzXk20EoD2vbnEjyWKEMVIsu2DzoDONo3PaAz/c00HP7kSef0r+/Zlwg== X-Received: by 2002:ac8:4313:: with SMTP id z19mr619360qtm.225.1611584412328; Mon, 25 Jan 2021 06:20:12 -0800 (PST) Received: from hurd (dsl-10-132-34.b2b2c.ca. [72.10.132.34]) by smtp.gmail.com with ESMTPSA id n139sm7487670qke.89.2021.01.25.06.20.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Jan 2021 06:20:10 -0800 (PST) Date: Mon, 25 Jan 2021 09:20:09 -0500 Message-Id: <87ft2p3xpi.fsf@gmail.com> To: control@debbugs.gnu.org From: Maxim Cournoyer Subject: control message for bug #45959 X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: control X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) forcemerge 45959 45773 quit From debbugs-submit-bounces@debbugs.gnu.org Tue Jan 26 22:57:32 2021 Received: (at 45773-done) by debbugs.gnu.org; 27 Jan 2021 03:57:32 +0000 Received: from localhost ([127.0.0.1]:43254 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4bxT-0006dQ-R2 for submit@debbugs.gnu.org; Tue, 26 Jan 2021 22:57:32 -0500 Received: from mail-qk1-f178.google.com ([209.85.222.178]:46641) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1l4bxS-0006d8-3u; Tue, 26 Jan 2021 22:57:30 -0500 Received: by mail-qk1-f178.google.com with SMTP id a7so569266qkb.13; Tue, 26 Jan 2021 19:57:30 -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=9zRkkNeuLpkXYdFUAaY8o6Tp2v1Ai3QiaQn+qxzV3Dg=; b=ZoSdJqGWA9UIao9OywvK9R4S6ULo/z0spH5P++3Gufmd21Wy19dHJ2wNN7Ypc3k2Nd OD2M79bA1pI0s139X5WQGjm7GrpoVu+gj8iegNKSe8AEKSynC5SnuA1Ek+uLVWtHW/xJ R9E820yAUJaU1J5yuCP2MkxR3mq09v6Zw7FicsepgJUIUgeBIbLVYtr/KiNey4K8wnDp uUMtv00sWGOxnbk2qTd2U4aYFoFApXOK2pPVCUS61bjHbV7kUMedn8Udk7l+L3/fUp+S zZ0HUQ23zu+JKWXLBBnYSbulqp3FUTR1eNeCoVdr7ooZehKX+7hng+VpILS8WrKzB/ih tTPA== 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=9zRkkNeuLpkXYdFUAaY8o6Tp2v1Ai3QiaQn+qxzV3Dg=; b=tH4NeYm2V/dOMQmAyc3qq7nfkOJVdNJa6Uox9MfB7BoMpZHmH3jAXpwms7B3UZfdOs h1mQ0bedihRZ1aGNue6TuquaktHclRGx6hwWH16snVb1x5UgwazD8gN2LPSxydEhfHCs 3qftWoWk2lQy9gwYPB/Bpji1G0h3G+/N0yJQWPnka7e9amme5qBneLts644ggZ4YA7cI WGHhs8g6ScKBvodYQhNo6fWR+p+sqKK2NpcIqMTSPxB5lVKRdm8ndU6GTG4ESH4pbRz1 qL7pJpzMnw3b5InrIjYq2FRnmFdUOIrEpoUKVUBZAnTKuwRgbVaOsX+gTRzD6wUq0Uo6 Qa/Q== X-Gm-Message-State: AOAM532SUPQCS4UtZsop5ls0VACqRcjjv7oAHjMXetGfLSoZHwn7s2Tw F/YqAU7YUB2sgssmPE0NNQuSe5Zw7ws= X-Google-Smtp-Source: ABdhPJz9bM2PDS1wwOaov/2NfN9ez3t4v2bjkSeEwtH3VDOJZLtFqilUsIpEHZjr5ezLD54USzxexg== X-Received: by 2002:a05:620a:2105:: with SMTP id l5mr9025465qkl.126.1611719844267; Tue, 26 Jan 2021 19:57:24 -0800 (PST) Received: from hurd (dsl-10-132-34.b2b2c.ca. [72.10.132.34]) by smtp.gmail.com with ESMTPSA id n94sm549163qtd.28.2021.01.26.19.57.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Jan 2021 19:57:23 -0800 (PST) From: Maxim Cournoyer To: Ludovic =?utf-8?Q?Court=C3=A8s?= Subject: Re: bug#45773: [PATCH core-updates 0/1] Allow patch-and-repack to work with plain files. References: <20210110200535.24377-1-maxim.cournoyer@gmail.com> <20210113174021.23960-1-maxim.cournoyer@gmail.com> <877dof4dgr.fsf_-_@gnu.org> <87k0sfl5pc.fsf@gmail.com> Date: Tue, 26 Jan 2021 22:57:22 -0500 In-Reply-To: <87k0sfl5pc.fsf@gmail.com> (Maxim Cournoyer's message of "Thu, 14 Jan 2021 13:43:43 -0500") Message-ID: <87wnvzyqu5.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-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 45773-done Cc: 45774-done@debbugs.gnu.org, 45773-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi Ludo, Maxim Cournoyer writes: > Hi Ludovic, > > Ludovic Court=C3=A8s writes: > >> Hi! >> >> Maxim Cournoyer skribis: >> >>> Before this change, only plain directories, tar or zip archives were su= pported >>> as the source of a package for the GNU build system; anything else woul= d cause >>> the unpack phase to fail. Origins relying on snippets would suffer fro= m 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 unkn= own >>> 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 us= e them >>> for decompressing single files. Adjust decompression and compression r= outines. >>> [decompression-type]: Return #f when no known compression extension is = used. >>> [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 > . I've been building a sizable part of core-updates on top of this change now for nearly two weeks, and in this time it's already come handy twice. I've made sure the tests ran fine and pushed to core-updates as commit cfcead2e515c0dae02127e5a76496463898be6b6. Let me know if anything breaks :-). Maxim From unknown Wed Jun 18 23:10:17 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 25 Feb 2021 12:24:11 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator