From debbugs-submit-bounces@debbugs.gnu.org Sun May 22 10:02:47 2022 Received: (at 55406) by debbugs.gnu.org; 22 May 2022 14:02:48 +0000 Received: from localhost ([127.0.0.1]:46103 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsmAR-0007la-MS for submit@debbugs.gnu.org; Sun, 22 May 2022 10:02:47 -0400 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]:48955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsmAN-0007l8-MJ for 55406@debbugs.gnu.org; Sun, 22 May 2022 10:02:45 -0400 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 85007320005D; Sun, 22 May 2022 10:02:37 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Sun, 22 May 2022 10:02:37 -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=1653228157; x=1653314557; bh=nW9J9zo0eN TeWMGTeMyV66xU8q+UUqF7EM7OF66K5z8=; b=CyZMyuFrJLgF2CVNF6ftYcDnFC pLIXPnE33rav5VTpvbLUcBeW+LgQoDXWXDR9BF6oMGHuJm+I3uHql1n5q9LWDbwE uXhhGVN5q+iQ7TgXP3Kl655zJLOcbCj7nPqRlTzYSh3qD5bha7VXpO6uWTYhggrs mHV8cg+16MVOwCvgxKyWPiiScTlh+kpZUMF5eSXGN+P/6SWvJXt6cY/CoNUWHAjt T18LlZE6sMm51DjztiVDugjxZiPdsUJFNczSjrT6SCRg80SG4v4NHrN70dpKFy+V /aRv4KutrOlBKNKyveH8WwM5NefLETuuGeWnYHxdqn7NJPkNMk5dHo2TNFqA== 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=1653228157; x=1653314557; bh=nW9J9zo0eNTeWMGTeMyV66xU8q+U UqF7EM7OF66K5z8=; b=Nl4OH+6tHtfNy12aDfLvT0+C4njQbKxgDqzCwzL1P0Ct q3Vpr8gepigUtDIZDnxb1i5QUgoInzyFGCBUFNXXeVS8QIta7Ocfhux7aYkmSRjI NwqiNGmppEEV2cpf2buyLkyIOBEh1d1wmr/V+bRAILY+yVu+QeZNv7m58EgLIDFU vHDr6vd11rJecsSGu+FCt9V0j057ACoxXVJCzXfLsg1Jtv1Dk18ewaNdvScT9yy/ bqA/iPvkHkLFi+LGbQyAJuawvHqoSyYCJFp6IW2nWgpqA04e2pJ+e8aa1wU220Sb +EKfq+PLFstD24mSC/dUInisCNR0EabaglQn3um7Og== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrieekgdejfecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhkfgtggfuffgjvefvfhfosehmtdhmrehhtddvnecuhfhrohhmpefrrghvvghl ucfuhhhlhigrkhcuoehprdhshhhlhigrkhesphgrnhhthhgvrhigrdhorhhgqeenucggtf frrghtthgvrhhnpeehhfegffffudetieffvddukeethfeiudeugfeuvefgheeiudettedv vedvgeehtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhroh hmpehprdhshhhlhigrkhesphgrnhhthhgvrhigrdhorhhg X-ME-Proxy: Feedback-ID: idda946d0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 22 May 2022 10:02:35 -0400 (EDT) From: Pavel Shlyak Message-Id: <895504EA-0884-481A-BCB7-189C38D42740@pantherx.org> Content-Type: multipart/mixed; boundary="Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Subject: [PATCH] GUIX Image API support for vfat and boot flag Date: Sun, 22 May 2022 17:02:33 +0300 In-Reply-To: <87zgj91yl9.fsf_-_@gnu.org> To: Mathieu Othacehe References: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> <37ECE4BB-C5C7-4C9E-A54A-03F12EA2464E@pantherx.org> <87zgj91yl9.fsf_-_@gnu.org> X-Mailer: Apple Mail (2.3696.100.31) X-Spam-Score: -0.7 (/) X-Debbugs-Envelope-To: 55406 Cc: 55406@debbugs.gnu.org, guix-patches@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.7 (-) --Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Ok, I tried to format them :) --Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F Content-Disposition: attachment; filename=0001-Image-API-support-VFAT-partitions-in-MBR.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0001-Image-API-support-VFAT-partitions-in-MBR.patch" Content-Transfer-Encoding: quoted-printable =46rom=20ec65ce70cfb26a9936099cdb0d1a156a747fa42b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Pavel=20Shlyak=20=0A= Date:=20Sun,=2022=20May=202022=2016:52:45=20+0300=0ASubject:=20[PATCH=20= 1/4]=20Image=20API:=20support=20VFAT=20partitions=20in=20MBR=0A=0A---=0A=20= gnu/system/image.scm=20|=2011=20++++++++---=0A=201=20file=20changed,=208=20= insertions(+),=203=20deletions(-)=0A=0Adiff=20--git=20= a/gnu/system/image.scm=20b/gnu/system/image.scm=0Aindex=20= 42e215f614..a83f844682=20100644=0A---=20a/gnu/system/image.scm=0A+++=20= b/gnu/system/image.scm=0A@@=20-304,10=20+304,15=20@@=20(define=20= (format->image-type=20format)=0A=20=20=20=20=20(define=20= (partition->dos-type=20partition)=0A=20=20=20=20=20=20=20;;=20Return=20= the=20MBR=20partition=20type=20corresponding=20to=20the=20given=20= PARTITION.=0A=20=20=20=20=20=20=20;;=20See:=20= https://en.wikipedia.org/wiki/Partition_type.=0A-=20=20=20=20=20=20(let=20= ((flags=20(partition-flags=20partition)))=0A+=20=20=20=20=20=20(let=20= ((flags=20(partition-flags=20partition))=20(file-system=20= (partition-file-system=20partition)))=0A=20=20=20=20=20=20=20=20=20(cond=0A= -=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(else=20"0x83"))))=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=20((string=3D?=20file-system=20"vfat")=20"0x0E")=0A+=20=20=20=20=20= =20=20=20=20=20(else=0A+=20=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(&message=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(message=20"unsupported=20= partition=20type"))))))))=0A=20=0A=20=20=20=20=20(define=20= (partition->gpt-type=20partition)=0A=20=20=20=20=20=20=20;;=20Return=20= the=20genimage=20GPT=20partition=20type=20code=20corresponding=20to=20= PARTITION.=0A--=20=0A2.32.1=20(Apple=20Git-133)=0A=0A= --Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F Content-Disposition: attachment; filename=0002-Image-API-support-VFAT-partitions-in-GPT.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0002-Image-API-support-VFAT-partitions-in-GPT.patch" Content-Transfer-Encoding: quoted-printable =46rom=2087dd32f21450c4f84c55f6afc11ba1979e201ec9=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Pavel=20Shlyak=20=0A= Date:=20Sun,=2022=20May=202022=2016:53:30=20+0300=0ASubject:=20[PATCH=20= 2/4]=20Image=20API:=20support=20VFAT=20partitions=20in=20GPT=0A=0A---=0A=20= gnu/system/image.scm=20|=209=20+++++++--=0A=201=20file=20changed,=207=20= insertions(+),=202=20deletions(-)=0A=0Adiff=20--git=20= a/gnu/system/image.scm=20b/gnu/system/image.scm=0Aindex=20= a83f844682..a6267feab2=20100644=0A---=20a/gnu/system/image.scm=0A+++=20= b/gnu/system/image.scm=0A@@=20-317,10=20+317,15=20@@=20(define=20= (partition->dos-type=20partition)=0A=20=20=20=20=20(define=20= (partition->gpt-type=20partition)=0A=20=20=20=20=20=20=20;;=20Return=20= the=20genimage=20GPT=20partition=20type=20code=20corresponding=20to=20= PARTITION.=0A=20=20=20=20=20=20=20;;=20See=20= https://github.com/pengutronix/genimage/blob/master/README.rst=0A-=20=20=20= =20=20=20(let=20((flags=20(partition-flags=20partition)))=0A+=20=20=20=20= =20=20(let=20((flags=20(partition-flags=20partition))=20(file-system=20= (partition-file-system=20partition)))=0A=20=20=20=20=20=20=20=20=20(cond=0A= =20=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(else=20"L"))))=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=20((string=3D?=20file-system=20"vfat")=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=20(raise=20= (condition=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(&message=0A+=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(message=20"unsupported=20= partition=20type"))))))))=0A=20=0A=20=20=20=20=20(define=20= (partition-image=20partition)=0A=20=20=20=20=20=20=20;;=20Return=20as=20= a=20file-like=20object,=20an=20image=20of=20the=20given=20PARTITION.=20=20= A=0A--=20=0A2.32.1=20(Apple=20Git-133)=0A=0A= --Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F Content-Disposition: attachment; filename=0003-Image-API-support-boot-flag.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0003-Image-API-support-boot-flag.patch" Content-Transfer-Encoding: quoted-printable =46rom=2062980309a32ca1ecc5547345bdbc706d42c59d3b=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Pavel=20Shlyak=20=0A= Date:=20Sun,=2022=20May=202022=2016:53:49=20+0300=0ASubject:=20[PATCH=20= 3/4]=20Image=20API:=20support=20boot=20flag=0A=0A---=0A=20= gnu/build/image.scm=20=20|=20=206=20++++--=0A=20gnu/system/image.scm=20|=20= 11=20++++++++---=0A=202=20files=20changed,=2012=20insertions(+),=205=20= deletions(-)=0A=0Adiff=20--git=20a/gnu/build/image.scm=20= b/gnu/build/image.scm=0Aindex=2081caa424f8..321fba40e3=20100644=0A---=20= a/gnu/build/image.scm=0A+++=20b/gnu/build/image.scm=0A@@=20-48,12=20= +48,13=20@@=20(define=20(sexp->partition=20sexp)=0A=20=20=20"Take=20= SEXP,=20a=20tuple=20as=20returned=20by=20'partition->gexp',=20and=20turn=20= it=20into=20a=0A=20=20record."=0A=20=20=20(match=20sexp=0A-=20= =20=20=20((size=20file-system=20file-system-options=20label=20uuid)=0A+=20= =20=20=20((size=20file-system=20file-system-options=20label=20uuid=20= flags)=0A=20=20=20=20=20=20(partition=20(size=20size)=0A=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(file-system=20file-system)=0A=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20(file-system-options=20= file-system-options)=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (label=20label)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(uuid=20= uuid)))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(uuid=20= uuid)=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20(flags=20= flags)))))=0A=20=0A=20(define=20(size-in-kib=20size)=0A=20=20=20"Convert=20= SIZE=20expressed=20in=20bytes,=20to=20kilobytes=20and=20return=20it=20as=20= a=20string."=0A@@=20-78,6=20+79,7=20@@=20(define*=20(make-ext-image=20= partition=20target=20root=0A=20=20=20=20=20=20=20=20=20(fs-options=20= (partition-file-system-options=20partition))=0A=20=20=20=20=20=20=20=20=20= (label=20(partition-label=20partition))=0A=20=20=20=20=20=20=20=20=20= (uuid=20(partition-uuid=20partition))=0A+=20=20=20=20=20=20=20=20(flags=20= (partition-flags=20partition))=0A=20=20=20=20=20=20=20=20=20= (journal-options=20"lazy_itable_init=3D1,lazy_journal_init=3D1"))=0A=20=20= =20=20=20(apply=20invoke=0A=20=20=20=20=20=20=20=20=20=20=20=20= `("fakeroot"=20"mke2fs"=20"-t"=20,fs=20"-d"=20,root=0Adiff=20--git=20= a/gnu/system/image.scm=20b/gnu/system/image.scm=0Aindex=20= a6267feab2..d903cb4579=20100644=0A---=20a/gnu/system/image.scm=0A+++=20= b/gnu/system/image.scm=0A@@=20-218,7=20+218,8=20@@=20(define=20= (partition->gexp=20partition)=0A=20=20=20=20=20=20=20= #$(partition-file-system-options=20partition)=0A=20=20=20=20=20=20=20= #$(partition-label=20partition)=0A=20=20=20=20=20=20=20#$(and=3D>=20= (partition-uuid=20partition)=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20uuid-bytevector)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= uuid-bytevector)=0A+=20=20=20=20=20=20#$(partition-flags=20partition)))=0A= =20=0A=20(define=20gcrypt-sqlite3&co=0A=20=20=20;;=20Guile-Gcrypt,=20= Guile-SQLite3,=20and=20their=20propagated=20inputs.=0A@@=20-392,17=20= +393,21=20@@=20(define=20(partition->config=20image=20partition)=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= (partition-type-values=20image=20partition)))=0A=20=20=20=20=20=20=20=20=20= (let=20((label=20(partition-label=20partition))=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20(image=20(partition-image=20partition))=0A-=20=20=20= =20=20=20=20=20=20=20=20=20=20=20(offset=20(partition-offset=20= partition)))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20(offset=20= (partition-offset=20partition))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20= =20(bootable=20(if=20(member=20'boot=20(partition-flags=20partition))=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"true"=20"false"=20)))=0A=20=20=20=20=20=20=20=20=20=20=20= #~(format=20#f=20"~/partition=20~a=20{=0A=20=20=20~/~/~a=20=3D=20~a=0A=20= =20=20~/~/image=20=3D=20\"~a\"=0A=20=20=20~/~/offset=20=3D=20\"~a\"=0A+=20= =20~/~/bootable=20=3D=20\"~a\"=0A=20=20=20~/}"=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20#$label=0A=20=20=20=20=20=20=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20#$partition-type-attribute=0A=20=20= =20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= #$partition-type-value=0A=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20#$image=0A-=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20#$offset))))=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20=20#$offset=0A+=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20=20= =20=20=20=20#$bootable))))=0A=20=0A=20=20=20=20=20(define=20= (genimage-type-options=20image-type=20image)=0A=20=20=20=20=20=20=20= (cond=0A--=20=0A2.32.1=20(Apple=20Git-133)=0A=0A= --Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F Content-Disposition: attachment; filename=0004-Update-copyright.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="0004-Update-copyright.patch" Content-Transfer-Encoding: quoted-printable =46rom=20e8d8130a3c06c43715879d5d74ded2fa8e57dd2e=20Mon=20Sep=2017=20= 00:00:00=202001=0AFrom:=20Pavel=20Shlyak=20=0A= Date:=20Sun,=2022=20May=202022=2016:58:22=20+0300=0ASubject:=20[PATCH=20= 4/4]=20Update=20copyright=0A=0A---=0A=20gnu/build/image.scm=20=20|=201=20= +=0A=20gnu/system/image.scm=20|=201=20+=0A=202=20files=20changed,=202=20= insertions(+)=0A=0Adiff=20--git=20a/gnu/build/image.scm=20= b/gnu/build/image.scm=0Aindex=20321fba40e3..3e8b94e2d6=20100644=0A---=20= a/gnu/build/image.scm=0A+++=20b/gnu/build/image.scm=0A@@=20-5,6=20+5,7=20= @@=0A=20;;;=20Copyright=20=C2=A9=202017=20Marius=20Bakke=20= =0A=20;;;=20Copyright=20=C2=A9=202020,=202022=20= Tobias=20Geerinckx-Rice=20=0A=20;;;=20Copyright=20=C2=A9=20= 2020=20Mathieu=20Othacehe=20=0A+;;;=20Copyright=20= =C2=A9=202022=20Pavel=20Shlyak=20=0A=20;;;=0A=20= ;;;=20This=20file=20is=20part=20of=20GNU=20Guix.=0A=20;;;=0Adiff=20--git=20= a/gnu/system/image.scm=20b/gnu/system/image.scm=0Aindex=20= d903cb4579..e1eecabc33=20100644=0A---=20a/gnu/system/image.scm=0A+++=20= b/gnu/system/image.scm=0A@@=20-1,6=20+1,7=20@@=0A=20;;;=20GNU=20Guix=20= ---=20Functional=20package=20management=20for=20GNU=0A=20;;;=20Copyright=20= =C2=A9=202020,=202021=20Mathieu=20Othacehe=20=0A=20= ;;;=20Copyright=20=C2=A9=202020=20Jan=20(janneke)=20Nieuwenhuizen=20= =0A+;;;=20Copyright=20=C2=A9=202022=20Pavel=20Shlyak=20= =0A=20;;;=0A=20;;;=20This=20file=20is=20part=20of=20= GNU=20Guix.=0A=20;;;=0A--=20=0A2.32.1=20(Apple=20Git-133)=0A=0A= --Apple-Mail=_99FBFEF4-1574-486F-9DDB-25AB95B4199F--