From owner-freebsd-doc@FreeBSD.ORG Tue Aug 17 23:43:54 2004 Return-Path: Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD2E016A4CE for ; Tue, 17 Aug 2004 23:43:54 +0000 (GMT) Received: from sccrmhc12.comcast.net (sccrmhc12.comcast.net [204.127.202.56]) by mx1.FreeBSD.org (Postfix) with ESMTP id 53A9643D3F for ; Tue, 17 Aug 2004 23:43:54 +0000 (GMT) (envelope-from zettel@acm.org) Received: from [192.168.0.4] (bgp966574bgs.derbrn01.mi.comcast.net[68.41.108.205]) by comcast.net (sccrmhc12) with ESMTP id <2004081723435301200d1cnee>; Tue, 17 Aug 2004 23:43:53 +0000 From: Leonard Zettel To: freebsd-doc@freebsd.org Date: Tue, 17 Aug 2004 19:46:45 -0400 User-Agent: KMail/1.6.2 MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_ljpIBfLzqlsss3q" Message-Id: <200408171946.45647.zettel@acm.org> Subject: Handbook 4.2 - ports overview X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 17 Aug 2004 23:43:54 -0000 --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 @@ Overview of Software Installation - If you have used a &unix; system before you will know that - the typical procedure for installing third party software goes - something like this: - - - - Download the software, which might be distributed in - source code format, or as a binary. - - - - Unpack the software from its distribution format - (typically a tarball compressed with &man.compress.1;, - &man.gzip.1;, or &man.bzip2.1;). - - - - Locate the documentation (perhaps an - INSTALL or 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: @@ -99,9 +58,9 @@ 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 + The FreeBSD package 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. - 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 (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. - - 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. + A FreeBSD port 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 + ports tree. + + The ports system can also be used to generate packages + which can later be manipulated with any of the package management + 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 + 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 pkg_add 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. + the application, either will notice that the library has not been + installed, and automatically install it 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. + each have their own strengths, and which you use will depend + on your own preference and situation. Package Benefits @@ -156,11 +108,11 @@ Mozilla, KDE, or GNOME this can be important, - particularly if you are on a slow system. + particularly on a slow system. - Packages do not require any understanding of the process + Packages do not require any understanding of the processes involved in compiling software on FreeBSD. @@ -169,7 +121,7 @@ Ports Benefits - Packages are normally compiled with conservative options, + 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 @@ Some applications have compile time options relating to what they can and cannot do. For example, - Apache can be configured with a - wide variety of different built-in options. By building + Apache 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. + but 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. + application. For example, Ghostscript + is available as a ghostscript package and a + ghostscript-nox11 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. 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. @@ -230,7 +180,7 @@ You can also install security/portaudit 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 portaudit -F -a after you have installed some packages. @@ -248,7 +198,7 @@ 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 + time. There are a number of ways to find what you want: --Boundary-00=_ljpIBfLzqlsss3q--