GNU bug report logs -
#72291
‘guix pack -RR’ doesn’t support provide “fakechroot” engine for script
Previous Next
To reply to this bug, email your comments to 72291 AT debbugs.gnu.org.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
romain.garbage <at> inria.fr, bug-guix <at> gnu.org
:
bug#72291
; Package
guix
.
(Thu, 25 Jul 2024 15:06:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Ludovic Courtès <ludovic.courtes <at> inria.fr>
:
New bug report received and forwarded. Copy sent to
romain.garbage <at> inria.fr, bug-guix <at> gnu.org
.
(Thu, 25 Jul 2024 15:06:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Assume a manifest like this:
--8<---------------cut here---------------start------------->8---
(use-modules (guix))
(define program
(program-file "hello" #~(display "hello")))
(define package-tree
(computed-file "package-with-script"
#~(let ((bin (string-append #$output "/bin")))
(mkdir #$output)
(mkdir bin)
(copy-file #$program (string-append bin "/hello")))))
(manifest (list (manifest-entry
(name "hello")
(version "0")
(item package-tree))))
--8<---------------cut here---------------end--------------->8---
Passing it to ‘guix pack -RR -m’ yields a bundle where the “fakechroot”
execution engine is not supported for the ‘bin/hello’ script.
The explanation is in a TODO in (guix scripts pack):
(define (elf-loader-compile-flags program)
;; Return the cpp flags defining macros for the ld.so/fakechroot
;; wrapper of PROGRAM.
#$(if fakechroot?
;; TODO: Handle scripts by wrapping their interpreter.
#~(if (elf-file? program)
…
'())
#~'()))
I’m not entirely sure how to address it.
One workaround is to add ‘bash-minimal’ to the pack:
guix pack -RR bash-minimal …
… and then, on the target machine, to run Bash first:
GUIX_EXECUTION_ENGINE=fakechroot ./bin/sh -c ./bin/the-script
Ludo’.
This bug report was last modified 44 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.