From 93d11a7cf8eca9511249698b2298f62d347c2427 Mon Sep 17 00:00:00 2001 From: smoshiur1237 Date: Thu, 4 Mar 2021 17:06:58 +0200 Subject: [PATCH] Fix: IPA image buidling with OpenSuse. At this moment the IPA image building with OpenSuse is broken and here, it was failing during the release check for Opensue because etc/SuSE-release is not valid anymore and deprecated for openSuse. Its renamed to /etc/os-release for openSuse rlease 15. This PR will solve the issue to build IPA image with OpenSuse base image. There is another PR opened in ironic-python-agent-builder, which adds all the missing packages, setuptools upgrade and svc mapping to do the build successful. https://review.opendev.org/c/openstack/ironic-python-agent-builder/+/778726 Bug-Report: https://bugs.launchpad.net/diskimage-builder/+bug/1921510 Change-Id: Id2759be29bfcbf2ecf1ce67e171686924b506b1a --- diskimage_builder/lib/img-functions | 3 +++ 1 file changed, 3 insertions(+) diff --git a/diskimage_builder/lib/img-functions b/diskimage_builder/lib/img-functions index a41331bb2..9355cea3b 100644 --- a/diskimage_builder/lib/img-functions +++ b/diskimage_builder/lib/img-functions @@ -216,6 +216,9 @@ function select_boot_kernel_initrd () { elif [[ -f "${TARGET_ROOT}"/etc/gentoo-release ]]; then KERNEL="$(basename $(ls -1rv $BOOTDIR/vmlinuz-* | head -n 1))" RAMDISK="$(basename $(ls -1rv $BOOTDIR/initramfs-* | head -n 1))" + elif [[ $DISTRO_NAME = opensuse ]]; then + KERNEL=$(basename $(readlink -e $BOOTDIR/vmlinuz)) + RAMDISK=$(basename $(readlink -e $BOOTDIR/initrd)) else echo "ERROR: Unable to detect operating system" exit 1