View | Details | Raw Unified | Return to bug 39084
Collapse All | Expand All

(-)chapter.sgml (-106 / +111 lines)
Lines 57-63 Link Here
57
      </step>
57
      </step>
58
58
59
      <step>
59
      <step>
60
	<para>Locate the documentation (perhaps a <filename>README</filename>
60
	<para>Locate the documentation (perhaps an <filename>INSTALL</filename> or <filename>README</filename>
61
	  file, or some files in a <filename>doc/</filename> subdirectory) and
61
	  file, or some files in a <filename>doc/</filename> subdirectory) and
62
	  read up on how to install the software.</para>
62
	  read up on how to install the software.</para>
63
      </step>
63
      </step>
Lines 79-97 Link Here
79
79
80
    <para>Should you want to, you can continue to install software the
80
    <para>Should you want to, you can continue to install software the
81
      <quote>traditional</quote> way with FreeBSD.  However, FreeBSD
81
      <quote>traditional</quote> way with FreeBSD.  However, FreeBSD
82
      provides two technologies which can save you a lot of effort;
82
      provides two related technologies which can save you a lot of effort:
83
      packages and ports.  At the time of writing, over &os.numports;
83
      packages and ports.  At the time of writing, over &os.numports;
84
      third party applications have been made available in this
84
      third party applications have been made available in this
85
      way.</para>
85
      way.</para>
86
86
87
    <para>For any given application, the FreeBSD package for that application
87
    <para>For any given application, the FreeBSD package for that application
88
      is a single file which you must download.  The package contains
88
      is a single file which you may download.  The package contains
89
      pre-compiled copies of all the commands for the application, as well as
89
      pre-compiled copies of all the commands for the application, as well as
90
      any configuration files or documentation.  A downloaded package file can
90
      any configuration files or documentation.  A downloaded package file can
91
      be manipulated with FreeBSD package management commands, such as
91
      be manipulated with FreeBSD package management commands, such as
92
      &man.pkg.add.1;, &man.pkg.delete.1;, &man.pkg.info.1;, and so on.</para>
92
      &man.pkg.add.1;, &man.pkg.delete.1;, &man.pkg.info.1;, and so on.</para>
93
93
94
    <para>Installing a new application can be carried out with a single
94
    <para>Installing a new application can be carried out with a single &man.pkg.add.1;
95
      command.</para>
95
      command.</para>
96
96
97
    <para>A FreeBSD port for an application is a collection of files designed
97
    <para>A FreeBSD port for an application is a collection of files designed
Lines 99-105 Link Here
99
      code.</para>
99
      code.</para>
100
100
101
    <para>Remember that there are a number of steps you would normally carry
101
    <para>Remember that there are a number of steps you would normally carry
102
      out if you compiled a program yourself (unpacking, patching, compiling,
102
      out if you compiled a program yourself (downloading, unpacking, patching, compiling,
103
      installing).  The files that make up a port contain all the necessary
103
      installing).  The files that make up a port contain all the necessary
104
      information to allow the system to do this for you.  You run a handful
104
      information to allow the system to do this for you.  You run a handful
105
      of simple commands and the source code for the application is
105
      of simple commands and the source code for the application is
Lines 117-123 Link Here
117
      the application and the library have been made available as FreeBSD
117
      the application and the library have been made available as FreeBSD
118
      ports and packages.  If you use the <command>pkg_add</command> command
118
      ports and packages.  If you use the <command>pkg_add</command> command
119
      or the ports system to add the application, both will notice that the
119
      or the ports system to add the application, both will notice that the
120
      library has not been installed, and the commands will install the
120
      library has not been installed, and automatically install the
121
      library first.</para>
121
      library first.</para>
122
122
123
    <para>Given that the two technologies are quite similar, you might be
123
    <para>Given that the two technologies are quite similar, you might be
Lines 221-228 Link Here
221
	<para>The FreeBSD web site maintains an up-to-date searchable list of
221
	<para>The FreeBSD web site maintains an up-to-date searchable list of
222
	  all the available applications, at
222
	  all the available applications, at
223
	  <ulink url="../../../../ports/index.html">http://www.FreeBSD.org/ports/</ulink>.
223
	  <ulink url="../../../../ports/index.html">http://www.FreeBSD.org/ports/</ulink>.
224
	  The name space is divided into categories, and you may either
224
	  The ports are divided into categories, and you may either
225
	  search for an application by name (if you know it), or you can list
225
	  search for an application by name (if you know it), or see
226
	  all the applications available in a category.</para>
226
	  all the applications available in a category.</para>
227
      </listitem>
227
      </listitem>
228
228
Lines 232-239 Link Here
232
	<para>Dan Langille maintains FreshPorts, at
232
	<para>Dan Langille maintains FreshPorts, at
233
	  <ulink url="http://www.FreshPorts.org/">http://www.FreshPorts.org/</ulink>.
233
	  <ulink url="http://www.FreshPorts.org/">http://www.FreshPorts.org/</ulink>.
234
	  FreshPorts tracks changes to the applications in the ports tree as
234
	  FreshPorts tracks changes to the applications in the ports tree as
235
	  they happen, and allows you to <quote>watch</quote> one or more
235
	  they happen, allows you to <quote>watch</quote> one or more
236
	  ports, and will send you an email when they are updated.</para>
236
	  ports, and can send you email when they are updated.</para>
237
      </listitem>
237
      </listitem>
238
238
239
      <indexterm><primary>FreshMeat</primary></indexterm>
239
      <indexterm><primary>FreshMeat</primary></indexterm>
Lines 277-283 Link Here
277
	the network.</para>
277
	the network.</para>
278
278
279
      <example>
279
      <example>
280
        <title>Downloading a Package and then Installing It Locally</title>
280
        <title>Downloading a Package Manually and then Installing It Locally</title>
281
281
282
        <screen>&prompt.root; <userinput>ftp -a <replaceable>ftp2.FreeBSD.org</replaceable></userinput>
282
        <screen>&prompt.root; <userinput>ftp -a <replaceable>ftp2.FreeBSD.org</replaceable></userinput>
283
Connected to ftp2.FreeBSD.org.
283
Connected to ftp2.FreeBSD.org.
Lines 305-314 Link Here
305
      </example>
305
      </example>
306
306
307
      <para>If you do not have a source of local packages (such as a
307
      <para>If you do not have a source of local packages (such as a
308
        FreeBSD CDROM set) then it will probably be easier to use the
308
        FreeBSD CD-ROM set) then it will probably be easier to use the
309
        <option>-r</option> option to &man.pkg.add.1;.  This will cause the utility to
309
        <option>-r</option> option to &man.pkg.add.1;.  This will cause the utility to
310
        automatically determine the correct object format and release
310
        automatically determine the correct object format and release
311
        and then to fetch and install the package from an FTP site.
311
        and then fetch and install the package from an FTP site.
312
      </para>
312
      </para>
313
313
314
      <indexterm>
314
      <indexterm>
Lines 322-329 Link Here
322
          find them at <ulink
322
          find them at <ulink
323
          url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/">
323
          url="ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/">
324
          ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/</ulink>,
324
          ftp://ftp.FreeBSD.org/pub/FreeBSD/ports/packages/</ulink>,
325
          or on the FreeBSD CDROM distribution.  Every CD on the
325
          or on the FreeBSD CD-ROM distribution.  Every CD on the
326
          FreeBSD 4-CD set (and PowerPak, etc) contains packages in
326
          FreeBSD 4-CD set (and the PowerPak, etc.) contains packages in
327
          the <filename>/packages</filename> directory.  The layout of
327
          the <filename>/packages</filename> directory.  The layout of
328
          the packages is similar to that of the
328
          the packages is similar to that of the
329
          <filename>/usr/ports</filename> tree.  Each category has its
329
          <filename>/usr/ports</filename> tree.  Each category has its
Lines 331-360 Link Here
331
          <filename>All</filename> directory.
331
          <filename>All</filename> directory.
332
      </para>
332
      </para>
333
333
334
      <para>The directory structure of the package system is identical
334
      <para>The directory structure of the package system matches
335
        to that of the ports; they work with each other to form the entire
335
        the ports layout; they work with each other to form the entire
336
        package/port system.
336
        package/port system.
337
      </para>
337
      </para>
338
338
339
    </sect2>
339
    </sect2>
340
340
341
    <sect2>
341
    <sect2>
342
      <title>Deleting a Package</title>
343
      <indexterm>
344
        <primary><command>pkg_delete</command></primary>
345
      </indexterm>
346
      <indexterm>
347
        <primary>packages</primary>
348
        <secondary>deleting</secondary>
349
      </indexterm>
350
      <para>To remove a previously installed software package, use the
351
	&man.pkg.delete.1; utility.
352
      </para>
353
354
      <screen>&prompt.root; <userinput>pkg_delete <replaceable>xchat-1.7.1</replaceable></userinput></screen>
355
    </sect2>
356
357
    <sect2>
358
      <title>Managing Packages</title>
342
      <title>Managing Packages</title>
359
343
360
      <indexterm>
344
      <indexterm>
Lines 425-430 Link Here
425
    </sect2>
409
    </sect2>
426
410
427
    <sect2>
411
    <sect2>
412
      <title>Deleting a Package</title>
413
      <indexterm>
414
        <primary><command>pkg_delete</command></primary>
415
      </indexterm>
416
      <indexterm>
417
        <primary>packages</primary>
418
        <secondary>deleting</secondary>
419
      </indexterm>
420
      <para>To remove a previously installed software package, use the
421
	&man.pkg.delete.1; utility.
422
      </para>
423
424
      <screen>&prompt.root; <userinput>pkg_delete <replaceable>xchat-1.7.1</replaceable></userinput></screen>
425
    </sect2>
426
427
    <sect2>
428
      <title>Miscellaneous</title>
428
      <title>Miscellaneous</title>
429
      <para>All package information is stored within the 
429
      <para>All package information is stored within the 
430
        <filename>/var/db/pkg</filename> directory.  The installed
430
        <filename>/var/db/pkg</filename> directory.  The installed
Lines 471-497 Link Here
471
471
472
	<step>
472
	<step>
473
	  <para>Scroll down and select <literal>Configure</literal>,
473
	  <para>Scroll down and select <literal>Configure</literal>,
474
	    press <keycap>Enter</keycap>.</para>
474
	    then press <keycap>Enter</keycap>.</para>
475
	</step>
475
	</step>
476
476
477
	<step>
477
	<step>
478
	  <para>Scroll down and select
478
	  <para>Scroll down and select
479
	    <literal>Distributions</literal>, press <keycap>Enter</keycap>.</para>
479
	    <literal>Distributions</literal>, then press <keycap>Enter</keycap>.</para>
480
	</step>
480
	</step>
481
481
482
	<step>
482
	<step>
483
	  <para>Scroll down to <literal>ports</literal>, press
483
	  <para>Scroll down to <literal>ports</literal>, then press
484
	    <keycap>Space</keycap>.</para>
484
	    <keycap>Space</keycap>.</para>
485
	</step>
485
	</step>
486
486
487
	<step>
487
	<step>
488
	  <para>Scroll up to <literal>Exit</literal>, press
488
	  <para>Scroll up to <literal>Exit</literal>, then press
489
	    <keycap>Enter</keycap>.</para>
489
	    <keycap>Enter</keycap>.</para>
490
	</step>
490
	</step>
491
491
492
	<step>
492
	<step>
493
	  <para>Select your desired installation media, such as CDROM,
493
	  <para>Select your desired installation media, such as CD-ROM,
494
	    FTP, and so on.</para>
494
	    FTP, or something else.</para>
495
	</step>
495
	</step>
496
496
497
	<step>
497
	<step>
Lines 506-517 Link Here
506
	<filename>/usr/share/examples/cvsup/ports-supfile</filename>.
506
	<filename>/usr/share/examples/cvsup/ports-supfile</filename>.
507
	See <link linkend="cvsup">Using CVSup</link> (<xref
507
	See <link linkend="cvsup">Using CVSup</link> (<xref
508
	  linkend="cvsup">) for more information on using
508
	  linkend="cvsup">) for more information on using
509
	<application>CVSup</application> and the mentioned file.</para>
509
	<application>CVSup</application> and this file.</para>
510
510
511
      <procedure>
511
      <procedure>
512
	<title>CVSup Method</title>
512
	<title>CVSup Method</title>
513
513
514
	<para>This is a quick method to getting the ports collection
514
	<para>This is a quick method for getting the ports collection
515
	  using <application>CVSup</application>.  If you want to keep
515
	  using <application>CVSup</application>.  If you want to keep
516
	  your ports tree up to date, or learn more about
516
	  your ports tree up to date, or learn more about
517
	  <application>CVSup</application>, read the previously
517
	  <application>CVSup</application>, read the previously
Lines 536-542 Link Here
536
536
537
	<step>
537
	<step>
538
	  <para>Change <replaceable>CHANGE_THIS.FreeBSD.org</replaceable> to a
538
	  <para>Change <replaceable>CHANGE_THIS.FreeBSD.org</replaceable> to a
539
	    <application>CVSup</application> near you.  See <link
539
	    <application>CVSup</application> server near you.  See <link
540
	      linkend="cvsup-mirrors">CVSup Mirrors</link> (<xref
540
	      linkend="cvsup-mirrors">CVSup Mirrors</link> (<xref
541
	      linkend="cvsup-mirrors">) for a complete listing of mirror
541
	      linkend="cvsup-mirrors">) for a complete listing of mirror
542
	    sites.</para>
542
	    sites.</para>
Lines 549-557 Link Here
549
	</step>
549
	</step>
550
550
551
	<step>
551
	<step>
552
	  <para>Running this consequent times at later dates will
552
	  <para>Running this command later will
553
	    download all the recent changes to your ports
553
	    download and apply all the recent changes to your ports
554
	    collection.</para>
554
	    collection, except actually rebuilding the ports for your own system.</para>
555
	</step>
555
	</step>
556
      </procedure>
556
      </procedure>
557
    </sect2>
557
    </sect2>
Lines 580-586 Link Here
580
	<listitem>
580
	<listitem>
581
	  <para>A <filename>distinfo</filename> file.  This file contains
581
	  <para>A <filename>distinfo</filename> file.  This file contains
582
	    information about the files that must be downloaded to build the
582
	    information about the files that must be downloaded to build the
583
	    port, and checksums, to ensure that those files have not been
583
	    port and their checksums, to verify that files have not been
584
	    corrupted during the download.</para>
584
	    corrupted during the download.</para>
585
	</listitem>
585
	</listitem>
586
	
586
	
Lines 594-600 Link Here
594
	    known as <quote>diffs</quote> because they are generated by the
594
	    known as <quote>diffs</quote> because they are generated by the
595
	    <application>diff</application> program.</para>
595
	    <application>diff</application> program.</para>
596
596
597
	  <para>This directory may also contain other files used in building
597
	  <para>This directory may also contain other files used to build
598
	    the port.</para>
598
	    the port.</para>
599
	</listitem>
599
	</listitem>
600
600
Lines 627-633 Link Here
627
	first port.  There are two ways this can be done, and each is
627
	first port.  There are two ways this can be done, and each is
628
	explained below.</para>
628
	explained below.</para>
629
629
630
      <para>Before we get into that however, you will need to choose a
630
      <para>Before we get into that, however, you will need to choose a
631
        port to install.  There are a few ways to do this, with the
631
        port to install.  There are a few ways to do this, with the
632
	easiest method being the <ulink
632
	easiest method being the <ulink
633
	url="../../../../ports/index.html">ports listing on the FreeBSD
633
	url="../../../../ports/index.html">ports listing on the FreeBSD
Lines 640-646 Link Here
640
        command.  Simply type <command>whereis <replaceable>file</replaceable></command>,
640
        command.  Simply type <command>whereis <replaceable>file</replaceable></command>,
641
	where <replaceable>file</replaceable> is the program you want to
641
	where <replaceable>file</replaceable> is the program you want to
642
	install.  If it is found on
642
	install.  If it is found on
643
        your system, you will be told where it is, like so:</para>
643
        your system, you will be told where it is, as follows:</para>
644
644
645
      <screen>&prompt.root; <userinput>whereis lsof</userinput>
645
      <screen>&prompt.root; <userinput>whereis lsof</userinput>
646
lsof: /usr/ports/sysutils/lsof</screen>
646
lsof: /usr/ports/sysutils/lsof</screen>
Lines 649-655 Link Here
649
	can be found in the
649
	can be found in the
650
        <filename>/usr/ports/sysutils/lsof</filename> directory.</para>
650
        <filename>/usr/ports/sysutils/lsof</filename> directory.</para>
651
651
652
      <para>Yet another way of finding a particular port is by using the
652
      <para>Yet another way to find a particular port is by using the
653
        ports collection's built-in search mechanism.  To use the search
653
        ports collection's built-in search mechanism.  To use the search
654
        feature, you will need to be in the
654
        feature, you will need to be in the
655
	<filename>/usr/ports</filename> directory.  Once in that
655
	<filename>/usr/ports</filename> directory.  Once in that
Lines 670-677 Link Here
670
670
671
      <para>The part of the output you want to pay particular attention
671
      <para>The part of the output you want to pay particular attention
672
        to is the <quote>Path:</quote> line, since that tells you where to
672
        to is the <quote>Path:</quote> line, since that tells you where to
673
	find it.  The other information provided is not needed in order
673
	find the port.  The other information provided is not needed in order
674
	to install the port directly, so it will not be covered
674
	to install the port, so it will not be covered
675
	here.</para>
675
	here.</para>
676
676
677
      <para>For more in-depth searching you can also use
677
      <para>For more in-depth searching you can also use
Lines 686-724 Link Here
686
       searching for <quote>lsof</quote>.</para>
686
       searching for <quote>lsof</quote>.</para>
687
687
688
      <note>
688
      <note>
689
        <para>You must be the <username>root</username> user to install
689
        <para>You must be logged in as <username>root</username> to install
690
          ports.</para>
690
          ports.</para>
691
      </note>
691
      </note>
692
692
693
      <para>Now that you have found a port you would like to install,
693
      <para>Now that you have found a port you would like to install,
694
        you are ready to do the actual installation.  The port
694
        you are ready to do the actual installation.  The port
695
        includes instructions on how to build source code, but no
695
        includes instructions on how to build source code, but not the
696
        actual source code.  You can get the source code from a CDROM
696
        actual source code.  You can get the source code from a CD-ROM
697
        or from the Internet.  Source code is distributed in whatever
697
        or from the Internet.  Source code is distributed in whatever
698
        manner the software author desires.  Frequently this is a
698
        manner the software author desires.  Frequently this is a
699
        tarred and gzipped file, but it might be compressed with some
699
        tarred and gzipped file, but it might be compressed with some
700
        other tool or even uncompressed.  The program source code,
700
        other tool or even uncompressed.  The program source code,
701
        whatever form it comes in, is called a
701
        whatever form it comes in, is called a
702
        <quote>distfile</quote>.  You can get the distfile from a
702
        <quote>distfile</quote>.  You can get the distfile from a
703
        CDROM or from the Internet.</para>
703
        CD-ROM or from the Internet.</para>
704
704
705
      <sect3 id="ports-cd">
705
      <sect3 id="ports-cd">
706
        <title>Installing Ports from a CDROM</title>
706
        <title>Installing Ports from a CD-ROM</title>
707
707
708
        <indexterm>
708
        <indexterm>
709
          <primary>ports</primary>
709
          <primary>ports</primary>
710
          <secondary>installing from CDROM</secondary>
710
          <secondary>installing from CD-ROM</secondary>
711
        </indexterm>
711
        </indexterm>
712
        <para>The FreeBSD Project's official CDROM images no longer
712
        <para>The FreeBSD Project's official CD-ROM images no longer
713
	  include distfiles.  They take up a lot of room that is
713
	  include distfiles.  They take up a lot of room that is
714
	  better used by precompiled packages.  CDROM products such as
714
	  better used for precompiled packages.  CD-ROM products such as
715
	  the FreeBSD PowerPak do include distfiles, and you can
715
	  the FreeBSD PowerPak do include distfiles, and you can
716
	  order these sets from a vendor such as the <ulink
716
	  order these sets from a vendor such as the <ulink
717
	  url="http://www.freebsdmall.com/">FreeBSD Mall</ulink>.
