[buildd-tools-devel] Bug#610689: sbuild: cross build support

Hector Oron hector.oron at gmail.com
Thu Mar 10 16:52:01 UTC 2011


Hello,

  I have a set of patches at:
    < http://git.debian.org/?p=users/zumbi/sbuild.git;a=shortlog;h=refs/heads/zumbi/cross-build
>

  We still do not know how to properly hook cross dependency
resolvers, but there are a couple of options (embuilddeps and xapt)
provided by `xapt' package.

  Basically I am doing the following:

  Use git to clone the zumbi/cross-build branch
    git clone git://git.debian.org/git/users/zumbi/sbuild.git -b
zumbi/cross-build
    cd sbuild
    ./bootstrap
    debuild
    sudo dpkg -i ../*.deb

  Create a chroot
    sudo sbuild-createchroot sid /srv/chroot/sid-amd64-sbuild
http://ftp.uk.debian.org/debian

  Add new user
    sudo sbuild-adduser zumbi

  Copy sbuildrc configuration file
    cp /usr/share/doc/sbuild/examples/example.sbuildrc /home/zumbi/.sbuildrc

  Follow the instructions to update and upgrade
    cd /path/to/source
    sbuild-update <distribution>
    sbuild-upgrade <distribution> apt-get upgrade
    (or "sbuild-apt <distribution> apt-get -f install"
        first if the chroot is broken)
    sbuild -d <distribution> <package>_<version>

  Install cross toolchains in the chroot
    schroot -u root -c /srv/chroot/sid-amd64-sbuild
    echo "deb http://emdebian.org/debian squeeze main" >>
/etc/apt/sources.list.d/emdebian.list
    apt-get update
    apt-get install linux-libc-dev-armel-cross libc6-dev-armel-cross \
        gcc-4.3-arm-linux-gnueabi g++-4.3-arm-linux-gnueabi

  Having made a chroot called sid-amd64-sbuild build a package with
    sbuild -d sid-amd64-sbuild hello_2.6-1

  Cross build that same package with
    sbuild -d sid-amd64-sbuild hello_2.6-1 --host=armel --build=i386

  Resolve cross dependencies calling
    sbuild -d sid-amd64-sbuild --host=armel --build=amd64
--build-dep-resolver=xapt mc_4.7.0.9-1.dsc

 Issues I am having...
  1. schroot sessions do not end, so I end up having a bunch of sessions opened
  2. xapt resolver is not doing its job, alternatively embuilddeps
could be used.

  Brief explanation on cross resolvers:
  1. xapt
     `xapt' should work if a list of packages is passed in its command line:
       xapt -a $HOST_ARCH $PACKAGE_LIST
  2. embuilddeps
     `embuilddeps' parses control file information to extract the
packages list, then passes this list to xapt
     Usually `embuilddeps' need to be run under unpacked package
directory: embuilddeps -a $HOST_ARCH
     Neil Williams, `embuilddeps' maintainer has updated this package
to allow -d option, so one can tell directly to embuilddeps where is
the unpacked package to resolve dependencies.
     I.e.,
       `embuilddeps -a $HOST_ARCH -d /path/to/unpacked/directory'

  It would be really nice if we enhance sbuild with cross support.

Best regards and thanks for your support,
-- 
 Héctor Orón

"Our Sun unleashes tremendous flares expelling hot gas into the Solar
System, which one day will disconnect us."

-- Day DVB-T stop working nicely
Video flare: http://antwrp.gsfc.nasa.gov/apod/ap100510.html





More information about the Buildd-tools-devel mailing list