Hello community,

here is the log from the commit of package python-parallax for openSUSE:Factory 
checked in at 2020-05-19 14:49:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-parallax (Old)
 and      /work/SRC/openSUSE:Factory/.python-parallax.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-parallax"

Tue May 19 14:49:48 2020 rev:16 rq:807100 version:1.0.6

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-parallax/python-parallax.changes  
2020-04-01 19:19:40.251567088 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-parallax.new.2738/python-parallax.changes    
    2020-05-19 14:49:51.792253567 +0200
@@ -1,0 +2,6 @@
+Tue May 19 02:32:03 UTC 2020 - XinLiang <xli...@suse.com>
+
+- Add ssh_key option used by -i option of ssh and scp(bsc#1169581)
+  Add patch 0001-Add-ssh_key-option-used-by-i-option-of-ssh-scp.patch 
+
+-------------------------------------------------------------------

New:
----
  0001-Add-ssh_key-option-used-by-i-option-of-ssh-scp.patch

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

Other differences:
------------------
++++++ python-parallax.spec ++++++
--- /var/tmp/diff_new_pack.VC46bD/_old  2020-05-19 14:49:52.620255403 +0200
+++ /var/tmp/diff_new_pack.VC46bD/_new  2020-05-19 14:49:52.620255403 +0200
@@ -25,6 +25,8 @@
 Group:          Development/Languages/Python
 URL:            https://github.com/krig/parallax/
 Source:         
https://files.pythonhosted.org/packages/source/p/parallax/parallax-%{version}.tar.gz
+Patch1:         0001-Add-ssh_key-option-used-by-i-option-of-ssh-scp.patch
+
 BuildRequires:  %{python_module setuptools}
 BuildRequires:  fdupes
 BuildRequires:  python-rpm-macros
@@ -48,6 +50,7 @@
 
 %prep
 %setup -q -n parallax-%{version}
+%patch1 -p1
 
 %build
 %python_build

++++++ 0001-Add-ssh_key-option-used-by-i-option-of-ssh-scp.patch ++++++
>From f5ccee901d346873adbe5d979b5b70d0ba029570 Mon Sep 17 00:00:00 2001
From: liangxin1300 <xli...@suse.com>
Date: Fri, 24 Apr 2020 07:05:13 +0800
Subject: [PATCH] Add ssh_key option used by -i option of ssh/scp

---
 parallax/__init__.py | 21 +++++++++++++--------
 1 file changed, 13 insertions(+), 8 deletions(-)

diff --git a/parallax/__init__.py b/parallax/__init__.py
index fc1a6e7..1008ca2 100644
--- a/parallax/__init__.py
+++ b/parallax/__init__.py
@@ -87,6 +87,7 @@ class Options(object):
     askpass = False              # Ask for a password
     outdir = None                # Write stdout to a file per host in this 
directory
     errdir = None                # Write stderr to a file per host in this 
directory
+    ssh_key = None               # Specific ssh key used by ssh/scp -i option
     ssh_options = []             # Extra options to pass to SSH
     ssh_extra = []               # Extra arguments to pass to SSH
     verbose = False              # Warning and diagnostic messages
@@ -138,19 +139,21 @@ class _CallOutputBuilder(object):
         return ret
 
 
-def _build_call_cmd(host, port, user, cmdline, options, extra):
+def _build_call_cmd(host, port, user, cmdline, opts):
     cmd = ['ssh', host,
            '-o', 'NumberOfPasswordPrompts=1',
            '-o', 'SendEnv=PARALLAX_NODENUM PARALLAX_HOST']
-    if options:
-        for opt in options:
+    if opts.ssh_options:
+        for opt in opts.ssh_options:
             cmd += ['-o', opt]
     if user:
         cmd += ['-l', user]
     if port:
         cmd += ['-p', port]
-    if extra:
-        cmd.extend(extra)
+    if opts.ssh_key:
+        cmd += ['-i', opts.ssh_key]
+    if opts.ssh_extra:
+        cmd.extend(opts.ssh_extra)
     if cmdline:
         cmd.append(cmdline)
     return cmd
@@ -173,9 +176,7 @@ def call(hosts, cmdline, opts=Options()):
                       warn_message=opts.warn_message,
                       callbacks=_CallOutputBuilder())
     for host, port, user in _expand_host_port_user(hosts):
-        cmd = _build_call_cmd(host, port, user, cmdline,
-                              options=opts.ssh_options,
-                              extra=opts.ssh_extra)
+        cmd = _build_call_cmd(host, port, user, cmdline, opts)
         t = Task(host, port, user, cmd,
                  stdin=opts.input_stream,
                  verbose=opts.verbose,
@@ -219,6 +220,8 @@ def _build_copy_cmd(host, port, user, src, dst, opts):
         cmd += ['-P', port]
     if opts.recursive:
         cmd.append('-r')
+    if opts.ssh_key:
+        cmd += ['-i', opts.ssh_key]
     if opts.ssh_extra:
         cmd.extend(opts.ssh_extra)
     cmd.append(src)
@@ -312,6 +315,8 @@ def _build_slurp_cmd(host, port, user, src, dst, opts):
         cmd += ['-P', port]
     if opts.recursive:
         cmd.append('-r')
+    if opts.ssh_key:
+        cmd += ['-i', opts.ssh_key]
     if opts.ssh_extra:
         cmd.extend(opts.ssh_extra)
     if user:
-- 
2.21.1


Reply via email to