diff --git a/en_US.ISO8859-1/books/handbook/ports/chapter.sgml b/en_US.ISO8859-1/books/handbook/ports/chapter.sgml index f0a899a275..d2db004c46 100644 --- a/en_US.ISO8859-1/books/handbook/ports/chapter.sgml +++ b/en_US.ISO8859-1/books/handbook/ports/chapter.sgml @@ -1,7 +1,7 @@ @@ -67,8 +67,8 @@ 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. + be manipulated with FreeBSD package management 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. @@ -86,8 +86,8 @@ for you. In fact, the ports system can also be used to generate packages - which can later be manipulated with the pkg_* - commands. + which can later be manipulated with the pkg_add + and friends commands. Both packages and ports understand dependencies. Suppose you want to install an @@ -119,7 +119,7 @@ - Packages do not require you to understand any of the process + Packages do not require you to understand the process involved in compiling software on FreeBSD. @@ -176,8 +176,9 @@ - To keep track of updated ports, subscribe to - freebsd-ports. + To keep track of updated ports, subscribe to the + freebsd-ports@freebsd.org mailing list. + The remainder of this chapter will explain how to use packages and ports to install and manage third party software on FreeBSD. @@ -203,6 +204,8 @@ all the applications available in a category. + FreshPorts + Dan Langille maintains FreshPorts, at http://www.freshports.org/. @@ -211,6 +214,8 @@ ports, and will send you an e-mail when they are updated. + FreshMeat + If you do not know the name of the application you want, try using a site like FreshMeat @@ -254,7 +259,7 @@ Downloading a package and then installing it locally - &prompt.root; ftp ftp2.freebsd.org + &prompt.root; ftp -a ftp2.freebsd.org Connected to ftp2.freebsd.org. 220 ftp2.freebsd.org FTP server (Version 6.00LS) ready. 331 Guest login ok, send your email address as password. @@ -266,17 +271,17 @@ Connected to ftp2.freebsd.org. 230 Guest login ok, access restrictions apply. Remote system type is UNIX. Using binary mode to transfer files. -ftp> cd /pub/FreeBSD/ports/packages/irc +ftp> cd /pub/FreeBSD/ports/packages/sysutils/ 250 CWD command successful. -ftp> get xchat-1.7.1.tgz -local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz -150 Opening BINARY mode data connection for 'xchat-1.7.1.tgz' (471488 bytes). -100% |**************************************************| 460 KB 00:00 ETA +ftp> get lsof-4.56.4.tgz +local: lsof-4.56.4.tgz remote: lsof-4.56.4.tgz +200 PORT command successful. +150 Opening BINARY mode data connection for 'lsof-4.56.4.tgz' (92375 bytes). +100% |**************************************************| 92375 00:00 ETA 226 Transfer complete. -471488 bytes received in 5.37 seconds (85.70 KB/s) +92375 bytes received in 5.60 seconds (16.11 KB/s) ftp> exit -&prompt.root; pkg_add xchat-1.7.1.tgz -&prompt.root; +&prompt.root; pkg_add lsof-4.56.4.tgz If you don't have a source of local packages (such as a @@ -288,7 +293,7 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz pkg_add - &prompt.root; pkg_add -r xchat-1.7.1 + &prompt.root; pkg_add -r lsof-4.56.4 This would download the correct package and add it without any further user intervention. @@ -315,7 +320,6 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz Deleting a Package - &prompt.root pkg_delete xchat-1.7.1 pkg_delete @@ -323,9 +327,11 @@ local: xchat-1.7.1.tgz remote: xchat-1.7.1.tgz packages deleting - &man.pkg.delete.1; is the utility for removing - previously installed software package distributions. + To remove a previously installed software package, use the + &man.pkg.delete.1; utility. + + &prompt.root pkg_delete xchat-1.7.1 @@ -397,9 +403,6 @@ docbook = Miscellaneous - &man.pkg.add.1; &man.pkg.delete.1; &man.pkg.info.1; - &man.pkg.version.1; &man.pkg.create.1; - All package information is stored within the /var/db/pkg directory. The listing of contents and descriptions of each package can be found within @@ -494,12 +497,12 @@ docbook = install> at the prompt, and if it is found on your system, you will be told where it is, like so: - &prompt.root; whereis xchat -xchat: /usr/ports/irc/xchat + &prompt.root; whereis lsof +lsof: /usr/ports/sysutils/lsof - This tells us that xchat (an irc client) + This tells us that lsof (a system utility) can be found in the - /usr/ports/irc/xchat directory. + /usr/ports/sysutils/lsof directory. Yet another way of finding a particular port is by using the Ports collection's built-in search mechanism. To use the search @@ -508,19 +511,17 @@ xchat: /usr/ports/irc/xchat directory, run make search key=program-name where program-name is the name of the program you want to find. For example, if you were looking for - xchat: + lsof: &prompt.root; cd /usr/ports -&prompt.root; make search key=xchat -Port: xchat-1.3.8 -Path: /usr/ports/irc/xchat -Info: An X11 IRC client using the GTK+ toolkit, and optionally, GNOME -Maint: jim@FreeBSD.org -Index: irc -B-deps: XFree86-3.3.5 bzip2-0.9.5d gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gmake-3.77 gtk-1.2.6 - imlib-1.9.8 jpeg-6b png-1.0.3 tiff-3.5.1 -R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1.9.8 jpeg-6b - png-1.0.3 tiff-3.5.1 +&prompt.root; make search key=lsof +Port: lsof-4.56.4 +Path: /usr/ports/sysutils/lsof +Info: Lists information about open files (similar to fstat(1)) +Maint: obrien@FreeBSD.org +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 @@ -551,12 +552,12 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. Assuming that your FreeBSD CDROM is in the drive and is mounted on /cdrom (and the mount point must be /cdrom), - you are ready to install the port. To begin, change directories + you are ready to install the port. To begin, change to the directory where the port you want to install lives: - &prompt.root; cd /usr/ports/irc/xchat + &prompt.root; cd /usr/ports/sysutils/lsof - Once inside the xchat directory, + Once inside the lsof directory, you will see the port skeleton. The next step is to compile (also called build) the port. This is done by simply typing make at @@ -564,22 +565,20 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. like this: &prompt.root; make ->> xchat-1.3.8.tar.bz2 doesn't seem to exist on this system. +>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/. >> Attempting to fetch from file:/cdrom/ports/distfiles/. -===> Extracting for xchat-1.3.8 ->> Checksum OK for xchat-1.3.8.tar.bz2. -===> xchat-1.3.8 depends on executable: bzip2 - found -===> xchat-1.3.8 depends on executable: gmake - found -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found -===> Patching for xchat-1.3.8 -===> Applying FreeBSD patches for xchat-1.3.8 -===> Configuring for xchat-1.3.8 +===> Extracting for lsof-4.57 +... +[extraction output snipped] +... +>> Checksum OK for lsof_4.57D.freebsd.tar.gz. +===> Patching for lsof-4.57 +===> Applying FreeBSD patches for lsof-4.57 +===> Configuring for lsof-4.57 ... [configure output snipped] ... -===> Building for xchat-1.3.8 +===> Building for lsof-4.57 ... [compilation snipped] ... @@ -592,26 +591,31 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. install: &prompt.root; make install -===> Installing for xchat-1.3.8 -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found +===> Installing for lsof-4.57 ... [install routines snipped] ... ===> Generating temporary packing list -===> Installing xchat docs in /usr/X11R6/share/doc/xchat -===> Registering installation for xchat-1.3.8 +===> Compressing manual pages for lsof-4.57 +===> Registering installation for lsof-4.57 +===> SECURITY NOTE: + This port has installed the following binaries which execute with + increased privileges. &prompt.root; Once you are returned to your prompt, you should be able to - run the application you just installed. + 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. You can save an extra step by just running make install instead of make and make install as two separate steps. - + Please be aware that the licenses of a few ports do not @@ -622,7 +626,7 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. included on the CDROM, you will need to be online in order to do so (see the next section). - + @@ -642,37 +646,35 @@ R-deps: XFree86-3.3.5 gettext-0.10.35 giflib-4.1.0 glib-1.2.6 gtk-1.2.6 imlib-1. The steps involved are identical: &prompt.root; make install ->> xchat-1.3.8.tar.bz2 doesn't seem to exist on this system. ->> Attempting to fetch from http://xchat.org/files/v1.3/. -Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% -305543 bytes transferred in 2.9 seconds (102.81 Kbytes/s) -===> Extracting for xchat-1.3.8 ->> Checksum OK for xchat-1.3.8.tar.bz2. -===> xchat-1.3.8 depends on executable: bzip2 - found -===> xchat-1.3.8 depends on executable: gmake - found -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found -===> Patching for xchat-1.3.8 -===> Applying FreeBSD patches for xchat-1.3.8 -===> Configuring for xchat-1.3.8 +>> lsof_4.57D.freebsd.tar.gz doesn't seem to exist in /usr/ports/distfiles/. +>> Attempting to fetch from ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/. +Receiving lsof_4.57D.freebsd.tar.gz (439860 bytes): 100% +439860 bytes transferred in 18.0 seconds (23.90 kBps) +===> Extracting for lsof-4.57 +... +[extraction output snipped] +... +>> Checksum OK for lsof_4.57D.freebsd.tar.gz. +===> Patching for lsof-4.57 +===> Applying FreeBSD patches for lsof-4.57 +===> Configuring for lsof-4.57 ... [configure output snipped] ... -===> Building for xchat-1.3.8 +===> Building for lsof-4.57 ... [compilation snipped] ... -===> Installing for xchat-1.3.8 -===> xchat-1.3.8 depends on shared library: gtk12.2 - found -===> xchat-1.3.8 depends on shared library: Imlib.5 - found -===> xchat-1.3.8 depends on shared library: X11.6 - found +===> Installing for lsof-4.57 ... [install routines snipped] ... ===> Generating temporary packing list -===> Installing xchat docs in /usr/X11R6/share/doc/xchat -===> Registering installation for xchat-1.3.8 +===> Compressing manual pages for lsof-4.57 +===> Registering installation for lsof-4.57 +===> SECURITY NOTE: + This port has installed the following binaries which execute with + increased privileges. &prompt.root; As you can see, the only difference is the line that tells @@ -697,26 +699,24 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% few paragraphs will cover just that. Now we will remove our previous example (which was - xchat for + lsof for those of you not paying attention). As with installing ports, the first thing you must do is change to the port directory, which if you remember was - /usr/ports/irc/xchat. After you change - directories, you are ready to uninstall xchat. + /usr/ports/irc/lsof. After you change + directories, you are ready to uninstall lsof. This is done with - the make deinstall command (makes sense - right?): + the make deinstall command: - &prompt.root; cd /usr/ports/irc/xchat + &prompt.root; cd /usr/ports/irc/lsof &prompt.root; make deinstall -===> Deinstalling for xchat-1.3.8 -&prompt.root; +===> Deinstalling for lsof-4.57 That was easy enough. You have now managed to remove - xchat + lsof from your system. If you would like to reinstall it, you can do so by running make reinstall from the - /usr/ports/irc/xchat directory. + /usr/ports/irc/lsof directory. @@ -783,9 +783,10 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% tar), but it is a widely used way of distributing program source code around the Internet. - You can see what files are in them, or even extract them - yourself by using the standard Unix tar program, which comes - with the base FreeBSD system, like this: + You can see what files are in them, or even extract + them yourself by using the standard Unix + tar program, which comes with the base + FreeBSD system, like this: &prompt.user; tar tvzf foobar.tar.gz &prompt.user; tar xzvf foobar.tar.gz @@ -892,6 +893,8 @@ Receiving xchat-1.3.8.tar.bz2 (305543 bytes): 100% will combine the two (it is too long to write fully on the page, but it should give you the general idea). + imake + Some ports that use &man.imake.1; (a part of the X Windows System) don't work well with PREFIX, and will insist on installing under /usr/X11R6. Similarly, some Perl ports @@ -1074,11 +1077,11 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch - No problem, just do: + No problem, just type: &prompt.root; pkg_delete grizzle-6.5 - Alternatively, you can do: + Alternatively, you can type: &prompt.root; cd /usr/ports/somewhere/grizzle &prompt.root; make deinstall @@ -1089,7 +1092,7 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch Hang on a minute, you have to know the version number to use that command. You do not seriously expect me to - remember that, do you?? + remember that, do you? @@ -1099,6 +1102,11 @@ ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/distfiles/ fetch Information for grizzle-6.5: grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up arcade game. + + The version number can also be found using the + pkg_info or by typing: + ls /var/db/pkg + @@ -1237,7 +1245,7 @@ arcade game. directory. (Readers with an aversion to intricate shell-scripts are - advised not to follow this link...) + advised not to look at the files in this directory.)