Date: Tue, 17 Aug 2004 19:46:45 -0400 From: Leonard Zettel <zettel@acm.org> To: freebsd-doc@freebsd.org Subject: Handbook 4.2 - ports overview Message-ID: <200408171946.45647.zettel@acm.org>
next in thread | raw e-mail | index | archive | help
--Boundary-00=_ljpIBfLzqlsss3q Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Diff attached. Material viewable at http://www.lenzettel.com/FreeBSD/documentation/books/handbook/ports/ports-overview.html Questions, comments, criticisms? -LenZ- --Boundary-00=_ljpIBfLzqlsss3q Content-Type: text/x-diff; charset="us-ascii"; name="chapter.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="chapter.diff" --- chapter.sgml_original Tue Aug 17 13:51:05 2004 +++ chapter.sgml Tue Aug 17 15:28:20 2004 @@ -51,47 +51,6 @@ <sect1 id="ports-overview"> <title>Overview of Software Installation</title> - <para>If you have used a &unix; system before you will know that - the typical procedure for installing third party software goes - something like this:</para> - - <procedure> - <step> - <para>Download the software, which might be distributed in - source code format, or as a binary.</para> - </step> - - <step> - <para>Unpack the software from its distribution format - (typically a tarball compressed with &man.compress.1;, - &man.gzip.1;, or &man.bzip2.1;).</para> - </step> - - <step> - <para>Locate the documentation (perhaps an - <filename>INSTALL</filename> or <filename>README</filename> - file, or some files in a <filename>doc/</filename> - subdirectory) and read up on how to install the - software.</para> - </step> - - <step> - <para>If the software was distributed in source format, - compile it. This may involve editing a - <filename>Makefile</filename>, or running a - <command>configure</command> script, and other work.</para> - </step> - - <step> - <para>Test and install the software.</para> - </step> - </procedure> - - <para>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.</para> - <para>Should you want to, you can continue to install software the <quote>traditional</quote> way with FreeBSD. However, FreeBSD provides two technologies which can save you a lot of effort: @@ -99,9 +58,9 @@ third party applications have been made available in this way.</para> - <para>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 + <para>The FreeBSD <emphasis>package</emphasis> for a given + application is a single file which you must download. It + 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 package management commands, such as @@ -109,37 +68,30 @@ on. Installing a new application can be carried out with a single command.</para> - <para>A FreeBSD port for an application is a collection of files - designed to automate the process of compiling an application - from source code.</para> - - <para>Remember that there are a number of steps you would normally - carry out if you compiled a program yourself (downloading, - unpacking, patching, compiling, installing). The files that - make up a port contain all the necessary information to allow - 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.</para> - - <para>In fact, the ports system can also be used to generate packages - which can later be manipulated with <command>pkg_add</command> - and the other package management commands that will be introduced - shortly.</para> + <para>A FreeBSD <emphasis>port</emphasis> for an application is a + collection of files containing all the information necessary to + automate the process of downloading, unpacking, patching, compiling, + and installing an application by using a handful of simple commands. A + port is generally part of a file structure called a + <emphasis>ports tree</emphasis>.</para> + + <para>The ports system can also be used to generate packages + which can later be manipulated with any of the package management + commands.</para> <para>Both packages and ports understand <emphasis>dependencies</emphasis>. Suppose you want to install - an application that depends on a specific library being - installed. Both the application and the library have been made + an application that depends on having a specific library. Both + the application and the library have been made available as FreeBSD ports and packages. If you use the <command>pkg_add</command> command or the ports system to add - the application, both will notice that the library has not been - installed, and automatically install the library first.</para> + the application, either will notice that the library has not been + installed, and automatically install it first.</para> <para>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.</para> + each have their own strengths, and which you use will depend + on your own preference and situation.</para> <itemizedlist> <title>Package Benefits</title> @@ -156,11 +108,11 @@ <application>Mozilla</application>, <application>KDE</application>, or <application>GNOME</application> this can be important, - particularly if you are on a slow system.</para> + particularly on a slow system.</para> </listitem> <listitem> - <para>Packages do not require any understanding of the process + <para>Packages do not require any understanding of the processes involved in compiling software on FreeBSD.</para> </listitem> </itemizedlist> @@ -169,7 +121,7 @@ <title>Ports Benefits</title> <listitem> - <para>Packages are normally compiled with conservative options, + <para>Packages are normally use 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 @@ -179,25 +131,23 @@ <listitem> <para>Some applications have compile time options relating to what they can and cannot do. For example, - <application>Apache</application> can be configured with a - wide variety of different built-in options. By building + <application>Apache</application> has a + wide variety of built-in options. By building from the port you do not have to accept the default options, - and can set them yourself.</para> + but can set them yourself.</para> <para>In some cases, multiple packages will exist for the same - application to specify certain settings. For example, - <application>Ghostscript</application> is available as a - <filename>ghostscript</filename> package and a - <filename>ghostscript-nox11</filename> 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.</para> + application. For example, <application>Ghostscript</application> + is available as a <filename>ghostscript</filename> package and a + <filename>ghostscript-nox11</filename> package. Which you use will + depend on whether or not you have installed an X11 server. This sort + of rough tweaking rapidly becomes impossible if an application + has more than one or two different compile time options.</para> </listitem> <listitem> <para>The licensing conditions of some software distributions forbid - binary distribution. They must be distributed as source + binary distribution. These must be distributed as source code.</para> </listitem> @@ -230,7 +180,7 @@ <para>You can also install <filename role="package">security/portaudit</filename> which will automatically check all installed applications for known - vulnerabilities, a check will be also performed before any port + vulnerabilities; a check will be also performed before any port build. Meanwhile, you can use the command <command>portaudit -F -a</command> after you have installed some packages.</para> @@ -248,7 +198,7 @@ want, and what the application is called.</para> <para>FreeBSD's list of available applications is growing all the - time. Fortunately, there are a number of ways to find what you + time. There are a number of ways to find what you want:</para> <itemizedlist> --Boundary-00=_ljpIBfLzqlsss3q--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200408171946.45647.zettel>