[buildd-tools-devel] Bug#779180: Honor chroot personality in setup (service) scripts

Jan-Marek Glogowski glogow at fbihome.de
Wed Feb 25 08:42:59 UTC 2015


Package: schroot
Version: 1.6.10-1
Severity: important
Debian Release: 8.0
Tags: patch

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.

So what is actually happening. Pasted From the RfC mails - thread is
here:
http://lists.alioth.debian.org/pipermail/buildd-tools-devel/2015-February/009398.html

> I don't have any own setup script.
> 
> I have a build / development system (Debian Wheezy), which is running
> icecc. It's 64bit. The build schroot is an Ubuntu Precise schroot, 32bit.
> 
> The config for the schroot contains the line "setup.services=iceccd", so
> an iceccd instance is started per schroot session. The schroots iceccd
> runs without remote connect, so just distributes jobs.
> 
> So the user hacks on LibreOffice in the schroot and compiles using all
> free icecc resources on several machines.
> 
> But without the patch / personality-helper, the schroot sessions iceccd
> is started in the host system context, so it thinks, it's running on a
> 64bit system and generates 64bit object files, which obviuosly fails to
> link, when the build system expects 32bit object files.

So I've basically derivated a small schroot helper "schroot-impersonate"
from "schroot-mount", which understands the schroot personality types
and starts a command with the chroots personality. This program is now
used in the service setup script and fixes my build problem.

Actually I think all command run in inside the chroot from a setup
scripts should set the personality, so this should become a schroot
chroot personality wrapper, as the personality should always and just be
applied in the chroot.

The two attached patches:

For schroot 1.6: was tested with the schroot-wheezy-backport git branch.
At applies to schroot-1.6 FWIW. The original patch was done 1/2 year
ago, but I did some cleanup and just a quick test and it still "seems to
work".

For schroot 1.7: was just compile tested - I currently don't have a
Jessie environment.

Regards,

Jan-Marek
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-personality-impersonator_1.6.patch
Type: text/x-patch
Size: 17971 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20150225/beb777c9/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-personality-impersonator_1.7.patch
Type: text/x-patch
Size: 18916 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/buildd-tools-devel/attachments/20150225/beb777c9/attachment-0003.bin>


More information about the Buildd-tools-devel mailing list