Re: sbuild on hurd-amd64...

Samuel Thibault <[email protected]>
Newsgroups gmane.linux.debian.ports.hurd
Organization I am not organized
Message-ID <aLvJsYqLMOXgxux0@begin>
Hello,

Johannes Schauer Marin Rodrigues, le sam. 06 sept. 2025 03:08:50 +0200, a ecrit:
> Quoting Stéphane Glondu (2025-08-23 11:27:03)
> > Le 23/08/2025 à 10:52, Samuel Thibault a écrit :
> > >>> Concerning the "dpkg --install" step, some maintainer scripts fail when run
> > >>> under fakechroot/fakeroot.
> > >>
> > >> We should then fix that. We should be able to manage to get chrootless
> > >> working.
> > I wasn't familiar with the chrootless concept.
> 
> be aware that because there is no chroot, maintainers scripts will operate on
> what they think is root which is your rootfs if the maintainer script has not
> yet been adjusted to make use of the DPKG_ROOT environment variable set by
> dpkg. This makes the chrootless mode of mmdebstrap dangerous which is why it is
> recommended to run it inside some form of isolation.

Right :)

> > >>> It makes more sense to me to run them inside the subhurd anyway.
> > >>
> > >> I don't think the required packages should need anything that chrootless
> > >> can't do. Even the hurd package now doesn't, with xattrs :)
> > > 
> > > Johannes, I see that base-passwd and base-files use chown to set up some
> > > groups etc. That would however not work with non-root chrootless, so
> > > we'd have to use either root chrootless, or non-root fakeroot?
> > My observations confirm this.
> 
> chrootless mode was not introduced to avoid requiring superuser privileges. On
> Linux we use unshared user namespaces to allow a chown 0:0 as the non-root
> user. Maybe hurd has a similar concept?

It's a subhurd :) which is what we're here creating an image for :)

But here we only want a partial subhurd for just altering auth to fake
being root. That's fakeroot-hurd :)

> root chrootless is dangerous. non-root fakeroot is brittle as you already have
> experienced. I would not put more of my own time into fixing fakeroot (too much
> was spent there already for little benefit).

fakeroot-tcp/sysv is indeed difficult to fix. fakeroot-hurd, however, is
based on the auth partial subhurd, which thus just works.

So in the end one can just use fakeroot-hurd + chroot.

Samuel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.