Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 29 Oct 2006 21:37:17 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 108698 for review
Message-ID:  <200610292137.k9TLbHcL029855@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=108698

Change 108698 by jb@jb_freebsd8 on 2006/10/29 21:37:14

	IFC

Affected files ...

.. //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/rc-scripting/article.sgml#3 integrate
.. //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#29 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml#9 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/book.sgml#6 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/config/chapter.sgml#8 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/eresources/chapter.sgml#5 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml#8 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/geom/chapter.sgml#5 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/kernelconfig/chapter.sgml#7 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/l10n/chapter.sgml#5 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/multimedia/chapter.sgml#4 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/network-servers/chapter.sgml#7 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/ports/chapter.sgml#7 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/preface/preface.sgml#5 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/security/chapter.sgml#9 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/serialcomms/chapter.sgml#7 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/x11/chapter.sgml#9 integrate
.. //depot/projects/dtrace/doc/zh_CN.GB2312/books/porters-handbook/book.sgml#12 integrate
.. //depot/projects/dtrace/src/UPDATING#9 integrate
.. //depot/projects/dtrace/src/bin/cp/cp.1#6 integrate
.. //depot/projects/dtrace/src/etc/defaults/rc.conf#19 integrate
.. //depot/projects/dtrace/src/etc/network.subr#9 integrate
.. //depot/projects/dtrace/src/etc/rc.firewall#4 integrate
.. //depot/projects/dtrace/src/lib/libc/gmon/Makefile.inc#4 integrate
.. //depot/projects/dtrace/src/lib/libc/net/inet.3#4 integrate
.. //depot/projects/dtrace/src/lib/libkvm/kvm_proc.c#6 integrate
.. //depot/projects/dtrace/src/lib/libtacplus/libtacplus.3#4 integrate
.. //depot/projects/dtrace/src/share/man/man4/sis.4#6 integrate
.. //depot/projects/dtrace/src/share/man/man9/kobj.9#4 integrate
.. //depot/projects/dtrace/src/sys/amd64/amd64/prof_machdep.c#4 integrate
.. //depot/projects/dtrace/src/sys/amd64/include/asmacros.h#4 integrate
.. //depot/projects/dtrace/src/sys/amd64/include/profile.h#4 integrate
.. //depot/projects/dtrace/src/sys/amd64/linux32/linux.h#6 integrate
.. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_dummy.c#7 integrate
.. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_proto.h#11 integrate
.. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_syscall.h#11 integrate
.. //depot/projects/dtrace/src/sys/amd64/linux32/linux32_sysent.c#11 integrate
.. //depot/projects/dtrace/src/sys/amd64/linux32/syscalls.master#11 integrate
.. //depot/projects/dtrace/src/sys/boot/common/load_elf.c#5 integrate
.. //depot/projects/dtrace/src/sys/boot/i386/boot2/boot2.c#5 integrate
.. //depot/projects/dtrace/src/sys/boot/i386/libi386/elf32_freebsd.c#5 integrate
.. //depot/projects/dtrace/src/sys/boot/pc98/boot2/boot.c#4 integrate
.. //depot/projects/dtrace/src/sys/compat/linprocfs/linprocfs.c#9 integrate
.. //depot/projects/dtrace/src/sys/compat/linux/linux_aio.c#2 delete
.. //depot/projects/dtrace/src/sys/compat/linux/linux_aio.h#2 delete
.. //depot/projects/dtrace/src/sys/compat/linux/linux_emul.c#5 integrate
.. //depot/projects/dtrace/src/sys/compat/linux/linux_emul.h#3 integrate
.. //depot/projects/dtrace/src/sys/compat/linux/linux_misc.c#11 integrate
.. //depot/projects/dtrace/src/sys/compat/linux/linux_misc.h#1 branch
.. //depot/projects/dtrace/src/sys/conf/files.amd64#13 integrate
.. //depot/projects/dtrace/src/sys/conf/files.i386#17 integrate
.. //depot/projects/dtrace/src/sys/conf/files.pc98#11 integrate
.. //depot/projects/dtrace/src/sys/dev/dc/if_dc.c#7 integrate
.. //depot/projects/dtrace/src/sys/dev/sound/pcm/dsp.c#6 integrate
.. //depot/projects/dtrace/src/sys/i386/include/asmacros.h#4 integrate
.. //depot/projects/dtrace/src/sys/i386/include/profile.h#4 integrate
.. //depot/projects/dtrace/src/sys/i386/isa/prof_machdep.c#4 integrate
.. //depot/projects/dtrace/src/sys/i386/linux/linux.h#6 integrate
.. //depot/projects/dtrace/src/sys/i386/linux/linux_dummy.c#7 integrate
.. //depot/projects/dtrace/src/sys/i386/linux/linux_proto.h#13 integrate
.. //depot/projects/dtrace/src/sys/i386/linux/linux_syscall.h#13 integrate
.. //depot/projects/dtrace/src/sys/i386/linux/linux_sysent.c#13 integrate
.. //depot/projects/dtrace/src/sys/i386/linux/syscalls.master#13 integrate
.. //depot/projects/dtrace/src/sys/kern/kern_thread.c#8 integrate
.. //depot/projects/dtrace/src/sys/kern/vfs_bio.c#8 integrate
.. //depot/projects/dtrace/src/sys/modules/linux/Makefile#7 integrate
.. //depot/projects/dtrace/src/sys/modules/powermac_nvram/Makefile#3 integrate
.. //depot/projects/dtrace/src/sys/netinet/ip_dummynet.c#4 integrate
.. //depot/projects/dtrace/src/sys/pci/if_sis.c#5 integrate
.. //depot/projects/dtrace/src/sys/sys/param.h#13 integrate
.. //depot/projects/dtrace/src/sys/sys/proc.h#16 integrate
.. //depot/projects/dtrace/src/sys/sys/soundcard.h#5 integrate
.. //depot/projects/dtrace/src/usr.sbin/fwcontrol/Makefile#4 integrate
.. //depot/projects/dtrace/src/usr.sbin/fwcontrol/fwcontrol.8#4 integrate
.. //depot/projects/dtrace/src/usr.sbin/fwcontrol/fwcontrol.c#4 integrate
.. //depot/projects/dtrace/src/usr.sbin/fwcontrol/fwdv.c#4 integrate
.. //depot/projects/dtrace/src/usr.sbin/fwcontrol/fwmethods.h#1 branch
.. //depot/projects/dtrace/src/usr.sbin/fwcontrol/fwmpegts.c#1 branch
.. //depot/projects/dtrace/www/en/docs/books.sgml#8 integrate
.. //depot/projects/dtrace/www/en/donations/donors.sgml#17 integrate
.. //depot/projects/dtrace/www/en/gnome/docs/bugging.sgml#5 integrate
.. //depot/projects/dtrace/www/en/gnome/docs/develfaq.sgml#6 integrate
.. //depot/projects/dtrace/www/en/gnome/docs/faq2.sgml#8 integrate
.. //depot/projects/dtrace/www/en/gnome/docs/faq216.sgml#3 integrate
.. //depot/projects/dtrace/www/en/gnome/news.xml#13 integrate
.. //depot/projects/dtrace/www/share/sgml/events.xml#4 integrate
.. //depot/projects/dtrace/www/share/sgml/press.xml#8 integrate
.. //depot/projects/dtrace/www/zh_CN/about.sgml#5 integrate
.. //depot/projects/dtrace/www/zh_CN/applications.sgml#4 integrate
.. //depot/projects/dtrace/www/zh_CN/developers.sgml#3 integrate
.. //depot/projects/dtrace/www/zh_CN/index.xsl#4 integrate
.. //depot/projects/dtrace/www/zh_CN/internet.sgml#4 integrate
.. //depot/projects/dtrace/www/zh_CN/security/security.sgml#4 integrate
.. //depot/projects/dtrace/www/zh_CN/send-pr.sgml#4 integrate
.. //depot/projects/dtrace/www/zh_CN/share/sgml/libcommon.xsl#4 integrate
.. //depot/projects/dtrace/www/zh_CN/share/sgml/news.xml#4 integrate
.. //depot/projects/dtrace/www/zh_CN/share/sgml/press.xml#3 integrate
.. //depot/projects/dtrace/www/zh_CN/where.sgml#4 integrate

