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 30391B7DC; Wed, 26 Nov 2025 19:41:57 +0000 (UTC) Received: by atuin.qyliss.net (Postfix, from userid 993) id 7356AB76A; Wed, 26 Nov 2025 19:41:49 +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-yw1-x1136.google.com (mail-yw1-x1136.google.com [IPv6:2607:f8b0:4864:20::1136]) by atuin.qyliss.net (Postfix) with ESMTPS id 0FD8CB743 for ; Wed, 26 Nov 2025 19:41:47 +0000 (UTC) Received: by mail-yw1-x1136.google.com with SMTP id 00721157ae682-78a7af9ff1dso1500987b3.1 for ; Wed, 26 Nov 2025 11:41:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1764186105; x=1764790905; 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=B2Whfup6y7PPWRPlGNZf7KpSh85+D9R/MQ89tIWHvX8=; b=nX66hJQidg/YiMkeWoP/+6yfaZunoyvsnaGyc9UH6xy1c6+7Aowh7TWsHdb2lXZodm iixsMSZ0IOrmrR9EvSBellPus9eoq9Pp54zRz2yDUFtejHeOXaLseZlY8t9LDfMisy36 q36lxWsOn4cLxg40/cGvptOYSwM194P6qjAFY+V2+vfhQAlFNVzsAFUG01kSl4ZWG8Wf HyrY8MG85GtPLfzx7HB3NPXUBka2O+jRtg/yGCA7gJy1u1ClZXk+RiX0SAsFY3YSnIig lVYKpgbJC0oyHzGOFuLygVEXjKxBMpFgXeP+07NISmguh5MBYVyhsE+c4ioufPvbJBOz 0ySw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764186105; x=1764790905; 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=B2Whfup6y7PPWRPlGNZf7KpSh85+D9R/MQ89tIWHvX8=; b=UgAfLIuR6Qwm/WcdL3ah04wAK54QfItaoR7OG5J5dVslWqVXkbIHHLu8cc7dbsilyH K27fLNjIJ79KiTetFkzFa3lQGqWdmv7hNSULi3l1Muim+OuCd3wvB9osWf2xW7O2XiCc i0qU+0rYz5GrLj9zrunXY0f7ebcm4kg7u4jDYDjkxBsIeQZ9d8vLoYC6ShLE3ziKcrOF OOeoY2diG6gsEqgm1seJU9z1kV0lMzzgprJ71uP8X8/g7Ie9IFw9P+ogyWLwTyUmPYLp d+pSSZrz9/XsWd9yZav58C+CWussV/RAgXRnw/SN0e78u02sazoKm3MPxCeP1Jrct8uV zofA== X-Gm-Message-State: AOJu0Yw8a4nA1Z9mdHrtdxkVgwtn0N2S4S2k2C2EyPjhq5xqpyqmkL85 CFCK+i7kjsveya+QkryoxFowz8Kz5ib2X8OM44VZHC/ghmTuvCzvUPLGkJcB9A== X-Gm-Gg: ASbGncvEfDnwmft0XTvrM3ZqmHrKQWeIxFg00s5Zz5FZNKHNqogpqhJZFD230PcuQ1n cXm5oZmrETw9HjEBqjsHDTt3eTXMORJ59GPV5hKyk5bsasvW4nYcZtostRU0IIkYbBU/dUyDJhs BRDxEJuyLwnc8djEOXL4UBLKLi3kHWRAlGQu5fyd3tkHQhMwMtcDqwMMdv1o2U4wWMz+66DnauY 9UlquK8mlp9gS0XDDzi/lCr9lPykAtE3Qtf+zcDiwS3tmSl841cT6B//Ffgn2ExCeyTpilUu6FV ZDQPW/2OLW9LWwXHSowB9tB3QI5uCTDqIQD2nR/eeEg+Gwa0if6NpQ3ZrWewphdSz0xLzTbFW7W wPiSXzSEhXlllgAhKbuVMZTBafOjl632x3Z1WjWLYAvBJHjL72IHKWmNeDkQMMg4i/sNVnJJsiy lB7+RRxYjUU9nlzl6tZ5hjh1fMtPqo7PDdgNqZvOssAqLEidgW9VP1KjbUmpBikypnquFZoPlk0 SIOUxfBCTnS92XC2yLedqGcS0ywQi7fBEg= X-Google-Smtp-Source: AGHT+IGWyqq0eQQvF5dJ0QQOE/WuT2Kc7a3K5hCUsrlKvmE0U4d1QBjvOmLdEqnXXwqVyOMKy09/+g== X-Received: by 2002:a05:690c:9c01:b0:787:d0d5:808e with SMTP id 00721157ae682-78a8b51fb7emr157301797b3.50.1764186104758; Wed, 26 Nov 2025 11:41:44 -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-78a79925ba4sm69344157b3.26.2025.11.26.11.41.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Nov 2025 11:41:44 -0800 (PST) From: Demi Marie Obenour Date: Wed, 26 Nov 2025 14:40:43 -0500 Subject: [PATCH v5 03/13] 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: <20251126-updates-v5-3-fd746748febd@gmail.com> References: <20251126-updates-v5-0-fd746748febd@gmail.com> In-Reply-To: <20251126-updates-v5-0-fd746748febd@gmail.com> To: Spectrum OS Development X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1764186040; l=1377; i=demiobenour@gmail.com; s=20250729; h=from:subject:message-id; bh=J1v+sK9YnBg0vjRVfksHv4sOhuiBHMKz+LDSUMcHO+8=; b=jPwWbR4DpwtEX5ZfK86HYsELDgR9xs+xcIu1PbPlY5LK8YdmvTm5pkb9JoGX2SBRMEJlZKqqw t91YeXjbDLaCu6Z9jhPF+hIgRmqKYMa+pWGvfkdvwXZLI+4+nwD6P+X X-Developer-Key: i=demiobenour@gmail.com; a=ed25519; pk=X57Q4/YQDj9t4SBeKaDwvXYKB6quZJVx/DE2Ly2out0= Message-ID-Hash: EZHK5AMCWWQMXYXVC7KDNBJLVRN3Y4ZP X-Message-ID-Hash: EZHK5AMCWWQMXYXVC7KDNBJLVRN3Y4ZP 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 v4: - Remove the MiB suffix. 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..c3f16e6c029d1d27d3da9e05e50945a56bfad9f8 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]*)$ ]]; 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