blob 2d8f5140fd23280d0f8ff2c0cb1640875dab4e8e 1403 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
| | #!/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
if [ ! -f build/rootfs.verity.superblock ]; then
echo 'No superblock found' >&2
exit 1
fi
case $0 in
(/*) dir=${0%/*}/;;
(*/*) dir=./${0%/*};;
(*) dir=.;;
esac
usage () {
echo 'Usage: make-live-image.sh [release|live] OUTPUT_FILE ROOT_FILESYSTEM' >&2
exit 1
}
if [ "$#" != 3 ]; then usage; fi
file_type=$1 output_file=$2 root_filesystem=$3
root_hashes=$(LC_ALL=C awk -f "${dir}/format-uuid.awk" < build/rootfs.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 \
"build/rootfs.verity.superblock:verity:$1:Spectrum_OS_$VERSION.verity:1024MiB" \
"$root_filesystem:root:$2:Spectrum_OS_$VERSION:20480MiB" \
"/dev/null:verity:$3:_empty:1024MiB" \
"/dev/null:root:$4:_empty:20480MiB"
;;
(live)
"$dir/make-gpt.sh" "$output_file.tmp" \
"build/rootfs.verity.superblock:verity:$1:Spectrum_OS_$VERSION.verity" \
"$root_filesystem:root:$2:Spectrum_OS_$VERSION";;
(*) usage;;
esac
mv -- "$output_file.tmp" "$output_file"
|
debug log:
solving 2d8f5140fd23280d0f8ff2c0cb1640875dab4e8e ...
found 2d8f5140fd23280d0f8ff2c0cb1640875dab4e8e in https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
applying [1/1] https://inbox.spectrum-os.org/spectrum-devel/20251029-updates-v1-4-401c1be2a11b@gmail.com/
diff --git a/scripts/make-live-image.sh b/scripts/make-live-image.sh
new file mode 100755
index 0000000000000000000000000000000000000000..2d8f5140fd23280d0f8ff2c0cb1640875dab4e8e
Checking patch scripts/make-live-image.sh...
Applied patch scripts/make-live-image.sh cleanly.
index at:
100755 2d8f5140fd23280d0f8ff2c0cb1640875dab4e8e 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).