From owner-svn-doc-all@FreeBSD.ORG Wed Oct 3 21:41:01 2012 Return-Path: Delivered-To: svn-doc-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0793B106564A; Wed, 3 Oct 2012 21:41:01 +0000 (UTC) (envelope-from wblock@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id E54E48FC15; Wed, 3 Oct 2012 21:41:00 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q93Lf0ed097235; Wed, 3 Oct 2012 21:41:00 GMT (envelope-from wblock@svn.freebsd.org) Received: (from wblock@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q93Lf08P097233; Wed, 3 Oct 2012 21:41:00 GMT (envelope-from wblock@svn.freebsd.org) Message-Id: <201210032141.q93Lf08P097233@svn.freebsd.org> From: Warren Block Date: Wed, 3 Oct 2012 21:41:00 +0000 (UTC) To: doc-committers@freebsd.org, svn-doc-all@freebsd.org, svn-doc-head@freebsd.org X-SVN-Group: doc-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r39650 - head/en_US.ISO8859-1/books/handbook/ports X-BeenThere: svn-doc-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire doc trees \(except for " user" , " projects" , and " translations" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Oct 2012 21:41:01 -0000 Author: wblock Date: Wed Oct 3 21:41:00 2012 New Revision: 39650 URL: http://svn.freebsd.org/changeset/doc/39650 Log: Whitespace-only cleanup. Translators, please ignore. Modified: head/en_US.ISO8859-1/books/handbook/ports/chapter.xml Modified: head/en_US.ISO8859-1/books/handbook/ports/chapter.xml ============================================================================== --- head/en_US.ISO8859-1/books/handbook/ports/chapter.xml Wed Oct 3 12:18:42 2012 (r39649) +++ head/en_US.ISO8859-1/books/handbook/ports/chapter.xml Wed Oct 3 21:41:00 2012 (r39650) @@ -18,32 +18,39 @@ do before needing to install an additional third-party application to get real work done. FreeBSD provides two complementary technologies for installing third-party software - on your system: the FreeBSD Ports Collection (for installing from - source), and packages (for installing from pre-built binaries). - Either method may be used to install the - newest version of your favorite applications from local media or + on your system: the FreeBSD Ports Collection (for installing + from source), and packages (for installing from pre-built + binaries). Either method may be used to install the newest + version of your favorite applications from local media or straight off the network. After reading this chapter, you will know: - How to install third-party binary software packages. + How to install third-party binary software + packages. + - How to build third-party software from source by using the ports - collection. + How to build third-party software from source by using + the ports collection. + - How to remove previously installed packages or ports. + How to remove previously installed packages or + ports. + How to override the default values that the ports collection uses. + How to find the appropriate software package. + How to upgrade your applications. @@ -124,10 +131,10 @@ automatically downloaded, extracted, patched, compiled, and installed for you. - In fact, the ports system can also be used to generate packages - which can later be manipulated with pkg_add - and the other package management commands that will be introduced - shortly. + In fact, the ports system can also be used to generate + packages which can later be manipulated with + pkg_add and the other package management + commands that will be introduced shortly. Both packages and ports understand dependencies. Suppose you want to install @@ -171,11 +178,11 @@ Ports Benefits - Packages are normally compiled with conservative options, - because they have to run on the maximum number of systems. By - installing from the port, you can tweak the compilation options to - (for example) generate code that is specific to a Pentium - 4 or Athlon processor. + Packages are normally compiled with conservative + options, because they have to run on the maximum number of + systems. By installing from the port, you can tweak the + compilation options to (for example) generate code that is + specific to a Pentium 4 or Athlon processor. @@ -198,9 +205,9 @@ - The licensing conditions of some software distributions forbid - binary distribution. They must be distributed as source - code. + The licensing conditions of some software distributions + forbid binary distribution. They must be distributed as + source code. @@ -210,8 +217,8 @@ - If you have local patches, you will need the source in order to - apply them. + If you have local patches, you will need the source in + order to apply them. @@ -226,16 +233,16 @@ Before installing any application, you should check for security issues + url="http://vuxml.freebsd.org/"> for security issues related to your application. - You can also install ports-mgmt/portaudit which will - automatically check all installed applications for known - vulnerabilities; a check will be also performed before any port - build. Meanwhile, you can use the command portaudit - -F -a after you have installed some - packages. + You can also install + ports-mgmt/portaudit + which will automatically check all installed applications for + known vulnerabilities; a check will be also performed before + any port build. Meanwhile, you can use the command + portaudit -F -a after you have installed + some packages. The remainder of this chapter will explain how to use @@ -246,8 +253,8 @@ Finding Your Application - Before you can install any applications you need to know what you - want, and what the application is called. + Before you can install any applications you need to know + what you want, and what the application is called. FreeBSD's list of available applications is growing all the time. Fortunately, there are a number of ways to find what you @@ -257,7 +264,7 @@ The FreeBSD web site maintains an up-to-date searchable list of all the available applications, at http://www.FreeBSD.org/ports/. + url="&url.base;/ports/index.html">http://www.FreeBSD.org/ports/. The ports are divided into categories, and you may either search for an application by name (if you know it), or see all the applications available in a category. @@ -267,65 +274,66 @@ FreshPorts Dan Langille maintains FreshPorts, at . FreshPorts + url="http://www.FreshPorts.org/">. FreshPorts tracks changes to the applications in the ports tree as they happen, allows you to watch one or more ports, and can send you email when they are updated. - Freecode + Freecode If you do not know the name of the application you want, try using a site like Freecode () to find an + url="http://www.freecode.com/">) to find an application, then check back at the FreeBSD site to see if the application has been ported yet. If you know the exact name of the port, but just need to - find out which category it is in, you can use the - &man.whereis.1; command. - Simply type whereis - file, where - file is the program you want to - install. If it is found on your system, you will be told - where it is, as follows: + find out which category it is in, you can use the + &man.whereis.1; command. Simply type + whereis file, + where file is the program you + want to install. If it is found on your system, you will be + told where it is, as follows: - &prompt.root; whereis lsof + &prompt.root; whereis lsof lsof: /usr/ports/sysutils/lsof - This tells us that lsof (a system - utility) can be found in the - /usr/ports/sysutils/lsof - directory. + This tells us that lsof (a system + utility) can be found in the + /usr/ports/sysutils/lsof + directory. + - Additionally, you can use a simple &man.echo.1; statement - to find where a port exists in the ports tree. For - example: + Additionally, you can use a simple &man.echo.1; + statement to find where a port exists in the ports tree. + For example: &prompt.root; echo /usr/ports/*/*lsof* /usr/ports/sysutils/lsof - Note that this will return any matched files downloaded into the - /usr/ports/distfiles + Note that this will return any matched files downloaded + into the /usr/ports/distfiles directory. - Yet another way to find a particular port is by using the - Ports Collection's built-in search mechanism. To use the - search feature, you will need to be in the - /usr/ports directory. Once in that - directory, run make search - name=program-name where - program-name is the name of the - program you want to find. For example, if you were looking - for lsof: + Yet another way to find a particular port is by using + the Ports Collection's built-in search mechanism. To use + the search feature, you will need to be in the + /usr/ports directory. Once in that + directory, run make search + name=program-name where + program-name is the name of the + program you want to find. For example, if you were looking + for lsof: - &prompt.root; cd /usr/ports + &prompt.root; cd /usr/ports &prompt.root; make search name=lsof Port: lsof-4.56.4 Path: /usr/ports/sysutils/lsof @@ -335,36 +343,37 @@ Index: sysutils B-deps: R-deps: - The part of the output you want to pay particular - attention to is the Path: line, since that - tells you where to find the port. The other information - provided is not needed in order to install the port, so it - will not be covered here. - - For more in-depth searching you can also use make - search key=string - where string is some text to search for. - This searches port names, comments, descriptions and - dependencies and can be used to find ports which relate to a - particular subject if you do not know the name of the program - you are looking for. - - In both of these cases, the search string is case-insensitive. - Searching for LSOF will yield the same results as - searching for lsof. + The part of the output you want to pay particular + attention to is the Path: line, since that + tells you where to find the port. The other information + provided is not needed in order to install the port, so it + will not be covered here. + + For more in-depth searching you can also use + make search + key=string where + string is some text to search + for. This searches port names, comments, descriptions and + dependencies and can be used to find ports which relate to a + particular subject if you do not know the name of the + program you are looking for. + + In both of these cases, the search string is + case-insensitive. Searching for LSOF will + yield the same results as searching for + lsof. - - - Chern + + Chern Lee Contributed by - + @@ -375,30 +384,37 @@ R-deps: FreeBSD: - The sysinstall utility can be invoked on a - running system to install, delete, and list available and - installed packages. For more information, see . - The package management command line tools, which are - the subject of the rest of this section. + + The sysinstall utility can be invoked + on a running system to install, delete, and list available + and installed packages. For more information, see + . + + + + The package management command line tools, which are + the subject of the rest of this section. + Installing a Package + - packages - installing + packages + installing - pkg_add + pkg_add You can use the &man.pkg.add.1; utility to install a FreeBSD software package from a local file or from a server on the network. - Downloading a Package Manually and Installing It Locally + Downloading a Package Manually and Installing It + Locally &prompt.root; ftp -a ftp2.FreeBSD.org Connected to ftp2.FreeBSD.org. @@ -426,35 +442,34 @@ local: lsof-4.56.4.tgz remote: lsof-4.56 If you do not have a source of local packages (such as a - FreeBSD CD-ROM set) then it will probably be easier to use the - option to &man.pkg.add.1;. This will - cause the utility to automatically determine the correct - object format and release and then fetch and install the - package from an FTP site. - + FreeBSD CD-ROM set) then it will probably be easier to use the + option to &man.pkg.add.1;. This will + cause the utility to automatically determine the correct + object format and release and then fetch and install the + package from an FTP site. - pkg_add + pkg_add + &prompt.root; pkg_add -r lsof The example above would download the correct package and - add it without any further user intervention. - If you want to specify an alternative &os; Packages Mirror, - instead of the main distribution site, you have to set the - PACKAGESITE environment variable accordingly, to - override the default settings. &man.pkg.add.1; - uses &man.fetch.3; to download the files, which honors various + add it without any further user intervention. If you want to + specify an alternative &os; Packages Mirror, instead of the + main distribution site, you have to set the + PACKAGESITE environment variable accordingly, + to override the default settings. &man.pkg.add.1; uses + &man.fetch.3; to download the files, which honors various environment variables, including FTP_PASSIVE_MODE, FTP_PROXY, and FTP_PASSWORD. You may need to set one or more of these if you are behind a firewall, or need to use an FTP/HTTP proxy. See &man.fetch.3; for the complete list. - Note that in the example above - lsof is used instead of - lsof-4.56.4. When the remote fetching - feature is used, the version number of the package must be - removed. &man.pkg.add.1; will automatically fetch the latest - version of the application. + Note that in the example above lsof is used + instead of lsof-4.56.4. When the remote + fetching feature is used, the version number of the package + must be removed. &man.pkg.add.1; will automatically fetch the + latest version of the application. &man.pkg.add.1; will download the latest version of @@ -470,118 +485,132 @@ local: lsof-4.56.4.tgz remote: lsof-4.56 If you want to force &man.pkg.add.1; to download &os; 8-STABLE packages, set PACKAGESITE to - ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/. - + ftp://ftp.freebsd.org/pub/FreeBSD/ports/i386/packages-8-stable/Latest/. Package files are distributed in .tgz - and .tbz formats. You can find them at , - or on the FreeBSD CD-ROM distribution. Every CD on the - FreeBSD 4-CD set (and the PowerPak, etc.) contains packages - in the /packages directory. The layout - of the packages is similar to that of the - /usr/ports tree. Each category has its - own directory, and every package can be found within the - All directory. - + and .tbz formats. You can find them at + , + or on the FreeBSD CD-ROM distribution. Every CD on the + FreeBSD 4-CD set (and the PowerPak, etc.) contains packages in + the /packages directory. The layout of + the packages is similar to that of the + /usr/ports tree. Each category has its + own directory, and every package can be found within the + All directory. The directory structure of the package system matches the - ports layout; they work with each other to form the entire - package/port system. - - + ports layout; they work with each other to form the entire + package/port system. Managing Packages - packages - managing + packages + managing + &man.pkg.info.1; is a utility that lists and describes - the various packages installed. - + the various packages installed. - pkg_info + pkg_info + &prompt.root; pkg_info cvsup-16.1 A general network file distribution system optimized for CV docbook-1.2 Meta-port for the different versions of the DocBook DTD ... + &man.pkg.version.1; is a utility that summarizes the - versions of all installed packages. It compares the package - version to the current version found in the ports tree. - + versions of all installed packages. It compares the package + version to the current version found in the ports tree. + - pkg_version + pkg_version - &prompt.root; pkg_version + &prompt.root; pkg_version cvsup = docbook = ... The symbols in the second column indicate the relative age - of the installed version and the version available in the - local ports tree. + of the installed version and the version available in the + local ports tree. - + - - Symbol - Meaning - - - - - - = The version of the - installed package matches the one found in the - local ports tree. - - - < - The installed version is older than the one available - in the ports tree. - - - >The installed version is newer - than the one found in the local ports tree. (The local ports - tree is probably out of date.) - - ?The installed package cannot be - found in the ports index. (This can happen, for instance, if an - installed port is removed from the Ports Collection or - renamed.) - - *There are multiple versions of the - package. - - !The installed package exists in the - index but for some reason, pkg_version was - unable to compare the version number of the installed package - with the corresponding entry in the index. - - + + Symbol + Meaning + + + + + + = + The version of the installed package matches the + one found in the local ports tree. + + + + < + The installed version is older than the one + available in the ports tree. + + + + >The installed version is newer + than the one found in the local ports tree. (The + local ports tree is probably out of + date.) + + + + ? + The installed package cannot be found in the + ports index. (This can happen, for instance, if an + installed port is removed from the Ports Collection or + renamed.) + + + + * + There are multiple versions of the + package. + + + + ! + + The installed package exists in the index but for + some reason, pkg_version was unable + to compare the version number of the installed package + with the corresponding entry in the index. + + - + Deleting a Package + - pkg_delete + pkg_delete + - packages - deleting + packages + deleting + To remove a previously installed software package, use the - &man.pkg.delete.1; utility. - + &man.pkg.delete.1; utility. &prompt.root; pkg_delete xchat-1.7.1 @@ -590,7 +619,8 @@ docbook = xchat was given instead of xchat-1.7.1. It is, however, easy to use &man.pkg.version.1; to find the version of the - installed package. You could instead simply use a wildcard: + installed package. You could instead simply use a + wildcard: &prompt.root; pkg_delete xchat\* @@ -600,21 +630,22 @@ docbook = Miscellaneous + All package information is stored within the - /var/db/pkg directory. The installed + /var/db/pkg directory. The installed file list and descriptions of each package can be found within - files in this directory. - + files in this directory. Using the Ports Collection - The following sections provide basic instructions on using the - Ports Collection to install or remove programs from your - system. The detailed description of available make - targets and environment variables is available in &man.ports.7;. + The following sections provide basic instructions on using + the Ports Collection to install or remove programs from your + system. The detailed description of available + make targets and environment variables is + available in &man.ports.7;. As of late 2012, the &os; Ports Project is in the @@ -703,7 +734,7 @@ docbook = &prompt.root; pkg_add -r subversion If pkgng is being used to - manage packages, Subversion can + manage packages, Subversion can be installed with it instead: &prompt.root; pkg install subversion @@ -745,23 +776,25 @@ docbook = 2013. - This is a quick method for getting and keeping your copy of the - Ports Collection up to date using CVSup - protocol. If you want to learn more about - CVSup, see Using CVSup. + This is a quick method for getting and keeping your copy + of the Ports Collection up to date using + CVSup protocol. If you want to + learn more about CVSup, see + Using CVSup. - The implementation of CVSup protocol - included with the &os; system is called + The implementation of CVSup + protocol included with the &os; system is called csup. - Make sure /usr/ports - is empty before you run csup for - the first time! If you already have the Ports Collection present, - obtained from another source, csup - will not prune removed patch files. + Make sure + /usr/ports is empty + before you run csup for the first + time! If you already have the Ports Collection present, + obtained from another source, + csup will not prune removed patch + files. Run csup: @@ -771,9 +804,9 @@ docbook = Change cvsup.FreeBSD.org to a CVSup server near you. See - CVSup Mirrors () for a complete listing of mirror - sites. + CVSup Mirrors + () for a complete listing + of mirror sites. One may want to use his own @@ -814,20 +847,22 @@ docbook = - Running the &man.csup.1; command later will download and apply - all the recent changes to your Ports Collection, except - actually rebuilding the ports for your own system. + Running the &man.csup.1; command later will download + and apply all the recent changes to your Ports Collection, + except actually rebuilding the ports for your own + system. Sysinstall Method - This method involves using sysinstall - to install the Ports Collection from the installation media. Note - that the old copy of Ports Collection from the date of the release - will be installed. If you have Internet access, you should always - use one of the methods mentioned above. + This method involves using + sysinstall to install the Ports + Collection from the installation media. Note that the old + copy of Ports Collection from the date of the release will + be installed. If you have Internet access, you should + always use one of the methods mentioned above. As root, run @@ -837,8 +872,9 @@ docbook = - Scroll down and select Configure, - press Enter. + Scroll down and select + Configure, press + Enter. @@ -878,15 +914,16 @@ docbook = Installing Ports - ports - installing + ports + installing + The first thing that should be explained when it comes to - the Ports Collection is what is actually meant by a - skeleton. In a nutshell, a port skeleton is a - minimal set of files that tell your FreeBSD system how to - cleanly compile and install a program. Each port skeleton - includes: + the Ports Collection is what is actually meant by a + skeleton. In a nutshell, a port skeleton is a + minimal set of files that tell your FreeBSD system how to + cleanly compile and install a program. Each port skeleton + includes: @@ -916,13 +953,14 @@ docbook = diffs because they are generated by the &man.diff.1; program. - This directory may also contain other files used to build - the port. + This directory may also contain other files used to + build the port. A pkg-descr file. This is a more - detailed, often multiple-line, description of the program. + detailed, often multiple-line, description of the + program. @@ -934,32 +972,32 @@ docbook = Some ports have other files, such as - pkg-message. The ports system uses these - files to handle special situations. If you want more details - on these files, and on ports in general, check out the FreeBSD Porter's - Handbook. + pkg-message. The ports system uses these + files to handle special situations. If you want more details + on these files, and on ports in general, check out the + FreeBSD + Porter's Handbook. The port includes instructions on how to build source - code, but does not include the actual source code. You can - get the source code from a CD-ROM or from the Internet. - Source code is distributed in whatever manner the software - author desires. Frequently this is a tarred and gzipped file, - but it might be compressed with some other tool or even - uncompressed. The program source code, whatever form it comes - in, is called a distfile. The two methods for - installing a &os; port are described below. + code, but does not include the actual source code. You can + get the source code from a CD-ROM or from the Internet. + Source code is distributed in whatever manner the software + author desires. Frequently this is a tarred and gzipped file, + but it might be compressed with some other tool or even + uncompressed. The program source code, whatever form it comes + in, is called a distfile. The two methods for + installing a &os; port are described below. - You must be logged in as root to - install ports. + You must be logged in as root to + install ports. Before installing any port, you should be sure to have - an up-to-date Ports Collection and you should check for security issues - related to your port. + an up-to-date Ports Collection and you should check + for security + issues related to your port. A security vulnerabilities check can be automatically done by portaudit before any new @@ -974,23 +1012,23 @@ docbook = manual pages. - The Ports Collection makes an assumption that you have a working - Internet connection. If you do not, you will need to put a copy of the - distfile into /usr/ports/distfiles - manually. - - To begin, change to the directory for the port you want to - install: - - &prompt.root; cd /usr/ports/sysutils/lsof - - Once inside the lsof directory, you - will see the port skeleton. The next step is to compile, or - build, the port. This is done by simply - typing make at the prompt. Once you have - done so, you should see something like this: + The Ports Collection makes an assumption that you have a + working Internet connection. If you do not, you will need to + put a copy of the distfile into + /usr/ports/distfiles manually. + + To begin, change to the directory for the port you want + to install: + + &prompt.root; cd /usr/ports/sysutils/lsof + + Once inside the lsof directory, you + will see the port skeleton. The next step is to compile, or + build, the port. This is done by simply + typing make at the prompt. Once you have + done so, you should see something like this: - &prompt.root; make + &prompt.root; make >> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from ftp://lsof.itap.purdue.edu/pub/tools/unix/lsof/. ===> Extracting for lsof-4.57 @@ -1010,13 +1048,13 @@ docbook = ... &prompt.root; - Notice that once the compile is complete you are - returned to your prompt. The next step is to install the - port. In order to install it, you simply need to tack one word - onto the make command, and that word is - install: + Notice that once the compile is complete you are + returned to your prompt. The next step is to install the + port. In order to install it, you simply need to tack one + word onto the make command, and that word + is install: - &prompt.root; make install + &prompt.root; make install ===> Installing for lsof-4.57 ... [installation output snipped] @@ -1029,159 +1067,164 @@ docbook = increased privileges. &prompt.root; - Once you are returned to your prompt, you should be able to - run the application you just installed. Since - lsof is a - program that runs with increased privileges, a security - warning is shown. During the building and installation of - ports, you should take heed of any other warnings that - may appear. - - It is a good idea to delete the working subdirectory, - which contains all the temporary files used during compilation. - Not only does it consume valuable disk space, but it would also - cause problems later when upgrading to the newer version of the - port. + Once you are returned to your prompt, you should be able + to run the application you just installed. Since + lsof is a program that runs with + increased privileges, a security warning is shown. During + the building and installation of ports, you should take heed + of any other warnings that may appear. + + It is a good idea to delete the working subdirectory, + which contains all the temporary files used during + compilation. Not only does it consume valuable disk space, + but it would also cause problems later when upgrading to the + newer version of the port. - &prompt.root; make clean + &prompt.root; make clean ===> Cleaning for lsof-4.57 &prompt.root; - - You can save two extra steps by just running make - install clean instead of - make, - make install and - make clean - as three separate steps. - + + You can save two extra steps by just running + make + install clean + instead of make, + make install + and make clean + as three separate steps. + - - When installing a port, using only make - install from the - beginning means there will potentially be many waiting - periods between user interaction as the default behaviour - is to prompt the user for options. When there are many - dependencies, this sometimes makes building a single port - a huge hassle. To avoid this, first run make - config-recursive to - do the configuration in one batch. Then run - make install - [clean] afterwards. - + + When installing a port, using only + make install + from the beginning means there will potentially be many + waiting periods between user interaction as the default + behaviour is to prompt the user for options. When there are + many dependencies, this sometimes makes building a single + port a huge hassle. To avoid this, first run make + config-recursive to do + the configuration in one batch. Then run make + install [clean] + afterwards. + - - When using config-recursive, - the list of ports to configure are gathered by the - all-depends-list &man.make.1; - target. It is often recommended to run make - config-recursive - until all dependent ports options have been defined, and - ports options &man.dialog.1; screens no longer - appear, to be certain all ports options have been - configured as intended. - *** DIFF OUTPUT TRUNCATED AT 1000 LINES ***