Author: xry111 Date: Wed Jan 13 00:44:28 2021 New Revision: 12093 Log: use /run for runtime state directories
Modified: trunk/BOOK/bootscripts/ChangeLog trunk/BOOK/bootscripts/lfs/init.d/cleanfs trunk/BOOK/bootscripts/lfs/init.d/rc trunk/BOOK/bootscripts/lfs/lib/services/init-functions trunk/BOOK/chapter01/changelog.xml trunk/BOOK/chapter07/createfiles.xml trunk/BOOK/chapter07/util-linux.xml trunk/BOOK/chapter08/systemd.xml trunk/BOOK/chapter08/sysvinit.xml trunk/BOOK/chapter08/util-linux.xml trunk/BOOK/chapter09/bootscripts.xml trunk/BOOK/general.ent trunk/BOOK/packages.ent Modified: trunk/BOOK/bootscripts/ChangeLog ============================================================================== --- trunk/BOOK/bootscripts/ChangeLog Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/bootscripts/ChangeLog Wed Jan 13 00:44:28 2021 (r12093) @@ -1,3 +1,6 @@ +2021-01-13 Xi Ruoyao <xry...@mengyan1223.wang> + * Use /run instead of deprecated /var/run + 2020-10-02 DJ Lucas <d...@linuxfromscratch.org> * make $local_fs a Should-Stop dependency of swap to allow clean install Modified: trunk/BOOK/bootscripts/lfs/init.d/cleanfs ============================================================================== --- trunk/BOOK/bootscripts/lfs/init.d/cleanfs Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/bootscripts/lfs/init.d/cleanfs Wed Jan 13 00:44:28 2021 (r12093) @@ -21,8 +21,8 @@ # Default-Start: S # Default-Stop: # Short-Description: Cleans temporary directories early in the boot process. -# Description: Cleans temporary directories /var/run, /var/lock, and -# optionally, /tmp. cleanfs also creates /var/run/utmp +# Description: Cleans temporary directories /run, /var/lock, and +# optionally, /tmp. cleanfs also creates /run/utmp # and any files defined in /etc/sysconfig/createfiles. # X-LFS-Provided-By: LFS ### END INIT INFO @@ -95,11 +95,11 @@ find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1 fi - > /var/run/utmp + > /run/utmp if grep -q '^utmp:' /etc/group ; then - chmod 664 /var/run/utmp - chgrp utmp /var/run/utmp + chmod 664 /run/utmp + chgrp utmp /run/utmp fi (exit ${failed}) Modified: trunk/BOOK/bootscripts/lfs/init.d/rc ============================================================================== --- trunk/BOOK/bootscripts/lfs/init.d/rc Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/bootscripts/lfs/init.d/rc Wed Jan 13 00:44:28 2021 (r12093) @@ -142,7 +142,7 @@ [ "${interactive}" != "i" ] && interactive="" # Read the state file if it exists from runlevel S -[ -r /var/run/interactive ] && source /var/run/interactive +[ -r /run/interactive ] && source /run/interactive # Attempt to stop all services started by the previous runlevel, # and killed in this runlevel @@ -217,9 +217,9 @@ # Store interactive variable on switch from runlevel S and remove if not if [ "${runlevel}" == "S" -a "${interactive}" == "i" ]; then - echo "interactive=\"i\"" > /var/run/interactive + echo "interactive=\"i\"" > /run/interactive else - rm -f /var/run/interactive 2> /dev/null + rm -f /run/interactive 2> /dev/null fi # Copy the boot log on initial boot only Modified: trunk/BOOK/bootscripts/lfs/lib/services/init-functions ============================================================================== --- trunk/BOOK/bootscripts/lfs/lib/services/init-functions Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/bootscripts/lfs/lib/services/init-functions Wed Jan 13 00:44:28 2021 (r12093) @@ -358,8 +358,8 @@ prefix=`echo "${program}" | sed 's/[^/]*$//'` progname=`echo "${program}" | sed "s@${prefix}@@"` - if [ -e "/var/run/${progname}.pid" ]; then - rm -f "/var/run/${progname}.pid" 2> /dev/null + if [ -e "/run/${progname}.pid" ]; then + rm -f "/run/${progname}.pid" 2> /dev/null fi else if [ -e "${pidfile}" ]; then rm -f "${pidfile}" 2> /dev/null; fi @@ -434,8 +434,8 @@ fi # If a PID file exists with that name, assume that is it. - if [ -e "/var/run/${progname}.pid" ]; then - pidfile="/var/run/${progname}.pid" + if [ -e "/run/${progname}.pid" ]; then + pidfile="/run/${progname}.pid" fi fi @@ -528,9 +528,9 @@ /bin/echo -e "${INFO}${base} is running with Process" \ "ID(s) ${pidlist}.${NORMAL}" else - if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then + if [ -n "${base}" -a -e "/run/${base}.pid" ]; then /bin/echo -e "${WARNING}${1} is not running but" \ - "/var/run/${base}.pid exists.${NORMAL}" + "/run/${base}.pid exists.${NORMAL}" else if [ -n "${pidfile}" -a -e "${pidfile}" ]; then /bin/echo -e "${WARNING}${1} is not running" \ Modified: trunk/BOOK/chapter01/changelog.xml ============================================================================== --- trunk/BOOK/chapter01/changelog.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter01/changelog.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -43,6 +43,22 @@ appropriate for the entry or if needed the entire day's listitem. --> <listitem> + <para>2021-01-13</para> + <itemizedlist> + <listitem revision="systemd"> + <para>[xry111] - Fix util-linux uuidd socket path.</para> + </listitem> + <listitem> + <para>[xry111] - Remove various references to deprecated + /var/run, use /run insteadly.</para> + </listitem> + <listitem revision="sysv"> + <para>[xry111] - Update to lfs-bootscripts-20210113.</para> + </listitem> + </itemizedlist> + </listitem> + + <listitem> <itemizedlist> <para>2021-01-01</para> <listitem> Modified: trunk/BOOK/chapter07/createfiles.xml ============================================================================== --- trunk/BOOK/chapter07/createfiles.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter07/createfiles.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -19,7 +19,7 @@ </indexterm> <indexterm zone="ch-tools-createfiles"> - <primary sortas="e-/var/run/utmp">/var/run/utmp</primary> + <primary sortas="e-/run/utmp">/run/utmp</primary> </indexterm> <indexterm zone="ch-tools-createfiles"> @@ -69,7 +69,7 @@ <literal>root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/dev/null:/bin/false daemon:x:6:6:Daemon User:/dev/null:/bin/false -messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/bin/false systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false Modified: trunk/BOOK/chapter07/util-linux.xml ============================================================================== --- trunk/BOOK/chapter07/util-linux.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter07/util-linux.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -58,7 +58,8 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python</userinput></screen> + --without-python \ + runstatedir=/run</userinput></screen> <variablelist> <title>The meaning of the configure options:</title> @@ -90,6 +91,15 @@ </listitem> </varlistentry> + <varlistentry> + <term><parameter>runstatedir=/run</parameter></term> + <listitem> + <para>This switch sets the location of the socket used by + <command>uuidd</command> and + <filename class="libraryfile">libuuid</filename> correctly.</para> + </listitem> + </varlistentry> + </variablelist> <para>Compile the package:</para> Modified: trunk/BOOK/chapter08/systemd.xml ============================================================================== --- trunk/BOOK/chapter08/systemd.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter08/systemd.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -472,7 +472,7 @@ <term><command>runlevel</command></term> <listitem> <para>Outputs the previous and the current run-level, as noted in the - last run-level record in <filename>/var/run/utmp</filename></para> + last run-level record in <filename>/run/utmp</filename></para> <indexterm zone="ch-system-systemd runlevel"> <primary sortas="b-runlevel">runlevel</primary> </indexterm> Modified: trunk/BOOK/chapter08/sysvinit.xml ============================================================================== --- trunk/BOOK/chapter08/sysvinit.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter08/sysvinit.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -185,7 +185,7 @@ <term><command>runlevel</command></term> <listitem> <para>Reports the previous and the current run-level, as noted in the - last run-level record in <filename>/var/run/utmp</filename></para> + last run-level record in <filename>/run/utmp</filename></para> <indexterm zone="ch-system-sysvinit runlevel-sysv"> <primary sortas="b-runlevel">runlevel</primary> </indexterm> Modified: trunk/BOOK/chapter08/util-linux.xml ============================================================================== --- trunk/BOOK/chapter08/util-linux.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter08/util-linux.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -76,7 +76,8 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python</userinput></screen> + --without-python \ + runstatedir=/run</userinput></screen> <para>The --disable and --without options prevent warnings about building components that require packages not in LFS or are Modified: trunk/BOOK/chapter09/bootscripts.xml ============================================================================== --- trunk/BOOK/chapter09/bootscripts.xml Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/chapter09/bootscripts.xml Wed Jan 13 00:44:28 2021 (r12093) @@ -85,9 +85,9 @@ <term><command>cleanfs</command></term> <listitem> <para>Removes files that should not be preserved between reboots, such - as those in <filename class="directory">/var/run/</filename> and + as those in <filename class="directory">/run/</filename> and <filename class="directory">/var/lock/</filename>; it re-creates - <filename>/var/run/utmp</filename> and removes the possibly present + <filename>/run/utmp</filename> and removes the possibly present <filename>/etc/nologin</filename>, <filename>/fastboot</filename>, and <filename>/forcefsck</filename> files</para> <indexterm zone="ch-config-bootscripts cleanfs-bootscripts"> Modified: trunk/BOOK/general.ent ============================================================================== --- trunk/BOOK/general.ent Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/general.ent Wed Jan 13 00:44:28 2021 (r12093) @@ -1,13 +1,13 @@ -<!ENTITY version "SVN-20210101"> +<!ENTITY version "SVN-20210113"> <!ENTITY short-version "svn"> <!-- Used below in &blfs-book; Change to x.y for release but not -rc releases --> <!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" --> -<!ENTITY versiond "20210101-systemd"> +<!ENTITY versiond "20210113-systemd"> <!ENTITY short-versiond "systemd"> <!ENTITY generic-versiond "systemd"> -<!ENTITY releasedate "January 1st, 2021"> +<!ENTITY releasedate "January 13th, 2021"> <!ENTITY copyrightdate "1999-2021"><!-- jhalfs needs a literal dash, not – --> Modified: trunk/BOOK/packages.ent ============================================================================== --- trunk/BOOK/packages.ent Mon Jan 11 14:31:07 2021 (r12092) +++ trunk/BOOK/packages.ent Wed Jan 13 00:44:28 2021 (r12093) @@ -375,7 +375,7 @@ <!ENTITY less-fin-du "4.1 MB"> <!ENTITY less-fin-sbu "less than 0.1 SBU"> -<!ENTITY lfs-bootscripts-version "20201019"> <!-- Scripts depend on this format --> +<!ENTITY lfs-bootscripts-version "20210113"> <!-- Scripts depend on this format --> <!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB"> <!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz"> <!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM"> -- http://lists.linuxfromscratch.org/listinfo/lfs-book FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page