Hello community, here is the log from the commit of package python-parallax for openSUSE:Factory checked in at 2017-08-29 11:45:56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/python-parallax (Old) and /work/SRC/openSUSE:Factory/.python-parallax.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Package is "python-parallax" Tue Aug 29 11:45:56 2017 rev:8 rq:519175 version:1.0.2 Changes: -------- --- /work/SRC/openSUSE:Factory/python-parallax/python-parallax.changes 2016-12-10 18:29:27.411464160 +0100 +++ /work/SRC/openSUSE:Factory/.python-parallax.new/python-parallax.changes 2017-08-29 11:47:19.484886029 +0200 @@ -1,0 +2,6 @@ +Mon Aug 28 12:57:29 UTC 2017 - kgronlund@suse.com + +- Release 1.0.2 +- Switch to new singlespec packaging + +------------------------------------------------------------------- Old: ---- parallax-1.0.1.tar.gz New: ---- parallax-1.0.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ python-parallax.spec ++++++ --- /var/tmp/diff_new_pack.SMm5oJ/_old 2017-08-29 11:47:20.824697179 +0200 +++ /var/tmp/diff_new_pack.SMm5oJ/_new 2017-08-29 11:47:20.832696052 +0200 @@ -1,7 +1,7 @@ # # spec file for package python-parallax # -# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,16 +16,19 @@ # +%{?!python_module:%define python_module() python-%{**} python3-%{**}} + Name: python-parallax -Version: 1.0.1 +Version: 1.0.2 Release: 0 Summary: Execute commands and copy files over SSH to multiple machines at once License: BSD-3-Clause Group: Development/Languages/Python Url: https://github.com/krig/parallax/ -Source: https://pypi.python.org/packages/source/p/parallax/parallax-%{version}.tar.gz -BuildRequires: python-devel -BuildRequires: python-setuptools +Source: https://files.pythonhosted.org/packages/34/a7/039f774fcc9d1aff6bfe21969028781b8c61bd4e4938f1b2bb96387db68b/parallax-%{version}.tar.gz +BuildRequires: %{python_module setuptools} +BuildRequires: fdupes +BuildRequires: python-rpm-macros BuildRoot: %{_tmppath}/%{name}-%{version}-build Requires: openssh BuildArch: noarch @@ -42,36 +45,31 @@ nodes at once using SSH. It also provides commands for sending and receiving files to multiple nodes using SCP. +%python_subpackages + %prep %setup -q -n parallax-%{version} %build -python setup.py build +%python_build %install -python setup.py install --prefix=%{_prefix} --root=%{buildroot} +%python_install +%python_clone -a %{buildroot}%{_bindir}/parallax-askpass -# create a dummy target for /etc/alternatives/parallax-askpass -mkdir -p %{buildroot}%{_sysconfdir}/alternatives -mv %{buildroot}%{_bindir}/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass-%{py_ver} -ln -s -f %{_sysconfdir}/alternatives/parallax-askpass %{buildroot}%{_bindir}/parallax-askpass +%fdupes %{buildroot}%{_prefix} %post -%_sbindir/update-alternatives \ - --install %{_bindir}/parallax-askpass parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} 20 +%python_install_alternative parallax-askpass -%preun -if [ "$1" = 0 ] ; then - %_sbindir/update-alternatives --remove parallax-askpass %{_bindir}/parallax-askpass-%{py_ver} -fi +%postun +%python_uninstall_alternative parallax-askpass -%files +%files %{python_files} %defattr(-,root,root,-) %doc AUTHORS README.md COPYING %{python_sitelib}/parallax %{python_sitelib}/parallax-%{version}*.egg-info -%{_bindir}/parallax-askpass -%{_bindir}/parallax-askpass-%{py_ver} -%ghost %_sysconfdir/alternatives/parallax-askpass +%python_alternative %{_bindir}/parallax-askpass %changelog ++++++ parallax-1.0.1.tar.gz -> parallax-1.0.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/MANIFEST.in new/parallax-1.0.2/MANIFEST.in --- old/parallax-1.0.1/MANIFEST.in 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/MANIFEST.in 2017-08-28 14:50:48.000000000 +0200 @@ -0,0 +1,6 @@ +# Determines which files are included in sdist and bdist. +# MANIFEST.in docs: http://docs.python.org/distutils/commandref.html + +include COPYING +include AUTHORS +include README diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/PKG-INFO new/parallax-1.0.2/PKG-INFO --- old/parallax-1.0.1/PKG-INFO 2015-06-12 17:24:21.000000000 +0200 +++ new/parallax-1.0.2/PKG-INFO 2017-08-28 14:51:12.000000000 +0200 @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: parallax -Version: 1.0.1 +Version: 1.0.2 Summary: Execute commands and copy files over SSH to multiple machines at once Home-page: https://github.com/krig/parallax/ Author: Kristoffer Gronlund diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/README new/parallax-1.0.2/README --- old/parallax-1.0.1/README 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/README 2014-12-25 18:53:06.000000000 +0100 @@ -0,0 +1,76 @@ +# Parallax SSH + +Parallax SSH is a fork of [Parallel SSH][pssh] which focuses less on +command-line tools and more on providing a flexible and programmable +API that can be used by Python application developers to perform SSH +operations across multiple machines. + +## Installation + +Parallax intends to be compatible with Python 2.6 and above (including +Python 3.1 and greater), but is primarily tested with Python 2.7. + +Installation requires setuptools or ez_setup.py. The latter can be +downloaded [here][ez]. + +Once those requirements are fulfilled, installation is as simple as: + + # sudo python setup.py install + +Packaged versions of Parallax SSH for various distributions can be +downloaded from the openSUSE [OBS][obs]. + +To install via PyPI, use `pip`: + + # pip install parallax + +Share and enjoy! + +## Usage + +* `parallax.call(hosts, cmdline, opts)` + + Executes the given command on a set of hosts, collecting the output. + + Returns a dict mapping the hostname of + each host either to a tuple containing a return code, + stdout and stderr, or an `parallax.Error` instance + describing the error. + +* `parallax.copy(hosts, src, dst, opts)` + + Copies files from `src` on the local machine to `dst` on the + remote hosts. + + Returns a dict mapping the hostname of + each host either to a path, or an `parallax.Error` instance + describing the error. + +* `parallax.slurp(hosts, src, dst, opts)` + + Copies files from `src` on the remote hosts to a local folder for + each of the remote hosts. + + Returns a dict mapping the hostname of + each host either to a path, or an `parallax.Error` instance + describing the error. + +## How it works + +By default, Parallax SSH uses at most 32 SSH process in parallel to +SSH to the nodes. By default, it uses a timeout of one minute to SSH +to a node and obtain a result. + +## Environment variables + +* `PARALLAX_HOSTS` +* `PARALLAX_USER` +* `PARALLAX_PAR` +* `PARALLAX_OUTDIR` +* `PARALLAX_VERBOSE` +* `PARALLAX_OPTIONS` + + + [pssh]: https://code.google.com/p/parallel-ssh/ "parallel-ssh" + [ez]: http://peak.telecommunity.com/dist/ez_setup.py "ez_setup.py" + [obs]: https://build.opensuse.org/package/show/devel:languages:python/python-parall... "OBS:python-parallax" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax/__init__.py new/parallax-1.0.2/parallax/__init__.py --- old/parallax-1.0.1/parallax/__init__.py 2015-06-12 17:05:57.000000000 +0200 +++ new/parallax-1.0.2/parallax/__init__.py 2016-12-15 14:05:44.000000000 +0100 @@ -172,8 +172,8 @@ manager.add_task(t) try: return manager.run() - except FatalError: - sys.exit(1) + except FatalError as err: + raise IOError(str(err)) class _CopyOutputBuilder(object): @@ -246,8 +246,8 @@ manager.add_task(t) try: return manager.run() - except FatalError: - sys.exit(1) + except FatalError as err: + raise IOError(str(err)) class _SlurpOutputBuilder(object): @@ -343,5 +343,5 @@ manager.add_task(t) try: return manager.run() - except FatalError: - sys.exit(1) + except FatalError as err: + raise IOError(str(err)) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax/manager.py new/parallax-1.0.2/parallax/manager.py --- old/parallax-1.0.1/parallax/manager.py 2015-02-20 17:00:12.000000000 +0100 +++ new/parallax-1.0.2/parallax/manager.py 2016-12-15 14:03:04.000000000 +0100 @@ -8,6 +8,7 @@ import sys import threading import copy +import fcntl try: import queue @@ -247,6 +248,7 @@ # Setup the wakeup file descriptor to avoid hanging on lost signals. wakeup_readfd, wakeup_writefd = os.pipe() + fcntl.fcntl(wakeup_writefd, fcntl.F_SETFL, os.O_NONBLOCK) self.register_read(wakeup_readfd, self.wakeup_handler) # TODO: remove test when we stop supporting Python <2.5 if hasattr(signal, 'set_wakeup_fd'): diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax/version.py new/parallax-1.0.2/parallax/version.py --- old/parallax-1.0.1/parallax/version.py 2015-06-12 17:19:57.000000000 +0200 +++ new/parallax-1.0.2/parallax/version.py 2017-08-28 14:33:51.000000000 +0200 @@ -1 +1 @@ -VERSION = '1.0.1' +VERSION = '1.0.2' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax.egg-info/PKG-INFO new/parallax-1.0.2/parallax.egg-info/PKG-INFO --- old/parallax-1.0.1/parallax.egg-info/PKG-INFO 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/parallax.egg-info/PKG-INFO 2017-08-28 14:51:12.000000000 +0200 @@ -0,0 +1,29 @@ +Metadata-Version: 1.1 +Name: parallax +Version: 1.0.2 +Summary: Execute commands and copy files over SSH to multiple machines at once +Home-page: https://github.com/krig/parallax/ +Author: Kristoffer Gronlund +Author-email: krig@koru.se +License: BSD +Description: Parallax SSH provides an interface to executing commands on multiple + nodes at once using SSH. It also provides commands for sending and receiving files to + multiple nodes using SCP. +Platform: linux +Classifier: Development Status :: 3 - Alpha +Classifier: Intended Audience :: System Administrators +Classifier: License :: OSI Approved :: BSD License +Classifier: Operating System :: POSIX +Classifier: Programming Language :: Python +Classifier: Programming Language :: Python :: 2 +Classifier: Programming Language :: Python :: 2.6 +Classifier: Programming Language :: Python :: 2.7 +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3.1 +Classifier: Programming Language :: Python :: 3.2 +Classifier: Programming Language :: Python :: 3.3 +Classifier: Programming Language :: Python :: 3.4 +Classifier: Topic :: Software Development :: Libraries :: Python Modules +Classifier: Topic :: System :: Clustering +Classifier: Topic :: System :: Networking +Classifier: Topic :: System :: Systems Administration diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax.egg-info/SOURCES.txt new/parallax-1.0.2/parallax.egg-info/SOURCES.txt --- old/parallax-1.0.1/parallax.egg-info/SOURCES.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/parallax.egg-info/SOURCES.txt 2017-08-28 14:51:12.000000000 +0200 @@ -0,0 +1,21 @@ +AUTHORS +COPYING +MANIFEST.in +README +README.md +setup.py +bin/parallax-askpass +parallax/__init__.py +parallax/askpass_client.py +parallax/askpass_server.py +parallax/callbacks.py +parallax/color.py +parallax/manager.py +parallax/psshutil.py +parallax/task.py +parallax/version.py +parallax.egg-info/PKG-INFO +parallax.egg-info/SOURCES.txt +parallax.egg-info/dependency_links.txt +parallax.egg-info/top_level.txt +test/test_api.py \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax.egg-info/dependency_links.txt new/parallax-1.0.2/parallax.egg-info/dependency_links.txt --- old/parallax-1.0.1/parallax.egg-info/dependency_links.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/parallax.egg-info/dependency_links.txt 2017-08-28 14:51:12.000000000 +0200 @@ -0,0 +1 @@ + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/parallax.egg-info/top_level.txt new/parallax-1.0.2/parallax.egg-info/top_level.txt --- old/parallax-1.0.1/parallax.egg-info/top_level.txt 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/parallax.egg-info/top_level.txt 2017-08-28 14:51:12.000000000 +0200 @@ -0,0 +1 @@ +parallax diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/setup.cfg new/parallax-1.0.2/setup.cfg --- old/parallax-1.0.1/setup.cfg 1970-01-01 01:00:00.000000000 +0100 +++ new/parallax-1.0.2/setup.cfg 2017-08-28 14:51:12.000000000 +0200 @@ -0,0 +1,4 @@ +[egg_info] +tag_build = +tag_date = 0 + diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/setup.py new/parallax-1.0.2/setup.py --- old/parallax-1.0.1/setup.py 2015-06-12 17:19:26.000000000 +0200 +++ new/parallax-1.0.2/setup.py 2017-08-28 14:47:56.000000000 +0200 @@ -1,4 +1,4 @@ -from distutils.core import setup +from setuptools import setup from parallax import version long_description = """Parallax SSH provides an interface to executing commands on multiple diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/parallax-1.0.1/test/test_api.py new/parallax-1.0.2/test/test_api.py --- old/parallax-1.0.1/test/test_api.py 2015-02-20 17:00:12.000000000 +0100 +++ new/parallax-1.0.2/test/test_api.py 2016-12-15 14:03:04.000000000 +0100 @@ -11,7 +11,7 @@ basedir, bin = os.path.split(os.path.dirname(os.path.abspath(sys.argv[0]))) sys.path.insert(0, "%s" % basedir) -print basedir +print(basedir) import parallax as para @@ -28,7 +28,7 @@ def testSimpleCall(self): opts = para.Options() opts.default_user = g_user - for host, result in para.call(g_hosts, "ls -l /", opts).iteritems(): + for host, result in para.call(g_hosts, "ls -l /", opts).items(): if isinstance(result, para.Error): raise result rc, out, err = result @@ -38,17 +38,17 @@ def testUptime(self): opts = para.Options() opts.default_user = g_user - for host, result in para.call(g_hosts, "uptime", opts).iteritems(): + for host, result in para.call(g_hosts, "uptime", opts).items(): if isinstance(result, para.Error): raise result rc, out, err = result self.assertEqual(rc, 0) - self.assert_(out.find("load average") != -1) + self.assert_(out.decode("utf8").find("load average") != -1) def testFailingCall(self): opts = para.Options() opts.default_user = g_user - for host, result in para.call(g_hosts, "touch /foofoo/barbar/jfikjfdj", opts).iteritems(): + for host, result in para.call(g_hosts, "touch /foofoo/barbar/jfikjfdj", opts).items(): self.assert_(isinstance(result, para.Error)) self.assert_(str(result).find('with error code') != -1) @@ -65,14 +65,14 @@ opts.default_user = g_user opts.localdir = self.tmpDir by_host = para.copy(g_hosts, "/etc/hosts", "/tmp/para.test", opts) - for host, result in by_host.iteritems(): + for host, result in by_host.items(): if isinstance(result, para.Error): raise result rc, _, _ = result self.assertEqual(rc, 0) by_host = para.slurp(g_hosts, "/tmp/para.test", "para.test", opts) - for host, result in by_host.iteritems(): + for host, result in by_host.items(): if isinstance(result, para.Error): raise result rc, _, _, path = result @@ -83,4 +83,6 @@ suite = unittest.TestSuite() suite.addTest(unittest.makeSuite(CallTest, "test")) suite.addTest(unittest.makeSuite(CopySlurpTest, "test")) - unittest.TextTestRunner().run(suite) + result = unittest.TextTestRunner().run(suite) + if not result.wasSuccessful(): + sys.exit(1)