From 47ca82775cbfc8e9d9234e9c73d6b062d0e7ce05 Mon Sep 17 00:00:00 2001 From: Julia Kreger Date: Wed, 15 Sep 2021 16:21:14 -0700 Subject: [PATCH] Support non-genisoimage binaries Updates tinyipa build script so it can use one of the multiple different ISO filesystem generation tools in the ecosystem. Also updates the dib docs which states IPA requires genisoimage, which is... not... true. Change-Id: I505aed2ec98674a0495174219609694042d59070 --- doc/source/admin/dib.rst | 2 +- doc/source/admin/tinyipa.rst | 2 +- tinyipa/build-iso.sh | 17 ++++++++++++++++- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/doc/source/admin/dib.rst b/doc/source/admin/dib.rst index 9601399..2438f57 100644 --- a/doc/source/admin/dib.rst +++ b/doc/source/admin/dib.rst @@ -240,7 +240,7 @@ Beyond installing the ironic-python-agent, this element does the following: * Disables the ``iptables`` service on SysV and systemd based systems. * Disables the ``ufw`` service on Upstart based systems. * Installs packages required for the operation of the ironic-python-agent:: - ``qemu-utils`` ``parted`` ``hdparm`` ``util-linux`` ``genisoimage`` + ``qemu-utils`` ``parted`` ``hdparm`` ``util-linux`` * When installing from source, ``python-dev`` and ``gcc`` are also installed in order to support source based installation of ironic-python-agent and its dependencies. diff --git a/doc/source/admin/tinyipa.rst b/doc/source/admin/tinyipa.rst index 7ce6d6b..63d6467 100644 --- a/doc/source/admin/tinyipa.rst +++ b/doc/source/admin/tinyipa.rst @@ -27,7 +27,7 @@ Then you need to install some utilities. For the main build script: For building an ISO you'll also need: -* genisoimage +* mkisofs, genisoimage, or xorrisofs Building -------- diff --git a/tinyipa/build-iso.sh b/tinyipa/build-iso.sh index 92ae32b..ba8cf1b 100755 --- a/tinyipa/build-iso.sh +++ b/tinyipa/build-iso.sh @@ -17,4 +17,19 @@ cp build_files/syslinux-${SYSLINUX_VERSION}/bios/core/isolinux.bin newiso/boot/i cp build_files/isolinux.cfg newiso/boot/isolinux/. cp tinyipa${BRANCH_EXT}.gz newiso/boot/corepure64.gz cp tinyipa${BRANCH_EXT}.vmlinuz newiso/boot/vmlinuz64 -genisoimage -l -r -J -R -V TC-custom -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o tinyipa.iso newiso + +set +e +ISO_BUILDER="" + +for builder in mkisofs genisoimage xorrisofs; do + if $($builder --help); then + ISO_BUILDER=$builder + fi +done +if [ -z "$ISO_BUILDER" ]; then + echo "Please install a ISO filesystem builder utility such as mkisofs, genisoimage, or xorrisofs." + exit 1 +fi + +set -e +$ISO_BUILDER -l -r -J -R -V TC-custom -no-emul-boot -boot-load-size 4 -boot-info-table -b boot/isolinux/isolinux.bin -c boot/isolinux/boot.cat -o tinyipa.iso newiso