[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. 04 déc. 2024 01:16:49 +0100, a ecrit:
> Quoting Johannes Schauer Marin Rodrigues (2024-07-15 11:38:37)
> > Quoting Johannes Schauer Marin Rodrigues (2024-05-21 11:50:25)
> > > In any case, things go much further now. The next problem is some missing
> > > DPKG_ROOT support in the hurd maintainer script. I opened a merge request
> > > here:
> > > 
> > > https://salsa.debian.org/hurd-team/hurd/-/merge_requests/1
> > 
> > thank you for uploading a new version of the hurd package including these
> > DPKG_ROOT changes! I just confirmed that these indeed do work as intended and
> > it is now possible to create minimal hurd tarballs containing kernel and
> > sysvinit using chrootless mode on linux like this:
> 
> Theodore Ts'o just put this into e2fsprogs main:
> 
> https://github.com/tytso/e2fsprogs/commit/6ba18ef7bf4bec1f2fd738d52a42181baa6bafbf
> 
> And it already landed in unstable:
> 
> https://tracker.debian.org/news/1589306/accepted-e2fsprogs-1472rc1-1-all-amd64-source-into-unstable/

Great :)

> So now I can create bootable ext2 hurd-i386 disk images on my arm64 Linux box.

That's cool :) I'll have to see if I can then automate the building of
the image that I put on cdimages.

>     mmdebstrap --variant=apt \
>         --include=passwd,debian-ports-archive-keyring,mmdebstrap,sysvinit-core,sysv-rc,e2fsprogs,libarchive13 \

It's odd that you need to ask for libarchive13 explicitly? Ideally
others would be automatically included too (notably the port archive
keyring since it's a debian-port, sysvinit because it's not linux)

>             --include=sysvinit-core,sysv-rc,debian-ports-archive-keyring,gnumach-image-1-486

Here, also, the kernel should be autodetected?

>             | chroot "$1" /sbin/mkfs.ext2 -q -F -o hurd -I 128 -b 4096 -d - /tmp/hurd.ext2 204800' \

-I 128 -b 4096 are useless, -o hurd is enough to automatically get
everything that is needed.

> I think this is pretty cool. A bootable GNU/Hurd disk image created on Linux
> from first principles, straight from the ports.d.o apt mirrors without going
> through d-i or downloading disk images and thus everything that we built is
> verified using GPG (via debian-ports-archive-keyring). No superuser privileges
> required. Works when running from Debian stable.

Yay :)

Also, I didn't know about the -d option of mke2fs. We can probably use
it in d-i and drop the genext2fs package.

> The only wrinkle is, that the result is not yet bit-by-bit reproducible when
> having SOURCE_DATE_EPOCH and a uuid and hash_seed set... I'll investigate that.

Thanks.

> Do you think this milestone deserves some wider attention?

>From bootstrap/crossbuild/etc. point of view, yes, this is interesting.

> I also plan to add this to the dpkg-root-demo salsa CI pipeline to make sure
> that this setup keeps working going forward.

Yes, that'll be a useful CI.

Samuel


Reply to: