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 388B41B683; Wed, 19 Nov 2025 08:21:29 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 037231B626; Wed, 19 Nov 2025 08:21:23 +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,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE autolearn=unavailable autolearn_force=no version=4.0.1 Received: from mail-yx1-xb131.google.com (mail-yx1-xb131.google.com [IPv6:2607:f8b0:4864:20::b131]) by atuin.qyliss.net (Postfix) with ESMTPS id CAA6E1B53D for ; Wed, 19 Nov 2025 08:21:15 +0000 (UTC) Received: by mail-yx1-xb131.google.com with SMTP id 956f58d0204a3-642f3bab0c8so3954d50.0 for ; Wed, 19 Nov 2025 00:21:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763540474; x=1764145274; darn=spectrum-os.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=pqUfOeEFmArDgGA6TFzOLfTwHZm328L6NWN0wA3H/28=; b=cDj0ZxqQvamCoST/FrwRihoLOdXeMFnXWtMv2JaQ8K4yQPRTPIvq63iYJT03Q+/icG qfVkwaqvuafWMbROCf6qrwN3ohmHOF3ZU7l8rRYqtG4cJAo4aT7AKh4uthPc18zPJPCm PYVifNQ9ZjFYje981mh10LELO8WzespvR7+QOCYe0EJHh/wo9Ry2ffeEvGKCrsluHEQD iXjOs9KuT7W4em5i6D9EeYXs+oSDm1FAANYfGbaNmx5yf608zSeVfSQyPBn8J/KWf99Q VSGnCx0MDNpUD/UwvIRvGZQIL97RBn5S6jxPGddAJyNgKVzGBlqp2XuN3L1FCqD6/FkZ 9lQQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763540474; x=1764145274; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-gg:x-gm-message-state:from:to :cc:subject:date:message-id:reply-to; bh=pqUfOeEFmArDgGA6TFzOLfTwHZm328L6NWN0wA3H/28=; b=GQUeOMzCz+DzfVV4/rBci+nVdszH7Uu4RghWhUBty9yWUVGQQ/4FH81gIlcS3YKuph 2/EMuosvzKSP9agiS51CZad2DW/DsVlkmcwf92UaLl1fFph1S5OUXXaF7BJ9x2Y8RuNm TTsQVEZ0nmfwAcefeEEBZ3A9dCn/z+gH0ccqb04aqkXwNm3Zr8B84cO8H14LhFKD5jIl 5KBifxjxQ7f14qK5yssmjNwUUslh6IjpqwMn6ku4KwoQsTlkRTsDZj18Uu9YyZ9+utzG ++ZKkt3jxx6L9HTcZB/iGD/mePavFAsSJDGeJhqyrhh2TfbfSBrCzV0e/RIRp96/gS0i AeiQ== X-Gm-Message-State: AOJu0YycTcJ4Us1W0LmHV1xkJATpT/v+wBvcv/erFS2F3473pCx8kEY/ BOfS+kIjxTxigZp7mDdfZYDb1+2LocQhi/8co8I/GwNG5AZaVsn/Dhkl3Zphvw== X-Gm-Gg: ASbGncsKm7M94ssRtWFJwb9L77tduhTAvIjpelMOqsFVe1xMkwbWrkgIueRQWnEJ3kG KBXfzDQwd+dduShr5JlOjzu+yIJ3HegWt9Lspo1OzaboeFsLkPxnlp1kg3YLdihLImaCn2m5+GM Yux4J4x1rhfQa35w6/BrYh4rDiviVIoIHaPjCb98IINcJEo0sMuB+mAPccdHaHY06deEUw9Wxj8 1TXpx964wYLd0/KfOJhfDkonVeJecBkGpwN48dths1xCgJQ+wEfVkGRa5oe9/YoRQK5Pd8rIWCn cvsmwAuJiHtI8ox4sngceZ+ft72DVY7PP8gOpKOF2dUCsAWk8yNoTSfF4X8xKlXoa0ykaK0QXZv Ftc6gCsvhDPsWVXK5R1RfmZRvr7A5vvFNwsbOARlk89oZrOXIZhlM5C1lnBLyXVbJXLS59rlA2j Ti/WKn9y81HpjXub8Pse7jFhlXn008/pAxbI8Ylqkz7a8XIMC0EGZEZhb14fUsFhQAwjqcH8zUu BU92TheECqhDovD3CMRmp1Gk4jyh+hyDzNVs0Awrx9btg== X-Google-Smtp-Source: AGHT+IHTEg7L4v923vBQIJUUXu4X1eG6aZp7waS3I8VkLSxRSbOOkEqmveyT8nkKxGGam4ADC5tSEg== X-Received: by 2002:a05:690e:11c2:b0:63f:b5d8:9da9 with SMTP id 956f58d0204a3-642ed0f4671mr1352488d50.12.1763540473680; Wed, 19 Nov 2025 00:21:13 -0800 (PST) Received: from localhost.localdomain (h96-60-249-169.cncrtn.broadband.dynamic.tds.net. [96.60.249.169]) by smtp.gmail.com with UTF8SMTPSA id 00721157ae682-788221224d8sm60623847b3.38.2025.11.19.00.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Nov 2025 00:21:13 -0800 (PST) From: Demi Marie Obenour Date: Wed, 19 Nov 2025 03:18:28 -0500 Subject: [PATCH v3 05/14] scripts/make-gpt.sh: Allow specifying partition size MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20251119-updates-v3-5-b88a99915509@gmail.com> References: <20251119-updates-v3-0-b88a99915509@gmail.com> In-Reply-To: <20251119-updates-v3-0-b88a99915509@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763540303; l=1333; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=L4wgZesvNXX1JBAEbMv0H/qBkZTfDShF9L/+xm1GJhA=; b=+hCu35XmXTohCrtyQhpW91+FAk470jt9EUfNUKss8/EM/CuSOvNriemq/OxREXtQerz/Cb1Gu 26QA7BDsZWOCqUNSJujDdzR6CNYHXhtMsva2ELSTlkUzhGjrPIVutH4 X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: RV5WMKNPIAM4OLA6J7COEQUHNCWFCAZT X-Message-ID-Hash: RV5WMKNPIAM4OLA6J7COEQUHNCWFCAZT X-MailFrom: demiobenour@gmail.com 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: Demi Marie Obenour , Alyssa Ross 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: systemd-sysupdate requires that partitions are large enough to hold the newly downloaded images. This requires that they be large enough to have room to grow. Allow specifying the partition size manually, overriding the default (the size of the file that will be copied into the partition). Signed-off-by: Demi Marie Obenour --- Changes since v2: - Split into separate commit. --- scripts/make-gpt.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/make-gpt.sh b/scripts/make-gpt.sh index 0ae3d0005e5ae7d6214270fedb2fafb0a7064cf5..91c6038f67d4d4906fec4a3412f2ff5fca2671d5 100644 --- a/scripts/make-gpt.sh +++ b/scripts/make-gpt.sh @@ -45,8 +45,13 @@ table="label: gpt" # Keep 1MiB free at the start, and 1MiB free at the end. gptBytes=$((ONE_MiB * 2)) for partition; do - partitionPath=$(partitionPath "$partition") - sizeMiB=$(sizeMiB "$partitionPath") + if [[ "$partition" =~ :([1-9][0-9]*)MiB$ ]]; then + sizeMiB=${BASH_REMATCH[1]} + partition=${partition%:*} + else + partitionPath=$(partitionPath "$partition") + sizeMiB=$(sizeMiB "$partitionPath") + fi table+=$'\n'"size=${sizeMiB}MiB,$(awk -f "$scriptsDir/sfdisk-field.awk" -v partition="$partition")" gptBytes=$((gptBytes + sizeMiB * ONE_MiB)) done -- 2.52.0