From 2a30d95c46ff1eb0bdac9307c5d6bb8e460de02f Mon Sep 17 00:00:00 2001
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Date: Thu, 13 Jan 2022 15:09:54 -0500
Subject: [PATCH] gnu: password-store: Fix test failure following 'tree'
update.
Thanks to Olivier Dion <olivier.dion@polymtl.ca> for diagnosing the source of
the problem!
* gnu/packages/password-utils.scm (password-store): Delete trailing #t.
[phases]{adjust-for-tree-2}: New phase.
---
gnu/packages/password-utils.scm | 21 +++++++++++++++++----
1 file changed, 17 insertions(+), 4 deletions(-)
@@ -487,6 +487,21 @@ (define-public password-store
(arguments
'(#:phases
(modify-phases %standard-phases
+ (add-after 'unpack 'adjust-for-tree-2
+ (lambda _
+ ;; XXX: tree 2.0.1 has this new "stddata pipe" that is
+ ;; automatically used to output in JSON if the file descriptor 3
+ ;; is available. This conflicts with the test harness use of
+ ;; file descriptor 3, causing one of the tests to fail.
+ ;; Increment the file descriptors used by the harness by one to
+ ;; avoid the conflict.
+ (substitute* "tests/sharness.sh"
+ (("exec 4>&2 3>&1")
+ "exec 5>&2 4>&1")
+ (("exec 4>/dev/null 3>/dev/null")
+ "exec 5>/dev/null 4>/dev/null")
+ (("&4") "&5")
+ (("&3") "&4"))))
(delete 'configure)
(delete 'build)
(add-before 'install 'patch-system-extension-dir
@@ -500,8 +515,7 @@ (define-public password-store
(string-append " SYSTEM_EXTENSION_DIR=\""
"${PASSWORD_STORE_SYSTEM_EXTENSION_DIR:-"
extension-dir
- "}\"\n"))))
- #t))
+ "}\"\n"))))))
(add-before 'install 'patch-passmenu-path
;; FIXME Wayland support requires ydotool and dmenu-wl packages
;; We are ignoring part of the script that gets executed if
@@ -530,8 +544,7 @@ (define-public password-store
'("coreutils" "getopt" "git" "gnupg" "qrencode"
"sed" "tree" "which" "wl-clipboard" "xclip"))))
(wrap-program (string-append out "/bin/pass")
- `("PATH" ":" prefix (,(string-join path ":"))))
- #t))))
+ `("PATH" ":" prefix (,(string-join path ":"))))))))
#:make-flags (list "CC=gcc" (string-append "PREFIX=" %output)
"WITH_ALLCOMP=yes"
(string-append "BASHCOMPDIR="
--
2.34.0