Hello community,
here is the log from the commit of package python-certbot-apache for
openSUSE:Factory checked in at 2020-06-11 15:15:36
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot-apache (Old)
and /work/SRC/openSUSE:Factory/.python-certbot-apache.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-certbot-apache"
Thu Jun 11 15:15:36 2020 rev:20 rq:813508 version:1.5.0
Changes:
--------
---
/work/SRC/openSUSE:Factory/python-certbot-apache/python-certbot-apache.changes
2020-05-14 23:26:42.437231438 +0200
+++
/work/SRC/openSUSE:Factory/.python-certbot-apache.new.3606/python-certbot-apache.changes
2020-06-11 15:15:40.782992352 +0200
@@ -1,0 +2,6 @@
+Thu Jun 11 12:12:06 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to version 1.5.0
+ * Improved error message in apache installer when mod_ssl is not available.
+
+-------------------------------------------------------------------
Old:
----
certbot-apache-1.4.0.tar.gz
New:
----
certbot-apache-1.5.0.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-certbot-apache.spec ++++++
--- /var/tmp/diff_new_pack.Mel6MN/_old 2020-06-11 15:15:41.554994515 +0200
+++ /var/tmp/diff_new_pack.Mel6MN/_new 2020-06-11 15:15:41.554994515 +0200
@@ -18,7 +18,7 @@
%{?!python_module:%define python_module() python-%{**} python3-%{**}}
Name: python-certbot-apache
-Version: 1.4.0
+Version: 1.5.0
Release: 0
Summary: Apache plugin for Certbot
License: Apache-2.0
++++++ certbot-apache-1.4.0.tar.gz -> certbot-apache-1.5.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.4.0/PKG-INFO
new/certbot-apache-1.5.0/PKG-INFO
--- old/certbot-apache-1.4.0/PKG-INFO 2020-05-05 21:37:45.107922000 +0200
+++ new/certbot-apache-1.5.0/PKG-INFO 2020-06-02 19:12:59.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-apache
-Version: 1.4.0
+Version: 1.5.0
Summary: Apache plugin for Certbot
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.4.0/certbot_apache/_internal/configurator.py
new/certbot-apache-1.5.0/certbot_apache/_internal/configurator.py
--- old/certbot-apache-1.4.0/certbot_apache/_internal/configurator.py
2020-05-05 21:37:33.000000000 +0200
+++ new/certbot-apache-1.5.0/certbot_apache/_internal/configurator.py
2020-06-02 19:12:31.000000000 +0200
@@ -595,6 +595,11 @@
# cert_key... can all be parsed appropriately
self.prepare_server_https("443")
+ # If we haven't managed to enable mod_ssl by this point, error out
+ if "ssl_module" not in self.parser.modules:
+ raise errors.MisconfigurationError("Could not find ssl_module; "
+ "not installing certificate.")
+
# Add directives and remove duplicates
self._add_dummy_ssl_directives(vhost.path)
self._clean_vhost(vhost)
@@ -609,21 +614,6 @@
path["chain_path"] = self.parser.find_dir(
"SSLCertificateChainFile", None, vhost.path)
- # Handle errors when certificate/key directives cannot be found
- if not path["cert_path"]:
- logger.warning(
- "Cannot find an SSLCertificateFile directive in %s. "
- "VirtualHost was not modified", vhost.path)
- raise errors.PluginError(
- "Unable to find an SSLCertificateFile directive")
- elif not path["cert_key"]:
- logger.warning(
- "Cannot find an SSLCertificateKeyFile directive for "
- "certificate in %s. VirtualHost was not modified", vhost.path)
- raise errors.PluginError(
- "Unable to find an SSLCertificateKeyFile directive for "
- "certificate")
-
logger.info("Deploying Certificate to VirtualHost %s", vhost.filep)
if self.version < (2, 4, 8) or (chain_path and not fullchain_path):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/certbot-apache-1.4.0/certbot_apache.egg-info/PKG-INFO
new/certbot-apache-1.5.0/certbot_apache.egg-info/PKG-INFO
--- old/certbot-apache-1.4.0/certbot_apache.egg-info/PKG-INFO 2020-05-05
21:37:45.000000000 +0200
+++ new/certbot-apache-1.5.0/certbot_apache.egg-info/PKG-INFO 2020-06-02
19:12:58.000000000 +0200
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: certbot-apache
-Version: 1.4.0
+Version: 1.5.0
Summary: Apache plugin for Certbot
Home-page: https://github.com/letsencrypt/letsencrypt
Author: Certbot Project
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.4.0/setup.py
new/certbot-apache-1.5.0/setup.py
--- old/certbot-apache-1.4.0/setup.py 2020-05-05 21:37:34.000000000 +0200
+++ new/certbot-apache-1.5.0/setup.py 2020-06-02 19:12:35.000000000 +0200
@@ -6,7 +6,7 @@
from setuptools import setup
from setuptools.command.test import test as TestCommand
-version = '1.4.0'
+version = '1.5.0'
# Remember to update local-oldest-requirements.txt when changing the minimum
# acme/certbot version.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/certbot-apache-1.4.0/tests/configurator_test.py
new/certbot-apache-1.5.0/tests/configurator_test.py
--- old/certbot-apache-1.4.0/tests/configurator_test.py 2020-05-05
21:37:33.000000000 +0200
+++ new/certbot-apache-1.5.0/tests/configurator_test.py 2020-06-02
19:12:31.000000000 +0200
@@ -455,41 +455,6 @@
"SSLCertificateChainFile", "two/cert_chain.pem",
self.vh_truth[1].path))
- def test_deploy_cert_invalid_vhost(self):
- """For test cases where the `ApacheConfigurator` class' `_deploy_cert`
- method is called with an invalid vhost parameter. Currently this tests
- that a PluginError is appropriately raised when important directives
- are missing in an SSL module."""
- self.config.parser.modules["ssl_module"] = None
- self.config.parser.modules["mod_ssl.c"] = None
- self.config.parser.modules["socache_shmcb_module"] = None
-
- def side_effect(*args):
- """Mocks case where an SSLCertificateFile directive can be found
- but an SSLCertificateKeyFile directive is missing."""
- if "SSLCertificateFile" in args:
- return ["example/cert.pem"]
- return []
-
- mock_find_dir = mock.MagicMock(return_value=[])
- mock_find_dir.side_effect = side_effect
-
- self.config.parser.find_dir = mock_find_dir
-
- # Get the default 443 vhost
- self.config.assoc["random.demo"] = self.vh_truth[1]
-
- self.assertRaises(
- errors.PluginError, self.config.deploy_cert, "random.demo",
- "example/cert.pem", "example/key.pem", "example/cert_chain.pem")
-
- # Remove side_effect to mock case where both SSLCertificateFile
- # and SSLCertificateKeyFile directives are missing
- self.config.parser.find_dir.side_effect = None
- self.assertRaises(
- errors.PluginError, self.config.deploy_cert, "random.demo",
- "example/cert.pem", "example/key.pem", "example/cert_chain.pem")
-
def test_is_name_vhost(self):
addr = obj.Addr.fromstring("*:80")
self.assertTrue(self.config.is_name_vhost(addr))
@@ -1349,6 +1314,16 @@
self.assertTrue(mock_add.called)
shutil.rmtree(tmp_path)
+ def test_deploy_cert_no_mod_ssl(self):
+ # Create
+ ssl_vhost = self.config.make_vhost_ssl(self.vh_truth[0])
+ self.config.parser.modules["socache_shmcb_module"] = None
+ self.config.prepare_server_https = mock.Mock()
+
+ self.assertRaises(errors.MisconfigurationError,
self.config.deploy_cert,
+ "encryption-example.demo", "example/cert.pem", "example/key.pem",
+ "example/cert_chain.pem", "example/fullchain.pem")
+
@mock.patch("certbot_apache._internal.parser.ApacheParser.parsed_in_original")
def test_choose_vhost_and_servername_addition_parsed(self, mock_parsed):
ret_vh = self.vh_truth[8]