Hello community,

here is the log from the commit of package python-pifpaf for openSUSE:Leap:15.2 
checked in at 2020-03-27 16:44:07
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Leap:15.2/python-pifpaf (Old)
 and      /work/SRC/openSUSE:Leap:15.2/.python-pifpaf.new.3160 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pifpaf"

Fri Mar 27 16:44:07 2020 rev:20 rq:788283 version:2.4.0

Changes:
--------
--- /work/SRC/openSUSE:Leap:15.2/python-pifpaf/python-pifpaf.changes    
2020-03-09 18:10:23.281112494 +0100
+++ /work/SRC/openSUSE:Leap:15.2/.python-pifpaf.new.3160/python-pifpaf.changes  
2020-03-27 16:46:22.163871468 +0100
@@ -1,0 +2,8 @@
+Tue Mar 24 11:57:09 UTC 2020 - [email protected]
+
+- version update to 2.4.0
+  * Ensure everything is terminated before exiting
+  * qdrouterd: fix connector host address
+  * new kafka URL
+
+-------------------------------------------------------------------

Old:
----
  pifpaf-2.2.2.tar.gz

New:
----
  pifpaf-2.4.0.tar.gz

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

Other differences:
------------------
++++++ python-pifpaf.spec ++++++
--- /var/tmp/diff_new_pack.D7zIYV/_old  2020-03-27 16:46:22.703871786 +0100
+++ /var/tmp/diff_new_pack.D7zIYV/_new  2020-03-27 16:46:22.707871788 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pifpaf
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -18,12 +18,12 @@
 
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 Name:           python-pifpaf
-Version:        2.2.2
+Version:        2.4.0
 Release:        0
 Summary:        Suite of tools and fixtures to manage daemons for testing
 License:        Apache-2.0
 Group:          Development/Languages/Python
-Url:            https://github.com/jd/pifpaf
+URL:            https://github.com/jd/pifpaf
 Source:         
https://pypi.io/packages/source/p/pifpaf/pifpaf-%{version}.tar.gz
 BuildRequires:  %{python_module pbr}
 BuildRequires:  fdupes
@@ -71,6 +71,9 @@
 %postun
 %python_uninstall_alternative pifpaf
 
+%check
+# rather integration tests
+
 %files %{python_files}
 %license LICENSE
 %doc ChangeLog README.rst

++++++ pifpaf-2.2.2.tar.gz -> pifpaf-2.4.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/.travis.yml new/pifpaf-2.4.0/.travis.yml
--- old/pifpaf-2.2.2/.travis.yml        2019-01-07 16:58:34.000000000 +0100
+++ new/pifpaf-2.4.0/.travis.yml        2020-01-09 11:07:41.000000000 +0100
@@ -22,7 +22,7 @@
   - sudo dpkg -i influxdb_0.13.0_amd64.deb
   # zkEnv.sh can't be overriden with the deb version of zookeeper, this 
workaround that
   - sudo chmod 777 /var/log/zookeeper
-  - wget http://www.apache.org/dist/kafka/1.0.2/kafka_2.12-1.0.2.tgz -O 
/opt/kafka.tar.gz
+  - wget https://archive.apache.org/dist/kafka/1.0.2/kafka_2.12-1.0.2.tgz -O 
/opt/kafka.tar.gz
   - tar -xzf /opt/kafka.tar.gz -C /opt
   - ln -s /opt/kafka_2.12-1.0.2 /opt/kafka
 install:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/AUTHORS new/pifpaf-2.4.0/AUTHORS
--- old/pifpaf-2.2.2/AUTHORS    2019-01-07 17:06:04.000000000 +0100
+++ new/pifpaf-2.4.0/AUTHORS    2020-01-09 11:14:43.000000000 +0100
@@ -1,6 +1,8 @@
 Andy Smith <[email protected]>
 David Douard <[email protected]>
 Julien Danjou <[email protected]>
+Kenneth Giusti <[email protected]>
+Matt Wheeler <[email protected]>
 Mehdi Abaakouk <[email protected]>
 ajssmith <[email protected]>
 gord chung <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/ChangeLog new/pifpaf-2.4.0/ChangeLog
--- old/pifpaf-2.2.2/ChangeLog  2019-01-07 17:06:04.000000000 +0100
+++ new/pifpaf-2.4.0/ChangeLog  2020-01-09 11:14:43.000000000 +0100
@@ -1,6 +1,17 @@
 CHANGES
 =======
 
+2.4.0
+-----
+
+* Ensure everything is terminated before exiting
+
+2.3.0
+-----
+
+* qdrouterd: fix connector host address
+* new kafka URL
+
 2.2.2
 -----
 
@@ -151,10 +162,3 @@
 * Handle terminate lookup error
 * tests: call setUp to init cleanups
 * postgresql: do not call \_exec in \_\_init\_\_
-* Install mock for tests
-* Remove not used oslotest dependency
-
-1.10.1
-------
-
-* Fix process cleanup
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/PKG-INFO new/pifpaf-2.4.0/PKG-INFO
--- old/pifpaf-2.2.2/PKG-INFO   2019-01-07 17:06:04.000000000 +0100
+++ new/pifpaf-2.4.0/PKG-INFO   2020-01-09 11:14:44.000000000 +0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pifpaf
-Version: 2.2.2
+Version: 2.4.0
 Summary: Suite of tools and fixtures to manage daemons for testing
 Home-page: https://github.com/jd/pifpaf
 Author: Julien Danjou
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/pifpaf/__main__.py 
new/pifpaf-2.4.0/pifpaf/__main__.py
--- old/pifpaf-2.2.2/pifpaf/__main__.py 2019-01-07 16:58:34.000000000 +0100
+++ new/pifpaf-2.4.0/pifpaf/__main__.py 2020-01-09 11:07:41.000000000 +0100
@@ -17,7 +17,6 @@
 import operator
 import os
 import signal
-import subprocess
 import sys
 import traceback
 
@@ -31,8 +30,11 @@
 
 import pkg_resources
 
+import psutil
+
 import six
 
+from pifpaf import util
 
 LOG = daiquiri.getLogger("pifpaf")
 
@@ -173,22 +175,55 @@
 
         if command:
             try:
-                with driver:
-                    putenv("PID", str(os.getpid()))
-                    putenv("DAEMON", daemon)
-                    url = os.getenv(driver.env_prefix + "_URL")
-                    putenv("%s_URL" % daemon.upper(), url)
-                    os.putenv(global_urls_variable,
-                              expand_urls_var(url))
-                    try:
-                        c = subprocess.Popen(command)
-                    except Exception:
-                        raise RuntimeError("Unable to start command: %s"
-                                           % " ".join(command))
-                    return c.wait()
+                driver.setUp()
             except fixtures.MultipleExceptions as e:
                 _format_multiple_exceptions(e, debug)
                 sys.exit(1)
+            except Exception:
+                LOG.error("Unable to start %s, "
+                          "use --debug for more information",
+                          daemon, exc_info=True)
+                sys.exit(1)
+
+            putenv("PID", str(os.getpid()))
+            putenv("DAEMON", daemon)
+            url = os.getenv(driver.env_prefix + "_URL")
+            putenv("%s_URL" % daemon.upper(), url)
+            os.putenv(global_urls_variable,
+                      expand_urls_var(url))
+
+            try:
+                c = psutil.Popen(command, preexec_fn=os.setsid)
+            except Exception:
+                driver.cleanUp()
+                raise RuntimeError("Unable to start command: %s"
+                                   % " ".join(command))
+            LOG.error(
+                "Command `%s` (pid %s) is ready:",
+                " ".join(command), c.pid
+            )
+
+            def _cleanup(signum=None, frame=None, ret=0):
+                signal.signal(signal.SIGTERM, signal.SIG_IGN)
+                signal.signal(signal.SIGHUP, signal.SIG_IGN)
+                signal.signal(signal.SIGINT, signal.SIG_IGN)
+                try:
+                    driver.cleanUp()
+                except Exception:
+                    LOG.error("Unexpected cleanUp error", exc_info=True)
+                util.process_cleaner(c)
+                sys.exit(1 if signum == signal.SIGINT else ret)
+
+            signal.signal(signal.SIGTERM, _cleanup)
+            signal.signal(signal.SIGHUP, _cleanup)
+            signal.signal(signal.SIGINT, _cleanup)
+            signal.signal(signal.SIGPIPE, signal.SIG_IGN)
+
+            try:
+                ret = c.wait()
+            except KeyboardInterrupt:
+                ret = 1
+            _cleanup(ret=ret)
         else:
             try:
                 driver.setUp()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/pifpaf/drivers/__init__.py 