Differences ...

==== //depot/projects/dtrace/doc/en_US.ISO8859-1/articles/rc-scripting/article.sgml#3 (text+ko) ====

@@ -25,7 +25,7 @@
       <holder>The FreeBSD Project</holder>
     </copyright>
 
-    <pubdate>$FreeBSD: doc/en_US.ISO8859-1/articles/rc-scripting/article.sgml,v 1.6 2006/10/26 17:09:29 yar Exp $</pubdate>
+    <pubdate>$FreeBSD: doc/en_US.ISO8859-1/articles/rc-scripting/article.sgml,v 1.7 2006/10/27 10:30:52 yar Exp $</pubdate>
 
     <legalnotice id="trademarks" role="trademarks">
       &tm-attrib.freebsd;
@@ -240,13 +240,17 @@
 	    (for the system) or <filename>/usr/local/sbin</filename>
 	    (for ports) and call it from a &man.sh.1; script in the
 	    appropriate <filename>rc.d</filename> directory.</para>
+	</note>
 
-	  <para>If you would like to know the details about why
+	<tip>
+	  <para>If you would like to learn the details of why
 	    <filename>rc.d</filename> scripts must be written in
 	    the &man.sh.1; language, see how <filename>/etc/rc</filename>
-	    invokes them, then study the internals of
-	    <function>run_rc_script</function>.</para>
-	</note>
+	    invokes them by means of <function>run_rc_script</function>,
+	    then study the implementation of
+	    <function>run_rc_script</function> in
+	    <filename>/etc/rc.subr</filename>.</para>
+	</tip>
       </callout>
 
       <callout arearefs="rcng-dummy-include">
