GNU bug report logs -
#51798
bashtop does not run without glibc installed in profile
Previous Next
To reply to this bug, email your comments to 51798 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-guix <at> gnu.org
:
bug#51798
; Package
guix
.
(Sat, 13 Nov 2021 00:37:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Lenny Händler <lenny <at> lennyhaendler.com>
:
New bug report received and forwarded. Copy sent to
bug-guix <at> gnu.org
.
(Sat, 13 Nov 2021 00:37:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
the script needs both uname and locale. If glibc is not installed in
profile, it aborts. However glibc is not listed as a dependency. When I
install glibc it works.
Information forwarded
to
bug-guix <at> gnu.org
:
bug#51798
; Package
guix
.
(Sun, 14 Nov 2021 14:03:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 51798 <at> debbugs.gnu.org (full text, mbox):
You're right, none of the needed dependencies of bashtop were
actually present in the package definition. Here is a patch that
does work on my machine using `guix shell --pure bashtop -- bashtop`.
Best,
Josselin Poiret
-- >8 --
* gnu/packages/admin.scm (bashtop): Add dependencies, wrap the script
so that it can access the commands it needs.
---
gnu/packages/admin.scm | 27 +++++++++++++++++++++++----
1 file changed, 23 insertions(+), 4 deletions(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 2a7b0f310d..8f9125212c 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -71,6 +71,7 @@ (define-module (gnu packages admin)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
#:use-module (guix build-system trivial)
+ #:use-module (guix build-system copy)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module ((guix licenses) #:prefix license:)
@@ -670,11 +671,29 @@ (define-public bashtop
(sha256
(base32
"07nlr6vmyb7yihaxj1fp424lmhwkdjl6mls92v90f6gsvikpa13v"))))
- (build-system gnu-build-system)
+ (build-system copy-build-system)
(arguments
- '(#:make-flags (list (string-append "PREFIX=" %output))
- #:tests? #f ; bats test fails with loading load.bash
- #:phases (modify-phases %standard-phases (delete 'configure))))
+ '(#:install-plan '(("./bashtop" "./bin/bashtop"))
+ #:phases (modify-phases %standard-phases
+ (add-after 'install 'wrap
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((paths (map (lambda (program)
+ (dirname (which program)))
+ '("awk" "dd" "grep" "ip"
+ "locale" "ps" "sed")))
+ (bashtop (string-append (assoc-ref outputs
+ "out")
+ "/bin/bashtop")))
+ (wrap-program bashtop
+ `("PATH" ":" = ,paths))))))))
+ (inputs
+ `(("coreutils" ,coreutils)
+ ("gawk" ,gawk)
+ ("glibc" ,glibc) ; for 'locale'
+ ("grep" ,grep)
+ ("iproute" ,iproute)
+ ("procps" ,procps)
+ ("sed" ,sed)))
(home-page "https://github.com/aristocratos/bashtop")
(synopsis "Linux/OSX/FreeBSD resource monitor")
(description "Resource monitor that shows usage and stats for processor,
--
2.33.1
Information forwarded
to
bug-guix <at> gnu.org
:
bug#51798
; Package
guix
.
(Sun, 14 Nov 2021 15:21:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 51798 <at> debbugs.gnu.org (full text, mbox):
Sorry for the noise, but the patch I just sent wasn't up to
satisfaction: using `which` in the build phases breaks
cross-compilation, and the build-system change was a bit of an
unwarranted change.
Here's a modified patch!
Best,
Josselin Poiret
-- >8 --
* gnu/packages/admin.scm (bashtop): Add dependencies, wrap the script
so that it can access the commands it needs.
---
gnu/packages/admin.scm | 24 +++++++++++++++++++++++-
1 file changed, 23 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm
index 2a7b0f310d..fe3987a9b8 100644
--- a/gnu/packages/admin.scm
+++ b/gnu/packages/admin.scm
@@ -674,7 +674,29 @@ (define-public bashtop
(arguments
'(#:make-flags (list (string-append "PREFIX=" %output))
#:tests? #f ; bats test fails with loading load.bash
- #:phases (modify-phases %standard-phases (delete 'configure))))
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'install 'wrap
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((path (map (lambda (input)
+ (string-append (assoc-ref inputs
+ input)
+ "/bin"))
+ '("coreutils" "gawk" "glibc" "grep"
+ "iproute" "procps" "sed")))
+ (bashtop (string-append (assoc-ref outputs
+ "out")
+ "/bin/bashtop")))
+ (wrap-program bashtop
+ `("PATH" ":" = ,path))))))))
+ (inputs
+ `(("coreutils" ,coreutils)
+ ("gawk" ,gawk)
+ ("glibc" ,glibc) ; needed for the 'locale' binary
+ ("grep" ,grep)
+ ("iproute" ,iproute)
+ ("procps" ,procps)
+ ("sed" ,sed)))
(home-page "https://github.com/aristocratos/bashtop")
(synopsis "Linux/OSX/FreeBSD resource monitor")
(description "Resource monitor that shows usage and stats for processor,
--
2.33.1
Information forwarded
to
bug-guix <at> gnu.org
:
bug#51798
; Package
guix
.
(Sun, 14 Nov 2021 21:34:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 51798 <at> debbugs.gnu.org (full text, mbox):
Josselin Poiret via Bug reports for GNU Guix schreef op zo 14-11-2021
om 15:19 [+0000]:
> + (wrap-program bashtop
The input "bash-minimal" is missing. Adding that input is required
for cross-compilation (otherwise a native bash instead of a bash
for the target is used). It should be reported by guix lint.
Greetings,
Maxime.
--
not hacking on guix for a while, only occassionally looking at IRC logs
and bug reports. E-mails are unsigned until backup is located.
This bug report was last modified 3 years and 95 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.