|Available Languages: | Deutsch | English | Español | Français | 日本語 (Nihongo) | Português | Русский (Russkiy) | 中文 (简) (Simplified Chinese) ||
This document gives an overview over all features of Fink. (The following older documents may offer a broader view: Installation, Usage and the ReadMe.rtf included in the binary distribution disk image.) Also check out the documentation section of the web site, it has some other useful documents beyond that.
Welcome to the Fink User's Guide. This guide covers first time installation and upgrade procedures for both the source and the binary distribution. Package installation and maintenance is covered as well.
Fink is a distribution of Unix Open Source software for Mac OS X and Darwin. It brings a wide range of free command-line and graphical software developed for Linux and similar operating systems to your Mac.
In any case you will need:
An installed Mac OS X system, version 10.4 or later, or equivalent Darwin releases. Earlier versions of both will not work. See below for more information about supported systems.
Internet access. Both source code and binary packages are downloaded from Internet download sites.
If you intend to use the source distribution (see below), you will also need:
Developer tools. On Mac OS X, install the XcodeTools.mpkg package from the installation DVD, or download the latest version--this is often desirable, as later versions frequently fix issues (though admittedly sometimes they break things). Note that the tools must match your Mac OS X version.
It's a good idea to have XCode installed even if you don't intend to build packages from source. Some of the programs installed by the package are actually general purpose command line tools. Some packages may depend on those to run.
Patience. Compiling several big packages takes time. I'm talking hours or even days here.
Mac OS X 10.6 is the leading-edge platform, and is considered to be
fully supported and tested, though as a newer operating system there are still some issues. Most of the developers run it, and those who are running 10.4 have 10.5 users test their work.
Mac OS X 10.5 is considered to be
fully supported and tested, although there may still be stray compile problems with single packages. Many of the developers run it, and those who don't have 10.4 users test their work.
Mac OS X 10.4 will be deprecated soon. It is considered to be
fully supported and tested.
Software is written ("developed") in human-readable programming languages; this form is called the "source code". Before a computer can actually run a program, it must be transformed into low-level machine code instructions (unreadable by most humans). That process is called "compiling" and the resulting program is called "executable" or "binary". (The process is also referred to as "building", because it usually involves more steps than just compiling.)
When you buy commercial software you don't get to see the source code, though - companies treat it as a trade secret. You only get the ready-to-run executable, which means you have no way to modify the program or even find out what it actually does when it's run.
Not so with Open Source software. As the name implies, the source code is open for anyone to see and modify. In fact, most Open Source software is only distributed as source code by its authors, and you must compile it on your computer to get a program that can be run.
Fink lets you choose between the two models. The "source" distribution will download the original source, adapt it to Mac OS X and to Fink's policy, and compile it on your computer. That process is fully automated, but takes some time. The "binary" distribution on the other hand will download pre-compiled packages from the Fink site and install those, saving you the time for compiling. It is actually possible to mix the two models at will. The rest of this manual will show you how.
During first time installation, a base system with the package management tools is installed on your machine. After that you must set up your shell environment to use the software installed by Fink. You only need to do this once; you can upgrade any Fink installation in place, without reinstalling. This is covered in the Upgrading chapter.
Once you have the package management tools installed, you can use them to install more software. This is covered in the Installing Packages chapter.
The binary distribution comes as a Mac OS X installer package (.pkg), wrapped in a disk image (.dmg). After downloading the disk image from the download page (you may have to use your browser's "Save Target as..." or "Download to Disk" function), double-click it to mount it. Open the "Fink 0.x.x Installer" disk icon that appears on your desktop (or wherever you downloaded it) after Disk Utility has verified the file. Inside you'll find some documentation and an installer package. Double-click the installer package and follow the instructions on screen.
You will be asked for an administrator password and shown some texts. Please read them - they may be more up-to-date than this user's guide. When the installer prompts you for a drive to install to, be sure to pick your system volume (the one on which you installed Mac OS X). If you pick the wrong volume, the install will proceed, but Fink won't work afterwards. When the installer is finished, proceed with the Setting Up Your Environment section.
The source distribution comes as a standard Unix tarball (.tar.gz). It contains only the fink package manager and will download the source for packages on the fly. You can get it from the download page. Older versions of StuffIt Expander have difficuly with handling long file names, so if you have any problems you'll need to remove the folder it generates and follow the command-line instructions below.
The source release must be installed from the command line, so open Terminal.app and change to the directory where you put the fink-0.27.x.tar.gz archive. Your web browser may have partially extracted the archive; in this case you will have fink-0.27.x.tar in your download directory, and you should skip the first command below. The following commands extract the archive:
gunzip fink-0.27.x.tar.gz tar -xf fink-0.27.x.tar
That creates a directory with the same name as the archive. We'll just keep on using the placeholder fink-0.27.x here. Now, change into that directory and run the bootstrap script:
cd fink-0.27.x ./bootstrap
The script will run some checks on your system and use sudo to become root - that will prompt you for your password. Then, the script will ask you for the installation path. Unless you have a good reason, you should use the default - /sw. Only that will allow you to install downloaded binary packages later on. Also, all examples use that path; be sure to substitute your actual path if you use a different one.
Next up is Fink configuration. You'll be asked for things like proxy and mirror settings and whether you want verbose messages. If you don't understand a question, just press return to accept the default choice. You can re-run this process later using the fink configure command.
When the bootstrap script has all the information it needs, it will start to download the source code for the base system and compile it. No further interaction should be necessary at this point. Don't worry if you see some packages being compiled twice. This is required because to build a binary package of the package manager, you first must have the package manager available.
When the bootstrap is finished, proceed with the Setting Up Your Environment section.
To use the software installed in Fink's directory hierarchy, including the package management programs themselves, you must set your PATH environment variable (and some others) accordingly. Current Fink versions do this automatically, and typically you will just need to open a new Terminal.app window to ensure that these settings are applied. However, in some instances you will need to proceed manually.
In most cases, you can do this by entering the command
in a terminal window.
Note that for some older versions of fink the program was called pathsetup.command, and one could run it via open /sw/bin/pathsetup.command.
However, if this doesn't work for some reason, you can configure it manually. This will depend on the shell you are using, however. You can determine the shell you are using by opening a terminal and running the command:
If it says "csh" or "tcsh" in it, you are using the C shell. If it is bash, zsh, sh, or something similar, you are likely running a variant of the bourne shell.
Bourne Shell (default on Mac OS X 10.3 and later)
If you use a Bourne style shell (e.g. sh, bash, zsh), add the following lines to the file .profile in your home directory (or, if you have an existing .bash_profile file, you should use that instead):
If you don't know how to add the line, run these commands:
cd pico .profile
You are now in a full-screen (well, full terminal window) text editor and can simply start typing the . /sw/bin/init.sh line. It's okay if there is a note that says "New file". Be sure that you pressed Return at least once after the line, then press Control-O, Return, Control-X to get out of the editor.
C Shell (default on Mac OS X 10.2 and earlier)
If you use tcsh, add the following line to the file .cshrc in your home directory:
If you don't know how to add the line, run these commands:
cd pico .cshrc
You are now in a full-screen (well, full terminal window) text editor and can simply start typing the source /sw/bin/init.csh line. It's okay if there is a note that says "New file". Be sure that you pressed Return at least once after the line, then press Control-O, Return, Control-X to get out of the editor.
There are a couple of common situations where you may need to edit additional files:
You have a ~/.tcshrc.
Such a file occasionally gets created by third-party applications, or you may have done it yourself. In any case what will happen is that ~/.tcshrc gets read and ~/.cshrc is ignored. The recommended procedure is to edit ~/.tcshrc in a similar manner to how you edited ~/.cshrc above, and add the following line at the end:
That way, if you ever need to remove ~/.tcshrc, you will be able to run Fink.
You followed the instructions under /usr/share/tcsh/examples/README.
These instructions tell you to create a ~/.tcshrc and a ~/.login . The problem in this case is with ~/.login, which gets run after ~/.tcshrc, and sources /usr/share/tcsh/examples/login. The latter contains a line that overwrites your previous PATH setup. What you should do in this case is create ~/Library/init/tcsh/path:
mkdir -p ~/Library/init/tcsh pico ~/library/init/tcsh/path
in it. You should also modify your .tcshrc as in item 1 above, to make sure that your PATH is set correctly for situations where ~/.login doesn't get read.
Editing .cshrc (and other startup files) will only affect new shells (i.e. newly opened Terminal windows), so you should also run this command in all Terminal windows that you opened before you edited the file. You'll also need to run rehash because tcsh caches the list of available commands internally.
Note that the init.sh and init.csh scripts also add /usr/X11R6/bin and /usr/X11R6/man to your PATH so you can use X11 when it is installed. Fink packages have the ability to add settings of their own, e.g. the qt package sets the QTDIR environment variable.
Once your environment is set up, you will need to grab package descriptions as per the Upgrading Fink chapter under Upgrading the Source Distribution, and then proceed to the Installing Packages chapter to see how you can install some actually useful packages using the various package management tools included in Fink.
Now that you have something that can be called a Fink installation, this chapter shows you how to install the actual software packages you came for. Before we explain how to install packages using either the source or the binary distribution, some important notes that apply to both.
dselect is a program that lets you browse the list of available packages and select which ones you want installed. It runs inside Terminal.app, but takes over the whole "screen" and uses simple keyboard navigation. Like the other package management tools, dselect requires root privileges, so you should use sudo (from an account with administrator privileges):
Note: dselect has known difficulties with the Mac OS X Terminal application. You should run the following commands before using it, or put them in the appropriate startup file (e.g. .cshrc / .profile):
setenv TERM xterm-color
The main menu has several choices:
[A]ccess - this configures the network access method to use. You do not need to run this, since Fink pre-configures everything for you. Actually, you should avoid this menu item as it may overwrite the default configuration with one that doesn't work.
[U]pdate - this item downloads the list of available packages from the Fink site. This item does not install or update any actual packages, it just updates the listings used for the package browser. You must run this at least once after installing Fink.
[S]elect - this gives you the actual package listing, where you can select and deselect the packages you want on your system. More about this later.
[I]nstall - this is where the action is. The menu items above only affect dselect's package listings and status database. This one actually goes out and downloads and installs the packages you have requested. It also removes the packages you have deselected in the browser.
[C]onfig and [R]emove - these are relics from the time before apt. You do not need them, although they won't do harm.
[Q]uit - now that should really be obvious.
You'll spend most of your time with dselect in the package browser, reachable through the "[S]elect" menu item. Before dselect shows you the package list, it presents you with an introductory help screen. You can press 'k' to get a full listing of keyboard commands, or just Space to get to the package list.
You can move through the list using the up and down keys. Selections are made with '+' and '-'. When you select a package that needs some other packages, dselect will show you a sublist with the affected packages. In most cases you can just press Return to accept dselect's choices. You can also make adjustments in the sublist (e.g. to choose another alternative for a virtual package dependency), or press 'R' (i.e. Shift-R) to return to the previous state. Both the sublists and the main package list are left by pressing Return. When you're happy with your selections, leave the main list and use the "[I]nstall" menu item to actually install the packages.
dselect doesn't actually download the packages itself. Instead, it runs apt to do the dirty work. If you prefer a pure command line interface, you can access the functions of apt directly, with the apt-get command.
Like with dselect, you must first download the current listing of available packages with this command:
sudo apt-get update
Like the "[U]pdate" menu item in dselect, this doesn't update the actual files on your computer, just apt's list of available packages. To install a package, you just give apt-get the name, like this:
sudo apt-get install lynx
If apt-get determines that the packages requires other packages to be installed, it will show you the list and ask for confirmation. It then downloads and installs the requested packages. Removing packages is just as easy:
sudo apt-get remove lynx
Sometimes, when doing a binary install, you may get messages that a dependency can't be installed. e.g.:
Sorry, but the following packages have unmet dependencies: foo: Depends: bar (>= version) but it is not installable E: Sorry, broken packages
What has happened is that the package you are trying to install depends on another package that can't be distributed as a binary, due to licensing requirements. You must install the dependency from source (see the next section).
The fink tool will allow you to install packages that are not yet available in the binary distribution.
First of all, you'll need an appropriate version of the Developer Tools for your system. The latest version is available for free download after registration at http://connect.apple.com.
To get a list of packages that are available for installation from source, ask the fink tool:
The first column lists the installation state (blank for not installed, i for installed, (i) for installed but not the latest version), followed by the package name, the latest version, and a short description. You can ask for more information about a specific package using the "describe" command ("info" is an alias for this):
fink describe xmms
When you have found a package that you want to install, use the "install" command:
fink install wget-ssl
The fink command will first check if all necessary prerequisites ("dependencies") are present, and will ask you if it's okay to install them if some are missing. Then it goes ahead and downloads source code, unpacks it, patches it, compiles it, and installs the results on your system. This can take a long time. If you run into errors during that process, please first check the FAQ.
You can tell fink to try to download pre-compiled binary packages, if available, instead of building them. Just pass the --use-binary-dist (or -b) option to fink. This can save you a lot of time. E.g. calling
fink --use-binary-dist install wget-ssl
fink -b install wget-ssl
will first download all dependencies for wget-ssl that are available from the binary distribution and only build the remainder from source. This option can also be enabled permanently in the Fink configuration file (fink.conf) or by running the command fink configure.
More details about the fink tool are available in the chapter "Using the fink Tool from the Command Line".
Fink Commander is an Aqua interface to both apt-get and the fink tool. The Binary menu lets you do operations on the binary distribution, and the Source menu does the same thing for the source distribution.
Fink Commander is included with the Fink binary installer. To download it separately (e.g. if you've bootstrapped Fink from source), or for additional information, visit the Fink Commander website.
When you want to install a package, you should first check the package database and see if it is available at all through Fink. The available version(s) of the package will be shown in several rows of a table. These are:
0.8.1: This is the base version that can be installed from binaries for OS 10.4. If you update Fink, later versions of some packages may be available.
0.9.0: This is the base version that can be installed from binaries for OS 10.5. If you update Fink, later versions of some packages may be available.
10.4/powerpc stable: This is the most recent version that can be installed from the stable source tree for OS 10.4 users on PowerPC hardware.
10.4/intel stable: This is the most recent version that can be installed from the stable source tree for OS 10.4 users on intel hardware.
10.4/powerpc unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.4 users on PowerPC hardware.
10.4/intel unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.4 users on intel hardware.
Note: unstable doesn't necessarily mean unusable, but install such packages at your own risk.
10.5/powerpc stable: This is the most recent version that can be installed from the stable source tree for OS 10.5 users on PowerPC hardware.
10.5/intel stable: This is the most recent version that can be installed from the stable source tree for OS 10.5 users on intel hardware.
10.5/powerpc unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.5 users on PowerPC hardware.
10.5/intel unstable: This is the most recent version that can be installed from the unstable source tree for OS 10.5 users on intel hardware.
Many of the packages that are available via Fink require the installation of some form of X11. Because of this, one of the first things that is typically done is to choose an X11 implementation.
Since there are several X11 implementations available for Mac OS X (Apple's X11, XFree86, X.org) and several ways to install them (manually or via Fink), there are several alternative packages - one for each setup. Here is a list of the available X11 packages and installation methods:
xfree86, xfree86-shlibs: Install both of these packages for XFree86-4.5.0 (OS 10.4 only).
xorg, xorg-shlibs (OS 10.4 only ) Install these packages to get the 6.8.2 release of the X.org X11 distribution.
system-xfree86 + -shlibs, -dev: These packages are automatically generated if you install Apple's X11, or manually installed XFree86 or X.org. They will then act as dependency placeholders.
For more information on installing and running X11, refer to the X11 on Darwin and Mac OS X document.
This chapter covers the procedures used to update your Fink installation with the latest and greatest stuff.
If you use the binary distribution exclusively, there is no separate upgrade procedure. Just ask the tool of your choice to get the latest package listing from the server and let it update all packages.
For dselect, it is sufficient to hit "[U]pdate", then "[I]nstall". Of course, you may want to run "[S]elect" in between to check the selections that were made and to find out about new packages.
For apt, run apt-get update to get the latest package list, then apt-get upgrade to update all packages that have new versions available.
For Fink Commander, select Binary->Update descriptions to update the package list, and then Binary->Dist-Upgrade packages to update to new versions.
For more information, see the Upgrade Matrix.
If you use the source distribution the procedure consists of two steps. In the first step, you download the latest package descriptions to your computer. In the second step, these package descriptions are used to compile new packages; the actual source code is downloaded as needed.
The first step can be accomplished by running fink selfupdate. That command will check with the Fink website to see if a new point release is available, and will automatically download and install the package descriptions in that case. You also have the option to pull package descriptions directly from CVS or via rsync. CVS is a version-controlled repository where the package descriptions are stored and managed. Using CVS has the advantage that it is updated continuously, but the disadvantage that there is a single CVS server for Fink, and it can be unreliable if there is a lot of traffic. For this reason, it is recommended that general users go with rsync. There are multiple mirrors available for rsync, and the only disadvantage is that package descriptions take an hour or so to migrate to the rsync mirrors after they've been added to CVS.
(If you are having trouble upgrading a source installation, consult these special instructions.)
Once you have updated your package descriptions (no matter which way), you should update all packages at once with the command fink update-all.
To update the source distribution using Fink Commander, select Source->Selfupdate to download new package information files, and then Source->Update-all to update your outdated packages.
If you use precompiled binary packages for some packages and build others from source, you'll have to follow both sets of instructions above to upgrade your Fink installation. That is, first use dselect or apt-get to get the latest versions of the packages that are available as binaries, then use fink selfupdate and fink update-all to get the current package descriptions and to update the remaining packages.
You may use the UseBinaryDist option (settable via the --use-binary-dist (or -b) option or in the Fink configuration file) both source and binary descriptions will be updated if you call fink selfupdate. In this case you don't need a separate apt-get call anymore.
If you are using Fink Commander select Binary->Update descriptions to update the package list, and then Binary->Dist-Upgrade packages to update to new versions. After that do Source->Selfupdate to download new package information files, and then Source->Update-all (see previous sections for details).
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).
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 /sw/etc/fink.conf, and can be edited in your favourite text editor. You will need super-user rights to edit it.
Your fink.conf file consists of multiple lines, in the format:
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
Some of the settings in the fink.conf file are mandatory. Without them Fink cannot function properly. The following settings belong to this category.
Tells fink where it was installed. Defaults to /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.
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 /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 /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.-
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 /sw/lib/fink/postinstall.pl script. You should not need to alter this value manually.
usually fink will store the sources it fetches in /sw/src. You can specify an alternate directory to look for downloaded source code in using this option. For example:
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 instructs fink 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.
Fink caches its package description files in /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.
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 the fink selfupdate-cvs command, so you should not need to change it manually.
Fink needs to create several temporary directories for each package it compiles from source. By default, they are placed in /sw/src on Panther and earlier, and /sw/src/fink.build on Tiger. If you want them to be somewhere else, specify the path here. See the descriptions of the KeepRootDir and KeepBuildDir 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 the bzip2 command-line tool. This allows you to specify an alternate location to your bzip2 executable, pass optional command-line options, or use a drop-in replacement like pbzip2 for decompressing .bz2 archives.
There are various settings which influence the way Fink downloads package data.
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.
If you use a FTP proxy then you should enter its address here, for example:
Leave it blank if you do not use a FTP proxy.
If you use a HTTP proxy then you should enter its address here, for example:
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 cvs
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 the stable or unstable trees, using rsync will delete them. Make a backup first, e.g. in your local tree. cvs will download using anonymous or :ext: cvs access from the Fink repository. This has the disadvantage that cvs 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).
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 single fink invocation. Passing fink the --no-use-binary-dist flag overrides this, and compiles from source for that single fink 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 cause fink to choose a version based on its binary availability.
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 /sw/lib/fink/mirror/_keys. For example, if you live in Europe:
MirrorCountry: six letter code
You should change this value using the fink configure command. The three letter code is one found in /sw/lib/fink/mirror/_keys. For example, if you live in Austria:
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).
(fink-0.25.2 and later) When doing fink selfupdate with the SelfupdateMethod set to rsync, 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.
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.
Causes fink not to delete the directory root-[name]-[version]-[revision] in the Buildpath after building a package. Defaults to false. Be careful, this option can fill your hard-disk quickly! Passing fink the -K flag has the same effect, but only operates on that single fink invocation.
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! Passing fink the -k flag has the same effect, but only operates on that single fink invocation.
There are some other options which may be useful, but require some knowledge to get right.
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:
will match packages ending in '-ssl', and will match 'xfree86' and 'xfree86-shlibs' exactly.
If the Fink package ccache-default is installed, the cache files it makes while building Fink packages will be placed here. Defaults to /sw/var/ccache. If set to none, 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.
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 /sw/lib/perl5/Fink/Notify directory. On fink-0.25 and later they are listed in the output of fink plugins. See the Fink Developer Wiki for more information.
When fink builds new packages, apt-get does not immediately know about them. Historically, the command fink scanpackages had to be run for apt-get to notice the new packages, but now this happens auto matically. If this option is present and false, then fink scanpackages will no longer be run automatically after packages are built. Defaults to true.
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 with Restrictive or Commercial licenses. If this option is present and false, then Fink will omit those packages when scanning.
Fink actively manages the file /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 # /sw/etc/fink.conf # NOTE: run 'fink scanpackages' to update the corresponding Packages.gz files deb file:/sw/fink local main deb file:/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).
The fink tool uses several suffix commands to work on packages from the source distribution. Some of them need at least one package name, but can handle several package names at once. You can specify just the package name (e.g. gimp), or a fully qualified name with a version number (e.g. gimp-1.2.1) or with both version and revision numbers (e.g. gimp-1.2.1-3). Fink will automatically choose the latest available version and revision when they are not specified. Others have different options.
What follows is a list of the commands for the fink tool:
There are some options, which apply to all fink commands. If you type fink --help you get the list of options:
(as of fink-0.26.0)
-h, --help - displays help text.
-q, --quiet - causes fink to be less verbose, opposite of --verbose. Overrides the Verbose flag in fink.conf.
-V, --version - display version information.
-v, --verbose - causes fink to be more verbose, opposite of --quiet. Overrides the Verbose field in fink.conf.
-y, --yes - assume default answer for all interactive questions.
-K, --keep-root-dir - Causes fink not to delete the root-[name]-[version]-[revision] directory in the Buildpath after building a package. Corresponds to the KeepRootDir field in fink.conf.
-k, --keep-build-dir - Causes fink not to delete the [name]-[version]-[revision] directory in the Buildpath after building a package. Corresponds to the KeepBuildDir field in fink.conf.
-b, --use-binary-dist - download pre-compiled packages from the binary distribution if available (e.g. to reduce compile time or disk usage). Note that this mode instructs fink to download the version it wants if that version is available for download; it does not cause fink to choose a version based on its binary availability. Corresponds to the UseBinaryDist flag in fink.conf.
--no-use-binary-dist - Don't use pre-compiled binary packages from the binary distribution, opposite of the --use-binary-dist flag. This is the default unless overridden by setting UseBinaryDist: true in the fink.conf configuration file.
--build-as-nobody - Drop to a non-root user when performing the unpack, patch, compile, and install phases. Note that packages built with this option may be non-functional. You should use this mode for package development and debugging only.
-m, --maintainer - (fink-0.25 and later) Perform actions useful to package maintainers: run validation on the .info file before building and on the .deb after building a package; turn certain build-time warnings into fatal errors; (fink-0.26 and later) run the test suites as specified in the field. This sets --tests and --validate to on.
--tests[=on|off|warn] - (fink-0.26.0 and later) Causes InfoTest fields to be activated and test suites specified via TestScript to be executed (see the Fink Packaging Manual). If no argument is given to this option or if the argument is on then failures in test suites will be considered fatal errors during builds. If the argument is warn then failures will be treated as warnings.
--validate[=on|off|warn] - Causes packages to be validated during a build. If no argument is given to this option or if the argument is on then validation failures will be considered fatal errors during builds. If the argument is warn then failures will be treated as warnings.
-l, --log-output - Save a copy of the terminal output during each package building process. By default, the file is stored in /tmp/fink-build-log_[name]-[version]-[revision]_[date]-[time] but one can use the --logfile flag to specify an alternate filename.
--no-log-output - Don't save a copy of the output during package-building, opposite of the --log-output flag. This is the default.
--logfile=filename - Save package build logs to the file filename instead of the default file (see the --log-output flag, which is implicitly set by the --logfile flag). You can use percent-expansion codes to include specific package information automatically. A complete list of percent-expanions is available in the Fink Packaging Manual; some common percent-expansions are:
-t, --trees=expr - Consider only packages in trees matching expr. The format of expr is a comma-delimited list of tree specifica- tions. Trees listed in fink.conf are compared against expr. Only those which match at least one tree specification are considered by fink, in the order of the first specifications which they match. If no --trees option is used, all trees listed in fink.conf are included in order. A tree specification may contain a slash (/) character, in which case it requires an exact match with a tree. Otherwise, it matches against the first path-element of a tree. For example, --trees=unstable/main would match only the unstable/main tree, while --trees=unstable would match both unstable/main and unstable/crypto. There exist magic tree specifications which can be included in expr:
Exclusion of (or failure to include) these magic trees is currently only supported for operations which do not install or remove packages.
-T, --exclude-trees=expr Consider only packages in trees not matching expr. The syntax of expr is the same as for --trees, including the magic tree specifications. However, matching trees are here excluded rather than included. Note that trees matching both --trees and --exclude-trees are excluded.
Examples of --trees and --exclude-trees:
Install foo as if fink was using the stable tree, even if unstable is enabled in fink.conf.
Install the version of foo in Fink, not the locally modified version.
List the locally modified packages which are installed.
Most of these options are self-explanatory. Many can also be set in the Fink configuration file (fink.conf) if you want to set them permanently and not just for that invocation of fink.
The install command is used to install packages. It downloads, configure, builds and installs the packages you name. It will also install required dependencies automatically, but will ask you for confirmation before it does so. Example:
fink install nedit Reading package info... Information about 131 packages read. The following additional package will be installed: lesstif Do you want to continue? [Y/n]
Use of the --use-binary-dist option with fink install can speed the build process for complicated packages by quite a lot.
Aliases for the install command: update, enable, activate, use (most of these for historic reasons).
The remove command removes packages from the system by calling 'dpkg --remove'. The current default implementation has a flaw: it doesn't check dependencies itself but rather completely leaves that to the dpkg tool (usually this poses no problem, though).
The remove command only removes the actual package files, (excluding configuration files), but leaves the .deb compressed package file intact. This means that you can re-install the package later without going through the compile process again. If you need the disk space, you can remove the .deb from the /sw/fink/dists tree.
These flags can be used with the fink remove command
-h,--help - Show the options which are available. -r,--recursive - Also remove packages that depend on the package(s) to be removed (i.e. overcome the above-mentioned flaw).
Aliases: disable, deactivate, unuse, delete.
The purge command purges packages from the system. This is the same as the remove command except that it removes configuration files as well.
This command takes the:
This command updates all installed packages to the latest version. It does not need a package list, so you just type:
--use-binary-dist is also useful with this command.
This command produces a list of available packages, listing installation status, the latest version and a short description. If you call it without parameters, it will list all available packages. You can also pass a name or a shell pattern, and fink will list all packages that match.
The first column displays the installation state with the following meanings:
not installed i latest version is installed (i) installed, but a newer version is available p a virtual package provided by a package that is installed
The version column always lists the latest (highest) version known for the package, regardless of what version (if any) you have installed. To see all versions of a package available on your system, use the dumpinfo command.
There are also some flags for the fink list command
-h,--help Show the options which are available. -t,--tab Output the list in a tab delimited format, useful for running the output through a script. -i,--installed Show only those packages which are currently installed. -o,--outdated Show only those packages which are out of date. -u,--uptodate Show only packages which are up to date. -n,--notinstalled Show packages which are not currently installed. -s expr,--section=expr Show only packages in the sections matching the regular expression expr. -m expr,--maintainer=expr Show only packages with the maintainer matching the regular expression expr. -w=xyz,--width=xyz Sets the width of the display you would like the output formatted for. xyz is either a numeric value or auto. auto will set the width based on the terminal width. The default is auto.
Some usage examples:
fink list - list all packages fink list bash - check if bash is available and what version. fink list --tab --outdated | cut -f 2 - just list the names of the out of date packages. fink list --section=kde - list the packages in the kde section fink list --maintainer=fink-devel - list the packages with no maintainer fink --trees=unstable list --maintainer=fink-devel - list the packages with no maintainer, but only in the unstable tree. fink list "gnome*" - list all packages that start with 'gnome'
The quotes in the last example are necessary to stop the shell from interpreting the pattern itself.
This command behaves almost identical to fink list. The most notable difference is that fink apropos also searches the package descriptions to find packages. The second difference is that the search string must be supplied and is not optional.
fink apropos irc - list all packages for which 'irc' occurs in the name or description. fink apropos -s=kde irc - the same as above, but restricted to packages from the kde section.
This command displays a description of the package you name on the command line. Note that only a small part of the packages currently have a description.
Aliases: desc, description, info
List the (optional) plugins available to the fink program. Currently lists the notification mechanisms and the source-tarball checksum algorithms.
Downloads the named packages, but does not install them. This command will download the tarballs even if they were downloaded before.
The following flags can be used with the fetch command:
-h,--help Show the options which are available. -i,--ignore-restrictive Do not fetch packages that are "License: Restrictive". Useful for mirrors, because some restrictive packages do not allow source mirroring. -d,--dry-run Just display information about the file(s) that would be downloaded for the package(s) to be fetched; do not actually download anything. -r,--recursive Also fetch packages that are dependencies of the package(s) to be fetched.
Downloads all package source files. Like fetch, this downloads the tarballs even when they were downloaded before.
These flags can be used with the fink fetch-all command:
-h,--help -i,--ignore-restrictive -d,--dry-run
Downloads all missing package source files. This command will only download files that are not present on the system.
These flags can be used with the fink fetch-missing command:
-h,--help -i,--ignore-restrictive -d,--dry-run
Builds a package, but does not install it. As usual, the source tarballs are downloaded if they can not be found. The result of this command is an installable .deb package file, which you can quickly install later with the install command. This command will do nothing if the .deb already exists. Note that dependencies are still installed, not just built.
The --use-binary-dist option is applicable here.
Builds a package (like the build command), but ignores and overwrites the existing .deb file. If the package is installed, the newly created .deb file will also be installed in the system via dpkg. Very useful during package development.
Same as install, but will install the package via dpkg even when it is already installed. You can use this when you accidentally deleted package files or changed configuration files and want to get the default settings back.
Reruns the fink configuration process. This will let you change your mirror sites and proxy settings, among others.
New in fink-0.26.0: This command will also let you turn on the unstable trees if desired.
This command automates the process of upgrading to a new Fink release. It checks the Fink website to see if a new version is available. It then downloads the package descriptions and updates the core packages, including fink itself. This command can upgrade to regular releases, but it can also setup your /sw/fink/dists directory tree for direct CVS or rsync updates, if you select one of those options the first time this command is run. This means that you then will be able to access the very latest revisions of all packages.
If the --use-binary-dist option is enabled, the list of available packages in the binary distribution is also updated.
Use this command to make fink selfupdate use rsync to update its package list.
This is the recommended way to update Fink when building from source.
Note: rsync updates only update the active trees (e.g. if unstable isn't turned on in fink.conf the list of unstable packages won't be updated.
Use this command to make fink selfupdate use CVS access to update its package list.
CVS updating is deprecated, except for developers and those people who are behind firewalls that disallow rsync.
Rebuilds the package cache. You should not normally need to execute this manually, as fink should auto-detect when it needs to be updated.
This command performs various checks on .info and .deb files. Package maintainers should run this on their package descriptions and corresponding built packages before submitting them.
The following optional options may be used:
-h,--help - Show the options which are available. -p,--prefix - Simulate an alternate Fink basepath prefix (%p) within the files being validated. --pedantic, --no-pedantic - Control the display of nitpicky formatting warnings. --pedantic is the default.
Updates the apt-get database of debs; defaults to updating all of the trees, but may be restricted to a set of one or more trees given as arguments.
Removes obsolete and temporary files. This can reclaim large amounts of disk space. One or more modes may be specified:
--debs - Delete .deb files (compiled binary package archives) corresponding to versions of packages that are neither described by a package description (.info) file in the currently-active trees nor presently installed. --sources,--srcs - Delete sources (tarballs, etc.) that are not used by any package description (.info) file in the currently- active trees. --buildlocks, --bl - Delete stale buildlock packages. --dpkg-status - Remove entries for packages that are not installed from the dpkg "status" database. --obsolete-packages - Attempt to uninstall all installed packges that are obsolete. (new in fink-0.26.0) --all - All of the above modes. (new in fink-0.26.0)
If no mode is specified, --debs --sources is the default action.
In addition, the following options may be used:
-k,--keep-src - Move old source files to /sw/src/old/ instead of deleting them. -d,--dry-run - Print the names of the files that would be deleted, but do not actually delete them. -h,--help - Show the modes and options which are available.
Shows how fink parses parts of a package's .info file. Various fields and percent expansions will be displayed according to options as follows:
-h, --help - Show the options which are available. -a, --all - Display all fields from the package description. This is the default mode when no --field or --percent flags are given. -f fieldname, - Display the given fieldname(s), --field=fieldname in the order listed. -p key, - Display the given percent expansion key(s), --percent=key in the order listed.
Displays a human-readable list of the compile-time (build) and run- time (installation) dependencies of the listed package(s).
Copyright (c) 2001 Christoph Pfisterer, Copyright (c) 2001-2013 The Fink Project. You may distribute this document in print for private purposes, provided the document and this copyright notice remain complete and unmodified. Any commercial reproduction and any online publication requires the explicit consent of the author.
Generated from $Fink: uguide.en.xml,v 1.56 2012/11/11 15:20:17 gecko2 Exp $