User's Guide - 5. The Fink Configuration File
This chapter explains the settings available in the Fink configuration
file (fink.conf) and how they influence the behaviour of Fink, specifically the fink
command-line tool (i.e. mainly working with the source distribution).
5.1 About fink.conf
When Fink is initially installed it prompts you for the answers to some
questions to set up your configuration file, such as which mirrors you want to use for downloading files
and how to acquire super-user rights. You can re-run this process by
calling the fink configure
command. In order to set some
options, you may need to edit your fink.conf file by hand. In
general, these options are meant for advanced users only.
The fink.conf file is located at
/opt/sw/etc/fink.conf
, and can be edited in your favourite
text editor. You will need super-user rights to edit it.
5.2 fink.conf syntax
Your fink.conf file consists of multiple lines, in the format:
OptionName: Value
Options are one per line, and the option name is separated from its value by a : and a single space. The contents of value depends on the option, but it is normally either a boolean ("True" or "False"), a string, or a list of strings delimited by a space. For example:
BooleanOption: True StringOption: Something ListOption: Option1 Option2 Option3
5.3 Required Settings
Some of the settings in the fink.conf
file are mandatory. Without
them Fink cannot function properly. The following settings belong to
this category.
-
Basepath: path
Tells fink where it was installed. Defaults to /opt/sw unless you changed it during the initial installation of the Fink distribution. You should not change this value after installation, it will confuse fink.
5.4 Optional User Settings
There are various optional settings which users can customize to change the behaviour of Fink.
-
RootMethod: su or sudo or none
For some operations, Fink needs super user rights. Recognized values are sudo or su. You can also set this to none, in which case you must run Fink as root yourself. The default value is sudo and in most cases it should not be changed.
-
Trees: list of trees
Available trees are:
local/main - any local packages you want to install local/bootstrap - packages used during the installation of Fink stable/crypto - stable cryptographic packages stable/main - other stable packages unstable/crypto - unstable cryptographic packages unstable/main - other unstable packages
You may also add your own trees in
/opt/sw/fink/dists
for your own purposes, but this is not necessary in most circumstances. The default trees are "local/main local/bootstrap stable/main". This list is automatically kept in sync with the/opt/sw/etc/apt/sources.list
file.The order of the trees is meaningful, as packages from later trees in the list may override packages from earlier ones.
- -
Distribution: 10.4
Fink needs to know which version of Mac OS X you are running. Mac OS X 10.0 and earlier are not supported, and 10.1 and 10.2 are no longer supported by current versions of
fink
. Mac OS X 10.2 users are restricted to fink-0.24.7, released in June 2005. This field is set by running the/opt/sw/lib/fink/postinstall.pl
script. You should not need to alter this value manually. -
FetchAltDir: path
usually
fink
will store the sources it fetches in/opt/sw/src
. You can specify an alternate directory to look for downloaded source code in using this option. For example:FetchAltDir: /usr/src
-
Verbose: a number from 0 to 3
This option sets how much information Fink tells you about what it is doing. The values are: 0 Quiet (don't show download stats) 1 Low (don't show tarballs being expanded) 2 Medium (shows almost everything) 3 High (shows everything) The default value is 1.
SkipPrompts: a comma-delimited list
(
fink-0.25
and later) This option instructsfink
to refrain from asking for input when the user does not want to be prompted. Each prompt belongs to a category. If a prompt's category is in the SkipPrompts list then the default option will be chosen within a very short period of time.Currently, the following categories of prompts exist:
fetch - Downloads and mirrors
virtualdep - Choosing between alternative packages
By default, no prompts are skipped.
-
NoAutoIndex: boolean
Fink caches its package description files in /opt/sw/var/db/fink.db to save it having to read and parse them all every time it runs. Fink checks whether or not the package index needs to be updated unless this option is set to "True". It defaults to "False" and it is not recommended that you change it. If you do, you may need to run the
fink index
command manually to update the index. -
SelfUpdateNoCVS: boolean
The command
fink selfupdate
upgrades Fink package manager to the latest release. This option makes sure that the Concurrent Version System (CVS) is not used to achieve this when set to True. It is set automatically by thefink selfupdate-cvs
command, so you should not need to change it manually. -
Buildpath: path
Fink needs to create several temporary directories for each package it compiles from source. By default, they are placed in
/opt/sw/src
on Panther and earlier, and/opt/sw/src/fink.build
on Tiger. If you want them to be somewhere else, specify the path here. See the descriptions of theKeepRootDir
andKeepBuildDir
fields in the Developer Settings section of this document for more information about these temporary directories.On Tiger, it is recommended that the Buildpath end with
.noindex
or.build
. Otherwise, Spotlight will attempt to index the temporary files in the Buildpath, slowing down builds. Bzip2Path: the path to your
bzip2
(or compatible) binary(
fink-0.25
and later) The Bzip2Path option lets you override the default path for thebzip2
command-line tool. This allows you to specify an alternate location to yourbzip2
executable, pass optional command-line options, or use a drop-in replacement likepbzip2
for decompressing.bz2
archives.
5.5 Download Settings
There are various settings which influence the way Fink downloads package data.
-
ProxyPassiveFTP: boolean
This option makes Fink use "passive" mode for FTP downloads. Some FTP server or network configurations require this option to be set to True. It is recommended that you leave this option on at all times since active FTP is deprecated.
-
ProxyFTP: url
If you use a FTP proxy then you should enter its address here, for example:
ProxyFTP: ftp://yourhost.com:2121/
Leave it blank if you do not use a FTP proxy.
-
ProxyHTTP: url
If you use a HTTP proxy then you should enter its address here, for example:
ProxyHTTP: http://yourhost.com:3128/
Leave if blank if you do not use a HTTP proxy.
-
DownloadMethod: wget or curl or axel or axelautomirror
Fink can use three different applications to download files from the Internet - wget, curl, or axel. The value axelautomirror uses an experimental mode of the axel application which tries to determine the closest server that has a certain file. The use of axel and axelautomirror are not recommended at this time. The default value is curl. The application you chose as DownloadMethod MUST be installed! (i.e.
fink
won't fall back to curl if you try to use a download application that isn't present. -
SelfUpdateMethod: point, rsync or git
fink
can use some different methods to update the package info files. rsync is the recommended setting; it uses rsync to download only modified files in the trees that you have enabled. Note that if you have changed or added to files in thestable
orunstable
trees, using rsync will delete them. Make a backup first, e.g. in yourlocal
tree. git will download using anonymous or Github access from the Fink repository. This has the disadvantage that git can not switch mirrors; if the server is unavailable you will not be able to update. point will download only the latest released version of the packages. It is not recommended as your packages may be quite out of date. SelfUpdateCVSTrees: list of trees
(
fink-0.25
and later) By default, the cvs selfupdate method will update only the current distribution's tree. This option overrides the list of distribu- tion versions that will be updated during a selfupdate. Please note that you will need a recent "cvs" binary installed if you wish to include directories that do not have CVS/ directories in their entire path (e.g., dists/local/main or similar).-
UseBinaryDist: boolean
Causes
fink
to try to download pre-compiled binary packages from the binary distribution if available and if the binary package is not already on the system. This can save a lot of installation time and it is therefore recommended to set this option. Passing fink the --use-binary-dist option (or the-b
flag) has the same effect, but only operates on that singlefink
invocation. Passingfink
the--no-use-binary-dist
flag overrides this, and compiles from source for that singlefink
invocation.Note that this mode instructs
fink
to download an available binary if that version is the latest available version of the package; it does not causefink
to choose a version based on its binary availability.
5.6 Mirror Settings
Getting software from the Internet can be a tedious thing and often downloads are not as fast as we would like them to be. Mirror servers host copies of files available on other servers, but may have a faster connection to the Internet or be geographically closer to you, thus enabling you to download files faster. They also help reduce load on busy primary servers, for example ftp.gnu.org, and they provide an alternative should one server not be reachable.
In order for Fink to pick the best mirror for you, you must tell it which continent and which country you reside in. If downloads from one server fail, it will prompt you if you want to retry from the same mirror, a different mirror in the same country or continent, or a different mirror anywhere in the world.
The fink.conf file holds settings about which mirrors you would like to use.
-
MirrorContinent: three letter code
You should change this value using the
fink configure
command. The three letter code is one found in/opt/sw/lib/fink/mirror/_keys
. For example, if you live in Europe:MirrorContinent: eur
-
MirrorCountry: six letter code
You should change this value using the
fink configure
command. The three letter code is one found in/opt/sw/lib/fink/mirror/_keys
. For example, if you live in Austria:MirrorCountry: eur-AT
-
MirrorOrder: MasterFirst or MasterLast or MasterNever or ClosestFirst
Fink supports 'Master' mirrors, which are mirrored repositories of the source tarballs for all Fink packages. The advantage of using the Master mirror set is that the source download URLs will never break. Users can choose to use these mirrors which are maintained by the Fink team, or to use only the original source URLs and external mirror sites such as the gnome, KDE, and debian mirror sites. Additionally users can choose to combine the two sets, which are then searched in proximity order, as documented above. When using the MasterFirst or MasterLast options, the user can 'skip ahead' to the Master (or non Master) set if a download fails. The options are:
MasterFirst - Search "Master" source mirrors first. MasterLast - Search "Master" source mirrors last. MasterNever - Never use "Master" source mirrors. ClosestFirst - Search closest source mirrors first (combine all mirrors into one set).
Mirror-rsync:
(
fink-0.25.2
and later) When doingfink selfupdate
with the SelfupdateMethod set torsync
, this is the rsync url to sync from. This should be an anonymous rsync url, pointing to a directory which contains all the fink Dis- trubutions and Trees.
5.7 Developer Settings
Some options in the fink.conf
file are only useful to
developers. We do not recommend that conventional Fink users modify
them. The following options fall into this category.
-
KeepRootDir: boolean
Causes
fink
not to delete the directoryroot-[name]-[version]-[revision]
in the Buildpath after building a package. Defaults to false. Be careful, this option can fill your hard-disk quickly! Passingfink
the -K flag has the same effect, but only operates on that singlefink
invocation. -
KeepBuildDir: boolean
Causes
fink
not to delete the directory[name]-[version]-[revision]
in the Buildpath after building a package. Defaults to false. Be careful, this fill your hard-disk quickly! Passingfink
the -k flag has the same effect, but only operates on that singlefink
invocation.
5.8 Advanced Settings
There are some other options which may be useful, but require some knowledge to get right.
-
MatchPackageRegEx:
Causes fink not to ask which package to install if one (and only one) of the choices matches the perl Regular Expression given here. Example:
MatchPackageRegEx: (.*-ssl$|^xfree86$|^xfree86-shlibs$)
will match packages ending in '-ssl', and will match 'xfree86' and 'xfree86-shlibs' exactly.
-
CCacheDir: path
If the Fink package
ccache-default
is installed, the cache files it makes while building Fink packages will be placed here. Defaults to/opt/sw/var/ccache
. If set tonone
, fink will not set the CCACHE_DIR environment variable and ccache will use$HOME/.ccache
, potentially putting root-owned files into your home directory. Only available in fink newer than version 0.21.0. NotifyPlugin: plugin
Specify a notification plugin to tell you when packages have been installed/uninstalled. Defaults to Growl (requires
Mac::Growl
to operate). Other plugins can be found in the/opt/sw/lib/perl5/Fink/Notify
directory. Onfink-0.25
and later they are listed in the output offink plugins
. See the Fink Developer Wiki for more information.AutoScanpackages: boolean
When
fink
builds new packages,apt-get
does not immediately know about them. Historically, the commandfink scanpackages
had to be run forapt-get
to notice the new packages, but now this happens auto matically. If this option is present and false, thenfink scanpackages
will no longer be run automatically after packages are built. Defaults to true.ScanRestrictivePackages: boolean
When scanning the packages for
apt-get
,fink
normally scans all packages in the current trees. However, if the resulting apt repository will be made publically available, the administrator may be legally obligated not to include packages withRestrictive
orCommercial
licenses. If this option is present and false, then Fink will omit those packages when scanning.
5.9 Managing apt's sources.list file
Fink actively manages the file
/opt/sw/etc/apt/sources.list
which is used by apt to locate
binary files for installation. The default sources.list file looks
something like this, adjusted to match your Distribution and Trees:
# Local modifications should either go above this line, or at the end. # # Default APT sources configuration for Fink, written by the fink program # Local package trees - packages built from source locally # NOTE: this is automatically kept in sync with the Trees: line in # /opt/sw/etc/fink.conf # NOTE: run 'fink scanpackages' to update the corresponding Packages.gz files deb file:/opt/sw/fink local main deb file:/opt/sw/fink stable main crypto # Official binary distribution: download location for packages # from the latest release deb http://us.dl.sourceforge.net/fink/direct_download 10.3/release main crypto # Official binary distribution: download location for updated # packages built between releases deb http://us.dl.sourceforge.net/fink/direct_download 10.3/current main crypto # Put local modifications to this file below this line, or at the top.
With this default file, apt-get first looks in your local installation for already-compiled binaries, and then looks in the official binary distribution. You can alter this by making entries at the beginning of the file (which will be searched first) or at the end of the file (which will be searched last).
If you change your Trees line or the Distribution you are using, fink will automatically modify the "default" portion of the file to correspond to the new values. Fink will, however, preserve any local modifications you have made to the file, provided that you confine your modifications to the top of the file (above the first default line) and the bottom of the file (below the last default line).