I was recently asked how to share software between more than one fink installation. This is usually because the person has 2 (or more) machines, only one of which is fast. =) It's pretty easy to share binaries you've built on one system with another. Here's how (keep in mind these instructions will generally only work if each system is running the same major version of Mac OS X):
-
Install Fink on the "master" (build) system.
-
(If the clients already have fink installed, you should skip this step.) Copy /sw to the "client" systems. First you must enable "Remote Login" on the "master" box. Then, run the following on each of the "client" machines:
sudo rsync -avzr -e ssh user@otherhost:/sw/ /sw/
Just replace user@otherhost above with the username and hostname of the system to copy from.
This will make a clone of the fink installation on your "master" box on each of the clients.
-
On the "master" box, build something, and then run "fink scanpackages". This will make fink generate apt indexes for all of your enabled trees.
-
On the "master" box, enable "Personal Web Sharing" in the Sharing section of System Preferences, and then set up httpd to expose your /sw/fink directory externally. I do so by making an /etc/httpd/users/fink.conf file that contains:
Alias /fink /sw/fink <Directory /sw/fink> Options Indexes FollowSymLinks </Directory>
...and then run "sudo /usr/sbin/apachectl graceful" to (re)start.
-
On the "client" box(es), edit /sw/etc/apt/sources.list, and add the lines representing your fink trees. For example, if my IP address of my build box at home is 192.168.42.7, the client would 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
-
On the "client" box(es), run "sudo apt-get update". If all goes well, 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 ...and so on
-
You should then be able to do "sudo apt-get install <package>" for anything that's been built on the "master" box. Any time you build more stuff there, you will need to re-run "fink scanpackages" on the master, and "sudo apt-get update" on the client(s).
Cool! I’d been looking for this… Can I do this with file sharing, instead of apache? Something like:
deb file://Volumes/drive/sw/fink stable main crypto
?
Thanks!
Sure, there’s no reason you shouldn’t be able to. I think you want 3 slashes (ie, file:// plus /Volumes…) but it should work.
Let me know if it works, that’d be pretty cool too. =)
And what if I just copy individual .deb files to the local computer? Remote is behind a firewall, so I can only ssh in (via a gatekeeper server).
Where do I put the .deb files? Does fink understand there’s no need to compile them?
if you copy them to /sw/fink/debs/ it should be able to find them too, I believe.
It works! Cool! Via apache. 🙂