new/pifpaf-2.4.0/pifpaf/drivers/__init__.py
--- old/pifpaf-2.2.2/pifpaf/drivers/__init__.py 2019-01-07 16:58:34.000000000 
+0100
+++ new/pifpaf-2.4.0/pifpaf/drivers/__init__.py 2020-01-09 11:07:41.000000000 
+0100
@@ -12,7 +12,6 @@
 # limitations under the License.
 
 import contextlib
-import errno
 import logging
 import os
 import re
@@ -32,6 +31,9 @@
 
 import six
 
+from pifpaf import util
+
+
 try:
     import xattr
 except ImportError:
@@ -99,55 +101,10 @@
             raise RuntimeError("TMPDIR must support xattr for %s" %
                                self.__class__.__name__)
 
-    @staticmethod
-    def _get_procs_of_pgid(wanted_pgid):
-        procs = []
-        for p in psutil.process_iter():
-            try:
-                pgid = os.getpgid(p.pid)
-            except OSError as e:
-                # ESRCH is returned if process just died in the meantime
-                if e.errno != errno.ESRCH:
-                    raise
-                continue
-            if pgid == wanted_pgid:
-                procs.append(p)
-        return procs
-
     def _kill(self, parent):
-        do_sigkill = False
         log_thread = getattr(parent, "_log_thread", None)
