This is the first commit that starts changing the markup. All these changes
markup something that looks like a filename as <filename>...</filename>, rather than <emphasis role="tt">...</emphasis> or whatever. These changes can not be automated, the Japanese team will need to go through the diffs to see which bits of markup have changed. I'm halfway through (line 16704). It's been quite instructive, and I'm learning lots about printing with FreeBSD :-) Join me tomorrow, when I'll be doing the same thing to the other half of the Handbook -- same Bat time, same Bat channel.
This commit is contained in:
parent
635b4a340e
commit
5d78f265df
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=2638
4 changed files with 446 additions and 363 deletions
|
@ -132,5 +132,16 @@ FreeBSD-doc mailing list) if they have specific questions.
|
|||
and knocked together a quick Perl script to do it. It's ~nik/bin/para.pl
|
||||
on freefall.
|
||||
|
||||
5. Got halfway through looking for filenames, and marking them up as such.
|
||||
|
||||
There are a lot ( :-( ) of filenames in the Handbook. The conversion
|
||||
process did a pretty good job of marking them as <filename>...</filename>
|
||||
but it wasn't perfect.
|
||||
|
||||
I'm halfway through (line 16704) going through the Handbook, eyeballing
|
||||
each line and changing things like <emphasis remap="tt">...</emphasis>
|
||||
to <filename>...</filename> where appropriate.
|
||||
|
||||
The remainder will follow tomorrow evening.
|
||||
|
||||
|
|
@ -1505,8 +1505,8 @@
|
|||
<title>Before installing from a MS-DOS partition</title>
|
||||
|
||||
<para>To prepare for installation from an MS-DOS partition, copy the
|
||||
files from the distribution into a directory called <emphasis
|
||||
remap=tt>C:\FREEBSD</emphasis>. The directory tree structure of
|
||||
files from the distribution into a directory called
|
||||
<filename>C:\FREEBSD</filename>. The directory tree structure of
|
||||
the CDROM must be partially reproduced within this directory so we
|
||||
suggest using the DOS <emphasis remap=tt>xcopy</emphasis> command.
|
||||
For example, to prepare for a minimal installation of FreeBSD:
|
||||
|
@ -1514,13 +1514,13 @@
|
|||
<screen>C> MD C:\FREEBSD C> XCOPY /S E:\BIN
|
||||
C:\FREEBSD\BIN\ C> XCOPY /S E:\MANPAGES
|
||||
C:\FREEBSD\MANPAGES\</screen>
|
||||
</informalexample> assuming that <emphasis remap=tt>C:</emphasis>
|
||||
is where you have free space and <emphasis remap=tt>E:</emphasis>
|
||||
</informalexample> assuming that <filename>C:</filename>
|
||||
is where you have free space and <filename>E:</filename>
|
||||
is where your CDROM is mounted.</para>
|
||||
|
||||
<para>For as many `DISTS' you wish to install from MS-DOS (and you
|
||||
have free space for), install each one under <emphasis
|
||||
remap=tt>C:\FREEBSD</emphasis> - the <acronym>BIN</acronym> dist
|
||||
have free space for), install each one under
|
||||
<filename>C:\FREEBSD</filename> - the <acronym>BIN</acronym> dist
|
||||
is only the minimal requirement.</para>
|
||||
|
||||
</sect2>
|
||||
|
@ -2248,10 +2248,11 @@
|
|||
|
||||
<listitem>
|
||||
<para> Install the program executable and other supporting
|
||||
files, man pages, etc. under the /usr/local hierarchy, where
|
||||
they will not get mixed up with system programs. This also
|
||||
makes sure that all the ports you install will go in the same
|
||||
place, instead of being flung all over your system.
|
||||
files, man pages, etc. under the
|
||||
<filename>/usr/local</filename> hierarchy, where they will not
|
||||
get mixed up with system programs. This also makes sure that
|
||||
all the ports you install will go in the same place, instead
|
||||
of being flung all over your system.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -2291,7 +2292,8 @@
|
|||
the initial setting up will already have been done for you.</para>
|
||||
|
||||
<para>If not, make sure the <emphasis>FreeBSD</emphasis> CDROM is in
|
||||
the drive and mounted on, say, /cdrom. Then do</para>
|
||||
the drive and mounted on, say, <filename>/cdrom</filename>. Then
|
||||
do</para>
|
||||
|
||||
<para>
|
||||
<literallayout> # mkdir /usr/ports # cd /usr/ports # ln -s
|
||||
|
@ -2299,8 +2301,8 @@
|
|||
</para>
|
||||
|
||||
<para>to enable the ports make mechanism to find the tarballs (it
|
||||
expects to find them in /usr/ports/distfiles, which is why we
|
||||
sym-linked the CDROM's tarball directory to that
|
||||
expects to find them in <filename>/usr/ports/distfiles</filename>,
|
||||
which is why we sym-linked the CDROM's tarball directory to that
|
||||
directory).</para>
|
||||
|
||||
<para>Now, suppose you want to install the gnats program from the
|
||||
|
@ -2434,7 +2436,7 @@
|
|||
|
||||
<sect2
|
||||
id="ports-makefile">
|
||||
<title>Makefile</title>
|
||||
<title><filename>Makefile</filename></title>
|
||||
|
||||
<para>The most important component of a skeleton is the Makefile.
|
||||
This contains various statements that specify how the port should
|
||||
|
@ -2480,9 +2482,10 @@
|
|||
<para>Skipping over the next few lines for a minute, the line
|
||||
<literallayout> .include <bsd.port.mk> </literallayout> says
|
||||
that the other statements and commands needed for this port are
|
||||
in a standard file called `bsd.port.mk". As these are the
|
||||
same for all ports, there is no point in duplicating them all over
|
||||
the place, so they are kept in a single standard file.</para>
|
||||
in a standard file called <filename>bsd.port.mk</filename>. As
|
||||
these are the same for all ports, there is no point in duplicating
|
||||
them all over the place, so they are kept in a single standard
|
||||
file.</para>
|
||||
|
||||
<para>This is probably not the place to go into a detailed
|
||||
examination of how Makefiles work; suffice it to say that the line
|
||||
|
@ -2496,13 +2499,13 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The files directory</title>
|
||||
<title>The <filename>files</filename> directory</title>
|
||||
|
||||
<para>The file containing the <xref linkend="ports-checksum"
|
||||
remap="checksum"> for the port is called "md5", after
|
||||
the MD5 algorithm used for ports checksums. It lives in a
|
||||
directory with the slightly confusing name of
|
||||
"files".</para>
|
||||
remap="checksum"> for the port is called
|
||||
<filename>md5</filename>, after the MD5 algorithm used for ports
|
||||
checksums. It lives in a directory with the slightly confusing
|
||||
name of <filename>files</filename>.</para>
|
||||
|
||||
<para>This directory can also contain other miscellaneous files that
|
||||
are required by the port and do not belong anywhere else.</para>
|
||||
|
@ -2510,7 +2513,7 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The patches directory</title>
|
||||
<title>The <filename>patches</filename> directory</title>
|
||||
|
||||
<para>This directory contains the <xref linkend="ports-patch"
|
||||
remap="patches"> needed to make everything work properly under
|
||||
|
@ -2519,7 +2522,7 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The pkg directory</title>
|
||||
<title>The <filename>pkg</filename> directory</title>
|
||||
|
||||
<para>This program contains three quite useful files:-</para>
|
||||
|
||||
|
@ -2527,18 +2530,19 @@
|
|||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>COMMENT - a one-line description of the program.
|
||||
<para><filename>COMMENT</filename> - a one-line description of
|
||||
the program.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>DESCR - a more detailed description.
|
||||
<para><filename>DESCR</filename> - a more detailed description.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>PLIST - a list of all the files that will be created
|
||||
when the program is installed.</para>
|
||||
<para><filename>PLIST</filename> - a list of all the files
|
||||
that will be created when the program is installed.</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
@ -2703,16 +2707,19 @@
|
|||
tarballs?
|
||||
</para>
|
||||
|
||||
<para>A. It is a file ending in .tar or .tar.gz (with variations
|
||||
like .tar.Z, or even .tgz if you are trying to squeeze the
|
||||
names into a DOS filesystem).</para>
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename>
|
||||
if you are trying to squeeze the names into a DOS
|
||||
filesystem).</para>
|
||||
|
||||
<para>Basically, it is a directory tree that has been archived
|
||||
into a single file (.tar) and optionally compressed (.gz).
|
||||
This technique was originally used for
|
||||
<emphasis>T</emphasis>ape <acronym>AR</acronym>chives (hence
|
||||
the name `tar'), but it is a widely used way of distributing
|
||||
program source code around the Internet.</para>
|
||||
into a single file (<filename>.tar</filename>) and optionally
|
||||
compressed (<filename>.gz</filename>). This technique was
|
||||
originally used for <emphasis>T</emphasis>ape
|
||||
<acronym>AR</acronym>chives (hence the name `tar'), but it is
|
||||
a widely used way of distributing program source code around
|
||||
the Internet.</para>
|
||||
|
||||
<para>You can see what files are in them, or even extract them
|
||||
yourself, by using the standard Unix tar program, which comes
|
||||
|
@ -2763,15 +2770,15 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
/usr/ports/distfiles I got some error about not having
|
||||
permission.
|
||||
<filename>/usr/ports/distfiles</filename> I got some error
|
||||
about not having permission.
|
||||
</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
/usr/ports/distfiles, but you will not be able to copy
|
||||
anything there because it is sym-linked to the CDROM, which is
|
||||
read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be
|
||||
able to copy anything there because it is sym-linked to the
|
||||
CDROM, which is read-only. You can tell it to look somewhere
|
||||
else by doing</para>
|
||||
|
||||
<para>
|
||||
<literallayout> DISTDIR=/where/you/put/it make
|
||||
|
@ -2781,9 +2788,10 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything
|
||||
in /usr/ports? My system administrator says I must put
|
||||
everything under /u/people/guests/wurzburger, but it does not
|
||||
seem to work.
|
||||
in <filename>/usr/ports</filename>? My system administrator
|
||||
says I must put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does
|
||||
not seem to work.
|
||||
</para>
|
||||
|
||||
<para>A. You can use the PORTSDIR and PREFIX variables to tell
|
||||
|
@ -2796,16 +2804,20 @@
|
|||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>will compile the port in /u/people/guests/wurzburger/ports
|
||||
and install everything under /usr/local. </para>
|
||||
<para>will compile the port in
|
||||
<filename>/u/people/guests/wurzburger/ports</filename> and
|
||||
install everything under <filename>/usr/local</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literallayout> make PREFIX=/u/people/guests/wurzburger/local
|
||||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>will compile it in /usr/ports and install it in
|
||||
/u/people/guests/wurzburger/local. </para>
|
||||
<para>will compile it in <filename>/usr/ports</filename> and
|
||||
install it in
|
||||
<filename>/u/people/guests/wurzburger/local</filename>.
|
||||
</para>
|
||||
|
||||
<para>And of course</para>
|
||||
|
||||
|
@ -2912,11 +2924,12 @@
|
|||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>or by editing /etc/make.conf, but unfortunately not all
|
||||
ports respect this. The surest way is to do 'make configure',
|
||||
then go into the source directory and inspect the Makefiles by
|
||||
hand, but this can get tedious if the source has lots of
|
||||
sub-directories, each with their own Makefiles.</para>
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
unfortunately not all ports respect this. The surest way is to
|
||||
do 'make configure', then go into the source directory and
|
||||
inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2997,8 +3010,8 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
whatever you called them in the distfiles directory. Can I
|
||||
delete those as well?
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?
|
||||
</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those
|
||||
|
@ -3078,7 +3091,8 @@
|
|||
</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
bsd.ports.mk and bsd.ports.subdir.mk files in your <ulink
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/share/mk/">makefiles
|
||||
directory.</ulink> (Note: readers with an aversion to
|
||||
intricate shell-scripts are advised not to follow this
|
||||
|
@ -3171,10 +3185,10 @@
|
|||
which is the staging area where your kernel will be built. Notice
|
||||
the logical organization of the directory tree, with each supported
|
||||
device, filesystem, and option in its own subdirectory. Also,
|
||||
anything inside the <emphasis remap=tt>i386</emphasis> directory
|
||||
deals with PC hardware only, while everything outside the <emphasis
|
||||
remap=tt>i386</emphasis> directory is common to all platforms
|
||||
which FreeBSD could potentially be ported to.</para>
|
||||
anything inside the <filename>i386</filename> directory deals with
|
||||
PC hardware only, while everything outside the
|
||||
<filename>i386</filename> directory is common to all platforms which
|
||||
FreeBSD could potentially be ported to.</para>
|
||||
|
||||
<para>
|
||||
<blockquote>
|
||||
|
@ -3187,15 +3201,15 @@
|
|||
</para>
|
||||
|
||||
<para>Next, move to the <filename>i386/conf</filename> directory and
|
||||
copy the GENERIC configuration file to the name you want to give
|
||||
your kernel. For example:
|
||||
copy the <filename>GENERIC</filename> configuration file to the name
|
||||
you want to give your kernel. For example:
|
||||
<informalexample>
|
||||
<screen># cd /usr/src/sys/i386/conf # cp GENERIC MYKERNEL</screen>
|
||||
</informalexample> Traditionally, this name is in all capital
|
||||
letters and, if you are maintaining multiple FreeBSD machines with
|
||||
different hardware, it is a good idea to name it after your
|
||||
machine's hostname. We will call it MYKERNEL for the purpose of
|
||||
this example.</para>
|
||||
machine's hostname. We will call it <filename>MYKERNEL</filename>
|
||||
for the purpose of this example.</para>
|
||||
|
||||
<para>
|
||||
<blockquote>
|
||||
|
@ -3205,19 +3219,22 @@
|
|||
</blockquote>
|
||||
</para>
|
||||
|
||||
<para>Now, edit MYKERNEL with your favorite text editor. If you are
|
||||
just starting out, the only editor available will probably be
|
||||
<emphasis remap=tt>vi</emphasis>, which is too complex to explain
|
||||
here, but is covered well in many books in the <xref
|
||||
<para>Now, edit <filename>MYKERNEL</filename> with your favorite text
|
||||
editor. If you are just starting out, the only editor available
|
||||
will probably be <emphasis remap=tt>vi</emphasis>, which is too
|
||||
complex to explain here, but is covered well in many books in the
|
||||
<xref
|
||||
linkend="bibliography" remap="bibliography">. Feel free to change
|
||||
the comment lines at the top to reflect your configuration or the
|
||||
changes you have made to differentiate it from GENERIC.</para>
|
||||
changes you have made to differentiate it from
|
||||
<filename>GENERIC</filename>.</para>
|
||||
|
||||
<para>If you have build a kernel under SunOS or some other BSD
|
||||
operating system, much of this file will be very familiar to you.
|
||||
If you are coming from some other operating system such as DOS, on
|
||||
the other hand, the GENERIC configuration file might seem
|
||||
overwhelming to you, so follow the descriptions in the <xref
|
||||
operating system, much of this file will be very familiar to you. If
|
||||
you are coming from some other operating system such as DOS, on the
|
||||
other hand, the <filename>GENERIC</filename> configuration file
|
||||
might seem overwhelming to you, so follow the descriptions in the
|
||||
<xref
|
||||
linkend="kernelconfig-config"
|
||||
remap="Configuration File"> section slowly and carefully.</para>
|
||||
|
||||
|
@ -3269,14 +3286,16 @@
|
|||
most lines only contain one argument. Anything following a
|
||||
<emphasis remap=tt>#</emphasis> is considered a comment and ignored.
|
||||
The following sections describe each keyword, generally in the order
|
||||
they are listed in GENERIC, although some related keywords have been
|
||||
grouped together in a single section (such as Networking) even
|
||||
though they are actually scattered throughout the GENERIC file.
|
||||
<anchor id="kernelconfig-options"> An
|
||||
exhaustive list of options and more detailed explanations of the
|
||||
device lines is present in the LINT configuration file, located in
|
||||
the same directory as GENERIC. If you are in doubt as to the
|
||||
purpose or necessity of a line, check first in LINT.</para>
|
||||
they are listed in <filename>GENERIC</filename>, although some
|
||||
related keywords have been grouped together in a single section
|
||||
(such as Networking) even though they are actually scattered
|
||||
throughout the <filename>GENERIC</filename> file.
|
||||
<anchor id="kernelconfig-options"> An exhaustive list of options and
|
||||
more detailed explanations of the device lines is present in the
|
||||
<filename>LINT</filename> configuration file, located in the same
|
||||
directory as <filename>GENERIC</filename>. If you are in doubt as to
|
||||
the purpose or necessity of a line, check first in
|
||||
<filename>LINT</filename>.</para>
|
||||
|
||||
<para>The kernel is currently being moved to a better organization of
|
||||
the option handling. Traditionally, each option in the config file
|
||||
|
@ -3352,9 +3371,9 @@
|
|||
remap=tt>cpu</emphasis> line may be present with
|
||||
different values of <emphasis
|
||||
remap=tt><replaceable>cpu_type</replaceable></emphasis>
|
||||
as are present in the GENERIC kernel. For a custom
|
||||
kernel, it is best to specify only the cpu you have. If,
|
||||
for example, you have an Intel Pentium, use
|
||||
as are present in the <filename>GENERIC</filename> kernel.
|
||||
For a custom kernel, it is best to specify only the cpu
|
||||
you have. If, for example, you have an Intel Pentium, use
|
||||
<symbol>I586_CPU</symbol> for <emphasis
|
||||
remap=tt><replaceable>cpu_type</replaceable></emphasis>.</para>
|
||||
</listitem>
|
||||
|
@ -3365,8 +3384,9 @@
|
|||
<listitem>
|
||||
<para>Next, we have <emphasis remap=tt>ident</emphasis>,
|
||||
which is the identification of the kernel. You should
|
||||
change this from GENERIC to whatever you named your
|
||||
kernel, in this example, MYKERNEL. The value you put in
|
||||
change this from <filename>GENERIC</filename> to whatever
|
||||
you named your kernel, in this example,
|
||||
<filename>MYKERNEL</filename>. The value you put in
|
||||
<emphasis remap=tt>ident</emphasis> will print when you
|
||||
boot up the kernel, so it is useful to give a kernel a
|
||||
different name if you want to keep it separate from your
|
||||
|
@ -3439,10 +3459,10 @@
|
|||
|
||||
<listitem>
|
||||
<para>This line specifies the location and name of the
|
||||
kernel. Traditionally the kernel is called <emphasis
|
||||
remap=tt>vmunix</emphasis> but in FreeBSD, it is aptly
|
||||
named <emphasis remap=tt>kernel</emphasis>. You should
|
||||
always use <emphasis remap=tt>kernel</emphasis> for
|
||||
kernel. Traditionally the kernel is called
|
||||
<filename>vmunix</filename> but in FreeBSD, it is aptly
|
||||
named <filename>kernel</filename>. You should always use
|
||||
<filename>kernel</filename> for
|
||||
<symbol>kernel_name</symbol> because changing it will
|
||||
render numerous system utilities inoperative. The second
|
||||
part of the line specifies the disk and partition where
|
||||
|
@ -3623,9 +3643,9 @@
|
|||
|
||||
<listitem>
|
||||
<para>Process filesystem. This is a pretend filesystem
|
||||
mounted on /proc which allows programs like
|
||||
<command>ps(1)</command> to give you more information on
|
||||
what processes are running.</para>
|
||||
mounted on <filename>/proc</filename> which allows
|
||||
programs like <command>ps(1)</command> to give you more
|
||||
information on what processes are running.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -5354,8 +5374,8 @@
|
|||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>If any additional files (such as <emphasis
|
||||
remap=tt>principal.*</emphasis> or <symbol>master_key</symbol>)
|
||||
<para>If any additional files (such as
|
||||
<filename>principal.*</filename> or <symbol>master_key</symbol>)
|
||||
exist, then use the <symbol>kdb_destroy</symbol> command to
|
||||
destroy the old Kerberos database, of if Kerberos is not running,
|
||||
simply delete the extra files with <emphasis
|
||||
|
@ -9762,13 +9782,14 @@
|
|||
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> makes the filter <emphasis remap=tt>hpdf</emphasis> quite complex since <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> cannot read from standard input. It wants to work with a filename. What is worse, the filename has to end in <filename>.dvi</filename> so using <filename>/dev/fd/0</filename> for standard input is problematic. We can get around that problem by linking (symbolically) a temporary file name (one that ends in <filename>.dvi</filename>) to <filename>/dev/fd/0</filename>, thereby forcing <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> to read from standard input.</para>
|
||||
|
||||
<para>The only other fly in the ointment is the fact that we
|
||||
cannot use /tmp for the temporary link. Symbolic links are
|
||||
owned by user and group <emphasis remap=tt>bin</emphasis>.
|
||||
The filter runs as user <emphasis remap=tt>daemon</emphasis>.
|
||||
And the <filename>/tmp</filename> directory has the sticky bit
|
||||
set. The filter can create the link, but it will not be able
|
||||
clean up when done and remove it since the link will belong to
|
||||
a different user.</para>
|
||||
cannot use <filename>/tmp</filename> for the temporary link.
|
||||
Symbolic links are owned by user and group <emphasis
|
||||
remap=tt>bin</emphasis>. The filter runs as user <emphasis
|
||||
remap=tt>daemon</emphasis>. And the
|
||||
<filename>/tmp</filename> directory has the sticky bit set.
|
||||
The filter can create the link, but it will not be able clean
|
||||
up when done and remove it since the link will belong to a
|
||||
different user.</para>
|
||||
|
||||
<para>Instead, the filter will make the symbolic link in the
|
||||
current working directory, which is the spooling directory
|
||||
|
@ -10755,8 +10776,8 @@
|
|||
<listitem>
|
||||
<para>You can control how much free space there needs to
|
||||
remain on the filesystem where a spooling directory
|
||||
resides. Make a file called <emphasis
|
||||
remap=tt>minfree</emphasis> in the spooling directory
|
||||
resides. Make a file called
|
||||
<filename>minfree</filename> in the spooling directory
|
||||
for the local printer. Insert in that file a number
|
||||
representing how many disk blocks (512 bytes) of free
|
||||
space there has to be for a remote job to be
|
||||
|
@ -10766,11 +10787,11 @@
|
|||
your filesystem. You can also use it to give a certain
|
||||
priority to local users: they will be able to queue jobs
|
||||
long after the free disk space has fallen below the
|
||||
amount specified in the <emphasis
|
||||
remap=tt>minfree</emphasis> file.</para>
|
||||
amount specified in the <filename>minfree</filename>
|
||||
file.</para>
|
||||
|
||||
<para>For example, let us add a <emphasis
|
||||
remap=tt>minfree</emphasis> file for the printer
|
||||
<para>For example, let us add a
|
||||
<filename>minfree</filename> file for the printer
|
||||
<emphasis remap=tt>bamboo</emphasis>. We examine
|
||||
<filename>/etc/printcap</filename> to find the spooling
|
||||
directory for this printer; here is <emphasis
|
||||
|
@ -11266,9 +11287,9 @@
|
|||
sure that quotas are configured in your kernel. This is done by
|
||||
adding the following line to your kernel configuration file:
|
||||
<literallayout>options QUOTA</literallayout> The
|
||||
stock GENERIC kernel does not have this enabled by default, so you
|
||||
will have to configure, build and install a custom kernel in order
|
||||
to use disk quotas. Please refer to the
|
||||
stock <filename>GENERIC</filename> kernel does not have this enabled
|
||||
by default, so you will have to configure, build and install a
|
||||
custom kernel in order to use disk quotas. Please refer to the
|
||||
<xref linkend="kernelconfig" remap="Configuring the FreeBSD Kernel">
|
||||
section for more information on kernel configuration.</para>
|
||||
|
||||
|
@ -13294,7 +13315,7 @@
|
|||
cuag</screen>
|
||||
</informalexample> If you do not want or need callout
|
||||
devices for some reason, you can dispense with making
|
||||
the <emphasis remap=tt>cua*</emphasis> devices.</para>
|
||||
the <filename>cua*</filename> devices.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -14498,10 +14519,12 @@
|
|||
must contain one or more lines describing your host
|
||||
adapter(s). This includes I/O addresses, interrupts etc.
|
||||
Consult the man page for your adapter driver to get more info.
|
||||
Apart from that, check out /sys/i386/conf/LINT for an overview
|
||||
of a kernel config file. LINT contains every possible option
|
||||
you can dream of. It does <emphasis>not</emphasis> imply LINT
|
||||
will actually get you to a working kernel at all.</para>
|
||||
Apart from that, check out
|
||||
<filename>/sys/i386/conf/LINT</filename> for an overview of a
|
||||
kernel config file. <filename>LINT</filename> contains every
|
||||
possible option you can dream of. It does
|
||||
<emphasis>not</emphasis> imply <filename>LINT</filename> will
|
||||
actually get you to a working kernel at all.</para>
|
||||
|
||||
<para>Although it is probably stating the obvious: the kernel
|
||||
config file should reflect your actual hardware setup. So,
|
||||
|
@ -14677,8 +14700,9 @@
|
|||
probed. Because the INQUIRY response also includes the version
|
||||
number of the device firmware, it is even possible that for
|
||||
different firmware versions different workarounds are used.
|
||||
See e.g. /sys/scsi/st.c and /sys/scsi/scsiconf.c for more info
|
||||
on how this is done.</para>
|
||||
See e.g. <filename>/sys/scsi/st.c</filename> and
|
||||
<filename>/sys/scsi/scsiconf.c</filename> for more info on how
|
||||
this is done.</para>
|
||||
|
||||
<para>This scheme works fine, but keep in mind that it of course
|
||||
only works for devices that are KNOWN to be weird. If you are
|
||||
|
@ -15353,8 +15377,8 @@
|
|||
rewoffl.</para>
|
||||
|
||||
<para>If you are using the NCR SCSI controllers, patch the file
|
||||
/usr/src/sys/pci/ncr.c (as shown below). Build and install a
|
||||
new kernel.</para>
|
||||
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
||||
Build and install a new kernel.</para>
|
||||
|
||||
<para>
|
||||
<informalexample>
|
||||
|
|
|
@ -1505,8 +1505,8 @@
|
|||
<title>Before installing from a MS-DOS partition</title>
|
||||
|
||||
<para>To prepare for installation from an MS-DOS partition, copy the
|
||||
files from the distribution into a directory called <emphasis
|
||||
remap=tt>C:\FREEBSD</emphasis>. The directory tree structure of
|
||||
files from the distribution into a directory called
|
||||
<filename>C:\FREEBSD</filename>. The directory tree structure of
|
||||
the CDROM must be partially reproduced within this directory so we
|
||||
suggest using the DOS <emphasis remap=tt>xcopy</emphasis> command.
|
||||
For example, to prepare for a minimal installation of FreeBSD:
|
||||
|
@ -1514,13 +1514,13 @@
|
|||
<screen>C> MD C:\FREEBSD C> XCOPY /S E:\BIN
|
||||
C:\FREEBSD\BIN\ C> XCOPY /S E:\MANPAGES
|
||||
C:\FREEBSD\MANPAGES\</screen>
|
||||
</informalexample> assuming that <emphasis remap=tt>C:</emphasis>
|
||||
is where you have free space and <emphasis remap=tt>E:</emphasis>
|
||||
</informalexample> assuming that <filename>C:</filename>
|
||||
is where you have free space and <filename>E:</filename>
|
||||
is where your CDROM is mounted.</para>
|
||||
|
||||
<para>For as many `DISTS' you wish to install from MS-DOS (and you
|
||||
have free space for), install each one under <emphasis
|
||||
remap=tt>C:\FREEBSD</emphasis> - the <acronym>BIN</acronym> dist
|
||||
have free space for), install each one under
|
||||
<filename>C:\FREEBSD</filename> - the <acronym>BIN</acronym> dist
|
||||
is only the minimal requirement.</para>
|
||||
|
||||
</sect2>
|
||||
|
@ -2248,10 +2248,11 @@
|
|||
|
||||
<listitem>
|
||||
<para> Install the program executable and other supporting
|
||||
files, man pages, etc. under the /usr/local hierarchy, where
|
||||
they will not get mixed up with system programs. This also
|
||||
makes sure that all the ports you install will go in the same
|
||||
place, instead of being flung all over your system.
|
||||
files, man pages, etc. under the
|
||||
<filename>/usr/local</filename> hierarchy, where they will not
|
||||
get mixed up with system programs. This also makes sure that
|
||||
all the ports you install will go in the same place, instead
|
||||
of being flung all over your system.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -2291,7 +2292,8 @@
|
|||
the initial setting up will already have been done for you.</para>
|
||||
|
||||
<para>If not, make sure the <emphasis>FreeBSD</emphasis> CDROM is in
|
||||
the drive and mounted on, say, /cdrom. Then do</para>
|
||||
the drive and mounted on, say, <filename>/cdrom</filename>. Then
|
||||
do</para>
|
||||
|
||||
<para>
|
||||
<literallayout> # mkdir /usr/ports # cd /usr/ports # ln -s
|
||||
|
@ -2299,8 +2301,8 @@
|
|||
</para>
|
||||
|
||||
<para>to enable the ports make mechanism to find the tarballs (it
|
||||
expects to find them in /usr/ports/distfiles, which is why we
|
||||
sym-linked the CDROM's tarball directory to that
|
||||
expects to find them in <filename>/usr/ports/distfiles</filename>,
|
||||
which is why we sym-linked the CDROM's tarball directory to that
|
||||
directory).</para>
|
||||
|
||||
<para>Now, suppose you want to install the gnats program from the
|
||||
|
@ -2434,7 +2436,7 @@
|
|||
|
||||
<sect2
|
||||
id="ports-makefile">
|
||||
<title>Makefile</title>
|
||||
<title><filename>Makefile</filename></title>
|
||||
|
||||
<para>The most important component of a skeleton is the Makefile.
|
||||
This contains various statements that specify how the port should
|
||||
|
@ -2480,9 +2482,10 @@
|
|||
<para>Skipping over the next few lines for a minute, the line
|
||||
<literallayout> .include <bsd.port.mk> </literallayout> says
|
||||
that the other statements and commands needed for this port are
|
||||
in a standard file called `bsd.port.mk". As these are the
|
||||
same for all ports, there is no point in duplicating them all over
|
||||
the place, so they are kept in a single standard file.</para>
|
||||
in a standard file called <filename>bsd.port.mk</filename>. As
|
||||
these are the same for all ports, there is no point in duplicating
|
||||
them all over the place, so they are kept in a single standard
|
||||
file.</para>
|
||||
|
||||
<para>This is probably not the place to go into a detailed
|
||||
examination of how Makefiles work; suffice it to say that the line
|
||||
|
@ -2496,13 +2499,13 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The files directory</title>
|
||||
<title>The <filename>files</filename> directory</title>
|
||||
|
||||
<para>The file containing the <xref linkend="ports-checksum"
|
||||
remap="checksum"> for the port is called "md5", after
|
||||
the MD5 algorithm used for ports checksums. It lives in a
|
||||
directory with the slightly confusing name of
|
||||
"files".</para>
|
||||
remap="checksum"> for the port is called
|
||||
<filename>md5</filename>, after the MD5 algorithm used for ports
|
||||
checksums. It lives in a directory with the slightly confusing
|
||||
name of <filename>files</filename>.</para>
|
||||
|
||||
<para>This directory can also contain other miscellaneous files that
|
||||
are required by the port and do not belong anywhere else.</para>
|
||||
|
@ -2510,7 +2513,7 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The patches directory</title>
|
||||
<title>The <filename>patches</filename> directory</title>
|
||||
|
||||
<para>This directory contains the <xref linkend="ports-patch"
|
||||
remap="patches"> needed to make everything work properly under
|
||||
|
@ -2519,7 +2522,7 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The pkg directory</title>
|
||||
<title>The <filename>pkg</filename> directory</title>
|
||||
|
||||
<para>This program contains three quite useful files:-</para>
|
||||
|
||||
|
@ -2527,18 +2530,19 @@
|
|||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>COMMENT - a one-line description of the program.
|
||||
<para><filename>COMMENT</filename> - a one-line description of
|
||||
the program.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>DESCR - a more detailed description.
|
||||
<para><filename>DESCR</filename> - a more detailed description.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>PLIST - a list of all the files that will be created
|
||||
when the program is installed.</para>
|
||||
<para><filename>PLIST</filename> - a list of all the files
|
||||
that will be created when the program is installed.</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
@ -2703,16 +2707,19 @@
|
|||
tarballs?
|
||||
</para>
|
||||
|
||||
<para>A. It is a file ending in .tar or .tar.gz (with variations
|
||||
like .tar.Z, or even .tgz if you are trying to squeeze the
|
||||
names into a DOS filesystem).</para>
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename>
|
||||
if you are trying to squeeze the names into a DOS
|
||||
filesystem).</para>
|
||||
|
||||
<para>Basically, it is a directory tree that has been archived
|
||||
into a single file (.tar) and optionally compressed (.gz).
|
||||
This technique was originally used for
|
||||
<emphasis>T</emphasis>ape <acronym>AR</acronym>chives (hence
|
||||
the name `tar'), but it is a widely used way of distributing
|
||||
program source code around the Internet.</para>
|
||||
into a single file (<filename>.tar</filename>) and optionally
|
||||
compressed (<filename>.gz</filename>). This technique was
|
||||
originally used for <emphasis>T</emphasis>ape
|
||||
<acronym>AR</acronym>chives (hence the name `tar'), but it is
|
||||
a widely used way of distributing program source code around
|
||||
the Internet.</para>
|
||||
|
||||
<para>You can see what files are in them, or even extract them
|
||||
yourself, by using the standard Unix tar program, which comes
|
||||
|
@ -2763,15 +2770,15 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
/usr/ports/distfiles I got some error about not having
|
||||
permission.
|
||||
<filename>/usr/ports/distfiles</filename> I got some error
|
||||
about not having permission.
|
||||
</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
/usr/ports/distfiles, but you will not be able to copy
|
||||
anything there because it is sym-linked to the CDROM, which is
|
||||
read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be
|
||||
able to copy anything there because it is sym-linked to the
|
||||
CDROM, which is read-only. You can tell it to look somewhere
|
||||
else by doing</para>
|
||||
|
||||
<para>
|
||||
<literallayout> DISTDIR=/where/you/put/it make
|
||||
|
@ -2781,9 +2788,10 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything
|
||||
in /usr/ports? My system administrator says I must put
|
||||
everything under /u/people/guests/wurzburger, but it does not
|
||||
seem to work.
|
||||
in <filename>/usr/ports</filename>? My system administrator
|
||||
says I must put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does
|
||||
not seem to work.
|
||||
</para>
|
||||
|
||||
<para>A. You can use the PORTSDIR and PREFIX variables to tell
|
||||
|
@ -2796,16 +2804,20 @@
|
|||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>will compile the port in /u/people/guests/wurzburger/ports
|
||||
and install everything under /usr/local. </para>
|
||||
<para>will compile the port in
|
||||
<filename>/u/people/guests/wurzburger/ports</filename> and
|
||||
install everything under <filename>/usr/local</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literallayout> make PREFIX=/u/people/guests/wurzburger/local
|
||||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>will compile it in /usr/ports and install it in
|
||||
/u/people/guests/wurzburger/local. </para>
|
||||
<para>will compile it in <filename>/usr/ports</filename> and
|
||||
install it in
|
||||
<filename>/u/people/guests/wurzburger/local</filename>.
|
||||
</para>
|
||||
|
||||
<para>And of course</para>
|
||||
|
||||
|
@ -2912,11 +2924,12 @@
|
|||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>or by editing /etc/make.conf, but unfortunately not all
|
||||
ports respect this. The surest way is to do 'make configure',
|
||||
then go into the source directory and inspect the Makefiles by
|
||||
hand, but this can get tedious if the source has lots of
|
||||
sub-directories, each with their own Makefiles.</para>
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
unfortunately not all ports respect this. The surest way is to
|
||||
do 'make configure', then go into the source directory and
|
||||
inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2997,8 +3010,8 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
whatever you called them in the distfiles directory. Can I
|
||||
delete those as well?
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?
|
||||
</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those
|
||||
|
@ -3078,7 +3091,8 @@
|
|||
</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
bsd.ports.mk and bsd.ports.subdir.mk files in your <ulink
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/share/mk/">makefiles
|
||||
directory.</ulink> (Note: readers with an aversion to
|
||||
intricate shell-scripts are advised not to follow this
|
||||
|
@ -3171,10 +3185,10 @@
|
|||
which is the staging area where your kernel will be built. Notice
|
||||
the logical organization of the directory tree, with each supported
|
||||
device, filesystem, and option in its own subdirectory. Also,
|
||||
anything inside the <emphasis remap=tt>i386</emphasis> directory
|
||||
deals with PC hardware only, while everything outside the <emphasis
|
||||
remap=tt>i386</emphasis> directory is common to all platforms
|
||||
which FreeBSD could potentially be ported to.</para>
|
||||
anything inside the <filename>i386</filename> directory deals with
|
||||
PC hardware only, while everything outside the
|
||||
<filename>i386</filename> directory is common to all platforms which
|
||||
FreeBSD could potentially be ported to.</para>
|
||||
|
||||
<para>
|
||||
<blockquote>
|
||||
|
@ -3187,15 +3201,15 @@
|
|||
</para>
|
||||
|
||||
<para>Next, move to the <filename>i386/conf</filename> directory and
|
||||
copy the GENERIC configuration file to the name you want to give
|
||||
your kernel. For example:
|
||||
copy the <filename>GENERIC</filename> configuration file to the name
|
||||
you want to give your kernel. For example:
|
||||
<informalexample>
|
||||
<screen># cd /usr/src/sys/i386/conf # cp GENERIC MYKERNEL</screen>
|
||||
</informalexample> Traditionally, this name is in all capital
|
||||
letters and, if you are maintaining multiple FreeBSD machines with
|
||||
different hardware, it is a good idea to name it after your
|
||||
machine's hostname. We will call it MYKERNEL for the purpose of
|
||||
this example.</para>
|
||||
machine's hostname. We will call it <filename>MYKERNEL</filename>
|
||||
for the purpose of this example.</para>
|
||||
|
||||
<para>
|
||||
<blockquote>
|
||||
|
@ -3205,19 +3219,22 @@
|
|||
</blockquote>
|
||||
</para>
|
||||
|
||||
<para>Now, edit MYKERNEL with your favorite text editor. If you are
|
||||
just starting out, the only editor available will probably be
|
||||
<emphasis remap=tt>vi</emphasis>, which is too complex to explain
|
||||
here, but is covered well in many books in the <xref
|
||||
<para>Now, edit <filename>MYKERNEL</filename> with your favorite text
|
||||
editor. If you are just starting out, the only editor available
|
||||
will probably be <emphasis remap=tt>vi</emphasis>, which is too
|
||||
complex to explain here, but is covered well in many books in the
|
||||
<xref
|
||||
linkend="bibliography" remap="bibliography">. Feel free to change
|
||||
the comment lines at the top to reflect your configuration or the
|
||||
changes you have made to differentiate it from GENERIC.</para>
|
||||
changes you have made to differentiate it from
|
||||
<filename>GENERIC</filename>.</para>
|
||||
|
||||
<para>If you have build a kernel under SunOS or some other BSD
|
||||
operating system, much of this file will be very familiar to you.
|
||||
If you are coming from some other operating system such as DOS, on
|
||||
the other hand, the GENERIC configuration file might seem
|
||||
overwhelming to you, so follow the descriptions in the <xref
|
||||
operating system, much of this file will be very familiar to you. If
|
||||
you are coming from some other operating system such as DOS, on the
|
||||
other hand, the <filename>GENERIC</filename> configuration file
|
||||
might seem overwhelming to you, so follow the descriptions in the
|
||||
<xref
|
||||
linkend="kernelconfig-config"
|
||||
remap="Configuration File"> section slowly and carefully.</para>
|
||||
|
||||
|
@ -3269,14 +3286,16 @@
|
|||
most lines only contain one argument. Anything following a
|
||||
<emphasis remap=tt>#</emphasis> is considered a comment and ignored.
|
||||
The following sections describe each keyword, generally in the order
|
||||
they are listed in GENERIC, although some related keywords have been
|
||||
grouped together in a single section (such as Networking) even
|
||||
though they are actually scattered throughout the GENERIC file.
|
||||
<anchor id="kernelconfig-options"> An
|
||||
exhaustive list of options and more detailed explanations of the
|
||||
device lines is present in the LINT configuration file, located in
|
||||
the same directory as GENERIC. If you are in doubt as to the
|
||||
purpose or necessity of a line, check first in LINT.</para>
|
||||
they are listed in <filename>GENERIC</filename>, although some
|
||||
related keywords have been grouped together in a single section
|
||||
(such as Networking) even though they are actually scattered
|
||||
throughout the <filename>GENERIC</filename> file.
|
||||
<anchor id="kernelconfig-options"> An exhaustive list of options and
|
||||
more detailed explanations of the device lines is present in the
|
||||
<filename>LINT</filename> configuration file, located in the same
|
||||
directory as <filename>GENERIC</filename>. If you are in doubt as to
|
||||
the purpose or necessity of a line, check first in
|
||||
<filename>LINT</filename>.</para>
|
||||
|
||||
<para>The kernel is currently being moved to a better organization of
|
||||
the option handling. Traditionally, each option in the config file
|
||||
|
@ -3352,9 +3371,9 @@
|
|||
remap=tt>cpu</emphasis> line may be present with
|
||||
different values of <emphasis
|
||||
remap=tt><replaceable>cpu_type</replaceable></emphasis>
|
||||
as are present in the GENERIC kernel. For a custom
|
||||
kernel, it is best to specify only the cpu you have. If,
|
||||
for example, you have an Intel Pentium, use
|
||||
as are present in the <filename>GENERIC</filename> kernel.
|
||||
For a custom kernel, it is best to specify only the cpu
|
||||
you have. If, for example, you have an Intel Pentium, use
|
||||
<symbol>I586_CPU</symbol> for <emphasis
|
||||
remap=tt><replaceable>cpu_type</replaceable></emphasis>.</para>
|
||||
</listitem>
|
||||
|
@ -3365,8 +3384,9 @@
|
|||
<listitem>
|
||||
<para>Next, we have <emphasis remap=tt>ident</emphasis>,
|
||||
which is the identification of the kernel. You should
|
||||
change this from GENERIC to whatever you named your
|
||||
kernel, in this example, MYKERNEL. The value you put in
|
||||
change this from <filename>GENERIC</filename> to whatever
|
||||
you named your kernel, in this example,
|
||||
<filename>MYKERNEL</filename>. The value you put in
|
||||
<emphasis remap=tt>ident</emphasis> will print when you
|
||||
boot up the kernel, so it is useful to give a kernel a
|
||||
different name if you want to keep it separate from your
|
||||
|
@ -3439,10 +3459,10 @@
|
|||
|
||||
<listitem>
|
||||
<para>This line specifies the location and name of the
|
||||
kernel. Traditionally the kernel is called <emphasis
|
||||
remap=tt>vmunix</emphasis> but in FreeBSD, it is aptly
|
||||
named <emphasis remap=tt>kernel</emphasis>. You should
|
||||
always use <emphasis remap=tt>kernel</emphasis> for
|
||||
kernel. Traditionally the kernel is called
|
||||
<filename>vmunix</filename> but in FreeBSD, it is aptly
|
||||
named <filename>kernel</filename>. You should always use
|
||||
<filename>kernel</filename> for
|
||||
<symbol>kernel_name</symbol> because changing it will
|
||||
render numerous system utilities inoperative. The second
|
||||
part of the line specifies the disk and partition where
|
||||
|
@ -3623,9 +3643,9 @@
|
|||
|
||||
<listitem>
|
||||
<para>Process filesystem. This is a pretend filesystem
|
||||
mounted on /proc which allows programs like
|
||||
<command>ps(1)</command> to give you more information on
|
||||
what processes are running.</para>
|
||||
mounted on <filename>/proc</filename> which allows
|
||||
programs like <command>ps(1)</command> to give you more
|
||||
information on what processes are running.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -5354,8 +5374,8 @@
|
|||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>If any additional files (such as <emphasis
|
||||
remap=tt>principal.*</emphasis> or <symbol>master_key</symbol>)
|
||||
<para>If any additional files (such as
|
||||
<filename>principal.*</filename> or <symbol>master_key</symbol>)
|
||||
exist, then use the <symbol>kdb_destroy</symbol> command to
|
||||
destroy the old Kerberos database, of if Kerberos is not running,
|
||||
simply delete the extra files with <emphasis
|
||||
|
@ -9762,13 +9782,14 @@
|
|||
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> makes the filter <emphasis remap=tt>hpdf</emphasis> quite complex since <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> cannot read from standard input. It wants to work with a filename. What is worse, the filename has to end in <filename>.dvi</filename> so using <filename>/dev/fd/0</filename> for standard input is problematic. We can get around that problem by linking (symbolically) a temporary file name (one that ends in <filename>.dvi</filename>) to <filename>/dev/fd/0</filename>, thereby forcing <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> to read from standard input.</para>
|
||||
|
||||
<para>The only other fly in the ointment is the fact that we
|
||||
cannot use /tmp for the temporary link. Symbolic links are
|
||||
owned by user and group <emphasis remap=tt>bin</emphasis>.
|
||||
The filter runs as user <emphasis remap=tt>daemon</emphasis>.
|
||||
And the <filename>/tmp</filename> directory has the sticky bit
|
||||
set. The filter can create the link, but it will not be able
|
||||
clean up when done and remove it since the link will belong to
|
||||
a different user.</para>
|
||||
cannot use <filename>/tmp</filename> for the temporary link.
|
||||
Symbolic links are owned by user and group <emphasis
|
||||
remap=tt>bin</emphasis>. The filter runs as user <emphasis
|
||||
remap=tt>daemon</emphasis>. And the
|
||||
<filename>/tmp</filename> directory has the sticky bit set.
|
||||
The filter can create the link, but it will not be able clean
|
||||
up when done and remove it since the link will belong to a
|
||||
different user.</para>
|
||||
|
||||
<para>Instead, the filter will make the symbolic link in the
|
||||
current working directory, which is the spooling directory
|
||||
|
@ -10755,8 +10776,8 @@
|
|||
<listitem>
|
||||
<para>You can control how much free space there needs to
|
||||
remain on the filesystem where a spooling directory
|
||||
resides. Make a file called <emphasis
|
||||
remap=tt>minfree</emphasis> in the spooling directory
|
||||
resides. Make a file called
|
||||
<filename>minfree</filename> in the spooling directory
|
||||
for the local printer. Insert in that file a number
|
||||
representing how many disk blocks (512 bytes) of free
|
||||
space there has to be for a remote job to be
|
||||
|
@ -10766,11 +10787,11 @@
|
|||
your filesystem. You can also use it to give a certain
|
||||
priority to local users: they will be able to queue jobs
|
||||
long after the free disk space has fallen below the
|
||||
amount specified in the <emphasis
|
||||
remap=tt>minfree</emphasis> file.</para>
|
||||
amount specified in the <filename>minfree</filename>
|
||||
file.</para>
|
||||
|
||||
<para>For example, let us add a <emphasis
|
||||
remap=tt>minfree</emphasis> file for the printer
|
||||
<para>For example, let us add a
|
||||
<filename>minfree</filename> file for the printer
|
||||
<emphasis remap=tt>bamboo</emphasis>. We examine
|
||||
<filename>/etc/printcap</filename> to find the spooling
|
||||
directory for this printer; here is <emphasis
|
||||
|
@ -11266,9 +11287,9 @@
|
|||
sure that quotas are configured in your kernel. This is done by
|
||||
adding the following line to your kernel configuration file:
|
||||
<literallayout>options QUOTA</literallayout> The
|
||||
stock GENERIC kernel does not have this enabled by default, so you
|
||||
will have to configure, build and install a custom kernel in order
|
||||
to use disk quotas. Please refer to the
|
||||
stock <filename>GENERIC</filename> kernel does not have this enabled
|
||||
by default, so you will have to configure, build and install a
|
||||
custom kernel in order to use disk quotas. Please refer to the
|
||||
<xref linkend="kernelconfig" remap="Configuring the FreeBSD Kernel">
|
||||
section for more information on kernel configuration.</para>
|
||||
|
||||
|
@ -13294,7 +13315,7 @@
|
|||
cuag</screen>
|
||||
</informalexample> If you do not want or need callout
|
||||
devices for some reason, you can dispense with making
|
||||
the <emphasis remap=tt>cua*</emphasis> devices.</para>
|
||||
the <filename>cua*</filename> devices.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -14498,10 +14519,12 @@
|
|||
must contain one or more lines describing your host
|
||||
adapter(s). This includes I/O addresses, interrupts etc.
|
||||
Consult the man page for your adapter driver to get more info.
|
||||
Apart from that, check out /sys/i386/conf/LINT for an overview
|
||||
of a kernel config file. LINT contains every possible option
|
||||
you can dream of. It does <emphasis>not</emphasis> imply LINT
|
||||
will actually get you to a working kernel at all.</para>
|
||||
Apart from that, check out
|
||||
<filename>/sys/i386/conf/LINT</filename> for an overview of a
|
||||
kernel config file. <filename>LINT</filename> contains every
|
||||
possible option you can dream of. It does
|
||||
<emphasis>not</emphasis> imply <filename>LINT</filename> will
|
||||
actually get you to a working kernel at all.</para>
|
||||
|
||||
<para>Although it is probably stating the obvious: the kernel
|
||||
config file should reflect your actual hardware setup. So,
|
||||
|
@ -14677,8 +14700,9 @@
|
|||
probed. Because the INQUIRY response also includes the version
|
||||
number of the device firmware, it is even possible that for
|
||||
different firmware versions different workarounds are used.
|
||||
See e.g. /sys/scsi/st.c and /sys/scsi/scsiconf.c for more info
|
||||
on how this is done.</para>
|
||||
See e.g. <filename>/sys/scsi/st.c</filename> and
|
||||
<filename>/sys/scsi/scsiconf.c</filename> for more info on how
|
||||
this is done.</para>
|
||||
|
||||
<para>This scheme works fine, but keep in mind that it of course
|
||||
only works for devices that are KNOWN to be weird. If you are
|
||||
|
@ -15353,8 +15377,8 @@
|
|||
rewoffl.</para>
|
||||
|
||||
<para>If you are using the NCR SCSI controllers, patch the file
|
||||
/usr/src/sys/pci/ncr.c (as shown below). Build and install a
|
||||
new kernel.</para>
|
||||
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
||||
Build and install a new kernel.</para>
|
||||
|
||||
<para>
|
||||
<informalexample>
|
||||
|
|
|
@ -1505,8 +1505,8 @@
|
|||
<title>Before installing from a MS-DOS partition</title>
|
||||
|
||||
<para>To prepare for installation from an MS-DOS partition, copy the
|
||||
files from the distribution into a directory called <emphasis
|
||||
remap=tt>C:\FREEBSD</emphasis>. The directory tree structure of
|
||||
files from the distribution into a directory called
|
||||
<filename>C:\FREEBSD</filename>. The directory tree structure of
|
||||
the CDROM must be partially reproduced within this directory so we
|
||||
suggest using the DOS <emphasis remap=tt>xcopy</emphasis> command.
|
||||
For example, to prepare for a minimal installation of FreeBSD:
|
||||
|
@ -1514,13 +1514,13 @@
|
|||
<screen>C> MD C:\FREEBSD C> XCOPY /S E:\BIN
|
||||
C:\FREEBSD\BIN\ C> XCOPY /S E:\MANPAGES
|
||||
C:\FREEBSD\MANPAGES\</screen>
|
||||
</informalexample> assuming that <emphasis remap=tt>C:</emphasis>
|
||||
is where you have free space and <emphasis remap=tt>E:</emphasis>
|
||||
</informalexample> assuming that <filename>C:</filename>
|
||||
is where you have free space and <filename>E:</filename>
|
||||
is where your CDROM is mounted.</para>
|
||||
|
||||
<para>For as many `DISTS' you wish to install from MS-DOS (and you
|
||||
have free space for), install each one under <emphasis
|
||||
remap=tt>C:\FREEBSD</emphasis> - the <acronym>BIN</acronym> dist
|
||||
have free space for), install each one under
|
||||
<filename>C:\FREEBSD</filename> - the <acronym>BIN</acronym> dist
|
||||
is only the minimal requirement.</para>
|
||||
|
||||
</sect2>
|
||||
|
@ -2248,10 +2248,11 @@
|
|||
|
||||
<listitem>
|
||||
<para> Install the program executable and other supporting
|
||||
files, man pages, etc. under the /usr/local hierarchy, where
|
||||
they will not get mixed up with system programs. This also
|
||||
makes sure that all the ports you install will go in the same
|
||||
place, instead of being flung all over your system.
|
||||
files, man pages, etc. under the
|
||||
<filename>/usr/local</filename> hierarchy, where they will not
|
||||
get mixed up with system programs. This also makes sure that
|
||||
all the ports you install will go in the same place, instead
|
||||
of being flung all over your system.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
|
@ -2291,7 +2292,8 @@
|
|||
the initial setting up will already have been done for you.</para>
|
||||
|
||||
<para>If not, make sure the <emphasis>FreeBSD</emphasis> CDROM is in
|
||||
the drive and mounted on, say, /cdrom. Then do</para>
|
||||
the drive and mounted on, say, <filename>/cdrom</filename>. Then
|
||||
do</para>
|
||||
|
||||
<para>
|
||||
<literallayout> # mkdir /usr/ports # cd /usr/ports # ln -s
|
||||
|
@ -2299,8 +2301,8 @@
|
|||
</para>
|
||||
|
||||
<para>to enable the ports make mechanism to find the tarballs (it
|
||||
expects to find them in /usr/ports/distfiles, which is why we
|
||||
sym-linked the CDROM's tarball directory to that
|
||||
expects to find them in <filename>/usr/ports/distfiles</filename>,
|
||||
which is why we sym-linked the CDROM's tarball directory to that
|
||||
directory).</para>
|
||||
|
||||
<para>Now, suppose you want to install the gnats program from the
|
||||
|
@ -2434,7 +2436,7 @@
|
|||
|
||||
<sect2
|
||||
id="ports-makefile">
|
||||
<title>Makefile</title>
|
||||
<title><filename>Makefile</filename></title>
|
||||
|
||||
<para>The most important component of a skeleton is the Makefile.
|
||||
This contains various statements that specify how the port should
|
||||
|
@ -2480,9 +2482,10 @@
|
|||
<para>Skipping over the next few lines for a minute, the line
|
||||
<literallayout> .include <bsd.port.mk> </literallayout> says
|
||||
that the other statements and commands needed for this port are
|
||||
in a standard file called `bsd.port.mk". As these are the
|
||||
same for all ports, there is no point in duplicating them all over
|
||||
the place, so they are kept in a single standard file.</para>
|
||||
in a standard file called <filename>bsd.port.mk</filename>. As
|
||||
these are the same for all ports, there is no point in duplicating
|
||||
them all over the place, so they are kept in a single standard
|
||||
file.</para>
|
||||
|
||||
<para>This is probably not the place to go into a detailed
|
||||
examination of how Makefiles work; suffice it to say that the line
|
||||
|
@ -2496,13 +2499,13 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The files directory</title>
|
||||
<title>The <filename>files</filename> directory</title>
|
||||
|
||||
<para>The file containing the <xref linkend="ports-checksum"
|
||||
remap="checksum"> for the port is called "md5", after
|
||||
the MD5 algorithm used for ports checksums. It lives in a
|
||||
directory with the slightly confusing name of
|
||||
"files".</para>
|
||||
remap="checksum"> for the port is called
|
||||
<filename>md5</filename>, after the MD5 algorithm used for ports
|
||||
checksums. It lives in a directory with the slightly confusing
|
||||
name of <filename>files</filename>.</para>
|
||||
|
||||
<para>This directory can also contain other miscellaneous files that
|
||||
are required by the port and do not belong anywhere else.</para>
|
||||
|
@ -2510,7 +2513,7 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The patches directory</title>
|
||||
<title>The <filename>patches</filename> directory</title>
|
||||
|
||||
<para>This directory contains the <xref linkend="ports-patch"
|
||||
remap="patches"> needed to make everything work properly under
|
||||
|
@ -2519,7 +2522,7 @@
|
|||
</sect2>
|
||||
|
||||
<sect2>
|
||||
<title>The pkg directory</title>
|
||||
<title>The <filename>pkg</filename> directory</title>
|
||||
|
||||
<para>This program contains three quite useful files:-</para>
|
||||
|
||||
|
@ -2527,18 +2530,19 @@
|
|||
<itemizedlist>
|
||||
|
||||
<listitem>
|
||||
<para>COMMENT - a one-line description of the program.
|
||||
<para><filename>COMMENT</filename> - a one-line description of
|
||||
the program.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>DESCR - a more detailed description.
|
||||
<para><filename>DESCR</filename> - a more detailed description.
|
||||
</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<para>PLIST - a list of all the files that will be created
|
||||
when the program is installed.</para>
|
||||
<para><filename>PLIST</filename> - a list of all the files
|
||||
that will be created when the program is installed.</para>
|
||||
</listitem>
|
||||
|
||||
</itemizedlist>
|
||||
|
@ -2703,16 +2707,19 @@
|
|||
tarballs?
|
||||
</para>
|
||||
|
||||
<para>A. It is a file ending in .tar or .tar.gz (with variations
|
||||
like .tar.Z, or even .tgz if you are trying to squeeze the
|
||||
names into a DOS filesystem).</para>
|
||||
<para>A. It is a file ending in <filename>.tar</filename> or
|
||||
<filename>.tar.gz</filename> (with variations like
|
||||
<filename>.tar.Z</filename>, or even <filename>.tgz</filename>
|
||||
if you are trying to squeeze the names into a DOS
|
||||
filesystem).</para>
|
||||
|
||||
<para>Basically, it is a directory tree that has been archived
|
||||
into a single file (.tar) and optionally compressed (.gz).
|
||||
This technique was originally used for
|
||||
<emphasis>T</emphasis>ape <acronym>AR</acronym>chives (hence
|
||||
the name `tar'), but it is a widely used way of distributing
|
||||
program source code around the Internet.</para>
|
||||
into a single file (<filename>.tar</filename>) and optionally
|
||||
compressed (<filename>.gz</filename>). This technique was
|
||||
originally used for <emphasis>T</emphasis>ape
|
||||
<acronym>AR</acronym>chives (hence the name `tar'), but it is
|
||||
a widely used way of distributing program source code around
|
||||
the Internet.</para>
|
||||
|
||||
<para>You can see what files are in them, or even extract them
|
||||
yourself, by using the standard Unix tar program, which comes
|
||||
|
@ -2763,15 +2770,15 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. I did that, but when I tried to put it into
|
||||
/usr/ports/distfiles I got some error about not having
|
||||
permission.
|
||||
<filename>/usr/ports/distfiles</filename> I got some error
|
||||
about not having permission.
|
||||
</para>
|
||||
|
||||
<para>A. The ports mechanism looks for the tarball in
|
||||
/usr/ports/distfiles, but you will not be able to copy
|
||||
anything there because it is sym-linked to the CDROM, which is
|
||||
read-only. You can tell it to look somewhere else by
|
||||
doing</para>
|
||||
<filename>/usr/ports/distfiles</filename>, but you will not be
|
||||
able to copy anything there because it is sym-linked to the
|
||||
CDROM, which is read-only. You can tell it to look somewhere
|
||||
else by doing</para>
|
||||
|
||||
<para>
|
||||
<literallayout> DISTDIR=/where/you/put/it make
|
||||
|
@ -2781,9 +2788,10 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. Does the ports scheme only work if you have everything
|
||||
in /usr/ports? My system administrator says I must put
|
||||
everything under /u/people/guests/wurzburger, but it does not
|
||||
seem to work.
|
||||
in <filename>/usr/ports</filename>? My system administrator
|
||||
says I must put everything under
|
||||
<filename>/u/people/guests/wurzburger</filename>, but it does
|
||||
not seem to work.
|
||||
</para>
|
||||
|
||||
<para>A. You can use the PORTSDIR and PREFIX variables to tell
|
||||
|
@ -2796,16 +2804,20 @@
|
|||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>will compile the port in /u/people/guests/wurzburger/ports
|
||||
and install everything under /usr/local. </para>
|
||||
<para>will compile the port in
|
||||
<filename>/u/people/guests/wurzburger/ports</filename> and
|
||||
install everything under <filename>/usr/local</filename>.
|
||||
</para>
|
||||
|
||||
<para>
|
||||
<literallayout> make PREFIX=/u/people/guests/wurzburger/local
|
||||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>will compile it in /usr/ports and install it in
|
||||
/u/people/guests/wurzburger/local. </para>
|
||||
<para>will compile it in <filename>/usr/ports</filename> and
|
||||
install it in
|
||||
<filename>/u/people/guests/wurzburger/local</filename>.
|
||||
</para>
|
||||
|
||||
<para>And of course</para>
|
||||
|
||||
|
@ -2912,11 +2924,12 @@
|
|||
install</literallayout>
|
||||
</para>
|
||||
|
||||
<para>or by editing /etc/make.conf, but unfortunately not all
|
||||
ports respect this. The surest way is to do 'make configure',
|
||||
then go into the source directory and inspect the Makefiles by
|
||||
hand, but this can get tedious if the source has lots of
|
||||
sub-directories, each with their own Makefiles.</para>
|
||||
<para>or by editing <filename>/etc/make.conf</filename>, but
|
||||
unfortunately not all ports respect this. The surest way is to
|
||||
do 'make configure', then go into the source directory and
|
||||
inspect the Makefiles by hand, but this can get tedious if the
|
||||
source has lots of sub-directories, each with their own
|
||||
Makefiles.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -2997,8 +3010,8 @@
|
|||
|
||||
<listitem>
|
||||
<para>Q. I tried that and it still left all those tarballs or
|
||||
whatever you called them in the distfiles directory. Can I
|
||||
delete those as well?
|
||||
whatever you called them in the <filename>distfiles</filename>
|
||||
directory. Can I delete those as well?
|
||||
</para>
|
||||
|
||||
<para>A. Yes, if you are sure you have finished with them, those
|
||||
|
@ -3078,7 +3091,8 @@
|
|||
</para>
|
||||
|
||||
<para>A. Nothing secret about it at all, just look at the
|
||||
bsd.ports.mk and bsd.ports.subdir.mk files in your <ulink
|
||||
<filename>bsd.ports.mk</filename> and
|
||||
<filename>bsd.ports.subdir.mk</filename> files in your <ulink
|
||||
URL="file://localhost/usr/share/mk/">makefiles
|
||||
directory.</ulink> (Note: readers with an aversion to
|
||||
intricate shell-scripts are advised not to follow this
|
||||
|
@ -3171,10 +3185,10 @@
|
|||
which is the staging area where your kernel will be built. Notice
|
||||
the logical organization of the directory tree, with each supported
|
||||
device, filesystem, and option in its own subdirectory. Also,
|
||||
anything inside the <emphasis remap=tt>i386</emphasis> directory
|
||||
deals with PC hardware only, while everything outside the <emphasis
|
||||
remap=tt>i386</emphasis> directory is common to all platforms
|
||||
which FreeBSD could potentially be ported to.</para>
|
||||
anything inside the <filename>i386</filename> directory deals with
|
||||
PC hardware only, while everything outside the
|
||||
<filename>i386</filename> directory is common to all platforms which
|
||||
FreeBSD could potentially be ported to.</para>
|
||||
|
||||
<para>
|
||||
<blockquote>
|
||||
|
@ -3187,15 +3201,15 @@
|
|||
</para>
|
||||
|
||||
<para>Next, move to the <filename>i386/conf</filename> directory and
|
||||
copy the GENERIC configuration file to the name you want to give
|
||||
your kernel. For example:
|
||||
copy the <filename>GENERIC</filename> configuration file to the name
|
||||
you want to give your kernel. For example:
|
||||
<informalexample>
|
||||
<screen># cd /usr/src/sys/i386/conf # cp GENERIC MYKERNEL</screen>
|
||||
</informalexample> Traditionally, this name is in all capital
|
||||
letters and, if you are maintaining multiple FreeBSD machines with
|
||||
different hardware, it is a good idea to name it after your
|
||||
machine's hostname. We will call it MYKERNEL for the purpose of
|
||||
this example.</para>
|
||||
machine's hostname. We will call it <filename>MYKERNEL</filename>
|
||||
for the purpose of this example.</para>
|
||||
|
||||
<para>
|
||||
<blockquote>
|
||||
|
@ -3205,19 +3219,22 @@
|
|||
</blockquote>
|
||||
</para>
|
||||
|
||||
<para>Now, edit MYKERNEL with your favorite text editor. If you are
|
||||
just starting out, the only editor available will probably be
|
||||
<emphasis remap=tt>vi</emphasis>, which is too complex to explain
|
||||
here, but is covered well in many books in the <xref
|
||||
<para>Now, edit <filename>MYKERNEL</filename> with your favorite text
|
||||
editor. If you are just starting out, the only editor available
|
||||
will probably be <emphasis remap=tt>vi</emphasis>, which is too
|
||||
complex to explain here, but is covered well in many books in the
|
||||
<xref
|
||||
linkend="bibliography" remap="bibliography">. Feel free to change
|
||||
the comment lines at the top to reflect your configuration or the
|
||||
changes you have made to differentiate it from GENERIC.</para>
|
||||
changes you have made to differentiate it from
|
||||
<filename>GENERIC</filename>.</para>
|
||||
|
||||
<para>If you have build a kernel under SunOS or some other BSD
|
||||
operating system, much of this file will be very familiar to you.
|
||||
If you are coming from some other operating system such as DOS, on
|
||||
the other hand, the GENERIC configuration file might seem
|
||||
overwhelming to you, so follow the descriptions in the <xref
|
||||
operating system, much of this file will be very familiar to you. If
|
||||
you are coming from some other operating system such as DOS, on the
|
||||
other hand, the <filename>GENERIC</filename> configuration file
|
||||
might seem overwhelming to you, so follow the descriptions in the
|
||||
<xref
|
||||
linkend="kernelconfig-config"
|
||||
remap="Configuration File"> section slowly and carefully.</para>
|
||||
|
||||
|
@ -3269,14 +3286,16 @@
|
|||
most lines only contain one argument. Anything following a
|
||||
<emphasis remap=tt>#</emphasis> is considered a comment and ignored.
|
||||
The following sections describe each keyword, generally in the order
|
||||
they are listed in GENERIC, although some related keywords have been
|
||||
grouped together in a single section (such as Networking) even
|
||||
though they are actually scattered throughout the GENERIC file.
|
||||
<anchor id="kernelconfig-options"> An
|
||||
exhaustive list of options and more detailed explanations of the
|
||||
device lines is present in the LINT configuration file, located in
|
||||
the same directory as GENERIC. If you are in doubt as to the
|
||||
purpose or necessity of a line, check first in LINT.</para>
|
||||
they are listed in <filename>GENERIC</filename>, although some
|
||||
related keywords have been grouped together in a single section
|
||||
(such as Networking) even though they are actually scattered
|
||||
throughout the <filename>GENERIC</filename> file.
|
||||
<anchor id="kernelconfig-options"> An exhaustive list of options and
|
||||
more detailed explanations of the device lines is present in the
|
||||
<filename>LINT</filename> configuration file, located in the same
|
||||
directory as <filename>GENERIC</filename>. If you are in doubt as to
|
||||
the purpose or necessity of a line, check first in
|
||||
<filename>LINT</filename>.</para>
|
||||
|
||||
<para>The kernel is currently being moved to a better organization of
|
||||
the option handling. Traditionally, each option in the config file
|
||||
|
@ -3352,9 +3371,9 @@
|
|||
remap=tt>cpu</emphasis> line may be present with
|
||||
different values of <emphasis
|
||||
remap=tt><replaceable>cpu_type</replaceable></emphasis>
|
||||
as are present in the GENERIC kernel. For a custom
|
||||
kernel, it is best to specify only the cpu you have. If,
|
||||
for example, you have an Intel Pentium, use
|
||||
as are present in the <filename>GENERIC</filename> kernel.
|
||||
For a custom kernel, it is best to specify only the cpu
|
||||
you have. If, for example, you have an Intel Pentium, use
|
||||
<symbol>I586_CPU</symbol> for <emphasis
|
||||
remap=tt><replaceable>cpu_type</replaceable></emphasis>.</para>
|
||||
</listitem>
|
||||
|
@ -3365,8 +3384,9 @@
|
|||
<listitem>
|
||||
<para>Next, we have <emphasis remap=tt>ident</emphasis>,
|
||||
which is the identification of the kernel. You should
|
||||
change this from GENERIC to whatever you named your
|
||||
kernel, in this example, MYKERNEL. The value you put in
|
||||
change this from <filename>GENERIC</filename> to whatever
|
||||
you named your kernel, in this example,
|
||||
<filename>MYKERNEL</filename>. The value you put in
|
||||
<emphasis remap=tt>ident</emphasis> will print when you
|
||||
boot up the kernel, so it is useful to give a kernel a
|
||||
different name if you want to keep it separate from your
|
||||
|
@ -3439,10 +3459,10 @@
|
|||
|
||||
<listitem>
|
||||
<para>This line specifies the location and name of the
|
||||
kernel. Traditionally the kernel is called <emphasis
|
||||
remap=tt>vmunix</emphasis> but in FreeBSD, it is aptly
|
||||
named <emphasis remap=tt>kernel</emphasis>. You should
|
||||
always use <emphasis remap=tt>kernel</emphasis> for
|
||||
kernel. Traditionally the kernel is called
|
||||
<filename>vmunix</filename> but in FreeBSD, it is aptly
|
||||
named <filename>kernel</filename>. You should always use
|
||||
<filename>kernel</filename> for
|
||||
<symbol>kernel_name</symbol> because changing it will
|
||||
render numerous system utilities inoperative. The second
|
||||
part of the line specifies the disk and partition where
|
||||
|
@ -3623,9 +3643,9 @@
|
|||
|
||||
<listitem>
|
||||
<para>Process filesystem. This is a pretend filesystem
|
||||
mounted on /proc which allows programs like
|
||||
<command>ps(1)</command> to give you more information on
|
||||
what processes are running.</para>
|
||||
mounted on <filename>/proc</filename> which allows
|
||||
programs like <command>ps(1)</command> to give you more
|
||||
information on what processes are running.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
|
@ -5354,8 +5374,8 @@
|
|||
</informalexample>
|
||||
</para>
|
||||
|
||||
<para>If any additional files (such as <emphasis
|
||||
remap=tt>principal.*</emphasis> or <symbol>master_key</symbol>)
|
||||
<para>If any additional files (such as
|
||||
<filename>principal.*</filename> or <symbol>master_key</symbol>)
|
||||
exist, then use the <symbol>kdb_destroy</symbol> command to
|
||||
destroy the old Kerberos database, of if Kerberos is not running,
|
||||
simply delete the extra files with <emphasis
|
||||
|
@ -9762,13 +9782,14 @@
|
|||
URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> makes the filter <emphasis remap=tt>hpdf</emphasis> quite complex since <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> cannot read from standard input. It wants to work with a filename. What is worse, the filename has to end in <filename>.dvi</filename> so using <filename>/dev/fd/0</filename> for standard input is problematic. We can get around that problem by linking (symbolically) a temporary file name (one that ends in <filename>.dvi</filename>) to <filename>/dev/fd/0</filename>, thereby forcing <ulink URL="http://www.freebsd.org/cgi/man.cgi?manpath=FreeBSD+Ports&query=dvilj2p">dvilj2p</ulink> to read from standard input.</para>
|
||||
|
||||
<para>The only other fly in the ointment is the fact that we
|
||||
cannot use /tmp for the temporary link. Symbolic links are
|
||||
owned by user and group <emphasis remap=tt>bin</emphasis>.
|
||||
The filter runs as user <emphasis remap=tt>daemon</emphasis>.
|
||||
And the <filename>/tmp</filename> directory has the sticky bit
|
||||
set. The filter can create the link, but it will not be able
|
||||
clean up when done and remove it since the link will belong to
|
||||
a different user.</para>
|
||||
cannot use <filename>/tmp</filename> for the temporary link.
|
||||
Symbolic links are owned by user and group <emphasis
|
||||
remap=tt>bin</emphasis>. The filter runs as user <emphasis
|
||||
remap=tt>daemon</emphasis>. And the
|
||||
<filename>/tmp</filename> directory has the sticky bit set.
|
||||
The filter can create the link, but it will not be able clean
|
||||
up when done and remove it since the link will belong to a
|
||||
different user.</para>
|
||||
|
||||
<para>Instead, the filter will make the symbolic link in the
|
||||
current working directory, which is the spooling directory
|
||||
|
@ -10755,8 +10776,8 @@
|
|||
<listitem>
|
||||
<para>You can control how much free space there needs to
|
||||
remain on the filesystem where a spooling directory
|
||||
resides. Make a file called <emphasis
|
||||
remap=tt>minfree</emphasis> in the spooling directory
|
||||
resides. Make a file called
|
||||
<filename>minfree</filename> in the spooling directory
|
||||
for the local printer. Insert in that file a number
|
||||
representing how many disk blocks (512 bytes) of free
|
||||
space there has to be for a remote job to be
|
||||
|
@ -10766,11 +10787,11 @@
|
|||
your filesystem. You can also use it to give a certain
|
||||
priority to local users: they will be able to queue jobs
|
||||
long after the free disk space has fallen below the
|
||||
amount specified in the <emphasis
|
||||
remap=tt>minfree</emphasis> file.</para>
|
||||
amount specified in the <filename>minfree</filename>
|
||||
file.</para>
|
||||
|
||||
<para>For example, let us add a <emphasis
|
||||
remap=tt>minfree</emphasis> file for the printer
|
||||
<para>For example, let us add a
|
||||
<filename>minfree</filename> file for the printer
|
||||
<emphasis remap=tt>bamboo</emphasis>. We examine
|
||||
<filename>/etc/printcap</filename> to find the spooling
|
||||
directory for this printer; here is <emphasis
|
||||
|
@ -11266,9 +11287,9 @@
|
|||
sure that quotas are configured in your kernel. This is done by
|
||||
adding the following line to your kernel configuration file:
|
||||
<literallayout>options QUOTA</literallayout> The
|
||||
stock GENERIC kernel does not have this enabled by default, so you
|
||||
will have to configure, build and install a custom kernel in order
|
||||
to use disk quotas. Please refer to the
|
||||
stock <filename>GENERIC</filename> kernel does not have this enabled
|
||||
by default, so you will have to configure, build and install a
|
||||
custom kernel in order to use disk quotas. Please refer to the
|
||||
<xref linkend="kernelconfig" remap="Configuring the FreeBSD Kernel">
|
||||
section for more information on kernel configuration.</para>
|
||||
|
||||
|
@ -13294,7 +13315,7 @@
|
|||
cuag</screen>
|
||||
</informalexample> If you do not want or need callout
|
||||
devices for some reason, you can dispense with making
|
||||
the <emphasis remap=tt>cua*</emphasis> devices.</para>
|
||||
the <filename>cua*</filename> devices.</para>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
|
@ -14498,10 +14519,12 @@
|
|||
must contain one or more lines describing your host
|
||||
adapter(s). This includes I/O addresses, interrupts etc.
|
||||
Consult the man page for your adapter driver to get more info.
|
||||
Apart from that, check out /sys/i386/conf/LINT for an overview
|
||||
of a kernel config file. LINT contains every possible option
|
||||
you can dream of. It does <emphasis>not</emphasis> imply LINT
|
||||
will actually get you to a working kernel at all.</para>
|
||||
Apart from that, check out
|
||||
<filename>/sys/i386/conf/LINT</filename> for an overview of a
|
||||
kernel config file. <filename>LINT</filename> contains every
|
||||
possible option you can dream of. It does
|
||||
<emphasis>not</emphasis> imply <filename>LINT</filename> will
|
||||
actually get you to a working kernel at all.</para>
|
||||
|
||||
<para>Although it is probably stating the obvious: the kernel
|
||||
config file should reflect your actual hardware setup. So,
|
||||
|
@ -14677,8 +14700,9 @@
|
|||
probed. Because the INQUIRY response also includes the version
|
||||
number of the device firmware, it is even possible that for
|
||||
different firmware versions different workarounds are used.
|
||||
See e.g. /sys/scsi/st.c and /sys/scsi/scsiconf.c for more info
|
||||
on how this is done.</para>
|
||||
See e.g. <filename>/sys/scsi/st.c</filename> and
|
||||
<filename>/sys/scsi/scsiconf.c</filename> for more info on how
|
||||
this is done.</para>
|
||||
|
||||
<para>This scheme works fine, but keep in mind that it of course
|
||||
only works for devices that are KNOWN to be weird. If you are
|
||||
|
@ -15353,8 +15377,8 @@
|
|||
rewoffl.</para>
|
||||
|
||||
<para>If you are using the NCR SCSI controllers, patch the file
|
||||
/usr/src/sys/pci/ncr.c (as shown below). Build and install a
|
||||
new kernel.</para>
|
||||
<filename>/usr/src/sys/pci/ncr.c</filename> (as shown below).
|
||||
Build and install a new kernel.</para>
|
||||
|
||||
<para>
|
||||
<informalexample>
|
||||
|
|
Loading…
Reference in a new issue