From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from atuin.qyliss.net (localhost [IPv6:::1]) by atuin.qyliss.net (Postfix) with ESMTP id D321C56F7; Wed, 04 Feb 2026 17:57:14 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 7F3BC56CD; Wed, 04 Feb 2026 17:57:10 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on atuin.qyliss.net X-Spam-Level: X-Spam-Status: No, score=-0.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DMARC_PASS,SPF_HELO_PASS autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [IPv6:2001:67c:2050:0:465::102]) by atuin.qyliss.net (Postfix) with ESMTPS id C9F7E564D for ; Wed, 04 Feb 2026 17:57:06 +0000 (UTC) Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-102.mailbox.org (Postfix) with ESMTPS id 4f5p2n20s9z9vM3 for ; Wed, 4 Feb 2026 18:57:05 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1770227825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7nsRO+RC4UCSukFKZE6OXkFfvvJhHrQy5aqZci5Afas=; b=dfWqSeDQ1++wIJFdCDNSppsX1WVXnWjZutrazV0Va384FdUyz2Q26hjaK24NacNVoRI14X /7cCoazQ03u3XMyKYdtDlMwnLA2ZO+zFogvAFcJPOPR9qrK1pqPXrCtvivPI7BCrVFx87y 8hROFNxBEOui/Z05budJIpPeQVcTEtiqOcKnsJ8s2w/jZ6mfusweQn/aJ4VwzWJsfqeLWs XhnTfaN975ttylx6ej/nOkVx/bn75gcTZCoA4QTecvaoDOZ5s55d7wOqkg4z0gTbgnJ3ew FOfzuiOWwkR5aYDneHn52Tyr5id1sZxzVPaQS1HdZrT0pD/4f8Wd6bnL381zXQ== From: =?UTF-8?q?Johannes=20S=C3=BCllner?= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1770227825; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7nsRO+RC4UCSukFKZE6OXkFfvvJhHrQy5aqZci5Afas=; b=dfWqSeDQ1++wIJFdCDNSppsX1WVXnWjZutrazV0Va384FdUyz2Q26hjaK24NacNVoRI14X /7cCoazQ03u3XMyKYdtDlMwnLA2ZO+zFogvAFcJPOPR9qrK1pqPXrCtvivPI7BCrVFx87y 8hROFNxBEOui/Z05budJIpPeQVcTEtiqOcKnsJ8s2w/jZ6mfusweQn/aJ4VwzWJsfqeLWs XhnTfaN975ttylx6ej/nOkVx/bn75gcTZCoA4QTecvaoDOZ5s55d7wOqkg4z0gTbgnJ3ew FOfzuiOWwkR5aYDneHn52Tyr5id1sZxzVPaQS1HdZrT0pD/4f8Wd6bnL381zXQ== To: devel@spectrum-os.org Subject: [PATCH v2 5/5] Revert "scripts/make-gpt.sh: allow setting partition size" Date: Wed, 4 Feb 2026 18:55:25 +0100 Message-ID: <20260204175543.22164-7-johannes.suellner@mailbox.org> In-Reply-To: <20260204175543.22164-2-johannes.suellner@mailbox.org> References: <20260204175543.22164-2-johannes.suellner@mailbox.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MBO-RS-ID: 7d65cac2e30ec862775 X-MBO-RS-META: n9871rhf3kyikmqfhxhimo47rhm9h9u5 Message-ID-Hash: 7KHYO5BXPQVBF3FW7TWLWDTAPEIA2NXX X-Message-ID-Hash: 7KHYO5BXPQVBF3FW7TWLWDTAPEIA2NXX X-MailFrom: johannes.suellner@mailbox.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-devel.spectrum-os.org-0; header-match-devel.spectrum-os.org-1; header-match-devel.spectrum-os.org-2; header-match-devel.spectrum-os.org-3; header-match-devel.spectrum-os.org-4; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: =?UTF-8?q?Johannes=20S=C3=BCllner?= X-Mailman-Version: 3.3.9 Precedence: list List-Id: Patches and low-level development discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: This reverts commit d4832d18f7c938782efd88185b31180d7475b575. The only place where partition sizes were set was for the live image, and this was removed in the parent commit. Signed-off-by: Johannes Süllner --- scripts/make-gpt.sh | 31 ++++++++++++------------------- scripts/sfdisk-field.awk | 22 +++++----------------- 2 files changed, 17 insertions(+), 36 deletions(-) diff --git a/scripts/make-gpt.sh b/scripts/make-gpt.sh index 998a54d..e39828b 100755 --- a/scripts/make-gpt.sh +++ b/scripts/make-gpt.sh @@ -1,10 +1,10 @@ #!/bin/sh -- # -# SPDX-FileCopyrightText: 2021-2023, 2025 Alyssa Ross +# SPDX-FileCopyrightText: 2021-2023 Alyssa Ross # SPDX-FileCopyrightText: 2022 Unikie # SPDX-License-Identifier: EUPL-1.2+ # -# usage: make-gpt.sh GPT_PATH PATH:PARTTYPE[:PARTUUID[:PARTLABEL[:PARTMiB]]]... +# usage: make-gpt.sh GPT_PATH PATH:PARTTYPE[:PARTUUID[:PARTLABEL]]... set -euo pipefail @@ -35,28 +35,21 @@ scriptsDir="$(dirname "$0")" out="$1" shift -table=$(for partition; do - size="$(sizeMiB "${partition%%:*}")" - awk -f "$scriptsDir/sfdisk-field.awk" \ - -v partition="$partition" \ - -v size="$size" -done) +nl=' +' +table="label: gpt" # Keep 1MiB free at the start, and 1MiB free at the end. -gptMiB=2 -while read -r partition; do - # Here we rely on sfdisk-field.awk always putting size last. - : $((gptMiB += ${partition##*=})) -done < +# SPDX-FileCopyrightText: 2022, 2024 Alyssa Ross BEGIN { types["root.aarch64"] = "b921b045-1df0-41c3-af44-4c6f280d3fae" @@ -9,11 +9,12 @@ BEGIN { types["verity.aarch64"] = "df3300ce-d69f-4c92-978c-9bfb0f38d820" types["verity.x86_64"] = "2c7357ed-ebd2-46d9-aec1-23d437ec2bf5" - # Field #1 is the partition path, which is read by make-gpt.sh - # but not relevant for running sfdisk, so skip it. + # Field #1 is the partition path, which make-gpt.sh will turn into + # the size field. Since it's handled elsewhere, we skip that + # first field. skip=1 - split("type uuid name size", keys) + split("type uuid name", keys) split(partition, fields, ":") arch = ENVIRON["ARCH"] @@ -30,21 +31,8 @@ BEGIN { if (keys[n - skip] == "type") { if (uuid = types[fields[n] "." arch]) fields[n] = uuid - } else if (keys[n - skip] == "size") { - if (fields[n] < size) { - printf "%s MiB partition content is too big for %s MiB partition\n", - size, fields[n] > "/dev/stderr" - exit 1 - } - - size = fields[n] - continue # Handled at the end. } printf "%s=%s,", keys[n - skip], fields[n] } - - # Always output a size field, either supplied in input or - # default value of the size variable. - printf "size=%s\n", size }