Merge remote-tracking branch 'origin/pr/140'
authorMichael Prokop <mika@grml.org>
Tue, 15 Oct 2019 14:45:58 +0000 (16:45 +0200)
committerMichael Prokop <mika@grml.org>
Tue, 15 Oct 2019 14:45:58 +0000 (16:45 +0200)
.travis.yml
chroot-script
grml-debootstrap
travis/build-vm.sh
travis/execute.sh
travis/serial-console-connection

index 0a3f432..98b0e4b 100644 (file)
@@ -5,7 +5,7 @@ services:
   - docker
 
 env:
-  - TRAVIS_DEBIAN_DISTRIBUTION=stretch
+  - TRAVIS_DEBIAN_DISTRIBUTION=buster
   - TRAVIS_DEBIAN_DISTRIBUTION=unstable TRAVIS_DEBIAN_INCREMENT_VERSION_NUMBER=true
 
 script:
index b47e31e..a5f92c4 100755 (executable)
@@ -626,19 +626,31 @@ grub_install() {
      for device in $SELECTED_PARTITIONS ; do
         GRUB="${device%%[0-9]}"
         echo "Installing grub on ${GRUB}:"
-        grub-install --no-floppy "$GRUB"
+        if ! grub-install --no-floppy "$GRUB" ; then
+          echo "Error: failed to execute 'grub-install --no-floppy $GRUB'." >&2
+          exit 1
+        fi
+
      done
      rm -f /boot/grub/device.map
   else
      echo "Installing grub on ${GRUB}:"
      case "$RELEASE" in
        lenny|squeeze|wheezy)
-         grub-install --no-floppy "$(readlink -f "${GRUB}")"
+         local grub_dev
+         grub_dev="$(readlink -f "${GRUB}")"
+         if ! grub-install --no-floppy "${grub_dev}" ; then
+           echo "Error: failed to execute 'grub-install --no-floppy ${grub_dev}'." >&2
+           exit 1
+         fi
          rm -f /boot/grub/device.map
          ;;
        *)
          echo "(hd0) ${GRUB}" > /boot/grub/device.map
-         grub-install "(hd0)"
+         if ! grub-install "(hd0)" ; then
+           echo "Error: failed to execute 'grub-install (hd0)'." >&2
+           exit 1
+         fi
          rm /boot/grub/device.map
          ;;
      esac
@@ -656,6 +668,11 @@ grub_install() {
     return 1
   fi
 
+  if [ -n "${BOOT_APPEND}" ] ; then
+    echo "Adding BOOT_APPEND configuration ['${BOOT_APPEND}'] to /etc/default/grub."
+    sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s#\"\$# ${BOOT_APPEND}\"#" /etc/default/grub
+  fi
+
   mountpoint /boot/efi &>/dev/null && umount /boot/efi
 
   $UPDATEGRUB
index 1dd6550..103946c 100755 (executable)
@@ -1516,9 +1516,6 @@ if [[ -z "${GRUB}" ]] || ! dd if="${GRUB}" bs=512 count=1 2>/dev/null | cat -v |
 fi
 
   einfo "Updating grub configuration file."
-  if [ -n "$BOOT_APPEND" ] ; then
-     sed -i "/GRUB_CMDLINE_LINUX_DEFAULT/ s#\"\$# ${BOOT_APPEND}\"#" "${MNTPOINT}"/etc/default/grub
-  fi
   chroot "${MNTPOINT}" update-grub
 
   case "$RELEASE" in
@@ -1615,6 +1612,7 @@ preparechroot() {
   #   e.g. not with 4.2.37(1)-release (a.k.a 4.2+dfsg-0.1+deb7u3) of Debian wheezy
   [ -n "$ARCH" ]                && echo "ARCH='$(sed "s,','\\\\'',g" <<<"${ARCH}")'"                               >> "$CHROOT_VARIABLES"
   [ -n "$BACKPORTREPOS" ]       && echo "BACKPORTREPOS='$(sed "s,','\\\\'',g" <<<"${BACKPORTREPOS}")'"             >> "$CHROOT_VARIABLES"
+  [ -n "$BOOT_APPEND" ]         && echo "BOOT_APPEND='$(sed "s,','\\\\'',g" <<<"${BOOT_APPEND}")'"                 >> "$CHROOT_VARIABLES"
   [ -n "$CHROOT_SCRIPTS" ]      && echo "CHROOT_SCRIPTS='$(sed "s,','\\\\'',g" <<<"${CHROOT_SCRIPTS}")'"           >> "$CHROOT_VARIABLES"
   [ -n "$COMPONENTS" ]          && echo "COMPONENTS='$(sed "s,','\\\\'',g" <<<"${COMPONENTS}")'"                   >> "$CHROOT_VARIABLES"
   [ -n "$CONFFILES" ]           && echo "CONFFILES='$(sed "s,','\\\\'',g" <<<"${CONFFILES}")'"                     >> "$CHROOT_VARIABLES"
index 9387d76..217813b 100755 (executable)
@@ -3,7 +3,7 @@
 set -eu -o pipefail
 
 TARGET="${TARGET:-/code/qemu.img}"
-RELEASE="${RELEASE:-stretch}"
+RELEASE="${RELEASE:-buster}"
 
 cd "$(dirname "$TARGET")"
 apt update
index 7d20e40..5b4f47a 100755 (executable)
@@ -18,7 +18,7 @@ if [ -z "${TRAVIS:-}" ] ; then
   fi
 fi
 
-RELEASE="${RELEASE:-stretch}"
+RELEASE="${RELEASE:-buster}"
 export RELEASE
 
 TARGET="${TARGET:-qemu.img}"
@@ -69,7 +69,7 @@ else
 fi
 
 # we need to run in privileged mode to be able to use loop devices
-docker run --privileged -v "$(pwd)":/code --rm -i -t debian:stretch /code/travis/build-vm.sh
+docker run --privileged -v "$(pwd)":/code --rm -i -t debian:buster /code/travis/build-vm.sh
 
 [ -x ./goss ] || curl -fsSL https://goss.rocks/install | GOSS_DST="$(pwd)" sh
 
index 46c2f02..ff3fbd0 100755 (executable)
@@ -13,9 +13,9 @@ parser = argparse.ArgumentParser(description='Connect to serial console ' +
 parser.add_argument('--port', required=True,
                     help='serial console device to connect ' +
                     'to (e.g. /dev/pts/X)')
-parser.add_argument('--hostname', default="stretch",
+parser.add_argument('--hostname', default="buster",
                     help='hostname of the system for login process ' +
-                    '(default: stretch)')
+                    '(default: buster)')
 parser.add_argument('--pipefile', default="./serial0",
                     help='file name for named pipe file (for ' +
                     'interacting between host + VM via QEMU ' +