From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EOGYIDEIbGJ+bAAAbAwnHQ (envelope-from ) for ; Fri, 29 Apr 2022 17:45:53 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6HsmIDEIbGJTKQEAauVa8A (envelope-from ) for ; Fri, 29 Apr 2022 17:45:53 +0200 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 E83CA11573 for ; Fri, 29 Apr 2022 17:45:52 +0200 (CEST) Received: from localhost ([::1]:51598 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nkSoa-0002yU-02 for larch@yhetil.org; Fri, 29 Apr 2022 11:45:52 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46824) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nkSfV-00077z-Tv for guix-devel@gnu.org; Fri, 29 Apr 2022 11:36:30 -0400 Received: from mail-wr1-x42c.google.com ([2a00:1450:4864:20::42c]:46063) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nkSfU-00088f-0E for guix-devel@gnu.org; Fri, 29 Apr 2022 11:36:29 -0400 Received: by mail-wr1-x42c.google.com with SMTP id w4so11247416wrg.12 for ; Fri, 29 Apr 2022 08:36:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-transfer-encoding; bh=oqz1GEK4iPfBz9LomIQdQozHMZOqoJ3z7k59PdnIVvs=; b=PDlI1fXHzt9/Jx9qU1ftzXbK2B9wcI9Ey/CSCeCUsQOCKBYZE6aF5NkBiH4UmAeB22 OI08H++ntyctVO7Zoh+G5dig3XpnQ6X5JnEAriZIY2DlW3BtEOuKmzc4/7Rll5J1VMXO 4Ofr2jdW6r3Ne0Mbgkf+bABGL7D6rw35EMI+hRN9vqOxCGCYhO64X7PPN2lL3u2VWdg3 q+ZRz8nPcY3coAW1EgLrcFyLv4w67famu/YUGy24HL/gNdJtfhwLf4eOnzAIkd0vQavP ktNZzTwD9LNCSFrsseuC6dFWM5r5tM+ylVuaNoeLdDEm0Em9hhvFiDeZZq/vKvYF7jx4 pffA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=oqz1GEK4iPfBz9LomIQdQozHMZOqoJ3z7k59PdnIVvs=; b=WHOIlqgdQXBWidsWXv6VYtvmizXNHcPfl9YsjdC2Xfnk3sLn/yl3ulYbjlFDbCdkhq /9RY2TnlmL3zuCILjB4e84bRIwC79U2lhFwXz5xb/DOR1eFljh3h/qQBWu8QutkvLXfI hW1O53fqTsVxFNQ0OKSy6DH0SygjSJg/z40W8xkAeaDJOnh7OkW51MJVd5+nBsQibLre GeEuOBz/MPNBnAupKyloHqX9cdchj0G+g1Y4WDZy2wZ9Od0Oo3AcECi4pyFqpREGlRm3 /n/TZAzCpue5cWfyCdsJy0/mdQfpNbeGuxrD/qshdMIxvDNOr/8nOySOJi90ecQdFCuu CLxw== X-Gm-Message-State: AOAM531O33TTLtcWzUQ3/83EspHdh4guyF5UeVSSR5RMlpqICDaFBkDb 5shwPGIGR4K5OdUIr1vwlfecoOzG7W8= X-Google-Smtp-Source: ABdhPJxWvY65ju3xJInlc9G5P28wjIQ0l4tjH9iNywFfMG8tsQR43snK0LxsN20nEXbFjWbW9GeqTw== X-Received: by 2002:a5d:64eb:0:b0:20a:ecf8:ac9f with SMTP id g11-20020a5d64eb000000b0020aecf8ac9fmr11797231wri.342.1651246586000; Fri, 29 Apr 2022 08:36:26 -0700 (PDT) Received: from pfiuh07 ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id d9-20020adfa349000000b0020ae7671d70sm3326902wrb.81.2022.04.29.08.36.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Apr 2022 08:36:25 -0700 (PDT) From: zimoun To: Maxime Devos , Leo Famulari Subject: Re: gnu: shepherd: patch, snippet or phase In-Reply-To: <84e13ef7d437062df5cca51a12e6da54929e0176.camel@telenet.be> References: <20220301182848.26694-1-attila@lendvai.name> <20220301184517.13439-1-attila@lendvai.name> <992c3326a10e0bb28491f8226ebbe84aa93ad9ca.camel@telenet.be> <15fbca84-83ed-43cd-9bd4-e187ccadf4ec@www.fastmail.com> <5d684728965ec36c604e9b77f650055269e8588e.camel@telenet.be> <84e13ef7d437062df5cca51a12e6da54929e0176.camel@telenet.be> Date: Fri, 29 Apr 2022 16:36:26 +0200 Message-ID: <87czh0c5xx.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::42c; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42c.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, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 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@gnu.org Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651247153; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=oqz1GEK4iPfBz9LomIQdQozHMZOqoJ3z7k59PdnIVvs=; b=Eb0Y4H+H9VOHn6tpMS8P+4w0BYqtfln4cNsgnDQi0EDvymqsyg+grwTcgfmKwRBz3a9T0s VYymwnafamcQpN1Rct9cAGeY6yYFnRcwVfOuo3FQSBgXtFIyb/JsNli8FxsYthMTQgAjIM XprylXtw8Usrk493VapIphglpo4i+qM2YDCGyfW+G5UgpuhMrdeuHWkCviGi6obiwZi6Lp ccyKN4o+f/biee3JA+hta08Ug3U1YyLoVoT4HYKokT/ot0CR6fK/mypAxAdCvEEU7bC5Lo 1tol8MlbbbJURpgH4oxwtepSVPbDAF6kkxvaxKgiWGTKV772OPQzNGhxxafjFw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651247153; a=rsa-sha256; cv=none; b=IsOxg47Bo0QZ9LP24INdUBWyxfXZMrmHbw8zsDRx4XZfdaHvrnnohYQJs1h+cirw2MUL14 hprqh5CF8balQSNOX8NjnYCRWUda1Zzs84KJ4cHAfJHE6WfcIkeJgW90GFHxHOjZPR/oM5 LZ4768xUpvXWG08oHtbWHg7T0STfmdRBfYYw2kMcEBn93MYYG+Tq0FqMdnvhdNG2EN/J6b qdqXzh3Q1ocIUZxyxSzPpKWOckjVHRzKPDsRkq77A5cf/Ef1m/2xgbpGZbHAT91f12LQf2 jrb/gDBy72AaQcR7sJgUjg5I3k8pt1p/Zj4RVdityhz6TSMDLtE/uijGtgsC5w== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PDlI1fXH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -4.00 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PDlI1fXH; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: E83CA11573 X-Spam-Score: -4.00 X-Migadu-Scanner: scn1.migadu.com X-TUID: E0uB5UdShp09 Hi Maxime, On Sat, 05 Mar 2022 at 22:49, Maxime Devos wrote: > (as implied per zimoun's previous mail (=E2=80=98FWIW, it would be unfair= for > the patch to have the discussion here=E2=80=99), moved to guix-devel) Thanks. :-) > Leo Famulari schreef op za 05-03-2022 om 16:13 [-0500]: >> On Thu, Mar 03, 2022 at 07:25:22AM +0100, Maxime Devos wrote: >> > Leo Famulari schreef op wo 02-03-2022 om 18:50 [-0500]: >> > > Origin snippets should only be used to remove nonfree things >> > > from the upstream source code. All other changes should use >> > > patch files or a build phase. >> >=20 >> > Why?=C2=A0 If it's a source code change and it fits an origin snippet, >> > why not an origin snippet?=C2=A0 Why would the source in Guix need to >> match >> > the source upstream? >>=20 >> `guix build --source` is a tool to provide freely licensed source >> code >> to be used for any purpose, including building on systems besides >> Guix. >>=20 >> Using the Guix tools, there is no way to access the upstream source >> code >> without applying the snippets. The reason for that is that the origin >> snippet mechanism was introduced specifically to remove non-free >> components without making it easy to reverse the transformation. > > It might be introduced for removing non-free components, that doesn't > mean it cannot be used for more. Also, I don't see the point of ease > of reversing here. It's trivial to reverse the transformation induced > by the snippet: just delete the snippet in a git checkout. Well, the point is the FSDG [1] frame, I guess. From my understanding, when --source had been introduced, it was a countermeasure to be able to use hybrid source and still be compliant with an interpretation of: =C2=ABA free system distribution must not steer users towards obtaining any nonfree information for practical use, or encourage them to do so.=C2=BB Therefore, using Guix tools, e.g., guix build --source, it is not easy to reverse what =E2=80=99snippet=E2=80=99 does. I would not say it is trivial to reverse the transformation because the user needs to run =E2=80=9Cguix edit=E2=80=9D, then reassemble the URL, the= n fetch. Otherwise, yes the user could go to the Guix repo, remove the snippet, then run =E2=80=9Cguix shell -D guix=E2=80=9D, do somehow =E2=80=9C./pre-in= st-env guix =E2=80=A6=E2=80=9D. Well, I do not consider these steps =E2=80=9Ctrivial=E2=80=9D. And if one = user does that, somehow they really want to obtain nonfree information. :-) 1: >> Compare that to patch files, which are easily reversed, > > Removing a patch file by removing it from the 'patches' field is easy, > as easy as removing a snippet. I assume you meant the additional > condition =E2=80=98... using only CLI tools=E2=80=99? Yes, somehow. > I am aware of the guideline of keeping the source usable outside Guix > systems. AFAICT, in this case, the snippet modifying > Makefile.am/Makefile.in keeps the source usable on non-Guix systems. > In fact, it makes the source _more_ usable, both on Guix and non-Guix, > by working-around a Guile 3.0.5 compiler bug. So I don't see any > problems here. Well, the question without consensus is what =E2=80=9Cguix build --source= =E2=80=9D should return? a) The source of what =E2=80=9Cguix build=E2=80=9D concretely builds? b) The source of upstream (modulo the removal of nonfree part)? The aim is to be as close as possible as b), IMHO. The exception of patches could be discussed. :-) Back to Shepherd, because the question is originally from patch#54216 [2], the initial snippet was turning a flag: --8<---------------cut here---------------start------------->8--- + (snippet + '(begin + ;; Build with -O1 to work around . + (substitute* "Makefile.am" + (("compile --target") + "compile -O1 --target")))))) --8<---------------cut here---------------end--------------->8--- Somehow, the snippet could be considered as a =E2=80=9Cpatch=E2=80=9C. And= , in the same time, the upstream source will not compile without this =E2=80=99-O1=E2=80= =99, IIUC. However, since =E2=80=9Cwe=E2=80=9C are in the same time upstream and downs= tream, we could fix that without introducing this kind of snippet. Last, because the package is for building with Guix, then it seems more appropriate to have the substitution in the =E2=80=99arguments=E2=80=99, as= v3 [3] is doing. 2: 3: Cheers, simon