duplicity: 0.7.19 -> 0.8.10

Update, port to Python 3 and clean up.

Co-Authored-By: Jan Tojnar <jtojnar@gmail.com>
Co-Authored-By: Frederik Rietdijk <fridh@fridh.nl>
This commit is contained in:
Frederik Rietdijk
2020-02-10 19:01:17 +01:00
committed by Jan Tojnar
co-authored by Jan Tojnar
parent a21c2fa3ea
commit b5126937b4
4 changed files with 113 additions and 51 deletions
+66 -40
View File
@@ -1,64 +1,90 @@
{ stdenv, fetchpatch, fetchurl, python2Packages, librsync, ncftp, gnupg
{ stdenv
, fetchpatch
, fetchurl
, pythonPackages
, librsync
, ncftp
, gnupg
, gnutar
, par2cmdline
, utillinux
, rsync
, backblaze-b2, makeWrapper }:
, backblaze-b2
, makeWrapper
}:
python2Packages.buildPythonApplication rec {
pythonPackages.buildPythonApplication rec {
pname = "duplicity";
version = "0.7.19";
version = "0.8.10";
src = fetchurl {
url = "https://code.launchpad.net/duplicity/${stdenv.lib.versions.majorMinor version}-series/${version}/+download/${pname}-${version}.tar.gz";
sha256 = "0ag9dknslxlasslwfjhqgcqbkb1mvzzx93ry7lch2lfzcdd91am6";
url = "https://code.launchpad.net/duplicity/${stdenv.lib.versions.majorMinor version}-series/${version}/+download/${pname}-${version}fin1558.tar.gz";
sha256 = "13apmavdc2cx3wxv2ymy97c575hc37xjhpa6b4sds8fkx2vrb0mh";
};
patches = [
./gnutar-in-test.patch
./use-installed-scripts-in-test.patch
# The following patches improve the performance of installCheckPhase:
# Ensure all duplicity output is captured in tests
(fetchpatch {
extraPrefix = "";
sha256 = "07ay3mmnw8p2j3v8yvcpjsx0rf2jqly9ablwjpmry23dz9f0mxsd";
url = "https://bazaar.launchpad.net/~duplicity-team/duplicity/0.8-series/diff/1359.2.1";
})
# Minimize time spent sleeping between backups
(fetchpatch {
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";
patches = [
# We use the tar binary on all platforms.
./gnutar-in-test.patch
# Make test respect TMPDIR env var.
# https://bugs.launchpad.net/duplicity/+bug/1862672
(fetchurl {
url = "https://launchpadlibrarian.net/464404371/0001-Make-LogTest-respect-TMPDIR-env-variable.patch";
hash = "sha256-wdy8mMurLhBS0ZTXmlIGGrIkS2gGBDwTp7TRxTSXBGo=";
})
# 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 [
./linux-disable-timezone-test.patch
];
buildInputs = [ librsync makeWrapper python2Packages.wrapPython ];
propagatedBuildInputs = [ backblaze-b2 ] ++ (with python2Packages; [
boto cffi cryptography ecdsa enum idna pygobject3 fasteners
ipaddress lockfile paramiko pyasn1 pycrypto six pydrive
buildInputs = [
librsync
makeWrapper
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 = [
gnupg # Add 'gpg' to PATH.
gnutar # Add 'tar' to PATH.
librsync # Add 'rdiff' to PATH.
par2cmdline # Add 'par2' to PATH.
gnupg # Add 'gpg' to PATH.
gnutar # Add 'tar' to PATH.
librsync # Add 'rdiff' to PATH.
par2cmdline # Add 'par2' to PATH.
] ++ stdenv.lib.optionals stdenv.isLinux [
utillinux # Add 'setsid' to PATH.
] ++ (with python2Packages; [ lockfile mock pexpect ]);
utillinux # Add 'setsid' to PATH.
] ++ (with pythonPackages; [
lockfile
mock
pexpect
pytest
pytestrunner
]);
postInstall = ''
wrapProgram $out/bin/duplicity \
--prefix PATH : "${stdenv.lib.makeBinPath [ gnupg ncftp rsync ]}"
wrapPythonPrograms
'';
preCheck = ''
@@ -88,7 +114,7 @@ python2Packages.buildPythonApplication rec {
meta = with stdenv.lib; {
description = "Encrypted bandwidth-efficient backup using the rsync algorithm";
homepage = https://www.nongnu.org/duplicity;
homepage = "https://www.nongnu.org/duplicity";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ peti ];
platforms = platforms.unix;