[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: creating Hurd chroots on Linux using DPKG_ROOT chrootless mode



Hi again,

Quoting Johannes Schauer Marin Rodrigues (2024-01-11 00:12:09)
> The util-linux problem is no surprise because less fails to install when
> investigating that issue I noticed the version of less is 487 which is the
> version from old-old-stable. Is that plausible? Maybe I'm missing a mirror in
> my setup?

this turned out to be a red herring! There was a release of less yesterday
which includes the fix of Guillem and the problem did not go away so I
investigated again. Turns out, the problematic bit of code is this one:

https://sources.debian.org/src/util-linux/2.39.3-6/debian/util-linux.postinst/#L4

if [ "$(uname -s)" = "Linux" ]; then
	update-alternatives --install /usr/bin/pager pager /bin/more 50 \
		--slave /usr/share/man/man1/pager.1.gz pager.1.gz \
		/usr/share/man/man1/more.1.gz
fi

And in unshare mode, uname -s prints "Linux" because I'm running this on linux.
Do you happen to know what this conditional is for on non-linux systems?
Instead of calling uname, maintainerscripts could (and probably should) use
$DPKG_MAINTSCRIPT_ARCH.

So I hacked around that by replacing /bin/uname with a shell script that prints
something that is not "Linux". And then it works! I'm now stuck elsewhere. When
putting everything into a disk image and attempting to boot it, I get the
problem that was discussed here:

https://lists.debian.org/debian-hurd/2007/09/msg00073.html

So I manually created the empty files /servers/exec, /servers/startup and
/dev/console as it is done by debootstrap here:

https://sources.debian.org/src/debootstrap/1.0.134/functions/?hl=1304#L1304

The next error I'm getting is:

/usr/libexec/console-run: /dev/console: Not a terminal
/usr/libexec/runsystem.hurd: line 129: /usr/libexec/rc: No such file

I looked on exodar.debian.net and that file doesn't exist there either. What
does this error mean? What is the setup code I'm missing besides the few lines
in debootstrap itself?

Thanks!

cheers, josch

Attachment: signature.asc
Description: signature


Reply to: