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 UKC/MV4H+2aGfQEA62LTzQ:P1 (envelope-from ) for ; Mon, 30 Sep 2024 20:17:34 +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 UKC/MV4H+2aGfQEA62LTzQ (envelope-from ) for ; Mon, 30 Sep 2024 22:17:34 +0200 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=tulhLV5u; 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=1727727454; 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=Q/mT6iLuHidqE5DlDhEUkSFACOj3cp1FURQMb1CQSu8=; b=Pff12yOemA5KAVYtZ9Bo+WBw3p9Re+aYNpDv79yjkRwAXpKvqdA+ff5oUMai6VmL2rsuja MvRUX477ZkVNKBEGdoTXmxv+/Ak3TFnkIQNhIjdptvmxV9UPcbciHsuM2zEPnGhQD7UtPY r7lbCTYln7882NOmxZOc8gYlju9G6bgdFORnpegkjYvcb21QbYPWqWtJ7x+Dy7x3oM3IND sHEksIsovsEbD9plKvinp/yD7A/UAg8XTtBeDtezeJGzSwML8BYMBsUbknCIOw/pPghDCY 6cR4Lv04qq4L5dWiCYCbNZTmViEXAJIXzsA7HY0ma0B12MP7DuXj5pIExYLCcQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=cyberdimension.org header.s=dkim header.b=tulhLV5u; 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=1727727454; a=rsa-sha256; cv=none; b=rPFTqrV5wtypm3xrH50ke/BkiMdkxixmOq4MV3VXRx3kz7TUBUqXl2nVqxvL7nBvL1SwtW O6h8IiqWWLySDIJyCvyMM+KOap0qZHoCiRaqtmWgwxYWBVAYFoNIoYI021Gr2GQSPT6is1 X56q9i2PaDU1QndwxP31+tEdac8kvF3rCyzbTG8rvhvk9Z6g5Ol3v9fZ8oEV+P44PNoQxC /Bi7qVJ4RsJDjULIU8qUDa1+sWVyHbP/FZZlCOUuA+kZbK3CRD/cDOLPJ712T3dWjBLOVt jw4UGNe6VnK9qEmk9UGuUClrQrVIhaBT3UxD/wcOPzZOch39UcvIPlNGRg6lDw== 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 61DFC7E003 for ; Mon, 30 Sep 2024 22:17:34 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1svMpM-0002rp-Pb; Mon, 30 Sep 2024 16:17:06 -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 1svMpD-0002lS-Dq for help-guix@gnu.org; Mon, 30 Sep 2024 16:16:55 -0400 Received: from cyberdimension.org ([79.143.250.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 1svMp9-0006P6-Ul; Mon, 30 Sep 2024 16:16:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; s=dkim; bh=Pu5Ett1/iPquKK6 JYR0x6yNQ0qYLS8I1S0TFFvZGBcI=; h=references:in-reply-to:subject:cc:to: from:date; d=cyberdimension.org; b=tulhLV5u8fpP/Org+1z6fGK7ucsKvWbcQxW tQ1Nyw38acwFK76NjBPlGx7NKkX3+5iAN64WU3pIcJ9NMZgOnw8qYr59sLWMr+YSPbEOIJ v5ILt1iljAgBcCG4wfHXkIZ+rWHbZ0RVUNCCZLj1sKQ/4wFEAcgm7F79lmBLFNhXUsRVNE tiDpLEhE4nScvvrkMiIPXjb6DRe83X7sIqJkqhSfkDspROEfRET3rlRI63pkZVjvau/fpT QHaT1oUSZFHbcKElQspji62wj0dYL/zDMQAVYK6D+nHKmCom2+iqrJlrK7tMmuj984estF SyUanI64jiTGDuUEf9Ppuk+1F6A== Received: from primary_laptop (localhost [127.0.0.1]) by rockpro64.cyberdimension.org (OpenSMTPD) with ESMTP id 2f4f3dfb; Mon, 30 Sep 2024 20:16:41 +0000 (UTC) Date: Mon, 30 Sep 2024 22:11:34 +0200 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: <20240930221134.405ecf9e@primary_laptop> In-Reply-To: <874j8oexq9.fsf@gmail.com> References: <20240523020925.1cb0bb2c@primary_laptop> <874j8oexq9.fsf@gmail.com> 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_/e=+IdZ2z.i..afCN3dvtelW"; protocol="application/pgp-signature"; micalg=pgp-sha256 Received-SPF: pass client-ip=79.143.250.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, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, 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-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Queue-Id: 61DFC7E003 X-Migadu-Scanner: mx10.migadu.com X-Migadu-Spam-Score: -1.40 X-Spam-Score: -1.40 X-TUID: yfWFuI9i8a1x --Sig_/e=+IdZ2z.i..afCN3dvtelW Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Wed, 17 Jul 2024 19:26:22 +0200 Simon Tournier wrote: > Hi Denis, Hi, > Well, I do not see any reply to this message. So even very late. :-) Thanks a lot, the answer is very useful. My work on that was postponed a bit due to more urgent things, but I'm now back at it.=20 This is important to me because I need to distribute some free software in a Guix image, and one of the thing blocking the publication is the problem of free software license compliance (the other is documentation but most of the work is done now). > In case you would like to get all the sources required by the system > image, well I am not aware of any easy way. Thanks for confirming that. > From your configuration file, you could extract the manifest file > which includes all the packages and based on that you could apply some > =E2=80=9Csources=3Dtransitive=E2=80=9D options. I've tried this approach, and if the manifest file is the one in the profile, then some software is missing[1]. I've then tried another approach that you probably mentioned in a recent Guix event in Paris and it looks much more promising but I'm probably lacking some knowledge to make it work. I managed to get the image .drv with this command: > $ guix gc --derivers \ > /gnu/store/lv3sjmhpyjqlzx45im7nyav96sml2k5g-disk-image=20 > /gnu/store/qb7inmjc7z5qal98dj9q9xfdcflkxyzf-disk-image.drv So from that I can easily parse the drv from functions found in Guix (read-derivation-from-file, derivation-prerequisites, etc) and I can get much more dependencies but with it I end up listing paths in the store which are indistinctively binary packages and source code. Here's my code: > ;;; Copyright =C2=A9 2024 Denis Carikli > ;;; > ;;; This file 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. > ;;; > ;;; This file 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 derivations)) >=20 > (define (endswith str value) > (if (< (string-length str) (string-length value)) > #f > (string=3D? > (substring str (- (string-length str) (string-length value)) > (string-length str)) > value))) >=20 > (let ((drv (read-derivation-from-file (list-ref (program-arguments) > 1)))) > (map > (lambda (d) > (let ((path (car (derivation-input-output-paths d)))) > (display (string-append path "\n")))) > (derivation-prerequisites drv))) And the result: > $ guile read-derivations.scm \ > /gnu/store/qb7inmjc7z5qal98dj9q9xfdcflkxyzf-disk-image.drv | \ > grep findutils > /gnu/store/dxqgxqbvymk5lf1qr31ij22h50yll94h-findutils-4.9.0.tar.zst > /gnu/store/nmf6js0s9ia3vfli3k2nziaf7s3pj0q4-findutils-4.9.0.tar.xz > /gnu/store/k09x52pcgw0j8qkvvh5814d87caq2wgn-findutils-4.9.0.tar.xz > /gnu/store/w4s21yc1m6fpmxcnkcw9zhlkf07mwjgn-findutils-boot0-4.9.0 > /gnu/store/b5c62i99dsfa5j0j3f8g2j1xdi6fih22-findutils-4.9.0 > /gnu/store/w4p913kmnga3xh80vx8vnkri42dcmqi3-findutils-4.9.0 So here I could easily keep only the tarball archives, but then it breaks with source code coming from git, and I've some that I need to redistribute in the final image. So if there is some way to distinguish between source code and binaries, then we could simply redistribute the source code only and this would save a lot of space. If not we could still ship it all, but it'd be harder to justify to the people that will host all that. References: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D [1]How to reproduce the issue: ------------------------------ I used this file: > ;;; Copyright =C2=A9 2024 Denis Carikli > ;;; This file 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. > ;;; > ;;; This file 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 (gnu) > (gnu bootloader)) > (operating-system > (host-name "minimal") > (bootloader (bootloader-configuration > (bootloader grub-bootloader) > (targets '(file-system-label "Guix_image")) > (terminal-outputs '(console)))) > (file-systems > (append (list=20 > (file-system (device (file-system-label "Guix_image")) > (mount-point "/") (type "ext4"))) > %base-file-systems))) And I've Guix 56cd9c6735ca1b9bb475291b460d0d2f18352ce1: > $ guix describe > Generation 86 Sep 28 2024 14:59:01 (current) > guix 56cd9c6 > repository URL: https://git.savannah.gnu.org/git/guix.git > branch: master > commit: 56cd9c6735ca1b9bb475291b460d0d2f18352ce1 I then created an image: > $ guix system image minimal-system.scm > /gnu/store/lv3sjmhpyjqlzx45im7nyav96sml2k5g-disk-image I can then mount it: > $ cp \ > /gnu/store/lv3sjmhpyjqlzx45im7nyav96sml2k5g-disk-image disk.img > $ chmod +w disk.img > $ udisksctl loop-setup -f disk.img > Mapped file disk.img as /dev/loop0. > $ udisksctl mount -b /dev/loop0p2=20 > Mounted /dev/loop0p2 at /media/gnutoo/Guix_image. And for instance I've the ath9k_htc firmware: > $ ls -d /media/gnutoo/Guix_image/gnu/store/*ath9k* > /media/gnutoo/Guix_image/gnu/store/d5xz8k0wq0qmr7c3p90r6njxk3fgabk2-ath9k= -htc-ar7010-firmware-1.4.0 > /media/gnutoo/Guix_image/gnu/store/rx6azgdb3ahxv5lpdl35l717r0a1gg1h-ath9k= -htc-ar9271-firmware-1.4.0 That gives me two manifests, and one has linux-libre and the other the rest of the sources, but the ath9k_htc firmwares are missing. > $ sudo find /media/gnutoo/Guix_image -type f -iname "*manifest*" > /media/gnutoo/Guix_image/gnu/store/prap0f3zbsa3rm6mcvqn0dqzix04yd4j-profi= le/manifest > /media/gnutoo/Guix_image/gnu/store/y34lb0srz4yacn3x8i1k8pkphwk0irvs-profi= le/manifest And there is no mention of ath9k: > $ sudo grep -i ath9k /media/gnutoo/Guix_image/gnu/store/*/manifest > $ Denis. --Sig_/e=+IdZ2z.i..afCN3dvtelW Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEeC+d2+Nrp/PU3kkGX138wUF34mMFAmb7BfYACgkQX138wUF3 4mPMqg/+OkKLMB+r5aPoVams0aZiDB1VDhnVkjxdPSjzBgOUiob17N3TATmrakRN mf/noyRJo753jl3b49tcbQskVK6sxqptcf31fl7IvfswfNi2Tdgy9OYMVErOhVTE mwOHDJSCZ9NJQ6WWZ1Mt4khUO2Fnw6RSfKFDuw3Y2j0bJayuAG8ENPYtoK2O0hfB n6UX7xYwMaTncQXLGYrMR4MuEAB9P1855l28GYYBOOiXLNEA18sc7tIOOgvmH2He xD3msf772+NRFT3oCbwbFvKO7R50mVXhSOHr070gOSY+lwsqXGAP3owEytKhe27g 43uOCJLLpHiG5avWSs9qRFL28/FAZm/6CLtF6BOee7f6DUU1hVboGsFj2DdtxVdY IXWjI8SoPKDsQvNC9WpXTU8/b/p0O6KhnOnbsmQkAg3s5Un2BFuxW7kU6TR4TIQi kwO3CdRA7lk7728jqdF6EFgmD+B75vzv33jNFUpwpbp/u+2R6irgPQKMAcRCfeDU D0KsAxTuXFdA3fz2XbiIVeJPxeGR5UhrmEbO+ZYM7iuFwf4RlSmE5+GPnFWYn26t LGHaHjc4UUpQxeodJIsD5yTInB9ObFEuYclkL3wnIsE6BFRrl+DKyASi9U8UFBfx h5gvJZq/TCsDEBV+X1iBNjN5+eZN1NkaErmgiCYQjr9qq45mfvI= =nho8 -----END PGP SIGNATURE----- --Sig_/e=+IdZ2z.i..afCN3dvtelW--