unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Feeble attempt at using xattr gnu.translator
@ 2020-05-10 19:48 Jan Nieuwenhuizen
  2020-05-10 20:05 ` Samuel Thibault
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Nieuwenhuizen @ 2020-05-10 19:48 UTC (permalink / raw)
  To: bug-hurd; +Cc: guix-devel

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


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2020-05-11  8:58 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 19:48 Feeble attempt at using xattr gnu.translator Jan Nieuwenhuizen
2020-05-10 20:05 ` 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

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