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 65A3FCDD6; Sat, 22 Nov 2025 01:27:50 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 43A3BCCE8; Sat, 22 Nov 2025 01:27:40 +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-xb12b.google.com (mail-yx1-xb12b.google.com [IPv6:2607:f8b0:4864:20::b12b]) by atuin.qyliss.net (Postfix) with ESMTPS id 078EACC6D for ; Sat, 22 Nov 2025 01:27:37 +0000 (UTC) Received: by mail-yx1-xb12b.google.com with SMTP id 956f58d0204a3-6420c08f886so2890063d50.3 for ; Fri, 21 Nov 2025 17:27:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1763774855; x=1764379655; 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=XsBt85kTfK6/KYD+we3tlVLIKB3A4KfcGU6nDf+2rFfqeMl9T1q7VbCLe56o3/SS3j wmApz/ASiYD9EB7uHCYBQmnSaYT78tLv34gK5qT35H9mStonP1iA8Sg1qkSHTlC2/sB+ W5An+zKK6zufAIZ2GVEH7ERogLNEUIfulEvkLYdBLFMrEGBRWRghbLbco1SB4w1LME19 L+vB5aykEjKJmS6eA3q29KoqZGvFs0JER3+ds47vylC+VGS3JQNWZ4MtSiSlT+S2Kupy 0x1KOxWig7HmEFeuPRCBFlQsDKx/Moh5ZvObmwdY9T7NFhuSKZz7gU73pSfja4mmb/JV SA2A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1763774855; x=1764379655; 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=IMt/j/5C9eN2HsBmcW4slitPUy0au3npcHcPxzGwQPMfR7y4hVTjEwtBwJQBoNI3N7 asyKLK3IxrnlNGcocN6D9E1j3ziJMil89YnIPXuNfNqsFJhBZ4G0TQ/497638s6vdeHN 22awkAYZkwP/2/kGAQc9FGWux8x1RkM9iwyrOuFtD+LrQCDxmYt0ne57UYCfU+6k4mmB kO4elpHbQdZ9KAxv0rBeBlcFnWFPp6EFiHkCp/fa3jLihNiiit6r3yJvNNfsji+I+w2d tIbZ9WD9PBqCVagR8HD3zRcSt7SjSgjWomfUwc0xyX5P/gtTwQbdsJ+kmBRds4LZpJSn QMPQ== X-Gm-Message-State: AOJu0YxHW3mRBKj5wfaG+JYlEdlSIGp+5IsgR3vvv3F/z2mZBFy1dlYw S6wRTNlvjwUndgOQTMNJ1dhSHTGSKvqrydkl/JxfVFBDaOGV4c3vNsNEiPbtQg== X-Gm-Gg: ASbGncud8Aif6mT1PX27jocuVVpSaI7Ef91H0k9TXnykonmke3JhSloyhUhDfKCKaEj hkvLaVGL9X3295T+4BwQkdQZYRarZ0boPt9E6TixGjqrX6wlKu2s/kFlIzzLCMv7vb+XAjRmO7O OJcc2qBTQm8ssMwya7eSP86+eAWlDguRHFxtooTCuK199y4Mw0TJY7A7MVQweJOMHIr92Ys3hEQ P4h/N4QUNZvlyFXiZo+p96zk+2UStAPGeNG+S0CMXnMWBEtrF5+kFclIQftC0Ia3Y/a+0Ays0qA ExYZ4j+2o/e5jdgA6n1KxkOFvtzUFF7Gobx8yREEFqEGHlevBLQ3fkmnikCH/sQCC1TnBhu9+HW q010op2RqaTcufdxkFVT35BV0LNhfA9ALl0RjtloUpaZFsp0JM1xGNpyjAmHalcKJqDhQZGEZ27 4ay6v+DVtTj7Sayq4qs2QeLF+YF6Y7AqM+hhqICNg0LpjrZv7kDPUCp72GOLlN7WlpR1c6InbPC dD1YdWeyprCD4U6tCFoSIYWnhkZMCxzozw= X-Google-Smtp-Source: AGHT+IH/ESLVlRuhDzCTwuqZQGryQNnCP9aJq6pn63P5ZsLpVpaewWigLVFwysd5Dqa7xBVYFoLbQg== X-Received: by 2002:a05:690e:d89:b0:640:b8ef:b77a with SMTP id 956f58d0204a3-64302aeb4ddmr2801150d50.69.1763774854826; Fri, 21 Nov 2025 17:27:34 -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 956f58d0204a3-642f70a6aa3sm2254330d50.8.2025.11.21.17.27.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 21 Nov 2025 17:27:34 -0800 (PST) From: Demi Marie Obenour Date: Fri, 21 Nov 2025 20:23:27 -0500 Subject: [PATCH v4 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: <20251121-updates-v4-5-d4561c42776e@gmail.com> References: <20251121-updates-v4-0-d4561c42776e@gmail.com> In-Reply-To: <20251121-updates-v4-0-d4561c42776e@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1763774602; l=1333; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=L4wgZesvNXX1JBAEbMv0H/qBkZTfDShF9L/+xm1GJhA=; b=Pekfn9OWz/FyyHjODDAOz5YECKZQyl3Mds5vls0/VGJk1Ne04Ib7oMDIFZ0zgK+Z9t7wTHNFv stI0FBhTzjOAjyMBwUDIJE7oDi0o+bbokhdxYHhR5EBFkp4GvFBkzgT X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: H43P25ZOK3DPLNECBJVX4APYYC2KHIYT X-Message-ID-Hash: H43P25ZOK3DPLNECBJVX4APYYC2KHIYT 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