@@ -284,6 +288,11 @@
 	  set <envar>name</envar> before it calls &man.rc.subr.8;
 	  functions.</para>
 
+	<para>Now it is the right time to choose a unique name for
+	  our script once and for all.  We will use it in a number
+	  of places while developing the script.  For a start, let
+	  us give the same name to the script file, too.</para>
+
 	<note>
 	  <para>The current style of <filename>rc.d</filename>
 	    scripting is to enclose values assigned to variables
@@ -331,6 +340,14 @@
 	<para>The body of a sophisticated method can be implemented
 	  as a function.  It is a good idea to make the function
 	  name meaningful.</para>
+
+	<important>
+	  <para>It is strongly recommended to add the prefix
+	    <envar>${name}</envar> to the names of all functions
+	    defined in our script so they never clash with the
+	    functions from &man.rc.subr.8; or another common include
+	    file.</para>
+	</important>
       </callout>
 
       <callout arearefs="rcng-dummy-loadconfig">
@@ -463,10 +480,19 @@
 	  This is a trivial example of how &man.rc.conf.5; variables
 	  can control an <filename>rc.d</filename> script.</para>
 
+	<important>
+	  <para>The names of all &man.rc.conf.5; variables used
+	    exclusively by our script <emphasis>must</emphasis>
+	    have the same prefix: <envar>${name}</envar>.  For
+	    example: <envar>dummy_mode</envar>,
+	    <envar>dummy_state_file</envar>, and so on.</para>
+	</important>
+
 	<note>
 	  <para>While it is possible to use a shorter name internally,
-	    e.g., just <envar>msg</envar>, prepending a unique
-	    prefix to global names will save us from possible
+	    e.g., just <envar>msg</envar>, adding the unique prefix
+	    <envar>${name}</envar> to all global names introduced by
+	    our script will save us from possible
 	    collisions with the &man.rc.subr.8; namespace.</para>
 
 	  <para>As long as an &man.rc.conf.5; variable and its
@@ -980,7 +1006,7 @@
     <informalexample>
       <programlisting>#!/bin/sh
 
-# PROVIDE: mumble mumbled<co id="rcng-hookup-provide">
+# PROVIDE: mumbled oldmumble <co id="rcng-hookup-provide">
 # REQUIRE: DAEMON cleanvar frotz<co id="rcng-hookup-require">
 # BEFORE:  LOGIN<co id="rcng-hookup-before">
 # KEYWORD: nojail shutdown<co id="rcng-hookup-keyword">
@@ -1019,27 +1045,9 @@
 	    several conditions there, e.g., for compatibility
 	    reasons.</para>
 
-	  <para>The best style is to use the same name for the
-	    following entities:</para>
-
-	  <itemizedlist>
-	    <listitem>
-	      <para>the script's file;</para>
-	    </listitem>
-
-	    <listitem>
-	      <para>its main <literal>PROVIDE:</literal> condition;</para>
-	    </listitem>
-
-	    <listitem>
-	      <para>its <envar>${name}</envar>;</para>
-	    </listitem>
-
-	    <listitem>
-	      <para>the prefix of its &man.rc.conf.5; variables,
-		as well as of its private variables and functions.</para>
-	    </listitem>
-	  </itemizedlist>
+	  <para>In any case, the name of the main, or the only,
+	    <literal>PROVIDE:</literal> condition should be the
+	    same as <envar>${name}</envar>.</para>
 	</note>
       </callout>
 

==== //depot/projects/dtrace/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml#29 (text+ko) ====

@@ -1,7 +1,7 @@
 <!--
      The FreeBSD Documentation Project
 
-     $FreeBSD: doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v 1.762 2006/10/26 15:14:52 yar Exp $
+     $FreeBSD: doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v 1.763 2006/10/29 15:22:34 pav Exp $
 -->
 
 <!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
@@ -6263,6 +6263,550 @@
 
     </sect1>
 
