packer: clone git repository from github.com
[grml-debootstrap.git] / packer / debian64_provision.sh
index c7eed1f..d170554 100644 (file)
@@ -67,7 +67,13 @@ virtualbox_setup() {
   mountpoint "${TARGET}/media/cdrom" >/dev/null && umount "${TARGET}/media/cdrom"
   mount -t iso9660 $isofile "${TARGET}/media/cdrom/"
   UTS_RELEASE=$KERNELVERSION LD_PRELOAD=/tmp/fake-uname.so grml-chroot "$TARGET" /media/cdrom/VBoxLinuxAdditions.run --nox11 || true
-  tail -10 "${TARGET}/var/log/VBoxGuestAdditions.log"
+  if grep -q "make: .*vboxguest.*Error 2" "${TARGET}/var/log/vboxadd-install.log" ; then
+    echo "Error: looks like a fatal error happened during installation of VirtualBox Guest Additions." >&2
+    exit 1
+  fi
+  [ -r "${TARGET}/var/log/VBoxGuestAdditions.log" ] && tail -10 "${TARGET}/var/log/VBoxGuestAdditions.log"
+  [ -r "${TARGET}/var/log/vboxadd-install.log" ]    && tail -10 "${TARGET}/var/log/vboxadd-install.log"
+  [ -r "${TARGET}/var/log/vboxadd-setup.log" ]      && tail -10 "${TARGET}/var/log/vboxadd-setup.log"
   umount "${TARGET}/media/cdrom/"
 
   # work around bug in VirtualBox 4.3.18 which leaves process behind,
@@ -182,7 +188,7 @@ EOF
   elif [ "$GRML_DEBOOTSTRAP_VERSION" = "git" ] ; then
     echo "** GRML_DEBOOTSTRAP_VERSION is set to '$GRML_DEBOOTSTRAP_VERSION'"
     echo "** Using grml-debootstrap from Git repository"
-    git clone git://git.grml.org/grml-debootstrap.git
+    git clone https://github.com/grml/grml-debootstrap.git
     cd grml-debootstrap
     GRML_DEBOOTSTRAP="CONFFILES=$(pwd) $(pwd)/grml-debootstrap"
   elif [ "$GRML_DEBOOTSTRAP_VERSION" = "local" ] ; then
@@ -228,7 +234,7 @@ grml_debootstrap_execution() {
 apply_nic_workaround() {
   # release specific stuff
   case "$DEBIAN_VERSION" in
-    stretch|buster|bullseye|unstable|sid)
+    stretch|buster|bullseye|bookworm|unstable|sid)
       ;;
     *)
       echo "* Debian $DEBIAN_VERSION doesn't require NIC workaround"