all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludovic.courtes@inria.fr>
To: 72291@debbugs.gnu.org
Cc: Romain GARBAGE <romain.garbage@inria.fr>
Subject: bug#72291: ‘guix pack -RR’ doesn’t support provide “fakechroot” engine for script
Date: Thu, 25 Jul 2024 17:05:19 +0200	[thread overview]
Message-ID: <87y15pcy1c.fsf@inria.fr> (raw)

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’.




                 reply	other threads:[~2024-07-25 15:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y15pcy1c.fsf@inria.fr \
    --to=ludovic.courtes@inria.fr \
    --cc=72291@debbugs.gnu.org \
    --cc=romain.garbage@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.