[buildd-tools-devel] Bug#609151: Bug#609151: [Fwd: Re: Bug#609151: sbuild reported architecture is wrong when using a chroot with a personality]

Roger Leigh rleigh at codelibre.net
Sat Jan 8 10:54:14 UTC 2011


On Fri, Jan 07, 2011 at 03:16:06PM -0600, Jamie Strandboge wrote:
> On Fri, 2011-01-07 at 19:30 +0000, Roger Leigh wrote: 
> > > An easy fix is to start the chroot and set the Arch before before
> > > calling open_build_log(), which is what earlier versions of sbuild did.
> > > Attached is a patch to do just that.
> 
> > The arch is initially set from the host architecture.  You can set this
> > using the --arch option, which you should arguably be doing if the
> > host and build arches differ.
> > 
> Hmm, this used to work with 0.60.0-2, but I guess it was changed due to
> the issues you mention below.

Yes.  I originally changed it as in your patch, but subsequently had to
revert it due to the complaints I mentioned.  It's a bit of a chicken-
and-egg situation.  We need the arch to open the build log, but we can't
get it until we've started the session, which needs logging.

> > Now, we have
> > not currently got any way of specifying this automatically; I may add a
> > suitable configuration option to schroot, I've been considering it for
> > a while.  But I think that at present you should be using the --arch
> > option which is also used to search for the correct chroot.
> > 
> > i.e. you should be using
> > 
> >   -d maverick --arch=i386
> > 
> > rather than
> > 
> >   -d maverick-386
> >
> > since the latter also rewrites the architecture in the .changes; if
> > you want to specify a specific chroot, then use the --chroot option
> > rather than --dist.  --dist specifies the exact distribution, while
> > --chroot specifies the build chroot (which normally defaults to a
> > chroot based upon the distribution and architecture set e.g.
> > maverick-i386-sbuild).
> 
> This makes sense. I'll adjust our build scripts accordingly. Thanks for
> your consideration and thoughtful response.

No problem.

I've been thinking about how to better deal with this.  I think what
might be appropriate is to check if the chroot architecture and
requested architecture match after starting the session as a sanity
check.  If --arch is missing and you're e.g. using an i386 on amd64,
you'll then get a failure due to the mismatch.  If you use --arch=i386,
it'll then match and everything will work as normal.  This might cause
problems for users not currently using --arch, but it'll make things
explicit and robust, and we can make sbuild issue an informative
message telling the user to use --arch.

Would such a change be acceptable to you?


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20110108/e8af274e/attachment.pgp>


More information about the Buildd-tools-devel mailing list