From ed02ef83fc67d4d4bbaa335b61c8e7cf5cfa9a60 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 17 Jul 2025 09:09:51 +0200 Subject: [PATCH 01/24] SRE-3205 ci: update for Fedora 42 - redhat-lsb-core no longer supported by Fedora 42 - Fedora 41 and 42 are not available in archive repo, archive repo is only for EOL releases - new test to verify that packaging works for all supported version of Fedoria: latest (default), 41, 42 Signed-off-by: Tomasz Gromadzki --- Dockerfile.mockbuild | 6 ++-- Jenkinsfile | 55 +++++++++++++++++++++++++++++++++-- scripts/repo-helper-fedora.sh | 8 +++-- 3 files changed, 61 insertions(+), 8 deletions(-) diff --git a/Dockerfile.mockbuild b/Dockerfile.mockbuild index d8d86ac..4d8f243 100644 --- a/Dockerfile.mockbuild +++ b/Dockerfile.mockbuild @@ -26,9 +26,9 @@ RUN chmod +x /tmp/repo-helper.sh && \ rm -f /tmp/repo-helper.sh # Install basic tools -RUN dnf -y install mock make \ - rpm-build createrepo rpmlint redhat-lsb-core git \ - python-srpm-macros rpmdevtools && \ +RUN dnf -y install mock make \ + rpm-build createrepo rpmlint git \ + python-srpm-macros rpmdevtools && \ dnf -y clean all # use same UID as host and default value of 1000 if not specified diff --git a/Jenkinsfile b/Jenkinsfile index 34371ba..6b94e79 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -158,6 +158,55 @@ pipeline { } } } //stage('Build libfabric on EL 9') + stage('Build libfabric on EL 9 (Fedora 42)') { + agent { + dockerfile { + filename 'Dockerfile.mockbuild' + label 'docker_runner' + args '--group-add mock' + + ' --cap-add=SYS_ADMIN' + + ' --privileged=true' + + ' -v /scratch:/scratch' + additionalBuildArgs dockerBuildArgs() + + '--build-arg FVERSION=42 --build-arg PACKAGINGDIR=. ' + } + } + steps { + checkoutScm url: 'https://github.com/daos-stack/libfabric.git', + checkoutDir: "libfabric", + branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master') + sh label: env.STAGE_NAME, + script: updatePackaging('libfabric') + ''' + rm -rf artifacts/el9/ + mkdir -p artifacts/el9/ + make CHROOT_NAME="rocky+epel-9-x86_64" DISTRO_VERSION=9 chrootbuild''' + } + post { + success { + sh 'ls -l /var/lib/mock/rocky+epel-9-x86_64/result/' + } + unsuccessful { + sh label: "Collect artifacts", + script: '''mockroot=/var/lib/mock/rocky+epel-9-x86_64 + artdir=$PWD/libfabric/artifacts/el9 + cp -af _topdir/SRPMS $artdir + (cd $mockroot/result/ && + cp -r . $artdir) + (if cd $mockroot/root/builddir/build/BUILD/*/; then + find . -name configure -printf %h\\\\n | \ + while read dir; do + if [ ! -f $dir/config.log ]; then + continue + fi + tdir="$artdir/autoconf-logs/$dir" + mkdir -p $tdir + cp -a $dir/config.log $tdir/ + done + fi)''' + archiveArtifacts artifacts: 'libfabric/artifacts/el9/**' + } + } + } //stage('Build libfabric on EL 9 (Fedora 42)') stage('Build mercury on EL 8') { agent { dockerfile { @@ -206,7 +255,7 @@ pipeline { } } } //stage('Build mercury on EL 8') - stage('Build libfabric on Leap 15') { + stage('Build libfabric on Leap 15 (Fedora 41)') { agent { dockerfile { filename 'Dockerfile.mockbuild' @@ -216,7 +265,7 @@ pipeline { ' --privileged=true' + ' -v /scratch:/scratch' additionalBuildArgs dockerBuildArgs() + - '--build-arg FVERSION=37 --build-arg PACKAGINGDIR=. ' + '--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. ' } } steps { @@ -254,7 +303,7 @@ pipeline { archiveArtifacts artifacts: 'libfabric/artifacts/leap15/**' } } - } //stage('Build libfabric on Leap 15') + } //stage('Build libfabric on Leap 15 (Fedora 41)') stage('Build libfabric on Ubuntu 20.04') { agent { dockerfile { diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index baa7026..6c8375e 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -10,7 +10,11 @@ set -uex : "${REPOSITORY_NAME:=artifactory}" : "${archive:=}" if [ "$FVERSION" != "latest" ]; then - archive="-archive" + if [ "$FVERSION" != "42" ]; then + if [ "$FVERSION" != "41" ]; then + archive="-archive" + fi + fi fi # shellcheck disable=SC2120 @@ -62,7 +66,7 @@ if [ -n "$REPO_FILE_URL" ]; then pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ - "{$REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" + "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" disable_repos /etc/yum.repos.d/ popd fi From e0e779fbba692de9455e2633bf45e892db29dfcf Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Fri, 18 Jul 2025 08:31:35 +0200 Subject: [PATCH 02/24] Add Leap 15 build on Fedora latest Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 6b94e79..f2c1670 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -255,6 +255,55 @@ pipeline { } } } //stage('Build mercury on EL 8') + stage('Build libfabric on Leap 15') { + agent { + dockerfile { + filename 'Dockerfile.mockbuild' + label 'docker_runner' + args '--group-add mock' + + ' --cap-add=SYS_ADMIN' + + ' --privileged=true' + + ' -v /scratch:/scratch' + additionalBuildArgs dockerBuildArgs() + + '--build-arg PACKAGINGDIR=. ' + } + } + steps { + checkoutScm url: 'https://github.com/daos-stack/libfabric.git', + checkoutDir: "libfabric", + branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master') + sh label: env.STAGE_NAME, + script: updatePackaging('libfabric') + ''' + rm -rf artifacts/leap15/ + mkdir -p artifacts/leap15/ + make CHROOT_NAME="opensuse-leap-15.5-x86_64" chrootbuild''' + } + post { + success { + sh 'ls -l /var/lib/mock/opensuse-leap-15.5-x86_64/result/' + } + unsuccessful { + sh label: "Collect artifacts", + script: '''mockroot=/var/lib/mock/opensuse-leap-15.5-x86_64 + artdir=$PWD/libfabric/artifacts/leap15 + cp -af _topdir/SRPMS $artdir + (cd $mockroot/result/ && + cp -r . $artdir) + (if cd $mockroot/root/builddir/build/BUILD/*/; then + find . -name configure -printf %h\\\\n | \ + while read dir; do + if [ ! -f $dir/config.log ]; then + continue + fi + tdir="$artdir/autoconf-logs/$dir" + mkdir -p $tdir + cp -a $dir/config.log $tdir/ + done + fi)''' + archiveArtifacts artifacts: 'libfabric/artifacts/leap15/**' + } + } + } //stage('Build libfabric on Leap 15') stage('Build libfabric on Leap 15 (Fedora 41)') { agent { dockerfile { From a14108df22084fa1bd6f4fe0b89f663a3c141f03 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Mon, 21 Jul 2025 18:21:16 +0200 Subject: [PATCH 03/24] Add EL8 build on Fedora 41 Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index f2c1670..a715aa8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -110,6 +110,55 @@ pipeline { } } } //stage('Build libfabric on EL 8') + stage('Build libfabric on EL 8 (Fedora 41)') { + agent { + dockerfile { + filename 'Dockerfile.mockbuild' + label 'docker_runner' + args '--group-add mock' + + ' --cap-add=SYS_ADMIN' + + ' --privileged=true' + + ' -v /scratch:/scratch' + additionalBuildArgs dockerBuildArgs() + + '--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. ' + } + } + steps { + checkoutScm url: 'https://github.com/daos-stack/libfabric.git', + checkoutDir: "libfabric", + branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master') + sh label: env.STAGE_NAME, + script: updatePackaging('libfabric') + ''' + rm -rf artifacts/el8/ + mkdir -p artifacts/el8/ + make CHROOT_NAME="rocky+epel-8-x86_64" DISTRO_VERSION=8 chrootbuild''' + } + post { + success { + sh 'ls -l /var/lib/mock/rocky+epel-8-x86_64/result/' + } + unsuccessful { + sh label: "Collect artifacts", + script: '''mockroot=/var/lib/mock/rocky+epel-8-x86_64 + artdir=$PWD/libfabric/artifacts/el8 + cp -af _topdir/SRPMS $artdir + (cd $mockroot/result/ && + cp -r . $artdir) + (if cd $mockroot/root/builddir/build/BUILD/*/; then + find . -name configure -printf %h\\\\n | \ + while read dir; do + if [ ! -f $dir/config.log ]; then + continue + fi + tdir="$artdir/autoconf-logs/$dir" + mkdir -p $tdir + cp -a $dir/config.log $tdir/ + done + fi)''' + archiveArtifacts artifacts: 'libfabric/artifacts/el8/**' + } + } + } //stage('Build libfabric on EL 8 (Fedora 41)') stage('Build libfabric on EL 9') { agent { dockerfile { From e74d276e6c03ffc1c5e528f565e53ae24ddb64fe Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Mon, 21 Jul 2025 18:43:00 +0200 Subject: [PATCH 04/24] Update to leap 15.6 Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index a715aa8..0487e38 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -325,15 +325,15 @@ pipeline { script: updatePackaging('libfabric') + ''' rm -rf artifacts/leap15/ mkdir -p artifacts/leap15/ - make CHROOT_NAME="opensuse-leap-15.5-x86_64" chrootbuild''' + make CHROOT_NAME="opensuse-leap-15.6-x86_64" chrootbuild''' } post { success { - sh 'ls -l /var/lib/mock/opensuse-leap-15.5-x86_64/result/' + sh 'ls -l /var/lib/mock/opensuse-leap-15.6-x86_64/result/' } unsuccessful { sh label: "Collect artifacts", - script: '''mockroot=/var/lib/mock/opensuse-leap-15.5-x86_64 + script: '''mockroot=/var/lib/mock/opensuse-leap-15.6-x86_64 artdir=$PWD/libfabric/artifacts/leap15 cp -af _topdir/SRPMS $artdir (cd $mockroot/result/ && @@ -374,15 +374,15 @@ pipeline { script: updatePackaging('libfabric') + ''' rm -rf artifacts/leap15/ mkdir -p artifacts/leap15/ - make CHROOT_NAME="opensuse-leap-15.5-x86_64" chrootbuild''' + make CHROOT_NAME="opensuse-leap-15.6-x86_64" chrootbuild''' } post { success { - sh 'ls -l /var/lib/mock/opensuse-leap-15.5-x86_64/result/' + sh 'ls -l /var/lib/mock/opensuse-leap-15.6-x86_64/result/' } unsuccessful { sh label: "Collect artifacts", - script: '''mockroot=/var/lib/mock/opensuse-leap-15.5-x86_64 + script: '''mockroot=/var/lib/mock/opensuse-leap-15.6-x86_64 artdir=$PWD/libfabric/artifacts/leap15 cp -af _topdir/SRPMS $artdir (cd $mockroot/result/ && From 5540c3a7ccb37d0c03dfabc2f0030b534e391c9a Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Mon, 21 Jul 2025 19:32:57 +0200 Subject: [PATCH 05/24] Add leap 15.5 build explicitly Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 98 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 0487e38..47b928a 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -402,6 +402,104 @@ pipeline { } } } //stage('Build libfabric on Leap 15 (Fedora 41)') + stage('Build libfabric on Leap 15.5') { + agent { + dockerfile { + filename 'Dockerfile.mockbuild' + label 'docker_runner' + args '--group-add mock' + + ' --cap-add=SYS_ADMIN' + + ' --privileged=true' + + ' -v /scratch:/scratch' + additionalBuildArgs dockerBuildArgs() + + '--build-arg PACKAGINGDIR=. ' + } + } + steps { + checkoutScm url: 'https://github.com/daos-stack/libfabric.git', + checkoutDir: "libfabric", + branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master') + sh label: env.STAGE_NAME, + script: updatePackaging('libfabric') + ''' + rm -rf artifacts/leap15/ + mkdir -p artifacts/leap15/ + make CHROOT_NAME="opensuse-leap-15.5-x86_64" chrootbuild''' + } + post { + success { + sh 'ls -l /var/lib/mock/opensuse-leap-15.5-x86_64/result/' + } + unsuccessful { + sh label: "Collect artifacts", + script: '''mockroot=/var/lib/mock/opensuse-leap-15.5-x86_64 + artdir=$PWD/libfabric/artifacts/leap15 + cp -af _topdir/SRPMS $artdir + (cd $mockroot/result/ && + cp -r . $artdir) + (if cd $mockroot/root/builddir/build/BUILD/*/; then + find . -name configure -printf %h\\\\n | \ + while read dir; do + if [ ! -f $dir/config.log ]; then + continue + fi + tdir="$artdir/autoconf-logs/$dir" + mkdir -p $tdir + cp -a $dir/config.log $tdir/ + done + fi)''' + archiveArtifacts artifacts: 'libfabric/artifacts/leap15/**' + } + } + } //stage('Build libfabric on Leap 15.5') + stage('Build libfabric on Leap 15.5 (Fedora 41)') { + agent { + dockerfile { + filename 'Dockerfile.mockbuild' + label 'docker_runner' + args '--group-add mock' + + ' --cap-add=SYS_ADMIN' + + ' --privileged=true' + + ' -v /scratch:/scratch' + additionalBuildArgs dockerBuildArgs() + + '--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. ' + } + } + steps { + checkoutScm url: 'https://github.com/daos-stack/libfabric.git', + checkoutDir: "libfabric", + branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master') + sh label: env.STAGE_NAME, + script: updatePackaging('libfabric') + ''' + rm -rf artifacts/leap15/ + mkdir -p artifacts/leap15/ + make CHROOT_NAME="opensuse-leap-15.5-x86_64" chrootbuild''' + } + post { + success { + sh 'ls -l /var/lib/mock/opensuse-leap-15.5-x86_64/result/' + } + unsuccessful { + sh label: "Collect artifacts", + script: '''mockroot=/var/lib/mock/opensuse-leap-15.5-x86_64 + artdir=$PWD/libfabric/artifacts/leap15 + cp -af _topdir/SRPMS $artdir + (cd $mockroot/result/ && + cp -r . $artdir) + (if cd $mockroot/root/builddir/build/BUILD/*/; then + find . -name configure -printf %h\\\\n | \ + while read dir; do + if [ ! -f $dir/config.log ]; then + continue + fi + tdir="$artdir/autoconf-logs/$dir" + mkdir -p $tdir + cp -a $dir/config.log $tdir/ + done + fi)''' + archiveArtifacts artifacts: 'libfabric/artifacts/leap15/**' + } + } + } //stage('Build libfabric on Leap 15.5 (Fedora 41)') stage('Build libfabric on Ubuntu 20.04') { agent { dockerfile { From 9f5966aba3859fced910774ba8744acd3452867d Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Tue, 22 Jul 2025 08:28:36 +0200 Subject: [PATCH 06/24] Use Fedora "latest" explicitly Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 47b928a..0e89222 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -71,7 +71,7 @@ pipeline { ' --cap-add=SYS_ADMIN' + ' --privileged=true' + ' -v /scratch:/scratch' - additionalBuildArgs dockerBuildArgs() + '--build-arg PACKAGINGDIR=. ' + additionalBuildArgs dockerBuildArgs() + '--build-arg FVERSION=latest --build-arg PACKAGINGDIR=. ' } } steps { @@ -120,7 +120,7 @@ pipeline { ' --privileged=true' + ' -v /scratch:/scratch' additionalBuildArgs dockerBuildArgs() + - '--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. ' + '--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. ' } } steps { From cc7570b5607e598b6b7a4ae1febe6b2514edb52d Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Tue, 22 Jul 2025 10:49:05 +0200 Subject: [PATCH 07/24] Remove support for all EOL Fedoora versions Fedoras versions stored in -archived folder are EOL and should not be used. Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 6c8375e..ab89ff2 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -8,14 +8,6 @@ set -uex : "${DAOS_LAB_CA_FILE_URL:=}" : "${FVERSION:=latest}" : "${REPOSITORY_NAME:=artifactory}" -: "${archive:=}" -if [ "$FVERSION" != "latest" ]; then - if [ "$FVERSION" != "42" ]; then - if [ "$FVERSION" != "41" ]; then - archive="-archive" - fi - fi -fi # shellcheck disable=SC2120 disable_repos () { @@ -66,7 +58,7 @@ if [ -n "$REPO_FILE_URL" ]; then pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ - "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" + "${REPO_FILE_URL}daos_ci-fedora-${REPOSITORY_NAME}.repo" disable_repos /etc/yum.repos.d/ popd fi From 362ae05e5e442e61cd06f784b242ef2672917224 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Tue, 22 Jul 2025 11:01:10 +0200 Subject: [PATCH 08/24] Disable Leap 15.5 until SRE-3219 is fixed Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Jenkinsfile b/Jenkinsfile index 0e89222..6a73aca 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -403,6 +403,10 @@ pipeline { } } //stage('Build libfabric on Leap 15 (Fedora 41)') stage('Build libfabric on Leap 15.5') { + when { + /* disabled until https://daosio.atlassian.net/browse/SRE-3219 is fixed */ + expression { false } + } agent { dockerfile { filename 'Dockerfile.mockbuild' @@ -452,6 +456,10 @@ pipeline { } } //stage('Build libfabric on Leap 15.5') stage('Build libfabric on Leap 15.5 (Fedora 41)') { + when { + /* disabled until https://daosio.atlassian.net/browse/SRE-3219 is fixed */ + expression { false } + } agent { dockerfile { filename 'Dockerfile.mockbuild' From a63357ba30efc48076269ec47062cd4a3d37ce0b Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Tue, 22 Jul 2025 11:05:28 +0200 Subject: [PATCH 09/24] Fix archive removal Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index ab89ff2..2bee529 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -14,7 +14,7 @@ disable_repos () { local repos_dir="$1" shift local save_repos - IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" + IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora-${REPOSITORY_NAME}" if [ -n "$REPO_FILE_URL" ]; then pushd "$repos_dir" local repo @@ -57,7 +57,7 @@ if [ -n "$REPO_FILE_URL" ]; then mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ - -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ + -o "daos_ci-fedora-${REPOSITORY_NAME}.repo" \ "${REPO_FILE_URL}daos_ci-fedora-${REPOSITORY_NAME}.repo" disable_repos /etc/yum.repos.d/ popd From 61a087ce350ab67c9c2f345c409590e693d064d5 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 08:02:51 +0200 Subject: [PATCH 10/24] Revert "Remove support for all EOL Fedoora versions" This reverts commit a63357ba30efc48076269ec47062cd4a3d37ce0b. This reverts commit cc7570b5607e598b6b7a4ae1febe6b2514edb52d. Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 2bee529..6c8375e 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -8,13 +8,21 @@ set -uex : "${DAOS_LAB_CA_FILE_URL:=}" : "${FVERSION:=latest}" : "${REPOSITORY_NAME:=artifactory}" +: "${archive:=}" +if [ "$FVERSION" != "latest" ]; then + if [ "$FVERSION" != "42" ]; then + if [ "$FVERSION" != "41" ]; then + archive="-archive" + fi + fi +fi # shellcheck disable=SC2120 disable_repos () { local repos_dir="$1" shift local save_repos - IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora-${REPOSITORY_NAME}" + IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" if [ -n "$REPO_FILE_URL" ]; then pushd "$repos_dir" local repo @@ -57,8 +65,8 @@ if [ -n "$REPO_FILE_URL" ]; then mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ - -o "daos_ci-fedora-${REPOSITORY_NAME}.repo" \ - "${REPO_FILE_URL}daos_ci-fedora-${REPOSITORY_NAME}.repo" + -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ + "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" disable_repos /etc/yum.repos.d/ popd fi From 6296cf454831932d71156744e2b49a6412bdc736 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 08:11:38 +0200 Subject: [PATCH 11/24] Use Fedora 38 for Leap 15.5 build Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 61 ++--------------------------------------------------- 1 file changed, 2 insertions(+), 59 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 6a73aca..9b366e1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -402,11 +402,7 @@ pipeline { } } } //stage('Build libfabric on Leap 15 (Fedora 41)') - stage('Build libfabric on Leap 15.5') { - when { - /* disabled until https://daosio.atlassian.net/browse/SRE-3219 is fixed */ - expression { false } - } + stage('Build libfabric on Leap 15.5 (Fedora 38)') { agent { dockerfile { filename 'Dockerfile.mockbuild' @@ -416,7 +412,7 @@ pipeline { ' --privileged=true' + ' -v /scratch:/scratch' additionalBuildArgs dockerBuildArgs() + - '--build-arg PACKAGINGDIR=. ' + '--build-arg FVERSION=38 --build-arg PACKAGINGDIR=. ' } } steps { @@ -455,59 +451,6 @@ pipeline { } } } //stage('Build libfabric on Leap 15.5') - stage('Build libfabric on Leap 15.5 (Fedora 41)') { - when { - /* disabled until https://daosio.atlassian.net/browse/SRE-3219 is fixed */ - expression { false } - } - agent { - dockerfile { - filename 'Dockerfile.mockbuild' - label 'docker_runner' - args '--group-add mock' + - ' --cap-add=SYS_ADMIN' + - ' --privileged=true' + - ' -v /scratch:/scratch' - additionalBuildArgs dockerBuildArgs() + - '--build-arg FVERSION=41 --build-arg PACKAGINGDIR=. ' - } - } - steps { - checkoutScm url: 'https://github.com/daos-stack/libfabric.git', - checkoutDir: "libfabric", - branch: commitPragma(pragma: 'libfabric-branch', def_val: 'master') - sh label: env.STAGE_NAME, - script: updatePackaging('libfabric') + ''' - rm -rf artifacts/leap15/ - mkdir -p artifacts/leap15/ - make CHROOT_NAME="opensuse-leap-15.5-x86_64" chrootbuild''' - } - post { - success { - sh 'ls -l /var/lib/mock/opensuse-leap-15.5-x86_64/result/' - } - unsuccessful { - sh label: "Collect artifacts", - script: '''mockroot=/var/lib/mock/opensuse-leap-15.5-x86_64 - artdir=$PWD/libfabric/artifacts/leap15 - cp -af _topdir/SRPMS $artdir - (cd $mockroot/result/ && - cp -r . $artdir) - (if cd $mockroot/root/builddir/build/BUILD/*/; then - find . -name configure -printf %h\\\\n | \ - while read dir; do - if [ ! -f $dir/config.log ]; then - continue - fi - tdir="$artdir/autoconf-logs/$dir" - mkdir -p $tdir - cp -a $dir/config.log $tdir/ - done - fi)''' - archiveArtifacts artifacts: 'libfabric/artifacts/leap15/**' - } - } - } //stage('Build libfabric on Leap 15.5 (Fedora 41)') stage('Build libfabric on Ubuntu 20.04') { agent { dockerfile { From cd93a33c8f64b845ca7d2119cff4efea4db90390 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 08:30:01 +0200 Subject: [PATCH 12/24] Detect if archive repo is needed for older Fedora Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 6c8375e..92c4369 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -8,18 +8,11 @@ set -uex : "${DAOS_LAB_CA_FILE_URL:=}" : "${FVERSION:=latest}" : "${REPOSITORY_NAME:=artifactory}" -: "${archive:=}" -if [ "$FVERSION" != "latest" ]; then - if [ "$FVERSION" != "42" ]; then - if [ "$FVERSION" != "41" ]; then - archive="-archive" - fi - fi -fi # shellcheck disable=SC2120 disable_repos () { local repos_dir="$1" + local archive="$2" shift local save_repos IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" @@ -62,12 +55,20 @@ install_optional_ca() { if [ -n "$REPO_FILE_URL" ]; then install_curl install_optional_ca + # Test if Fedora $VERSION is available in the primary repo, + # otherwise use the `-archive` one. + if curl --insecure --noproxy '*' --head --silent --fail \ + "${REPO_FILE_URL}daos_ci-fedora-${REPOSITORY_NAME}.repo" > /dev/null; then + archive="" + else + archive="-archive" + fi mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" - disable_repos /etc/yum.repos.d/ + disable_repos "/etc/yum.repos.d/" "${archive}" popd fi dnf -y install dnf-plugins-core From 050e0146ad5b0b7f9dc75c4cfc79ea46519e7a2b Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 08:40:51 +0200 Subject: [PATCH 13/24] Revert "Detect if archive repo is needed for older Fedora" This reverts commit cd93a33c8f64b845ca7d2119cff4efea4db90390. Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 92c4369..6c8375e 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -8,11 +8,18 @@ set -uex : "${DAOS_LAB_CA_FILE_URL:=}" : "${FVERSION:=latest}" : "${REPOSITORY_NAME:=artifactory}" +: "${archive:=}" +if [ "$FVERSION" != "latest" ]; then + if [ "$FVERSION" != "42" ]; then + if [ "$FVERSION" != "41" ]; then + archive="-archive" + fi + fi +fi # shellcheck disable=SC2120 disable_repos () { local repos_dir="$1" - local archive="$2" shift local save_repos IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" @@ -55,20 +62,12 @@ install_optional_ca() { if [ -n "$REPO_FILE_URL" ]; then install_curl install_optional_ca - # Test if Fedora $VERSION is available in the primary repo, - # otherwise use the `-archive` one. - if curl --insecure --noproxy '*' --head --silent --fail \ - "${REPO_FILE_URL}daos_ci-fedora-${REPOSITORY_NAME}.repo" > /dev/null; then - archive="" - else - archive="-archive" - fi mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" - disable_repos "/etc/yum.repos.d/" "${archive}" + disable_repos /etc/yum.repos.d/ popd fi dnf -y install dnf-plugins-core From 56e8740b42ebc8eb1a51165e482b91f649d4b7cb Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 08:55:54 +0200 Subject: [PATCH 14/24] Documentation update Signed-off-by: Tomasz Gromadzki --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 9b366e1..2f35cd1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -402,6 +402,7 @@ pipeline { } } } //stage('Build libfabric on Leap 15 (Fedora 41)') + // Leap 15.5 requires Fedora 38 or older stage('Build libfabric on Leap 15.5 (Fedora 38)') { agent { dockerfile { From 07d08feaa241b5dc370618c3154aa55fc3e5652f Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 09:54:51 +0200 Subject: [PATCH 15/24] Automate Fedora EOL detection Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 6c8375e..36f8e91 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -8,18 +8,28 @@ set -uex : "${DAOS_LAB_CA_FILE_URL:=}" : "${FVERSION:=latest}" : "${REPOSITORY_NAME:=artifactory}" -: "${archive:=}" -if [ "$FVERSION" != "latest" ]; then - if [ "$FVERSION" != "42" ]; then - if [ "$FVERSION" != "41" ]; then - archive="-archive" - fi + +is_fedora_eol() { + local fedora_version + fedora_version=$(grep VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') + local eol_date + eol_date=$(curl -s https://endoflife.date/api/fedora.json | jq -r ".[] | select(.cycle == \"$fedora_version\") | .eol") + if [[ -z "$eol_date" ]]; then + return 0 fi -fi + local today + today=$(date +%Y-%m-%d) + if [[ "$today" > "$eol_date" ]]; then + return 0 # true: EOL + else + return 1 # false: not EOL + fi +} # shellcheck disable=SC2120 disable_repos () { local repos_dir="$1" + local archive="${2:-}" shift local save_repos IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" @@ -62,12 +72,18 @@ install_optional_ca() { if [ -n "$REPO_FILE_URL" ]; then install_curl install_optional_ca + if is_fedora_eol; then + archive="-archive" + else + archive="" + fi + mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" - disable_repos /etc/yum.repos.d/ + disable_repos "/etc/yum.repos.d/" "${archive}" popd fi dnf -y install dnf-plugins-core From bf92be5a054182f4e133f567ba67ab47d1b0ee48 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 10:29:40 +0200 Subject: [PATCH 16/24] Missing jq in the base Fedora image Signed-off-by: Tomasz Gromadzki --- Dockerfile.mockbuild | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile.mockbuild b/Dockerfile.mockbuild index 4d8f243..c198384 100644 --- a/Dockerfile.mockbuild +++ b/Dockerfile.mockbuild @@ -16,6 +16,10 @@ LABEL maintainer="daos@daos.groups.io" ARG REPO_FILE_URL ARG DAOS_LAB_CA_FILE_URL ARG REPOSITORY_NAME + +# jq is required for repo-helper-fedora.sh +RUN dnf -y jq + # script to install OS updates basic tools and daos dependencies # COPY ./utils/scripts/install-fedora.sh /tmp/install.sh # script to setup local repo if available From abf6b888c00e74254c33d43aa16265e51afb12c7 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 10:34:30 +0200 Subject: [PATCH 17/24] Missing jq in the base Fedora image - fix Signed-off-by: Tomasz Gromadzki --- Dockerfile.mockbuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile.mockbuild b/Dockerfile.mockbuild index c198384..2fd1bf1 100644 --- a/Dockerfile.mockbuild +++ b/Dockerfile.mockbuild @@ -18,7 +18,7 @@ ARG DAOS_LAB_CA_FILE_URL ARG REPOSITORY_NAME # jq is required for repo-helper-fedora.sh -RUN dnf -y jq +RUN dnf -y install jq # script to install OS updates basic tools and daos dependencies # COPY ./utils/scripts/install-fedora.sh /tmp/install.sh From 39ba6a6a59636c60ee58495fe0c80240940a8ea7 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 11:15:23 +0200 Subject: [PATCH 18/24] Use local artifactory as eol proxy Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 36f8e91..76a09ea 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -10,19 +10,19 @@ set -uex : "${REPOSITORY_NAME:=artifactory}" is_fedora_eol() { - local fedora_version - fedora_version=$(grep VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') - local eol_date - eol_date=$(curl -s https://endoflife.date/api/fedora.json | jq -r ".[] | select(.cycle == \"$fedora_version\") | .eol") - if [[ -z "$eol_date" ]]; then - return 0 - fi - local today - today=$(date +%Y-%m-%d) - if [[ "$today" > "$eol_date" ]]; then - return 0 # true: EOL + local eol_url fedora_version eol_date today + if [ -n "$REPO_FILE_URL" ]; then + eol_url="${REPO_FILE_URL%repo-files/}eol-proxy/fedora.json" + fedora_version=$(grep VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') + eol_date=$(curl -s "$eol_url" | jq -r ".[] | select(.cycle == \"$fedora_version\") | .eol") + if [[ -z "$eol_date" ]]; then + return 1 # Assume NOT EOL if data missing + fi + today=$(date +%Y-%m-%d) + [[ "$today" > "$eol_date" ]] + return $? # Return 0 if EOL, 1 if not else - return 1 # false: not EOL + return 1 # Assume NOT EOL if url is missing fi } From 292f1e7a95a5542e47b366f6845a22a673faf655 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 11:33:42 +0200 Subject: [PATCH 19/24] Use local artifactory as eol proxy - fix 1 Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 76a09ea..0e35072 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -31,6 +31,7 @@ disable_repos () { local repos_dir="$1" local archive="${2:-}" shift + shift local save_repos IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" if [ -n "$REPO_FILE_URL" ]; then From 12b11f44cf3384b2aa47a47f71c1ddef62670bba Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 11:49:19 +0200 Subject: [PATCH 20/24] Use local artifactory as eol proxy - fix 2 Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 0e35072..a39b3d2 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -29,9 +29,11 @@ is_fedora_eol() { # shellcheck disable=SC2120 disable_repos () { local repos_dir="$1" - local archive="${2:-}" - shift shift + local archive="${2:-}" + if [[ -n "$archive" ]]; then + shift + fi local save_repos IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" if [ -n "$REPO_FILE_URL" ]; then From 6ba2414505a1b9d53b855e7574461163ee8a8909 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 11:54:54 +0200 Subject: [PATCH 21/24] Use local artifactory as eol proxy - fix 3 Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index a39b3d2..ca6892b 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -30,7 +30,7 @@ is_fedora_eol() { disable_repos () { local repos_dir="$1" shift - local archive="${2:-}" + local archive="${1:-}" if [[ -n "$archive" ]]; then shift fi From bc3c2d9f9f7cf3ff94f2efaf692742e091f048e9 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 12:07:33 +0200 Subject: [PATCH 22/24] Use local artifactory as eol proxy - fix 4 Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index ca6892b..34c9fda 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -8,6 +8,7 @@ set -uex : "${DAOS_LAB_CA_FILE_URL:=}" : "${FVERSION:=latest}" : "${REPOSITORY_NAME:=artifactory}" +: "${archive:=}" is_fedora_eol() { local eol_url fedora_version eol_date today @@ -30,10 +31,6 @@ is_fedora_eol() { disable_repos () { local repos_dir="$1" shift - local archive="${1:-}" - if [[ -n "$archive" ]]; then - shift - fi local save_repos IFS=" " read -r -a save_repos <<< "${*:-} daos_ci-fedora${archive}-${REPOSITORY_NAME}" if [ -n "$REPO_FILE_URL" ]; then @@ -77,16 +74,13 @@ if [ -n "$REPO_FILE_URL" ]; then install_optional_ca if is_fedora_eol; then archive="-archive" - else - archive="" fi - mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ curl -k --noproxy '*' -sSf \ -o "daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" \ "${REPO_FILE_URL}daos_ci-fedora${archive}-${REPOSITORY_NAME}.repo" - disable_repos "/etc/yum.repos.d/" "${archive}" + disable_repos /etc/yum.repos.d/ popd fi dnf -y install dnf-plugins-core From 92b5666fb4c77b9f6bce4cd596b56fa2d768857e Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 12:43:53 +0200 Subject: [PATCH 23/24] jq is no longer required Signed-off-by: Tomasz Gromadzki --- Dockerfile.mockbuild | 3 --- 1 file changed, 3 deletions(-) diff --git a/Dockerfile.mockbuild b/Dockerfile.mockbuild index 2fd1bf1..b6cc465 100644 --- a/Dockerfile.mockbuild +++ b/Dockerfile.mockbuild @@ -17,9 +17,6 @@ ARG REPO_FILE_URL ARG DAOS_LAB_CA_FILE_URL ARG REPOSITORY_NAME -# jq is required for repo-helper-fedora.sh -RUN dnf -y install jq - # script to install OS updates basic tools and daos dependencies # COPY ./utils/scripts/install-fedora.sh /tmp/install.sh # script to setup local repo if available From 6499193c210a6187994d1d2078464875da5501d2 Mon Sep 17 00:00:00 2001 From: Tomasz Gromadzki Date: Thu, 24 Jul 2025 12:48:55 +0200 Subject: [PATCH 24/24] jq is no longer required - fix 1 Signed-off-by: Tomasz Gromadzki --- scripts/repo-helper-fedora.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/repo-helper-fedora.sh b/scripts/repo-helper-fedora.sh index 34c9fda..b567e00 100644 --- a/scripts/repo-helper-fedora.sh +++ b/scripts/repo-helper-fedora.sh @@ -14,8 +14,11 @@ is_fedora_eol() { local eol_url fedora_version eol_date today if [ -n "$REPO_FILE_URL" ]; then eol_url="${REPO_FILE_URL%repo-files/}eol-proxy/fedora.json" - fedora_version=$(grep VERSION_ID /etc/os-release | cut -d= -f2 | tr -d '"') - eol_date=$(curl -s "$eol_url" | jq -r ".[] | select(.cycle == \"$fedora_version\") | .eol") + fedora_version=$(grep VERSION_ID /etc/os-release | cut -d= -f2 | \ + tr -d '"') + eol_date=$(curl -s "$eol_url" | sed 's/},{/}\n{/g' | \ + grep "cycle\":\"$fedora_version\"" | \ + sed -n 's/.*"eol":"\([^"]*\)".*/\1/p') if [[ -z "$eol_date" ]]; then return 1 # Assume NOT EOL if data missing fi