blob 6608cc35b7a15178adf5ff3d3917b5243c5da6cd 1482 bytes (raw)
name: scripts/make-live-image.sh # note: path name is non-authoritative(*)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
| | #!/bin/sh --
# SPDX-License-Identifier: EUPL-1.2+
# SPDX-FileCopyrightText: 2021-2024 Alyssa Ross <hi@alyssa.is>
# SPDX-FileCopyrightText: 2025 Demi Marie Obenour <demiobenour@gmail.com>
set -euo pipefail
case $0 in
(/*) dir=${0%/*}/;;
(*/*) dir=./${0%/*};;
(*) dir=.;;
esac
usage () {
echo 'Usage: make-live-image.sh [release|live] OUTPUT_FILE' >&2
exit 1
}
if [ "$#" != 2 ]; then usage; fi
file_type=$1 output_file=$2
for i in "$ROOT_FS" "$ROOT_FS_VERITY" "$ROOT_FS_VERITY_ROOTHASH" "$VERSION"; do
# Some characters not special to the shell can't be handled by this code.
case $i in
(-*|*[!A-Za-z0-9._/+@-]*) printf 'Forbidden characters in "%s"\n' "$i" >&2; exit 1;;
esac
done
root_hashes=$(LC_ALL=C awk -f "${dir}/format-uuid.awk" < "$ROOT_FS_VERITY_ROOTHASH")
# The awk script produces output that is meant for field splitting
# and has no characters special for globbing.
# shellcheck disable=SC2086
set -- $root_hashes
case $file_type in
(release)
"$dir/make-gpt.sh" "$output_file.tmp" \
build/boot.fat:c12a7328-f81f-11d2-ba4b-00a0c93ec93b \
"$ROOT_FS_VERITY:verity:$1:Spectrum_$VERSION.verity:1024MiB" \
"$ROOT_FS:root:$2:Spectrum_$VERSION:20480MiB" \
"/dev/null:verity:$3:_empty:1024MiB" \
"/dev/null:root:$4:_empty:20480MiB"
;;
(live)
"$dir/make-gpt.sh" "$output_file.tmp" \
"$ROOT_FS_VERITY:verity:$1:Spectrum_$VERSION.verity" \
"$ROOT_FS:root:$2:Spectrum_$VERSION";;
(*) usage;;
esac
mv -- "$output_file.tmp" "$output_file"
|
debug log:
solving 6608cc35b7a15178adf5ff3d3917b5243c5da6cd ...
found 6608cc35b7a15178adf5ff3d3917b5243c5da6cd in https://inbox.spectrum-os.org/spectrum-devel/20251112-updates-v2-4-88d96bf81b79@gmail.com/
applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251112-updates-v2-4-88d96bf81b79@gmail.com/
diff --git a/scripts/make-live-image.sh b/scripts/make-live-image.sh
new file mode 100755
index 0000000000000000000000000000000000000000..6608cc35b7a15178adf5ff3d3917b5243c5da6cd
Checking patch scripts/make-live-image.sh...
Applied patch scripts/make-live-image.sh cleanly.
index at:
100755 6608cc35b7a15178adf5ff3d3917b5243c5da6cd scripts/make-live-image.sh
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
https://spectrum-os.org/git/crosvm
https://spectrum-os.org/git/doc
https://spectrum-os.org/git/mktuntap
https://spectrum-os.org/git/nixpkgs
https://spectrum-os.org/git/spectrum
https://spectrum-os.org/git/ucspi-vsock
https://spectrum-os.org/git/www
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).