‘guix pack -RR’ doesn’t support provide “fakechroot” engine for script

  • Open
  • quality assurance status badge
Details
One participant
  • Ludovic Courtès
Owner
unassigned
Submitted by
Ludovic Courtès
Severity
normal
L
L
Ludovic Courtès wrote on 25 Jul 17:05 +0200
‘guix pack -RR’ doesn’t support provide “fakechroot” engine for script
(address . bug-guix@gnu.org)
87y15pcy1c.fsf@inria.fr
Assume a manifest like this:

Toggle snippet (18 lines)
(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))))

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’.
?
Your comment

Commenting via the web interface is currently disabled.

To comment on this conversation send an email to 72291@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 72291
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch