Fink:CleanBuild

From the Fink Wiki

Jump to: navigation, search

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

  1. Have the latest Xcode for your OS version installed.
  2. Bootstrap an auxiliary Fink tree. This is optional, but it will let you avoid having to disrupt your production Fink system. For best results:
    1. Download the most current tarball.
    2. Unpack it somewhere.
    3. Open a terminal window and change to the resulting directory, e.g. via cd fink-0.28.1.tar.gz.
    4. 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.
    5. Wait until the bootstrap is done.
    6. 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.
    7. Turn on the unstable tree via
      /sw2/bin/fink configure
      .
    8. Download new package descriptions via
      /sw2/bin/fink selfupdate-rsync
      .
  3. Test build procedure:
    1. Copy your package description over to the auxiliary tree.
    2. 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`
    3. 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.
    4. Rebuild your package in your production tree with logging turned on.
    5. Compare the log files and look for discrepancies.
    6. Clean /sw2
    7. 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 .
      1. Make sure that the libraries are the same on the two outputs.
      2. Make sure all relevant dependencies are accounted for.
Personal tools