[arch-dev-public] Building in chroots

Aaron Griffin aaronmgriffin at gmail.com
Wed Jan 14 00:56:30 EST 2009


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.

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.


More information about the arch-dev-public mailing list