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

Re: A couple of polystrap patches, and more problems to be solved

On Wed, Jun 29, 2011 at 11:09:51PM +0200, dirson@debian.org wrote:
> [PATCH 1/3] Use cdn.debian.net as default mirror.
>  Although most people doing heavy use of polystrap/multistrap will use
>  local mirrors, providing a sane official mirror in default/config seems
>  a good idea to me.
good idea! done.

> [PATCH 2/3] Support -n flag to run multistrap --simulate instead.
>  At least that helped me to go forward, could be useful to others
> [PATCH 3/3] Documentation improvements.
>  That one is probably just a start: although those steps were
>  necessary to make progress, I still could not run the postinsts.
> It looks like fakeroot and fakechroot are both required in the rootfs:
> [...]
> Has anyone encountered this problem ?
You need to make foreign fakeroot/fakechroot libraries accessible by
putting shared libraries of your target architecture in the adequate
library directory. For example for armel I do this:

wget http://ftp.debian.org/debian/pool/main/f/fakechroot/fakechroot_2.14-1_armel.deb
wget http://ftp.debian.org/debian/pool/main/f/fakeroot/fakeroot_1.14.5-1_armel.deb
sudo mkdir -p /usr/lib/arm-linux-gnueabi/
dpkg-deb --fsys-tarfile fakeroot_1.14.5-1_armel.deb | sudo tar -xf - --strip-components=4 -C /usr/lib/arm-linux-gnueabi/ ./usr/lib/libfakeroot/libfakeroot-sysv.so
dpkg-deb --fsys-tarfile fakechroot_2.14-1_armel.deb | sudo tar -xf - --strip-components=4 -C /usr/lib/arm-linux-gnueabi/ ./usr/lib/fakechroot/libfakechroot.so

Probably also something that multiarch is able to solve?

> Nevertheless, even with that hack, polystrap later fails with:
> + fakechroot chroot qtmoko-rootfs /var/lib/dpkg/info/bluez-alsa.preinst install
> [...]/qtmoko-rootfs/bin/sh: Can't open /var/lib/dpkg/info/bluez-alsa.preinst
> ... although that preinst script does exist in the rootfs.  However,
> it does not exist in my /, whereas the ones which were successfully
> launched do exist.

This sounds like: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=611156

> It then fails the known insserv error, /sbin not being in the user's PATH
> BTW, multistrap being in /usr/sbin/ for some reason, I already had to
> add /usr/sbin to my PATH.  Now if I invoke polystrap as follows, at
> least the preinst step completes (with uninitialized values in
> debconf, which will probably have to be hunted down later):
> PATH=$PATH:/sbin:/usr/sbin ./polystrap.sh ../qtmoko/emdebian

Do a git pull - an extended PATH is implemented since yesterday.

> Hm, not so true: x11-common still spits an anoying error:
> + fakechroot chroot qtmoko-rootfs /var/lib/dpkg/info/x11-common.preinst install
> Use of uninitialized value in concatenation (.) or string at /usr/share/perl5/Debconf/Config.pm line 22.
> /var/lib/dpkg/info/x11-common.config: 127: awk: not found
> /var/lib/dpkg/info/x11-common.preinst: 134: awk: not found
> ...although I have gawk installed, the alternative has not been
> created at that time.

Maybe connected to the fakechroot issue? Or in some other way connected
to the unsolved problems above? See if it's still there once you have
the fakeroot/fakechroot libraries in /usr/lib/arm-linux-gnueabi/ and
fixed your fakechroot with the patch I provided in the bugreport.

> <digression>
> Looks like a sign that a step-by-step process would be needed, much
> like apt is capable to finish configuration of some packages before
> unpacking others.  In that case, it could be sufficient to first
> install and configure the base system, and then call multistrap a
> second time for extra packages - or make it just generic and let the
> user define as many successive multistrap runs as he may need.
> This also brings me to another question: the run of *.preinst _after_
> having unpacked the deb.  While it is probably necessary (and maybe
> even safe ?  I have not looked at how d-i does) for essential
> packages, for installation of later packages, it would surely be safer
> to run the preinst first, as they are intended.  That also seems to
> hint for multiple steps, with "unpack-before-preinst" being a per-step
> option.
> </digression>
> Afterwards, both configure attempts fail because of lack of ldconfig -
> I'm not sure to understand what is supposed to provide them:
> + fakechroot chroot qtmoko-rootfs /usr/bin/dpkg --configure -a
> dpkg: warning: 'ldconfig' not found in PATH or not executable.
> dpkg: 1 expected program not found in PATH or not executable.
> NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.
> + fakechroot chroot qtmoko-rootfs /usr/bin/dpkg --configure -a
> dpkg: warning: 'ldconfig' not found in PATH or not executable.
> dpkg: 1 expected program not found in PATH or not executable.
> NB: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin.

Using your provided config I can perfectly build a qtmoko rootfs here.
So it might just still fail for you because of differently set up
/etc/qemu-binfmt/, /usr/lib/arm-linux-gnueabi/ and the patched
fakechroot I use.

hope this helps

cheers, josch

Reply to: