diff options
| author | Eric Bavier <bavier@member.fsf.org> | 2014-09-28 15:04:34 -0500 |
|---|---|---|
| committer | Eric Bavier <bavier@member.fsf.org> | 2014-09-28 18:24:25 -0500 |
| commit | 335bc6833fc75f6cbbc5f15c0d3bd9d0e1b5b170 (patch) | |
| tree | d3e8f80a78cf28b825b125237004f1081ba31de5 | |
| parent | 182d6311c2bd3393115bac12da5154f8f33a9940 (diff) | |
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.
| -rw-r--r-- | gnu-system.am | 2 | ||||
| -rw-r--r-- | gnu/packages/backup.scm | 19 | ||||
| -rw-r--r-- | gnu/packages/patches/duplicity-piped-password.patch | 20 | ||||
| -rw-r--r-- | gnu/packages/patches/duplicity-test_selection-tmp.patch | 18 |
4 files changed, 54 insertions, 5 deletions
diff --git a/gnu-system.am b/gnu-system.am index 126f4e341da..bb944fbf9e4 100644 --- a/gnu-system.am +++ b/gnu-system.am | |||
| @@ -321,6 +321,8 @@ dist_patch_DATA = \ | |||
| 321 | gnu/packages/patches/diffutils-gets-undeclared.patch \ | 321 | gnu/packages/patches/diffutils-gets-undeclared.patch \ |
| 322 | gnu/packages/patches/doxygen-test.patch \ | 322 | gnu/packages/patches/doxygen-test.patch \ |
| 323 | gnu/packages/patches/doxygen-tmake.patch \ | 323 | gnu/packages/patches/doxygen-tmake.patch \ |
| 324 | gnu/packages/patches/duplicity-piped-password.patch \ | ||
| 325 | gnu/packages/patches/duplicity-test_selection-tmp.patch \ | ||
| 324 | gnu/packages/patches/emacs-configure-sh.patch \ | 326 | gnu/packages/patches/emacs-configure-sh.patch \ |
| 325 | gnu/packages/patches/eudev-rules-directory.patch \ | 327 | gnu/packages/patches/eudev-rules-directory.patch \ |
| 326 | gnu/packages/patches/file-CVE-2014-3587.patch \ | 328 | gnu/packages/patches/file-CVE-2014-3587.patch \ |
diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 6fd7306d6ce..f4f6d0c42c0 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm | |||
| @@ -29,6 +29,7 @@ | |||
| 29 | #:use-module (gnu packages dejagnu) | 29 | #:use-module (gnu packages dejagnu) |
| 30 | #:use-module (gnu packages glib) | 30 | #:use-module (gnu packages glib) |
| 31 | #:use-module (gnu packages gnupg) | 31 | #:use-module (gnu packages gnupg) |
| 32 | #:use-module (gnu packages linux) | ||
| 32 | #:use-module (gnu packages mcrypt) | 33 | #:use-module (gnu packages mcrypt) |
| 33 | #:use-module (gnu packages nettle) | 34 | #:use-module (gnu packages nettle) |
| 34 | #:use-module (gnu packages pcre) | 35 | #:use-module (gnu packages pcre) |
| @@ -53,7 +54,9 @@ | |||
| 53 | version ".tar.gz")) | 54 | version ".tar.gz")) |
| 54 | (sha256 | 55 | (sha256 |
| 55 | (base32 | 56 | (base32 |
| 56 | "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x")))) | 57 | "0l14nrhbgkyjgvh339bbhnm6hrdwrjadphq1jmpi0mcgcdbdfh8x")) |
| 58 | (patches (list (search-patch "duplicity-piped-password.patch") | ||
| 59 | (search-patch "duplicity-test_selection-tmp.patch"))))) | ||
| 57 | (build-system python-build-system) | 60 | (build-system python-build-system) |
| 58 | (native-inputs | 61 | (native-inputs |
| 59 | `(("python2-setuptools" ,python2-setuptools) | 62 | `(("python2-setuptools" ,python2-setuptools) |
| @@ -63,15 +66,21 @@ | |||
| 63 | ("librsync" ,librsync) | 66 | ("librsync" ,librsync) |
| 64 | ("mock" ,python2-mock) ;for testing | 67 | ("mock" ,python2-mock) ;for testing |
| 65 | ("lockfile" ,python2-lockfile) | 68 | ("lockfile" ,python2-lockfile) |
| 66 | ("gnupg" ,gnupg-1))) ;gpg executable needed | 69 | ("gnupg" ,gnupg-1) ;gpg executable needed |
| 70 | ("util-linux" ,util-linux) ;for setsid | ||
| 71 | ("tzdata" ,tzdata))) | ||
| 67 | (arguments | 72 | (arguments |
| 68 | `(#:python ,python-2 ;setup assumes Python 2 | 73 | `(#:python ,python-2 ;setup assumes Python 2 |
| 69 | #:test-target "test" | 74 | #:test-target "test" |
| 70 | #:phases (alist-cons-before | 75 | #:phases (alist-cons-before |
| 71 | 'check 'patch-tests | 76 | 'check 'check-setup |
| 72 | (lambda _ | 77 | (lambda* (#:key inputs #:allow-other-keys) |
| 73 | (substitute* "testing/functional/__init__.py" | 78 | (substitute* "testing/functional/__init__.py" |
| 74 | (("/bin/sh") (which "sh")))) | 79 | (("/bin/sh") (which "sh"))) |
| 80 | (setenv "HOME" (getcwd)) ;gpg needs to write to $HOME | ||
| 81 | (setenv "TZDIR" ;some timestamp checks need TZDIR | ||
| 82 | (string-append (assoc-ref inputs "tzdata") | ||
| 83 | "/share/zoneinfo"))) | ||
| 75 | %standard-phases))) | 84 | %standard-phases))) |
| 76 | (home-page "http://duplicity.nongnu.org/index.html") | 85 | (home-page "http://duplicity.nongnu.org/index.html") |
| 77 | (synopsis "Encrypted backup using rsync algorithm") | 86 | (synopsis "Encrypted backup using rsync algorithm") |
diff --git a/gnu/packages/patches/duplicity-piped-password.patch b/gnu/packages/patches/duplicity-piped-password.patch new file mode 100644 index 00000000000..db50f5df325 --- /dev/null +++ b/gnu/packages/patches/duplicity-piped-password.patch | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | This test, on three occasions, is failing with the error: | ||
| 2 | |||
| 3 | EOF: End Of File (EOF) in read_nonblocking(). Braindead platform. | ||
| 4 | |||
| 5 | --- duplicity-0.6.24/testing/functional/test_final.py 2014-09-28 13:14:52.146001614 -0500 | ||
| 6 | +++ duplicity-0.6.24/testing/functional/test_final.py 2014-09-28 13:13:20.333546342 -0500 | ||
| 7 | @@ -156,13 +156,6 @@ | ||
| 8 | self.run_duplicity(options=["remove-older-than", "50000", "--force", self.backend_url]) | ||
| 9 | self.assertEqual(self.get_backend_files(), second_chain) | ||
| 10 | |||
| 11 | - def test_piped_password(self): | ||
| 12 | - """Make sure that prompting for a password works""" | ||
| 13 | - self.set_environ("PASSPHRASE", None) | ||
| 14 | - self.backup("full", "testfiles/empty_dir", | ||
| 15 | - passphrase_input=[self.sign_passphrase, self.sign_passphrase]) | ||
| 16 | - self.restore(passphrase_input=[self.sign_passphrase]) | ||
| 17 | - | ||
| 18 | |||
| 19 | class OldFilenamesFinalTest(FinalTest): | ||
| 20 | |||
diff --git a/gnu/packages/patches/duplicity-test_selection-tmp.patch b/gnu/packages/patches/duplicity-test_selection-tmp.patch new file mode 100644 index 00000000000..8f66be4dcc8 --- /dev/null +++ b/gnu/packages/patches/duplicity-test_selection-tmp.patch | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | Reported upstream at https://bugs.launchpad.net/duplicity/+bug/1375019 | ||
| 2 | |||
| 3 | --- duplicity-0.6.24/testing/unit/test_selection.py 2014-05-09 08:27:40.000000000 -0500 | ||
| 4 | +++ duplicity-0.6.24/testing/unit/test_selection.py 2014-09-28 12:28:53.932324380 -0500 | ||
| 5 | @@ -431,10 +431,10 @@ | ||
| 6 | [(), ('1',), ('1', '1'), ('1', '2'), ('1', '3')]) | ||
| 7 | |||
| 8 | self.root = Path("/") | ||
| 9 | - self.ParseTest([("--exclude", "/home/*"), | ||
| 10 | - ("--include", "/home"), | ||
| 11 | + self.ParseTest([("--exclude", "/tmp/*"), | ||
| 12 | + ("--include", "/tmp"), | ||
| 13 | ("--exclude", "/")], | ||
| 14 | - [(), ("home",)]) | ||
| 15 | + [(), ("tmp",)]) | ||
| 16 | |||
| 17 | if __name__ == "__main__": | ||
| 18 | unittest.main() | ||
