public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Robert Scheck <robert@fedoraproject.org>
To: git-commits@fedoraproject.org
Subject: [rpms/duplicity] epel10: fix broken sftp support by adding --sftp-command (#220316)
Date: Fri, 09 Oct 2026 15:23:22 GMT [thread overview]
Message-ID: <179155940227.1.17864058431980567056.rpms-duplicity-6fa5f53f5558@fedoraproject.org> (raw)
A new commit has been pushed.
Repo : rpms/duplicity
Branch : epel10
Commit : 6fa5f53f55582b24bb852526218f43558cbe07b2
Author : Robert Scheck <robert@fedoraproject.org>
Date : 2006-12-20T13:44:43+00:00
Stats : +43/-61 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/duplicity/c/6fa5f53f55582b24bb852526218f43558cbe07b2?branch=epel10
Log:
fix broken sftp support by adding --sftp-command (#220316)
---
diff --git a/duplicity-0.4.2-scp.patch b/duplicity-0.4.2-scp.patch
deleted file mode 100644
index 8521c09..0000000
--- a/duplicity-0.4.2-scp.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-Adds support for port numbers in a SCP url like: scp://user@host:port - thanks to
-Christian Schneider <mail@christian-schneider.net>.
-
---- duplicity-0.4.2/src/backends.py 2006-05-12 19:31:59.000000000 +0200
-+++ duplicity-0.4.2/src/backends.py.scp 2006-05-12 19:42:37.000000000 +0200
-@@ -264,23 +264,25 @@
- """This backend copies files using scp. List not supported"""
- def __init__(self, parsed_url):
- """scpBackend initializer"""
-- self.host_string = parsed_url.server # of form user@hostname:port
-+ self.host_string = parsed_url.host # of form user@hostname:port
- self.remote_dir = parsed_url.path # can be empty string
-+ if parsed_url.port: self.port_string = parsed_url.port
-+ else: self.port_string = 22
- if self.remote_dir: self.remote_prefix = self.remote_dir + "/"
- else: self.remote_prefix = ""
-
- def put(self, source_path, remote_filename = None):
- """Use scp to copy source_dir/filename to remote computer"""
- if not remote_filename: remote_filename = source_path.get_filename()
-- commandline = "%s %s %s:%s%s" % \
-- (scp_command, source_path.name, self.host_string,
-+ commandline = "%s -P %s %s %s:%s%s" % \
-+ (scp_command, self.port_string, source_path.name, self.host_string,
- self.remote_prefix, remote_filename)
- self.run_command(commandline)
-
- def get(self, remote_filename, local_path):
- """Use scp to get a remote file"""
-- commandline = "%s %s:%s%s %s" % \
-- (scp_command, self.host_string, self.remote_prefix,
-+ commandline = "%s -P %s %s:%s%s %s" % \
-+ (scp_command, self.port_string, self.host_string, self.remote_prefix,
- remote_filename, local_path.name)
- self.run_command(commandline)
- local_path.setdata()
-@@ -295,8 +297,8 @@
- be distinguished from the file boundaries.
-
- """
-- commandline = ("echo -e 'cd %s\nls -1' | %s -b - %s" %
-- (self.remote_dir, sftp_command, self.host_string))
-+ commandline = ("echo -e 'cd %s\nls -1' | %s -p %s -b - %s" %
-+ (self.remote_dir, sftp_command, self.port_string, self.host_string))
- l = self.popen(commandline).split('\n')[2:] # omit sftp prompts
- return filter(lambda x: x, l)
-
-@@ -305,8 +307,8 @@
- assert len(filename_list) > 0
- pathlist = map(lambda fn: self.remote_prefix + fn, filename_list)
- del_prefix = "echo 'rm "
-- del_postfix = ("' | %s -b - %s 1>/dev/null" %
-- (sftp_command, self.host_string))
-+ del_postfix = ("' | %s -p %s -b - %s 1>/dev/null" %
-+ (sftp_command, self.port_string, self.host_string))
- for fn in filename_list:
- commandline = del_prefix + self.remote_prefix + fn + del_postfix
- self.run_command(commandline)
diff --git a/duplicity-0.4.2-sftp.patch b/duplicity-0.4.2-sftp.patch
new file mode 100644
index 0000000..afe4858
--- /dev/null
+++ b/duplicity-0.4.2-sftp.patch
@@ -0,0 +1,37 @@
+Adds support for --sftp-command option - thanks to intrigeri <intrigeri@boum.org>.
+
+--- duplicity-0.4.2/src/commandline.py 2006-02-03 04:44:31.000000000 +0100
++++ duplicity-0.4.2/src/commandline.py.sftp 2006-12-20 14:15:38.000000000 +0100
+@@ -50,7 +50,7 @@
+ "list-current-files", "no-encryption",
+ "no-print-statistics", "null-separator",
+ "remove-older-than=", "restore-dir=", "restore-time=",
+- "scp-command=", "short-filenames", "sign-key=",
++ "scp-command=", "sftp-command=", "short-filenames", "sign-key=",
+ "ssh-command=", "verbosity=", "verify", "version"])
+ except getopt.error, e:
+ command_line_error("%s" % (str(e),))
+@@ -95,6 +95,7 @@
+ elif opt == "-t" or opt == "--restore-time":
+ globals.restore_time = dup_time.genstrtotime(arg)
+ elif opt == "--scp-command": backends.scp_command = arg
++ elif opt == "--sftp-command": backends.sftp_command = arg
+ elif opt == "--short-filenames": globals.short_filenames = 1
+ elif opt == "--sign-key": set_sign_key(arg)
+ elif opt == "--ssh-command": backends.ssh_command = arg
+--- duplicity-0.4.2/duplicity.1 2006-02-03 04:44:31.000000000 +0100
++++ duplicity-0.4.2/duplicity.1.sftp 2006-12-20 14:24:58.000000000 +0100
+@@ -271,6 +271,13 @@
+ give extra arguments to scp, for instance "--scp-command \'scp -i
+ foo\'". The default is "scp".
+ .TP
++.BI "--sftp-command " command
++This option only matters when using the ssh/scp backend. There
++.I command
++will be used instead of sftp for listing and deleting files. The
++default is "sftp". For more information see
++.BR --scp-command .
++.TP
+ .BI "--sign-key " key
+ This option can be used when backing up or restoring. When backing
+ up, all backup files will be signed with keyid
diff --git a/duplicity.spec b/duplicity.spec
index 9e5f868..b281a9e 100644
--- a/duplicity.spec
+++ b/duplicity.spec
@@ -3,13 +3,13 @@
Summary: Encrypted bandwidth-efficient backup using rsync algorithm
Name: duplicity
Version: 0.4.2
-Release: 5%{?dist}
+Release: 6%{?dist}
License: GPL
Group: Applications/Archiving
URL: http://www.nongnu.org/duplicity/
Source: http://savannah.nongnu.org/download/%{name}/%{name}-%{version}.tar.gz
Patch0: duplicity-0.4.1-timeout.patch
-Patch1: duplicity-0.4.2-scp.patch
+Patch1: duplicity-0.4.2-sftp.patch
Requires: gnupg >= 1.0.6
%if "%{?fedora}" <= "3"
Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
@@ -32,7 +32,7 @@ hard links.
%prep
%setup -q
%patch0 -p1 -b .timeout
-%patch1 -p1 -b .scp
+%patch1 -p1 -b .sftp
%build
%{__python} setup.py build
@@ -56,6 +56,9 @@ rm -rf $RPM_BUILD_ROOT
%{python_sitearch}/%{name}/*.so
%changelog
+* Wed Dec 20 2006 Robert Scheck <robert@fedoraproject.org> 0.4.2-6
+- fix broken sftp support by adding --sftp-command (#220316)
+
* Sun Dec 17 2006 Robert Scheck <robert@fedoraproject.org> 0.4.2-5
- own %%{python_sitearch}/%%{name} and not only %%{python_sitearch}
reply other threads:[~2026-10-09 15:23 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179155940227.1.17864058431980567056.rpms-duplicity-6fa5f53f5558@fedoraproject.org \
--to=robert@fedoraproject.org \
--cc=git-commits@fedoraproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox