From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms13.migadu.com with LMTPS id YNlrAKsaQWfXXQAA62LTzQ:P1 (envelope-from ) for ; Fri, 22 Nov 2024 23:58:35 +0000 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1.migadu.com with LMTPS id YNlrAKsaQWfXXQAA62LTzQ (envelope-from ) for ; Sat, 23 Nov 2024 00:58:35 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=cyberdimension.org header.s=dkim header.b="aM/ctAgf"; dmarc=none; 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-Seal: i=1; s=key1; d=yhetil.org; t=1732319914; a=rsa-sha256; cv=none; b=utVcrC9BreNXM7ff8cchPRkG09ogYEn5dXuRL6JCJQmQ6aWm3NY4gC9YcHsrAIrRX9q/DX Bkd/uyo+L4JYYnNv4kHPaJ9r+BLGhOSjdpYywB88XrQmC+0ibZiKlCeGj9m5jmdljCoQEP k83VhbraNjVq/lONaCowSUbBkNxHplKUeyvtN+TRB5xSNoiS77QSF3hRNi+7Zm4FgfcClA 1d/Kwgk/LtWyCk3Wgx/0T2NeE0ErV5qcMaS2AsGkflbPJI74dxKHoSR6gyuGfUfGQB7d7B WNVUHD7NA2h1PAGVse4yEW4y7WFkZnlmfoZxBOwxhm3TmwWYFnPATzPQOnCRjA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=cyberdimension.org header.s=dkim header.b="aM/ctAgf"; dmarc=none; 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=1732319914; 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=Yf1raa5i9gTOK6saw4y8IHEKvM3lAUB+8g56F+l0uYU=; b=DdSITHZPvEuIqNub/aWQCW3MHdI4I67VH3fUhOIMuuT5sBdnLzlrnw4l35b5TA21yvEeG7 hEL7RvaYB30Xo8+QP+q41fr93+4q13ZkHmaZPJ194n1DmSdTx2jCDQSO8KLV+m2xzrhpC5 AWeCA2RJnkhDS3EBJOJtRscQ2hyDZ1NlD4yL/cuih/R61kZdP2t3PIlcKxQvU4uCF43nln JCcrEuzdHafL/LvB6JwGBDDh2il72HhbIMB49mfXVpke3DOjqoq6//I1VAHedoMIUAEmx1 /MJM193iyoeMD+VKQdln1e4hjilKjaAWl8IdHfcnnInuVRsbeOAgnH2KJf6xXQ== 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 A9F5E8E4D9 for ; Sat, 23 Nov 2024 00:58:34 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tEdXL-0005GO-S4; Fri, 22 Nov 2024 18:58:07 -0500 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 1tEdXI-0005Ek-Nz for help-guix@gnu.org; Fri, 22 Nov 2024 18:58:05 -0500 Received: from cyberdimension.org ([2001:678:938:3ff::36] helo=rockpro64.cyberdimension.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1tEdXG-0003om-C6; Fri, 22 Nov 2024 18:58:04 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=2c9aCcGS4WUhdI1 oW1UDXVxb28f7/4roS8qLiR27OXU=; h=references:in-reply-to:subject:cc:to: from:date; d=cyberdimension.org; b=aM/ctAgf1X/BW3jQKYZKUgH/Jpap1Lsm7WN 7i7oLhAVEu5tzT8+/J24TyVxApqeSsTl5jNx0g4GNqusxxrGEKQpOZEASxyxKHN+MLfJt6 Xz9Sql2Qub8CLz9+a0cFZwzQOC5Ou+qwxnGyNBOXyy3azbUgNdHOmDfqsoPKFfrGGGNNRS 5H9OdfXg7LtqE5sxMUK+LJlphEQmLgXG8fNFOAdfNJbpWRX39kBBgzY1EKaoksKemorhf+ e94Oy43DRtJpWYwYdjod1epZWTtFVduiThvIJxvjuOpiUWLTLRnC92ValxPg2dsg7R/0ZX ouqPSF8gp+f8l43ZbtyvOrushtg== Received: from primary_laptop (localhost [127.0.0.1]) by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id 1807dca7; Fri, 22 Nov 2024 23:57:56 +0000 (UTC) Date: Sat, 23 Nov 2024 00:56:06 +0100 From: Denis 'GNUtoo' Carikli To: Simon Tournier Cc: Adrien 'neox' Bourmault , help-guix@gnu.org Subject: Re: License compliance when redistributing images built with 'guix system'. Message-ID: <20241123005606.6ab10a76@primary_laptop> In-Reply-To: <20241118133843.2f1787b7@primary_laptop> References: <20240523020925.1cb0bb2c@primary_laptop> <874j8oexq9.fsf@gmail.com> <20240930221134.405ecf9e@primary_laptop> <20241118094141.44e5487c@primary_laptop> <20241118133843.2f1787b7@primary_laptop> X-Mailer: Claws Mail 4.3.0 (GTK 3.24.41; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/4m=DuPon17jOOA3gzvQL2Zg"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=2001:678:938:3ff::36; envelope-from=GNUtoo@cyberdimension.org; helo=rockpro64.cyberdimension.org 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_NONE=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 X-Migadu-Spam-Score: -3.47 X-Spam-Score: -3.47 X-Migadu-Queue-Id: A9F5E8E4D9 X-Migadu-Scanner: mx10.migadu.com X-TUID: zvCkcGDztLLk --Sig_/4m=DuPon17jOOA3gzvQL2Zg Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, 18 Nov 2024 13:38:43 +0100 Denis 'GNUtoo' Carikli wrote: > On Mon, 18 Nov 2024 09:41:41 +0100 > Denis 'GNUtoo' Carikli wrote: > > But now I have another problem: some of the paths don't exist. For > > instance the code above lists > > /gnu/[...]-ath9k-htc-firmware-1.4.0-checkout which doesn't exist. > I've found an idea for working around that: I can get the file name > and loop over all the packages, match a package's > origin-actual-file-name against the name above, and once we have the > package we can simply run guix build --sources=3Dtransitive with it. This turned out to take way too long. I've talked again to Simon Tournier in a Guix even and he pointed to me the missing part: guix build can build a lot of things, including derivations and all, all I needed to do was to pass the right path to guix build and it would figure out what it is and build it (if it can). So at the end this gave this small source code: ;;; Copyright =C2=A9 2024 Denis 'GNUtoo' Carikli ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. (use-modules (guix build utils) (guix derivations) (guix scripts build)) (let ((drv-from-file (read-derivation-from-file (list-ref (program-arguments) 1)))) (map (lambda (drv-prerequisite) (map (lambda (drv-output) (if (derivation-output-hash (cdr drv-output)) ((lambda _ (let ((source-path (derivation-output-path (cdr drv-output))= )) (if (not (file-exists? source-path)) (guix-build source-path)) (if (not (elf-file? source-path)) (display (string-append source-path "\n")))))))) (derivation-outputs (derivation-input-derivation drv-prerequisite)))) (derivation-prerequisites drv-from-file))) It can be used with something like that: $ cp $(guix gc --derivers $(guix system image minimal-system.scm)) image.drv $ tar cf sources.tar $(guix repl get-sources.scm image.drv) There might still be room for testing and improvements though but we now at least have something that can be used to easily publish complete and corresponding source code of images in a safe and easy way. Thanks a lot to Simon for all the help as this help has been extremely useful in pointing me in the right direction multiple times. Denis. --Sig_/4m=DuPon17jOOA3gzvQL2Zg Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmdBGhYACgkQX138wUF3 4mN4ThAAguKQDt8O4HvFdbFuNA7pBYejC2fDDZk2v3vNdyKrvbN9jvnKuCaBkP8n Di6Wu9Hps9jl8WvbubpbX9naGvO6B2Cn+YvtVd7MXoZhr8zpef+HM8J4+pymxWyE l9zDTQVb7acWkid2kicJU8gVHmmz3JU6EDXd/GROetWgIkow6gWOGRux7JDqA3yI UftXLzTMVcnXSj9P7SX2RAJtWBnl5d/R2iGwmrqHKEJ+JQ0Kspld5NgPrS0jQ/1U 232KBZWPeS1lRcjlD7mF10uE1j4R44s2TJCvzuk+G6nZ856gK2NN+Rr5fMeHTa8p Qh8xgbhsHQNIfbDVJXvdQ/uBe3HXSQX+4Ccvd3syFn2bUfHwHiYvfAFqVVDIGqCX 73O96q+5pHUCD6UtCz9mw5aeLLvlYkrn9XtHbULgfnLnZshn3er7F5VuQxRFevea bu5sZXT3EUjZX39EQjILgKWa+/Dm/DVPi/uyF8oHK8DfIb+wERFY7yrkRKYyynnN dYpeboMVhN6+iu+HFakrmlKFRzs50+VZ4DC5foLEJqTNUdzibtUSzoqJMDr9Kx7v gMrCuZlvvb7Ts33MTVnCarH3Dvmw1Jo3AfzUJ5RIZT2eyRg0oFQdin3056OiESFl ppYjwTpO9YJgQSCXKvNkHu8h3/iLoUTI4DzTyenvhobNXIYQ4e0= =acL2 -----END PGP SIGNATURE----- --Sig_/4m=DuPon17jOOA3gzvQL2Zg--