From debbugs-submit-bounces@debbugs.gnu.org Mon Feb 14 04:29:23 2022 Received: (at 53210) by debbugs.gnu.org; 14 Feb 2022 09:29:23 +0000 Received: from localhost ([127.0.0.1]:39719 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJXff-0006Da-Aq for submit@debbugs.gnu.org; Mon, 14 Feb 2022 04:29:23 -0500 Received: from jpoiret.xyz ([206.189.101.64]:36712) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nJXfd-0006DS-3D for 53210@debbugs.gnu.org; Mon, 14 Feb 2022 04:29:22 -0500 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id 436DB184F29; Mon, 14 Feb 2022 09:29:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1644830960; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8UkMd1WPXQoLTdgB5a3xlEZ9q9fZ/ZyxixQ+2gatG5g=; b=IhKbznmQFdv9woUPpfb1j6/JcashcBCyF6tXVhNjBmZ6L7WLK7lA3deaASWYqCVPlsT1sh k7QGizkXYRxxhzd5dp8v9DfhWz8rYYCPQ78eqgygM8qa0rpxMXU4yquRxCWKbLRBOufv00 lnc8wdZgAPUdSw4YLmAY9QM7BI8n+VrLpoD9jtHI4LjkiSTaHLEvTEOQVgPi9J54LVlokU tsGRR1c4GFZzSp4D6aHvftvH40eJNUmdIvUxe4gtOsntjZpCncjqDorUitmPZ9LwP9yD7Z i7YGVEi3wEicFwO/POuilIXrf5u2QgAA5XNEDONSEnf6TuPHSCgy7t57WfSf4Q== From: Josselin Poiret To: =?UTF-8?q?Ludovic=20Court=C3=A8s?= , Mathieu Othacehe Subject: [WIP PATCH 0/4] Make current-guix work when run outside a Git checkout Date: Mon, 14 Feb 2022 10:29:04 +0100 Message-Id: <20220214092908.16801-1-dev@jpoiret.xyz> In-Reply-To: <87lezkrgvj.fsf@gnu.org> References: <87lezkrgvj.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spam-Level: **** X-Spamd-Bar: ++++ X-Spam-Score: 2.1 (++) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello everyone, I've been working on this for a bit, trying to find the best approach. First, let me try to summarize the different ways in which Guix can be run, and how it is built: Content analysis details: (2.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. X-Debbugs-Envelope-To: 53210 Cc: Josselin Poiret , 53210@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.1 (+) X-Spam-Report: Spam detection software, running on the system "debbugs.gnu.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Hello everyone, I've been working on this for a bit, trying to find the best approach. First, let me try to summarize the different ways in which Guix can be run, and how it is built: Content analysis details: (1.1 points, 10.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.0 SPF_PASS SPF: sender matches SPF record 1.6 PDS_OTHER_BAD_TLD Untrustworthy TLDs [URI: jpoiret.xyz (xyz)] 0.5 FROM_SUSPICIOUS_NTLD From abused NTLD -0.0 T_SCC_BODY_TEXT_LINE No description available. -1.0 MAILING_LIST_MULTI Multiple indicators imply a widely-seen list manager Hello everyone, I've been working on this for a bit, trying to find the best approach. First, let me try to summarize the different ways in which Guix can be run, and how it is built: * From a `guix pull` profile. This is the most common. The `guix pull` profile's manifest file holds specific metadata describing the channels that were used to build the generation, which can be fetched by `(current-channels)` from (guix describe). * From a built Guix inside the store, outside a `guix pull` profile. This is what happens when the user hasn't `guix pull`ed yet after a Guix System installation, for example. Here, the only available metadata is the one embedded in (guix config) by the build process, and (current-channels) returns that one. * From a Git checkout. Here, there is no build metadata at all. Furthermore, there are two ways to build Guix: either through the `guix` package definition, which uses the Makefile, or through `build-aux/build-self.scm` which uses `guix/self.scm`. Here, I use the second method, since it's how the current guix is most likely built. This means that, with proper care, all the derivations already have their output in the store. This is only a WIP as there are some unresolved things: I've disabled authentication, since I'm currently testing my own unsigned patches. Should we indiscriminately enable it? This would cause some issues for people that have their own 'guix channel. Maybe we could enable authentication if the channel URL is the default one? Also, when I tried to replace the guix in the installer by (current-guix), it ended up building the Guix derivation multiple times, even though the package is memoized and the package->derivation process should be cached. There's a bit of rift between what the ci uses (renamed here to channel-profile-build-system) and what current-guix uses, since the former builds a profile as a package, whereas the latter simply builds the derivation for the 'guix channel. This avoids creating profile collisions when the package is added to the system profile, but it also means we don't get the package cache generation. Best, Josselin Poiret (4): gnu: ci: Move generic channel building code. gnu: Rename channel-build-system and channel-source->package. gnu: current-guix: Support when running outside a checkout. gnu: package-management: Memoize current-guix. etc/system-tests.scm | 3 +- gnu/ci.scm | 40 +------------------ gnu/packages/package-management.scm | 60 +++++++++++++++++++++++------ guix/channels.scm | 51 ++++++++++++++++++++++++ 4 files changed, 102 insertions(+), 52 deletions(-) -- 2.34.0