Go Back   The macosxhints Forums > OS X Help Requests > UNIX - General



Reply
 
Thread Tools Rate Thread Display Modes
Old 06-04-2003, 11:30 PM   #1
JBoivin
Triple-A Player
 
Join Date: Jun 2002
Location: Montréal PQ
Posts: 119
Moving Fink to a new computer

Hi,

I just got my new computer. On the old one, I installed quite a lot of stuff with Fink (all compiled locally and that took a loooonnnggg time on a G3/266, believe me ).

Is there a way to painlessly copy my Fink install from computer A to computer B, without re-installing everything?

I'd like to know if it's as simple as to copy the /sw folder to computer B. Should I install Fink first, then copy the /sw folder?

Anyway, you've got the idea

Thanks
__________________
Ciao!

Jon
JBoivin is offline   Reply With Quote
Old 06-05-2003, 02:50 AM   #2
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
JBoivin,

If you are in a network you can copy the /sw directory from the command line, with rsync over ssh:

sudo rsync -az -e ssh /sw othermachine:/

Be aware that some things will brake. Like: any system- version packages (for example: ghostscript, tetex, system-xfree86) and also xfree86, g77, and anything that uses daemonic, like openssh, because these don't live in /sw.

The breakage can be repaired usually with a "fink reinstall" or a "fink rebuild".

Another way you could try is by burning the /sw directory to a CD as long as the OS X versions on the two machines are compatible (you would experience the same breakage as above)

Or you could also use an external firewire drive as a repository.

And after copying the /sw directory, don't forget to set fink environment (source /sw/bin/init.csh or /sw/bin/init.sh) in your new computer.
sao is offline   Reply With Quote
Old 06-05-2003, 09:12 AM   #3
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
I need to do basically the same thing - moving my /sw to my laptop. Problem is my laptop only has 20G drive in it so I don't want to fill it up with /sw. What would be the process for cloning /sw then trimming. In other words, I would like to copy /sw over, rebuild/reinstall to get what was missed (systemwise, outside /sw), then trim /sw to the bone for bare minimum install. I would also lik eto be able to sync it to the main /sw on my dekstop every so often and updating any necessary files too.
bluehz is offline   Reply With Quote
Old 06-05-2003, 11:16 AM   #4
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
Quote:
bluehz wrote:
I would also like to be able to sync it to the main /sw on my dekstop every so often and updating any necessary files too.

bluehz, I am building from source from one computer to another in the following way:

I have a powerbook which is *also* too small to do big fink compilations. And I have a DesktopG4 867 MHz with lots of storage space (100 G). Both computers are connected to the same Airport base station. Everything is on an ASDL connection.

1- On the DesktopG4, I have activated the web server in System Preferences->Services->Personal Web Sharing.

And put a symlink:

fink ->/sw/fink into the directory /Library/WebServer/Documents/

This is already sufficient to use this machine as a server for my own binary distribution of fink.

On my powerbook, I have the following lines in the file /sw/etc/apt/sources.list (in addition to what is there by default):

# from DesktopG4 via http
deb http://desktop/fink local main bootstrap
deb http://desktop/fink stable main crypto
deb http://desktop/fink unstable main crypto

'desktop' is an alias for the DesktopG4 867 MHz. If this alias isn't defined, I would have to put its local IP address instead.

In the Netinfo database using the Netinfo Manager.app I could have defined 'desktop' as an alias for the DesktopG4 867 MHz.

But, what worked for me was a 'tip' I received from Martin Costabel :

To have a file /etc/hosts containing among others:

127.0.0.1 localhost
255.255.255.255 broadcasthost
192.168.1.6 DesktopG4 desktop

And to make this work, one also has to have a file /etc/lookupd/hosts containing one line:

LookupOrder FFAgent NIAgent DNSAgent

The directory /etc/lookupd has to be created by hand.

Then everything works together as follows:

On the DesktopG4 I run 'fink selfupdate' and 'fink update-all' or 'fink install packagename' etc.
( I can also run it from a terminal window in my powerbook logged in via ssh)
When all is compiled, I run 'fink scanpackages' on both machines.

Then on the powerbook:
I use 'sudo apt-get update' followed by 'sudo apt-get upgrade -u' or 'sudo apt-get install packagename'.
It will look for the latest version on both machines, locally on the powerbook and on the DesktopG4, and also on the Sourceforge Server. That's all there is to it. You can also use 'dselect', but personally, I don't like the interface.

Hope this helps...

Last edited by sao; 06-05-2003 at 11:21 AM.
sao is offline   Reply With Quote
Old 06-05-2003, 02:03 PM   #5
sao
Moderator
 
Join Date: Jan 2002
Location: Singapore
Posts: 4,237
bluehz,

Another way it should work, but I haven't tried it:

