Subject: Re: chroot+union pkgsrc builds (was Re: pkg_install BIG problem)
To: Eric Haszlakiewicz <email@example.com>
From: Douglas Wade Needham <firstname.lastname@example.org>
Date: 12/10/2004 17:57:09
Quoting Eric Haszlakiewicz (email@example.com):
> On Fri, Dec 10, 2004 at 08:20:12AM -0500, Douglas Wade Needham wrote:
> > 1) What are your null and union mounts? I only have union mounts, and
> > here is the output for df on my system, as it currently does the
> > pkgsrc phase of a build.
> Snippet of mount output:
Mmmm...gonna have to investigate null mounts a bit more. But as you
say, I don't chroot for the base builds. Almost all of the time, I
just create a clean build directory, union mount the source
directories under it (no need to create obj dirs, etc), create release
and destdir directories, and run build.sh.
BTW...mentioned previously in the mailing lists, these scripts are
viewable at the following URL:
In the case of the base OS build, I run do_build.sh, and then I run
mk_pkgs.sh to build the pkgsrc packages I want.
> Since the base system has build.sh I don't use a chroot to build those.
> > 2) Have you seen any oddities with files on the bottom side of union
> > mounts behaving oddly? I see the jdk/jre distfiles appear
> > corrupted about 50% of the time, and so have taken to copying them
> > into the top directory before I do the union mount. Unfortunately,
> > I have not had enough time to diagnose it further so that I could
> > express it in a PR.
> Nope. I've been pleasantly surprised with how stable things have been.
> However, I have gotten occasional panic's if I reboot w/o unmounting the
> union mounts.
Like you say, things are remarkably stable. Indeed, I had my main
desktop at my previous employer running 1.5 alpha, and never had a
crash in nearly 4 years (when I was laid off). Because of work
demands, I never had a chance to upgrade it, and the Only downtimes
were to move drives to other systems, add drives, or replace them.
I had uptimes nearing a year each time, and I did countless builds
using chroot and union mounts during all that time.
Yea, been bitten by that one more times than I could count, and I
wrote a little rc script which keeps me from getting nailed by it. At
the time, I was working for Lucent, and they made me sign a employee contract
which prevented me from contributing, so I never tracked down the
cause and wrote a PR. Gonna have to do that some time, but in the meantime,
take a look in http://www.ka8zrt.com/cgi-bin/cvsweb.cgi/lsrc/etc/rc.d/
at my mountunion script.
> Corrupted how? Does the actual file data get corrupted, or just
> when you try to access it through the mounted directory?
I have not looked at it in detail, but the fetch phase of the build
predominately does not work. In part because of that employee
contract, and in part due to time constraints, I just threw together a
quick solution and just started copying the files into the sandbox
before I mounted the source trees under it. I actually want to do a
detailed analysis of this sometime to characterize it and see if it is
consistent or random, etc.
Douglas Wade Needham - KA8ZRT UN*X Consultant & UW/BSD kernel programmer
Email: cinnion @ ka8zrt . com http://cinnion.ka8zrt.com
Disclaimer: My opinions are my own. Since I don't want them, why
should my employer, or anybody else for that matter!