717
	  url="http://www.freebsdmall.com/">FreeBSD Mall</ulink>.
718
	  This section assumes you have such a FreeBSD CDROM
718
	  This section assumes you have such a FreeBSD CD-ROM
719
	  set.</para>
719
	  set.</para>
720
720
721
        <para>Place your FreeBSD CDROM in the drive.  Mount it on
721
        <para>Place your FreeBSD CD-ROM in the drive.  Mount it on
722
	  <filename>/cdrom</filename>.  (If you use a different mount
722
	  <filename>/cdrom</filename>.  (If you use a different mount
723
	  point, the install will not work.)  To begin, change to the
723
	  point, the install will not work.)  To begin, change to the
724
	  directory for the port you want to install:</para>
724
	  directory for the port you want to install:</para>
Lines 727-733 Link Here
727
727
728
        <para>Once inside the <filename>lsof</filename> directory,
728
        <para>Once inside the <filename>lsof</filename> directory,
729
	  you will see the port
729
	  you will see the port
730
	  skeleton.  The next step is to compile (also called build) the
730
	  skeleton.  The next step is to compile, or <quote>build</quote>, the
731
	  port.  This is done by simply typing <command>make</command> at
731
	  port.  This is done by simply typing <command>make</command> at
732
	  the prompt.  Once you have done so, you should see something
732
	  the prompt.  Once you have done so, you should see something
733
	  like this:</para>
733
	  like this:</para>
Lines 752-758 Link Here
752
...
752
...
753
&prompt.root;</screen>
753
&prompt.root;</screen>
754
754
755
        <para>Take notice that once the compile is complete you are
755
        <para>Notice that once the compile is complete you are
756
	  returned to your prompt.  The next step is to install the
756
	  returned to your prompt.  The next step is to install the
757
	  port.  In order to install it, you simply need to tack one word
757
	  port.  In order to install it, you simply need to tack one word
758
	  onto the <command>make</command> command, and that word is
758
	  onto the <command>make</command> command, and that word is
Lines 787-797 Link Here
787
787
788
        <note>
788
        <note>
789
          <para>Please be aware that the licenses of a few ports do not
789
          <para>Please be aware that the licenses of a few ports do not
790
            allow for inclusion on the CDROM.  This could be because a
790
            allow for inclusion on the CD-ROM.  This could be because a
791
            registration form needs
791
            registration form needs
792
	    to be filled out before downloading, redistribution is not
792
	    to be filled out before downloading or redistribution is not
793
	    allowed, and so on.  If you wish to install a port not
793
	    allowed, or for another reason.  If you wish to install a port not
794
	    included on the CDROM, you will need to be online in order to
794
	    included on the CD-ROM, you will need to be online in order to
795
	    do so (see the <link linkend="ports-inet">next
795
	    do so (see the <link linkend="ports-inet">next
796
	    section</link>).</para>
796
	    section</link>).</para>
797
	</note>
797
	</note>
Lines 802-815 Link Here
802
802
803
        <para>As with the last section, this section makes an assumption
803
        <para>As with the last section, this section makes an assumption
804
          that you have a working Internet connection.  If you do not,
804
          that you have a working Internet connection.  If you do not,
805
	  you will need to perform the <link linkend="ports-cd">CDROM
805
	  you will need to perform the <link linkend="ports-cd">CD-ROM
806
	  installation</link>.</para>
806
	  installation</link>, or put a copy of the distfile into <filename>/usr/ports/distfiles</filename> manually.</para>
807
807
808
        <para>Installing a port from the Internet is done exactly the same
808
        <para>Installing a port from the Internet is done exactly the same
809
	  way as it would be if you were installing from a CDROM.  The
809
	  way as it would be if you were installing from a CD-ROM.  The
810
	  only difference between the two is that the port distfile
810
	  only difference between the two is that the distfile
811
	  is downloaded from the Internet instead of pulled from the
811
	  is downloaded from the Internet instead of read from the
812
	  CDROM.</para>
812
	  CD-ROM.</para>
813
813
814
        <para>The steps involved are identical:</para>
814
        <para>The steps involved are identical:</para>
815
815
Lines 863-869 Link Here
863
      </indexterm>
863
      </indexterm>
864
      <para>Now that you know how to install ports, you are probably
864
      <para>Now that you know how to install ports, you are probably
865
        wondering how to remove them, just in case you install one and
865
        wondering how to remove them, just in case you install one and
866
	later on you decide that you installed the wrong port.  
866
	later on decide that you installed the wrong port.  
867
        We will remove our previous example (which was 
867
        We will remove our previous example (which was 
868
	<command>lsof</command> for
868
	<command>lsof</command> for
869
        those of you not paying attention).  As with installing ports,
869
        those of you not paying attention).  As with installing ports,
Lines 908-914 Link Here
908
    <itemizedlist>
908
    <itemizedlist>
909
      <listitem>
909
      <listitem>
910
	<para>Use &man.pkg.info.1; to find out which files were installed,
910
	<para>Use &man.pkg.info.1; to find out which files were installed,
911
	  and where they were installed to.  For example, if you have just
911
	  and where.  For example, if you have just
912
	  installed FooPackage version 1.0.0, then this command</para>
912
	  installed FooPackage version 1.0.0, then this command</para>
913
913
914
	<screen>&prompt.root; <userinput>pkg_info -L foopackage-1.0.0 | less</userinput></screen>
914
	<screen>&prompt.root; <userinput>pkg_info -L foopackage-1.0.0 | less</userinput></screen>
Lines 926-932 Link Here
926
926
927
	<para>will find all the installed packages that have
927
	<para>will find all the installed packages that have
928
	  <replaceable>foopackage</replaceable> in the package name.  Replace
928
	  <replaceable>foopackage</replaceable> in the package name.  Replace
929
	  <replaceable>foopackage</replaceable> in your commandline as
929
	  <replaceable>foopackage</replaceable> in your command line as
930
	  necessary.</para>
930
	  necessary.</para>
931
      </listitem>
931
      </listitem>
932
932
Lines 939-952 Link Here
939
939
940
      <listitem>
940
      <listitem>
941
	<para>If the application has a web site, check it for additional
941
	<para>If the application has a web site, check it for additional
942
	  documentation, frequently asked question files, and so forth.  If
942
	  documentation, frequently asked questions, and so forth.  If
943
	  you are not sure of the web site address it may be listed in the
943
	  you are not sure of the web site address it may be listed in the
944
	  output from</para>
944
	  output from</para>
945
945
946
	<screen>&prompt.root; <userinput>pkg_info <replaceable>foopackage-1.0.0</replaceable></userinput></screen>
946
	<screen>&prompt.root; <userinput>pkg_info <replaceable>foopackage-1.0.0</replaceable></userinput></screen>
947
	
947
	
948
	<para>will often include a <literal>WWW:</literal> line with the URL
948
	<para>A <literal>WWW:</literal> line, if present, should provide a URL
949
	  of the application's web site.</para>
949
	  for the application's web site.</para>
950
      </listitem>
950
      </listitem>
951
    </itemizedlist>
951
    </itemizedlist>
952
  </sect1>
952
  </sect1>
Lines 973-979 Link Here
973
	  <para>Ah, you must be thinking of the serial ports on the back
973
	  <para>Ah, you must be thinking of the serial ports on the back
974
	    of your computer.  We are using <quote>port</quote> here to
974
	    of your computer.  We are using <quote>port</quote> here to
975
	    mean the result of <quote>porting</quote> a program from one
975
	    mean the result of <quote>porting</quote> a program from one
976
	    version of Unix to another.</para>
976
	    operating system to another.</para>
977
	  </answer>
977
	  </answer>
978
	</qandaentry>
978
	</qandaentry>
979
979
Lines 986-992 Link Here
986
	  <para>A patch is a small file that specifies how to go from
986
	  <para>A patch is a small file that specifies how to go from
987
	    one version of a file to another.  It contains plain text,
987
	    one version of a file to another.  It contains plain text,
988
	    and basically says things like <quote>delete line 23</quote>,
988
	    and basically says things like <quote>delete line 23</quote>,
989
	    <quote>add these two lines after line 468</quote>, or
989
	    <quote>add these two lines after line 468</quote>, and
990
	    <quote>change line 197 to this</quote>.  They are also known
990
	    <quote>change line 197 to this</quote>.  They are also known
991
	    as diffs because they are generated by the
991
	    as diffs because they are generated by the
992
	    <application>diff</application> program.</para>
992
	    <application>diff</application> program.</para>
Lines 1001-1021 Link Here
1001
	  </question>
1001
	  </question>
1002
1002
1003
	  <answer>
1003
	  <answer>
1004
	  <para>It is a file ending in <filename>.tar</filename>, or
1004
	  <para>A tarball is a file, with a name generally ending in <filename>.tar</filename>, <filename>.tar.gz</filename>,
1005
	    with variations such as <filename>.tar.gz</filename>,
1006
	    <filename>.tar.Z</filename>, <filename>.tar.bz2</filename>,
1005
	    <filename>.tar.Z</filename>, <filename>.tar.bz2</filename>,
1007
	    and even <filename>.tgz</filename>.</para>
1006
	    or even <filename>.tgz</filename>.</para>
1008
1007
1009
	  <para>Basically, it is a directory tree that has been archived
1008
	  <para>Basically, a tarball is a directory tree that has been archived
1010
	    into a single file (<filename>.tar</filename>) and
1009
	    into a single file (<filename>.tar</filename>) and
1011
	    optionally compressed (<filename>.gz</filename>).  This
1010
	    optionally compressed (<filename>.gz</filename>, <filename>.Z</filename>, or <filename>.bz2</filename>).  This
1012
	    technique was originally used for <emphasis>T</emphasis>ape
1011
	    technique was originally used for <emphasis>T</emphasis>ape
1013
	    <emphasis>AR</emphasis>chives (hence the name
1012
	    <emphasis>AR</emphasis>chives (hence the name
1014
	    <command>tar</command>), but it is a widely used way of
1013
	    <command>tar</command>), but it is a common way of
1015
	    distributing program source code around the Internet.</para>
1014
	    distributing program source code around the Internet.</para>
1016
1015
1017
	  <para>You can see what files are in them, or even extract
1016
	  <para>You can see what files are in tarballs, or even extract
1018
            them yourself by using the standard Unix
1017
            the contents yourself, by using the standard Unix
1019
	    <command>tar</command> program, which comes with the base
1018
	    <command>tar</command> program, which comes with the base
1020
	    FreeBSD system, like this:</para>
1019
	    FreeBSD system, like this:</para>
1021
1020
Lines 1029-1035 Link Here
1029
  <indexterm><primary>checksum</primary></indexterm>
1028
  <indexterm><primary>checksum</primary></indexterm>
1030
	<qandaentry>
1029
	<qandaentry>
1031
	  <question>
1030
	  <question>
1032
	  <para id="ports-checksum">And a checksum?</para>
1031
	  <para id="ports-checksum">And checksums?</para>
1033
	  </question>
1032
	  </question>
1034
1033
1035
	  <answer>
1034
	  <answer>
Lines 1038-1049 Link Here
1038
	    change, the checksum will no longer be equal to the total,
1037
	    change, the checksum will no longer be equal to the total,
1039
	    so a simple comparison will allow you to spot the
1038
	    so a simple comparison will allow you to spot the
1040
	    difference.</para>
1039
	    difference.</para>
1040
1041
	  <para>If a stored checksum matches the checksum calculated
1042
	    for a file, such as a tarball, the file matches the
1043
	    original for which the checksum was calculated. If there's
1044
	    a discrepancy, there's a problem, such as file corruption;
1045
	    removing the tarball and redownloading may fix the problem.</para>
1041
	  </answer>
1046
	  </answer>
1042
	</qandaentry>
1047
	</qandaentry>
1043
1048
1044
	<qandaentry>
1049
	<qandaentry>
1045
	  <question>
1050
	  <question>
1046
	  <para>I did what you said for compiling ports from a CDROM and
1051
	  <para>I did what you said for compiling ports from a CD-ROM and
1047
	    it worked great until I tried to install the kermit
1052
	    it worked great until I tried to install the kermit
1048
	    port.</para>
1053
	    port.</para>
1049
1054
Lines 1051-1071 Link Here
1051
&gt;&gt; cku190.tar.gz doesn't seem to exist on this system.
1056
&gt;&gt; cku190.tar.gz doesn't seem to exist on this system.
1052
&gt;&gt; Attempting to fetch from ftp://kermit.columbia.edu/kermit/archives/.</screen>
1057
&gt;&gt; Attempting to fetch from ftp://kermit.columbia.edu/kermit/archives/.</screen>
1053
1058
1054
	  <para>Why can it not be found?  Have I got a dud CDROM?</para>
1059
	  <para>Why can it not be found?  Have I got a dud CD-ROM?</para>
1055
	  </question>
1060
	  </question>
1056
1061
1057
	  <answer>
1062
	  <answer>
1058
	  <para>As explained in the <link
1063
	  <para>As explained in the <link
1059
	    linkend="ports-cd">compiling ports from CDROM</link>
1064
	    linkend="ports-cd">compiling ports from CD-ROM</link>
1060
	    section, some ports cannot be put on the CDROM set
1065
	    section, some distfiles cannot be put on the CD-ROM set
1061
	    due to licensing restrictions.  Kermit is an example of
1066
	    due to licensing restrictions.  Kermit is an example of
1062
	    that.  The licensing terms for kermit do not allow us to put
1067
	    that.  The licensing terms for kermit do not allow us to put
1063
	    the tarball for it on the CDROM, so you will have to fetch
1068
	    the tarball for it on the CD-ROM, so you will have to fetch
1064
	    it by hand&mdash;sorry!</para>
1069
	    it by hand&mdash;sorry!</para>
1065
1070
1066
	  <para>The reason why you got all those error messages was
1071
	  <para>The reason why you got all those error messages was
1067
	    because you were not connected to the Internet at the time.
1072
	    because you were not connected to the Internet at the time.
1068
	    Once you have downloaded it from any of the <makevar>MASTER_SITES</makevar>
1073
	    Once you have downloaded the distfile from any of the <makevar>MASTER_SITES</makevar>
1069
	    (listed in the <filename>Makefile</filename>), you can restart the install
1074
	    (listed in the <filename>Makefile</filename>), you can restart the install
1070
	    process.</para>
1075
	    process.</para>
1071
	  </answer>
1076
	  </answer>
Lines 1082-1088 Link Here
1082
	  <para>The ports mechanism will download distribution
1087
	  <para>The ports mechanism will download distribution
1083
	    tarballs into <filename>/usr/ports/distfiles</filename>,
1088
	    tarballs into <filename>/usr/ports/distfiles</filename>,
1084
	    but many system administrators will symlink this directory
1089
	    but many system administrators will symlink this directory
1085
	    to a remote file server or local read-only CDROM media.
1090
	    to a remote file server or local read-only CD-ROM media.
1086
	    If this is the case, then you should specify a different
1091
	    If this is the case, then you should specify a different
1087
	    directory to be used for storing distfiles with the
1092
	    directory to be used for storing distfiles with the
1088
	    following command:</para>
1093
	    following command:</para>
Lines 1136-1142 Link Here
1136
	  job.</para>