"When you build from from source, one of the final steps is to pack everything in the package into a single .deb archive, which is then unpacked by dpkg to install it on your system. So even if you're building from source, you will have a .deb file for each package you have installed. Check your /sw/fink directory, but basically you'll have parallel directories like:

/sw/fink/dists/stable/main/finkinfo/*
/sw/fink/dists/stable/main/binary-darwin-powerpc/*
/sw/fink/dists/unstable/main/finkinfo/*
/sw/fink/dists/unstable/main/binary-darwin-powerpc/*
/sw/fink/dists/local/main/finkinfo/*
/sw/fink/dists/local/main/binary-darwin-powerpc/*

/sw/fink/debs <-> symlinks to items from the binary... folders above

The */finkinfo/* trees have text descriptions of packages & patches and the */binary-darwin-powerpc/* have parallel trees containing the deb bundles.

So, if you copy over these custom-built debs -- and probably also the symlinks and the description files from */finkinfo/* -- should be enough to "port" packages from one OSX box to another.

You can pack it all up with:

tar -zcvf finks.tgz /sw/fink

and then copy & unpack the .tgz file on the other machine. Then run 'fink install $package' on the other computer to extract the $package package from the debs/infos that you just copied over, and you should get a fast, clean installation as a result".
sao is offline   Reply With Quote
Old 06-05-2003, 04:46 PM   #6
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
WOW! Thats really cool Sao! Thanks for the info. I would have never thought of anything like that. Not only does it tackle the initial moving problem, but the future syncing of the fink install.

- thx
bluehz is offline   Reply With Quote
Old 06-07-2003, 12:36 PM   #7
JBoivin
Triple-A Player
 
Join Date: Jun 2002
Location: Montréal PQ
Posts: 119
Just to say that it worked.

I forgot to get back to your message when I made the transfer, though. So I first installed Apple's X11 on the new computer, then copied the /sw folder from the older one using sudo cp -R . Everything seems to work fine anyway, and fink rebuild/reinstall gives the message "nothing to install". So I think that's it!

Thanks for the tips
__________________
Ciao!

Jon
JBoivin is offline   Reply With Quote
Old 06-07-2003, 11:55 PM   #8
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
sao - one thing I must have missed. I assume in your techniques above you have previously copied over your entire /sw to the laptop, then trimmed it of excess fat. Is that correct?

If so - what are the main dir in /sw I can get rid of?
bluehz is offline   Reply With Quote
Old 06-08-2003, 02:59 AM   #9
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 350
I only update one fink installation and I do nightly psyncs of /sw to other computers on the network. All the clones work fine with no heroics.
wgscott is offline   Reply With Quote
Old 06-08-2003, 03:01 AM   #10
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 350
Quote:
Originally posted by bluehz
sao - one thing I must have missed. I assume in your techniques above you have previously copied over your entire /sw to the laptop, then trimmed it of excess fat. Is that correct?

If so - what are the main dir in /sw I can get rid of?

The main things that take up space are /sw/src which you can delete and then the individual *deb files. You will have to go hunting. They live in places like /sw/fink/dists/stable/main/binary-darwin-powerpc/*/*.deb
wgscott is offline   Reply With Quote
Old 06-08-2003, 09:02 AM   #11
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
One thing I have noticed. I plugged in my iBook via Firewire and booted into target boot mode to make the initial transfer of /sw quickly. I transferred /sw last night using 'sudo cp -pR'. When I checked this morning - all the ownerships were wrong on the iBook /sw. Then I remembered something about turning off the "Ignore ownerships and priviledges" on a mounted disk before performing this type of transfer. So I deleted the iBook /sw, turned off "Ignore ownerships and priviledges" on the mounted iBook and did it again with 'sudo cp -pR" and sure enough this time it copied properly.

Moral - turn off "Ignore ownerships and priviledges" on mounted remote disks before doing copy operation.
bluehz is offline   Reply With Quote
Old 06-08-2003, 11:54 AM   #12
wgscott
Major Leaguer
 
Join Date: Sep 2002
Posts: 350
1. Where do you do this?

2. With fink I don't think it matters who owns it, as long as everyone can read it and execute the executables. I had set the ownerships to me on the other installations to avoid the problem of having to copy things as root.
wgscott is offline   Reply With Quote
Old 06-08-2003, 01:20 PM   #13
yellow
Moderator
 
Join Date: Jan 2002
Posts: 10,677
1) Do a Get Info on your external drive, Under Ownership & Permissions, there is a checkbox for "Ignore ownership on this volume".
yellow is offline   Reply With Quote
Old 06-08-2003, 01:42 PM   #14
bluehz
MVP
 
Join Date: Jan 2002
Posts: 1,562
Sorry about that - guess I should have been a bit more specific on where to actually disable the "Permissions".
bluehz is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



All times are GMT -5. The time now is 06:14 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.