From: Jan Nieuwenhuizen <janneke@gnu.org>
To: bug-hurd@gnu.org
Cc: guix-devel@gnu.org
Subject: Feeble attempt at using xattr gnu.translator
Date: Sun, 10 May 2020 21:48:05 +0200 [thread overview]
Message-ID: <873687po5m.fsf@gnu.org> (raw)
Hello,
As part of the effort of creating vm-images for the Hurd using Guix, it
would be nice to use extended file attributes to set passive
translators.
In particular, it would be helpful if we could use
setfattr --name=gnu.translator --value=/hurd/pfinet 1
That would allow us to boot right into Guile and skip a Bash script to
only to run
settrans -c /servers/socket/1 /hurd/pflocal
Whether on GNU/Linux or on the Hurd (booted with
--x-xattr-translator-records and x-xattr-translator-records option in
fstab); almost nothing works.
The Hurd
root@debian:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/hd0s2 / ext2 defaults,x-xattr-translator-records 0 1
/dev/hd0s1 none swap sw 0 0
/dev/hd2 /media/cdrom0 iso9660 noauto 0 0
root@debian:~# fsysopts /
ext2fs --writable --no-inherit-dir-group --x-xattr-translator-records --store-type=typed device:hd0s2
root@debian:~# ps -ef --width=1000 | grep ext2
- 5 2 - 0:02.98 ext2fs --readonly --multiboot-command-line=root=device:hd0s2 --host-priv-port=1 --device-master-port=2 --exec-server-task=3 -T typed device:hd0s2 --x-xattr-translator-records
so that seems OK? Still, nothing seems to work
root@debian:~# touch 1
root@debian:~# mknod 2 c 0 0
root@debian:~# setfattr --name=gnu.translator --value=/hurd/pfinet 1
setfattr: 1: Invalid argument
root@debian:~# setfattr --name=gnu.translator --value=/hurd/pfinet 2
setfattr: 2: Invalid argument
root@debian:~# setfattr --name=gnu.author --value=/hurd/pfinet 1
setfattr: 1: Invalid argument
root@debian:~# setfattr --name=gnu.author --value=/hurd/pfinet 2
setfattr: 2: Invalid argument
root@debian:~# setfattr --name=user.translator --value=/hurd/pfinet 1
setfattr: 1: Operation not supported
root@debian:~# setfattr --name=user.translator --value=/hurd/pfinet 2
setfattr: 2: Operation not supported
On GNU/Linux, I only managed to set user.X, not gnu.translator
root@dundal ~# touch 1
root@dundal ~# mknod 2 c 0 0
root@dundal ~# setfattr --name=gnu.translator --value=/hurd/pfinet 1
setfattr: 1: Operation not supported
root@dundal ~# setfattr --name=gnu.translator --value=/hurd/pfinet 2
setfattr: 2: Operation not supported
root@dundal ~# setfattr --name=gnu.author --value=/hurd/pfinet 1
setfattr: 1: Operation not supported
root@dundal ~# setfattr --name=gnu.author --value=/hurd/pfinet 2
setfattr: 2: Operation not supported
root@dundal ~# setfattr --name=user.translator --value=/hurd/pfinet 1
root@dundal ~# setfattr --name=user.translator --value=/hurd/pfinet 2
setfattr: 2: Operation not permitted
only one command succeeds, but that's next to useless (well, it suggests touch
could work and we don't need mknod).
This
https://lists.gnu.org/archive/html/bug-hurd/2004-02/msg00108.html
is the only interesting piece of information I found; down the thread
there is a suggestion to try upstreaming. I looked at the Linux sources
They seem to suggest that only a couple of namespaces are allowed (and
"gnu" is not one of them) but find them hard to read.
Greetings,
janneke
--
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar® http://AvatarAcademy.com
next reply other threads:[~2020-05-10 19:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-10 19:48 Jan Nieuwenhuizen [this message]
2020-05-10 20:05 ` Feeble attempt at using xattr gnu.translator Samuel Thibault
2020-05-11 8:33 ` Jan Nieuwenhuizen
2020-05-11 8:42 ` Samuel Thibault
2020-05-11 8:46 ` Samuel Thibault
2020-05-11 8:53 ` Jan Nieuwenhuizen
2020-05-11 8:58 ` Samuel Thibault
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=873687po5m.fsf@gnu.org \
--to=janneke@gnu.org \
--cc=bug-hurd@gnu.org \
--cc=guix-devel@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).