From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id iOrAHALbI2KMKQEAgWs5BA (envelope-from ) for ; Sat, 05 Mar 2022 22:49:54 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id WP0DFQLbI2IRagAAG6o9tA (envelope-from ) for ; Sat, 05 Mar 2022 22:49:54 +0100 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 275141DD80 for ; Sat, 5 Mar 2022 22:49:54 +0100 (CET) Received: from localhost ([::1]:52190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nQcHh-0008KH-61 for larch@yhetil.org; Sat, 05 Mar 2022 16:49:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:44784) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nQcHW-0008Ie-SJ for guix-devel@gnu.org; Sat, 05 Mar 2022 16:49:42 -0500 Received: from [2a02:1800:120:4::f00:15] (port=37652 helo=andre.telenet-ops.be) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nQcHU-0007IM-MG for guix-devel@gnu.org; Sat, 05 Mar 2022 16:49:42 -0500 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by andre.telenet-ops.be with bizsmtp id 2lpc2700U4UW6Th01lpdlb; Sat, 05 Mar 2022 22:49:37 +0100 Message-ID: <84e13ef7d437062df5cca51a12e6da54929e0176.camel@telenet.be> Subject: gnu: shepherd: patch, snippet or phase From: Maxime Devos To: Leo Famulari Date: Sat, 05 Mar 2022 22:49:27 +0100 In-Reply-To: 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> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-qAauzhtrerMwWALhAnFB" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1646516977; bh=f0WMFU8l3a0R4sctu3zaiQDNLKKi6oFo/jEPAT8rjWY=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=B8poMlCP6QZiO9k6asRUOV3zeVAVgJ2Vdz56+c0HUqmr5ife+Or4oZXFUitPxisgI 1oSzq+jWho/Wbx62KjMcz6A7a11Xp0SA9Oi7q5OTrkyPrvBfeFs67MW+raRLfjRM3M kxLmzjMSwwvQ75JtMfFXEZ5dX9ZXNiQn1LSQ/ASVTKJ5zcjgw4qu17AP+cuZ14F3gB Y+vZtinPSJEL73s18Q7KYaNVqVtfC3L/mgLLwH97+pOWtPnIJDAqU1QlQmoO+zpAfg 7Nqr+yXlU+2ozX/PnP3gVHxXJOImbX1iIOuSe8IQULvSeom5FCI+moW/jvVVMtyWUX JrNE6FyjFERcQ== X-Host-Lookup-Failed: Reverse DNS lookup failed for 2a02:1800:120:4::f00:15 (failed) Received-SPF: pass client-ip=2a02:1800:120:4::f00:15; envelope-from=maximedevos@telenet.be; helo=andre.telenet-ops.be X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 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_LOW=-0.7, RDNS_NONE=0.793, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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, zimoun Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1646516994; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=f0WMFU8l3a0R4sctu3zaiQDNLKKi6oFo/jEPAT8rjWY=; b=MGGbQGeV7beTeAKpLwg4+XDtEaA3d14e47tTnxqrXt18FFC9RNPe9taNUyeRs7+ayF/rlt 1vY9OsLQm6vFauHSaEQ93hCHugRGUt28+TwPRF1tUfelcf2r0YT62Co7hX2qgryprkgwx1 lGc9WgDiQ1xUbcoE/chemunYuNkok1D3ij/TmEv3VNNzT0jtr/B0EZkih45eBwU9hQLkZc 9puL21Dc7praHZ+h7a5XGDppfor8My0RQVApOnKZ8suhZXNDU2v+1A/sbUZHllAdZqcad6 VTmB2+Uud5lpQ/STngkWkPXb+hnVNVJpp6WjZDKvVAhjwDMPUPcW83IXdOyhjQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1646516994; a=rsa-sha256; cv=none; b=WHCiR3TTj4RIPunZ18ueFqUlhTIuhs4BIjfQF53ft6CJUERXi7YnpnfWewvL4ewkEYTFYK Ye6urzF+W8uMzr6YTyZJjsZTx3N/NWh1IkHz0E+I4LkK1nLCMlBQMOwnvM7eBhRP8boRAs b2S/jbbQEtk4Mi4HYtTvsSB2Sw0i1KhfOjJKop4OnWo0bE5fqi+tWJu9P0wPSY+KY+KGHs PXdMvpDRPPeeKI0suoj8KQu6B8nDzobkb5kw6zsXclr9AKiL8oi27GBCtwfOpikkGQCWr/ CEXVmeR+zX76zsAtzwnV4H1WG36KLtsdHW2Vv6x3HuP6aGA9y74EkIpQMIp84g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=B8poMlCP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: 2.96 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=telenet.be header.s=r22 header.b=B8poMlCP; dmarc=fail reason="SPF not aligned (relaxed)" header.from=telenet.be (policy=none); 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: 275141DD80 X-Spam-Score: 2.96 X-Migadu-Scanner: scn0.migadu.com X-TUID: gJTqpHfqTHot --=-qAauzhtrerMwWALhAnFB Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable (as implied per zimoun's previous mail (=E2=80=98FWIW, it would be unfair f= or the patch to have the discussion here=E2=80=99), moved to guix-devel) 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. > 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? In that case, you have to: (1) run "guix build --source ..." to compute the patched source (and maybe unpack), then (2) somehow know there's a patch to revert, (3) clone guix, (4) find the location of the patch in the git repo, (5) figure out the invocation of 'patch' command, and possibly (6) repack the depatched source. =20 As such, reversing patch files seems rather difficult to me, it seems much simpler to just delete the patch inside Guix, and then we might as well have used a snippet originally. > and build > phases, which do not apply to `guix build --source`. >=20 > So, we have to be careful when using snippets, to ensure that the > result > of `guix build --source` is useful on any system, not just Guix. >=20 > More info: > https://guix.gnu.org/manual/en/html_node/Snippets-versus-Phases.html >=20 > Please let me know if these guidelines are still unclear. 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. Greetings, Maxime. --=-qAauzhtrerMwWALhAnFB Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYiPa5xccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7t6bAQDv77427/tz/CCh3iTxaRR9lLzo 2kQ2iRNm7g2lZjnDmgD9G5Lq1RNj4WDBC3Wzn178FHQbxxZg6Y4jJKyfbQoQRA8= =NTt4 -----END PGP SIGNATURE----- --=-qAauzhtrerMwWALhAnFB--