From 335bc6833fc75f6cbbc5f15c0d3bd9d0e1b5b170 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Sun, 28 Sep 2014 15:04:34 -0500 Subject: gnu: duplicity: Fix and disable some tests. * gnu/packages/patches/duplicity-piped-password.patch: New patch. * gnu/packages/patches/duplicity-test_selection-tmp.patch: New patch. * gnu-system.am (dist_patch_DATA): Add them. * gnu/packages/backup.scm (duplicity)[source]: Add patches field. [inputs]: Add util-linux and tzdata. [arguments]: rename patch-tests phase to check-setup. Set HOME and TZDIR for tests. --- gnu/packages/backup.scm | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'gnu/packages/backup.scm') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 6fd7306d6c..f4f6d0c42c 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -29,6 +29,7 @@ #:use-module (gnu packages dejagnu) #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) + #:use-module (gnu packages linux) #:use-module (gnu packages mcrypt) #:use-module (gnu packages nettle) #:use-module (gnu packages pcre) @@ -53,7 +54,9 @@ version ".tar.gz")) (sha256 (base32 - "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x")))) + "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x")) + (patches (list (search-patch "duplicity-piped-password.patch") + (search-patch "duplicity-test_selection-tmp.patch"))))) (build-system python-build-system) (native-inputs `(("python2-setuptools" ,python2-setuptools) @@ -63,15 +66,21 @@ ("librsync" ,librsync) ("mock" ,python2-mock) ;for testing ("lockfile" ,python2-lockfile) - ("gnupg" ,gnupg-1))) ;gpg executable needed + ("gnupg" ,gnupg-1) ;gpg executable needed + ("util-linux" ,util-linux) ;for setsid + ("tzdata" ,tzdata))) (arguments `(#:python ,python-2 ;setup assumes Python 2 #:test-target "test" #:phases (alist-cons-before - 'check 'patch-tests - (lambda _ + 'check 'check-setup + (lambda* (#:key inputs #:allow-other-keys) (substitute* "testing/functional/__init__.py" - (("/bin/sh") (which "sh")))) + (("/bin/sh") (which "sh"))) + (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME + (setenv "TZDIR" ;some timestamp checks need TZDIR + (string-append (assoc-ref inputs "tzdata") + "/share/zoneinfo"))) %standard-phases))) (home-page "http://duplicity.nongnu.org/index.html") (synopsis "Encrypted backup using rsync algorithm") -- cgit v1.2.3