diff --git a/.gitignore b/.gitignore index dbf3052..eddb1b5 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ /certbot-apache-0.18.2.tar.gz /certbot-apache-0.19.0.tar.gz /certbot-apache-0.20.0.tar.gz +/certbot-apache-0.21.1.tar.gz diff --git a/fix-test.patch b/fix-test.patch new file mode 100644 index 0000000..1ae0900 --- /dev/null +++ b/fix-test.patch @@ -0,0 +1,43 @@ +From 8825c431698dc60e8905e38cab4d20ca159c4957 Mon Sep 17 00:00:00 2001 +From: Eli Young +Date: Fri, 2 Feb 2018 15:53:18 -0800 +Subject: [PATCH] Fix Apache configurator test + +One of the Apache configurator tests was relying on the order in which +calls are made by ensure_listen() to parser.add_dir(). Under the hood, +the order is determined by creating a list and a set, adding some items +to the set, and then iterating over the difference (itself a set) between +the set and the list. Unfortunately, sets are unordered collections, and +iteration order is therefore not guaranteed. This resulted in test +failures when the iteration order was not as the test writer had +anticipated. We deal with this by instead building a list of all the +calls to parser_dir() and comparing it to a list of expected calls. +This has the extra benefit of ensuring that no extraneous calls are +added and no expected calls are missing. +--- + certbot_apache/tests/configurator_test.py | 9 +++++++-- + 1 file changed, 7 insertions(+), 2 deletions(-) + +diff --git a/certbot_apache/tests/configurator_test.py b/certbot_apache/tests/configurator_test.py +index 530d75a9..705bef13 100644 +--- a/certbot_apache/tests/configurator_test.py ++++ b/certbot_apache/tests/configurator_test.py +@@ -473,8 +473,13 @@ class MultipleVhostsTest(util.ApacheTest): + self.config.ensure_listen("8080") + self.assertEqual(mock_add_dir.call_count, 3) + self.assertTrue(mock_add_dir.called) +- self.assertEqual(mock_add_dir.call_args[0][1], "Listen") +- self.assertEqual(mock_add_dir.call_args[0][2], ['1.2.3.4:8080']) ++ call_args_list = [list(mock_add_dir.call_args_list[i][0][1:]) for i in ++ range(3)] ++ self.assertEqual( ++ sorted(call_args_list), ++ sorted([["Listen", ["1.2.3.4:8080"]], ++ ["Listen", ["[::1]:8080"]], ++ ["Listen", ["1.1.1.1:8080"]]])) + + def test_prepare_server_https(self): + mock_enable = mock.Mock() +-- +2.16.1 + diff --git a/python-certbot-apache.spec b/python-certbot-apache.spec index ddf7c55..b953b78 100644 --- a/python-certbot-apache.spec +++ b/python-certbot-apache.spec @@ -8,7 +8,7 @@ %endif Name: python-%{pyname} -Version: 0.20.0 +Version: 0.21.1 Release: 1%{?dist} Summary: The apache plugin for certbot @@ -19,6 +19,8 @@ Source0: https://files.pythonhosted.org/packages/source/c/%{pyname}/%{pyname} %if 0%{?rhel} Patch0: allow-old-setuptools.patch %endif +# TODO Remove this when fixed upstream +Patch1: fix-test.patch BuildArch: noarch @@ -91,10 +93,7 @@ Plugin for certbot that allows for automatic configuration of apache %endif %prep -%setup -n %{pyname}-%{version} -%if 0%{?rhel} -%patch0 -p1 -%endif +%autosetup -p1 -n %{pyname}-%{version} %build %{py2_build} @@ -130,6 +129,9 @@ Plugin for certbot that allows for automatic configuration of apache %endif %changelog +* Fri Feb 02 2018 Eli Young - 0.21.1-1 +- Update to 0.21.1 (#1535996) + * Wed Dec 20 2017 Eli Young - 0.20.0-1 - Update to 0.20.0 diff --git a/sources b/sources index 7c96fb1..f28a4c1 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (certbot-apache-0.20.0.tar.gz) = 8d7d9f4e1e7ef1940c4ebbc60f0a93057897fcb23d3f7dd7d23ec14b47f57fcafed1b3ff7dfa1ca4a2db31c66918dd0397baec010da2eef1542ebf11b2e65076 +SHA512 (certbot-apache-0.21.1.tar.gz) = dd94ae81b77ba42caf200aa71385c4082d8154917b0d371039b018f89e8b4a9daa88b19130ac069ba2b8954206a675b6f87f4d20209f933202847bc2a90708af