PERFORCE change 108698 for review
John Birrell
jb at FreeBSD.org
Sun Oct 29 21:37:20 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=108698
Change 108698 by jb at 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 <bsd.port.pre.mk>
+
+.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 <bsd.port.pre.mk>
+
+.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 <bsd.port.pre.mk>
+
+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) <<<
More information about the p4-projects
mailing list