# assets/oci/build.sh's pieces, sourced after the prelude (it runs main only # when executed), with a stand-in crane in the folder it runs in. exec bash libc-test.sh $DEVVM_REPO/assets/prelude.sh $DEVVM_REPO/assets/oci/build.sh cmp stdout libc.want # An image without this VM's architecture says which ones it has. env STUB_UNAME_M=aarch64 ! exec bash arch-test.sh $DEVVM_REPO/assets/prelude.sh $DEVVM_REPO/assets/oci/build.sh stderr '^devvm: ''node:24'' has no linux/arm64 build \(it has: amd64 s390x\)$' # crane is pinned for both architectures. exec bash pins-test.sh $DEVVM_REPO/assets/prelude.sh $DEVVM_REPO/assets/oci/build.sh # Without the prelude, it stops before anything runs. ! exec bash $DEVVM_REPO/assets/oci/build.sh stderr 'devvm_arch: parameter null or not set' -- libc-test.sh -- # libc_for: gnu for Debian and Ubuntu (and their derivatives), musl for # Alpine, else a failure. source "$1"; source "$2" set +eu for os in 'debian ' 'ubuntu debian' 'linuxmint ubuntu debian' 'alpine ' 'fedora rhel centos'; do libc_for "$os" || echo "fails: $os" done -- libc.want -- gnu gnu gnu musl fails: fedora rhel centos -- arch-test.sh -- source "$1"; source "$2" set +eu name=node:24 out=$PWD cat > crane <<'SH' #!/bin/bash case $1 in export) echo 'Error: no child with platform linux/riscv64 in index node:24' >&2; exit 1 ;; manifest) echo '{"manifests":[{"platform":{"architecture":"amd64","os":"linux"}},{"platform":{"architecture": "s390x","os":"linux"}},{"platform":{"architecture":"unknown","os":"unknown"}}]}' ;; esac SH chmod 755 crane export_image node:24 rootfs.tar -- pins-test.sh -- source "$1"; source "$2" [[ $crane_version =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "crane_version: $crane_version" >&2; exit 1; } [[ $crane_sha256_arm64 =~ ^[0-9a-f]{64}$ && $crane_sha256_amd64 =~ ^[0-9a-f]{64}$ ]] || { echo "crane's checksums" >&2; exit 1; }