diff --git a/en_US.ISO8859-1/books/handbook/ports/chapter.sgml b/en_US.ISO8859-1/books/handbook/ports/chapter.sgml index 476a626438..d1503f988c 100644 --- a/en_US.ISO8859-1/books/handbook/ports/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/ports/chapter.sgml @@ -1,45 +1,258 @@ - Installing Applications: The Ports collection - - Rewritten by &a.jim;, 22 November 1999. Original work - by various people. + Installing Applications: Packages and Ports Synopsis - The FreeBSD Ports collection allows you to compile and install a - very wide range of applications with a minimum amount of - effort. + There is only so much you can do with FreeBSD. If you are an + operating systems developer then the base system likely contains + everything you need. If that is not what you are planning to do with + FreeBSD then you will probably want to install additional + software—perhaps a web server, or a mail reader, or a graphical + environment such as KDE or GNOME. - In general, it is a group of skeletons - which contain a minimal set of items needed to make an application - compile and install cleanly on FreeBSD. + If you have used a Unix system before you will know that the typical + procedure for installing third party software goes something like + this: - Even with all the hype about open standards, getting a program - to compile on various UNIX platforms can be a tricky task. - Occasionally, you might be lucky enough to find that the program you - want compiles cleanly on your system, install everything into all - the right directories, and run flawlessly - out-of-the-box, but this behavior is somewhat rare. - Most of the time, you find yourself needing to make modifications in - order to get the program to work. This is where the FreeBSD Ports - collection comes to the rescue. + + + Download the software, which might be distributed in source code + format, or as a binary. + - The general idea behind the Ports collection is to eliminate all - of the messy steps involved with making things work properly so that - the installation is simple and very painless. With the Ports - collection, all of the hard work has already been done for you, and - you are able to install any of the Ports collection ports by simply - typing make install. + + Unpack the software from its distribution format (typically a + tarball compressed with either &man.compress.1; or &man.gzip.1;). + + + + Locate the documentation (perhaps a README + file, or some files in a doc/ subdirectory) and + read up on how to install the software. + + + + If the software was distributed in source format, compile it. + This may involve editing a Makefile, or + running a configure script, and other work. + + + + Test and install the software. + + + + And that is only if everything goes well. If you are installing a + software package that was not deliberately ported to FreeBSD you may + even have to go in and edit the code to make it work properly. + + Should you want to, you can continue to install software the + traditional way with FreeBSD. However, FreeBSD provides + two technologies which can save you a lot of effort; packages and + ports. At the time of writing, over 4,000 third party applications have + been made available in this way. + + For any given application, the FreeBSD package for that application + is a single file which you must download. The package contains + pre-compiled copies of all the commands for the application, as well as + any configuration files or documentation. A downloaded package file can + be manipulated with FreeBSD pkg_* commands, such as + &man.pkg.add.1; &man.pkg.delete.1;, &man.pkg.info.1;, and so on. + + Installing a new application can be carried out with a single + command. + + A FreeBSD port for an application is a collection of files designed + to automate the process of compiling an application from source + code. + + Remember that there are a number of steps you would normally carry + out if you compiled a program yourself (unpacking, patching, compiling, + installing). The files that make up a port contain all the necessary + information to alllow the system to do this for you. You run a handful + of simple commands and the source code for the application is + 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 the pkg_* + commands. + + Both packages and ports understand + dependencies. Suppose you want to install an + application that depends on a specific library being installed. Both + the application and the library have been made available as FreeBSD + ports and packages. If you use the pkg_add command + or the ports system to add the application, both will notice that the + library has not been installed, and the commands will install the + library first. + + Given that the two technologies are quite similar, you might be + wondering why FreeBSD bothers with both. Packages and ports both have + their own strengths, and which one you use will depend on your own + preference. + + + Package benefits + + + A compressed package tarball is typically smaller than the + compressed tarball containing the source code for the application. + + + + Packages do not require any additional compilation. For large + applications, such as Mozilla, + KDE, or GNOME + this can be important, particularly if you are on a slow system. + + + + Packages do not require you to understand any of the process + involved in compiling software on FreeBSD. + + + + + 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 686 processor. + + + + Some packages have compile time options relating to what they + can and can't do. For example, Apache + can be configured with a wide variety of different builtin options. + By building from the port you do not have to accept the default + options, and can set them yourself. + + In some cases, multiple packages will exist for the same + application to specify certain settings. For example, + Ghostscript is available as a + ghostscript package and a + ghostscript-nox11 package, depending on whether + or not you have installed an X11 server. This sort of rough + tweaking is possible with packages, but rapidly becomes impossible + if an application has more than one or two different compile time + options. + + + + The licensing conditions of some software distributions forbid + binary distribution. They must be distributed as source + code. + + + + Some people do not trust binary distributions. At least with + source code, you can (in theory) read through it and look for + potential problems yourself. + + + + If you have local patches, you will need the source in order to + apply them. + + + + Some people like having code around, so they can read it if they + get bored, hack it, borrow from it (license permitting, of course), + and so on. + + + + The remainder of this chapter will explain how to use packages and + ports to install and manage third party software on FreeBSD. + + Finding your application + + 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. + Currently there are over 4,000 applications available as packages or + ports. There are a number of ways to find what you want. + + + + The FreeBSD web site maintains an up-to-date searchable list of + all the available applications, at + http://www.FreeBSD.org/ports/. + The name space is divided in to categories, and you may either + search for an application by name (if you know it), or you can list + all the applications available in a category. + + + + Dan Langille maintains FreshPorts, at + http://www.freshports.org/. + FreshPorts tracks changes to the applications in the ports tree as + they happen, and allows you to watch one or more + ports, and will send you an e-mail when they are updated. + + + + If you do not know the name of the application you want, try + using a site like FreshMeat + (http://www.freshmeat.net/) + or AppWatch + (http://www.appwatch.com/) + to find an application, then check back at the FreeBSD site to see + if the application has been ported yet. + + + + + + * Using the Packages System + + + Installing a Package + + After you have decided which application you want to install you + need to download the package file and install it. + + There are several ways you can do this. + + + Downloading and installing in multiple steps + + + + + + + Deleting a Package + + + + + + Updating a Package + + + + + + + + + + + Using the Ports Collection @@ -361,80 +574,6 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% - - - I thought you were supposed to use packages to install - extra programs? - - - - Yes, that is usually the quickest and easiest way of - doing it. - - - - - - So why bother with ports then? - - - - Several reasons: - - - - The licensing conditions of some software - distributions forbid binary distribution. They must be - distributed as source code. - - - - Some people do not trust binary distributions. At - least with source code, you can (in theory) read through - it and look for potential problems yourself. - - - - If you have local patches, you will need the source in - order to apply them. - - - - You might have opinions on how a program should be - compiled that differ from the person who did the - package—some people have strong views on what - optimization settings should be used, whether to build - debug versions and then strip them or not, and so on. - - - - Packages are normally built with quite conservative - settings. If a port has a compilation option to use code - for a specific processor, or a particular add-on board you - can enable this yourself in the port, without the people - making the package having to produce many, many different - packaged versions. - - The most obvious exception to this rule is paper sizes. - If a package can be provided with default support for - different paper sizes we will often provide multiple - packages, one per paper size. - - - - Some people like having code around, so they can read - it if they get bored, hack it, borrow from it (license - permitting, of course), and so on. - - - - If you ain't got the source, it ain't software! - ;-) - - - - - What is a patch? diff --git a/en_US.ISO_8859-1/books/handbook/ports/chapter.sgml b/en_US.ISO_8859-1/books/handbook/ports/chapter.sgml index 476a626438..d1503f988c 100644 --- a/en_US.ISO_8859-1/books/handbook/ports/chapter.sgml +++ b/en_US.ISO_8859-1/books/handbook/ports/chapter.sgml @@ -1,45 +1,258 @@ - Installing Applications: The Ports collection - - Rewritten by &a.jim;, 22 November 1999. Original work - by various people. + Installing Applications: Packages and Ports Synopsis - The FreeBSD Ports collection allows you to compile and install a - very wide range of applications with a minimum amount of - effort. + There is only so much you can do with FreeBSD. If you are an + operating systems developer then the base system likely contains + everything you need. If that is not what you are planning to do with + FreeBSD then you will probably want to install additional + software—perhaps a web server, or a mail reader, or a graphical + environment such as KDE or GNOME. - In general, it is a group of skeletons - which contain a minimal set of items needed to make an application - compile and install cleanly on FreeBSD. + If you have used a Unix system before you will know that the typical + procedure for installing third party software goes something like + this: - Even with all the hype about open standards, getting a program - to compile on various UNIX platforms can be a tricky task. - Occasionally, you might be lucky enough to find that the program you - want compiles cleanly on your system, install everything into all - the right directories, and run flawlessly - out-of-the-box, but this behavior is somewhat rare. - Most of the time, you find yourself needing to make modifications in - order to get the program to work. This is where the FreeBSD Ports - collection comes to the rescue. + + + Download the software, which might be distributed in source code + format, or as a binary. + - The general idea behind the Ports collection is to eliminate all - of the messy steps involved with making things work properly so that - the installation is simple and very painless. With the Ports - collection, all of the hard work has already been done for you, and - you are able to install any of the Ports collection ports by simply - typing make install. + + Unpack the software from its distribution format (typically a + tarball compressed with either &man.compress.1; or &man.gzip.1;). + + + + Locate the documentation (perhaps a README + file, or some files in a doc/ subdirectory) and + read up on how to install the software. + + + + If the software was distributed in source format, compile it. + This may involve editing a Makefile, or + running a configure script, and other work. + + + + Test and install the software. + + + + And that is only if everything goes well. If you are installing a + software package that was not deliberately ported to FreeBSD you may + even have to go in and edit the code to make it work properly. + + Should you want to, you can continue to install software the + traditional way with FreeBSD. However, FreeBSD provides + two technologies which can save you a lot of effort; packages and + ports. At the time of writing, over 4,000 third party applications have + been made available in this way. + + For any given application, the FreeBSD package for that application + is a single file which you must download. The package contains + pre-compiled copies of all the commands for the application, as well as + any configuration files or documentation. A downloaded package file can + be manipulated with FreeBSD pkg_* commands, such as + &man.pkg.add.1; &man.pkg.delete.1;, &man.pkg.info.1;, and so on. + + Installing a new application can be carried out with a single + command. + + A FreeBSD port for an application is a collection of files designed + to automate the process of compiling an application from source + code. + + Remember that there are a number of steps you would normally carry + out if you compiled a program yourself (unpacking, patching, compiling, + installing). The files that make up a port contain all the necessary + information to alllow the system to do this for you. You run a handful + of simple commands and the source code for the application is + 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 the pkg_* + commands. + + Both packages and ports understand + dependencies. Suppose you want to install an + application that depends on a specific library being installed. Both + the application and the library have been made available as FreeBSD + ports and packages. If you use the pkg_add command + or the ports system to add the application, both will notice that the + library has not been installed, and the commands will install the + library first. + + Given that the two technologies are quite similar, you might be + wondering why FreeBSD bothers with both. Packages and ports both have + their own strengths, and which one you use will depend on your own + preference. + + + Package benefits + + + A compressed package tarball is typically smaller than the + compressed tarball containing the source code for the application. + + + + Packages do not require any additional compilation. For large + applications, such as Mozilla, + KDE, or GNOME + this can be important, particularly if you are on a slow system. + + + + Packages do not require you to understand any of the process + involved in compiling software on FreeBSD. + + + + + 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 686 processor. + + + + Some packages have compile time options relating to what they + can and can't do. For example, Apache + can be configured with a wide variety of different builtin options. + By building from the port you do not have to accept the default + options, and can set them yourself. + + In some cases, multiple packages will exist for the same + application to specify certain settings. For example, + Ghostscript is available as a + ghostscript package and a + ghostscript-nox11 package, depending on whether + or not you have installed an X11 server. This sort of rough + tweaking is possible with packages, but rapidly becomes impossible + if an application has more than one or two different compile time + options. + + + + The licensing conditions of some software distributions forbid + binary distribution. They must be distributed as source + code. + + + + Some people do not trust binary distributions. At least with + source code, you can (in theory) read through it and look for + potential problems yourself. + + + + If you have local patches, you will need the source in order to + apply them. + + + + Some people like having code around, so they can read it if they + get bored, hack it, borrow from it (license permitting, of course), + and so on. + + + + The remainder of this chapter will explain how to use packages and + ports to install and manage third party software on FreeBSD. + + Finding your application + + 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. + Currently there are over 4,000 applications available as packages or + ports. There are a number of ways to find what you want. + + + + The FreeBSD web site maintains an up-to-date searchable list of + all the available applications, at + http://www.FreeBSD.org/ports/. + The name space is divided in to categories, and you may either + search for an application by name (if you know it), or you can list + all the applications available in a category. + + + + Dan Langille maintains FreshPorts, at + http://www.freshports.org/. + FreshPorts tracks changes to the applications in the ports tree as + they happen, and allows you to watch one or more + ports, and will send you an e-mail when they are updated. + + + + If you do not know the name of the application you want, try + using a site like FreshMeat + (http://www.freshmeat.net/) + or AppWatch + (http://www.appwatch.com/) + to find an application, then check back at the FreeBSD site to see + if the application has been ported yet. + + + + + + * Using the Packages System + + + Installing a Package + + After you have decided which application you want to install you + need to download the package file and install it. + + There are several ways you can do this. + + + Downloading and installing in multiple steps + + + + + + + Deleting a Package + + + + + + Updating a Package + + + + + + + + + + + Using the Ports Collection @@ -361,80 +574,6 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% - - - I thought you were supposed to use packages to install - extra programs? - - - - Yes, that is usually the quickest and easiest way of - doing it. - - - - - - So why bother with ports then? - - - - Several reasons: - - - - The licensing conditions of some software - distributions forbid binary distribution. They must be - distributed as source code. - - - - Some people do not trust binary distributions. At - least with source code, you can (in theory) read through - it and look for potential problems yourself. - - - - If you have local patches, you will need the source in - order to apply them. - - - - You might have opinions on how a program should be - compiled that differ from the person who did the - package—some people have strong views on what - optimization settings should be used, whether to build - debug versions and then strip them or not, and so on. - - - - Packages are normally built with quite conservative - settings. If a port has a compilation option to use code - for a specific processor, or a particular add-on board you - can enable this yourself in the port, without the people - making the package having to produce many, many different - packaged versions. - - The most obvious exception to this rule is paper sizes. - If a package can be provided with default support for - different paper sizes we will often provide multiple - packages, one per paper size. - - - - Some people like having code around, so they can read - it if they get bored, hack it, borrow from it (license - permitting, of course), and so on. - - - - If you ain't got the source, it ain't software! - ;-) - - - - - What is a patch?