From 6524c1cfcf6088c5574e6ff21f540dfb22f944bf Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 3 Oct 2016 16:55:21 -0400 Subject: gnu: libarchive: Incorporate grafted security patches. * gnu/packages/backup.scm (libarchive)[source]: Add patches from libarchive/fixed. [replacement]: Remove field. (libarchive/fixed): Remove variable. --- gnu/packages/backup.scm | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) (limited to 'gnu/packages/backup.scm') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 797c06e149..fca601fef3 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -172,13 +172,17 @@ backups (called chunks) to allow easy burning to CD/DVD.") (define-public libarchive (package (name "libarchive") - (replacement libarchive/fixed) (version "3.2.1") (source (origin (method url-fetch) (uri (string-append "http://libarchive.org/downloads/libarchive-" version ".tar.gz")) + (patches (search-patches + "libarchive-7zip-heap-overflow.patch" + "libarchive-fix-symlink-check.patch" + "libarchive-fix-filesystem-attacks.patch" + "libarchive-safe_fprintf-buffer-overflow.patch")) (sha256 (base32 "1lngng84k1kkljl74q0cdqc3s82vn2kimfm02dgm4d6m7x71mvkj")))) @@ -228,17 +232,6 @@ archive. In particular, note that there is currently no built-in support for random access nor for in-place modification.") (license license:bsd-2))) -(define libarchive/fixed - (package - (inherit libarchive) - (source (origin - (inherit (package-source libarchive)) - (patches (search-patches - "libarchive-7zip-heap-overflow.patch" - "libarchive-fix-symlink-check.patch" - "libarchive-fix-filesystem-attacks.patch" - "libarchive-safe_fprintf-buffer-overflow.patch")))))) - (define-public rdup (package (name "rdup") -- cgit v1.2.3 From 1df6d73bdf7044ad0818c95969b8872414497682 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 11 Oct 2016 00:48:45 -0400 Subject: gnu: attic: Disable the test suite. * gnu/packages/backup.scm (attic)[arguments]: Set #:tests? #f. --- gnu/packages/backup.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/packages/backup.scm') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index fca601fef3..535d535d9e 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -475,7 +475,10 @@ to not fully trusted targets. Borg is a fork of Attic.") "0b5skd36r4c0915lwpkqg5hxm49gls9pprs1b7hc40910wlcsl36")))) (build-system python-build-system) (arguments - `(#:phases + `(;; The tests assume they are run as root: + ;; https://github.com/jborg/attic/issues/7 + #:tests? #f + #:phases (modify-phases %standard-phases (add-before 'build 'set-openssl-prefix -- cgit v1.2.3 From b4f91d0eda9d7296597524af0728ebef6fff1804 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Tue, 11 Oct 2016 01:35:43 -0400 Subject: gnu: borg: Run the test suite. * gnu/packages/backup.scm (borg)[native-inputs]: Add python-pytest. [arguments]: Invoke the tests with python-pytest after the install phase. Set HOME=/tmp in the 'set-env' phase. --- gnu/packages/backup.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/packages/backup.scm') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 535d535d9e..ffd7ef4c3e 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -428,7 +428,27 @@ detection, and lossless compression.") (setenv "BORG_OPENSSL_PREFIX" openssl) (setenv "BORG_LZ4_PREFIX" lz4) (setenv "PYTHON_EGG_CACHE" "/tmp") + ;; The test 'test_return_codes[python]' fails when + ;; HOME=/homeless-shelter. + (setenv "HOME" "/tmp") #t))) + ;; The tests need to be run after Borg is installed. + (delete 'check) + (add-after 'install 'check + (lambda _ + (zero? + (system* "py.test" "-v" "--pyargs" "borg.testsuite" "-k" + (string-append + ;; These tests need to write to '/var'. + "not test_get_cache_dir " + "and not test_get_keys_dir " + ;; These tests assume there is a root user in + ;; '/etc/passwd'. + "and not test_access_acl " + "and not test_default_acl " + "and not test_non_ascii_acl " + ;; This test needs the unpackaged pytest-benchmark. + "and not benchmark"))))) (add-after 'install 'install-doc (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -442,6 +462,7 @@ detection, and lossless compression.") (native-inputs `(("python-cython" ,python-cython) ("python-setuptools-scm" ,python-setuptools-scm) + ("python-pytest" ,python-pytest) ;; For generating the documentation. ("python-sphinx" ,python-sphinx) ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme))) -- cgit v1.2.3 From 65a3bdf7eb6884f440ac2a0db0e937b595d09406 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sun, 30 Oct 2016 18:32:30 -0400 Subject: gnu: borg: Run the tests with python-pytest-2.9.2. * gnu/packages/backup.scm (borg)[native-inputs]: Use python-pytest-2.9.2. --- gnu/packages/backup.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'gnu/packages/backup.scm') diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 8ec2ee45df..203ff4c9dc 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -470,7 +470,9 @@ detection, and lossless compression.") (native-inputs `(("python-cython" ,python-cython) ("python-setuptools-scm" ,python-setuptools-scm) - ("python-pytest" ,python-pytest) + ;; Borg 1.0.8's test suite uses 'tmpdir_factory', which was introduced in + ;; pytest 2.8. + ("python-pytest" ,python-pytest-2.9.2) ;; For generating the documentation. ("python-sphinx" ,python-sphinx) ("python-sphinx-rtd-theme" ,python-sphinx-rtd-theme))) -- cgit v1.2.3