[arch-dev-public] Building in chroots

Allan McRae allan at archlinux.org
Wed Jan 14 02:07:12 EST 2009

Aaron Griffin wrote:
> On Tue, Jan 13, 2009 at 10:20 PM, Allan McRae <allan at archlinux.org> wrote:
>> Hi,
>> It has come to my attention that some people are not building packages in a
>> clean chroot and others are managing the chroots themselves so I wrote a
>> brief wiki entry on the scripts provided in devtools to do this [1].  Any
>> comments on how to improve it would be appreciated.  I have not added a
>> section on using these tools to build i686 packages on x86_64 as I have not
>> attempted that, so if someone could try that out and add it to the page,
>> that would be appreciated.
>> [1]
>> http://wiki.archlinux.org/index.php/DeveloperWiki:Building_in_a_Clean_Chroot
> Great writeup Allan. I had been meaning to do this for some time.
> The only thing I can think of would be a mention that this does use
> unionfs to maintain the clean chroot, so all changes made while
> building, and all deps installed (as depends or makedepends) are never
> installed to the actual chroot itself. So no matter what, the chroot
> is always clean (though the <chrootdir>/rw dir may become dirty.
> I don't know if you'd phrase that better than I. It's always good to
> see docs written by someone who did not make the tools themselves. It
> helps clear things up.

I will add some clarification along these lines to the page. 

> When I was running the 64bit build server, I actually had one main
> chroot at /var/archroot/ and symlinked that in
> /etc/skel/<chrootdir>/root. This way all users on the system shared
> one global chroot, which was updated by a cron job ever hour or so.
> Additionally, I never tested this with 32bit chroots on a 64bit
> system. I *think* it might just be a matter of running things with
> "linux32", but I'm not too sure.

Having a comp for each arch, I have never tried any of this out so be 
prepared for the potentially stupid question that follows...  Is that 
the "linux32" from util-linux-ng?  Because I notice there is a linux64 
in that package too.  So can I build x86_64 packages on my i686 using 
that (given my processor supports x86_64)?  I guess I might need a 
non-standard kernel to do that...


More information about the arch-dev-public mailing list