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

Re: creating Hurd chroots on Linux using DPKG_ROOT chrootless mode



Hello,

Johannes Schauer Marin Rodrigues, le mer. 07 févr. 2024 18:07:21 +0100, a ecrit:
> 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?

util-linux doesn't seem to ship /bin/more on non-linux.  Upstream indeed
added UL_REQUIRES_LINUX([more]) since the addition of using signalfd,
which is Linuxish.

> 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

That's needed, yes.

> The next error I'm getting is:
> 
> /usr/libexec/console-run: /dev/console: Not a terminal

That one is just a warning.

> /usr/libexec/runsystem.hurd: line 129: /usr/libexec/rc: No such file

Not sure how your system looks like exactly. One issue we have is that
the debian-kosher way to run things is not the same as the hurd upstream
way to run things. Normally what happens is:

startup/startup.c's `tries' array starts with LIBEXECDIR "/runsystem",
i.e. /usr/libexec/runsystem, which symlinks to /etc/hurd/runsystem,
which symlinks to /etc/alternatives/runsystem, which symlinks to
/etc/hurd/runsystem.sysv, which doesn't look at /usr/libexec/rc at all.
All of this is supposed to be shipped by the hurd package, either from
the tarball or as an alternative, not sure why (I guess) your
alternative is not being set?

Samuel


Reply to: