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 ms5.migadu.com with LMTPS id CKbsABAYiWIABQAAbAwnHQ (envelope-from ) for ; Sat, 21 May 2022 18:49:20 +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 IFvjABAYiWJrKgAA9RJhRA (envelope-from ) for ; Sat, 21 May 2022 18:49:20 +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 545902F5E1 for ; Sat, 21 May 2022 18:49:19 +0200 (CEST) Received: from localhost ([::1]:40456 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nsSI2-0006cq-3y for larch@yhetil.org; Sat, 21 May 2022 12:49:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56490) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nsSHn-0006cQ-2V for bug-guix@gnu.org; Sat, 21 May 2022 12:49:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:48972) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nsSHm-0000SD-7c for bug-guix@gnu.org; Sat, 21 May 2022 12:49:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nsSHm-0007Y1-6e for bug-guix@gnu.org; Sat, 21 May 2022 12:49:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#55406: Patch to handle boot flag in Image API References: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> In-Reply-To: <3078A40B-22B0-4492-BFD2-72D725F31689@gmail.com> Resent-From: Pavel Shlyak Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 21 May 2022 16:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 55406 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: 55406@debbugs.gnu.org Received: via spool by 55406-submit@debbugs.gnu.org id=B55406.165315170428942 (code B ref 55406); Sat, 21 May 2022 16:49:02 +0000 Received: (at 55406) by debbugs.gnu.org; 21 May 2022 16:48:24 +0000 Received: from localhost ([127.0.0.1]:42865 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsSH9-0007Wi-BC for submit@debbugs.gnu.org; Sat, 21 May 2022 12:48:24 -0400 Received: from wout3-smtp.messagingengine.com ([64.147.123.19]:43133) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nsOr9-0005LQ-TL for 55406@debbugs.gnu.org; Sat, 21 May 2022 09:09:22 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 14C8F32002E8 for <55406@debbugs.gnu.org>; Sat, 21 May 2022 09:09:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Sat, 21 May 2022 09:09:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantherx.org; h= cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm2; t= 1653138552; x=1653224952; bh=ccnoPTp9FJHVwzVO5Ox1BFkEWI9Xs/VzLPj OjeCpwu8=; b=PRXwD5OksaFqinIuC2boDW06LuVt12651SnrVf3g4qUO1lnE5o5 fsdKJglp0M5XHBHHa24GhdpP5Afk2oueMEYtQ9k6Mq4b0mEoZNyBNr3O9Aq9BoE1 PQCEn32F2Tce30IbWyA0CgXdvvWNX1E7QLs18smOlOtXplQImUvk34JY1jTZtGoS ubzrOONpy5JGWJKw1UxueuZ++qifZ6tvQ73qycOvsLimHl0rfmcCgfRDJ8XsmXyE 8psGvtS9GhSX4Nz/JhWEItaMYkasn90WpoDjGCuyGfCFADiOBANOkXkCaKcg5YgJ p2PvFXnIdfPBDhrVH+1BT+qCO8kb+MXFEKQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :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=1653138552; x= 1653224952; bh=ccnoPTp9FJHVwzVO5Ox1BFkEWI9Xs/VzLPjOjeCpwu8=; b=M Udeoyc3cnUyEaxJZ122hobXPlXrxeA6adPf1LK6laGdrdrEPQNz85HKzyw2mJmif uk0Fkor6j+0BVnchoNe2CDE2RhG6fZ4baDEwfaDxEIwxzbk6iMJbFjHwYGSCuIK2 MZm8llEFOe7zi+Ec4J8YJuiikGQjQuq9IcguGV0pBbOuxy8RosU7r2CDtg+KF3Vc +DYZG3VRVSsNJqX6Y8Qo4NiDFMwScGTWKiAUNLTovDPNOow9t8RgCCeqL3h+pZVj UkdDNsPVjoMZHVuvsZkrmUCt87tWIJBbjM9647/3wSAeiU1XO+kjfioeItJBGy+T a/xzEJ4+dscnm4Xs8EZog== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrieeigdehgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephfgtggfukfffvffosehmtdhmrehhtd ejnecuhfhrohhmpefrrghvvghlucfuhhhlhigrkhcuoehprdhshhhlhigrkhesphgrnhht hhgvrhigrdhorhhgqeenucggtffrrghtthgvrhhnpeeivdeghfeuiefggeffffduveetff ffheetvddvfeeivefftdejlefftdffueejtdenucevlhhushhtvghrufhiiigvpedtnecu rfgrrhgrmhepmhgrihhlfhhrohhmpehprdhshhhlhigrkhesphgrnhhthhgvrhigrdhorh hg X-ME-Proxy: Feedback-ID: idda946d0:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA for <55406@debbugs.gnu.org>; Sat, 21 May 2022 09:09:11 -0400 (EDT) From: Pavel Shlyak Content-Type: multipart/mixed; boundary="Apple-Mail=_2F485A46-F632-4F27-AB75-92B811BCB156" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3696.100.31\)) Message-Id: <37ECE4BB-C5C7-4C9E-A54A-03F12EA2464E@pantherx.org> Date: Sat, 21 May 2022 16:09:07 +0300 X-Mailer: Apple Mail (2.3696.100.31) X-Mailman-Approved-At: Sat, 21 May 2022 12:48:22 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" 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=1653151759; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=ccnoPTp9FJHVwzVO5Ox1BFkEWI9Xs/VzLPjOjeCpwu8=; b=ETMSi3lTy8y43ZC3DvPqTMmj8gUPeiH8bcLoNVKfbbgdQJs69dMm47/1riFAy6RZSDbI9L Q4+QEACO/B/mxNQ8k+mBwP5U9HMaFzhIP6Awh61fu4alqSMNXqlGwCAQ8QCVstxL+JAhLV AepyV4PcDEwJYqwuRcFAfwk500P2Wca0K8zD73YxwVCcllRtLoEERVag1WmHxSO1cW5lLn upcRgNLaD8DXaVvEcc/Zfh3PznA2eSO957OvXlcK+woCGMd7ZlsJaBPF+GDXUp3oPSqITt GruNFk5CKiyyShsgIFBliS/P7Xgjx/OK9zI+gTlroptBqi+zJipnNlR97Dv92g== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1653151759; a=rsa-sha256; cv=none; b=KLhP74ag+4Pqdo6KHfIFEgd+nXNS4BPTX4cd0+gZn2JYlg2PGEOsuHHQg9UA0xsVcLTi14 ZKWyetkXx7D1ca8UmPwOnT5IVQrN17EZARJoDbsywKPquf/Xb2/myMobrfOsK8Je3jZWJ+ M2+L/DtHeCrQqLctM9C8eXxoyxfzPn6EPKrz2B9LZtUchlj2WS/tsxYsTyDfTSZeK62wnj LO7hUwI1ULBmOUe7jTxGBbZq5OazsJ9GvgcAcBTFlxADgDznAq95DHqAIPXhgMtlFTT4GJ NuC03cCz2rQon4b9l1enZIEEmVsZrPDcdsqdzOQfqUWvt1yML+zWzf/+s5O5Ow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=PRXwD5Ok; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="M Udeoyc"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.35 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=pantherx.org header.s=fm2 header.b=PRXwD5Ok; dkim=fail ("headers rsa verify failed") header.d=messagingengine.com header.s=fm1 header.b="M Udeoyc"; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "bug-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="bug-guix-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 545902F5E1 X-Spam-Score: 1.35 X-Migadu-Scanner: scn1.migadu.com X-TUID: 1LeCyNa00R77 --Apple-Mail=_2F485A46-F632-4F27-AB75-92B811BCB156 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Here=E2=80=99s the last patch in the set that adds support for the boot = flag. It should be merged after mbr-support-vfat-partitions.patch and = gpt-support-vfat-partitions.patch The issue can be closed as soon as all three patches are merged. Have a nice day! =20= --Apple-Mail=_2F485A46-F632-4F27-AB75-92B811BCB156 Content-Disposition: attachment; filename=support-bootable-partitions.patch Content-Type: application/octet-stream; x-unix-mode=0644; name="support-bootable-partitions.patch" Content-Transfer-Encoding: 7bit cdiff --git a/gnu/build/image.scm b/gnu/build/image.scm index 81caa424f8..321fba40e3 100644 --- a/gnu/build/image.scm +++ b/gnu/build/image.scm @@ -48,12 +48,13 @@ (define (sexp->partition sexp) "Take SEXP, a tuple as returned by 'partition->gexp', and turn it into a record." (match sexp - ((size file-system file-system-options label uuid) + ((size file-system file-system-options label uuid flags) (partition (size size) (file-system file-system) (file-system-options file-system-options) (label label) - (uuid uuid))))) + (uuid uuid) + (flags flags))))) (define (size-in-kib size) "Convert SIZE expressed in bytes, to kilobytes and return it as a string." @@ -78,6 +79,7 @@ (define* (make-ext-image partition target root (fs-options (partition-file-system-options partition)) (label (partition-label partition)) (uuid (partition-uuid partition)) + (flags (partition-flags partition)) (journal-options "lazy_itable_init=1,lazy_journal_init=1")) (apply invoke `("fakeroot" "mke2fs" "-t" ,fs "-d" ,root diff --git a/gnu/system/image.scm b/gnu/system/image.scm index a6267feab2..d903cb4579 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -218,7 +218,8 @@ (define (partition->gexp partition) #$(partition-file-system-options partition) #$(partition-label partition) #$(and=> (partition-uuid partition) - uuid-bytevector))) + uuid-bytevector) + #$(partition-flags partition))) (define gcrypt-sqlite3&co ;; Guile-Gcrypt, Guile-SQLite3, and their propagated inputs. @@ -392,17 +393,21 @@ (define (partition->config image partition) (partition-type-values image partition))) (let ((label (partition-label partition)) (image (partition-image partition)) - (offset (partition-offset partition))) + (offset (partition-offset partition)) + (bootable (if (member 'boot (partition-flags partition)) + "true" "false" ))) #~(format #f "~/partition ~a { ~/~/~a = ~a ~/~/image = \"~a\" ~/~/offset = \"~a\" + ~/~/bootable = \"~a\" ~/}" #$label #$partition-type-attribute #$partition-type-value #$image - #$offset)))) + #$offset + #$bootable)))) (define (genimage-type-options image-type image) (cond --Apple-Mail=_2F485A46-F632-4F27-AB75-92B811BCB156--