[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: xattr records not actually working? (Was: creating Hurd chroots on L
From: |
Johannes Schauer Marin Rodrigues |
Subject: |
Re: xattr records not actually working? (Was: creating Hurd chroots on Linux using DPKG_ROOT chrootless mode) |
Date: |
Sat, 24 Aug 2024 18:29:52 +0200 |
User-agent: |
alot/0.10 |
Quoting Samuel Thibault (2024-07-19 01:35:45)
> Putting a more eye-catching title :)
Thank you, Samuel!
I am still unable to see extended attributes in the translators when checking
this call on Linux:
sudo getfattr --dump --match=- /mnt/hurd/*
Do others observe the same?
Or did I maybe do something wrong with the virtual machine in which I ran Hurd
under QEMU?
Thanks!
cheers, josch
> Johannes Schauer Marin Rodrigues, le lun. 15 juil. 2024 11:38:37 +0200, a
> ecrit:
> > Hi,
> >
> > Quoting Johannes Schauer Marin Rodrigues (2024-05-21 11:50:25)
> > > In any case, things go much further now. The next problem is some missing
> > > DPKG_ROOT support in the hurd maintainer script. I opened a merge request
> > > here:
> > >
> > > https://salsa.debian.org/hurd-team/hurd/-/merge_requests/1
> >
> > thank you for uploading a new version of the hurd package including these
> > DPKG_ROOT changes! I just confirmed that these indeed do work as intended
> > and
> > it is now possible to create minimal hurd tarballs containing kernel and
> > sysvinit using chrootless mode on linux like this:
> >
> > mmdebstrap --variant=apt \
> >
> > --include=passwd,debian-ports-archive-keyring,mmdebstrap,sysvinit-core,sysv-rc
> > \
> > --customize-hook='chroot "$1" mmdebstrap \
> > --mode=chrootless --arch=hurd-i386 \
> >
> > --include=sysvinit-core,sysv-rc,debian-ports-archive-keyring,gnumach-image-1-486
> > \
> > --variant=apt \
> > unstable /tmp/chroot.tar \
> > "deb http://ftp.ports.debian.org/debian-ports/ unstable main"
> > \
> > "deb http://ftp.ports.debian.org/debian-ports/ unreleased
> > main"' \
> > --customize-hook='copy-out /tmp/chroot.tar .'\
> > unstable /dev/null
> >
> > We could turn these tarballs into an ext4 file system but that would not be
> > very useful yet, because all the translators would be missing from it. I was
> > told by Samuel Thibault that since recently, translators are stored in
> > extended
> > attributes, namely in the gnu.translator xattr. So it should be possible to
> > mimic what settrans does on Hurd on Linux using setxattr(2) or, in shell,
> > setfattr(1). Namely, it should be possible to special-case the st() and md()
> > functions in /usr/lib/hurd/setup-translators, such that the script can be
> > run
> > on Linux.
> >
> > To make sure that my settrans replacement on Linux does the right thing, I
> > wanted to investigate how the extended attribute values look like on Hurd.
> > For
> > that purpose, I downloaded
> > https://cdimage.debian.org/cdimage/ports/stable/hurd-i386/debian-hurd-20230608.img
> > and also gnumach.gz, exec.static and ext2fs.static from the same location
> > and
> > then ran the qemu vm like this:
> >
> > qemu-system-i386 -nographic -net user,hostfwd=tcp:127.0.0.1:2222-:22 -net
> > nic,model=e1000 \
> > -m 1G -kernel gnumach -append 'root=device:hd0s2 console=com0' \
> > --initrd './ext2fs.static
> > --multiboot-command-line=${kernel-command-line}
> > --host-priv-port=${host-port} --device-master-port=${device-port}
> > --exec-server-task=${exec-task} -T typed ${root} $(task-create)
> > $(task-resume),./exec.static $(exec-task=task-create)' \
> > -drive file=debian-hurd-20230608.img,format=raw
> >
> > I put http://ftp.ports.debian.org/debian-ports/ unstable and unreleased main
> > into the apt sources.list and upgraded everything to the latest versions.
> > Then
> > I turned the machine off, mounted the filesystem of the qemu vm and
> > extracted
> > /boot/gnumach-1.8-486-up.gz, /hurd/exec.static and /hurd/ext2fs.static. I
> > gunzipped the gnumach kernel and then ran qemu again with the updated files.
> > Just to be sure, I ran /usr/lib/hurd/setup-translators -K again and powered
> > off
> > the machine. I then mounted the root filesystem and ran this:
> >
> > sudo getfattr --dump --match=- /mnt/hurd/*
> >
> > Unfortunately this came back empty. Should there not be extended attributes
> > attached?
> >
> > What could I be missing?
> >
> > Thanks!
> >
> > cheers, josch
signature.asc
Description: signature
- Re: xattr records not actually working? (Was: creating Hurd chroots on Linux using DPKG_ROOT chrootless mode),
Johannes Schauer Marin Rodrigues <=