summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlistair Delva <adelva@google.com>2021-04-09 16:53:13 -0700
committerAlistair Delva <adelva@google.com>2021-06-29 18:19:24 +0000
commit71e4ec7e540150161c3e936d4b24ffe6b66a5bf3 (patch)
tree0276978c934e2997e57e3c7c09a9aa279d607396
parent9facea89aec1b964f8f42840ef892b43859f5fed (diff)
downloadtests-71e4ec7e540150161c3e936d4b24ffe6b66a5bf3.tar.gz
Support customized suite configs
Allow bullseye-* to be interpreted as bullseye with a custom stage3 processing script. Change-Id: I59d6efcd86c3cf843e7e18c64d552e110a25a06e
-rwxr-xr-xnet/test/build_rootfs.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/net/test/build_rootfs.sh b/net/test/build_rootfs.sh
index 6e216a8..01a0f07 100755
--- a/net/test/build_rootfs.sh
+++ b/net/test/build_rootfs.sh
@@ -46,7 +46,7 @@ while getopts ":hs:a:m:n:r:" opt; do
usage
;;
s)
- if [[ "${OPTARG}" != "bullseye" ]]; then
+ if [[ "${OPTARG%-*}" != "bullseye" ]]; then
echo "Invalid suite: ${OPTARG}" >&2
usage
fi
@@ -101,7 +101,7 @@ failure() {
trap failure ERR
# Import the package list for this release
-packages=$(cat "${SCRIPT_DIR}/rootfs/${suite}.list" | xargs | tr -s ' ' ',')
+packages=$(cpp "${SCRIPT_DIR}/rootfs/${suite}.list" | grep -v "^#" | xargs | tr -s ' ' ',')
# For the debootstrap intermediates
tmpdir=$(mktemp -d)
@@ -119,7 +119,7 @@ sudo chown root:root "${workdir}"
# Run the debootstrap first
cd "${workdir}"
sudo debootstrap --arch="${arch}" --variant=minbase --include="${packages}" \
- --foreign "${suite}" . "${mirror}"
+ --foreign "${suite%-*}" . "${mirror}"
# Copy some bootstrapping scripts into the rootfs
sudo cp -a "${SCRIPT_DIR}"/rootfs/*.sh root/