Author: timtas
Date: Sat Apr  4 04:12:09 2020
New Revision: 22947

Log:
Update to dhcpcd-9.0.0.

Modified:
   trunk/BOOK/introduction/welcome/changelog.xml
   trunk/BOOK/networking/connect/dhcpcd.xml
   trunk/BOOK/packages.ent
   trunk/BOOK/postlfs/config/users.xml
   trunk/bootscripts/blfs/services/dhcpcd

Modified: trunk/BOOK/introduction/welcome/changelog.xml
==============================================================================
--- trunk/BOOK/introduction/welcome/changelog.xml       Sat Apr  4 02:48:50 
2020        (r22946)
+++ trunk/BOOK/introduction/welcome/changelog.xml       Sat Apr  4 04:12:09 
2020        (r22947)
@@ -45,6 +45,10 @@
       <para>April 4th, 2020</para>
       <itemizedlist>
         <listitem>
+          <para>[timtas] - Update to dhcpcd-9.0.0. Fixes
+          <ulink url="&blfs-ticket-root;13352">#13352</ulink>.</para>
+        </listitem>
+        <listitem>
           <para>[ken] - Use firefox-68.6.1 for JS68. Addresses
           <ulink url="&blfs-ticket-root;13355">#13355</ulink>.</para>
         </listitem>

Modified: trunk/BOOK/networking/connect/dhcpcd.xml
==============================================================================
--- trunk/BOOK/networking/connect/dhcpcd.xml    Sat Apr  4 02:48:50 2020        
(r22946)
+++ trunk/BOOK/networking/connect/dhcpcd.xml    Sat Apr  4 04:12:09 2020        
(r22947)
@@ -6,9 +6,9 @@
 
   <!ENTITY dhcpcd-download-http 
"https://roy.marples.name/downloads/dhcpcd/dhcpcd-&dhcpcd-version;.tar.xz";>
   <!ENTITY dhcpcd-download-ftp  
"ftp://roy.marples.name/pub/dhcpcd/dhcpcd-&dhcpcd-version;.tar.xz";>
-  <!ENTITY dhcpcd-md5sum        "e1eea03388d12c9ad21ecd7c135fdf8b">
-  <!ENTITY dhcpcd-size          "224 KB">
-  <!ENTITY dhcpcd-buildsize     "2.6 MB (with tests)">
+  <!ENTITY dhcpcd-md5sum        "5360da47d4d51280dae35fe91958b63a">
+  <!ENTITY dhcpcd-size          "240 KB">
+  <!ENTITY dhcpcd-buildsize     "2.8 MB (with tests)">
   <!ENTITY dhcpcd-time          "less than 0.1 SBU (with tests)">
 ]>
 
@@ -92,12 +92,29 @@
     <title>Installation of dhcpcd</title>
 
     <para>
+      recent <application>dhcpcd</application> implements privilege separation.
+      Additional installation steps are necessary to set up
+      the proper environment, which are performed by issuing the following
+      commands as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>install  -v -m700 -d /var/lib/dhcpcd &amp;&amp;
+
+groupadd -g 52 dhcpcd        &amp;&amp;
+useradd  -c 'dhcpcd PrivSep' \
+         -d /var/lib/dhcpcd  \
+         -g dhcpcd           \
+         -s /bin/false     \
+         -u 52 dhcpcd &amp;&amp;
+chown    -v dhcpcd:dhcpcd /var/lib/dhcpcd </userinput></screen>
+
+    <para>
       Install <application>dhcpcd</application> by running the following
       commands:
     </para>
 
 <screen><userinput>./configure --libexecdir=/lib/dhcpcd \
-            --dbdir=/var/lib/dhcpcd  &amp;&amp;
+            --dbdir=/var/lib/dhcpcd  --privsepuser=dhcpcd &amp;&amp;
 make</userinput></screen>
 
     <para>
@@ -182,6 +199,18 @@
 <screen role='root'><userinput>make install-service-dhcpcd</userinput></screen>
 
       <note>
+        <para id="dhcpcd-config6">
+          the network service script <filename>/lib/services/dhcpcd</filename>
+          contained in bootscripts up to blfs-bootscripts-20191204 is
+          not compatible with latest dhcpcd, as the location of the pidfile
+          changed.
+          To work around this, issue the following command:
+
+<screen role='root'><userinput>sed -i "s;/run/dhcpcd-;/run/dhcpcd/;g" 
/lib/services/dhcpcd</userinput></screen>
+        </para>
+      </note>
+
+      <note>
         <para id="dhcpcd-config3">
           The default for <command>dhcpcd</command> is to set the hostname
           and mtu. It also overwrites <filename>/etc/resolv.conf </filename>

