From: Kefu Chai Date: Thu, 5 Sep 2019 15:17:06 +0000 (+0800) Subject: install-deps.sh: install `python*-devel` for python*rpm-macros X-Git-Tag: v12.2.13~109^2~12 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=bf5b34732e6686d8d869d7f46f2a11b64b97fa2c;p=ceph.git install-deps.sh: install `python*-devel` for python*rpm-macros in 087ea813, we installed '*rpm-macros' for the macros, so we can have access to the latest python packaging related macros for preparing the build dependencies. but we could run into https://bugs.centos.org/view.php?id=16379, if we already have an old version of python-devel installed. as the newer version of python-rpm-macros conflicts with it. it was a chicken-and-egg problem, as we don't know the exact name of *rpm-macros packages. that's why we chose to install all of them. but we have to upgrade the existing python-devel package to resolve the conflict. but the since there is no python3-devel in RHEL7/CentOS7, what they have is python36-devel. so we have to hardwire the `%{python3_pkgversion}` to "36" even before we have access to this macro, and upgrade the python36-devel package beforehand. but this renders installing the rpm-macro package less useful -- we intend to use the macro offered by the package to figure out "36". as a workaround, we pretend that we know the "main" version of python3 in current RHEL/CentOS. and always install python36-devel for python-rpm-macros. as the former requires the latter. once all python3*-devel on all builders are upgraded, we will be safe to install '*rpm-macros' again without installing python36-devel first. by then, we could revert this change, or continue installing python36-devel until the distro bumps up the "main" python version to 3.7 Fixes: https://tracker.ceph.com/issues/41603 Signed-off-by: Kefu Chai (cherry picked from commit 0b2be2b6710695867197ee84e411bdf0a843a06a) Conflicts: install-deps.sh - VERSION_ID in luminous, MAJOR_VERSION in master --- diff --git a/install-deps.sh b/install-deps.sh index 03cecc7c790e..155452b39176 100755 --- a/install-deps.sh +++ b/install-deps.sh @@ -209,6 +209,7 @@ else $SUDO rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-$VERSION_ID $SUDO rm -f /etc/yum.repos.d/dl.fedoraproject.org* if test $ID = centos -a $VERSION_ID = 7 ; then + $SUDO $yumdnf install -y python36-devel case $(uname -m) in x86_64) $SUDO yum -y install centos-release-scl