![]() | ![]() | ![]() | ![]() |
|
faq search add article cool-stuff how-to main tips |
Posted by Jason on Saturday September 15, @07:32PMfrom the dept. The ports tree is a fantastic tool and is one of the many reasons why I have chosen FreeBSD over other Unix-like OS's. As nice as it is however, over time it does become out dated. Using the cvsup utility and a connection to the internet, you can be sure that your ports tree is always up to date. The wonderful thing about cvsup is that it updates existing ports and it adds any new ports to your tree that have been added to the repository. To update your ports, you must first install the cvsup-bin utility. You can either download and install it using the ports tree, or you can install it from the FreeBSD CDROM. Next, you need to modify the ports-supfile, which is used to choose a repository site and shall determine what ports will be updated (all ports by default). Finally, you need to execute the cvsup command and update your ports tree. In writing this article, I assume that you already have a connection to the internet available to your FreeBSD box. [1-Install cvsup-bin] The cvsup utility is the client/server program used to compare the cvs repository and your ports tree. It then downloads only the ports that are newer or have changed since your install or last update. You need to be logged in as root to install this utility. Login: root Password: ******* cd /usr/ports/net/cvsup-bin make install && clean (...or on newer installations) cd /usr/ports/net/cvsup-without-gui make install && make clean [2-Create or Modify the supfile] Once you have installed the cvsup utility, you will need to create or modify a supfile. The supfile is the configuration file used by cvsup. You can find sample supfiles in the /usr/share/examples/cvsup/ directory. Copy the ports-supfile from the example directory to your /root directory and modify it like so: cp /usr/share/examples/cvsup/ports-supfile /root cd /root ee ports-supfile -or- vi ports-supfile You need to modify the line that points to the site you will be using. It can be cvsup1 through cvsup9. You will get better performance depending on which site you select. You can use the traceroute utility to determine the closest and fastest server near you. If you are unfamiliar with the traceroute utility start with cvsup1. Change: *default host=CHANGE_THIS.FreeBSD.org To: *default host=cvsup1.FreeBSD.org If you do not modify anything else in the file, your entire ports tree will be brought up to date. However, if you would only like to update a single category such as security, you can remark (#) out the src-all line and remove the remark from the category you would like updated: In this example: Change: src-all To: # src-all And Change # security To: security Save the file. In this example only the security category of your ports tree will be updated. However, I recommend you update the entire ports tree so that any dependent ports from different categories will all be up to date. [3-Update your ports] Executing the cvsup utility is easy- issue the cvsup command and the name of your supfile. Login: root Password: ******* cd /root cvsup ports-supfile The cvsup utility will now attempt to connect to the server (cvsup1) and update your ports tree. The name of the ports being updated will be displayed on the screen. A message stating that the update is finished will be displayed when cvsup is done. [note] If you peruse through the example supfiles, you will find that there are several different supfiles. I use two of them, the ports-supfile and stable-supfile. Just as the ports-supfile is used to keep your ports tree up to date, the stable-supfile is used to keep the source code of the FreeBSD operating system up to date. The source can later be used to upgrade the operating system (perhaps this will be a future post). If you would like more information on the cvsup utility, as always I recommend the man pages: man cvsup < | >
|
|
||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||
| "You never know how many friends you have until you own a Condo on the beach." -- Jason's Postulate |
|
| All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©2001 Jason Neumann. |