diff --git a/Jenkinsfile b/Jenkinsfile index d63271b..e554aaf 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -7,5 +7,5 @@ //@Library(value="pipeline-lib@your_branch") _ /* groovylint-disable-next-line CompileStatic */ -packageBuildingPipelineDAOSTest(['distros' : ['el8', 'el9', 'leap15'], +packageBuildingPipelineDAOSTest(['distros' : ['el9', 'leap15'], 'test-tag': 'mfu']) diff --git a/mpifileutils.spec b/mpifileutils.spec index d38b8b4..5b46937 100644 --- a/mpifileutils.spec +++ b/mpifileutils.spec @@ -50,7 +50,7 @@ Name: mpifileutils Version: 0.12 -Release: 2%{?commit:.g%{shortcommit}}%{?dist} +Release: 3%{?commit:.g%{shortcommit}}%{?dist} Summary: File utilities designed for scalability and performance Group: System Environment/Libraries diff --git a/packaging/Dockerfile.mockbuild b/packaging/Dockerfile.mockbuild index d8d86ac..fdcec8d 100644 --- a/packaging/Dockerfile.mockbuild +++ b/packaging/Dockerfile.mockbuild @@ -1,6 +1,6 @@ # # Copyright 2018-2024 Intel Corporation -# Copyright 2025 Hewlett Packard Enterprise Development LP +# Copyright 2025-2026 Hewlett Packard Enterprise Development LP # # 'recipe' for Docker to build an RPM # @@ -12,23 +12,47 @@ FROM fedora:$FVERSION ARG FVERSION LABEL maintainer="daos@daos.groups.io" +# Accept DAOS_HTTP_PROXY, DAOS_HTTPS_PROXY, and DAOS_NO_PROXY at build time +ARG DAOS_NO_PROXY +ARG DAOS_HTTP_PROXY +ARG DAOS_HTTPS_PROXY + +# Propagate into the build environment +ENV http_proxy=${DAOS_HTTP_PROXY} \ + HTTP_PROXY=${DAOS_HTTP_PROXY} \ + https_proxy=${DAOS_HTTPS_PROXY} \ + HTTPS_PROXY=${DAOS_HTTPS_PROXY} \ + no_proxy=${DAOS_NO_PROXY} \ + NO_PROXY=${DAOS_NO_PROXY} + +# Persist into /etc/environment for use by shells and services +RUN set -e; \ + if [ -n "$DAOS_HTTP_PROXY" ]; then \ + echo "http_proxy=$DAOS_HTTP_PROXY" >> /etc/environment; \ + echo "HTTP_PROXY=$DAOS_HTTP_PROXY" >> /etc/environment; \ + fi; \ + if [ -n "$DAOS_HTTPS_PROXY" ]; then \ + echo "https_proxy=$DAOS_HTTPS_PROXY" >> /etc/environment; \ + echo "HTTPS_PROXY=$DAOS_HTTPS_PROXY" >> /etc/environment; \ + fi; \ + if [ -n "$DAOS_NO_PROXY" ]; then \ + echo "no_proxy=$DAOS_NO_PROXY" >> /etc/environment; \ + echo "NO_PROXY=$DAOS_NO_PROXY" >> /etc/environment; \ + fi + # Use local repo server if present ARG REPO_FILE_URL ARG DAOS_LAB_CA_FILE_URL ARG REPOSITORY_NAME -# 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 -COPY ./packaging/scripts/repo-helper-fedora.sh /tmp/repo-helper.sh -RUN chmod +x /tmp/repo-helper.sh && \ - /tmp/repo-helper.sh && \ - rm -f /tmp/repo-helper.sh +# Script to setup a local repo instead of the distro-provided one. +# Only takes effect when REPO_FILE_URL is set; otherwise it is a no-op. +RUN --mount=type=bind,source=packaging/scripts/repo-helper-fedora.sh,target=/tmp/repo-helper-fedora.sh \ + /tmp/repo-helper-fedora.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/packaging/Dockerfile.ubuntu.20.04 b/packaging/Dockerfile.ubuntu.20.04 index bd5363b..4484c84 100644 --- a/packaging/Dockerfile.ubuntu.20.04 +++ b/packaging/Dockerfile.ubuntu.20.04 @@ -3,7 +3,7 @@ # Jenkinsfile will be changed to use Dockerfile.ubuntu. # # Copyright 2019-2021, Intel Corporation -# Copyright 2025 Hewlett Packard Enterprise Development LP +# Copyright 2025-2026 Hewlett Packard Enterprise Development LP # # 'recipe' for Docker to build an Debian package # @@ -14,15 +14,41 @@ LABEL org.opencontainers.image.authors="daos@daos.groups.io" # Needed for later use of BASE_DISTRO ARG BASE_DISTRO +# Accept DAOS_HTTP_PROXY, DAOS_HTTPS_PROXY, and DAOS_NO_PROXY at build time +ARG DAOS_NO_PROXY +ARG DAOS_HTTP_PROXY +ARG DAOS_HTTPS_PROXY + +# Propagate into the build environment +ENV http_proxy=${DAOS_HTTP_PROXY} \ + HTTP_PROXY=${DAOS_HTTP_PROXY} \ + https_proxy=${DAOS_HTTPS_PROXY} \ + HTTPS_PROXY=${DAOS_HTTPS_PROXY} \ + no_proxy=${DAOS_NO_PROXY} \ + NO_PROXY=${DAOS_NO_PROXY} + +# Persist into /etc/environment for use by shells and services +RUN set -e; \ + if [ -n "$DAOS_HTTP_PROXY" ]; then \ + echo "http_proxy=$DAOS_HTTP_PROXY" >> /etc/environment; \ + echo "HTTP_PROXY=$DAOS_HTTP_PROXY" >> /etc/environment; \ + fi; \ + if [ -n "$DAOS_HTTPS_PROXY" ]; then \ + echo "https_proxy=$DAOS_HTTPS_PROXY" >> /etc/environment; \ + echo "HTTPS_PROXY=$DAOS_HTTPS_PROXY" >> /etc/environment; \ + fi; \ + if [ -n "$DAOS_NO_PROXY" ]; then \ + echo "no_proxy=$DAOS_NO_PROXY" >> /etc/environment; \ + echo "NO_PROXY=$DAOS_NO_PROXY" >> /etc/environment; \ + fi + ARG REPO_FILE_URL ARG DAOS_LAB_CA_FILE_URL ARG REPOSITORY_NAME -# script to setup local repo if available -COPY ./packaging/scripts/repo-helper-ubuntu.sh /tmp/repo-helper.sh - -RUN chmod +x /tmp/repo-helper.sh && \ - /tmp/repo-helper.sh && \ - rm -f /tmp/repo-helper.sh +# Script to setup a local repo instead of the distro-provided one. +# Only takes effect when REPO_FILE_URL is set; otherwise it is a no-op. +RUN --mount=type=bind,source=packaging/scripts/repo-helper-ubuntu.sh,target=/tmp/repo-helper-ubuntu.sh \ + /tmp/repo-helper-ubuntu.sh # Install basic tools - rpmdevtools temporary commented out. RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \ diff --git a/packaging/scripts/repo-helper-fedora.sh b/packaging/scripts/repo-helper-fedora.sh old mode 100644 new mode 100755 index baa7026..f7d4a4f --- a/packaging/scripts/repo-helper-fedora.sh +++ b/packaging/scripts/repo-helper-fedora.sh @@ -1,4 +1,9 @@ #!/bin/bash +# +# Copyright 2025-2026 Hewlett Packard Enterprise Development LP +# +# SPDX-License-Identifier: BSD-2-Clause-Patent +# set -uex # This script is used by Dockerfiles to optionally use @@ -44,7 +49,7 @@ install_curl() { install_optional_ca() { ca_storage="/etc/pki/ca-trust/source/anchors/" if [ -n "$DAOS_LAB_CA_FILE_URL" ]; then - curl -k --noproxy '*' -sSf -o "${ca_storage}lab_ca_file.crt" \ + curl -k -sSf -o "${ca_storage}lab_ca_file.crt" \ "$DAOS_LAB_CA_FILE_URL" update-ca-trust fi @@ -60,7 +65,7 @@ if [ -n "$REPO_FILE_URL" ]; then install_optional_ca mkdir -p /etc/yum.repos.d pushd /etc/yum.repos.d/ - curl -k --noproxy '*' -sSf \ + curl -k -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/ diff --git a/packaging/scripts/repo-helper-ubuntu.sh b/packaging/scripts/repo-helper-ubuntu.sh old mode 100644 new mode 100755