From 6c89aa52275bf0c4107d9e719031c8ca83c5804f Mon Sep 17 00:00:00 2001 From: Kenichi Maehashi Date: Fri, 27 Sep 2019 05:25:48 +0900 Subject: [PATCH] Fix to run with Apache on RHEL 6 (#7401) This PR fixes a regression in #7337 (0.38.0) that certbot cannot run with Apache on RHEL 6. In RHEL 6, `distro.linux_distribution()` returns `RedHatEnterpriseServer`. In RHEL 6: ```py >>> import distro >>> distro.linux_distribution() (u'RedHatEnterpriseServer', u'6.10', u'Santiago') >>> import platform >>> platform.linux_distribution() ('Red Hat Enterprise Linux Server', '6.10', 'Santiago') ``` In RHEL 7: ```py >>> import distro >>> distro.linux_distribution() ('Red Hat Enterprise Linux Server', '7.6', 'Maipo') >>> import platform >>> platform.linux_distribution() ('Red Hat Enterprise Linux Server', '7.6', 'Maipo') ``` * fix to run with Apache on RHEL 6 * fix docs --- AUTHORS.md | 1 + CHANGELOG.md | 2 +- certbot-apache/certbot_apache/entrypoint.py | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index 051c59e61..182081e94 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -127,6 +127,7 @@ Authors * [Joubin Jabbari](https://github.com/joubin) * [Juho Juopperi](https://github.com/jkjuopperi) * [Kane York](https://github.com/riking) +* [Kenichi Maehashi](https://github.com/kmaehashi) * [Kenneth Skovhede](https://github.com/kenkendk) * [Kevin Burke](https://github.com/kevinburke) * [Kevin London](https://github.com/kevinlondon) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5c0143d01..ea0d316ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,7 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). ### Fixed -* +* Fixed OS detection in the Apache plugin on RHEL 6. More details about these changes can be found on our GitHub repo. diff --git a/certbot-apache/certbot_apache/entrypoint.py b/certbot-apache/certbot_apache/entrypoint.py index 0b875add3..610191fea 100644 --- a/certbot-apache/certbot_apache/entrypoint.py +++ b/certbot-apache/certbot_apache/entrypoint.py @@ -24,6 +24,7 @@ OVERRIDE_CLASSES = { "fedora_old": override_centos.CentOSConfigurator, "fedora": override_fedora.FedoraConfigurator, "ol": override_centos.CentOSConfigurator, + "redhatenterpriseserver": override_centos.CentOSConfigurator, "red hat enterprise linux server": override_centos.CentOSConfigurator, "rhel": override_centos.CentOSConfigurator, "amazon": override_centos.CentOSConfigurator,