From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 0Ie0FmIZMWR8ggEASxT56A (envelope-from ) for ; Sat, 08 Apr 2023 09:36:02 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id EDedFmIZMWQNMgEAauVa8A (envelope-from ) for ; Sat, 08 Apr 2023 09:36:02 +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 D262F1A7D5 for ; Sat, 8 Apr 2023 09:36:01 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pl36a-0002mk-Vk; Sat, 08 Apr 2023 03:35:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pl36Y-0002mW-9u for help-guix@gnu.org; Sat, 08 Apr 2023 03:35:22 -0400 Received: from lepiller.eu ([89.234.186.109]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pl36V-0006yw-Ez for help-guix@gnu.org; Sat, 08 Apr 2023 03:35:22 -0400 Received: from lepiller.eu (localhost [127.0.0.1]) by lepiller.eu (OpenSMTPD) with ESMTP id 14024262; Sat, 8 Apr 2023 07:35:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=lepiller.eu; h=date:from :to:subject:in-reply-to:references:message-id:mime-version :content-type:content-transfer-encoding; s=dkim; bh=x8SH8FwCb8QM BLizrqHHAcdoBdsuG5ktqLC4YjzAxaA=; b=cZyuSDMMxvTELwlYHBcInPVQQBGl 60V2Pp9uuErasstIQ3VLDv3Jkg4o/3Z6mdYPK/Xo5+UDWccqHeZc/dsJpfLUuWtl oMfxPdBXF92Oi9li0y4WHdxLK9ROFXjNE52wmphyIvMqYG35ltBy5rJ9wy3BlETq rKUrlkmg6WhJzBImCVRKP0Mw+bPR2t4E35fVHbdSCA5oN/sDlsOePm5uQKNEjY3S r/lCzvXpn5h73J/IFShbgPAw+6QO1WEk+d0ba9LOqQD6XT1TwsUQgJeantEfhHhK 3mhs/fWRbx6Nn/jmBnqwRy0slkSGWs8lnUIq/YW6d6p+uRL8oFj9kPzDzg== Received: by lepiller.eu (OpenSMTPD) with ESMTPSA id 3f550096 (TLSv1.3:TLS_AES_256_GCM_SHA384:256:NO); Sat, 8 Apr 2023 07:35:12 +0000 (UTC) Date: Sat, 08 Apr 2023 09:35:10 +0200 From: Julien Lepiller To: help-guix@gnu.org, Rodrigo Morales Subject: =?US-ASCII?Q?Re=3A_Newbie=3A_What=27s_the_importance_of_*=2Ed?= =?US-ASCII?Q?rv=2C_*=2E-builder=2C_etc=2E_files_in_/gnu/store=3F?= User-Agent: K-9 Mail for Android In-Reply-To: References: Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=89.234.186.109; envelope-from=julien@lepiller.eu; helo=lepiller.eu 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, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1680939362; a=rsa-sha256; cv=none; b=SOfKryEA8Ll2AkdWKdoN2plIouQLSEKiybzzCZEg2vBX7yfCcD09wkaDPlxs1rCaYazzlC aHmdvwuuXCwQsFkyjSBjVLHNs+pzFIQurfTCKwWkfllkdWL9+dL2FMuOTNLM0ku+qINzSH N9uofKt3ZTT+EtetLJ9fvZZfyWKMJplXKcUWSuIdtk9NQEr9+cpu6h0bcu7i+8lzG8h+I1 2JYsLpUvePos5o6+aq5sSeMp5kZezJIekOHPS/OQH1/rYaeGVkenGGKssq6QlJAegTcMGw ugqtlCshlP2L5WcNn2k6mHZZ5pbjiUpZJHVlOgvE4RRRZlFf4ByjLGNinVQuAg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=cZyuSDMM; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1680939362; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=OzgzyCL00ffPeswmU2eZeBvNWQoyGphXdxKaDBjJPHo=; b=nmiXUX2sdViBH36S8nvM8k0KM8VLeC886vGO5wjkuQ8BrOertsoQxUThMLiVyD2oVEgRjx z1b0xGBX5K7oLu2UoYMc2ZH0xH8bsfzSayLUU2EwvYFEbJk22idHZUqRjjdMIfJmjVRMGB m9kqdv7tycixCyVOuRalTRuGhxXPrwzVtFGAXkLhPLpZzp+kbICpZwfs9pwkjrC4sBfXTq jIrZPSu2QLIOOBqlMj0AiOgE6s/S8DtFVXBYo+QtJfKxbJPH+GqKP2sNBqQndlwqJtMMPS TlY8ZTuaOYVctZOFnALXfeizbXoSUBGM0iwFzG4aNQNsx2lkeJyMZeJXZnjzXw== Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=lepiller.eu header.s=dkim header.b=cZyuSDMM; dmarc=pass (policy=none) header.from=lepiller.eu; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -5.71 X-Spam-Score: -5.71 X-Migadu-Queue-Id: D262F1A7D5 X-TUID: VNhMrHaZCwki Going step by step, Guix performs the following=2E First, it needs to download the original sources of the package=2E When cr= eating a store item, most of the time, the guix daemon is involved=2E The daemon's purpose is to take a lower-level representation of a build pr= ocedure and turn that into an isolated build environment=2E This is called = a *derivation* and it is stored in the store as a `drv` file=2E For downloa= ding a file, the derivation simply contains the URL to download and the dae= mon performs the download itself, so no isolated environment is required he= re=2E Then, the package contains a directive that informs Guix there is some sor= t of change to make in the source=2E There is an issue in the upstream sour= ces, and we need to apply a patch=2E A `=2Epatch` file is a standard file u= sed in many projects to represent one or more changes to a file or a direct= ory=2E It's not specific to Guix=2E To apply the file, the daemon needs to create an isolated build environmen= t where it can apply the patch=2E Although a derivation can specify how to = make a build environment (it specifies inputs (dependencies), the type of s= ystem, expected output, etc), it does not say *what* to do with it=2E The guix daemon does not run inside the isolated build environment (the "b= uild-side"), but it needs to run something in it to get things done, someho= w=2E This is the role of the builder, which is created by Guix and is deriv= ed from the package definition=2E It's a standalone Guile script that is ex= ecuted on the build-side=2E On the build-side, the builder extracts the original archive, applies the = patch and archives the result as a new `=2Etar=2Exz` file=2E Now, Guix is ready to build transmission=2E To do so, it creates a new der= ivation `=2Edrv` that instructs the daemon how to make the isolated environ= ment for building it, and a builder `-builder` that the daemon will execute= inside the environment=2E The build results in the transmission outputs=2E To summarize, Guix needs to: - Download original sources, which creates a derivation (drv) and results = in downloading a tar=2Exz to the store=2E - Put a patch (=2Epatch) in the store from its own sources, which doesn't = create a derivation=2E This is because a derivation can only refer to anoth= er store item=2E - Apply the patch to the sources, which creates a derivation (=2Edrv) and = a builder (tar=2Exz-builder) that result in creating a modified tar=2Exz in= the store=2E - Build the transmission package, which creates a derivation (drv) and a b= uilder (-builder) that result in the transmission outputs you wanted in the= first place=2E HTH!