pavement

Ports Tree, Updating

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(svn updated, and fixes)
 
(25 intermediate revisions by 10 users not shown)
Line 1: Line 1:
When updating your FreeBSD system, you'll first want to sync your sources to the live sources offered via [[cvs]]. There is a port [[cvsup]] that you can use to update your other ports and source trees if you want.   If you hail from a Windows environment, you may think of keeping your sources updated as about the first half of the FreeBSD procedure which corresponds to [[Windows Update]].
+
When updating your FreeBSD system, you'll first want to sync your sources to the live sources offered. If you hail from a Windows environment, you may think of keeping your sources updated as about the first half of the FreeBSD procedure which corresponds to [[Windows Update]].
  
== Installing cvsup ==
+
== Portsnap ==
 +
Since 5.5-RELEASE systems, [[portsnap]] is used maintain the ports tree. Portsnap is the preferred way to update ports.
  
You'll need to have superuser access, so [[su]] to root and then go to your /usr/ports/net/ directory. There are two versions of cvsup available to you: cvsup and cvsup-without-gui (for systems that don't have or need the cvsup GUI). Pick the one that's most apporpriate for you and go into that directory and "make install clean":
+
== Subversion ==
 +
An easy way to update through [[subversion]] is to install svnup; edit its configuration file; then run the command with the option set in ''/usr/local/etc/svnup.conf'' .
  
    dave@samizdata:~% su -
+
Select lines in ''svnup.conf'' file:
    Password:
+
host=[choose server]
    samizdata# cd /usr/ports/net/
+
#
    samizdata# ls cvsup*
+
[ports]
      cvsup:
+
branch=ports/head
      Makefile        distinfo        pkg-descr.nogui scripts
+
target=/usr/ports
      README.html    pkg-descr      pkg-plist
+
     
+
      cvsup-mirror:
+
      Makefile        files          pkg-descr      pkg-plist
+
      README.html    pkg-deinstall  pkg-install    scripts
+
     
+
      cvsup-without-gui:
+
      Makefile        README.html
+
     
+
      cvsupit:
+
      Makefile        pkg-descr      pkg-plist
+
      README.html    pkg-install    pkg-req
+
         
+
    samizdata# cd cvsup-without-gui/
+
    samizdata# ls
+
    Makefile        README.html
+
    samizdata# make install clean
+
  
so, let's say this is a headless server and I don't want X11 on it (which it is, and I don't) so:
+
The command with arguments in this example is:
 +
#svnup ports
  
    samizdata# cd cvsup-without-gui/
+
svnup is a lightweight subversion program, and there are other subversion programs for heavier tasks.
    samizdata# make install clean
+
  
and you'll get a ''lot'' of lines scrolling by; this is the program compiling.
+
== Historical use of cvs to update ports ==
 +
It seems there are no longer any [[cvs]] mirrors for updating FreeBSD ports, as FreeBSD no longer supports this method.
  
 +
== It's updated. Now what? ==
 +
Well, go into /usr/ports and find stuff you want to install!
  
== So it's installed already, how do I update the ports tree? ==
+
You may also want to install the very useful port management tool [[portupgrade]], which also installs a program called [[portversion]]. You can use portversion to check your existing installed programs against what is available in the ports tree, and then use [[portupgrade]] to upgrade your existing, old, installed software to the new versions found in the ports tree. Together, portversion, and portupgrade allow you to make sure you have the latest version of ANY port in the ports tree, including packages installed with the base FreeBSD install that have been updated since your particular version was released.
  
Not so fast, speed racer. First you need to configure your ''supfile''. Go to /usr/share/examples/cvsup and look through the example files. The easiest way to make a ''supfile'' for your own personal use is to copy the one that want out of the examples and edit it. So from the command line, do a
+
Other helpful packages are ''psearch'' for looking up ports and their descriptions, and [[portmanager]].
    cp /usr/share/examples/ports-supfile /root/ports-supfile
+
and you have just copied the ''ports-supfile'' over to the /root/ directory (root's home directory). Now you'll need to edit that file: use your favorite [[text file editor]] such as [[vi]], [[ee]] (commonly aliased under FreeBSD as "edit"), [[joe]], [[nano]], [[pico]] or [[emacs]] to edit the ''ports-supfile''.
+
  
In that file, you'll want to search for a string that says "CHANGE_THIS.freebsd.org" and change that "CHANGE_THIS" to the name of a real CVSup server. You can get a list of the servers at [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html#CVSUP-MIRRORS the list of CVSup mirrors on freebsd.org]] but they all have the general form of '''cvsup(number).(country).freebsd.org''' such as cvsup1000000.qw.freebsd.org. It will almost always make the process much faster if you choose a mirror nearest you (or the country that you're in, rather.)
+
See also:
 
+
* [http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html The FreeBSD Handbook's section on cvsup and updating]
 
+
* [[Updating the system]]
See also: [[http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/cvsup.html The FreeBSD Handbook's section on cvsup and updating]]
+
  
 
[[Category:Common Tasks]]
 
[[Category:Common Tasks]]
 +
[[Category:Ports and Packages]]

Latest revision as of 10:47, 21 December 2014

When updating your FreeBSD system, you'll first want to sync your sources to the live sources offered. If you hail from a Windows environment, you may think of keeping your sources updated as about the first half of the FreeBSD procedure which corresponds to Windows Update.

Contents

[edit] Portsnap

Since 5.5-RELEASE systems, portsnap is used maintain the ports tree. Portsnap is the preferred way to update ports.

[edit] Subversion

An easy way to update through subversion is to install svnup; edit its configuration file; then run the command with the option set in /usr/local/etc/svnup.conf .

Select lines in svnup.conf file:

host=[choose server]
#
[ports]
branch=ports/head
target=/usr/ports

The command with arguments in this example is:

#svnup ports

svnup is a lightweight subversion program, and there are other subversion programs for heavier tasks.

[edit] Historical use of cvs to update ports

It seems there are no longer any cvs mirrors for updating FreeBSD ports, as FreeBSD no longer supports this method.

[edit] It's updated. Now what?

Well, go into /usr/ports and find stuff you want to install!

You may also want to install the very useful port management tool portupgrade, which also installs a program called portversion. You can use portversion to check your existing installed programs against what is available in the ports tree, and then use portupgrade to upgrade your existing, old, installed software to the new versions found in the ports tree. Together, portversion, and portupgrade allow you to make sure you have the latest version of ANY port in the ports tree, including packages installed with the base FreeBSD install that have been updated since your particular version was released.

Other helpful packages are psearch for looking up ports and their descriptions, and portmanager.

See also:

Personal tools