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

Re: sbuild on hurd-amd64...



Johannes Schauer Marin Rodrigues, le sam. 06 sept. 2025 16:42:40 +0200, a ecrit:
> If fakeroot-hurd is something that you wrap the mmdebstrap call in, then it's
> not something that mmdebstrap should call. Instead, mmdebstrap should be able
> to do the right thing when it is run inside fakeroot-hurd on hurd, no?

Yes, but it'd be simpler if mmdebstrap could just call fakeroot itself
as appropriate. I actually already does use fakeroot-tcp/sysv, it could
use fakeroot-hurd.

> > > > on GNU/Hurd it should be using chroot instead of using the fragile
> > > > fakechroot. I had tried to create a hurdish fakechroot that just calls
> > > > chroot(), but apparently mmdebstrap is expecting various fakechroot
> > > > environment variables, I didn't easily manage to find out what.
> > > 
> > > Instead of you creating a fakechroot for hurd which is close enough to the
> > > fakechroot on linux, lets instead fix mmdebstrap to do the right thing on
> > > hurd out-of-the-box. I'll gladly accept patches!
> > 
> > I don't really know where one would tell mmdebstrap to just use chroot.
> 
> That's --mode=root.

But we are not root here.

I mean, I understand what you mean technically, but that's not what
users will understand from the documentation. What I understand from
"--mode=root" is that mmdebstrap should be run as root (or be given
sudo rights), while it's not what we want to achieve. We still do need
fakeroot in the play to be able to get files recorded as seemingly root
and other debian users.

> Could you try this patch: https://paste.debian.net/hidden/8e5bf3c7/
> 
> And then run mmdebstrap with --skip=check/root,check/canmount which should
> disable both checks that made it fail before and then hopefully you get a bit
> further.

But then permissions will be all wrong, we need fakeroot for that.

> > > I can easily implement the --skip=... options mentioned above but I'll need
> > > help with adding hurd-specific things.
> > 
> > I don't think there is really much hurd-specific. Really I believe it's
> > just about calling fakeroot-hurd and chroot, just like you would use
> > fakeroot + chroot on linux.
> 
> Except that fakeroot is not doing chroot at all.

We are misunderstanding each other because we are not talking about the
same views.

> And even fakeroot+fakechroot is not doing any actual chroot. It's just
> intercepting and modifying syscalls.

I mean from the calling perspective, not from the actual technical
things that get achieved.

I know the latter. But I don't know the mmdebstrap code at all (and have
just no time available to study it), but I'm quite sure that the code
path that mmdebstrap already has to call fakeroot+fakechroot would be
essentially the same to call fakeroot-hurd+chroot. And you do not need
any particular hurdish knowledge there: fakeroot-hurd is usable exactly
like fakeroot-tcp/sysv, and chroot is just the normal chroot as one
would use it on linux.

Samuel


Reply to: