From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id aFteAR/AiGR7iAAASxT56A (envelope-from ) for ; Tue, 13 Jun 2023 21:14:39 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id KKJNAR/AiGSoXAEA9RJhRA (envelope-from ) for ; Tue, 13 Jun 2023 21:14:39 +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 A94602F27 for ; Tue, 13 Jun 2023 21:14:38 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q90k2-0007MD-94; Tue, 13 Jun 2023 05:55:10 -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 1q90jw-0007M0-Ov for guix-patches@gnu.org; Tue, 13 Jun 2023 05:55:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1q90jw-00082a-Aw for guix-patches@gnu.org; Tue, 13 Jun 2023 05:55:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1q90jt-0004cJ-Rm for guix-patches@gnu.org; Tue, 13 Jun 2023 05:55:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#63766] [PATCH 0/4] Image for HiFive Unmatched Resent-From: Efraim Flashner Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 13 Jun 2023 09:55:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 63766 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Tobias Geerinckx-Rice , Simon Tournier , paren@disroot.org, Christopher Baines , 63766@debbugs.gnu.org, Ricardo Wurmus , Raghav Gururajan , jgart , Mathieu Othacehe Received: via spool by 63766-submit@debbugs.gnu.org id=B63766.168665004217676 (code B ref 63766); Tue, 13 Jun 2023 09:55:01 +0000 Received: (at 63766) by debbugs.gnu.org; 13 Jun 2023 09:54:02 +0000 Received: from localhost ([127.0.0.1]:41318 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q90iw-0004b2-Cp for submit@debbugs.gnu.org; Tue, 13 Jun 2023 05:54:02 -0400 Received: from mail-wm1-f50.google.com ([209.85.128.50]:42227) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1q90ir-0004aR-4B for 63766@debbugs.gnu.org; Tue, 13 Jun 2023 05:54:01 -0400 Received: by mail-wm1-f50.google.com with SMTP id 5b1f17b1804b1-3f8d5262dc8so1156915e9.0 for <63766@debbugs.gnu.org>; Tue, 13 Jun 2023 02:53:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1686650031; x=1689242031; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=IzWrgbQ1ifcA6QpoY3GAhb5JkcM5vJWg4mo7ygnwvZ0=; b=jLfrG5IkU4UmGRZOIDwX/AhZHYx6yRIYzVkn6biBPLHMNfpcqSEMGZVbsW9BAXCD40 VneZKmK3ctr/nKdKu0FG1f0/laIZrhyR6tEndm8ak3PARgVXMCbpstsAFFK06Csho9a4 cYQCQl6XgPmFhXdGY8NRuhMiPSL/Sv18sPVC6EXkOw9SdOgKkPx16EJe62oi4OKLM7sb tuvSnuNP//u4mrL++RJawVqD34q7FvGHVeSWs1c1FS++X/qbAQFsaOx4s+U2VlMZn4d/ grMAMXUToDK+X7fV++E3onn75y3fhqdhZEw76jAODsgpIhZn8Pb9nuX0w5aaW4OLQefF KUyw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686650031; x=1689242031; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=IzWrgbQ1ifcA6QpoY3GAhb5JkcM5vJWg4mo7ygnwvZ0=; b=CuAHuB2YDckmjy2uJpBAxPkXGBTjhWa49sqc5z7BRjh6eIwnE1kqYS+izjSQZYq6I7 BVKOdTa5dDAQr8HpDwWTIHJVHFO4+G0VeM3FW537xWb04jr/pfneY5EUsLjveE1Zysy5 GeMQ9tKdwUB7CNht3d2hYiNsJXaJVfJNOADPhCgsUuTm6cP0cCyR0LSdtNtXw8bl2w2m jZMACN+mfhTZKUAkvWA0puFO2jUgEQMqnZsUhQQS1KZX6ONmYDOvGh0YGVcNCjN4rNeX 2A8+vTPx7gt+jL1w1ZVPYJCd+/D+NidoqAz+E/Iuk4KcEshsmacg3cUmTcOceLFCmEE+ 32hg== X-Gm-Message-State: AC+VfDwogn3KjMtqC924zsGtiXVvv0SvBp+sLKrxfnCKmTvzkSplNr1t GK0nm0KjyptSKhEVbXu/UVQ= X-Google-Smtp-Source: ACHHUZ6UOHbCsk+n2D3LAmGJESV3T9rZ9mrL1TngnwWsopNklGB5UbpVtZHGSQzevQd74vOF4KVO3A== X-Received: by 2002:a05:600c:1656:b0:3f7:f302:161 with SMTP id o22-20020a05600c165600b003f7f3020161mr12467757wmn.8.1686650030417; Tue, 13 Jun 2023 02:53:50 -0700 (PDT) Received: from localhost ([37.46.46.3]) by smtp.gmail.com with ESMTPSA id c18-20020a7bc852000000b003f42158288dsm13880102wml.20.2023.06.13.02.53.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Jun 2023 02:53:49 -0700 (PDT) Date: Tue, 13 Jun 2023 12:53:47 +0300 From: Efraim Flashner Message-ID: Mail-Followup-To: Efraim Flashner , Ludovic =?UTF-8?Q?Court=C3=A8s?= , 63766@debbugs.gnu.org, paren@disroot.org, Christopher Baines , Mathieu Othacehe , Raghav Gururajan , Ricardo Wurmus , Simon Tournier , Tobias Geerinckx-Rice , jgart References: <87jzwcv03m.fsf_-_@gnu.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="jiZ6lxWNh5vn7bkj" Content-Disposition: inline In-Reply-To: <87jzwcv03m.fsf_-_@gnu.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686683678; 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:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=IzWrgbQ1ifcA6QpoY3GAhb5JkcM5vJWg4mo7ygnwvZ0=; b=X5+4qD6nbTSryytWPO10ZbajvJmrmeClgOxcMx/5mATFQh++KsWxmJ6mBKq3l88mwLbdFB VrlgcqtXdIGy+IvaFEqF06mTWoIq4EaXWYM4irX8KFO6URV6fNsoQ0RkiPbZw+kHhnKG4j TRs/MfbVvezS/LGTg4Q/HvmzGoOd9RdVfBKzfQ98WXPOqFv44BWQCwuspyb1XiTEP10KpX fxK1Rt3zGhkHRhfnJTW3hddeAOrI++gKKhqlNtFX4bv14KGbsDJNIX4GLLweyvwbDGnSiv 3h1tngYE9BwIfQtgo56vDk7Zjdse0KhGvD9G5SOlrVkejEqMr5qpo2+ASK6oMQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=jLfrG5Ik; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686683678; a=rsa-sha256; cv=none; b=HyB0Y7HhqJo4tPdQtn2NvF/Gd5XLaVY+GHVnrmFAtDQTnsWi57UJ0oR0vzMz+ZmKSUqbcq eXw7dI8iDzuX//eFYq7i7pZSkNQJWVwskI40E4AJlMt2nndGolUxAiIz/JV65a2fVK8Tcs Vw8ge1WK9cC90FMKkXW8lo99Iyuzl0ZyzwiRvdxt2XfrArAsaWXEv4KZ9UcF1THXnvpVG5 3iWKUTwwYw/KSADNh1kiLywFSb5gafw68j3XaEQuK5x4iadMx5pVcexVk/Bkj2O+MQw1/T eknk9r8MiZnG5SQR6X/fjWDBcCFOS/ppjeWsT+UHCBhERscIeGhssQAymSFWlg== X-Migadu-Scanner: scn1.migadu.com X-Migadu-Spam-Score: -2.32 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20221208 header.b=jLfrG5Ik; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: A94602F27 X-Spam-Score: -2.32 X-TUID: zf+bMhJi6Qjj --jiZ6lxWNh5vn7bkj Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Jun 09, 2023 at 10:42:37PM +0200, Ludovic Court=C3=A8s wrote: > Efraim Flashner skribis: >=20 > > * gnu/build/image.scm (make-unformatted-image): New procedure. > > (make-partition-image): Add support for unformatted partition. > > * gnu/system/image.scm (system-disk-image)[partition->gpt-type]: Add > > case for using unformatted partition uuid. > > [partition-image]: Add coreutils to image-builder closure. >=20 > [...] >=20 > > +(define* (make-unformatted-image partition target) > > + "Make an unformatted partition of a certain size." > > + (let ((size (partition-size partition))) > > + (invoke "truncate" "--size" (number->string size) target))) >=20 > Simply: (truncate-file target size). Almost. Backtrace: 1 (primitive-load "/gnu/store/v9kg0qwyws5s5m07klzkfqc9dmf=E2=80= =A6") 0 (truncate-file "/gnu/store/rcillf8ni077l9fi2cy2gdzzpqv=E2=80= =A6" =E2=80=A6) ERROR: In procedure truncate-file: In procedure truncate-file: No such file or directory I changed it to: (let ((size (partition-size partition))) ;; Create the file and then truncate it to the desired size. (with-output-to-file target (lambda _ (display ""))) (truncate-file target size))) And that got me the empty partition/block device as needed. > > - (inputs '#+(list e2fsprogs fakeroot dosfstools mt= ools)) > > + (inputs '#+(list e2fsprogs ; ext2/3/4 > > + fakeroot > > + dosfstools ; vfat > > + mtools ; vfat > > + coreutils)) ; truncate >=20 > And this can be dropped. Not for this review, but I'd like to make the inputs dependant on which partition type is being made. There's no need to have dosfstools and mtools when making an ext4 partition. And if we add a btrfs partition option there's a large possibility that someone using that won't need e2fsprogs at all while creating their image. > Ludo=E2=80=99. Thanks --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --jiZ6lxWNh5vn7bkj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmSIPKgACgkQQarn3Mo9 g1EnPA//R4QAVCVFQrf99SBW4S/GH7MuN9mWPdsPxEbscqEy6621W9T+3i3yev// WjJ4EZKfvvqyojSMJmIgdN3TpA0UzYzzr56eab/RbjC9zAw33JWiwvigySEug8xo 0uvAdq3D7TSLCYGsM7pH5Y4ECXlNNH6rl7Nb2u+5NJWEtrVsxDDzSlKYCNTA/D2M 6HOsdajedUrTgAjNRfKoeLkIw9bKpWAkJ4HjK43P1T662PbC+WmYzUVcJcsw8BN3 a063VM9Q7NI/GS2f0/F6EJrY5CVfCkpriAmCl7UuHyrB6xt7rL6ADJkmN4fPU28o YX97U2l4wrVt3iZYdRp8/WACS+91Z08bJwRi2/f6/qQLFTgjS6lWdu++UszyKxSF KX3DjwC7p19vdHLHquhq1v4CAa6eP1dIATgGCMeO37mrCJpvW/mLWPLkiq9GRv6A LSnj73aa+F5VxHDNrSQSIrQwBMV2PT/MSRLYcipuKqbrG3nJ8K6LCrBqZE98/lff oR9J1imJgQl2a4JPhvm7cVHUOrpA7/QFJ0rHoPGeWGrTZ3wINKJKagpwnREj+HO2 ub0Fambz0jYSDNwFPXRvTQd82zkbkscSS+81shXtP3U+5JaXrRmnE1gJzAdVq5Ac 1Qm625kuPcw0DrSITbfbb0Ms0wOBVAVYIWK3TFnWsGHbtCkjuU4= =Vxnu -----END PGP SIGNATURE----- --jiZ6lxWNh5vn7bkj--