[PATCH] gnu: xvfb-run: Fix ‘xvfb-run --help’ in a pure environment.

  • Done
  • quality assurance status badge
Details
2 participants
  • Maxime Devos
  • Mathieu Othacehe
Owner
unassigned
Submitted by
Maxime Devos
Severity
normal
M
M
Maxime Devos wrote on 10 Mar 2021 13:14
(address . guix-patches@gnu.org)
6e6e113e6843516a368f6abff5a536739cd99959.camel@telenet.be
* gnu/packages/xorg.scm (xvfb-run)[arguments]: Refer to ‘cat’
by absolute file name, and test whether ‘xvfb-run --help’
succeeds in a pure environment in the ‘check’ phase.
---
gnu/packages/xorg.scm | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)

Toggle diff (38 lines)
diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm
index 92ae6a824b..392a4f7c44 100644
--- a/gnu/packages/xorg.scm
+++ b/gnu/packages/xorg.scm
@@ -26,6 +26,7 @@
;;; Copyright © 2020, 2021 Michael Rohleder <mike@rohleder.de>
;;; Copyright © 2020 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2020 Jean-Baptiste Note <jean-baptiste.note@m4x.org>
+;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -6799,7 +6800,7 @@ box, and a calendar. It uses GTK+, and will match your desktop theme.")
(lambda _
(chmod "xvfb-run" #o755)
(substitute* "xvfb-run"
- (("(\\(| )(fmt|stty|awk|kill|getopt|mktemp|touch|rm|mcookie)"
+ (("(\\(| )(fmt|stty|awk|cat|kill|getopt|mktemp|touch|rm|mcookie)"
_ prefix command)
(string-append prefix (which command)))
;; These also feature in UI messages, so be more strict.
@@ -6808,13 +6809,15 @@ box, and a calendar. It uses GTK+, and will match your desktop theme.")
(string-append prefix (which command))))))
(replace 'check
;; There are no tests included. Here we test whether we can run
- ;; a simple client without xvfb-run itself relying on $PATH.
+ ;; a simple client and whether xvfb-run --help succeeds
+ ;; without xvfb-run itself relying on $PATH.
(lambda* (#:key tests? #:allow-other-keys)
(when tests?
(let ((old-PATH (getenv "PATH"))
(xterm (which "xterm")))
(unsetenv "PATH")
(invoke "./xvfb-run" xterm "-e" "true")
+ (invoke "./xvfb-run" "--help")
(setenv "PATH" old-PATH)))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
M
M
Mathieu Othacehe wrote on 8 Jul 2021 16:43
Re: bug#47044: [PATCH] gnu: xvfb-run: Fix ‘xvfb -run --help’ in a pure environment.
(name . Maxime Devos)(address . maximedevos@telenet.be)(address . 47044-done@debbugs.gnu.org)
87wnq0vpbd.fsf@gnu.org
Hey,

Toggle quote (4 lines)
> * gnu/packages/xorg.scm (xvfb-run)[arguments]: Refer to ‘cat’
> by absolute file name, and test whether ‘xvfb-run --help’
> succeeds in a pure environment in the ‘check’ phase.

Pushed as 344316b455345485dfd60baaa88105599467fe9b.

Thanks,

Mathieu
Closed
?