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/bsd.port.mk", line 4: warning: ACTION REQUIRED
"/usr/ports/Mk/bsd.port.mk", line 5: warning: You are using a ports file that originated from CVS!!
"/usr/ports/Mk/bsd.port.mk", line 6: warning: The FreeBSD project has switched from CVS to SubVersion.
"/usr/ports/Mk/bsd.port.mk", line 7: warning: This CVS repository is NO LONGER UPDATED!  If you see this
"/usr/ports/Mk/bsd.port.mk", line 8: warning: message then your tree is STALE and you need to follow
"/usr/ports/Mk/bsd.port.mk", line 9: warning: the update instructions to receive any more updates.
"/usr/ports/Mk/bsd.port.mk", line 10: warning: Original announcement:
"/usr/ports/Mk/bsd.port.mk", line 11: warning: http://lists.freebsd.org/pipermail/freebsd-ports/2012-September/078099.html
"/usr/ports/Mk/bsd.port.mk", line 12: warning: Reminder:
"/usr/ports/Mk/bsd.port.mk", line 13: warning: http://lists.freebsd.org/pipermail/freebsd-announce/2013-January/001451.html
"/usr/ports/Mk/bsd.port.mk", line 14: warning: UPDATE INSTRUCTIONS:
"/usr/ports/Mk/bsd.port.mk", line 15: warning: http://wiki.freebsd.org/CvsIsDeprecated



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://svn.freebsd.org/base/releng/10.0/ /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 https://svn0.us-west.FreeBSD.org/doc/release/10.0.0 /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