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 RC+qK2fAW18hTQAA0tVLHw (envelope-from ) for ; Fri, 11 Sep 2020 18:22:31 +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 CNFvJWfAW1+XIAAAB5/wlQ (envelope-from ) for ; Fri, 11 Sep 2020 18:22:31 +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 330099404CF for ; Fri, 11 Sep 2020 18:22:31 +0000 (UTC) Received: from localhost ([::1]:37904 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGngs-0006Ve-31 for larch@yhetil.org; Fri, 11 Sep 2020 14:22:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56818) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGngV-0006VV-Ae for guix-devel@gnu.org; Fri, 11 Sep 2020 14:22:07 -0400 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]:41786) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGngT-0007vo-Kk for guix-devel@gnu.org; Fri, 11 Sep 2020 14:22:07 -0400 Received: by mail-qv1-xf44.google.com with SMTP id ef16so5672159qvb.8 for ; Fri, 11 Sep 2020 11:22:05 -0700 (PDT) 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; bh=q2kfH0E7ceEyMAPNcugotD4qWqnPnneHpKgR9n4w6u0=; b=LbXSg1eVXMP+fhB1ygPg2XXr5CzQP4gpJjRB9KTEeHAq7cQwAZQCen09rVWlLbDMwh KPGZkCRDr53+plgQwkOXbYzIdFreVPiwCJIseKan0hPEmBXavx083ANpF05kec5uE67K q1YQcRuTUna5aLSBNcIZQ2efMEgROGrlJvtnrYGs3+m/hUA/DvWD4kPpnwGsCGaSLZs0 tG2AbDBoz+J95rZOpySxLyLvI2szL4Y3ebPJ1Y7qoS5ij0d4HFoPnKvKmGr5GppEIuft 5Oxx6qJUoV5jMca0hXWzOpg2KeGJ/cW/ost4s35h+5TxzqzfIUGNo41mbq1gXsDB8+1E wpiA== 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; bh=q2kfH0E7ceEyMAPNcugotD4qWqnPnneHpKgR9n4w6u0=; b=nYe0J6sCGA5zFdjXmcv1mC5ySfv23SJuGl63btvepaRW4fk38tRcef2vw59ZptULVU v5tYZaoxtpzstwVLofXmJxt2pLr+yFfeYoXk7wtJCXcIRRxXLW08CcNAXzqeZmzN6qPP vjiPNPWM3GAdkBamCrTmFRDJn08vAhEvkxhqaqQkWuBGEfMyQkYqK2EN2a6Q81xOnx82 DHhGcW3NXzKHrf3eIxmFrnXQ2uSNZAAXYr1wHP4F2mz0AmIrypllfpbOVTOoZ0sXOX79 lYjgITwl2zrAGRDSr5YYAHDGRDc5QhasnUAIHJEugA7NbNPkCWhHRhgQQueUnzGcid7B YcIQ== X-Gm-Message-State: AOAM533fH/tT/qfEItO+Uou9NHcyUeLa3mLiOn57+sndVMYCZKdzsFIS i2NNLURekvqOQQ3Re0vB97dfk6bDGO/q/g== X-Google-Smtp-Source: ABdhPJy+bS+7dPU5V3RHGZo2LaUu2jIN+Jn1Bfv/IL7fESA04nV5cUhMKyQVXnRaOTq3hLLZEjMOMg== X-Received: by 2002:a05:6214:1706:: with SMTP id db6mr3229625qvb.50.1599848524421; Fri, 11 Sep 2020 11:22:04 -0700 (PDT) Received: from hurd (dsl-10-146-200.b2b2c.ca. [72.10.146.200]) by smtp.gmail.com with ESMTPSA id i7sm3811374qkb.131.2020.09.11.11.22.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Sep 2020 11:22:04 -0700 (PDT) From: Maxim Cournoyer To: Andreas Enge Subject: Re: What should "guix build --source" produce? (was Re: Dependency cycle issues when using a Gexp-based snippet) References: <87h7ssx07p.fsf@gmail.com> <87lfhkj4hr.fsf@netris.org> <20200908072249.GA1469@jurong> Date: Fri, 11 Sep 2020 14:22:44 -0400 In-Reply-To: <20200908072249.GA1469@jurong> (Andreas Enge's message of "Tue, 8 Sep 2020 09:22:49 +0200") Message-ID: <87lfhg6umj.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2607:f8b0:4864:20::f44; envelope-from=maxim.cournoyer@gmail.com; helo=mail-qv1-xf44.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. 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-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: guix-devel Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=gmail.com header.s=20161025 header.b=LbXSg1eV; dmarc=fail reason="SPF not aligned (relaxed)" header.from=gmail.com (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-devel-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-devel-bounces@gnu.org X-Spam-Score: 0.09 X-TUID: Uk4OJBIW6VE5 Andreas Enge writes: > Hello Mark, > > On Tue, Sep 08, 2020 at 12:07:01AM -0400, Mark H Weaver wrote: >> > + (let ((coreutils #+(canonical-package coreutils))) >> > + (substitute* "configure" >> > + (("/bin/pwd") >> > + (string-append coreutils "/bin/pwd"))) >> > + (substitute* "src/corelib/global/global.pri" >> > + (("/bin/ls") >> > + (string-append coreutils "/bin/ls")))) >> > + #t))))) >> >> In my opinion, "guix build --source PACKAGE" should produce sources that >> can be used to build the package on any system that the upstream package >> supports, not just on Guix systems. > > that sounds good to me, in particular taking your subsequent arguments into > account. Guix sources could be just as useful as Debian sources in this > respect. Could this not be the elusive boundary between preparing the source > and adding a phase to the build arguments? Yes, this sounds like it! How about the following section, to help contributors decide between the two? --8<---------------cut here---------------start------------->8--- 1 file changed, 14 insertions(+) doc/contributing.texi | 14 ++++++++++++++ modified doc/contributing.texi @@ -369,6 +369,7 @@ needed is to review and apply the patch. * Package Naming:: What's in a name? * Version Numbers:: When the name is not enough. * Synopses and Descriptions:: Helping users find the right package. +* Snippets versus Phases:: Whether to use a snippet, or a build phase. * Python Modules:: A touch of British comedy. * Perl Modules:: Little pearls. * Java Packages:: Coffee break. @@ -599,6 +600,19 @@ Gettext}): for the X11 resize-and-rotate (RandR) extension. @dots{}") @end example +@node Snippets versus phases +@subsection Snippets versus phases + +@cindex snippets, when to use +The boundary between using an origin snippet versus a build phase to +modify the sources of a package can be elusive. Origin snippets are +typically used to remove unnecessary files such as bundled libraries, +nonfree sources, or to apply simple substitutions. The source derived +from an origin should produce a source that can be used to build the +package on any system that the upstream package supports (i.e., act as +the corresponding source). In particular, origin patches or snippets +must not embed store items in the sources; such patching should rather +be done using build phases. @node Python Modules @subsection Python Modules --8<---------------cut here---------------end--------------->8--- Thanks, Maxim