Modified: trunk/BOOK/packages.ent
==============================================================================
--- trunk/BOOK/packages.ent     Sat Apr  4 02:48:50 2020        (r22946)
+++ trunk/BOOK/packages.ent     Sat Apr  4 04:12:09 2020        (r22947)
@@ -563,7 +563,7 @@
 <!-- Part IV -->
 <!-- Chapter 14 -->
 <!--<!ENTITY ppp-version                  "2.4.5">-->
-<!ENTITY dhcpcd-version               "8.1.6">
+<!ENTITY dhcpcd-version               "9.0.0">
 <!ENTITY dhcp-version                 "4.4.2">
 
 <!-- Chapter 15 -->

Modified: trunk/BOOK/postlfs/config/users.xml
==============================================================================
--- trunk/BOOK/postlfs/config/users.xml Sat Apr  4 02:48:50 2020        (r22946)
+++ trunk/BOOK/postlfs/config/users.xml Sat Apr  4 04:12:09 2020        (r22947)
@@ -111,6 +111,7 @@
         <row><entry>rsyncd  </entry><entry>48</entry><entry>48</entry></row>
         <row><entry>sshd    </entry><entry>50</entry><entry>50</entry></row>
         <row><entry>stunnel </entry><entry>51</entry><entry>51</entry></row>
+        <row><entry>dhcpcd  </entry><entry>52</entry><entry>51</entry></row>
         <row><entry>svn     </entry><entry>56</entry><entry>56</entry></row>
         <row><entry>svntest </entry><entry>  </entry><entry>57</entry></row>
         <!-- <row><entry>pulse   
</entry><entry>58</entry><entry>58</entry></row>

Modified: trunk/bootscripts/blfs/services/dhcpcd
==============================================================================
--- trunk/bootscripts/blfs/services/dhcpcd      Sat Apr  4 02:48:50 2020        
(r22946)
+++ trunk/bootscripts/blfs/services/dhcpcd      Sat Apr  4 04:12:09 2020        
(r22947)
@@ -14,19 +14,30 @@
 . /lib/lsb/init-functions
 . $IFCONFIG
 
-pidfile="/var/run/dhcpcd-$1.pid"
+pidfile_old="/var/run/dhcpcd-$1.pid"
+pidfile_new="/var/run/dhcpcd/$1.pid"
 
 case "$2" in
     up)
        log_info_msg "Starting dhcpcd on the $1 interface..."
 
+       # Test to see if there is a stale pid file, for versions before 9.0.0
+       if [ -f "$pidfile_old" ]; then
+          ps `cat "$pidfile_old"` | grep dhcpcd > /dev/null
+
+          if [ $? != 0 ]; then
+             rm -f $pidfile_old > /dev/null
+          else
+             log_warning_msg "dhcpcd is already running!"
+             exit 2
+          fi
+       fi
        # Test to see if there is a stale pid file
-       if [ -f "$pidfile" ]; then
-          ps `cat "$pidfile"` | grep dhcpcd > /dev/null
+       if [ -f "$pidfile_new" ]; then
+          ps `cat "$pidfile_new"` | grep dhcpcd > /dev/null
 
           if [ $? != 0 ]; then
-             rm -f /var/run/dhcpcd-$1.pid > /dev/null
-          
+             rm -f $pidfile_new > /dev/null
           else
              log_warning_msg "dhcpcd is already running!"
              exit 2
@@ -41,8 +52,11 @@
        log_info_msg "Stopping dhcpcd on the $1 interface..."
 
        if [ -z "$DHCP_STOP" ]; then
-          killproc -p "${pidfile}" /sbin/dhcpcd
-
+          if [ -f "${pidfile_old}" ]; then
+             killproc -p "${pidfile}" /sbin/dhcpcd
+          elif [ -f "${pidfile_new}" ]; then
+             killproc -p "${pidfile_new}" /sbin/dhcpcd
+          fi
        else
           /sbin/dhcpcd $1 $DHCP_STOP &> /dev/null
 
-- 
http://lists.linuxfromscratch.org/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to