-        # NOTE(sileht): Add processes from process tree and process group
-        # Relying on process tree only will not work in case of
-        # parent dying prematuraly and double fork
-        # Relying on process group only will not work in case of
-        # subprocess calling again setsid()
-        procs = set(self._get_procs_of_pgid(parent.pid))
-        try:
-            procs |= set(parent.children(recursive=True))
-            procs.add(parent)
-            parent.terminate()
-        except psutil.NoSuchProcess:
-            LOG.warning("`%s` is already gone, sending SIGKILL to its process "
-                        "group", parent)
-            do_sigkill = True
-        else:
-            # Waiting for all processes to stop
-            gone, alive = psutil.wait_procs(procs, timeout=10)
-            if alive:
-                do_sigkill = True
-                LOG.warning("`%s` didn't terminate cleanly after 10 seconds, "
-                            "sending SIGKILL to its process group", parent)
-
-        if do_sigkill and procs:
-            for p in procs:
-                try:
-                    p.kill()
-                except psutil.NoSuchProcess:
-                    pass
-            gone, alive = psutil.wait_procs(procs, timeout=10)
-            if alive:
-                LOG.warning("`%s` survive SIGKILL", alive)
+
+        util.process_cleaner(parent)
 
         if log_thread:
             # Parent process have been killed
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/pifpaf-2.2.2/pifpaf/drivers/templates/qdrouterd/broker_om.conf.inc 
new/pifpaf-2.4.0/pifpaf/drivers/templates/qdrouterd/broker_om.conf.inc
--- old/pifpaf-2.2.2/pifpaf/drivers/templates/qdrouterd/broker_om.conf.inc      
2019-01-07 16:58:34.000000000 +0100
+++ new/pifpaf-2.4.0/pifpaf/drivers/templates/qdrouterd/broker_om.conf.inc      
2020-01-09 11:07:41.000000000 +0100
@@ -1,7 +1,7 @@
 connector {
     name: broker
     role: route-container
-    host: 0.0.0.0
+    host: 127.0.0.1
     port: {{ ARTEMIS_PORT }}
     sasl-mechanisms: ANONYMOUS
     linkCapacity: 1000
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/pifpaf/util.py 
new/pifpaf-2.4.0/pifpaf/util.py
--- old/pifpaf-2.2.2/pifpaf/util.py     1970-01-01 01:00:00.000000000 +0100
+++ new/pifpaf-2.4.0/pifpaf/util.py     2020-01-09 11:07:41.000000000 +0100
@@ -0,0 +1,78 @@
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+# implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import errno
+import logging
+import os
+
+import psutil
+
+LOG = logging.getLogger(__name__)
+
+
+def _get_procs_of_pgid(wanted_pgid):
+    procs = []
+    for p in psutil.process_iter():
+        try:
+            pgid = os.getpgid(p.pid)
+        except OSError as e:
+            # ESRCH is returned if process just died in the meantime
+            if e.errno != errno.ESRCH:
+                raise
+            continue
+        if pgid == wanted_pgid:
+            procs.append(p)
+    return procs
+
+
+def process_cleaner(parent):
+    do_sigkill = False
+    # NOTE(sileht): Add processes from process tree and process group
+    # Relying on process tree only will not work in case of
+    # parent dying prematuraly and double fork
+    # Relying on process group only will not work in case of
+    # subprocess calling again setsid()
+    procs = set(_get_procs_of_pgid(parent.pid))
+    try:
+        LOG.debug("Terminating %s (%s)",
+                  " ".join(parent.cmdline()), parent.pid)
+        procs |= set(parent.children(recursive=True))
+        procs.add(parent)
+        parent.terminate()
+    except psutil.NoSuchProcess:
+        LOG.warning("`%s` is already gone, sending SIGKILL to its process "
+                    "group", parent)
+        do_sigkill = True
+    else:
+        # Waiting for all processes to stop
+        for p in procs:
+            try:
+                LOG.debug("Waiting %s (%s)", " ".join(p.cmdline()), p.pid)
+            except psutil.NoSuchProcess:
+                pass
+        gone, alive = psutil.wait_procs(procs, timeout=10)
+        if alive:
+            do_sigkill = True
+            LOG.warning("`%s` didn't terminate cleanly after 10 seconds, "
+                        "sending SIGKILL to its process group", parent)
+
+    if do_sigkill and procs:
+        for p in procs:
+            try:
+                LOG.debug("Killing %s (%s)", " ".join(p.cmdline()), p.pid)
+                p.kill()
+            except psutil.NoSuchProcess:
+                pass
+        gone, alive = psutil.wait_procs(procs, timeout=10)
+        if alive:
+            LOG.warning("`%s` survive SIGKILL", alive)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/pifpaf.egg-info/PKG-INFO 
new/pifpaf-2.4.0/pifpaf.egg-info/PKG-INFO
--- old/pifpaf-2.2.2/pifpaf.egg-info/PKG-INFO   2019-01-07 17:06:04.000000000 
+0100
+++ new/pifpaf-2.4.0/pifpaf.egg-info/PKG-INFO   2020-01-09 11:14:43.000000000 
+0100
@@ -1,6 +1,6 @@
 Metadata-Version: 2.1
 Name: pifpaf
-Version: 2.2.2
+Version: 2.4.0
 Summary: Suite of tools and fixtures to manage daemons for testing
 Home-page: https://github.com/jd/pifpaf
 Author: Julien Danjou
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/pifpaf.egg-info/SOURCES.txt 
new/pifpaf-2.4.0/pifpaf.egg-info/SOURCES.txt
--- old/pifpaf-2.2.2/pifpaf.egg-info/SOURCES.txt        2019-01-07 
17:06:04.000000000 +0100
+++ new/pifpaf-2.4.0/pifpaf.egg-info/SOURCES.txt        2020-01-09 
11:14:44.000000000 +0100
@@ -12,6 +12,7 @@
 tox.ini
 pifpaf/__init__.py
 pifpaf/__main__.py
+pifpaf/util.py
 pifpaf.egg-info/PKG-INFO
 pifpaf.egg-info/SOURCES.txt
 pifpaf.egg-info/dependency_links.txt
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pifpaf-2.2.2/pifpaf.egg-info/pbr.json 
new/pifpaf-2.4.0/pifpaf.egg-info/pbr.json
--- old/pifpaf-2.2.2/pifpaf.egg-info/pbr.json   2019-01-07 17:06:04.000000000 
+0100
+++ new/pifpaf-2.4.0/pifpaf.egg-info/pbr.json   2020-01-09 11:14:43.000000000 
+0100
@@ -1 +1 @@
-{"git_version": "19420b3", "is_release": true}
\ No newline at end of file
+{"git_version": "90a9cc2", "is_release": true}
\ No newline at end of file


Reply via email to