From debbugs-submit-bounces@debbugs.gnu.org Fri Apr 14 02:53:52 2023 Received: (at submit) by debbugs.gnu.org; 14 Apr 2023 06:53:52 +0000 Received: from localhost ([127.0.0.1]:45322 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnDJf-000320-IM for submit@debbugs.gnu.org; Fri, 14 Apr 2023 02:53:52 -0400 Received: from lists.gnu.org ([209.51.188.17]:59186) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pnDJa-00031q-MF for submit@debbugs.gnu.org; Fri, 14 Apr 2023 02:53:50 -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 1pnDJY-0007vz-V7 for guix-patches@gnu.org; Fri, 14 Apr 2023 02:53:44 -0400 Received: from mail-pj1-x1032.google.com ([2607:f8b0:4864:20::1032]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pnDJI-0004HJ-9a for guix-patches@gnu.org; Fri, 14 Apr 2023 02:53:43 -0400 Received: by mail-pj1-x1032.google.com with SMTP id l9-20020a17090a3f0900b0023d32684e7fso7915086pjc.1 for ; Thu, 13 Apr 2023 23:53:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1681455203; x=1684047203; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:from:to:cc:subject:date:message-id:reply-to; bh=B8+2ghDrw4leCxEkdqPMDhB3r6oej7uCLeoOTHs8MwU=; b=kx7ZN7pnB4AcoITR8xHI3CxnqjbDepj6tQ+J2DUmIh0P5QCWaq0UP6aAwxjRjls8Ti 8V+WPppc32kBM7vZfrGHIuVQVtSyQbGOEToaJd9+jTxVX/kkZ5I8NcxXqQVW5E6Y3za9 oQOgiK2o7UXgqktYYuaHC5/NvOgbKIF2012LsQmTk/hxgs8b86J+SxpDBDDaIT4sv3CL +27/UW59lh7xeECOkf6Y86OOlWD1Vl64IjtNJA/PU1/O6AaqE7S21TMRSt+SUofvFlbj 6jklrI3Jhfx0sCyIvjeofzEWesUJpsCDM+9jsYF0AzYpdscB/Ggdsk1+Jsp5BmJ8NjjB QX1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1681455203; x=1684047203; h=content-transfer-encoding:mime-version:user-agent:message-id:date :subject:to:from:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=B8+2ghDrw4leCxEkdqPMDhB3r6oej7uCLeoOTHs8MwU=; b=g/gsmN3q9vMtXGwT9NdcdKZNM4xwq9KL6U2L1hJT54SHr8LxzxgGKlj7iMt0OAJvzD TZdibncRVtivGQcycRDXHWZteTwYidlAaArSrXJn1IhWlxPoGuiCDOJv17fDOB/sNS7X NsJObBe8Gtr2RMzUpBHcTvvwaDEPjPC3vpsEn2LXifm218ky5uG6bvpjUt8m6ct8ZS32 YFedzxTIXbFInTfIdDk5zfzRlHmK9lqH8SDUqd0zGoeaJVZRU+fOBYNhWcCBq0neMtHj 6Xdt5qMKRhgR1IDE9sX/9dbmXntEYUsCYL76cTSR+6pNo+/LCQhVmsTJRSxDmf6eIlMu oCNA== X-Gm-Message-State: AAQBX9dC4xdruYQKHAQqNmHaaSTiRApFpOzqSjZoUN18D61M07zl3dfp HXsC9XYMx1TKWgcZmnVLHyt1bRbz6cQ= X-Google-Smtp-Source: AKy350b6W2yEBTorLaTtXkWVwBufn7mqoSrQJML2hD6A9dyZS1amSXpUw34s//14ZMmwsP3nHv3/pg== X-Received: by 2002:a17:90b:358e:b0:23f:b609:e704 with SMTP id mm14-20020a17090b358e00b0023fb609e704mr4431181pjb.1.1681455203040; Thu, 13 Apr 2023 23:53:23 -0700 (PDT) Received: from magi (host-47-152-66-217.spbmts.ru. [217.66.152.47]) by smtp.gmail.com with ESMTPSA id q6-20020a17090a938600b0023f8bdc4a7fsm416787pjo.14.2023.04.13.23.53.21 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Thu, 13 Apr 2023 23:53:22 -0700 (PDT) From: Aleksandr Vityazev To: guix-patches@gnu.org Subject: [PATCH] image: Add partition type-uuid support. Date: Fri, 14 Apr 2023 09:53:14 +0300 Message-ID: <87pm87j6p1.fsf@gmail.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2607:f8b0:4864:20::1032; envelope-from=avityazew@gmail.com; helo=mail-pj1-x1032.google.com X-Spam_score_int: -5 X-Spam_score: -0.6 X-Spam_bar: / X-Spam_report: (-0.6 / 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, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_SORBS_WEB=1.5, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: submit 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: -0.8 (/) * gnu/image.scm ()[type-uuid]: New field, (partition-type-uuid): new exported procedure. * gnu/system/image.scm (partition->dos-type, partition->gpt-type): Adapt accordingly. * doc/guix.texi (partition Reference): Document it. --- doc/guix.texi | 5 +++++ gnu/image.scm | 4 ++++ gnu/system/image.scm | 9 +++++++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index adb1975935..7e42fcd0fc 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -43834,6 +43834,11 @@ The partition UUID as an @code{uuid} record (@pxre= f{File Systems}). By default it is @code{#false}, which means that the partition creation tool will attribute a random UUID to the partition. =20 +@item @code{type-uuid} (default: @code{#false}) +The partition type UUID as an @code{uuid} record. By default it is +@code{#false}, which means the type UUID will be defined according to +@code{flags} or @code{file-system}. + @item @code{flags} (default: @code{'()}) The partition flags as a list of symbols. Possible values are @code{'boot} and @code{'esp}. The @code{'boot} flags should be set if diff --git a/gnu/image.scm b/gnu/image.scm index 523653dd77..be8b725d37 100644 --- a/gnu/image.scm +++ b/gnu/image.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright =C2=A9 2020, 2022 Mathieu Othacehe +;;; Copyright =C2=A9 2023 Aleksandr Vityazev ;;; ;;; This file is part of GNU Guix. ;;; @@ -33,6 +34,7 @@ (define-module (gnu image) partition-file-system-options partition-label partition-uuid + partition-type-uuid partition-flags partition-initializer =20 @@ -126,6 +128,8 @@ (define-record-type* partition make-partiti= on (label partition-label) ;string (uuid partition-uuid (default #false)) ; + (type-uuid partition-type-uuid ; + (default #false)) (flags partition-flags (default '()) ;list of symbols (sanitize validate-partition-flags)) diff --git a/gnu/system/image.scm b/gnu/system/image.scm index afef79185f..cca3c54b1b 100644 --- a/gnu/system/image.scm +++ b/gnu/system/image.scm @@ -4,6 +4,7 @@ ;;; Copyright =C2=A9 2022 Pavel Shlyak ;;; Copyright =C2=A9 2022 Denis 'GNUtoo' Carikli ;;; Copyright =C2=A9 2022 Alex Griffin +;;; Copyright =C2=A9 2023 Aleksandr Vityazev ;;; ;;; This file is part of GNU Guix. ;;; @@ -364,8 +365,10 @@ (define (partition->dos-type partition) ;; Return the MBR partition type corresponding to the given PARTITIO= N. ;; See: https://en.wikipedia.org/wiki/Partition_type. (let ((flags (partition-flags partition)) - (file-system (partition-file-system partition))) + (file-system (partition-file-system partition)) + (type-uuid (partition-type-uuid partition))) (cond + (type-uuid (uuid->string type-uuid)) ((member 'esp flags) "0xEF") ((string-prefix? "ext" file-system) "0x83") ((or (string=3D? file-system "vfat") @@ -383,8 +386,10 @@ (define (partition->gpt-type partition) ;; given PARTITION. See: ;; https://github.com/pengutronix/genimage/blob/master/README.rst (let ((flags (partition-flags partition)) - (file-system (partition-file-system partition))) + (file-system (partition-file-system partition)) + (type-uuid (partition-type-uuid partition))) (cond + (type-uuid (uuid->string type-uuid)) ((member 'esp flags) "U") ((string-prefix? "ext" file-system) "L") ((or (string=3D? file-system "vfat") base-commit: c371555a4b46a5c9288f54753b0f158f9c4b8abc prerequisite-patch-id: 170079138c52aa59aa21a917f8d6b178c80c85d8 prerequisite-patch-id: 947e2640dcf1b47e6b1160b7525cbe7f7300e50b --=20 2.39.2 --=20 Aleksandr Vityazev From debbugs-submit-bounces@debbugs.gnu.org Sat May 13 04:06:06 2023 Received: (at 62827) by debbugs.gnu.org; 13 May 2023 08:06:06 +0000 Received: from localhost ([127.0.0.1]:35694 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxkGU-0003wI-Cs for submit@debbugs.gnu.org; Sat, 13 May 2023 04:06:06 -0400 Received: from jpoiret.xyz ([206.189.101.64]:37968) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pxkGT-0003wB-50 for 62827@debbugs.gnu.org; Sat, 13 May 2023 04:06:05 -0400 Received: from authenticated-user (jpoiret.xyz [206.189.101.64]) by jpoiret.xyz (Postfix) with ESMTPA id B2805184F27; Sat, 13 May 2023 08:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jpoiret.xyz; s=dkim; t=1683965164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=CASfY7A0X10HvxJZR4Bgq5hQsN+3byz87b/FYrCBef0=; b=Dlp9OsHSnFq3Y8rs75md7gxe0LqXB2wHm1ncf5RYxhwh+nt7OLqg3u3gm3sNhWlh/6kEyJ ZJ7nGD2ZDEfonjYgalDR8Ou73JaQK/CLt57n3kZblt+WOtNQ/LROUOqktdwRcOCdY+8WUY cDAg6CNBAIrQq3Dy3rD9qAnyrmPNQ2tpK3EXVARIKqrzUt7Bfx3XKhpTqOLrPslwuXnbSr LZ07sRlhWispy19rq6nLk1HHc31Mj1dXYdn9CLgml5HaOe+ZRSM500TkiaMC8dLDGMI4pN ImDkb8snCt30CjF9vYrWcoJ0aPuEqi6UX+NgrF/IfbOOg1389eXbXHb/PkpDPA== From: Josselin Poiret To: Aleksandr Vityazev , 62827@debbugs.gnu.org Subject: Re: [bug#62827] [PATCH] image: Add partition type-uuid support. In-Reply-To: <87pm87j6p1.fsf@gmail.com> References: <87pm87j6p1.fsf@gmail.com> Date: Sat, 13 May 2023 10:06:01 +0200 Message-ID: <87ttwgac5y.fsf@jpoiret.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Spamd-Bar: / Authentication-Results: jpoiret.xyz; auth=pass smtp.auth=jpoiret@jpoiret.xyz smtp.mailfrom=dev@jpoiret.xyz X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 62827 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: 0.0 (/) --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Aleksandr, Aleksandr Vityazev writes: > @@ -364,8 +365,10 @@ (define (partition->dos-type partition) > ;; Return the MBR partition type corresponding to the given PARTIT= ION. > ;; See: https://en.wikipedia.org/wiki/Partition_type. > (let ((flags (partition-flags partition)) > - (file-system (partition-file-system partition))) > + (file-system (partition-file-system partition)) > + (type-uuid (partition-type-uuid partition))) > (cond > + (type-uuid (uuid->string type-uuid)) > ((member 'esp flags) "0xEF") > ((string-prefix? "ext" file-system) "0x83") > ((or (string=3D? file-system "vfat") MBR partitions use a single byte to represent the type, and we don't have any corresponding uuid type for that, so this wouldn't work. Adding a UUID type for MBR should be the way forward. The GPT partition side seems good to me, but it would be nice if the description in the manual included the expected formats of the UUIDs, depending on the partition table type. Examples would be welcome there as well. Best, =2D-=20 Josselin Poiret --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQHEBAEBCgAuFiEEOSSM2EHGPMM23K8vUF5AuRYXGooFAmRfROkQHGRldkBqcG9p cmV0Lnh5egAKCRBQXkC5FhcaipnuC/9G7Vr9qyfWBhFHuusXcZn78eskgzDGHebx 5Av7niB/zYvSeSTGV++7Dv8T2ubrWXMnll9fkyHyIcd6BUO2Jf/H4cdzcVvmJquV /oE65i5Z345h1b9UOHsamE5/kxVUsRACUoeD6L3nSVRGecGVW/BuLVtbyHMP3Qma G9TUS5NHlhYHUuQU6SB9BJWP9R+6XY39eg2kcuqPVD0mDIH6CnWMF9sONE2ZyBn/ ouNCNP6xBs4juVMLvegkM+lt2AbRYuDU2IVobdbpLjhN0MvYpW6LSit2jav1TnaT Lg8RzNlshabLfwQAsDoymUGPpdUNIS8j556KCJS/UKOntMqxHL0jxdxqaMmuYJdA IHRAgg5VUNGE0nYVsB5y9veXzGSxC52RJtDXqKH0sgITZZSaq+Xk01mFqOAOR0Zh E0mKyrd3Njm/QNJdIX3eXMF1ZprpxzeyXr9xoWzYb63oIJN6wiBERX1V++djD3Y+ HDWOqKXm/VO7FYGpUwppQ2GeAf/xcZ4= =x5zA -----END PGP SIGNATURE----- --=-=-=-- From debbugs-submit-bounces@debbugs.gnu.org Sat Oct 14 16:05:33 2023 Received: (at 62827-done) by debbugs.gnu.org; 14 Oct 2023 20:05:33 +0000 Received: from localhost ([127.0.0.1]:50601 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrkt7-0000Cr-QX for submit@debbugs.gnu.org; Sat, 14 Oct 2023 16:05:33 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37464) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrkt3-0000CX-5j for 62827-done@debbugs.gnu.org; Sat, 14 Oct 2023 16:05:29 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qrksZ-0005oV-NK; Sat, 14 Oct 2023 16:04:55 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=nzmWwHBPX2IyLRAHmYPVJt/k6+ueQHWTwoeb9p34H6s=; b=m4z3JcWtd42ReaAKQvo3 zUXUhOV/Sl/uxsVbtROi0Zsq5VefsOAW/+k8okhbmjDbItoK25jEzhwnBvM8Vh4h4XBqXPhGiQIlG TN1gw42hhTHtaQIBHL9yrhpnL3DufFj1uvfc91VoFG51cWSceFoP7FtUTcZgS63D73T7Zx0LYpR20 nJvPdFO4K2SFFibQ5jXzyPQvirYBK+iuGf0yjm2hJQ9CBw+OuOfNatlf+hm68prwftzmSXrTz8q+G fliY1DzYUBwTY36Dxas7THeOQmzBYkyTXOQIIfX6wwig+2IsLJ46KCpxQNQJ+GeNsyOhymgwCABX5 8lK1yRDMaGBbRw==; From: Mathieu Othacehe To: Aleksandr Vityazev Subject: Re: [bug#62827] [PATCH] image: Add partition type-uuid support. In-Reply-To: <87pm87j6p1.fsf@gmail.com> (Aleksandr Vityazev's message of "Fri, 14 Apr 2023 09:53:14 +0300") References: <87pm87j6p1.fsf@gmail.com> Date: Sat, 14 Oct 2023 22:04:53 +0200 Message-ID: <87o7h1j7h6.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 62827-done Cc: 62827-done@debbugs.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: -3.3 (---) Hello, > - (file-system (partition-file-system partition))) > + (file-system (partition-file-system partition)) > + (type-uuid (partition-type-uuid partition))) > (cond > + (type-uuid (uuid->string type-uuid)) > ((member 'esp flags) "0xEF") This one was been opened for a while. There are no UUIDs on MBR so I doubt this makes sense. Closing, Thanks, Mathieu From unknown Mon Aug 18 08:27:28 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sun, 12 Nov 2023 12:24:09 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator