[PATCH] duplicity restore pexpect as default ssh backend

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[PATCH] duplicity restore pexpect as default ssh backend

trondd-2
If we would rather restore pexpect as the default ssh backend instead of paramiko,
this should do it.

Tim.

Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/duplicity/Makefile,v
retrieving revision 1.35
diff -u -p -r1.35 Makefile
--- Makefile 17 Jan 2016 05:30:31 -0000 1.35
+++ Makefile 8 Feb 2016 23:37:51 -0000
@@ -7,6 +7,7 @@ COMMENT = encrypted backup using rsync a
 
 MODPY_EGG_VERSION = 0.7.06
 DISTNAME = duplicity-${MODPY_EGG_VERSION}
+REVISION = 0
 
 CATEGORIES = sysutils
 
Index: patches/patch-duplicity_backends_ssh_paramiko_backend_py
===================================================================
RCS file: patches/patch-duplicity_backends_ssh_paramiko_backend_py
diff -N patches/patch-duplicity_backends_ssh_paramiko_backend_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-duplicity_backends_ssh_paramiko_backend_py 8 Feb 2016 23:37:51 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- duplicity/backends/ssh_paramiko_backend.py.orig Mon Feb  8 18:16:06 2016
++++ duplicity/backends/ssh_paramiko_backend.py Mon Feb  8 18:17:19 2016
+@@ -375,8 +375,6 @@ Are you sure you want to continue connecting (yes/no)?
+
+         return sshconfig.lookup(host)
+
+-duplicity.backend.register_backend("sftp", SSHParamikoBackend)
+-duplicity.backend.register_backend("scp", SSHParamikoBackend)
+ duplicity.backend.register_backend("paramiko+sftp", SSHParamikoBackend)
+ duplicity.backend.register_backend("paramiko+scp", SSHParamikoBackend)
+-duplicity.backend.uses_netloc.extend(['sftp', 'scp', 'paramiko+sftp', 'paramiko+scp'])
++duplicity.backend.uses_netloc.extend(['paramiko+sftp', 'paramiko+scp'])
Index: patches/patch-duplicity_backends_ssh_pexpect_backend_py
===================================================================
RCS file: patches/patch-duplicity_backends_ssh_pexpect_backend_py
diff -N patches/patch-duplicity_backends_ssh_pexpect_backend_py
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-duplicity_backends_ssh_pexpect_backend_py 8 Feb 2016 23:37:51 -0000
@@ -0,0 +1,13 @@
+$OpenBSD$
+--- duplicity/backends/ssh_pexpect_backend.py.orig Mon Feb  8 18:22:28 2016
++++ duplicity/backends/ssh_pexpect_backend.py Mon Feb  8 18:24:06 2016
+@@ -287,6 +287,8 @@ class SSHPExpectBackend(duplicity.backend.Backend):
+         commandline = ("%s %s %s" % (self.sftp_command, globals.ssh_options, self.host_string))
+         self.run_sftp_command(commandline, commands)
+
++duplicity.backend.register_backend("sftp", SSHPExpectBackend)
++duplicity.backend.register_backend("scp", SSHPExpectBackend)
+ duplicity.backend.register_backend("pexpect+sftp", SSHPExpectBackend)
+ duplicity.backend.register_backend("pexpect+scp", SSHPExpectBackend)
+-duplicity.backend.uses_netloc.extend(['pexpect+sftp', 'pexpect+scp'])
++duplicity.backend.uses_netloc.extend(['sftp', 'scp', 'pexpect+sftp', 'pexpect+scp'])

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] duplicity restore pexpect as default ssh backend

trondd-2
Bump to get this in for 5.9 so users aren't confused by the changed
default and the resulting incorrect manpage.

If no one thinks it should go in for 5.9, I'll wait for unlock to poke again.

Tim.

On Mon, February 8, 2016 6:43 pm, [hidden email] wrote:

> If we would rather restore pexpect as the default ssh backend instead of
> paramiko,
> this should do it.
>
> Tim.
>
> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/sysutils/duplicity/Makefile,v
> retrieving revision 1.35
> diff -u -p -r1.35 Makefile
> --- Makefile 17 Jan 2016 05:30:31 -0000 1.35
> +++ Makefile 8 Feb 2016 23:37:51 -0000
> @@ -7,6 +7,7 @@ COMMENT = encrypted backup using rsync a
>
>  MODPY_EGG_VERSION = 0.7.06
>  DISTNAME = duplicity-${MODPY_EGG_VERSION}
> +REVISION = 0
>
>  CATEGORIES = sysutils
>
> Index: patches/patch-duplicity_backends_ssh_paramiko_backend_py
> ===================================================================
> RCS file: patches/patch-duplicity_backends_ssh_paramiko_backend_py
> diff -N patches/patch-duplicity_backends_ssh_paramiko_backend_py
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-duplicity_backends_ssh_paramiko_backend_py 8 Feb 2016
> 23:37:51 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +--- duplicity/backends/ssh_paramiko_backend.py.orig Mon Feb  8 18:16:06
> 2016
> ++++ duplicity/backends/ssh_paramiko_backend.py Mon Feb  8 18:17:19 2016
> +@@ -375,8 +375,6 @@ Are you sure you want to continue connecting
> (yes/no)?
> +
> +         return sshconfig.lookup(host)
> +
> +-duplicity.backend.register_backend("sftp", SSHParamikoBackend)
> +-duplicity.backend.register_backend("scp", SSHParamikoBackend)
> + duplicity.backend.register_backend("paramiko+sftp", SSHParamikoBackend)
> + duplicity.backend.register_backend("paramiko+scp", SSHParamikoBackend)
> +-duplicity.backend.uses_netloc.extend(['sftp', 'scp', 'paramiko+sftp',
> 'paramiko+scp'])
> ++duplicity.backend.uses_netloc.extend(['paramiko+sftp', 'paramiko+scp'])
> Index: patches/patch-duplicity_backends_ssh_pexpect_backend_py
> ===================================================================
> RCS file: patches/patch-duplicity_backends_ssh_pexpect_backend_py
> diff -N patches/patch-duplicity_backends_ssh_pexpect_backend_py
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-duplicity_backends_ssh_pexpect_backend_py 8 Feb 2016
> 23:37:51 -0000
> @@ -0,0 +1,13 @@
> +$OpenBSD$
> +--- duplicity/backends/ssh_pexpect_backend.py.orig Mon Feb  8 18:22:28
> 2016
> ++++ duplicity/backends/ssh_pexpect_backend.py Mon Feb  8 18:24:06 2016
> +@@ -287,6 +287,8 @@ class SSHPExpectBackend(duplicity.backend.Backend):
> +         commandline = ("%s %s %s" % (self.sftp_command,
> globals.ssh_options, self.host_string))
> +         self.run_sftp_command(commandline, commands)
> +
> ++duplicity.backend.register_backend("sftp", SSHPExpectBackend)
> ++duplicity.backend.register_backend("scp", SSHPExpectBackend)
> + duplicity.backend.register_backend("pexpect+sftp", SSHPExpectBackend)
> + duplicity.backend.register_backend("pexpect+scp", SSHPExpectBackend)
> +-duplicity.backend.uses_netloc.extend(['pexpect+sftp', 'pexpect+scp'])
> ++duplicity.backend.uses_netloc.extend(['sftp', 'scp', 'pexpect+sftp',
> 'pexpect+scp'])
>


Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] duplicity restore pexpect as default ssh backend

viq .
On Sun, 2016-02-14 at 11:14 -0500, trondd wrote:
> Bump to get this in for 5.9 so users aren't confused by the changed
> default and the resulting incorrect manpage.

I'd be for it, but I can't reliably test as I don't use ssh with
duplicity.

> If no one thinks it should go in for 5.9, I'll wait for unlock to
> poke again.
>
> Tim.
>
> On Mon, February 8, 2016 6:43 pm, [hidden email] wrote:
> > If we would rather restore pexpect as the default ssh backend
> > instead of
> > paramiko,
> > this should do it.
> >
> > Tim.
> >
> > Index: Makefile
> > ===================================================================
> > RCS file: /cvs/ports/sysutils/duplicity/Makefile,v
> > retrieving revision 1.35
> > diff -u -p -r1.35 Makefile
> > --- Makefile 17 Jan 2016 05:30:31 -0000 1.35
> > +++ Makefile 8 Feb 2016 23:37:51 -0000
> > @@ -7,6 +7,7 @@ COMMENT = encrypted backup using rsync a
> >
> >  MODPY_EGG_VERSION = 0.7.06
> >  DISTNAME = duplicity-${MODPY_EGG_VERSION}
> > +REVISION = 0
> >
> >  CATEGORIES = sysutils
> >
> > Index: patches/patch-duplicity_backends_ssh_paramiko_backend_py
> > ===================================================================
> > RCS file: patches/patch-duplicity_backends_ssh_paramiko_backend_py
> > diff -N patches/patch-duplicity_backends_ssh_paramiko_backend_py
> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-duplicity_backends_ssh_paramiko_backend_py
> > 8 Feb 2016
> > 23:37:51 -0000
> > @@ -0,0 +1,13 @@
> > +$OpenBSD$
> > +--- duplicity/backends/ssh_paramiko_backend.py.orig Mon
> > Feb  8 18:16:06
> > 2016
> > ++++ duplicity/backends/ssh_paramiko_backend.py Mon Feb  8
> > 18:17:19 2016
> > +@@ -375,8 +375,6 @@ Are you sure you want to continue connecting
> > (yes/no)?
> > +
> > +         return sshconfig.lookup(host)
> > +
> > +-duplicity.backend.register_backend("sftp", SSHParamikoBackend)
> > +-duplicity.backend.register_backend("scp", SSHParamikoBackend)
> > + duplicity.backend.register_backend("paramiko+sftp",
> > SSHParamikoBackend)
> > + duplicity.backend.register_backend("paramiko+scp",
> > SSHParamikoBackend)
> > +-duplicity.backend.uses_netloc.extend(['sftp', 'scp',
> > 'paramiko+sftp',
> > 'paramiko+scp'])
> > ++duplicity.backend.uses_netloc.extend(['paramiko+sftp',
> > 'paramiko+scp'])
> > Index: patches/patch-duplicity_backends_ssh_pexpect_backend_py
> > ===================================================================
> > RCS file: patches/patch-duplicity_backends_ssh_pexpect_backend_py
> > diff -N patches/patch-duplicity_backends_ssh_pexpect_backend_py
> > --- /dev/null 1 Jan 1970 00:00:00 -0000
> > +++ patches/patch-duplicity_backends_ssh_pexpect_backend_py
> > 8 Feb 2016
> > 23:37:51 -0000
> > @@ -0,0 +1,13 @@
> > +$OpenBSD$
> > +--- duplicity/backends/ssh_pexpect_backend.py.orig Mon
> > Feb  8 18:22:28
> > 2016
> > ++++ duplicity/backends/ssh_pexpect_backend.py Mon Feb  8
> > 18:24:06 2016
> > +@@ -287,6 +287,8 @@ class
> > SSHPExpectBackend(duplicity.backend.Backend):
> > +         commandline = ("%s %s %s" % (self.sftp_command,
> > globals.ssh_options, self.host_string))
> > +         self.run_sftp_command(commandline, commands)
> > +
> > ++duplicity.backend.register_backend("sftp", SSHPExpectBackend)
> > ++duplicity.backend.register_backend("scp", SSHPExpectBackend)
> > + duplicity.backend.register_backend("pexpect+sftp",
> > SSHPExpectBackend)
> > + duplicity.backend.register_backend("pexpect+scp",
> > SSHPExpectBackend)
> > +-duplicity.backend.uses_netloc.extend(['pexpect+sftp',
> > 'pexpect+scp'])
> > ++duplicity.backend.uses_netloc.extend(['sftp', 'scp',
> > 'pexpect+sftp',
> > 'pexpect+scp'])
> >
>
>
--
viq <[hidden email]>

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] duplicity restore pexpect as default ssh backend

Jeremie Courreges-Anglas-2
In reply to this post by trondd-2
"trondd" <[hidden email]> writes:

> Bump to get this in for 5.9 so users aren't confused by the changed
> default and the resulting incorrect manpage.
>
> If no one thinks it should go in for 5.9, I'll wait for unlock to poke again.

Thanks for caring about this, Tim.

We should fix the current situation one way of the other.  duplicity
users on OpenBSD should speak up.  Does the default ssh backend,
paramiko, prevent you from easily using duplicity on OpenBSD-current?
Looks like paramiko can now use the default sshd config.

--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply | Threaded
Open this post in threaded view
|

Re: [PATCH] duplicity restore pexpect as default ssh backend

trondd-2
On Mon, February 15, 2016 7:17 am, Jérémie Courrèges-Anglas wrote:
>
> We should fix the current situation one way of the other.  duplicity
> users on OpenBSD should speak up.  Does the default ssh backend,
> paramiko, prevent you from easily using duplicity on OpenBSD-current?
> Looks like paramiko can now use the default sshd config.
>

I don't know what used to be broken with paramiko.  I ran through basic
usage with the paramiko backend.  I can do full and incremental backups,
restore files, get the file list, collection status, and verify
collections.  The only thing it can't do is use ed25519 keys[0].  RSA
works fine.

Tim.

[0] https://github.com/paramiko/paramiko/issues/325