From fd4486158f54d7afc43cc400319614663e0cdf4f Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Mon, 3 Apr 2023 11:37:57 +0100 Subject: [PATCH 1/2] Use alternative method to discover containerfile Copied from: https://github.com/openstack/diskimage-builder/blob/d3ce32016abbb7ebb76e3bc04b4fa8288d891ce4/diskimage_builder/elements/containerfile/test-elements/jammy-build-succeeds/environment.d/10-set-file.bash --- elements/rocky9-ofed/environment.d/01-containerfile.bash | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/elements/rocky9-ofed/environment.d/01-containerfile.bash b/elements/rocky9-ofed/environment.d/01-containerfile.bash index 3ccb3eb..6826d05 100644 --- a/elements/rocky9-ofed/environment.d/01-containerfile.bash +++ b/elements/rocky9-ofed/environment.d/01-containerfile.bash @@ -1,8 +1,7 @@ # note eval to expand the result of the get function if [[ -z "${DIB_CONTAINERFILE_DOCKERFILE-}" ]] then - eval declare -A image_elements=($(get_image_element_array)) - element_path=${image_elements["rocky9-ofed"]} - export DIB_CONTAINERFILE_DOCKERFILE=$element_path/containerfiles/rocky-9.1-ofed-5.8 + path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + path="$( dirname $path)" + export DIB_CONTAINERFILE_DOCKERFILE="$path/files/rocky-9.1-ofed-5.8" fi - From f0e9220e01ac1bff8dd0c29e276cbffa55c8cb8d Mon Sep 17 00:00:00 2001 From: Will Szumski Date: Tue, 18 Apr 2023 16:58:14 +0100 Subject: [PATCH 2/2] Fix for path --- elements/rocky9-ofed/environment.d/01-containerfile.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/elements/rocky9-ofed/environment.d/01-containerfile.bash b/elements/rocky9-ofed/environment.d/01-containerfile.bash index 6826d05..356f507 100644 --- a/elements/rocky9-ofed/environment.d/01-containerfile.bash +++ b/elements/rocky9-ofed/environment.d/01-containerfile.bash @@ -3,5 +3,5 @@ if [[ -z "${DIB_CONTAINERFILE_DOCKERFILE-}" ]] then path="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" path="$( dirname $path)" - export DIB_CONTAINERFILE_DOCKERFILE="$path/files/rocky-9.1-ofed-5.8" + export DIB_CONTAINERFILE_DOCKERFILE="$path/containerfiles/rocky-9.1-ofed-5.8" fi