aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-01-13 08:44:28 +0000
committerXi Ruoyao <xry111@mengyan1223.wang>2021-01-13 08:44:28 +0000
commit02776dffe135111ad7080784e6d00a83f8396bb8 (patch)
treeaefbd76972283fd0aed1007f473a7bc6c4eb3011
parenta892a142e5d2e0c3f7a37ff6c28a552f6a7bceb8 (diff)
use /run for runtime state directories
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@12093 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
-rw-r--r--bootscripts/ChangeLog3
-rw-r--r--bootscripts/lfs/init.d/cleanfs10
-rw-r--r--bootscripts/lfs/init.d/rc6
-rw-r--r--bootscripts/lfs/lib/services/init-functions12
-rw-r--r--chapter01/changelog.xml16
-rw-r--r--chapter07/createfiles.xml4
-rw-r--r--chapter07/util-linux.xml12
-rw-r--r--chapter08/systemd.xml2
-rw-r--r--chapter08/sysvinit.xml2
-rw-r--r--chapter08/util-linux.xml3
-rw-r--r--chapter09/bootscripts.xml4
-rw-r--r--general.ent6
-rw-r--r--packages.ent2
13 files changed, 56 insertions, 26 deletions
diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog
index 03330e3d0..fd43c1222 100644
--- a/bootscripts/ChangeLog
+++ b/bootscripts/ChangeLog
@@ -1,3 +1,6 @@
+2021-01-13 Xi Ruoyao <xry111@mengyan1223.wang>
+ * Use /run instead of deprecated /var/run
+
2020-10-02 DJ Lucas <dj@linuxfromscratch.org>
* make $local_fs a Should-Stop dependency of swap to allow clean install
diff --git a/bootscripts/lfs/init.d/cleanfs b/bootscripts/lfs/init.d/cleanfs
index 2dee92967..bbca3ddf6 100644
--- a/bootscripts/lfs/init.d/cleanfs
+++ b/bootscripts/lfs/init.d/cleanfs
@@ -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 @@ case "${1}" in
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})
diff --git a/bootscripts/lfs/init.d/rc b/bootscripts/lfs/init.d/rc
index f27f5469c..2bc155ed4 100644
--- a/bootscripts/lfs/init.d/rc
+++ b/bootscripts/lfs/init.d/rc
@@ -142,7 +142,7 @@ fi
[ "${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 @@ done
# 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
diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions
index 174657f1f..2e9b15b98 100644
--- a/bootscripts/lfs/lib/services/init-functions
+++ b/bootscripts/lfs/lib/services/init-functions
@@ -358,8 +358,8 @@ killproc()
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 @@ pidofproc()
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 @@ statusproc()
/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" \
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index b167d8a82..12cac6c72 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -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>
diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml
index c5cc7710a..1ae5ef12b 100644
--- a/chapter07/createfiles.xml
+++ b/chapter07/createfiles.xml
@@ -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 @@ EOF</userinput></screen>
<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
diff --git a/chapter07/util-linux.xml b/chapter07/util-linux.xml
index a598cb4bc..7c11642fe 100644
--- a/chapter07/util-linux.xml
+++ b/chapter07/util-linux.xml
@@ -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>
diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml
index a97d73190..2d3e3525e 100644
--- a/chapter08/systemd.xml
+++ b/chapter08/systemd.xml
@@ -472,7 +472,7 @@ meson --prefix=/usr \
<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>
diff --git a/chapter08/sysvinit.xml b/chapter08/sysvinit.xml
index 4a68cc37b..0a13f78e1 100644
--- a/chapter08/sysvinit.xml
+++ b/chapter08/sysvinit.xml
@@ -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>
diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml
index 04bd999e3..61e05a6cf 100644
--- a/chapter08/util-linux.xml
+++ b/chapter08/util-linux.xml
@@ -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
diff --git a/chapter09/bootscripts.xml b/chapter09/bootscripts.xml
index 009590d64..57c6377ff 100644
--- a/chapter09/bootscripts.xml
+++ b/chapter09/bootscripts.xml
@@ -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">
diff --git a/general.ent b/general.ent
index 80f244b9c..28e98fe8d 100644
--- a/general.ent
+++ b/general.ent
@@ -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 &ndash; -->
diff --git a/packages.ent b/packages.ent
index 5eef2e72c..2c13d8ad4 100644
--- a/packages.ent
+++ b/packages.ent
@@ -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">