Hi Josch, [I did not get your email, I just saw it in the mail archives...]
thanks for the overview and the reference to the bug ticket. I've succeeded with the fakechroot/fakeroot approach and got the required inspiration for setting LD_LIBRARY_PATH from your tool and https://bugs.debian.org/855234 <https://bugs.debian.org/829134> (libsystemd-shared wanted to be found as well). Thanks for your help, Christoph Hi, > > (please CC me, I'm not subscribed to d-user@l.d.o) > > Quoting Christoph Müllner (2020-02-09 12:54:56) > > I'd like to run the second stage of debootstrap without root rights, but > for > > another architecture (host is x86_64 and target is arm64). > > > > I know how to do all that with root rights (i.e qemu-aarch64-static works > > perfectly here, also, I can recommend using qemu-debootstrap), but I > can't > > figure out a way how to do that without root rights. > > > > I was expecting that fakechroot and fakeroot will do the necessary > "magic" to > > make chroot work for my use-case, but that's not the case (I need to have > > libfakeroot.so and libfakechroot.so in the target rootfs, but I could not > > find a reliable way to get them in). > > > > I found some emails in the archives about similar use cases (from ~10 > years > > ago). But I failed to identify the solution in those cases. > > > > Therefore I'd like to ask if anyone has a solution for my use case or > some > > hints/pointers. > > yes, there are several solutions. Either: > > a) You can use mmdebstrap which is a debootstrap replacement that focuses > on > not requiring superuser privileges and has foreign architecture support > built in: > > $ mmdebstrap --arch=arm64 unstable debian-unstable.tar > > b) There is a proof-of-concept that allows one to run debootstrap with > unprivileged usernamespaces here: https://bugs.debian.org/829134 This > will > probably also work with --second-stage > > c) Getting fakechroot and fakeroot to work with foreign architectures is > tricky > and requires the right libfakechroot.so being installed and several > environment variables to be set differently. You can have a look at how > mmdebstrap does this so that you can maybe replicate that for > debootstrap: > https://sources.debian.org/src/mmdebstrap/0.6.0-4/mmdebstrap/#L1942 > > Thanks! > > cheers, josch > > On Sun, Feb 9, 2020 at 12:54 PM Christoph Müllner <christoph...@gmail.com> > wrote: > >> Hi Debian users, >> >> I'd like to run the second stage of debootstrap without root rights, >> but for another architecture (host is x86_64 and target is arm64). >> >> I know how to do all that with root rights (i.e qemu-aarch64-static works >> perfectly here, >> also, I can recommend using qemu-debootstrap), but I can't figure out a >> way how to do >> that without root rights. >> >> I was expecting that fakechroot and fakeroot will do the necessary "magic" >> to make chroot work for my use-case, but that's not the case (I need to >> have libfakeroot.so >> and libfakechroot.so in the target rootfs, but I could not find a >> reliable way to get them in). >> >> I found some emails in the archives about similar use cases (from ~10 >> years ago). >> But I failed to identify the solution in those cases. >> >> Therefore I'd like to ask if anyone has a solution for my use case or >> some hints/pointers. >> >> Thanks, >> Christoph >> >>