issue building image #11

Open
opened 2026-04-07 16:29:38 +00:00 by nathan · 1 comment
Owner

cloned repo and submodules...

git submodule update --init --recursive
Submodule 'ansible/butterbox-rpi' (https://gitlab.com/likebutter/butterbox-rpi) registered for path 'ansible/butterbox-rpi'
Submodule 'vmdb2-recipes/image-specs' (https://salsa.debian.org/raspi-team/image-specs.git) registered for path 'vmdb2-recipes/image-specs'
Cloning into '/home/n8fr8/dev/repos/churn/ansible/butterbox-rpi'...
warning: redirecting to https://gitlab.com/likebutter/butterbox-rpi.git/
Cloning into '/home/n8fr8/dev/repos/churn/vmdb2-recipes/image-specs'...
Submodule path 'ansible/butterbox-rpi': checked out '04cfede53c1b2d4887ce06e988b14c178aeb7a08'
Submodule path 'vmdb2-recipes/image-specs': checked out 'ff7fdbf07c727ba1d2277dc7f274bd234f2e2bfa'

BUT THEN GET THIS ERROR:

n8fr8@expanse:~/dev/repos/churn$ vmdb2 --rootfs-tarball=my_image.tar.gz --output my_image.img --log my_image.log
usage: vmdb2 [-h] [--image FILE] [--output FILE] [--rootfs-tarball FILE] [-v] [--log LOG] [--version] [--variable VARIABLE] specfile
vmdb2: error: the following arguments are required: specfile

cloned repo and submodules... git submodule update --init --recursive Submodule 'ansible/butterbox-rpi' (https://gitlab.com/likebutter/butterbox-rpi) registered for path 'ansible/butterbox-rpi' Submodule 'vmdb2-recipes/image-specs' (https://salsa.debian.org/raspi-team/image-specs.git) registered for path 'vmdb2-recipes/image-specs' Cloning into '/home/n8fr8/dev/repos/churn/ansible/butterbox-rpi'... warning: redirecting to https://gitlab.com/likebutter/butterbox-rpi.git/ Cloning into '/home/n8fr8/dev/repos/churn/vmdb2-recipes/image-specs'... Submodule path 'ansible/butterbox-rpi': checked out '04cfede53c1b2d4887ce06e988b14c178aeb7a08' Submodule path 'vmdb2-recipes/image-specs': checked out 'ff7fdbf07c727ba1d2277dc7f274bd234f2e2bfa' BUT THEN GET THIS ERROR: n8fr8@expanse:~/dev/repos/churn$ vmdb2 --rootfs-tarball=my_image.tar.gz --output my_image.img --log my_image.log usage: vmdb2 [-h] [--image FILE] [--output FILE] [--rootfs-tarball FILE] [-v] [--log LOG] [--version] [--variable VARIABLE] specfile vmdb2: error: the following arguments are required: specfile
Owner

There's 2 scripts you can use (with sudo) in /vmdb-recipes, run_build_amd64.sh and run_build_raspi4.sh:

You can see what happens under the hood:

GIT_BRANCH=$(git branch --show-current 2>/dev/null)
GIT_TAG=$(git tag 2>/dev/null | tail -n1)
BUILD_DATE=$(date +"%d%m%y")
SUFFIX="${GIT_BRANCH}${GIT_TAG}${BUILD_DATE}"
time vmdb2 --rootfs-tarball=raspi4_$SUFFIX.tar.gz --output raspi4_butter_$SUFFIX.img --log raspi4_butter_$SUFFIX.log raspi_4_trixie.yaml
tar cvfz raspi4_butter_$SUFFIX.img.tar.gz raspi4_butter_$SUFFIX.img

..so the command would be vmdb2 --rootfs-tarball=my_image.tar.gz --output my_image.img --log my_image.log raspi_4_trixie.yaml (or amd64_trixie.yaml).

For raspberry pi, I've learned madmail needs to be re-compiled with a different flag for it to work on the architecture, so at the moment I'm using a binary I compiled locally. I have not committed this since eventually we want to build this reproducibly, but I've lacked the time to set this up due to the deadline. So your image will build but madmail will not run.

For amd64, I've made lots of ansible changes without testing amd64 builds to save time, let me know if you see any errors.

There's 2 scripts you can use (with sudo) in /vmdb-recipes, `run_build_amd64.sh` and `run_build_raspi4.sh`: You can see what happens under the hood: GIT_BRANCH=$(git branch --show-current 2>/dev/null) GIT_TAG=$(git tag 2>/dev/null | tail -n1) BUILD_DATE=$(date +"%d%m%y") SUFFIX="${GIT_BRANCH}_${GIT_TAG}_${BUILD_DATE}" time vmdb2 --rootfs-tarball=raspi4_$SUFFIX.tar.gz --output raspi4_butter_$SUFFIX.img --log raspi4_butter_$SUFFIX.log raspi_4_trixie.yaml tar cvfz raspi4_butter_$SUFFIX.img.tar.gz raspi4_butter_$SUFFIX.img ..so the command would be `vmdb2 --rootfs-tarball=my_image.tar.gz --output my_image.img --log my_image.log raspi_4_trixie.yaml` (or `amd64_trixie.yaml`). For raspberry pi, I've learned madmail needs to be re-compiled with a different flag for it to work on the architecture, so at the moment I'm using a binary I compiled locally. I have not committed this since eventually we want to build this reproducibly, but I've lacked the time to set this up due to the deadline. So your image will build but madmail will not run. For amd64, I've made lots of ansible changes without testing amd64 builds to save time, let me know if you see any errors.
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: butter/churn#11
No description provided.