From 09a13db1d14f6eab634630f684b55f6bef2e4ebb Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Fri, 21 Jun 2024 13:12:48 +0100 Subject: [PATCH 1/3] Same DevKit downloaded rpms from bootstrap build to save download in final build Signed-off-by: Andrew Leonard --- pipelines/build/devkit/make_devkit.sh | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/pipelines/build/devkit/make_devkit.sh b/pipelines/build/devkit/make_devkit.sh index 5ca4e54f2..15defd183 100755 --- a/pipelines/build/devkit/make_devkit.sh +++ b/pipelines/build/devkit/make_devkit.sh @@ -43,16 +43,16 @@ patch -p1 < ../Tools.gmk.patch devkit_target="${ARCH}-linux-gnu" -if [ "${BASE_OS}" = "rhel" ]; then - mkdir -p ../../../build/devkit/${VERSION}/build/devkit/download/rpms/s390x-linux-gnu-Centos${BASE_OS_VERSION} - # Downlod RPMS from RHEL (Requires machine to be attached to RHEL subscription) +if [ "${BASE_OS}" = "rhel" ] && [ "${ARCH}" = "s390x" ]; then + mkdir -p build/devkit/download/rpms/s390x-linux-gnu-Centos${BASE_OS_VERSION} + # Download RPMS from RHEL (Requires machine to be attached to RHEL subscription) RPMDIR=/var/cache/yum/s390x/7Server/rhel-7-for-system-z-rpms/packages pwd for A in glibc glibc-headers glibc-devel cups-libs cups-devel libX11 libX11-devel xorg-x11-proto-devel alsa-lib alsa-lib-devel libXext libXext-devel libXtst libXtst-devel libXrender libXrender-devel libXrandr libXrandr-devel freetype freetype-devel libXt libXt-devel libSM libSM-devel libICE libICE-devel libXi libXi-devel libXdmcp libXdmcp-devel libXau libXau-devel libgcc libxcrypt zlib zlib-devel libffi libffi-devel fontconfig fontconfig-devel kernel-headers; do if [ ! -z "$(ls $RPMDIR/${A}-[0-9]*${ARCH}*.rpm)" ]; then - cp -pv ${RPMDIR}/${A}-[0-9]*${ARCH}*.rpm "../../../build/devkit/${VERSION}/build/devkit/download/rpms/s390x-linux-gnu-Centos${BASE_OS_VERSION}" + cp -pv ${RPMDIR}/${A}-[0-9]*${ARCH}*.rpm "build/devkit/download/rpms/s390x-linux-gnu-Centos${BASE_OS_VERSION}" elif [ ! -z "$(ls $RPMDIR/${A}-[0-9]*noarch.rpm)" ]; then - cp -pv ${RPMDIR}/${A}-[0-9]*noarch.rpm "../../../build/devkit/${VERSION}/build/devkit/download/rpms/s390x-linux-gnu-Centos${BASE_OS_VERSION}" + cp -pv ${RPMDIR}/${A}-[0-9]*noarch.rpm "build/devkit/download/rpms/s390x-linux-gnu-Centos${BASE_OS_VERSION}" fi done # Temporary fudge to use Centos logic until we adjust Tools.gmk @@ -66,10 +66,18 @@ cd make/devkit && pwd && make TARGETS=${devkit_target} BASE_OS=${BASE_OS} BASE_O # Move "bootstrap" devkit toolchain to a new folder and setup gcc toolchain to point at it cd ../.. BOOTSTRAP_DEVKIT="$(pwd)/build/bootstrap_${devkit_target}-to-${devkit_target}" -mv build/devkit/result/${devkit_target}-to-${devkit_target} ${BOOTSTRAP_DEVKIT} +BOOTSTRAP_DOWNLOADED_RPMS="$(pwd)/build/bootstrap_rpms_${devkit_target}-to-${devkit_target}" + +mv build/devkit/result/${devkit_target}-to-${devkit_target} "${BOOTSTRAP_DEVKIT}" +mv build/devkit/download/rpms/${ARCH}-linux-gnu-Centos${BASE_OS_VERSION} "${BOOTSTRAP_DOWNLOADED_RPMS}" # Make final "DevKit" using the bootstrap devkit rm -rf build/devkit + +# Move saved bootstrap rpm downloads to final build folder +mkdir -p build/devkit/download/rpms +mv ${BOOTSTRAP_DOWNLOADED_RPMS} build/devkit/download/rpms/${ARCH}-linux-gnu-Centos${BASE_OS_VERSION} + echo "Building 'final' DevKit toolchain, using 'bootstrap' toolchain in ${BOOTSTRAP_DEVKIT}" cd make/devkit && pwd && \ LD_LIBRARY_PATH="${BOOTSTRAP_DEVKIT}/lib64:${BOOTSTRAP_DEVKIT}/lib" \ From 8609cb066777493fdd40ff171563fc8629e2fc4a Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Fri, 21 Jun 2024 15:46:42 +0100 Subject: [PATCH 2/3] Disable SHELL_SHFMT Linter check Signed-off-by: Andrew Leonard --- .github/workflows/linter.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 15519194e..f3ed3b739 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -64,3 +64,5 @@ jobs: VALIDATE_DOCKERFILE_HADOLINT: false # checkov fails VALIDATE_CHECKOV: false + # isgnore shell formatting checker + VALIDATE_SHELL_SHFMT: false From 6bcdc7c1e86ea21077e9848306e87af5ec56f589 Mon Sep 17 00:00:00 2001 From: Andrew Leonard Date: Fri, 21 Jun 2024 15:47:49 +0100 Subject: [PATCH 3/3] Disable SHELL_SHFMT Linter check Signed-off-by: Andrew Leonard --- .github/workflows/linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index f3ed3b739..b27500d26 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -64,5 +64,5 @@ jobs: VALIDATE_DOCKERFILE_HADOLINT: false # checkov fails VALIDATE_CHECKOV: false - # isgnore shell formatting checker + # ignore shell formatting checker VALIDATE_SHELL_SHFMT: false