public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
* [rpms/duplicity] epel10.3: - own %{python_sitearch}/%{name} and not only %{python_sitearch}
@ 2026-10-09 15:55 Robert Scheck
0 siblings, 0 replies; only message in thread
From: Robert Scheck @ 2026-10-09 15:55 UTC (permalink / raw)
To: git-commits
A new commit has been pushed.
Repo : rpms/duplicity
Branch : epel10.3
Commit : 4957328d6ea22834dc5029eddefc25430237af41
Author : Robert Scheck <robert@fedoraproject.org>
Date : 2006-12-17T14:03:01+00:00
Stats : +131/-27 in 3 file(s)
URL : https://src.fedoraproject.org/rpms/duplicity/c/4957328d6ea22834dc5029eddefc25430237af41?branch=epel10.3
Log:
- own %{python_sitearch}/%{name} and not only %{python_sitearch}
- added two small fixing patches (upstream items #4486, #5183)
- many spec file cleanups and try to silence rpmlint a bit more
---
diff --git a/duplicity-0.4.1-timeout.patch b/duplicity-0.4.1-timeout.patch
new file mode 100644
index 0000000..a2df007
--- /dev/null
+++ b/duplicity-0.4.1-timeout.patch
@@ -0,0 +1,34 @@
+Fixes ftp timeout exception when backing up huge files with small changes - thanks
+to Stefan Schimanski <schimmi@debian.org>.
+
+--- duplicity-0.4.1/src/backends.py 2003-08-10 04:17:21.000000000 +0200
++++ duplicity-0.4.1/src/backends.py.timeout 2005-10-17 10:47:10.000000000 +0200
+@@ -20,6 +20,7 @@
+
+ import os, types, ftplib, tempfile
+ import log, path, dup_temp, file_naming
++import time
+
+ class BackendException(Exception): pass
+ class ParsingException(Exception): pass
+@@ -316,6 +317,7 @@
+
+ class ftpBackend(Backend):
+ """Connect to remote store using File Transfer Protocol"""
++ SLEEP = 10 # time in seconds before we try to reconnect on temporary errors
+ def __init__(self, parsed_url):
+ """Create a new ftp backend object, log in to host"""
+ self.ftp = ftplib.FTP()
+@@ -330,6 +332,12 @@
+ def error_wrap(self, command, *args):
+ """Run self.ftp.command(*args), but raise BackendException on error"""
+ try: return ftplib.FTP.__dict__[command](self.ftp, *args)
++ except ftplib.error_temp, e:
++ log.Log("Temporary error '%s'. Trying to reconnect in %d seconds." %
++ (str(e), self.SLEEP), 3)
++ time.sleep(self.SLEEP)
++ self.__init__(self.parsed_url)
++ self.error_wrap(command, *args)
+ except ftplib.all_errors, e: raise BackendException(e)
+
+ def get_password(self):
diff --git a/duplicity-0.4.2-scp.patch b/duplicity-0.4.2-scp.patch
new file mode 100644
index 0000000..8521c09
--- /dev/null
+++ b/duplicity-0.4.2-scp.patch
@@ -0,0 +1,58 @@
+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.spec b/duplicity.spec
index 2a4c9d8..9e5f868 100644
--- a/duplicity.spec
+++ b/duplicity.spec
@@ -1,40 +1,45 @@
-%define PYTHON_VERSION %(python -c 'import sys; print sys.version[:3],')
-%define NEXT_PYTHON_VERSION %(python -c 'import sys; print "%d.%d" % (sys.version_info[0], sys.version_info[1]+1),')
-
-Version: 0.4.2
-Summary: Untrusted/encrypted backup using rsync algorithm
-Name: duplicity
-Release: 3%{?dist}
-URL: http://www.nongnu.org/duplicity/
-Source: http://savannah.nongnu.org/download/duplicity/%{name}-%{version}.tar.gz
-License: GPL
-Group: Applications/Archiving
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-
-Requires: python >= %{PYTHON_VERSION}, python < %{NEXT_PYTHON_VERSION}, gnupg >= 1.0.6
-BuildRequires: python-devel >= 2.2, librsync-devel >= 0.9.6
+%{!?python_sitearch: %define python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
+
+Summary: Encrypted bandwidth-efficient backup using rsync algorithm
+Name: duplicity
+Version: 0.4.2
+Release: 5%{?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
+Requires: gnupg >= 1.0.6
+%if "%{?fedora}" <= "3"
+Requires: python-abi = %(%{__python} -c "import sys ; print sys.version[:3]")
+%endif
+BuildRequires: python-devel >= 2.2, librsync-devel >= 0.9.6
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
%description
Duplicity incrementally backs up files and directory by encrypting
tar-format volumes with GnuPG and uploading them to a remote (or
-local) file server. In theory many remote backends are possible;
+local) file server. In theory many remote backends are possible;
right now local, ssh/scp, ftp, and rsync backends are written.
+
Because duplicity uses librsync, the incremental archives are space
efficient and only record the parts of files that have changed since
-the last backup. Currently duplicity supports deleted files, full
+the last backup. Currently duplicity supports deleted files, full
unix permissions, directories, symbolic links, fifos, etc., but not
hard links.
%prep
%setup -q
+%patch0 -p1 -b .timeout
+%patch1 -p1 -b .scp
%build
-python setup.py build
+%{__python} setup.py build
%install
-python setup.py install --root $RPM_BUILD_ROOT
-# Produce .pyo files for %ghost directive later
-python -Oc 'from compileall import *; compile_dir("'$RPM_BUILD_ROOT/%{_libdir}/python%{PYTHON_VERSION}/site-packages/duplicity'")'
+rm -rf $RPM_BUILD_ROOT
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
%clean
rm -rf $RPM_BUILD_ROOT
@@ -43,14 +48,21 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root)
%doc CHANGELOG COPYING README
%{_bindir}/rdiffdir
-%{_bindir}/duplicity
-%{_mandir}/man1/duplicity*
+%{_bindir}/%{name}
+%{_mandir}/man1/%{name}*
%{_mandir}/man1/rdiffdir*
-%dir %{_libdir}/python%{PYTHON_VERSION}/site-packages/duplicity
-%{_libdir}/python%{PYTHON_VERSION}/site-packages/duplicity/*.py*
-%{_libdir}/python%{PYTHON_VERSION}/site-packages/duplicity/*.so
+%dir %{python_sitearch}/%{name}
+%{python_sitearch}/%{name}/*.py*
+%{python_sitearch}/%{name}/*.so
%changelog
+* Sun Dec 17 2006 Robert Scheck <robert@fedoraproject.org> 0.4.2-5
+- own %%{python_sitearch}/%%{name} and not only %%{python_sitearch}
+
+* Sat Dec 16 2006 Robert Scheck <robert@fedoraproject.org> 0.4.2-4
+- added two small fixing patches (upstream items #4486, #5183)
+- many spec file cleanups and try to silence rpmlint a bit more
+
* Fri Sep 08 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.4.2-3
- don't ghost pyo files
@@ -58,7 +70,7 @@ rm -rf $RPM_BUILD_ROOT
- Rebuild for FC6
* Tue May 16 2006 Michael J. Knox <michael[AT]knox.net.nz> - 0.4.2-1
-- verion bump
+- version bump
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-10-09 15:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-09 15:55 [rpms/duplicity] epel10.3: - own %{python_sitearch}/%{name} and not only %{python_sitearch} Robert Scheck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox