User Tools

Site Tools


freebsd

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
freebsd [08/30/2011 09:48] adminfreebsd [09/11/2011 07:50] (current) – [Avoiding ports] admin
Line 8: Line 8:
 A FreeBSD system is composed of: A FreeBSD system is composed of:
  
-  * The base system, consisting of the kernel plus world (the OS files in /usr/src), updated with csup.+  * The base system, consisting of the kernel plus world (the userland OS files in /usr/src), updated with csup.
   * User installed applications, which are handled via the ports tree, see /var/db/pkg/*, updated by compiling ports or installing binary packages.   * User installed applications, which are handled via the ports tree, see /var/db/pkg/*, updated by compiling ports or installing binary packages.
 ====== FreeBSD update ====== ====== FreeBSD update ======
Line 48: Line 48:
   pkg_deinstall paket* or pkg_delete paket   pkg_deinstall paket* or pkg_delete paket
  
-- list of installed packages+  * Unordered List Itemlist of installed packages 
   pkg_info   pkg_info
  
-list outdated ports+  * list outdated ports 
   pkg_version -v   pkg_version -v
  
-list unused ports+  * list unused ports 
   pkg_cutleaves   pkg_cutleaves
  
-find out to which port an application belongs+  * find out to which port an application belongs 
   pkg_which pkgdb   pkg_which pkgdb
   pkg_which -v kde*   pkg_which -v kde*
Line 72: Line 76:
 2. the utility supports minor and major release upgrades. 2. the utility supports minor and major release upgrades.
   freebsd-update -r 8.2-RELEASE upgrade   freebsd-update -r 8.2-RELEASE upgrade
 +See [[http://www.freebsd.org/releases/8.2R/announce.html|this]] for details of upgrading to 8.2-RELEASE.
 ===== upgrading packages ===== ===== upgrading packages =====
  
-pkg_add -r is the binary method, but if the latest version is no available in the default RELEASE mirror, the variable PACKAGESITE should be changed to STABLE as packages-*-release directories are built from the ports collection shipped with the release, and are not updated. But packages-*-stable and packages-*-current are updated roughly once a week. To make this the default, change /usr/local/etc/pkgtools.conf:+There's only one ports tree. The ports tree doesn't branch. There is no special version of the ports tree to go with a specific version of FreeBSD. However, there are pre-built packages for -stable and -release. pkg_add -r is the binary method, but if the latest version is no available in the default RELEASE mirror, the variable PACKAGESITE should be changed to STABLE as packages-*-release directories are built from the ports collection shipped with the release, and are not updated. But packages-*-stable and packages-*-current are updated roughly once a week. To make this the default, change /usr/local/etc/pkgtools.conf:
  
-  setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-6-stable/Lat...+  setenv PACKAGESITE ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/
  
 - upgrade port tree using portsnap: - upgrade port tree using portsnap:
Line 88: Line 92:
  
 - if there is anything to upgrade you should make sure that PACKAGESITE is using STABLE instead of RELEASE and then run portupgrade: - if there is anything to upgrade you should make sure that PACKAGESITE is using STABLE instead of RELEASE and then run portupgrade:
-  portupgrade -vaRrPp+  portupgrade -vaRrPc 
 + 
 +To avoid breaking software you should always check /usr/ports/UPDATING. PKG_SITES will only be used by the ports-mgmt/portupgrade scripts; if you want to use pkg_add(1) manually, and obtain the 8-stable packages, then you should define PACKAGESITE in your environment, or provide a full URL.  The ports-mgmt/portupgrade scripts also respect PACKAGESITE, which will override PACKAGEROOT and PKG_SITES in those scripts. 
 + 
 +==== Avoiding ports ====
  
-To avoid breaking software you should always check /usr/ports/UPDATING+If you have a machine with low resources like e.g. running in a VM, or do not want to wait for port compilations, it makes sense to install only pre-built packages while keeping a release base system so that freebsd-update can be used without bothering about compiling your kernel. This is what I chose to do:
  
 +  * Base system with 8.2-RELEASE, kept up-to-date with freebsd-update fetch and freebsd-update install
 +  * Keep your ports tree updated as shown above
 +  * Set .profile environment variable PACKAGESITE for 8-STABLE to ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/
 +  * Install packages using portupgrade -vaRrPP so that portupgrade tries to find the package version given by the updated ports tree and stops when the package is not available
  
  
freebsd.1314697686.txt.gz · Last modified: by admin

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki