unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Jan (janneke) Nieuwenhuizen" <janneke@gnu.org>
To: 41855@debbugs.gnu.org
Subject: bug#41855: [PATCH 2/2] hurd-boot: Use 'setxattr' instead of invoking settrans.
Date: Sun, 14 Jun 2020 18:56:49 +0200	[thread overview]
Message-ID: <20200614165649.3496-2-janneke@gnu.org> (raw)
In-Reply-To: <20200614165649.3496-1-janneke@gnu.org>

Note: Using `getxattr' on the Hurd instead of running showtrans does not
work (yet?).

* gnu/build/hurd-boot.scm (setup-translator): Use 'setxattr' instead of
invoking settrans.
* gnu/system.scm (hurd-multiboot-modules): Add --x-xattr-translator-records to
enable xattr-embebbing of translators.
---
 gnu/build/hurd-boot.scm | 2 +-
 gnu/system.scm          | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/gnu/build/hurd-boot.scm b/gnu/build/hurd-boot.scm
index 398cee1395..8150aff972 100644
--- a/gnu/build/hurd-boot.scm
+++ b/gnu/build/hurd-boot.scm
@@ -140,7 +140,7 @@ set."
             (chmod port mode)))))
     (catch 'system-error
       (lambda _
-        (apply invoke "settrans" "--create" file-name command))
+        (setxattr file-name "gnu.translator" (string-join command "\0" 'suffix)))
       (lambda (key . args)
         (let ((errno (system-error-errno (cons key args))))
           (format (current-error-port) "~a: ~a\n"
diff --git a/gnu/system.scm b/gnu/system.scm
index d51691fe76..25cc63a9df 100644
--- a/gnu/system.scm
+++ b/gnu/system.scm
@@ -1191,6 +1191,7 @@ a list of <menu-entry>, to populate the \"old entries\" menu."
                 "--device-master-port='${device-port}'"
                 "--exec-server-task='${exec-task}'"
                 "--store-type=typed"
+                "--x-xattr-translator-records"
                 "'${root}'" "'$(task-create)'" "'$(task-resume)'"))
          (target (%current-target-system))
          (libc (if target
-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com





  reply	other threads:[~2020-06-14 16:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-14 16:54 bug#41855: [PATCH 0/2] hurd-boot: Cleanups: Remove MAKEDEV, then use setxattr (on the Hurd) Jan (janneke) Nieuwenhuizen
2020-06-14 16:56 ` bug#41855: [PATCH 1/2] hurd-boot: Create individual translators instead of running MAKEDEV Jan (janneke) Nieuwenhuizen
2020-06-14 16:56   ` Jan (janneke) Nieuwenhuizen [this message]
2020-06-15 20:00     ` bug#41855: [PATCH 2/2] hurd-boot: Use 'setxattr' instead of invoking settrans Ludovic Courtès
2020-06-15 19:54   ` bug#41855: [PATCH 1/2] hurd-boot: Create individual translators instead of running MAKEDEV Ludovic Courtès

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=20200614165649.3496-2-janneke@gnu.org \
    --to=janneke@gnu.org \
    --cc=41855@debbugs.gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).