From d345fec9c454898c50177bbefbc654c2f8ee6c72 Mon Sep 17 00:00:00 2001 From: Warren Block Date: Wed, 3 Oct 2012 21:41:00 +0000 Subject: [PATCH] Whitespace-only cleanup. Translators, please ignore. --- .../books/handbook/ports/chapter.xml | 1179 +++++++++-------- 1 file changed, 620 insertions(+), 559 deletions(-) diff --git a/en_US.ISO8859-1/books/handbook/ports/chapter.xml b/en_US.ISO8859-1/books/handbook/ports/chapter.xml index d803bc397b..35c2055d4c 100644 --- a/en_US.ISO8859-1/books/handbook/ports/chapter.xml +++ b/en_US.ISO8859-1/books/handbook/ports/chapter.xml @@ -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. - - - 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 + This tells us that lsof (a system + utility) can be found in the + /usr/ports/sysutils/lsof 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: + Additionally, you can use a simple &man.echo.1; + statement to find where a port exists in the ports tree. + For example: - &prompt.root; cd /usr/ports + &prompt.root; echo /usr/ports/*/*lsof* +/usr/ports/sysutils/lsof + + 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: + + &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. + 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. + 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. + 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.4.tgz 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.4.tgz 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 - - + + Symbol + Meaning + + - - - = The version of the - installed package matches the one found in the - local ports tree. - + + + = + 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 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 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.) + + ? + 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. + + * + 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. + + ! - + 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. + 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: + To begin, change to the directory for the port you want + to install: - &prompt.root; cd /usr/ports/sysutils/lsof + &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: + 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. + 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. + 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. - + + 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. + - - Some shells keep a cache of the commands that are - available in the directories listed in the - PATH environment variable, to speed up - lookup operations for the executable file of these - commands. If you are using one of these shells, you might - have to use the rehash command after - installing a port, before the newly installed commands can - be used. This command will work for shells like - tcsh. Use the hash -r - command for shells like sh. Look at the - documentation for your shell for more information. - + + Some shells keep a cache of the commands that are + available in the directories listed in the + PATH environment variable, to speed up lookup + operations for the executable file of these commands. If + you are using one of these shells, you might have to use the + rehash command after installing a port, + before the newly installed commands can be used. This + command will work for shells like tcsh. + Use the hash -r command for shells like + sh. Look at the documentation for your + shell for more information. + - Some third-party DVD-ROM products such as the FreeBSD Toolkit - from the FreeBSD - Mall contain distfiles. They can be used with the Ports - Collection. Mount the DVD-ROM on /cdrom. If - you use a different mount point, set CD_MOUNTPTS - make variable. The needed distfiles will be automatically used - if they are present on the disk. + Some third-party DVD-ROM products such as the FreeBSD + Toolkit from the + FreeBSD Mall + contain distfiles. They can be used with the Ports + Collection. Mount the DVD-ROM on /cdrom. + If you use a different mount point, set + CD_MOUNTPTS make variable. The needed + distfiles will be automatically used if they are present on + the disk. - - Please be aware that the licenses of a few ports do - not allow for inclusion on the CD-ROM. This could be - because a registration form needs to be filled out before - downloading or redistribution is not allowed, or for - another reason. If you wish to install a port not - included on the CD-ROM, you will need to be online in - order to do so. - + + Please be aware that the licenses of a few ports do + not allow for inclusion on the CD-ROM. This could be + because a registration form needs to be filled out before + downloading or redistribution is not allowed, or for another + reason. If you wish to install a port not included on the + CD-ROM, you will need to be online in order to do so. + - The ports system uses &man.fetch.1; 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. + The ports system uses &man.fetch.1; 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. - For users which cannot be connected all the time, the - make fetch option is - provided. Just run this command at the top level directory - (/usr/ports) and the required files - will be downloaded for you. This command will also work in - the lower level categories, for example: - /usr/ports/net. - Note that if a port depends on libraries or other ports this will - not fetch the distfiles of those ports too. - Replace fetch with - fetch-recursive - if you want to fetch all the dependencies of a port too. + For users which cannot be connected all the time, the + make fetch option + is provided. Just run this command at the top level directory + (/usr/ports) and the required files will + be downloaded for you. This command will also work in the + lower level categories, for example: + /usr/ports/net. Note that if a port + depends on libraries or other ports this will + not fetch the distfiles of those ports + too. Replace fetch with + fetch-recursive if you want to fetch + all the dependencies of a port too. - You can build all the ports in a category or as a + + You can build all the ports in a category or as a whole by running make in the top level directory, just like the aforementioned make fetch method. This is dangerous, however, as some ports cannot co-exist. In other cases, some ports can install two different files with the - same filename. + same filename. + - In some rare cases, users may need to acquire the - tarballs from a site other than the - MASTER_SITES (the location where files - are downloaded from). You can override the - MASTER_SITES option with the following - command: + In some rare cases, users may need to acquire the + tarballs from a site other than the + MASTER_SITES (the location where files are + downloaded from). You can override the + MASTER_SITES option with the following + command: - &prompt.root; cd /usr/ports/directory + &prompt.root; cd /usr/ports/directory &prompt.root; make MASTER_SITE_OVERRIDE= \ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch - In this example we change the - MASTER_SITES option to In this example we change the + MASTER_SITES option to ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/. - Some ports allow (or even require) you to provide - build options which can enable/disable parts of the - application which are unneeded, certain security options, - and other customizations. A few which come to mind are - www/firefox, security/gpgme, and mail/sylpheed-claws. A message - will be displayed when options such as these are - available. + + Some ports allow (or even require) you to provide build + options which can enable/disable parts of the application + which are unneeded, certain security options, and other + customizations. A few which come to mind are + www/firefox, + security/gpgme, and + mail/sylpheed-claws. A + message will be displayed when options such as these are + available. + - Overriding the Default Ports Directories + Overriding the Default Ports Directories Sometimes it is useful (or mandatory) to use a different working and target directory. The - WRKDIRPREFIX and PREFIX - variables can override the default directories. For - example: + WRKDIRPREFIX and + PREFIX variables can override the default + directories. For example: &prompt.root; make WRKDIRPREFIX=/usr/home/example/ports install will compile the port in - /usr/home/example/ports and install - everything under /usr/local. + /usr/home/example/ports and install + everything under /usr/local. &prompt.root; make PREFIX=/usr/home/example/local install @@ -1213,27 +1256,28 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch Perl tree. Making these ports respect PREFIX is a difficult or impossible job. - Reconfiguring Ports When building certain ports, you may be presented with a - ncurses-based menu from which you can select certain build options. - It is not uncommon for users to wish to revisit this menu to add, - remove, or change these options after a port has been built. There - are many ways to do this. One option is to go into the directory - containing the port and type make - config, which will simply present - the menu again with the same options selected. Another option is to - use make showconfig, - which will show you all the configuration options for the port. Yet - another option is to execute make - rmconfig which will remove all - selected options and allow you to start over. All of these options, - and others, are explained in great detail in the manual page for - &man.ports.7;. + ncurses-based menu from which you can select certain build + options. It is not uncommon for users to wish to revisit + this menu to add, remove, or change these options after a + port has been built. There are many ways to do this. One + option is to go into the directory containing the port and + type + make config, + which will simply present the menu again with the same + options selected. Another option is to use + make showconfig, + which will show you all the configuration options for the + port. Yet another option is to execute + make rmconfig + which will remove all selected options and allow you to + start over. All of these options, and others, are explained + in great detail in the manual page for &man.ports.7;. @@ -1241,21 +1285,20 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch Removing Installed Ports - ports - removing + ports + removing + Now that you know how to install ports, you are probably - wondering how to remove them, just in case you install one and - later on decide that you installed the wrong port. - We will remove our previous example (which was - lsof for - those of you not paying attention). Ports are being removed exactly - the same as the packages (discussed in the Packages section), using the - &man.pkg.delete.1; command: + wondering how to remove them, just in case you install one and + later on decide that you installed the wrong port. We will + remove our previous example (which was lsof + for those of you not paying attention). Ports are being + removed exactly the same as the packages (discussed in the + Packages section), using + the &man.pkg.delete.1; command: &prompt.root; pkg_delete lsof-4.57 - @@ -1265,8 +1308,10 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch ports upgrading - First, list outdated ports that have a newer version available in - the Ports Collection with the &man.pkg.version.1; command: + + First, list outdated ports that have a newer version + available in the Ports Collection with the &man.pkg.version.1; + command: &prompt.root; pkg_version -v @@ -1277,13 +1322,14 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch attempting a port upgrade, you should check /usr/ports/UPDATING. This file describes various issues and additional steps users may - encounter and need to perform when updating a port, including - such things as file format changes, changes in locations of - configuration files, or other such incompatibilities with - previous versions. + encounter and need to perform when updating a port, + including such things as file format changes, changes in + locations of configuration files, or other such + incompatibilities with previous versions. - If UPDATING contradicts something you - read here, UPDATING takes precedence. + If UPDATING contradicts something + you read here, UPDATING takes + precedence. @@ -1293,51 +1339,54 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch portupgrade - The portupgrade utility is designed - to easily upgrade installed ports. It is available from the ports-mgmt/portupgrade port. Install it like - any other port, using the make install - clean command: + The portupgrade utility is + designed to easily upgrade installed ports. It is available + from the + ports-mgmt/portupgrade + port. Install it like any other port, using the + make install + clean command: - &prompt.root; cd /usr/ports/ports-mgmt/portupgrade + &prompt.root; cd /usr/ports/ports-mgmt/portupgrade &prompt.root; make install clean - Scan the list of installed ports with the pkgdb - -F command and fix all the inconsistencies it reports. It is - a good idea to do this regularly, before every upgrade. + Scan the list of installed ports with the + pkgdb -F command and fix all the + inconsistencies it reports. It is a good idea to do this + regularly, before every upgrade. - When you run portupgrade -a, - portupgrade will begin to upgrade all the - outdated ports installed on your system. Use the - flag if you want to be asked for confirmation of every individual - upgrade. + When you run portupgrade -a, + portupgrade will begin to upgrade + all the outdated ports installed on your system. Use the + flag if you want to be asked for + confirmation of every individual upgrade. - &prompt.root; portupgrade -ai + &prompt.root; portupgrade -ai - If you want to upgrade only a - certain application, not all available ports, use portupgrade - pkgname. Include the - flag if portupgrade - should first upgrade all the ports required by the given - application. + If you want to upgrade only a certain application, not + all available ports, use portupgrade + pkgname. Include the + flag if + portupgrade should first upgrade + all the ports required by the given application. - &prompt.root; portupgrade -R firefox + &prompt.root; portupgrade -R firefox - To use packages instead of ports for installation, provide - flag. With this option - portupgrade searches - the local directories listed in PKG_PATH, or - fetches packages from remote site if it is not found locally. - If packages can not be found locally or fetched remotely, - portupgrade will use ports. - To avoid using ports, specify . + To use packages instead of ports for installation, + provide flag. With this option + portupgrade searches the local + directories listed in PKG_PATH, or fetches + packages from remote site if it is not found locally. If + packages can not be found locally or fetched remotely, + portupgrade will use ports. To + avoid using ports, specify . - &prompt.root; portupgrade -PP gnome2 + &prompt.root; portupgrade -PP gnome2 - To just fetch distfiles (or packages, if - is specified) without building or - installing anything, use . - For further information see &man.portupgrade.1;. + To just fetch distfiles (or packages, if + is specified) without building or + installing anything, use . For further + information see &man.portupgrade.1;. @@ -1347,40 +1396,47 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch portmaster - Portmaster is another utility for - upgrading installed ports. Portmaster - was designed make use of the tools found in the base - system (it does not depend upon other ports) and uses the - information in /var/db/pkg/ - to determine which ports to upgrade. It is available from the + Portmaster is another utility + for upgrading installed ports. + Portmaster was designed make use + of the tools found in the base system (it + does not depend upon other ports) and uses the information + in /var/db/pkg/ to + determine which ports to upgrade. It is available from the ports-mgmt/portmaster port: &prompt.root; cd /usr/ports/ports-mgmt/portmaster &prompt.root; make install clean - Portmaster groups ports into four - categories: + Portmaster groups ports into + four categories: Root ports (no dependencies, not depended on) - + + - Trunk ports (no dependencies, are depended on) - + Trunk ports (no dependencies, are depended + on) + + - Branch ports (have dependencies, are depended on) - + Branch ports (have dependencies, are depended + on) + + - Leaf ports (have dependencies, not depended on) - + Leaf ports (have dependencies, not depended + on) + You can list all the installed ports and search for updates using the option: -&prompt.root; portmaster -L + &prompt.root; portmaster -L ===>>> Root ports (No dependencies, not depended on) ===>>> ispell-3.2.06_18 ===>>> screen-4.0.3 @@ -1400,36 +1456,41 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch ===>>> 32 leaf ports ===>>> 137 total installed ports - ===>>> 83 have new versions available - + ===>>> 83 have new versions available - All the installed ports can be upgraded using this simple - command: + All the installed ports can be upgraded using this + simple command: &prompt.root; portmaster -a - By default, Portmaster - will make a backup package before deleting the existing port. If - the installation of the new version is successful, - Portmaster will delete the backup. - Using the will instruct - Portmaster not to automatically delete - the backup. Adding the option will start - Portmaster in interactive mode, prompting - you before upgrading each port. + + By default, Portmaster will + make a backup package before deleting the existing port. + If the installation of the new version is successful, + Portmaster will delete the + backup. Using the will instruct + Portmaster not to automatically + delete the backup. Adding the option + will start Portmaster in + interactive mode, prompting you before upgrading each + port. + - If you encounter errors during the upgrade process, you can use - the option to upgrade/rebuild all ports: + If you encounter errors during the upgrade process, you + can use the option to upgrade/rebuild + all ports: &prompt.root; portmaster -af - You can also use Portmaster to - install new ports on the system, upgrading all dependencies - before building and installing the new port: + You can also use Portmaster + to install new ports on the system, upgrading all + dependencies before building and installing the new + port: &prompt.root; portmaster shells/bash - Please see &man.portmaster.8; for more information. + Please see &man.portmaster.8; for more + information. @@ -1440,21 +1501,22 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch ports disk-space - Using the Ports Collection will use up disk - space over time. After building and installing software from the - ports, you should always remember to clean up - the temporary work directories - using the make clean - command. You can sweep the whole Ports Collection with the following - command: + + Using the Ports Collection will use up disk space over + time. After building and installing software from the ports, + you should always remember to clean up the temporary + work directories using + the make clean + command. You can sweep the whole Ports Collection with the + following command: &prompt.root; portsclean -C - You will accumulate a lot of old source distribution files in the - distfiles directory over time. - You can remove them by hand, or you can use the following command to - delete all the distfiles that are no longer referenced by any - ports: + You will accumulate a lot of old source distribution files + in the distfiles + directory over time. You can remove them by hand, or you can + use the following command to delete all the distfiles that are + no longer referenced by any ports: &prompt.root; portsclean -D @@ -1468,12 +1530,12 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch portupgrade suite. - Do not forget to remove the installed ports once you no longer need - them. A nice tool to help automate this task is available from the + Do not forget to remove the installed ports once you no + longer need them. A nice tool to help automate this task is + available from the ports-mgmt/pkg_cutleaves port. - @@ -1487,13 +1549,13 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch The exact steps you need to take to configure each application will obviously be different. However, if you have - just installed a new application and are wondering What - now? these tips might help: + just installed a new application and are wondering + What now? these tips might help: - Use &man.pkg.info.1; to find out which files were installed, - and where. For example, if you have just + Use &man.pkg.info.1; to find out which files were + installed, and where. For example, if you have just installed FooPackage version 1.0.0, then this command &prompt.root; pkg_info -L foopackage-1.0.0 | less @@ -1531,8 +1593,8 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch &prompt.root; pkg_info foopackage-1.0.0 - A WWW: line, if present, should provide a URL - for the application's web site. + A WWW: line, if present, should + provide a URL for the application's web site. @@ -1541,8 +1603,8 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch /usr/local/etc/rc.d. You should review this script for correctness and edit or rename it if needed. See Starting - Services for more information. + linkend="configtuning-starting-services">Starting + Services for more information. @@ -1550,71 +1612,70 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch Dealing with Broken Ports - If you come across a port that does not work for you, - there are a few things you can do, including: + If you come across a port that does not work for you, + there are a few things you can do, including: - - - Find out if there is a fix pending for the port in - the Problem Report - database. If so, you may be able to use the - proposed fix. - + + + Find out if there is a fix pending for the port in + the Problem + Report database. If so, you may be able to use + the proposed fix. + - - Ask the maintainer of the port for help. Type - make maintainer or read - the Makefile to find the maintainer's - email address. Remember to include the name and version - of the port (send the $FreeBSD: - line from the Makefile) and the - output leading up to the error when you email the - maintainer. + + Ask the maintainer of the port for help. Type + make maintainer + or read the Makefile to find the + maintainer's email address. Remember to include the name + and version of the port (send the + $FreeBSD: line from the + Makefile) and the output leading up to + the error when you email the maintainer. - - Some ports are not maintained by an individual but - instead by a mailing - list. Many, but not all, of these addresses look like - freebsd-listname@FreeBSD.org. - Please take this into account when phrasing your - questions. + + Some ports are not maintained by an individual but + instead by a mailing + list. Many, but not all, of these addresses look + like freebsd-listname@FreeBSD.org. + Please take this into account when phrasing your + questions. - In particular, ports shown as maintained by - ports@FreeBSD.org are - actually not maintained by anyone. Fixes and support, if - any, come from the general community who subscribe to that - mailing list. More volunteers are always needed! - + In particular, ports shown as maintained by + ports@FreeBSD.org are + actually not maintained by anyone. Fixes and support, if + any, come from the general community who subscribe to that + mailing list. More volunteers are always needed! + - If you do not get a response, - you can use &man.send-pr.1; to submit a bug - report (see If you do not get a response, you can use + &man.send-pr.1; to submit a bug report (see Writing FreeBSD Problem Reports). - + - - Fix it! The + Fix it! The Porter's Handbook includes detailed information on the - Ports infrastructure so that you can fix the - occasional broken port or even submit your own! - + Ports infrastructure so that you can fix the + occasional broken port or even submit your own! + - - Grab the package from an FTP site near you. The - master package collection is on + Grab the package from an FTP site near you. The + master package collection is on ftp.FreeBSD.org in the packages directory, but be sure to check your closer mirror sites - first! These are more likely to work - than trying to compile from source and are a lot faster as - well. Use the &man.pkg.add.1; program to install the - package on your system. - - + first! These are more likely to work + than trying to compile from source and are a lot faster as + well. Use the &man.pkg.add.1; program to install the + package on your system. + + -