Fink:CleanBuild
From the Fink Wiki
Setting up a clean-build environment.
--Alexkhansen 19:47, 9 February 2008 (CET)
<currently under construction>
It's useful to build packages in a clean environment to detect missing BuildDepends. This scheme works for me, and is what I am currently using for validating packages on the tracker. The steps are
- Have the latest Xcode for your OS version installed.
- Bootstrap an auxiliary Fink tree. This is optional, but it will let you avoid having to disrupt your production Fink system. For best results:
- Download the most current tarball.
- Unpack it somewhere.
- Open a terminal window and change to the resulting directory, e.g. via cd fink-0.28.1.tar.gz.
- Run the bootstrap script via ./bootstrap. The script won't let you overwrite your existing Fink tree. The default choice if you already have a /sw directory is /sw2, so I'm going to use that as the prefix henceforth when I need to give one.
- Wait until the bootstrap is done.
- We will assume that you have an existing Fink tree, and we don't want the clean-build tree and the main tree to cross-talk--Alexkhansen 23:17, 20 February 2008 (CET) To use the auxiliary Fink tree, you're going to want to turn off the initialization in ~/.profile or wherever you do it. An easy option is to run
. /sw2/bin/init.sh
manually in a terminal session where you want your test build tree, and. /sw/bin/init.sh
for sessions where you want your production tree. Your paths may vary. - Turn on the unstable tree via
/sw2/bin/fink configure
. - Download new package descriptions via
/sw2/bin/fink selfupdate-rsync
.
- Test build procedure:
- Copy your package description over to the auxiliary tree.
- The following script will attempt to clean your tree back to a base install:
fink -y remove `/sw2/bin/fink list -t -i | grep -v apt | grep -v "\[" | cut -f2`
- Now build your package in the clean tree, preferably via
/sw2/bin/fink -l -m --build-as-nobody rebuild <packagename>
If you have any fatal missing BuildDepends, they will show up. - Rebuild your package in your production tree with logging turned on.
- Compare the log files and look for discrepancies.
- Clean /sw2
- Install your package in /sw2 and /sw and check the library content for both. There are several scripts to do that. One is http://www.finkdeveloper.net/svn/users/akh/maintainertools/fink-check-deps.plx .
- Make sure that the libraries are the same on the two outputs.
- Make sure all relevant dependencies are accounted for.

