From: Anil Belur Date: Wed, 10 Aug 2022 23:47:36 +0000 (+1000) Subject: Feat: Upgrade git to v2.36 for CentOS7 X-Git-Tag: v0.11.0^0 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=ae3a1a9c4bb342170ef883da033646811ac703a3;p=releng%2Fcommon-packer.git Feat: Upgrade git to v2.36 for CentOS7 - v2.24 packages are no longer available on the CentOS mirrors. Disable warning to use yum module. - Fix install python script to check python/python3 to test, since the default python3 is not available on CentOS7 platforms. - Print the default version of python installed. Issue-ID: IT-24376 Signed-off-by: Anil Belur Change-Id: Id48ad72aba776ed4092a292c4db1ad6459d9ab64 Signed-off-by: Anil Belur --- diff --git a/provision/install-base-pkgs-RedHat.yaml b/provision/install-base-pkgs-RedHat.yaml index cfd4207..eb54182 100644 --- a/provision/install-base-pkgs-RedHat.yaml +++ b/provision/install-base-pkgs-RedHat.yaml @@ -137,7 +137,7 @@ when: - ansible_facts['distribution_major_version'] is version('8', '>=') -- name: Swap to git224 +- name: Swap to git236 block: - name: Install yum-plugin-replace yum: @@ -147,8 +147,10 @@ - name: Gather rpm package facts package_facts: manager: auto - - name: Replace git with git224 - command: yum replace -y git --replace-with git224 + - name: Replace git with git236 + command: yum replace -y git --replace-with git236 + args: + warn: false when: ansible_facts.packages['git'] is defined become: true when: diff --git a/provision/install-python.sh b/provision/install-python.sh index c98cf71..5817efb 100755 --- a/provision/install-python.sh +++ b/provision/install-python.sh @@ -90,8 +90,10 @@ if is_ubuntu; then # Ubuntu 20.04 and newer can default to Python 3 if apt-cache show python-is-python3; then apt-get install -y python-is-python3 + type python3 else apt-get install -y python-minimal + type python fi fi @@ -99,9 +101,10 @@ if is_centos8; then echo "Install python38" dnf clean all dnf install -y python38 + python3 -V + type python3 fi -type python3 # Ansible requires sudo so ensure it is available. if ! command -v sudo; then diff --git a/releasenotes/notes/upgrade-git236-f11b0f4928dbd428.yaml b/releasenotes/notes/upgrade-git236-f11b0f4928dbd428.yaml new file mode 100644 index 0000000..19ffc61 --- /dev/null +++ b/releasenotes/notes/upgrade-git236-f11b0f4928dbd428.yaml @@ -0,0 +1,4 @@ +--- +upgrade: + - | + Upgrade git v2.36 on CentOS 7.