Merge pull request #76988 from FRidh/duplicity
duplicity: 0.7.19 -> 0.8.10, use python3
This commit is contained in:
commit
c3a68446a8
@ -1,50 +1,72 @@
|
|||||||
{ stdenv, fetchpatch, fetchurl, python2Packages, librsync, ncftp, gnupg
|
{ stdenv
|
||||||
|
, fetchpatch
|
||||||
|
, fetchurl
|
||||||
|
, pythonPackages
|
||||||
|
, librsync
|
||||||
|
, ncftp
|
||||||
|
, gnupg
|
||||||
, gnutar
|
, gnutar
|
||||||
, par2cmdline
|
, par2cmdline
|
||||||
, utillinux
|
, utillinux
|
||||||
, rsync
|
, rsync
|
||||||
, backblaze-b2, makeWrapper }:
|
, backblaze-b2
|
||||||
|
, makeWrapper
|
||||||
|
}:
|
||||||
|
|
||||||
python2Packages.buildPythonApplication rec {
|
pythonPackages.buildPythonApplication rec {
|
||||||
pname = "duplicity";
|
pname = "duplicity";
|
||||||
version = "0.7.19";
|
version = "0.8.10";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://code.launchpad.net/duplicity/${stdenv.lib.versions.majorMinor version}-series/${version}/+download/${pname}-${version}.tar.gz";
|
url = "https://code.launchpad.net/duplicity/${stdenv.lib.versions.majorMinor version}-series/${version}/+download/${pname}-${version}fin1558.tar.gz";
|
||||||
sha256 = "0ag9dknslxlasslwfjhqgcqbkb1mvzzx93ry7lch2lfzcdd91am6";
|
sha256 = "13apmavdc2cx3wxv2ymy97c575hc37xjhpa6b4sds8fkx2vrb0mh";
|
||||||
};
|
};
|
||||||
patches = [
|
|
||||||
./gnutar-in-test.patch
|
|
||||||
./use-installed-scripts-in-test.patch
|
|
||||||
|
|
||||||
# The following patches improve the performance of installCheckPhase:
|
patches = [
|
||||||
# Ensure all duplicity output is captured in tests
|
# We use the tar binary on all platforms.
|
||||||
(fetchpatch {
|
./gnutar-in-test.patch
|
||||||
extraPrefix = "";
|
|
||||||
sha256 = "07ay3mmnw8p2j3v8yvcpjsx0rf2jqly9ablwjpmry23dz9f0mxsd";
|
# Make test respect TMPDIR env var.
|
||||||
url = "https://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/diff/1359.2.1";
|
# https://bugs.launchpad.net/duplicity/+bug/1862672
|
||||||
})
|
(fetchurl {
|
||||||
# Minimize time spent sleeping between backups
|
url = "https://launchpadlibrarian.net/464404371/0001-Make-LogTest-respect-TMPDIR-env-variable.patch";
|
||||||
(fetchpatch {
|
hash = "sha256-wdy8mMurLhBS0ZTXmlIGGrIkS2gGBDwTp7TRxTSXBGo=";
|
||||||
extraPrefix = "";
|
|
||||||
sha256 = "0v99q6mvikb8sf68gh3s0zg12pq8fijs87fv1qrvdnc8zvs4pmfs";
|
|
||||||
url = "https://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/diff/1359.2.2";
|
|
||||||
})
|
|
||||||
# Remove unnecessary sleeping after running backups in tests
|
|
||||||
(fetchpatch {
|
|
||||||
extraPrefix = "";
|
|
||||||
sha256 = "1bmgp4ilq2gwz2k73fxrqplf866hj57lbyabaqpkvwxhr0ch1jiq";
|
|
||||||
url = "https://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/diff/1359.2.3";
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
# Our Python infrastructure runs test in installCheckPhase so we need
|
||||||
|
# to make the testing code stop assuming it is run from the source directory.
|
||||||
|
./use-installed-scripts-in-test.patch
|
||||||
] ++ stdenv.lib.optionals stdenv.isLinux [
|
] ++ stdenv.lib.optionals stdenv.isLinux [
|
||||||
./linux-disable-timezone-test.patch
|
./linux-disable-timezone-test.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
buildInputs = [ librsync makeWrapper python2Packages.wrapPython ];
|
buildInputs = [
|
||||||
propagatedBuildInputs = [ backblaze-b2 ] ++ (with python2Packages; [
|
librsync
|
||||||
boto cffi cryptography ecdsa enum idna pygobject3 fasteners
|
makeWrapper
|
||||||
ipaddress lockfile paramiko pyasn1 pycrypto six pydrive
|
pythonPackages.wrapPython
|
||||||
|
];
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
backblaze-b2
|
||||||
|
] ++ (with pythonPackages; [
|
||||||
|
boto
|
||||||
|
cffi
|
||||||
|
cryptography
|
||||||
|
ecdsa
|
||||||
|
idna
|
||||||
|
pygobject3
|
||||||
|
fasteners
|
||||||
|
ipaddress
|
||||||
|
lockfile
|
||||||
|
paramiko
|
||||||
|
pyasn1
|
||||||
|
pycrypto
|
||||||
|
pydrive
|
||||||
|
future
|
||||||
|
] ++ stdenv.lib.optionals (!isPy3k) [
|
||||||
|
enum
|
||||||
]);
|
]);
|
||||||
|
|
||||||
checkInputs = [
|
checkInputs = [
|
||||||
gnupg # Add 'gpg' to PATH.
|
gnupg # Add 'gpg' to PATH.
|
||||||
gnutar # Add 'tar' to PATH.
|
gnutar # Add 'tar' to PATH.
|
||||||
@ -52,13 +74,17 @@ python2Packages.buildPythonApplication rec {
|
|||||||
par2cmdline # Add 'par2' to PATH.
|
par2cmdline # Add 'par2' to PATH.
|
||||||
] ++ stdenv.lib.optionals stdenv.isLinux [
|
] ++ stdenv.lib.optionals stdenv.isLinux [
|
||||||
utillinux # Add 'setsid' to PATH.
|
utillinux # Add 'setsid' to PATH.
|
||||||
] ++ (with python2Packages; [ lockfile mock pexpect ]);
|
] ++ (with pythonPackages; [
|
||||||
|
lockfile
|
||||||
|
mock
|
||||||
|
pexpect
|
||||||
|
pytest
|
||||||
|
pytestrunner
|
||||||
|
]);
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
wrapProgram $out/bin/duplicity \
|
wrapProgram $out/bin/duplicity \
|
||||||
--prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"
|
--prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"
|
||||||
|
|
||||||
wrapPythonPrograms
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
preCheck = ''
|
preCheck = ''
|
||||||
@ -88,7 +114,7 @@ python2Packages.buildPythonApplication rec {
|
|||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "Encrypted bandwidth-efficient backup using the rsync algorithm";
|
description = "Encrypted bandwidth-efficient backup using the rsync algorithm";
|
||||||
homepage = https://www.nongnu.org/duplicity;
|
homepage = "https://www.nongnu.org/duplicity";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ peti ];
|
maintainers = with maintainers; [ peti ];
|
||||||
platforms = platforms.unix;
|
platforms = platforms.unix;
|
||||||
|
@ -4,15 +4,15 @@
|
|||||||
https://launchpad.net/bugs/929067
|
https://launchpad.net/bugs/929067
|
||||||
"""
|
"""
|
||||||
|
|
||||||
- if platform.system().startswith('Linux'):
|
- if platform.system().startswith(u'Linux'):
|
||||||
- tarcmd = "tar"
|
- tarcmd = u"tar"
|
||||||
- elif platform.system().startswith('Darwin'):
|
- elif platform.system().startswith(u'Darwin'):
|
||||||
- tarcmd = "gtar"
|
- tarcmd = u"gtar"
|
||||||
- elif platform.system().endswith('BSD'):
|
- elif platform.system().endswith(u'BSD'):
|
||||||
- tarcmd = "gtar"
|
- tarcmd = u"gtar"
|
||||||
- else:
|
- else:
|
||||||
- raise Exception("Platform %s not supported by tar/gtar." % platform.platform())
|
- raise Exception(u"Platform %s not supported by tar/gtar." % platform.platform())
|
||||||
+ tarcmd = "tar"
|
+ tarcmd = u"tar"
|
||||||
|
|
||||||
# Intial normal backup
|
# Intial normal backup
|
||||||
self.backup("full", "testfiles/blocktartest")
|
self.backup("full", "testfiles/blocktartest")
|
||||||
|
@ -4,10 +4,46 @@
|
|||||||
except Exception:
|
except Exception:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
- os.environ['PATH'] = "%s:%s" % (
|
- os.environ[u'PATH'] = u"%s:%s" % (
|
||||||
- os.path.abspath(build_scripts_cmd.build_dir),
|
- os.path.abspath(build_scripts_cmd.build_dir),
|
||||||
- os.environ.get('PATH'))
|
- os.environ.get(u'PATH'))
|
||||||
-
|
-
|
||||||
test.run(self)
|
test.run(self)
|
||||||
|
|
||||||
def run_tests(self):
|
def run_tests(self):
|
||||||
|
--- a/testing/functional/__init__.py
|
||||||
|
+++ b/testing/functional/__init__.py
|
||||||
|
@@ -107,7 +107,7 @@ class FunctionalTestCase(DuplicityTestCase):
|
||||||
|
if basepython is not None:
|
||||||
|
cmd_list.extend([basepython])
|
||||||
|
cmd_list.extend([u"-m", u"coverage", u"run", u"--source=duplicity", u"-p"])
|
||||||
|
- cmd_list.extend([u"../bin/duplicity"])
|
||||||
|
+ cmd_list.extend([u"duplicity"])
|
||||||
|
cmd_list.extend(options)
|
||||||
|
cmd_list.extend([u"-v0"])
|
||||||
|
cmd_list.extend([u"--no-print-statistics"])
|
||||||
|
--- a/testing/functional/test_log.py
|
||||||
|
+++ b/testing/functional/test_log.py
|
||||||
|
@@ -47,9 +47,9 @@ class LogTest(FunctionalTestCase):
|
||||||
|
# Run actual duplicity command (will fail, because no arguments passed)
|
||||||
|
basepython = os.environ.get(u'TOXPYTHON', None)
|
||||||
|
if basepython is not None:
|
||||||
|
- os.system(u"{} ../bin/duplicity --log-file={} >/dev/null 2>&1".format(basepython, self.logfile))
|
||||||
|
+ os.system(u"{} duplicity --log-file={} >/dev/null 2>&1".format(basepython, self.logfile))
|
||||||
|
else:
|
||||||
|
- os.system(u"../bin/duplicity --log-file={} >/dev/null 2>&1".format(self.logfile))
|
||||||
|
+ os.system(u"duplicity --log-file={} >/dev/null 2>&1".format(self.logfile))
|
||||||
|
|
||||||
|
# The format of the file should be:
|
||||||
|
# """ERROR 2
|
||||||
|
--- a/testing/functional/test_rdiffdir.py
|
||||||
|
+++ b/testing/functional/test_rdiffdir.py
|
||||||
|
@@ -38,7 +38,7 @@ class RdiffdirTest(FunctionalTestCase):
|
||||||
|
|
||||||
|
def run_rdiffdir(self, argstring):
|
||||||
|
u"""Run rdiffdir with given arguments"""
|
||||||
|
- self.run_cmd(u"../bin/rdiffdir " + argstring)
|
||||||
|
+ self.run_cmd(u"rdiffdir " + argstring)
|
||||||
|
|
||||||
|
def run_cycle(self, dirname_list):
|
||||||
|
u"""Run diff/patch cycle on directories in dirname_list"""
|
||||||
|
@ -2920,7 +2920,7 @@ in
|
|||||||
duplicati = callPackage ../tools/backup/duplicati { };
|
duplicati = callPackage ../tools/backup/duplicati { };
|
||||||
|
|
||||||
duplicity = callPackage ../tools/backup/duplicity {
|
duplicity = callPackage ../tools/backup/duplicity {
|
||||||
gnupg = gnupg1;
|
pythonPackages = python3Packages;
|
||||||
};
|
};
|
||||||
|
|
||||||
duply = callPackage ../tools/backup/duply { };
|
duply = callPackage ../tools/backup/duply { };
|
||||||
|
Loading…
Reference in New Issue
Block a user