+    <sect1 id="using-lua">
+      <title>Using <application>Lua</application></title>
+
+      <para>This section describes the status of the
+	<application>Lua</application> libraries in the ports tree and its
+	integration with the ports system.</para>
+
+      <sect2 id="lua-introduction">
+	<title>Introduction</title>
+
+	<para>There are many versions of the <application>Lua</application>
+	  libraries and corresponding interpreters, which conflict between
+	  them (install files under the same name). In the ports tree this
+	  problem has been solved by installing each version under a different
+	  name using version number suffixes.</para>
+
+	<para>The obvious disadvantage of this is that each application has to
+	  be modified to found the expected version. But it can be solved by
+	  adding some additional flags to the compiler and linker.</para>
+      </sect2>
+
+      <sect2 id="lua-version">
+	<title>Version selection</title>
+
+	<para>To make your port use a specific version of
+	  <application>Lua</application> there are two variables available
+	  for defining (if only one is defined the other will be set to a
+	  default value):</para>
+
+	<table id="lua-ver-sel-table" frame="none">
+	  <title>Variables to select <application>Lua</application>
+	    versions</title>
+
+	  <tgroup cols="3">
+	    <thead>
+	      <row>
+		<entry>Variable</entry>
+
+		<entry>Description</entry>
+
+		<entry>Default value</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><makevar>USE_LUA</makevar></entry>
+
+		<entry>List of versions the port can use</entry>
+
+		<entry>All available versions</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>USE_LUA_NOT</makevar></entry>
+
+		<entry>List of versions the port can not use</entry>
+
+		<entry>None</entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<para>The following is a list of available
+	  <application>Lua</application> versions and the corresponding port
+	  in the tree:</para>
+
+	<table frame="none">
+	  <title>Available <application>Lua</application> versions</title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Version</entry>
+
+		<entry>Port</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><literal>4.0</literal></entry>
+
+		<entry><filename role="package">lang/lua4</filename></entry>
+	      </row>
+
+	      <row>
+		<entry><literal>5.0</literal></entry>
+
+		<entry><filename role="package">lang/lua50</filename></entry>
+	      </row>
+
+	      <row>
+		<entry><literal>5.1</literal></entry>
+
+		<entry><filename role="package">lang/lua</filename></entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<para>The variables in <xref linkend="lua-ver-sel-table"> can be set
+	  to one or more of the following combinations separated by
+	  spaces:</para>
+
+	<table frame="none">
+	  <title><application>Lua</application> version specifications</title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Description</entry>
+
+		<entry>Example</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry>Single version</entry>
+
+		<entry><literal>4.0</literal></entry>
+	      </row>
+
+	      <row>
+		<entry>Ascending range</entry>
+
+		<entry><literal>5.0+</literal></entry>
+	      </row>
+
+	      <row>
+		<entry>Descending range</entry>
+
+		<entry><literal>5.0-</literal></entry>
+	      </row>
+
+	      <row>
+		<entry>Full range (must be ascending)</entry>
+
+		<entry><literal>5.0-5.1</literal></entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<para>There are also some variables to select the preferred versions
+	  from the available ones. They can be set to a list of versions, the
+	  first ones will have higher priority.</para>
+
+	<table frame="none">
+	  <title>Variables to select preferred <application>Lua</application>
+	    versions</title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Name</entry>
+
+		<entry>Designed for</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><makevar>WANT_LUA_VER</makevar></entry>
+
+		<entry>the port</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>WITH_LUA_VER</makevar></entry>
+
+		<entry>the user</entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<example id="lua-version-example">
+	  <title>Selecting the <application>Lua</application> version</title>
+
+	  <para>The following fragment is from a port which can use
+	    <application>Lua</application> version <literal>5.0</literal> or
+	    <literal>5.1</literal>, and uses <literal>5.0</literal> by
+	    default. It can be overriden by the user using
+	    <makevar>WITH_LUA_VER</makevar>.</para>
+
+	  <programlisting>USE_LUA=      5.0-5.1
+WANT_LUA_VER= 5.0</programlisting>
+	</example>
+      </sect2>
+
+      <sect2 id="lua-components">
+	<title>Component selection</title>
+
+	<para>There are other applications that, while not being
+	  <application>Lua</application> libraries, are related to them. These
+	  applications can be specified in the <makevar>LUA_COMPS</makevar>
+	  variable. The following components are available:</para>
+
+	<table frame="none">
+	  <title>Available <application>Lua</application> components</title>
+
+	  <tgroup cols="3">
+	    <thead>
+	      <row>
+		<entry>Name</entry>
+
+		<entry>Description</entry>
+
+		<entry>Version restriction</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><literal>lua</literal></entry>
+
+		<entry>main library</entry>
+
+		<entry>none</entry>
+	      </row>
+
+	      <row>
+		<entry><literal>tolua</literal></entry>
+
+		<entry>Library for accesing C/C++ code</entry>
+
+		<entry><literal>4.0-5.0</literal></entry>
+	      </row>
+
+	      <row>
+		<entry><literal>ruby</literal></entry>
+
+		<entry>Ruby bindings</entry>
+
+		<entry><literal>4.0-5.0</literal></entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<note>
+	  <para>There are more components but they are modules for the
+	    interpreter, not used by applications (only by other
+	    modules).</para>
+	</note>
+
+	<para>The dependency type added when you select each component can be
+	  manually specified by adding a suffix separated by a
+	  <literal>:</literal>, or a default value will be used. The available
+	  dependency types are:</para>
+
+	<table frame="none">
+	  <title>Available <application>Lua</application> dependency
+	    types</title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Name</entry>
+
+		<entry>Description</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><literal>build</literal></entry>
+
+		<entry>Component is required for building, equivalent to
+		  <makevar>BUILD_DEPENDS</makevar></entry>
+	      </row>
+
+	      <row>
+		<entry><literal>run</literal></entry>
+
+		<entry>Component is required for running, equivalent to
+		  <makevar>RUN_DEPENDS</makevar></entry>
+	      </row>
+
+	      <row>
+		<entry><literal>lib</literal></entry>
+
+		<entry>Component is required for building and running,
+		  equivalent to <makevar>LIB_DEPENDS</makevar>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<para>The default values for the components are detailed in the
+	  following table:</para>
+
+	<table frame="none">
+	  <title>Default <application>Lua</application> dependency
+	    types</title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Name</entry>
+
+		<entry>Value</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><literal>lua</literal></entry>
+
+		<entry><literal>lib</literal> for <literal>4.0-5.0</literal>
+		  (shared) and <literal>build</literal> for
+		  <literal>5.1</literal> (static)</entry>
+	      </row>
+
+	      <row>
+		<entry><literal>tolua</literal></entry>
+
+		<entry><literal>build</literal> (static)</entry>
+	      </row>
+
+	      <row>
+		<entry><literal>ruby</literal></entry>
+
+		<entry><literal>lib</literal> (shared)</entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<example id="lua-components-example">
+	  <title>Selecting <application>Lua</application> components</title>
+
+	  <para>The following fragment corresponds to a port which uses
+	    <application>Lua</application> version <literal>4.0</literal> and
+	    its <application>Ruby</application> bindings.</para>
+
+	  <programlisting>USE_LUA=      4.0
+LUA_COMPS=    lua ruby</programlisting>
+	</example>
+      </sect2>
+
+      <sect2 id="lua-version-detection">
+	<title>Detecting installed versions</title>
+
+	<para>To detect an installed version you have to define
+	  <makevar>WANT_LUA</makevar>. If you do not set it to a specific
+	  version then the components will have a version suffix. The
+	  <makevar>HAVE_LUA</makevar> variable will be filled after
+	  detection.</para>
+
+	<example id="lua-ver-det-example">
+	  <title>Detecting installed <application>Lua</application> versions
+	    and components</title>
+
+	  <para>The following fragment can be used in a port that uses
+	    <application>Lua</application> if it is installed, or an option is
+	    selected.</para>
+
+	  <programlisting>WANT_LUA=       yes
+
+.include &lt;bsd.port.pre.mk&gt;
+
+.if defined(WITH_LUA5) || ${HAVE_LUA:Mlua-5.[01]} != ""
+USE_LUA=        5.0-5.1
+CONFIGURE_ARGS+=--enable-lua5
+.endif</programlisting>
+
+	  <para>The following fragment can be used in a port that enables
+	    <application>tolua</application> support if it is installed or if
+	    an option is selected, in addition to
+	    <application>Lua</application>, both version
+	    <literal>4.0</literal>.</para>
+
+	  <programlisting>USE_LUA=        4.0
+LUA_COMPS=      lua
+WANT_LUA=       4.0
+
+.include &lt;bsd.port.pre.mk&gt;
+
+.if defined(WITH_TOLUA) || ${HAVE_LUA:Mtolua} != ""
+LUA_COMPS+=     tolua
+CONFIGURE_ARGS+=--enable-tolua
+.endif</programlisting>
+	</example>
+      </sect2>
+
+      <sect2 id="lua-defined-variables">
+	<title>Defined variables</title>
+
+	<para>The following variables are defined after defining one of the
+	  variables from <xref linkend="lua-ver-sel-table">.</para>
+
+	<table frame="none">
+	  <title>Variables defined for ports that use
+	    <application>Lua</application></title>
+
+	  <tgroup cols="2">
+	    <thead>
+	      <row>
+		<entry>Name</entry>
+
+		<entry>Description</entry>
+	      </row>
+	    </thead>
+
+	    <tbody>
+	      <row>
+		<entry><makevar>LUA_VER</makevar></entry>
+
+		<entry>The <application>Lua</application> version that is
+		  going to be used (e.g., <literal>5.1</literal>)</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_VER_SH</makevar></entry>
+		<entry>The <application>Lua</application> shared library major
+		  version (e.g., <literal>1</literal>)</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_VER_STR</makevar></entry>
+
+		<entry>The <application>Lua</application> version without the
+		  dots (e.g., <literal>51</literal>)</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_PREFIX</makevar></entry>
+
+		<entry>The prefix where <application>Lua</application> (and
+		  components) is installed</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_SUBDIR</makevar></entry>
+
+		<entry>The directory under <filename>${PREFIX}/bin</filename>,
+		  <filename>${PREFIX}/share</filename> and
+		  <filename>${PREFIX}/lib</filename> where
+		  <application>Lua</application> is installed</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_INCDIR</makevar></entry>
+
+		<entry>The directory where <application>Lua</application> and
+		  <application>tolua</application> header files are
+		  installed</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_LIBDIR</makevar></entry>
+
+		<entry>The directory where <application>Lua</application> and
+		  <application>tolua</application> libraries are
+		  installed</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_MODLIBDIR</makevar></entry>
+
+		<entry>The directory where <application>Lua</application>
+		  module libraries (<filename>.so</filename>) are
+		  installed</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_MODSHAREDIR</makevar></entry>
+
+		<entry>The directory where <application>Lua</application>
+		  modules (<filename>.lua</filename>) are installed</entry>
+	      </row>
+
+	      <row>
+		<entry><makevar>LUA_PKGNAMEPREFIX</makevar></entry>
+
+		<entry>The package name prefix used by
+		  <application>Lua</application> modules</entry>
+	      </row>
+	    </tbody>
+	  </tgroup>
+	</table>
+
+	<example id="lua-variables-example">
+	  <title>Telling the port where to find
+	    <application>Lua</application></title>
+
+	  <para>The following fragment shows how to tell a port that uses a
+	    configure script where the <application>Lua</application> header
+	    files and libraries are.</para>
+
+	  <programlisting>
+USE_LUA=        4.0
+GNU_CONFIGURE=  yes
+CONFIGURE_ENV=  CPPFLAGS="-I${LUA_INCDIR}" LDFLAGS="-L${LUA_LIBDIR}"</programlisting>
+	</example>
+      </sect2>
+
+      <sect2 id="lua-premk">
+	<title>Processing in <filename>bsd.port.pre.mk</filename></title>
+
+	<para>If you need to use the variables for running commands right
+	  after including <filename>bsd.port.pre.mk</filename> you need to
+	  define <makevar>LUA_PREMK</makevar>.</para>
+
+	<important>
+	  <para>If you define <makevar>LUA_PREMK</makevar>, then the version,
+	    dependencies, components and defined variables will not change if
+	    you modify the <application>Lua</application> port variables
+	    <emphasis>after</emphasis> including
+	    <filename>bsd.port.pre.mk</filename>.</para>
+	</important>
+
+	<example id="lua-premk-example">
+	  <title>Using <application>Lua</application> variables in
+	    commands</title>
+
+	  <para>The following fragment illustrates the use of
+	    <makevar>LUA_PREMK</makevar> by running the
+	    <application>Lua</application> interpreter to obtain the full
+	    version string, assign it to a variable and pass it to the
+	    program.</para>
+
+	  <programlisting>USE_LUA=        5.0
+LUA_PREMK=      yes
+
+.include &lt;bsd.port.pre.mk&gt;
+
+VER_STR!=       lua${LUA_VER} -v
+
+CFLAGS+=        -DLUA_VERSION_STRING="${VER_STR}"</programlisting>
+	</example>
+
+	<note>
+	  <para>The <application>Lua</application> variables can be safely
+	    used in commands when they are inside targets without the need of
+	    <makevar>LUA_PREMK</makevar>.</para>
+	</note>
+      </sect2>
+    </sect1>
+
     <sect1 id="rc-scripts">
       <title>Starting and stopping services (rc scripts)</title>
 

==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml#9 (text+ko) ====

@@ -2,8 +2,8 @@
      The FreeBSD Documentation Project
      The FreeBSD Chinese Documentation Project
 
-     Original revision: 1.384
-     $FreeBSD: doc/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml,v 1.10 2006/09/15 04:28:30 delphij Exp $
+     Original revision: 1.387
+     $FreeBSD: doc/zh_CN.GB2312/books/handbook/advanced-networking/chapter.sgml,v 1.11 2006/10/27 06:37:47 delphij Exp $
 -->
 
 <chapter id="advanced-networking">
@@ -2309,11 +2309,28 @@
 	  请参考 <xref linkend="firewalls">
 	  以了解关于将网桥配置为防火墙的其它信息。</para>
 
-	<para>如果允许非IP(non-IP)数据包 (比如 ARP) 穿过网桥,
-	  必须设置一个防火墙 (firewall) 选项。这个选项是
-	  <literal>IPFIREWALL_DEFAULT_TO_ACCEPT</literal>。
-	  注意:这个选项改变了默认的规则使得防火墙接受任何的数据包。
-	  在您设置这些规则前,请确认这些规则可能会产生什么后果。</para>
+	<para>如果需要允许非 IP 数据包 (例如 ARP) 穿过网桥,
+	  有三种方法可供选择。 第一种是在内核配置中加入下列选项,
+	  并重新联编:<para>
+
+	<programlisting>option	IPFIREWALL_DEFAULT_TO_ACCEPT</programlisting>
+
+	<para>第二种方法, 是在
+	  <filename>rc.conf</filename> 文件中将防火墙类型设置为 <quote><literal>open</literal></quote>:</para>
+
+	<programlisting>firewall_type="open"</programlisting>
+
+	<para>注意, 这些选项会让防火墙看起来像透明的一样;
+	  默认情况下, 所有包或连接都会被允许。
+	  如果选择这样做的话, 可能会需要对防火墙规则进行大幅调整。</para>
+
+	<para>第三种方法是应用下述 &man.ipfw.8;
+	  规则:</para>
+
+	<screen>&prompt.root; <userinput>ipfw add allow mac-type arp layer2</userinput></screen>
+
+	<para>或将其加入在用的防火墙规则集。 这个规则实际上是允许 &man.arp.8; 包通过,
+	  因此最好把它放在规则集前面, 以便能够尽早地应用此规则, 而避免由此带来的性能影响。</para>
       </sect3>
 
       <sect3>

==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/book.sgml#6 (text+ko) ====

@@ -2,8 +2,8 @@
      The FreeBSD Documentation Project
      The FreeBSD Simplified Chinese Documentation Project
 
-     Original Revision: 1.166
-     $FreeBSD: doc/zh_CN.GB2312/books/handbook/book.sgml,v 1.7 2006/08/14 02:26:09 delphij Exp $
+     Original Revision: 1.168
+     $FreeBSD: doc/zh_CN.GB2312/books/handbook/book.sgml,v 1.8 2006/10/27 06:37:47 delphij Exp $
 -->
 
 <!DOCTYPE BOOK PUBLIC "-//FreeBSD//DTD DocBook V4.1-Based Extension//EN" [
@@ -135,7 +135,7 @@
     <abstract>
       <para>欢迎使用 FreeBSD! 本手册适用于安装 <emphasis>FreeBSD &rel2.current;-RELEASE</emphasis>
 	和 <emphasis>FreeBSD &rel.current;-RELEASE</emphasis> 以及它们的日常使用。
-	这个手册目前由很多人 <emphasis>持续地</emphasis> 维护。其中的内容需要不断的添加和更新。
+	这个手册目前由很多人 <emphasis>持续地</emphasis> 维护。 其中的内容需要不断地更新。
 	如果您有兴趣参加这个项目,请发邮件到 &a.doc;。此文档最新的英文原始版本可以从 <ulink
 	  url="http://www.FreeBSD.org/">FreeBSD Web站点</ulink> 上获得
 	(这本手册的较早期版本可以在 <ulink

==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/config/chapter.sgml#8 (text+ko) ====

@@ -2,8 +2,8 @@
      The FreeBSD Documentation Project
      The FreeBSD Chinese Documentation Project
 
-     Original Revision: 1.221
-     $FreeBSD: doc/zh_CN.GB2312/books/handbook/config/chapter.sgml,v 1.10 2006/08/14 02:26:09 delphij Exp $
+     Original Revision: 1.223
+     $FreeBSD: doc/zh_CN.GB2312/books/handbook/config/chapter.sgml,v 1.11 2006/10/27 06:37:47 delphij Exp $
 -->
 
 <chapter id="config-tuning">
@@ -632,12 +632,11 @@
       中的 <varname>sshd_enable</varname> 设置成 <option>YES</option>
       的时候工作。不管是否在 <filename>/etc/rc.conf</filename> 中设置了,要
       <option>start</option>、<option>stop</option> 或者 <option>restart</option>
-      一个服务,命令前可以加上一个<quote>force</quote>前缀。例如要不顾当前
+      一个服务,命令前可以加上一个<quote>one</quote>前缀。例如要不顾当前
       <filename>/etc/rc.conf</filename> 的设置重新启动
-      <command>sshd</command>,执行下面的命令:
-</para>
+      <command>sshd</command>,执行下面的命令:</para>
 
-    <screen>&prompt.root; <userinput>/etc/rc.d/sshd forcerestart</userinput></screen>
+    <screen>&prompt.root; <userinput>/etc/rc.d/sshd onerestart</userinput></screen>
 
     <para>用选项 <option>rcvar</option> 可以简单来的检查
       <filename>/etc/rc.conf</filename> 中用适当的 <filename>rc.d</filename>
@@ -703,7 +702,10 @@
       &unix; 操作系统一样要用 <quote>runlevels</quote> 来控制。</para>
 
     <para>更多关于 <filename>rc.d</filename> 系统的信息, 可以在
-      &man.rc.8; 和 &man.rc.subr.8; 联机手册中找到。</para>
+      &man.rc.8; 和 &man.rc.subr.8; 联机手册中找到。
+      如果您有意撰写自己的 <filename>rc.d</filename> 脚本,
+      或对现有的脚本进行一些改进, 也可以参考
+      <ulink url="&url.articles.rc-scripting">这篇文章</ulink>。</para>
   </sect1>
 
   <sect1 id="config-network-setup">

==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/eresources/chapter.sgml#5 (text+ko) ====

@@ -2,8 +2,8 @@
      The FreeBSD Documentation Project
      The FreeBSD Simplified Chinese Project
 
-     Original Revision: 1.178
-     $FreeBSD: doc/zh_CN.GB2312/books/handbook/eresources/chapter.sgml,v 1.6 2006/10/08 16:13:05 delphij Exp $
+     Original Revision: 1.181
+     $FreeBSD: doc/zh_CN.GB2312/books/handbook/eresources/chapter.sgml,v 1.7 2006/10/27 06:37:47 delphij Exp $
 -->
 
 <appendix id="eresources">
@@ -241,6 +241,12 @@
 	    </row>
 
 	    <row>
+	      <entry>&a.eol.name;</entry>
+	      <entry>关于与 FreeBSD 有关, 但已不再为 FreeBSD Project
+		所维护的软件的互助支持。</entry>
+	    </row>
+
+	    <row>
 	      <entry>&a.emulation.name;</entry>
 	      <entry>在 FreeBSD 上模拟其它系统, 如
 		Linux/&ms-dos;/&windows;</entry>
@@ -450,6 +456,11 @@
 	    </row>
 
 	    <row>
+	      <entry>&a.sun4v.name;</entry>
+	      <entry>将 FreeBSD 移植到基于 &ultrasparc; T1 的系统上</entry>
+	    </row>
+
+	    <row>
 	      <entry>&a.threads.name;</entry>
 	      <entry>线程</entry>
 	    </row>
@@ -881,6 +892,18 @@
 	</varlistentry>
 
 	<varlistentry>
+	  <term>&a.eol.name;</term>
+
+	  <listitem>
+	    <para><emphasis>关于与 FreeBSD 有关, 但已不再为 FreeBSD Project
+	      所维护的软件的互助支持。</emphasis></para>
+
+	    <para>这个邮件列表主要用于那些有兴趣提供或使用针对已不再为 FreeBSD Project
+	      官方所支持 (例如, 以安全更新或补丁的形式) 的 FreeBSD 相关软件的用户或公司讨论。</para>
+	  </listitem>
+	</varlistentry>
+
+	<varlistentry>
 	  <term>&a.firewire.name;</term>
 
 	  <listitem>

==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml#8 (text+ko) ====

@@ -2,8 +2,8 @@
      The FreeBSD Documentation Project
      The FreeBSD Simplified Chinese Project
 
-     Original Revision: 1.72
-     $FreeBSD: doc/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml,v 1.9 2006/10/08 16:16:16 delphij Exp $
+     Original Revision: 1.73
+     $FreeBSD: doc/zh_CN.GB2312/books/handbook/firewalls/chapter.sgml,v 1.10 2006/10/27 06:37:47 delphij Exp $
 -->
 
 <chapter id="firewalls">
@@ -1963,8 +1963,7 @@
     <sect2 id="firewalls-ipfw-rc">
       <title><filename>/etc/rc.conf</filename> Options</title>
 
-      <para>如果没有将 IPFW 编入内核, 则您需要在
-	<filename>/etc/rc.conf</filename> 中加入下列语句来加载它:</para>
+      <para>启用防火墙:</para>
 
       <programlisting>firewall_enable="YES"</programlisting>
 

==== //depot/projects/dtrace/doc/zh_CN.GB2312/books/handbook/geom/chapter.sgml#5 (text+ko) ====

@@ -2,8 +2,8 @@
      The FreeBSD Documentation Project
      The FreeBSD Simplified Chinese Project
 
-     Original Revision: 1.24
-     $FreeBSD: doc/zh_CN.GB2312/books/handbook/geom/chapter.sgml,v 1.4 2006/07/20 10:59:28 delphij Exp $
+     Original Revision: 1.25
+     $FreeBSD: doc/zh_CN.GB2312/books/handbook/geom/chapter.sgml,v 1.5 2006/10/27 06:37:47 delphij Exp $
 -->
 

>>> TRUNCATED FOR MAIL (1000 lines) <<<



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200610292137.k9TLbHcL029855>