diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5ea273b6437..c7202186bff 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -820,13 +820,13 @@ jobs: dockerfile: ubi image: registry.access.redhat.com/ubi8/ubi:8.4 artifact: rpm-ubi8-${{ arch.value }} - python_package: python39 + python_package: python3.12 pool: ${{ arch.pool }} Red Hat Universal Base Image 9 ${{ arch.name }}: dockerfile: ubi image: registry.access.redhat.com/ubi9/ubi:9.0.0 artifact: rpm-ubi9-${{ arch.value }} - python_package: python3.9 + python_package: python3.12 pool: ${{ arch.pool }} steps: - bash: ./scripts/ci/install_docker.sh @@ -869,17 +869,17 @@ jobs: artifact: rpm-ubi8-${{ arch.value }} distro: el8 image: registry.access.redhat.com/ubi8/ubi:8.4 - python_package: python39 - python_cmd: python3.9 - pip_cmd: pip3.9 + python_package: python3.12 + python_cmd: python3.12 + pip_cmd: pip3.12 pool: ${{ arch.pool }} Red Hat Universal Base Image 9 ${{ arch.name }}: artifact: rpm-ubi9-${{ arch.value }} distro: el9 image: registry.access.redhat.com/ubi9/ubi:9.0.0 - python_package: python3.9 - python_cmd: python3.9 - pip_cmd: pip3.9 + python_package: python3.12 + python_cmd: python3.12 + pip_cmd: pip3.12 pool: ${{ arch.pool }} steps: - task: DownloadPipelineArtifact@1 diff --git a/scripts/release/rpm/azure-cli.spec b/scripts/release/rpm/azure-cli.spec index e63f58f7be6..ccdec9ec656 100644 --- a/scripts/release/rpm/azure-cli.spec +++ b/scripts/release/rpm/azure-cli.spec @@ -58,6 +58,7 @@ deactivate # Fix up %{buildroot} appearing in some files... for d in %{buildroot}%{cli_lib_dir}/bin/*; do perl -p -i -e "s#%{buildroot}##g" $d; done; +rm %{buildroot}%{cli_lib_dir}/pyvenv.cfg # Create executable (entry script) diff --git a/scripts/release/rpm/test_rpm_in_docker.sh b/scripts/release/rpm/test_rpm_in_docker.sh index be4cc9a4e66..3748bbc023c 100644 --- a/scripts/release/rpm/test_rpm_in_docker.sh +++ b/scripts/release/rpm/test_rpm_in_docker.sh @@ -7,7 +7,7 @@ export USERNAME=azureuser dnf --nogpgcheck install /mnt/rpm/$RPM_NAME -y -dnf install git gcc $PYTHON_PACKAGE-devel findutils -y +dnf install git findutils $PYTHON_PACKAGE-pip -y ln -s -f /usr/bin/$PYTHON_CMD /usr/bin/python ln -s -f /usr/bin/$PIP_CMD /usr/bin/pip diff --git a/scripts/release/rpm/ubi.dockerfile b/scripts/release/rpm/ubi.dockerfile index 6a5de643b94..596d757ef39 100644 --- a/scripts/release/rpm/ubi.dockerfile +++ b/scripts/release/rpm/ubi.dockerfile @@ -5,7 +5,7 @@ ARG image=registry.access.redhat.com/ubi8/ubi:8.4 FROM ${image} AS build-env ARG cli_version=dev -ARG python_package=python39 +ARG python_package=python3.12 RUN yum update -y RUN yum install -y wget rpm-build gcc libffi-devel ${python_package}-devel openssl-devel make bash diffutils patch dos2unix perl @@ -18,7 +18,7 @@ COPY . . # We have to explicitly specify 'python39' to install Python 3.9. RUN --mount=type=secret,id=PIP_INDEX_URL export PIP_INDEX_URL=$(cat /run/secrets/PIP_INDEX_URL) && \ dos2unix ./scripts/release/rpm/azure-cli.spec && \ - REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=$python_package PYTHON_CMD=python3.9 \ + REPO_PATH=$(pwd) CLI_VERSION=$cli_version PYTHON_PACKAGE=$python_package PYTHON_CMD=$python_package \ rpmbuild -v -bb --clean scripts/release/rpm/azure-cli.spec && \ cp /root/rpmbuild/RPMS/*/azure-cli-${cli_version}-1.*.rpm /azure-cli-dev.rpm && \ mkdir /out && cp /root/rpmbuild/RPMS/*/azure-cli-${cli_version}-1.*.rpm /out/