1141
	  job.</para>
1137
1142
1138
	  <para>If you do not fancy typing all that in every time you
1143
	  <para>If you do not fancy typing all that in every time you
1139
	    install a port, it is a good idea to put these variables
1144
	    install a port, you can put these variables
1140
	    into your environment.  Read the manual page for your shell for
1145
	    into your environment.  Read the manual page for your shell for
1141
	    instructions on doing so.</para>
1146
	    instructions on doing so.</para>
1142
	  </answer>
1147
	  </answer>
Lines 1144-1150 Link Here
1144
1149
1145
	<qandaentry>
1150
	<qandaentry>
1146
	  <question>
1151
	  <question>
1147
	  <para>I do not have a FreeBSD CDROM, but I would like to have
1152
	  <para>I do not have a FreeBSD CD-ROM, but I would like to have
1148
	    all the tarballs handy on my system so I do not have to wait
1153
	    all the tarballs handy on my system so I do not have to wait
1149
	    for a download every time I install a port.  Is there any
1154
	    for a download every time I install a port.  Is there any
1150
	    way to get them all at once?</para>
1155
	    way to get them all at once?</para>
Lines 1248-1254 Link Here
1248
	    unless you used the <option>-fno-strength-reduce</option>
1253
	    unless you used the <option>-fno-strength-reduce</option>
1249
	    option as well.  (Most of the ports do not use
1254
	    option as well.  (Most of the ports do not use
1250
	    <option>-O2</option>).  You <emphasis>should</emphasis> be
1255
	    <option>-O2</option>).  You <emphasis>should</emphasis> be
1251
	    able to specify the compiler options used by something
1256
	    able to specify compiler options with something
1252
	    like:</para>
1257
	    like:</para>
1253
1258
1254
	  <screen>&prompt.root; <userinput>make CFLAGS='-O2 -fno-strength-reduce' install</userinput></screen>
1259
	  <screen>&prompt.root; <userinput>make CFLAGS='-O2 -fno-strength-reduce' install</userinput></screen>
Lines 1258-1264 Link Here
1258
	    is to do <command>make configure</command>, then go into
1263
	    is to do <command>make configure</command>, then go into
1259
	    the source directory and inspect the Makefiles by hand, but
1264
	    the source directory and inspect the Makefiles by hand, but
1260
	    this can get tedious if the source has lots of
1265
	    this can get tedious if the source has lots of
1261
	    sub-directories, each with their own Makefiles.</para>
1266
	    sub-directories, each with its own Makefile.</para>
1262
1267
1263
	    <para>The default FreeBSD compiler options are quite conservative, 
1268
	    <para>The default FreeBSD compiler options are quite conservative, 
1264
	      so if you have not changed them you should not have any
1269
	      so if you have not changed them you should not have any
Lines 1287-1293 Link Here
1287
1292
1288
	<qandaentry>
1293
	<qandaentry>
1289
	  <question>
1294
	  <question>
1290
	  <para>I went to install the <literal>foo</literal> port but
1295
	  <para>I tried to install the <literal>foo</literal> port but
1291
	    the system suddenly stopped compiling it and starting
1296
	    the system suddenly stopped compiling it and starting
1292
	    compiling the <literal>bar</literal> port.  What is going
1297
	    compiling the <literal>bar</literal> port.  What is going
1293
	    on?</para>
1298
	    on?</para>
Lines 1300-1306 Link Here
1300
	    <literal>bar</literal> might have a library with useful
1305
	    <literal>bar</literal> might have a library with useful
1301
	    graphics processing routines.  Or <literal>bar</literal>
1306
	    graphics processing routines.  Or <literal>bar</literal>
1302
	    might be a tool that is needed to compile the
1307
	    might be a tool that is needed to compile the
1303
	    <literal>foo</literal> port.</para>
1308
	    <literal>foo</literal> port. Once <literal>bar</literal> is finished, your system should automatically resume building <literal>foo</literal>.</para>
1304
	  </answer>
1309
	  </answer>
1305
	</qandaentry>
1310
	</qandaentry>
1306
1311
Lines 1340-1346 Link Here
1340
grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up
1345
grizzle-6.5 - the combined piano tutorial, LOGO interpreter and shoot 'em up
1341
arcade game.</screen>
1346
arcade game.</screen>
1342
1347
1343
	  <para>The version number can also be found using the 
1348
	  <para>The version number can also be found using 
1344
	    <command>pkg_info</command> or by typing:
1349
	    <command>pkg_info</command> or by typing:
1345
	    <command>ls /var/db/pkg</command></para>
1350
	    <command>ls /var/db/pkg</command></para>
1346
1351
Lines 1349-1355 Link Here
1349
1354
1350
	<qandaentry>
1355
	<qandaentry>
1351
	  <question>
1356
	  <question>
1352
	  <para>Talking of disk space, the ports directory seems to be
1357
	  <para>Speaking of disk space, the ports directory seems to be
1353
	    taking up an awful lot of room.  Is it safe to go in there
1358
	    taking up an awful lot of room.  Is it safe to go in there
1354
	    and delete things?</para>
1359
	    and delete things?</para>
1355
	  </question>
1360
	  </question>

Return to bug 39084