Advanced - 1. Running your own Binary Distribution Server
1.1 Introduction
This section describes a method for workgroups of more than one Fink installation to use a central build server ("master") that distributes binary packages to all clients in the group.
The method involves the following steps on the "master" server and on the client machines:
1.2 Steps on "master" (build) server
-
Install Fink at
/opt/sw
(default basepath, use a symlink if necessary). - Build packages as usual. They don't necessarily have to be installed, just built.
-
Run
fink scanpackages
whenever your set of built packages has changed. This will make fink generate apt indexes for all of your enabled trees.As an alternative you could run
fink cleanup
which will clean all obsolete src and binary packages.scanpackages
will be called at the end of the cleaning process. -
Start a web server: E.g. enable "Personal Web Sharing" in the Sharing section
of System Preferences. Then set up httpd to serve your
/opt/sw/fink
directory by adding the following lines to your/etc/httpd/httpd.conf
file.Alias /fink /opt/sw/fink <Directory /opt/sw/fink> Options Indexes FollowSymLinks </Directory>
-
Run
sudo /usr/sbin/apachectl graceful
to (re)start your web server.
Remember to re-run fink scanpackages
(or fink
cleanup
) whenever you build/update packages on the "master"
server to make them available to your remote machines.
Notes:
You could also create a user 'fink' and add the above lines to
/etc/httpd/users/fink.conf
.
If you use the apache2 package from Fink adjust the paths above accordingly.
1.3 Steps on client machines
-
Install Fink at
/opt/sw
(default basepath). -
Run
fink configure
and enable the option to download packages from the binary distribution. ("UseBinaryDist: true" in the/opt/sw/etc/fink.conf
file.) -
Edit
/opt/sw/etc/apt/sources.list
, and add the lines representing your Fink trees. For example, if the IP address of your build box is 192.168.42.7, you need to add:deb http://192.168.42.7/fink stable main crypto deb http://192.168.42.7/fink unstable main crypto deb http://192.168.42.7/fink local main
-
Run
fink selfupdate
. You should see something like:... Hit http://192.168.42.7 stable/main Packages Hit http://192.168.42.7 stable/main Release Hit http://192.168.42.7 stable/crypto Packages ...
towards the end of the update process (if the verbose level is >= 1).
Running fink update-all
or fink install
<package>
will now download the necessary packages as
binaries from the "master" server if available.
1.4 Remarks
- Your "master" server needs to use the lowest version of X11 that you're using on all of the clients, i.e. if any of the client machines uses Apple's X11, the "master" server must use it too.
- In order to save space on your build machine, you can remove packages that are only build-dependencies (i.e. not needed to run anything). The
debfoster
package provides a nice way to do this. Be careful not to remove essential packages, such asapt
.
This documentation is adapted in part from "Sharing the Fink" by RangerRick. Thanks!