Your message dated Sat, 11 Jun 2011 19:45:51 +0100
with message-id <[email protected]>
and subject line Re: Bug#630102: multistrap foreign: attempts to run foreign 
binaries in chroot
has caused the Debian Bug report #630102,
regarding multistrap foreign: attempts to run foreign binaries in chroot
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact [email protected]
immediately.)


-- 
630102: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=630102
Debian Bug Tracking System
Contact [email protected] with problems
--- Begin Message ---
Package: multistrap
Version: 2.1.14
Severity: important

Using following command:

| fakeroot /usr/sbin/multistrap -d $PWD/rootfs -f ./armel.conf

with following armel.conf inspired from shipped one:

|[General]
|arch=armel
|omitrequired=false
|configscript=
|setupscript=/usr/share/multistrap/setcrossarch.sh
|debootstrap=Debian
|aptsources=Debian
|cleanup=false
|noauth=false
|
|[Debian]
|packages=
|source=http://ftp.fr.debian.org/debian
|keyring=debian-archive-keyring
|suite=squeeze
|omitdebsrc=true

Stops with:

|I: Unpacking complete.
|Setting debconf dpkg-cross/default-arch to armel
|ERROR: ld.so: object 'libfakeroot-sysv.so' from LD_PRELOAD cannot be 
preloaded: ignored.
|[sudo] password for yann: 
|chroot: failed to run command `sh': Exec format error
|setupscript '/usr/share/multistrap/setcrossarch.sh' returned 126.

The setcrossarch.sh script does really try to run foreign sh and
debconf-set-selections !  Shouldn't this be done after initial target
boot instead ?  It would also remove the need for sudo, giving a
chance to unpriviledged rootfs build...

|# set the value inside the chroot
|echo "#!/bin/sh" > $dir/tmp/set.sh
|echo >> $dir/tmp/set.sh
|echo "export DEBIAN_FRONTEND=noninteractive DEBCONF_NONINTERACTIVE_SEEN=true 
LC_ALL=C LANGUAGE=C LANG=C" >> $dir/tmp/set.sh
|echo "echo debconf dpkg-cross/default-arch select 
$CROSSARCH|debconf-set-selections" >> $dir/tmp/set.sh
|echo "Setting debconf dpkg-cross/default-arch to $CROSSARCH"
|sudo chroot $dir sh /tmp/set.sh
|sudo rm $dir/tmp/set.sh


-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'oldstable'), (500, 'unstable'), (500, 
'stable'), (101, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.38.4 (SMP w/4 CPU cores)
Locale: LANG=C, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages multistrap depends on:
ii  apt                           0.8.14.1   Advanced front-end for dpkg
ii  libconfig-auto-perl           0.34-1     magical config file parser
ii  libparse-debian-packages-perl 0.01-2     parse the data from a Debian Packa
ii  perl                          5.12.3-7   Larry Wall's Practical Extraction 

Versions of packages multistrap recommends:
ii  emdebian-archive-keyring      2.0.1      GnuPG archive keys for the emdebia

Versions of packages multistrap suggests:
ii  fakeroot                      1.15.1-1   tool for simulating superuser priv

-- no debconf information



--- End Message ---
--- Begin Message ---
notfound 630102 2.1.14
quit

On Sat, 11 Jun 2011 00:11:24 +0200
Yann Dirson <[email protected]> wrote:

> |setupscript=/usr/share/multistrap/setcrossarch.sh

That is a cross-building script, intended to help set the
cross-building architecture in a native chroot which will then be used
to cross-build packages for that arch.

It is not multistrap's fault if you provide a setupscript which does
the wrong thing - it can be used by multistrap when the objective is
to build a cross-building chroot and there it works fine.

The clue is:

cfg="/etc/pdebuild-cross/pdebuild-cross.rc"

It is provided to assist pdebuild-cross.

> |Setting debconf dpkg-cross/default-arch to armel

Just what did you think this would do in your case?

What is the point of dpkg-cross in a bootable root filesystem???

> The setcrossarch.sh script does really try to run foreign sh and
> debconf-set-selections !  Shouldn't this be done after initial target
> boot instead ?  It would also remove the need for sudo, giving a
> chance to unpriviledged rootfs build...

The setcrossarch.sh script is intended to be run in a native chroot so
that this chroot can be configured to cross-build for the selected
architecture.

The setcrossarch.sh script cannot determine if it is mistakenly being
used in a foreign environment. User error.

> Shouldn't this be done after initial target
> boot instead ?  It would also remove the need for sudo, giving a
> chance to unpriviledged rootfs build...

A pbuilder chroot is never booted. It is used to build packages and
pbuilder always needs sudo to be able to access the chroot.

This is another non-bug.

There are many use-cases for a root filesystem - one is to create a
native chroot, another is a native chroot containing a cross-compiler
to build packages for a foreign architecture in a contained manner and
a third is to create a root filesystem of native or foreign packages
which can then be used to build a device using packages built in a
chroot. Multistap can do all of these permutations but you've
misunderstood the purpose of one of the scripts provided to support
cross-building and used it for no good purpose and for no useful effect
in a situation where what you want is a root filesystem, not a
cross-building chroot.

The reference to pdebuild-cross really should have been enough of a
clue.

-- 


Neil Williams
=============
http://www.linux.codehelp.co.uk/

Attachment: pgppm8ijdj7Kc.pgp
Description: PGP signature


--- End Message ---

Reply via email to