Author: ken
Date: 2011-11-30 22:09:32 -0700 (Wed, 30 Nov 2011)
New Revision: 9044
Modified:
trunk/BOOK/general.ent
trunk/BOOK/introduction/welcome/changelog.xml
trunk/BOOK/networking/connect/dhcp-client.xml
trunk/BOOK/networking/connect/dhcp.xml
Log:
Update to dhcp-4.2.3
Modified: trunk/BOOK/general.ent
===================================================================
--- trunk/BOOK/general.ent 2011-11-30 22:23:49 UTC (rev 9043)
+++ trunk/BOOK/general.ent 2011-12-01 05:09:32 UTC (rev 9044)
@@ -3,13 +3,13 @@
$Date$
-->
-<!ENTITY day "30"> <!-- Always 2 digits -->
-<!ENTITY month "11"> <!-- Always 2 digits -->
+<!ENTITY day "01"> <!-- Always 2 digits -->
+<!ENTITY month "12"> <!-- Always 2 digits -->
<!ENTITY year "2011">
<!ENTITY copyrightdate "2001-&year;">
<!ENTITY copyholder "The BLFS Development Team">
<!ENTITY version "&year;-&month;-&day;">
-<!ENTITY releasedate "November 28th, &year;">
+<!ENTITY releasedate "December 1st, &year;">
<!-- <!ENTITY releasedate "November &day;st, &year;"> -->
<!ENTITY pubdate "&year;-&month;-&day;"> <!-- metadata req. by TLDP -->
<!ENTITY blfs-version "svn"> <!-- svn|[release #] -->
@@ -420,7 +420,7 @@
<!ENTITY wvdial-version "1.54.0">
<!-- Chapter 14 -->
-<!ENTITY dhcp-version "3.0.6">
+<!ENTITY dhcp-version "4.2.3">
<!ENTITY dhcpcd-version "5.2.12">
<!-- Chapter 15 -->
Modified: trunk/BOOK/introduction/welcome/changelog.xml
===================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml 2011-11-30 22:23:49 UTC
(rev 9043)
+++ trunk/BOOK/introduction/welcome/changelog.xml 2011-12-01 05:09:32 UTC
(rev 9044)
@@ -42,6 +42,15 @@
-->
<listitem>
+ <para>December 1st, 2011</para>
+ <itemizedlist>
+ <listitem>
+ <para>[ken] - Updated dhcp to 4.2.3.</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
+ <listitem>
<para>November 30th, 2011</para>
<itemizedlist>
<listitem>
Modified: trunk/BOOK/networking/connect/dhcp-client.xml
===================================================================
--- trunk/BOOK/networking/connect/dhcp-client.xml 2011-11-30 22:23:49 UTC
(rev 9043)
+++ trunk/BOOK/networking/connect/dhcp-client.xml 2011-12-01 05:09:32 UTC
(rev 9044)
@@ -37,7 +37,7 @@
<para id="dhclient-service">To configure <command>dhclient</command>,
you need to first install the network service script,
- <filename>/etc/sysconfig/network-devices/services/dhclient</filename>
+ <filename>/lib/services/dhclient</filename>
included in the <xref linkend="bootscripts"/> package
(as <systemitem class="username">root</systemitem>):</para>
@@ -48,21 +48,22 @@
<screen role='root'><userinput>make
install-service-dhclient</userinput></screen>
<para id="dhclient-config1">Next, create the
- <filename>/etc/sysconfig/network-devices/ifconfig.eth0/dhclient</filename>
+ <filename>/etc/sysconfig/ifconfig.eth0/dhclient</filename>
configuration file with the following commands as the <systemitem
class="username">root</systemitem> user. Adjust as
necessary for additional interfaces:</para>
<indexterm zone="dhcp-client dhclient-config1">
- <primary
sortas="e-etc-sysconfig-...-dhclient">/etc/sysconfig/.../dhclient</primary>
+ <primary
sortas="e-etc-sysconfig-...-dhclient">/etc/sysconfig/ifconfig.eth0</primary>
</indexterm>
-<screen role='root'><userinput>install -v -d
/etc/sysconfig/network-devices/ifconfig.eth0 &&
-cat > /etc/sysconfig/network-devices/ifconfig.eth0/dhclient << "EOF"
+<screen role='root'><userinput>install -v -d /etc/sysconfig/ifconfig.eth0
&&
+cat > /etc/sysconfig/ifconfig.eth0/dhclient << "EOF"
<literal>ONBOOT="yes"
+IFACE="eth0"
SERVICE="dhclient"
-DHCP_START="-q <replaceable><add additional start parameters
here></replaceable>"
-DHCP_STOP="-q -r <replaceable><add additional stop parameters
here></replaceable>"
+DHCP_START="<replaceable><add additional start parameters
here></replaceable> eth0"
+DHCP_STOP="-r <replaceable><add additional stop parameters
here></replaceable>"
# Set PRINTIP="yes" to have the script print
# the DHCP assigned IP address
Modified: trunk/BOOK/networking/connect/dhcp.xml
===================================================================
--- trunk/BOOK/networking/connect/dhcp.xml 2011-11-30 22:23:49 UTC (rev
9043)
+++ trunk/BOOK/networking/connect/dhcp.xml 2011-12-01 05:09:32 UTC (rev
9044)
@@ -3,12 +3,14 @@
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
- <!ENTITY dhcp-download-http
"http://gd.tuwien.ac.at/infosys/servers/isc/dhcp/dhcp-&dhcp-version;.tar.gz">
- <!ENTITY dhcp-download-ftp
"ftp://ftp.isc.org/isc/dhcp/dhcp-&dhcp-version;.tar.gz">
- <!ENTITY dhcp-md5sum "724bad21ad8b638abadd5fcc07df1a0f">
- <!ENTITY dhcp-size "876 KB">
- <!ENTITY dhcp-buildsize "21 MB">
- <!ENTITY dhcp-time "0.1 SBU">
+ <!-- isc have a weird way of offering the tarballs and without dots in
version!
+ FIXME - change hardcoded 423s in http url and version in ftp when
upgrading -->
+ <!ENTITY dhcp-download-http
"http://www.isc.org/software/dhcp/423/download/dhcp-423targz?download=">
+ <!ENTITY dhcp-download-ftp
"ftp://ftp.isc.org/isc/dhcp/4.2.3/dhcp-&dhcp-version;.tar.gz">
+ <!ENTITY dhcp-md5sum "a06649ec5336d284fc86a0232c0edd63">
+ <!ENTITY dhcp-size "9.1 MB">
+ <!ENTITY dhcp-buildsize "185 MB (client and server), 140MB client only,
172MB server only">
+ <!ENTITY dhcp-time "0.7 SBU (client and server, or server), 0.6 SBU client
only ">
]>
<sect1 id="dhcp" xreflabel="DHCP-&dhcp-version;">
@@ -34,6 +36,8 @@
network addresses. <command>dhcpd</command> (the server) is useful for
assigning network addresses on your private network.</para>
+ &lfs70_checked;
+
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
@@ -59,21 +63,20 @@
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing='compact'>
<listitem>
- <para>Required Patch:
- <ulink
url="&patch-root;/dhcp-&dhcp-version;-client_dns-1.patch"/></para>
+ <para>Recommended Patch (for client):
+ <ulink url="&patch-root;/dhcp-&dhcp-version;-iproute2-1.patch"/></para>
</listitem>
<listitem>
<para>Optional Patch:
- <ulink url="&patch-root;/dhcp-&dhcp-version;-iproute2-1.patch"/></para>
+ <ulink
url="&patch-root;/dhcp-&dhcp-version;-missing_ipv6-1.patch"/></para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">DHCP Dependencies</bridgehead>
<bridgehead renderas="sect4">Required</bridgehead>
- <para role="required"><xref linkend="net-tools"/> (you may omit
- <application>net-tools</application> by using the optional patch
- to utilize <application>iproute2</application>.</para>
+ <para role="required"><xref linkend="net-tools"/> is required at runtime
+ by <command>dhclient</command> if you do not use the iproute2 patch.</para>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/dhcp"/></para>
@@ -83,9 +86,11 @@
<sect2 role="kernel" id='dhcp-kernel'>
<title>Kernel Configuration</title>
- <para>You must have Packet Socket support (Device Drivers ⇒ Networking
+ <para>You must have Packet Socket support (Networking
Support ⇒ Networking Options ⇒ Packet Socket) compiled into
- the kernel.</para>
+ the kernel. If you do not have IPv6 support (Networking Support ⇒
+ Networking Options ⇒ The IPv6 Protocol) compiled in, then you
+ must use the missing_ipv6 patch.</para>
<indexterm zone="dhcp dhcp-kernel">
<primary sortas="d-dhcp">DHCP</primary>
@@ -96,38 +101,95 @@
<sect2 role="installation">
<title>Installation of DHCP</title>
- <para>First fix a problem with always regenerating
- /etc/resolv.conf whether the DNS server has changed or not.</para>
+ <para>If you have not compiled IPv6 support into the kernel, apply the
+ missing_ipv6 patch</para>
-<screen><userinput>patch -Np1 -i
../dhcp-&dhcp-version;-client_dns-1.patch</userinput></screen>
+<screen><userinput>patch -Np1 -i
../dhcp-&dhcp-version;-missing_ipv6-1.patch</userinput></screen>
- <para>If you chose not to install net-tools, apply the
- iproute2 patch:</para>
+ <para>If you are installing the client, apply the iproute2 patch unless you
+ will have installed <application>net-tools</application> by the time you
wish
+ to use the client:</para>
<screen><userinput>patch -Np1 -i
../dhcp-&dhcp-version;-iproute2-1.patch</userinput></screen>
<para>Install <application>DHCP</application> by running
the following commands:</para>
-<screen><userinput>./configure &&
-make</userinput></screen>
+<screen><userinput>sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%'
server/Makefile.in &&
+./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+ --sbindir=/sbin \
+ --with-srv-lease-file=/var/state/dhcp/dhcpd.leases \
+ --with-srv6-lease-file=/var/state/dhcp/dhcpd6.leases \
+ --with-cli-lease-file=/var/state/dhclient.leases \
+ --with-cli6-lease-file=/var/state/dhclient6.leases &&
+sed -i 's/-Werror//'
{client,common,dst,omapip,relay,server,tests}/Makefile</userinput></screen>
- <para>This package does not come with a test suite.</para>
+ <para>If you only wish to build the server, enter:</para>
+<screen><userinput>sed -i 's/ client//' Makefile</userinput></screen>
+ <para>If you only wish to build the client, enter:</para>
+<screen><userinput>sed -i 's/ dhcpctl relay server//'
Makefile</userinput></screen>
+
+ <para>Build your chosen variant(s) with:</para>
+<screen><userinput>make</userinput></screen>
+
+ <para>To test the results, issue: <command>make check</command></para>
+
<para>Now, as the <systemitem class="username">root</systemitem>
user:</para>
-<screen role="root"><userinput>make LIBDIR=/usr/lib INCDIR=/usr/include
install</userinput></screen>
+<screen role="root"><userinput>make install</userinput></screen>
+ <para>The supplied <filename>/etc/dhcpd.conf</filename> (server) and
+ <filename>/etc/dhclient.conf</filename> (client) are examples for a
+ specific <literal>BSD</literal> system. They are unlikely to be appropriate
+ to your needs, but you may wish to read them for ideas before deleting them
+ or moving them to a different location.</para>
+
+ <para>Now create the director(y,ies) for the leases.</para>
+
+ <para>For the server:</para>
+
+<screen role="root"><userinput>mkdir -pv /var/state/dhcp</userinput></screen>
+
+ <para>For the client:</para>
+<screen role="root"><userinput>mkdir -pv /var/state</userinput></screen>
+
</sect2>
<sect2 role="commands">
<title>Command Explanations</title>
- <para><parameter>LIBDIR=/usr/lib INCDIR=/usr/include</parameter>: This
- command installs the library and include files in
- <filename class="directory">/usr</filename> instead of
- <filename class="directory">/usr/local</filename>.</para>
+ <para><command>sed -i 's%\(^sbindir =\).*%\1 @prefix@@sbindir@%'
server/Makefile.in</command>
+ This command moves the <command>dhcp</command> program to
+ <filename class='directory'>/usr/sbin</filename> instead of
+ <filename class='directory'>/sbin</filename> because it is not needed
+ while the server is booting.</para>
+ <para><command>--sbindir=/sbin</command> The <command>dhclient</command>
+ program is moved to <filename class='directory'>/sbin</filename> instead of
+ <filename class='directory'>/usr/sbin</filename> so that it is available
+ during boot, e.g. if <filename class='directory'>/usr</filename> is to be
+ an <literal>nfs</literal> mount.</para>
+
+ <para><command>--with-*-lease-files=...</command> By default, lease files
+ are placed in <filename class='directory'>/var/db</filename> which is an
+ anachronism.</para>
+
+ <para><command>sed -i 's/-Werror//' {client,common,...}/Makefile</command>
-
+ the Makefiles in this package add <literal>-Werror</literal> to the
+ <literal>CFLAGS</literal>. On recent versions of
<application>gcc</application>
+ more things, particularly unused variables, create warnings. The
+ <literal>-Werror</literal> flag causes warnings to break the build, so we
+ remove it where necessary.</para>
+
+ <para><command>sed -i 's/ something//' Makefile</command> - this stops the
+ build from entering the director(y,ies) named here.</para>
+
+ <para><option>rm -v /usr/lib/lib{dhcpctl,dst,omapi}.a</option> - there is
+ no easy way to prevent these static libraries being installed, but they are
+ only needed during the build of this package.
<filename>libdhcpctl.a</filename>
+ is only installed if you build the server.</para>
+
</sect2>
<sect2 role="configuration">
@@ -184,7 +246,6 @@
<screen role="root"><userinput>cat > /etc/dhcpd.conf << "EOF"
<literal>default-lease-time 72000;
max-lease-time 144000;
-ddns-update-style ad-hoc;
subnet <replaceable><192.168.5.0></replaceable> netmask
<replaceable><255.255.255.0></replaceable> {
range <replaceable><192.168.5.10> <192.168.5.240></replaceable>;
@@ -209,7 +270,7 @@
<seglistitem>
<seg>dhcpd, dhcrelay, dhclient, dhclient-script, and omshell</seg>
- <seg>bdhcpctl.a, libomapi.a</seg>
+ <seg>libbdhcpctl.a, libdst.a, libomapi.a</seg>
<seg>/var/state/dhcp, /usr/include/omapip, and
/usr/include/isi-dhcp</seg>
</seglistitem>
</segmentedlist>
@@ -229,6 +290,17 @@
</listitem>
</varlistentry>
+ <varlistentry id="dhclient-script">
+ <term><command>dhclient-script</command></term>
+ <listitem>
+ <para>is used by dhclient to (re)configure interfaces. It can make
+ extra changes by invoking custom dhclient-{entry,exit}-hooks.</para>
+ <indexterm zone="dhcp dhclient-script">
+ <primary sortas="b-dhclient-script">dhclient-script</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
<varlistentry id="dhcpd">
<term><command>dhcpd</command></term>
<listitem>
--
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page