Skip to content

Commit 2d34dd5

Browse files
examples: factor out fsck.erofs call
Move this to the common/make-image script to reduce a bit of duplication. There should always be exactly one image, so just glob. Signed-off-by: Allison Karlitskaya <[email protected]>
1 parent 2400cce commit 2d34dd5

File tree

5 files changed

+3
-4
lines changed

5 files changed

+3
-4
lines changed

examples/bls/build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ podman build \
5151
BASE_ID="$(sed s/sha256:// tmp/base.iid)"
5252
${CFSCTL} oci pull containers-storage:${BASE_ID}
5353
BASE_IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${BASE_ID}")"
54-
fsck.erofs "tmp/sysroot/composefs/images/${BASE_IMAGE_FSVERITY}"
5554

5655
mkdir -p "tmp/sysroot/state/${BASE_IMAGE_FSVERITY}/etc/work"
5756
mkdir -p "tmp/sysroot/state/${BASE_IMAGE_FSVERITY}/etc/upper"

examples/common/make-image

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ set -eux
44

55
output="$1"
66

7+
# check that the image doesn't have errors
8+
fsck.erofs tmp/sysroot/composefs/images/*
9+
710
fakeroot "${0%/*}/run-repart" tmp/image.raw
811
qemu-img convert -f raw tmp/image.raw -O qcow2 "${output}"
912
rm tmp/image.raw

examples/uki/build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,6 @@ ${PODMAN_BUILD} \
5555
FINAL_ID="$(sed s/sha256:// tmp/final.iid)"
5656
${CFSCTL} oci pull containers-storage:"${FINAL_ID}"
5757
FINAL_IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${FINAL_ID}")"
58-
fsck.erofs "tmp/sysroot/composefs/images/${FINAL_IMAGE_FSVERITY}"
5958

6059
## IMPORTANT: the filesystems of the base and final images are identical
6160
test "${BASE_IMAGE_FSVERITY}" = "${FINAL_IMAGE_FSVERITY}"

examples/unified-secureboot/build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ podman build \
4949
IMAGE_ID="$(sed s/sha256:// tmp/iid)"
5050
${CFSCTL} oci pull containers-storage:"${IMAGE_ID}"
5151
IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${IMAGE_ID}")"
52-
fsck.erofs "tmp/sysroot/composefs/images/${IMAGE_FSVERITY}"
5352

5453
mkdir -p "tmp/sysroot/state/${IMAGE_FSVERITY}/etc/work"
5554
mkdir -p "tmp/sysroot/state/${IMAGE_FSVERITY}/etc/upper"

examples/unified/build

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ podman build \
3131
IMAGE_ID="$(sed s/sha256:// tmp/iid)"
3232
${CFSCTL} oci pull containers-storage:"${IMAGE_ID}"
3333
IMAGE_FSVERITY="$(${CFSCTL} oci create-image "${IMAGE_ID}")"
34-
fsck.erofs "tmp/sysroot/composefs/images/${IMAGE_FSVERITY}"
3534

3635
mkdir -p "tmp/sysroot/state/${IMAGE_FSVERITY}/etc/work"
3736
mkdir -p "tmp/sysroot/state/${IMAGE_FSVERITY}/etc/upper"

0 commit comments

Comments
 (0)