diff options
-rw-r--r-- | .gitignore | 6 | ||||
-rwxr-xr-x | bootstrap | 27 | ||||
-rw-r--r-- | bootstrap.txt | 10 | ||||
-rwxr-xr-x | buildos | 6 | ||||
-rwxr-xr-x | upload-os | 24 |
5 files changed, 59 insertions, 14 deletions
@@ -1,5 +1,5 @@ *.cpio.gz -buildos-buildid -buildos-initrd -buildos-image +buildos-buildid-* +buildos-initrd-* +buildos-image-* bootstrap*.log @@ -281,9 +281,18 @@ rm /etc/localtime # Both nspawn and debootstrap try to mount /proc /sys (Debian bug#840372). # -mkdir /tmp/proc /tmp/sys -mount --move /proc /tmp/proc -mount --move /sys /tmp/sys +# @@ TMP this now causes issues with newer systemd. +# +#mkdir /tmp/proc /tmp/sys +#mount --move /proc /tmp/proc +#mount --move /sys /tmp/sys + +# systemd-nspawn "helpfully" creates a /lib64 symlink that then trips +# up is-usr-merged package (Debain bug #1019575). +# +if [ $arch = aarch64 ]; then + rm /lib64 +fi # Run second stage of debootstrap. # @@ -474,6 +483,12 @@ scripts/config --disable INIT_STACK_ALL_ZERO scripts/config --enable DEBUG_INFO_NONE scripts/config --disable DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT +# aarch64/5.19 additions: +# +scripts/config --disable KCOV +scripts/config --disable SHADOW_CALL_STACK +scripts/config --disable VIDEO_ADV7511 + # Disable sound subsystem/drivers. # sed -i -re '/^CONFIG_SND_.+/d' .config @@ -685,12 +700,12 @@ etc/systemd/system/multi-user.target.wants/buildos.service EOF cd "$owd" - cat buildos-rootfs.cpio.gz buildos-init.cpio.gz >buildos-initrd + cat buildos-rootfs.cpio.gz buildos-init.cpio.gz >"buildos-initrd-$arch" # Copy the kernel image next to the initramfs for convenience. # - cp "$root/vmlinuz" buildos-image - echo "$buildid" >buildos-buildid + cp "$root/vmlinuz" "buildos-image-$arch" + echo "$buildid" >"buildos-buildid-$arch" subvol_snapshot -r "$root" "$root-6" fi diff --git a/bootstrap.txt b/bootstrap.txt index 5489a72..e9963fa 100644 --- a/bootstrap.txt +++ b/bootstrap.txt @@ -4,7 +4,7 @@ - systemd - qemu-system-x86 - - linux-image-amd64 + - linux-image-amd64 & btrfs-progs - g++ If some of them are very recent (and thus likely to still have issues) @@ -31,7 +31,10 @@ not to conflate failures. * Upgrade to latest debootstrap and debian-archive-keyring from unstable - (or testing). + (or testing). Other required host packages: + + uuid-runtime (uuidgen) + systemd-container (systemd-nspawn) * Note: as of latest attempt, bootstrap over https was still broken. @@ -52,3 +55,6 @@ * Compare sizes to previous version for any abnormalities (if a lot larger, check if GCC executables are stripped). + +* After deployment, test VM upload/removal scripts (there are often issues + after upgrading to new btrfs-progs). @@ -29,6 +29,8 @@ function error () exit 1 } +arch="$(uname -m)" + # Network timeouts: 60 seconds to connect, 10 minutes to complete, 4 retries # (5 attempts total). These are similar to bbot timeouts. Note that the # toolchain archives can be quite sizable. @@ -122,7 +124,9 @@ function restart () sudo systemctl reboot } -if [ -z "$buildid_url" ]; then +if [ -n "$buildid_url" ]; then + buildid_url="$buildid_url-$arch" +else info "no buildos.buildid_url specified, not monitoring for new os builds" fi @@ -5,7 +5,7 @@ # If the tftp server host is not specified, then build@build-cache is # assumed. The images are uploaded to /var/lib/tftpboot/buildos-devel/. # -usage="usage: $0 [<user>@<host>]" +usage="usage: $0 [-a <arch>] [<user>@<host>]" owd="$(pwd)" trap "{ cd '$owd'; exit 1; }" ERR @@ -14,6 +14,26 @@ set -o errtrace # Trap in functions. function info () { echo "$*" 1>&2; } function error () { info "$*"; exit 1; } +arch= + +while [ "$#" -gt 0 ]; do + case "$1" in + -a) + shift + arch="$1" + shift + break + ;; + *) + break + ;; + esac +done + +if [ -z "$arch" ]; then + arch="$(uname -m)" +fi + if [ -z "$1" ]; then host="build@build-cache" else @@ -25,5 +45,5 @@ fi # is a bit more disk space used to temporarily hold copies. # rsync -v --progress -lpt -c --copy-unsafe-links --delay-updates \ - buildos-image buildos-initrd buildos-buildid \ + "buildos-image-$arch" "buildos-initrd-$arch" "buildos-buildid-$arch" \ $host:/var/lib/tftpboot/buildos-devel/ |