From f9d97a1ae229d5f7e790b8292e0f0ba6889d598b Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Tue, 21 Jan 2020 14:35:10 +0100 Subject: [PATCH] TT#69504 Support specific version usage of grml2usb/grml2iso This is a *partial* cherry-pick from commit c3d753562, excluding all the testing related changes and keeping only viable and safe changes. Relevant changes included here: * Stick grml2usb version to v0.17.0, instead of relying on the grml2usb version available on the host system (being 0.14.14 on Debian/stretch as present on our current build hosts). For arbitrary addon file names we need grml2iso (which uses grml2usb underneath) from grml2usb >=0.17.0. FTR, grml2iso and grml2usb can be executed from within the git repository, assuming all relevant tools are present * No longer invoke isohybrid on the resulting ISO, instead rely on grml2iso behaviour (which also checks for EFI support and enables according switches as needed) * Fix usage instructions in t/Dockerfile (it's "deployment-iso-buster" and not "lua-ngcp-kamailio-buster") This is in preparation for backporting/cherry-pick commit 608dd0367 ("TT#73210 Use grml2usb v0.14.14 when handling grml64-small_2018.04.11-efi.iso") to use a specific grml2usb version when dealing with special case ISO grml64-small_2018.04.11-efi.iso for mr6.5 release. Change-Id: I67e3f85bbe86bd1b3ee709161504b5250ca5d7fe (*partially* cherry picked from commit c3d753562d44b1653374e29b0b54a944b127afeb) --- build_iso.sh | 13 ++++++++++--- t/Dockerfile | 8 ++++---- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/build_iso.sh b/build_iso.sh index 91da6cb..c3f3c18 100755 --- a/build_iso.sh +++ b/build_iso.sh @@ -75,10 +75,17 @@ echo "*** Copying isolinux.cfg to syslinux.cfg for grml2usb support ***" cp ${TEMPLATES}/boot/isolinux/isolinux.cfg ${TEMPLATES}/boot/isolinux/syslinux.cfg echo "*** Generating Sipwise ISO ***" -sudo /usr/sbin/grml2iso -c ./${TEMPLATES} -o "${SIPWISE_ISO}" "${GRML_ISO}" -echo "*** Generating dd-able ISO ***" -sudo /usr/bin/isohybrid "${SIPWISE_ISO}" +if [[ ! -d grml2usb.git ]] ; then + GRML2USB_VERSION='v0.17.0' + if ! git clone -b "${GRML2USB_VERSION}" --single-branch --depth 1 https://github.com/grml/grml2usb grml2usb.git ; then + echo "Cloning grml2usb from github failed, falling back to git.grml.org" + git clone -b "${GRML2USB_VERSION}" --single-branch --depth 1 git://git.grml.org/grml2usb.git + fi +fi +GRML2USB_DIR=$(pwd)/grml2usb.git + +sudo GRML2USB="${GRML2USB_DIR}/grml2usb" "${GRML2USB_DIR}/grml2iso" -c ./${TEMPLATES} -o "${SIPWISE_ISO}" "${GRML_ISO}" sudo implantisomd5 "${SIPWISE_ISO}" diff --git a/t/Dockerfile b/t/Dockerfile index 8209160..5ba5a23 100644 --- a/t/Dockerfile +++ b/t/Dockerfile @@ -19,13 +19,13 @@ WORKDIR /code/ # When you want to build the base image from scratch # jump to the next section if you don't want to build yourself!: # -# % docker build --tag="lua-ngcp-kamailio-stretch" -f t/Dockerfile . -# % docker run --rm -i -t -v $(pwd):/code:rw lua-ngcp-kamailio-stretch:latest bash +# % docker build --tag="deployment-iso-buster" -f t/Dockerfile . +# % docker run --rm -i -t -v $(pwd):/code:rw deployment-iso-buster:latest bash # # Use the existing docker image: -# % docker pull docker.mgm.sipwise.com/lua-ngcp-kamailio-stretch +# % docker pull docker.mgm.sipwise.com/deployment-iso-buster # NOTE: run the following command from root folder of git repository: -# % docker run --rm -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/lua-ngcp-kamailio-stretch:latest bash +# % docker run --rm -i -t -v $(pwd):/code:rw docker.mgm.sipwise.com/deployment-iso-buster:latest bash # # Inside docker (the command is in history, just press UP button): # ./t/testrunner