2010-01-11

FreeBSD - Tips to prepare large ports installation

Ports gets it's sources from internet. If the sources is big or there are multiple tens of sources, the tendency to fail in the mid of the ports installation increases.

Scenario 1:
Bumpy internet broadband internet connection, like mine, will disconnect halfway when downloading big files (> 10 MB)

Scenario 2:
Large ports that depends on tens if not hundreds of other ports. e.g. KDE4 or other window manager.

Scenario 3:
Limited online time frame and will need to take the machine off line after a period of internet usage.

Scenario 4:
Need to download the sources so that it can be moved to another box for compilation. A box that does not have reasonable or slow internet bandwidth to download.

Often, the above scenario are stuck with me, unfortunately. But the fortunate part is, while meddling with ports, a few steps can be taken to reduce the chances of these hiccups.

For illustration purpose, we'll use installation of KDE4 (the excellent Desktop environment) as an example. KDE4 depends on hundreds of other ports. The download of the sources alone will take some time and this serve as a good example. Here are the steps :
  1. Go to the KDE4 ports directory :

    cd /usr/ports/x11/kde4
  2. Configure all the options, include the dependency's option :

    make config-recursive
  3. Fetch all the files, include the dependency's :

    make fetch-recursive

    *** Remember to tune for the best sites to download, refer to "FreeBSD – Ports is fetching from slow servers")

Pick a good time to extract and compile the KDE4 ports. Get enough caffeine and books, if not RSS. :p

Adios !!!

No comments: