From 5e58580d130ee09657f9d752e7ffa6f566b45149 Mon Sep 17 00:00:00 2001 From: Bob Strecansky Date: Wed, 9 Aug 2017 12:12:36 -0400 Subject: [PATCH] [#4966] - Fedora 26 doesn't have development tools handy (#4997) --- letsencrypt-auto-source/letsencrypt-auto | 17 +++++++++++++++-- .../pieces/bootstrappers/rpm_common.sh | 17 +++++++++++++++-- 2 files changed, 30 insertions(+), 4 deletions(-) diff --git a/letsencrypt-auto-source/letsencrypt-auto b/letsencrypt-auto-source/letsencrypt-auto index 3c3227b41..39f8728e8 100755 --- a/letsencrypt-auto-source/letsencrypt-auto +++ b/letsencrypt-auto-source/letsencrypt-auto @@ -410,8 +410,7 @@ BootstrapRpmCommon() { ca-certificates " - # Some distros and older versions of current distros use a "python27" - # instead of "python" naming convention. Try both conventions. + # Most RPM distros use the "python" or "python-" naming convention. Let's try that first. if $SUDO $tool list python >/dev/null 2>&1; then pkgs="$pkgs python @@ -420,6 +419,20 @@ BootstrapRpmCommon() { python-tools python-pip " + # Fedora 26 starts to use the prefix python2 for python2 based packages. + # this elseif is theoretically for any Fedora over version 26: + elif $SUDO $tool list python2 >/dev/null 2>&1; then + pkgs="$pkgs + python2 + python2-libs + python2-setuptools + python2-devel + python2-virtualenv + python2-tools + python2-pip + " + # Some distros and older versions of current distros use a "python27" + # instead of the "python" or "python-" naming convention. else pkgs="$pkgs python27 diff --git a/letsencrypt-auto-source/pieces/bootstrappers/rpm_common.sh b/letsencrypt-auto-source/pieces/bootstrappers/rpm_common.sh index dcd535292..965ee32f3 100755 --- a/letsencrypt-auto-source/pieces/bootstrappers/rpm_common.sh +++ b/letsencrypt-auto-source/pieces/bootstrappers/rpm_common.sh @@ -54,8 +54,7 @@ BootstrapRpmCommon() { ca-certificates " - # Some distros and older versions of current distros use a "python27" - # instead of "python" naming convention. Try both conventions. + # Most RPM distros use the "python" or "python-" naming convention. Let's try that first. if $SUDO $tool list python >/dev/null 2>&1; then pkgs="$pkgs python @@ -64,6 +63,20 @@ BootstrapRpmCommon() { python-tools python-pip " + # Fedora 26 starts to use the prefix python2 for python2 based packages. + # this elseif is theoretically for any Fedora over version 26: + elif $SUDO $tool list python2 >/dev/null 2>&1; then + pkgs="$pkgs + python2 + python2-libs + python2-setuptools + python2-devel + python2-virtualenv + python2-tools + python2-pip + " + # Some distros and older versions of current distros use a "python27" + # instead of the "python" or "python-" naming convention. else pkgs="$pkgs python27