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 ms5.migadu.com with LMTPS id WIRIOi6IlGIPQwEAbAwnHQ (envelope-from ) for ; Mon, 30 May 2022 11:02:39 +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 6K8oOi6IlGISrAAAauVa8A (envelope-from ) for ; Mon, 30 May 2022 11:02:38 +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 0D6B31B3FD for ; Mon, 30 May 2022 11:02:37 +0200 (CEST) Received: from localhost ([::1]:50970 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nvbIK-0005tS-Jk for larch@yhetil.org; Mon, 30 May 2022 05:02:36 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:54620) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nvbHm-0005qg-Kj for guix-patches@gnu.org; Mon, 30 May 2022 05:02:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48837) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nvbHm-0005nG-9P for guix-patches@gnu.org; Mon, 30 May 2022 05:02:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nvbHm-0001Qt-5u for guix-patches@gnu.org; Mon, 30 May 2022 05:02:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#55663] [PATCH] Image API: add FAT32 support Resent-From: Pavel Shlyak Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 30 May 2022 09:02:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55663 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Mathieu Othacehe Cc: 55663@debbugs.gnu.org Received: via spool by 55663-submit@debbugs.gnu.org id=B55663.16539013145490 (code B ref 55663); Mon, 30 May 2022 09:02:02 +0000 Received: (at 55663) by debbugs.gnu.org; 30 May 2022 09:01:54 +0000 Received: from localhost ([127.0.0.1]:42732 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvbHb-0001QR-8e for submit@debbugs.gnu.org; Mon, 30 May 2022 05:01:54 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:36753) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nvbHM-0001Q0-RB for 55663@debbugs.gnu.org; Mon, 30 May 2022 05:01:50 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 88308320091E; Mon, 30 May 2022 05:01:30 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute5.internal (MEProxy); Mon, 30 May 2022 05:01:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; t=1653901290; x=1653987690; bh=cQzp5kcACg b3iG2bHdx3FmGLXJMMX9o7sE0L0X04Kqo=; b=CwQeC0tmRKrFdww1J72ZQUkoDI afySv06A6eKDaNrSmc4q7YS9T4oHQcN8qFQjJk1yY+VmuynAgt/GR20lC5dFThs+ EY+H2YDC0IERLztV2Adk9wlNsARh7STptf+stqmxDWsUxrSjbcFH3eAdIGSddENc 8fXw6Me6lQ7UP0uyuWR4389j7kIhS6LlrKPmGizM6n85uvL/k/WsrsXs9XvQEP+o RsMgIM703bUVKYc0kxRON/IJqzBD3wy2i0HG9ZXFYOhNaYOgBrIUvefuwKmmEutB c53u8LHaqOkkahul16RwR9eLVJP//RHM31sD9CE3Gy/UgL4G1fQRJMQ+9CVQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:in-reply-to:message-id :mime-version:references:reply-to:sender:subject:subject:to:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; t=1653901290; x=1653987690; bh=cQzp5kcACgb3iG2bHdx3FmGLXJMM X9o7sE0L0X04Kqo=; b=QNLNM5Pm3RxujNR6TX25PhiuvR6mzEjyBN0jyJt++yhu +PTqKer1Iv+ZSOH3S+z7+D86SDcZd2yy/txsVtlGqj18uyuTku4eFAqhVtDKgkma +4RdqavmX0YL77mD1XzZZr9XZ/5lyYqGoQDWfLnpydcqVVq0mMC6RiRXEw/c6/GB ZFahayqhbdyoLkBi7qEpiJ5voHyIsWodpxQfWmsOq6Cw/NAUHYZTsWlsd1kC3QQ+ +0pDaOhpw2aHXR+n7mP/rRWyVOy7BGESF855uu3u/I/b3z34Vwht2V0JhDfxO9dW +OuVKFvONFuYH0jy8g7DvlL+IOGAik29EygOFO4+qQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrkeeigddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhkfgtggfuffgjvefvfhfosehmtdhmrehhtdejnecuhfhrohhmpefrrghvvghl ucfuhhhlhigrkhcuoehprdhshhhlhigrkhesphgrnhhthhgvrhigrdhorhhgqeenucggtf frrghtthgvrhhnpeeikeefkeegvdduveelkeffveekhfelgfdtffeihffhgeetieehkeeg feeflefgueenucffohhmrghinhepghhnuhdrohhrghenucevlhhushhtvghrufhiiigvpe dtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehprdhshhhlhigrkhesphgrnhhthhgvrhig rdhorhhg X-ME-Proxy: Feedback-ID: idda946d0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 30 May 2022 05:01:28 -0400 (EDT) From: Pavel Shlyak Message-Id: Content-Type: multipart/mixed; boundary="Apple-Mail=_78A8146E-2B17-4293-9C2A-9625C5B71C2D" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Date: Mon, 30 May 2022 12:01:27 +0300 In-Reply-To: <874k17ld1d.fsf_-_@gnu.org> References: <3EE7299C-64ED-4062-BA31-ADF3A6AD6A37@pantherx.org> <4054081F-9D51-49E0-958F-C9B1BFA7FB24@pantherx.org> <874k17ld1d.fsf_-_@gnu.org> X-Mailer: Apple Mail (2.3696.100.31) 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" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1653901358; 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=cQzp5kcACgb3iG2bHdx3FmGLXJMMX9o7sE0L0X04Kqo=; b=GuAAqkXfHCmcu/+iq4Ss/giuMsUJKX1Hxo6nfY1sKovdQV03PfINoNqRfKJTJZqDat4/I7 Io0VuTA+q4+3L7tLoSgeK/g64mTH3DxWI1QA7FcKLpfgxe6PWttJwTgSyE7F7XHBEWx5+H kEarUpT0Mub05rts+v19aTDM0D8KvYaKW546z6TLTYenmHASnbxd7kKYHCoc4s0JvG6cmR hv8qdhQj8WBPmQlkffnpJSm/d2UNX6gqNXsO+BG8tiyBhi6oJQoZ2GfeeiZa6GJqh49UFf 29C9swYGYXANoM4kNSpq4+NxyQvWI/fKg8Vr2rIA9mwM07AzB/PrRt00k4MrUg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653901358; a=rsa-sha256; cv=none; b=Zy7Bm0J9sumBiLtZBuQnWKgzmbkef2uDdvxd7DFmRslSSZ8eq1rJKbUz/E5HGIvcZZsa3Y cP/8qyuZzaRAvXrqzr0BK9zTG7NSyUqQFlWcrIpid4LNW3/Ze2GzcHR2Rj3+IPW/Ne31KU G1gvgXyk1ALU832+ym4dCexJaNqxmBuWYvKQzwq5P4FdAi4Lvca0A4V8nDYS++Zqc931VO HjwROnwjMkH58GGPIQS640AUsoG8Q1GIw4frMmKXFy0CUI1VS3Ec0G98rJN26zqlz6RUw8 84C5Z5zmUzk2VGpyTXoVSD/mAxgXOROwo618Ky7L26VeqroiERBFaRFRyr3LbA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=CwQeC0tm; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=QNLNM5Pm; 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-Spam-Score: 0.87 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=CwQeC0tm; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b=QNLNM5Pm; 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: 0D6B31B3FD X-Spam-Score: 0.87 X-Migadu-Scanner: scn0.migadu.com X-TUID: ifTPMI3Xv2EA --Apple-Mail=_78A8146E-2B17-4293-9C2A-9625C5B71C2D Content-Disposition: attachment; filename=0001-guix-Image-API-support-FAT32-partitions.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-guix-Image-API-support-FAT32-partitions.patch" Content-Transfer-Encoding: quoted-printable =46rom=205ff7fcf80196111ab8d5f87a1d159ed0349153b4=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Pavel=20Shlyak=20=0A= Date:=20Thu,=2026=20May=202022=2021:00:51=20+0300=0ASubject:=20[PATCH]=20= guix:=20Image=20API:=20support=20FAT32=20partitions=0A=0A*=20= gnu/build/image.scm=20(make-vfat-image):=20pass=20fs=20bits=20as=20= argument=20and=20force=201kb=20logical=20sector=20size=20only=20if=20= "ESP"=20flag=20is=20set.=0A=20=20(make-partition-image):=20add=20"fat32"=20= partition=20type,=20support=20explicit=20"fat16"=20type=20with=20vfat=20= alias.=0A*=20gnu/system/image.scm=20(partition->dos-type=20partition):=20= return=20file=20system=20IDs=20for=20"fat16"=20and=20"fat32"=20= partitions.=0A=20=20(partition->gpt-type=20partition):=20ditto.=0A---=0A=20= gnu/build/image.scm=20=20|=2024=20++++++++++++++----------=0A=20= gnu/system/image.scm=20|=20=208=20++++++--=0A=202=20files=20changed,=20= 20=20insertions(+),=2012=20deletions(-)=0A=0Adiff=20--git=20= a/gnu/build/image.scm=20b/gnu/build/image.scm=0Aindex=20= 3e8b94e2d6..ddfd34c111=20100644=0A---=20a/gnu/build/image.scm=0A+++=20= b/gnu/build/image.scm=0A@@=20-95,16=20+95,18=20@@=20(define*=20= (make-ext-image=20partition=20target=20root=0A=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (estimate-partition-size=20root)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20size)))))))=0A=20=0A= -(define*=20(make-vfat-image=20partition=20target=20root)=0A+(define*=20= (make-vfat-image=20partition=20target=20root=20fs-bits)=0A=20=20=20= "Handle=20the=20creation=20of=20VFAT=20partition=20images.=20=20See=20= 'make-partition-image'."=0A=20=20=20(let=20((size=20(partition-size=20= partition))=0A-=20=20=20=20=20=20=20=20(label=20(partition-label=20= partition)))=0A-=20=20=20=20(invoke=20"fakeroot"=20"mkdosfs"=20"-n"=20= label=20"-C"=20target=0A-=20=20=20=20=20=20=20=20=20=20=20=20"-F"=20"16"=20= "-S"=20"1024"=0A-=20=20=20=20=20=20=20=20=20=20=20=20(size-in-kib=0A-=20=20= =20=20=20=20=20=20=20=20=20=20=20(if=20(eq?=20size=20'guess)=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20(estimate-partition-size=20= root)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20size)))=0A+=20= =20=20=20=20=20=20=20(label=20(partition-label=20partition))=0A+=20=20=20= =20=20=20=20=20(flags=20(partition-flags=20partition)))=0A+=20=20=20=20= (apply=20invoke=20"fakeroot"=20"mkdosfs"=20"-n"=20label=20"-C"=20target=0A= +=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20"-F"=20(number->string=20fs-bits)=0A+=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(size-in-kib=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (if=20(eq?=20size=20'guess)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (estimate-partition-size=20root)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20size))=0A+=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(if=20(member=20'esp=20= flags)=20(list=20"-S"=20"1024")=20'()))=0A=20=20=20=20=20(for-each=20= (lambda=20(file)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (unless=20(member=20file=20'("."=20".."))=0A=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20(invoke=20"mcopy"=20"-bsp"=20"-i"=20target=0A= @@=20-120,8=20+122,10=20@@=20(define*=20(make-partition-image=20= partition-sexp=20target=20root)=0A=20=20=20=20=20(cond=0A=20=20=20=20=20=20= ((string-prefix?=20"ext"=20type)=0A=20=20=20=20=20=20=20(make-ext-image=20= partition=20target=20root))=0A-=20=20=20=20=20((string=3D?=20type=20= "vfat")=0A-=20=20=20=20=20=20(make-vfat-image=20partition=20target=20= root))=0A+=20=20=20=20=20((or=20(string=3D?=20type=20"vfat")=20(string=3D?= =20type=20"fat16"))=0A+=20=20=20=20=20=20(make-vfat-image=20partition=20= target=20root=2016))=0A+=20=20=20=20=20((string=3D?=20type=20"fat32")=0A= +=20=20=20=20=20=20(make-vfat-image=20partition=20target=20root=2032))=0A= =20=20=20=20=20=20(else=0A=20=20=20=20=20=20=20(raise=20(condition=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(&message=0Adiff=20--git=20= a/gnu/system/image.scm=20b/gnu/system/image.scm=0Aindex=20= dd32e58c2d..f02f6e0b8c=20100644=0A---=20a/gnu/system/image.scm=0A+++=20= b/gnu/system/image.scm=0A@@=20-312,7=20+312,9=20@@=20(define=20= (partition->dos-type=20partition)=0A=20=20=20=20=20=20=20=20=20(cond=0A=20= =20=20=20=20=20=20=20=20=20((member=20'esp=20flags)=20"0xEF")=0A=20=20=20= =20=20=20=20=20=20=20((string-prefix?=20"ext"=20file-system)=20"0x83")=0A= -=20=20=20=20=20=20=20=20=20((string=3D?=20file-system=20"vfat")=20= "0x0E")=0A+=20=20=20=20=20=20=20=20=20((or=20(string=3D?=20file-system=20= "vfat")=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(string=3D?=20= file-system=20"fat16"))=20"0x0E")=0A+=20=20=20=20=20=20=20=20=20= ((string=3D?=20file-system=20"fat32")=20"0x0C")=0A=20=20=20=20=20=20=20=20= =20=20(else=0A=20=20=20=20=20=20=20=20=20=20=20(raise=20(condition=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(&message=0A@@=20= -329,7=20+331,9=20@@=20(define=20(partition->gpt-type=20partition)=0A=20=20= =20=20=20=20=20=20=20(cond=0A=20=20=20=20=20=20=20=20=20=20((member=20= 'esp=20flags)=20"U")=0A=20=20=20=20=20=20=20=20=20=20((string-prefix?=20= "ext"=20file-system)=20"L")=0A-=20=20=20=20=20=20=20=20=20((string=3D?=20= file-system=20"vfat")=20"F")=0A+=20=20=20=20=20=20=20=20=20((or=20= (string=3D?=20file-system=20"vfat")=0A+=20=20=20=20=20=20=20=20=20=20=20=20= =20=20(string=3D?=20file-system=20"fat16")=0A+=20=20=20=20=20=20=20=20=20= =20=20=20=20=20(string=3D?=20file-system=20"fat32"))=20"F")=0A=20=20=20=20= =20=20=20=20=20=20(else=0A=20=20=20=20=20=20=20=20=20=20=20(raise=20= (condition=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (&message=0A--=20=0A2.32.1=20(Apple=20Git-133)=0A=0A= --Apple-Mail=_78A8146E-2B17-4293-9C2A-9625C5B71C2D Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > 30 =D0=BC=D0=B0=D1=8F 2022 =D0=B3., =D0=B2 10:01, Mathieu Othacehe = =D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB(=D0=B0): >=20 >=20 > Hello Pavel, >=20 >> gnu/build/image.scm | 24 ++++++++++++++---------- >> gnu/system/image.scm | 9 +++++++-- >=20 > Please write a commit message following the guidelines available here: > https://guix.gnu.org/manual/en/html_node/Submitting-Patches.html >=20 >> +(define* (make-vfat-image partition target root fs_bits) >=20 > s/fs_bits/fs-bits/ >=20 >> + ((or (string=3D? file-system "vfat") (string=3D? = file-system "fat16")) "0x0E") >=20 > This line is longer than 78 characters you can break it between the = two > strings comparisons. >=20 >> + ( >> + (or (string=3D? file-system "vfat") >=20 > Merge those two lines. >=20 >> + (string=3D? file-system "fat32") >> + ) "F") >=20 > Ditto. >=20 > Can you please send a v2? >=20 > Thanks for your contribution, >=20 > Mathieu --Apple-Mail=_78A8146E-2B17-4293-9C2A-9625C5B71C2D--