Thursday, 4 April 2013

Updating FreeBSD Ports and Source trees the new way

FreeBSD has changes the way you need to upgrade the ports and src tree. The old CVsup method has been deprecated. If you try to build a port from one of these old images you will see the following message:

"/usr/ports/Mk/", line 4: warning: ACTION REQUIRED
"/usr/ports/Mk/", line 5: warning: You are using a ports file that originated from CVS!!
"/usr/ports/Mk/", line 6: warning: The FreeBSD project has switched from CVS to SubVersion.
"/usr/ports/Mk/", line 7: warning: This CVS repository is NO LONGER UPDATED!  If you see this
"/usr/ports/Mk/", line 8: warning: message then your tree is STALE and you need to follow
"/usr/ports/Mk/", line 9: warning: the update instructions to receive any more updates.
"/usr/ports/Mk/", line 10: warning: Original announcement:
"/usr/ports/Mk/", line 11: warning:
"/usr/ports/Mk/", line 12: warning: Reminder:
"/usr/ports/Mk/", line 13: warning:
"/usr/ports/Mk/", line 14: warning: UPDATE INSTRUCTIONS:
"/usr/ports/Mk/", line 15: warning:

Upgrading Ports

From the FreeBSD Handbook.

For the first time do the following as root user.

# portsnap fetch
# portsnap extract
This will download the whole ports tree and install it into /usr/ports. Everytime from here after use the following
# portsnap fetch
# portsnap update
OR # portsnap fetch update

Installing SVN

For the first time do the following as root user

# cd /usr/ports/devel/subversion
# make -DBATCH install clean
# rehash 

Upgrading Source Tree

Warning: If the /usr/src local directory already exists (because you asked for sources to copied at install time), rename or delete it before the checkout. Checkout over an existing non-svn directory can cause conflicts between the existing files and those brought in from the repository.

So you can do:
mv /usr/src /usr/src_old
mkdir /usr/src
For the first time do (if you want RELENG_10_0)
# svn checkout svn:// /usr/src

Future updates of the sources may be fetched by running:
# svn update /usr/src

Updating Documentation Tree

For the first time do

# svn checkout /usr/doc

and permanently accept issued certificate.

Future updates of the documentation sources may be fetched by running:
# svn update /usr/doc 

No comments:

Post a Comment