When running with the following command prompt
mmdebstrap --mode=chrootless --format=directory --arch=hurd-i386 \
--include=sysvinit-core,sysv-rc,debian-ports-archive-keyring,gnumach-image-1-486
--customize-hook="passwd --root=\"\$1\" --delete root" \
--variant=apt unstable /hurd \
"deb http://deb.debian.org/debian-ports/ unstale main" \
"deb http://deb.debian.org/debian-ports/ unreleased main"
where /hurd is the mountpoint for a partition with a filesystem
generated with "mk2efs -o hurd" with write permissions to non-root
users, and the command is being run by a normal user account,
I'm getting the following output:
I: skipping emulation check in chrootless mode
I: finding correct signed-by value...
done
readdir() attempted on invalid dirhandle $dh2 at /usr/bin/mmdebstrap line 6889.
readdir() attempted on invalid dirhandle $dh2 at /usr/bin/mmdebstrap line 6890.
readdir() attempted on invalid dirhandle $dh2 at /usr/bin/mmdebstrap line 6893.
closedir() attempted on invalid dirhandle $dh2 at /usr/bin/mmdebstrap line 6897.
I: running apt-get update...
downloading: 0.00 [>
And seems to get stuck.
The problem is, that you are running mmdebstrap as the normal user and that user does not have the required privileges to look into the lost+found directory to check whether it's really empty. With above patch, mmdebstrap will
just fail with an appropriate error message. This will avoid the "readdir() attempted on invalid dirhandle" errors from the subject of this bug.
But I guess this is not quite why you opened this bug and your actual problem is that mmdebstrap gets stuck?
If yes, please read on. Otherwise, consider the bug as fixed with the next upload of mmdebstrap via above patch.
Firstly, please be *very* careful with chrootless mode. You are running maintainer scripts outside the chroot and this mode is barely tested and many packages are not made to work with it at all. So anything can happen including
a complete wipe of your $HOME. For that reason and because nothing is checking
whether the versions of programs run by maintainer scripts are of the version that your packages inside the chroot expect, it is always a good idea to wrap a
chrootless mmdebstrap call in some sort of containerization. This includes running mmdebstrap in chrootless mode as a customize hooks inside mmdebstrap in
unshare mode, for example.
Secondly, have you tried creating a hurd chroot on linux the "normal" way? That
is by creating a filesystem from a tarball?
Here is my latest set of runes on the topic:
https://salsa.debian.org/helmutg/dpkg-root-demo/-/merge_requests/3/diffs#57c00b22e45b81dde62199ab610d05ce70f829bf_0_17
What do you ultimately want to do?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 483 |
Nodes: | 16 (0 / 16) |
Uptime: | 81:06:13 |
Calls: | 9,576 |
Calls today: | 7 |
Files: | 13,666 |
Messages: | 6,142,985 |
Posted today: | 2 |