[buildd-tools-devel] [RfC] Honor chroot personality in setup service script

Jan-Marek Glogowski glogow at fbihome.de
Thu Feb 5 15:46:45 UTC 2015


Hi Lennard

Am 05.02.2015 um 15:57 schrieb Lennart Sorensen:
> On Thu, Feb 05, 2015 at 03:17:12PM +0100, Jan-Marek Glogowski wrote:
>> Hi *,
>>
>> schroot allows to set a Linux personality for chroots, e.g. to run a
>> 32bit chroot on a 64bit system. And there is a schroot setup script to
>> start services when entering the schroot. But these service setup script
>> ignores the personality; that's my problem.
>>
>> I'm building packages inside an 32bit schroot using icecc. As a
>> consequence the icecc daemon thinks it's running on a 64bit system,
>> which actually breaks the build, as this somehow produces 64bit object
>> files, even if the schroot process honors the personality and configure
>> uses 32bit.
> 
> Does running 'linux32 schroot -c whatever' solve it?  After all linux32
> just makes uname return i686 or whatever instead of x86_64.  I thought
> schroot did that too when you told it the chroot should be 32 bit.

All the setup.d scripts run "outside" of the chroot without the schroots
personality set (for mounts, nss copy etc.). The personality is just set
before executing the final chroot command - be it /bin/bash or whatever
you specify.

Calling "linux32 schroot" is not really a workaround. There is a reason
to specify the personality inside the config file, so people don't have
to remember it.

Probably all setup schripts should run with the correct personality when
calling a command inside the chroot, so we should actually wrap the
system chroot command?

> personality=linux32 in the schroot config should do that for you.
> 
> Certainly that works for me, and nothing has ever thought it was on a
> 64bit system inside the chroot with that setting.

This just works for the final command inside the chroot, not the setup
scripts.

Jan-Marek



More information about the Buildd-tools-devel mailing list