Hello community,

here is the log from the commit of package python-certbot-nginx for 
openSUSE:Factory checked in at 2020-10-07 14:19:54
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-certbot-nginx (Old)
 and      /work/SRC/openSUSE:Factory/.python-certbot-nginx.new.4249 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-certbot-nginx"

Wed Oct  7 14:19:54 2020 rev:23 rq:839995 version:1.9.0

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/python-certbot-nginx/python-certbot-nginx.changes    
    2020-08-21 19:13:45.464697722 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-certbot-nginx.new.4249/python-certbot-nginx.changes
      2020-10-07 14:20:08.933565011 +0200
@@ -1,0 +2,7 @@
+Wed Oct  7 08:46:57 UTC 2020 - Marketa Calabkova <[email protected]>
+
+- update to version 1.9.0
+  * Reduced CLI logging when reloading nginx, if it is not running.
+  * Fixed server_name case-sensitivity in the nginx plugin.
+
+-------------------------------------------------------------------

Old:
----
  certbot-nginx-1.7.0.tar.gz

New:
----
  certbot-nginx-1.9.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-certbot-nginx.spec ++++++
--- /var/tmp/diff_new_pack.nCmGSV/_old  2020-10-07 14:20:09.477565443 +0200
+++ /var/tmp/diff_new_pack.nCmGSV/_new  2020-10-07 14:20:09.481565447 +0200
@@ -18,7 +18,7 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-certbot-nginx
-Version:        1.7.0
+Version:        1.9.0
 Release:        0
 Summary:        Nginx plugin for Certbot
 License:        Apache-2.0

++++++ certbot-nginx-1.7.0.tar.gz -> certbot-nginx-1.9.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-nginx-1.7.0/PKG-INFO 
new/certbot-nginx-1.9.0/PKG-INFO
--- old/certbot-nginx-1.7.0/PKG-INFO    2020-08-04 20:20:23.109773400 +0200
+++ new/certbot-nginx-1.9.0/PKG-INFO    2020-10-06 20:39:58.712531300 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: certbot-nginx
-Version: 1.7.0
+Version: 1.9.0
 Summary: Nginx plugin for Certbot
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
@@ -17,7 +17,6 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
@@ -27,4 +26,4 @@
 Classifier: Topic :: System :: Networking
 Classifier: Topic :: System :: Systems Administration
 Classifier: Topic :: Utilities
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/certbot-nginx-1.7.0/certbot_nginx/_internal/configurator.py 
new/certbot-nginx-1.9.0/certbot_nginx/_internal/configurator.py
--- old/certbot-nginx-1.7.0/certbot_nginx/_internal/configurator.py     
2020-08-04 20:20:15.000000000 +0200
+++ new/certbot-nginx-1.9.0/certbot_nginx/_internal/configurator.py     
2020-10-06 20:39:49.000000000 +0200
@@ -1175,23 +1175,29 @@
 
     """
     try:
-        proc = subprocess.Popen([nginx_ctl, "-c", nginx_conf, "-s", "reload"],
-                                env=util.env_no_snap_for_external_calls())
-        proc.communicate()
+        reload_output = "" # type: unicode
+        with tempfile.TemporaryFile() as out:
+            proc = subprocess.Popen([nginx_ctl, "-c", nginx_conf, "-s", 
"reload"],
+                                    env=util.env_no_snap_for_external_calls(),
+                                    stdout=out, stderr=out)
+            proc.communicate()
+            out.seek(0)
+            reload_output = out.read().decode("utf-8")
 
         if proc.returncode != 0:
-            # Maybe Nginx isn't running
+            logger.debug("nginx reload failed:\n%s", reload_output)
+            # Maybe Nginx isn't running - try start it
             # Write to temporary files instead of piping because of 
communication issues on Arch
             # https://github.com/certbot/certbot/issues/4324
             with tempfile.TemporaryFile() as out:
-                with tempfile.TemporaryFile() as err:
-                    nginx_proc = subprocess.Popen([nginx_ctl, "-c", 
nginx_conf],
-                        stdout=out, stderr=err, 
env=util.env_no_snap_for_external_calls())
-                    nginx_proc.communicate()
-                    if nginx_proc.returncode != 0:
-                        # Enter recovery routine...
-                        raise errors.MisconfigurationError(
-                            "nginx restart failed:\n%s\n%s" % (out.read(), 
err.read()))
+                nginx_proc = subprocess.Popen([nginx_ctl, "-c", nginx_conf],
+                    stdout=out, stderr=out, 
env=util.env_no_snap_for_external_calls())
+                nginx_proc.communicate()
+                if nginx_proc.returncode != 0:
+                    out.seek(0)
+                    # Enter recovery routine...
+                    raise errors.MisconfigurationError(
+                        "nginx restart failed:\n%s" % 
out.read().decode("utf-8"))
 
     except (OSError, ValueError):
         raise errors.MisconfigurationError("nginx restart failed")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-nginx-1.7.0/certbot_nginx/_internal/obj.py 
new/certbot-nginx-1.9.0/certbot_nginx/_internal/obj.py
--- old/certbot-nginx-1.7.0/certbot_nginx/_internal/obj.py      2020-08-04 
20:20:15.000000000 +0200
+++ new/certbot-nginx-1.9.0/certbot_nginx/_internal/obj.py      2020-10-06 
20:39:49.000000000 +0200
@@ -19,7 +19,7 @@
     80. If no address is specified, listen on all addresses.
 
     .. _documentation:
-       http://nginx.org/en/docs/http/ngx_http_core_module.html#listen
+       https://nginx.org/en/docs/http/ngx_http_core_module.html#listen
 
     .. todo:: Old-style nginx configs define SSL vhosts in a separate
               block instead of using 'ssl' in the listen directive.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/certbot-nginx-1.7.0/certbot_nginx/_internal/parser.py 
new/certbot-nginx-1.9.0/certbot_nginx/_internal/parser.py
--- old/certbot-nginx-1.7.0/certbot_nginx/_internal/parser.py   2020-08-04 
20:20:15.000000000 +0200
+++ new/certbot-nginx-1.9.0/certbot_nginx/_internal/parser.py   2020-10-06 
20:39:49.000000000 +0200
@@ -496,7 +496,8 @@
 
 
 def _exact_match(target_name, name):
-    return name in (target_name, '.' + target_name)
+    target_lower = target_name.lower()
+    return name.lower() in (target_lower, '.' + target_lower)
 
 
 def _wildcard_match(target_name, name, start):
@@ -517,11 +518,11 @@
     if first not in ('*', ''):
         return False
 
-    target_name = '.'.join(parts)
-    name = '.'.join(match_parts)
+    target_name_lower = '.'.join(parts).lower()
+    name_lower = '.'.join(match_parts).lower()
 
     # Ex: www.eff.org matches *.eff.org, eff.org does not match *.eff.org
-    return target_name.endswith('.' + name)
+    return target_name_lower.endswith('.' + name_lower)
 
 
 def _regex_match(target_name, name):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-nginx-1.7.0/certbot_nginx.egg-info/PKG-INFO 
new/certbot-nginx-1.9.0/certbot_nginx.egg-info/PKG-INFO
--- old/certbot-nginx-1.7.0/certbot_nginx.egg-info/PKG-INFO     2020-08-04 
20:20:23.000000000 +0200
+++ new/certbot-nginx-1.9.0/certbot_nginx.egg-info/PKG-INFO     2020-10-06 
20:39:58.000000000 +0200
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: certbot-nginx
-Version: 1.7.0
+Version: 1.9.0
 Summary: Nginx plugin for Certbot
 Home-page: https://github.com/letsencrypt/letsencrypt
 Author: Certbot Project
@@ -17,7 +17,6 @@
 Classifier: Programming Language :: Python :: 2
 Classifier: Programming Language :: Python :: 2.7
 Classifier: Programming Language :: Python :: 3
-Classifier: Programming Language :: Python :: 3.5
 Classifier: Programming Language :: Python :: 3.6
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
@@ -27,4 +26,4 @@
 Classifier: Topic :: System :: Networking
 Classifier: Topic :: System :: Systems Administration
 Classifier: Topic :: Utilities
-Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
+Requires-Python: >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-nginx-1.7.0/setup.py 
new/certbot-nginx-1.9.0/setup.py
--- old/certbot-nginx-1.7.0/setup.py    2020-08-04 20:20:16.000000000 +0200
+++ new/certbot-nginx-1.9.0/setup.py    2020-10-06 20:39:50.000000000 +0200
@@ -4,9 +4,8 @@
 from setuptools import __version__ as setuptools_version
 from setuptools import find_packages
 from setuptools import setup
-from setuptools.command.test import test as TestCommand
 
-version = '1.7.0'
+version = '1.9.0'
 
 # Remember to update local-oldest-requirements.txt when changing the minimum
 # acme/certbot version.
@@ -28,22 +27,6 @@
 elif sys.version_info < (3,3):
     install_requires.append('mock')
 
-
-class PyTest(TestCommand):
-    user_options = []
-
-    def initialize_options(self):
-        TestCommand.initialize_options(self)
-        self.pytest_args = ''
-
-    def run_tests(self):
-        import shlex
-        # import here, cause outside the eggs aren't loaded
-        import pytest
-        errno = pytest.main(shlex.split(self.pytest_args))
-        sys.exit(errno)
-
-
 setup(
     name='certbot-nginx',
     version=version,
@@ -52,7 +35,7 @@
     author="Certbot Project",
     author_email='[email protected]',
     license='Apache License 2.0',
-    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*',
+    python_requires='>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, 
!=3.5.*',
     classifiers=[
         'Development Status :: 5 - Production/Stable',
         'Environment :: Plugins',
@@ -63,7 +46,6 @@
         'Programming Language :: Python :: 2',
         'Programming Language :: Python :: 2.7',
         'Programming Language :: Python :: 3',
-        'Programming Language :: Python :: 3.5',
         'Programming Language :: Python :: 3.6',
         'Programming Language :: Python :: 3.7',
         'Programming Language :: Python :: 3.8',
@@ -83,7 +65,4 @@
             'nginx = certbot_nginx._internal.configurator:NginxConfigurator',
         ],
     },
-    test_suite='certbot_nginx',
-    tests_require=["pytest"],
-    cmdclass={"test": PyTest},
 )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-nginx-1.7.0/tests/configurator_test.py 
new/certbot-nginx-1.9.0/tests/configurator_test.py
--- old/certbot-nginx-1.7.0/tests/configurator_test.py  2020-08-04 
20:20:15.000000000 +0200
+++ new/certbot-nginx-1.9.0/tests/configurator_test.py  2020-10-06 
20:39:49.000000000 +0200
@@ -466,14 +466,18 @@
         mocked.communicate.return_value = ('', '')
         mocked.returncode = 0
         self.config.restart()
+        self.assertEqual(mocked.communicate.call_count, 1)
         mock_time.sleep.assert_called_once_with(0.1234)
 
     @mock.patch("certbot_nginx._internal.configurator.subprocess.Popen")
-    def test_nginx_restart_fail(self, mock_popen):
+    @mock.patch("certbot_nginx._internal.configurator.logger.debug")
+    def test_nginx_restart_fail(self, mock_log_debug, mock_popen):
         mocked = mock_popen()
         mocked.communicate.return_value = ('', '')
         mocked.returncode = 1
         self.assertRaises(errors.MisconfigurationError, self.config.restart)
+        self.assertEqual(mocked.communicate.call_count, 2)
+        mock_log_debug.assert_called_once_with("nginx reload failed:\n%s", "")
 
     @mock.patch("certbot_nginx._internal.configurator.subprocess.Popen")
     def test_no_nginx_start(self, mock_popen):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/certbot-nginx-1.7.0/tests/parser_test.py 
new/certbot-nginx-1.9.0/tests/parser_test.py
--- old/certbot-nginx-1.7.0/tests/parser_test.py        2020-08-04 
20:20:15.000000000 +0200
+++ new/certbot-nginx-1.9.0/tests/parser_test.py        2020-10-06 
20:39:49.000000000 +0200
@@ -340,7 +340,9 @@
                  {'*.www.eff.org', 'www.*'},
                  {'*.org'},
                  set(),
-                 {'example.com'}]
+                 {'example.com'},
+                 {'www.Eff.org'},
+                 {'.efF.org'}]
         winners = [('exact', 'www.eff.org'),
                    (None, None),
                    ('exact', '.www.eff.org'),
@@ -353,7 +355,9 @@
                    ('wildcard_end', 'www.*'),
                    ('wildcard_start', '*.org'),
                    (None, None),
-                   (None, None)]
+                   (None, None),
+                   ('exact', 'www.Eff.org'),
+                   ('wildcard_start', '.efF.org')]
 
         for i, winner in enumerate(winners):
             self.assertEqual(winner,


Reply via email to