| Newsgroups |
gmane.linux.lfs.book |
| Message-ID |
<177553126873.21130.18286568437805755412@rivendell.linuxfromscratch.org> |
This is an automated email from the git hooks/post-receive script.
git pushed a commit to branch multilib
in repository lfs.
The following commit(s) were added to refs/heads/multilib by this push:
new b67bea305 Provide OpenRC support.
b67bea305 is described below
commit b67bea305c962bdfba8de53afd050d0e77f051ac
Author: Zeckmathederg <[email protected]>
AuthorDate: Mon Apr 6 21:09:52 2026 -0600
Provide OpenRC support.
This doesn't replace Systemd or SysVinit rendering options.
When going through, I discovered some issues with the main OpenRC branch
which I fixed along the way. There is a UEFI issue I'm embarresed I
didn't notice yet, which was a /boot/efi entry in the /etc/fstab
section. So I will resolve that soon here.
---
Makefile | 12 +-
appendices/dependencies.xml | 108 ++++++------
chapter01/changelog.xml | 18 +-
chapter01/whatsnew.xml | 7 +-
chapter02/creatingpartition.xml | 7 +-
chapter03/introduction.xml | 10 +-
chapter03/packages.xml | 13 +-
chapter07/createfiles.xml | 16 +-
chapter08/chapter08.xml | 15 +-
chapter08/glibc.xml | 6 +-
chapter08/man-db.xml | 4 +-
chapter08/openrc.xml | 356 ++++++++++++++++++++++++++++++++++++++++
chapter08/pkgmgt.xml | 2 +-
chapter08/procps.xml | 2 +-
chapter08/sysklogd.xml | 2 +-
chapter08/udev.xml | 4 +-
chapter08/util-linux.xml | 2 +-
chapter09/chapter09.xml | 11 +-
chapter09/introduction.xml | 89 +++++++---
chapter09/locale.xml | 4 +-
chapter09/network.xml | 91 +++++-----
chapter09/symlinks.xml | 4 +-
chapter09/udev.xml | 6 +-
chapter09/usagerc.xml | 334 +++++++++++++++++++++++++++++++++++++
chapter10/fstab.xml | 2 +-
chapter10/grub.xml | 4 +-
chapter10/kernel.xml | 9 +-
chapter10/kernel/openrc.toml | 23 +++
chapter10/kernel/openrc.xml | 45 +++++
chapter11/reboot.xml | 2 +-
general.ent | 19 ++-
git-version.sh | 41 +++--
lfs-latest-git.php | 1 +
packages.ent | 21 ++-
prologue/bookinfo.xml | 4 +-
prologue/standards.xml | 7 +-
prologue/why.xml | 24 ++-
37 files changed, 1114 insertions(+), 211 deletions(-)
diff --git a/Makefile b/Makefile
index a952348a5..7ad8eab79 100644
--- a/Makefile
+++ b/Makefile
@@ -15,8 +15,10 @@ ifndef REV
endif
ifneq ($(REV), systemd)
- ifneq ($(REV), sysv)
- $(error REV must be 'systemd' (default) or 'sysv'.)
+ ifneq ($(REV), openrc)
+ ifneq ($(REV), sysv)
+ $(error REV must be 'systemd' (default), 'openrc', or 'sysv'.)
+ endif
endif
endif
@@ -26,6 +28,12 @@ ifeq ($(REV), systemd)
NOCHUNKS_OUTPUT ?= MLFS.html
DUMPDIR ?= $(HOME)/mlfs-commands
endif
+ifeq ($(REV), openrc)
+ BASEDIR ?= $(HOME)/public_html/mlfs-openrc
+ PDF_OUTPUT ?= MLFS-OPENRC.pdf
+ NOCHUNKS_OUTPUT ?= MLFS-OPENRC.html
+ DUMPDIR ?= $(HOME)/mlfs-openrc-commands
+endif
ifeq ($(REV), sysv)
BASEDIR ?= $(HOME)/public_html/mlfs-sysv
PDF_OUTPUT ?= MLFS-SYSV.pdf
diff --git a/appendices/dependencies.xml b/appendices/dependencies.xml
index a01fb6eef..4fc856065 100644
--- a/appendices/dependencies.xml
+++ b/appendices/dependencies.xml
@@ -4,7 +4,7 @@
<!ENTITY % general-entities SYSTEM "../general.ent">
%general-entities;
<!-- Convenient entity for "Systemd" or "Udev" -->
- <!ENTITY systemd-udev "<phrase revision='systemd'>Systemd</phrase><phrase revision='sysv'>Udev</phrase>">
+ <!ENTITY systemd-udev "<phrase revision='systemd'>Systemd</phrase><phrase revision='openrc,sysv'>Udev</phrase>">
<!ENTITY bdb "<ulink url='https://www.oracle.com/database/technologies/related/berkeleydb.html'>Berkeley DB</ulink>">
]>
@@ -2414,6 +2414,46 @@
</seglistitem>
</segmentedlist>
+<!-- Begin OpenRC dependency info -->
+ <bridgehead renderas="sect2" id="openrcinit-dep" revision='openrc'>OpenRC</bridgehead>
+
+ <segmentedlist id="openrcinit-depends" revision='openrc'>
+ <segtitle>&dependencies;</segtitle>
+ <seglistitem>
+ <seg>Binutils, GCC, Glibc, Meson, Ninja, and Psmisc</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <segmentedlist id="openrcinit-rundeps" revision='openrc'>
+ <segtitle>&runtime;</segtitle>
+ <seglistitem>
+ <seg>Glibc</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <segmentedlist id="openrcinit-testdeps" revision='openrc'>
+ <segtitle>&testsuites;</segtitle>
+ <seglistitem>
+ <seg>Bash, Meson, and Ninja</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <segmentedlist id="openrcinit-before" revision='openrc'>
+ <segtitle>&before;</segtitle>
+ <seglistitem>
+ <seg>None</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <segmentedlist id="openrcinit-optdeps" revision='openrc'>
+ <segtitle>&external;</segtitle>
+ <seglistitem>
+ <seg>
+ <ulink url="&blfs-book;postlfs/linux-pam.html">Linux-PAM</ulink>
+ </seg>
+ </seglistitem>
+ </segmentedlist>
+
<!-- Begin OpenSSL dependency info -->
<bridgehead renderas="sect2" id="openssl-dep">OpenSSL</bridgehead>
@@ -2666,7 +2706,7 @@
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Bash, Binutils, Coreutils, GCC, Glibc, Make, Ncurses,
- <phrase revision='sysv'>and </phrase>Pkgconf<phrase
+ <phrase revision='openrc,sysv'>and </phrase>Pkgconf<phrase
revision='systemd'>, and Systemd</phrase></seg>
</seglistitem>
</segmentedlist>
@@ -2697,7 +2737,7 @@
<seglistitem>
<seg>
<phrase revision='systemd'>None</phrase>
- <phrase revision='sysv'>
+ <phrase revision='openrc,sysv'>
<ulink url='&blfs-book;general/elogind.html'>elogind</ulink>
</phrase>
</seg>
@@ -2990,37 +3030,37 @@
</segmentedlist>
<!-- Begin Sysklogd dependency info -->
- <bridgehead renderas="sect2" id="sysklogd-dep" revision="sysv">Sysklogd</bridgehead>
+ <bridgehead renderas="sect2" id="sysklogd-dep" revision="openrc,sysv">Sysklogd</bridgehead>
- <segmentedlist id="sysklogd-depends" revision="sysv">
+ <segmentedlist id="sysklogd-depends" revision="openrc,sysc">
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Binutils, Coreutils, GCC, Glibc, Make, and Patch</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="sysklogd-rundeps" revision="sysv">
+ <segmentedlist id="sysklogd-rundeps" revision="openrc,sysv">
<segtitle>&runtime;</segtitle>
<seglistitem>
<seg>Glibc</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="sysklogd-testdeps" revision="sysv">
+ <segmentedlist id="sysklogd-testdeps" revision="openrc,sysv">
<segtitle>&testsuites;</segtitle>
<seglistitem>
<seg>No test suite available</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="sysklogd-before" revision="sysv">
+ <segmentedlist id="sysklogd-before" revision="openrc,sysv">
<segtitle>&before;</segtitle>
<seglistitem>
<seg>None</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="sysklogd-optdeps" revision="sysv">
+ <segmentedlist id="sysklogd-optdeps" revision="openrc,sysv">
<segtitle>&external;</segtitle>
<seglistitem>
<seg>None</seg>
@@ -3127,44 +3167,6 @@
</seglistitem>
</segmentedlist>
-<!-- Begin SysVinit dependency info -->
- <bridgehead renderas="sect2" id="sysvinit-dep" revision='sysv'>SysVinit</bridgehead>
-
- <segmentedlist id="sysvinit-depends" revision='sysv'>
- <segtitle>&dependencies;</segtitle>
- <seglistitem>
- <seg>Binutils, Coreutils, GCC, Glibc, Make, and Sed</seg>
- </seglistitem>
- </segmentedlist>
-
- <segmentedlist id="sysvinit-rundeps" revision='sysv'>
- <segtitle>&runtime;</segtitle>
- <seglistitem>
- <seg>Glibc</seg>
- </seglistitem>
- </segmentedlist>
-
- <segmentedlist id="sysvinit-testdeps" revision='sysv'>
- <segtitle>&testsuites;</segtitle>
- <seglistitem>
- <seg>No test suite available</seg>
- </seglistitem>
- </segmentedlist>
-
- <segmentedlist id="sysvinit-before" revision='sysv'>
- <segtitle>&before;</segtitle>
- <seglistitem>
- <seg>None</seg>
- </seglistitem>
- </segmentedlist>
-
- <segmentedlist id="sysvinit-optdeps" revision='sysv'>
- <segtitle>&external;</segtitle>
- <seglistitem>
- <seg>None</seg>
- </seglistitem>
- </segmentedlist>
-
<!-- Begin Tar dependency info -->
<bridgehead renderas="sect2" id="tar-dep">Tar</bridgehead>
@@ -3284,9 +3286,9 @@
</segmentedlist>
<!-- Begin Udev dependency info -->
- <bridgehead renderas="sect2" id="udev-dep" revision="sysv">Udev</bridgehead>
+ <bridgehead renderas="sect2" id="udev-dep" revision="openrc,sysv">Udev</bridgehead>
- <segmentedlist id="udev-depends" revision="sysv">
+ <segmentedlist id="udev-depends" revision="openrc,sysv">
<segtitle>&dependencies;</segtitle>
<seglistitem>
<seg>Acl, Bash, Binutils, Coreutils, Diffutils, Gawk,
@@ -3295,28 +3297,28 @@
</seglistitem>
</segmentedlist>
- <segmentedlist id="udev-rundeps" revision="sysv">
+ <segmentedlist id="udev-rundeps" revision="openrc,sysv">
<segtitle>&runtime;</segtitle>
<seglistitem>
<seg>Acl, Glibc, Libcap, OpenSSL, and Util-linux</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="udev-testdeps" revision="sysv">
+ <segmentedlist id="udev-testdeps" revision="openrc,sysv">
<segtitle>&testsuites;</segtitle>
<seglistitem>
<seg>None</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="udev-before" revision="sysv">
+ <segmentedlist id="udev-before" revision="openrc,sysv">
<segtitle>&before;</segtitle>
<seglistitem>
<seg>Util-linux</seg>
</seglistitem>
</segmentedlist>
- <segmentedlist id="udev-optdeps" revision="sysv">
+ <segmentedlist id="udev-optdeps" revision="openrc,sysv">
<segtitle>&external;</segtitle>
<seglistitem>
<seg>None</seg>
diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml
index 74181e99e..1be23c251 100644
--- a/chapter01/changelog.xml
+++ b/chapter01/changelog.xml
@@ -37,11 +37,21 @@
</itemizedlist>
</listitem>
- Note: If a change is only specific to sysv or systemd, then use
- <listitem revision="sysv"> or <listitem revision="systemd"> as
+ Note: If a change is only specific to one or two init systems, then use
+ <listitem revision="init-system1,init-system2"> or as
appropriate for the entry or if needed the entire day's listitem.
-->
+ <listitem>
+ <para>2026-04-06</para>
+ <itemizedlist>
+ <listitem>
+ <para>[zeckma] - Provide OpenRC support (doesn't replace Systemd or
+ SysVinit).</para>
+ </listitem>
+ </itemizedlist>
+ </listitem>
+
<listitem>
<para>2026-04-04</para>
<itemizedlist>
@@ -68,7 +78,7 @@
<ulink url='&lfs-ticket-root;4500'>#4500</ulink>.</para>
</listitem>
<listitem>
- <para>[bdubbs] - Update to <phrase revision="sysv">Udev from</phrase>
+ <para>[bdubbs] - Update to <phrase revision="openrc,sysv">Udev from</phrase>
systemd-260.1. Fixes
<ulink url='&lfs-ticket-root;5890'>#5890</ulink>.</para>
</listitem>
@@ -153,7 +163,7 @@
<ulink url='&lfs-ticket-root;5883'>#5883</ulink>.</para>
</listitem>
<listitem>
- <para>[bdubbs] - Update to <phrase revision="sysv">Udev from</phrase>
+ <para>[bdubbs] - Update to <phrase revision="openrc,sysv">Udev from</phrase>
systemd-259.5. Fixes
<ulink url='&lfs-ticket-root;5879'>#5879</ulink>.</para>
</listitem>
diff --git a/chapter01/whatsnew.xml b/chapter01/whatsnew.xml
index 8c11e718b..e7da862ac 100644
--- a/chapter01/whatsnew.xml
+++ b/chapter01/whatsnew.xml
@@ -200,6 +200,9 @@
<!--<listitem>
<para>Ninja-&ninja-version;</para>
</listitem>-->
+ <!--<listitem revision="openrc">
+ <para>OpenRC-&openrc-version;</para>
+ </listitem>-->
<!--<listitem>
<para>OpenSSL-&openssl-version;</para>
</listitem>-->
@@ -242,7 +245,7 @@
<listitem>
<para>Sqlite-&sqlite-version;</para>
</listitem>
- <!--<listitem revision="sysv">
+ <!--<listitem revision="openrc,sysv">
<para>Sysklogd-&sysklogd-version;</para>
</listitem>-->
<listitem revision="systemd">
@@ -263,7 +266,7 @@
<listitem>
<para>Tzdata-&tzdata-version;</para>
</listitem>
- <listitem revision="sysv">
+ <listitem revision="openrc,sysv">
<para>Udev from Systemd-&systemd-version;</para>
</listitem>
<!--<listitem>
diff --git a/chapter02/creatingpartition.xml b/chapter02/creatingpartition.xml
index c71a13d84..80b92189f 100644
--- a/chapter02/creatingpartition.xml
+++ b/chapter02/creatingpartition.xml
@@ -201,11 +201,14 @@
<systemitem class='filesystem'>tmpfs</systemitem> on /tmp to make
access to temporary files faster.</para></listitem>
- <listitem revision='systemd'><para>/tmp – By default, systemd
+ <listitem revision='systemd,openrc'><para>/tmp – By default,
+ <phrase revision="systemd">systemd</phrase>
+ <phrase revision="openrc">OpenRC</phrase>
mounts a <systemitem class='filesystem'>tmpfs</systemitem> here.
+ <phrase revision="systemd">
If you want to override that behavior, follow
<xref linkend='systemd-no-tmpfs'/> when configuring the LFS
- system.</para></listitem>
+ system.</phrase></para></listitem>
<listitem><para>/usr/src – This partition is very
useful for providing a location to store BLFS source files and
diff --git a/chapter03/introduction.xml b/chapter03/introduction.xml
index 38513d758..39fa19b37 100644
--- a/chapter03/introduction.xml
+++ b/chapter03/introduction.xml
@@ -107,15 +107,7 @@
as an input to the <command>wget</command> command, use:</para>
<screen role="nodump"><userinput>wget --input-file=&wget-list; --continue --directory-prefix=$LFS/sources</userinput></screen>
-<!--
- <note><para>
- The <filename>wget-list</filename> file mentioned above retrieves all
- packages for both the sysV and systemd versions of LFS. There are a total
- of five additional small packages not needed for the current book. The
- <filename>md5sums</filename> file mentioned below is specific to the
- current book.
- </para></note>
--->
+
<para>Additionally, starting with LFS-7.0, there is a separate file,
<ulink url="../md5sums">md5sums</ulink>, which can be used to verify that all
the correct packages are available before proceeding. Place that file in
diff --git a/chapter03/packages.xml b/chapter03/packages.xml
index b2a60bf73..784f18650 100644
--- a/chapter03/packages.xml
+++ b/chapter03/packages.xml
@@ -617,6 +617,15 @@
</listitem>
</varlistentry>
+ <varlistentry revision="openrc">
+ <term>OpenRC (&openrc-version;) - <token>&openrc-size;</token>:</term>
+ <listitem>
+ <para>Home page: <ulink url="&openrc-home;"/></para>
+ <para>Download: <ulink url="&openrc-url;"/></para>
+ <para>MD5 sum: <literal>&openrc-md5;</literal></para>
+ </listitem>
+ </varlistentry>
+
<varlistentry>
<term>OpenSSL (&openssl-version;) - <token>&openssl-size;</token>:</term>
<listitem>
@@ -766,7 +775,7 @@
</listitem>
</varlistentry>
- <varlistentry revision="sysv">
+ <varlistentry revision="openrc,sysv">
<term>Sysklogd (&sysklogd-version;) - <token>&sysklogd-size;</token>:</term>
<listitem>
<para>Home page: <ulink url="&sysklogd-home;"/></para>
@@ -853,7 +862,7 @@
</listitem>
</varlistentry>
- <varlistentry revision="sysv">
+ <varlistentry revision="openrc,sysv">
<term>Udev-lfs Tarball (&udev-lfs-version;) - <token>&udev-lfs-size;</token>:</term>
<listitem>
<para>Download: <ulink url="&udev-lfs-url;"/></para>
diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml
index acae0cfb2..e70356130 100644
--- a/chapter07/createfiles.xml
+++ b/chapter07/createfiles.xml
@@ -60,7 +60,7 @@ EOF</userinput></screen>
<para>Create the <filename>/etc/passwd</filename> file by running the following
command:</para>
-<screen revision="sysv"><userinput>cat > /etc/passwd << "EOF"
+<screen revision="openrc,sysv"><userinput>cat > /etc/passwd << "EOF"
<literal>root:x:0:0:root:/root:/bin/bash
bin:x:1:1:bin:/dev/null:/usr/bin/false
daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false
@@ -92,7 +92,7 @@ EOF</userinput></screen>
<para>Create the <filename>/etc/group</filename> file by running the following
command:</para>
-<screen revision="sysv"><userinput>cat > /etc/group << "EOF"
+<screen revision="openrc,sysv"><userinput>cat > /etc/group << "EOF"
<literal>root:x:0:
bin:x:1:daemon
sys:x:2:
@@ -168,8 +168,8 @@ EOF</userinput></screen>
with a GID of 1 be present. The GID of 5 is widely used for the
<systemitem class="groupname">tty</systemitem> group, and the number 5 is
also used in <phrase revision="systemd">systemd</phrase>
- <phrase revision="sysv"><filename>/etc/fstab</filename></phrase> for the
- <systemitem class="filesystem">devpts</systemitem> filesystem.
+ <phrase revision="openrc,sysv"><filename>/etc/fstab</filename></phrase> for
+ the <systemitem class="filesystem">devpts</systemitem> filesystem.
All other group names and GIDs can be chosen freely by the system
administrator since well-written programs do not depend on GID numbers,
but rather use the group's name.</para>
@@ -223,9 +223,11 @@ chmod -v 600 /var/log/btmp</userinput></screen>
<note><para>The <filename>/run/utmp</filename> file
records the users that are currently logged in.
- <phrase revision='sysv'>This file is created dynamically in the boot
- scripts.</phrase><phrase revision='systemd'>This file is created
- dynamically when a user logs into the system.</phrase></para></note>
+ This file is created dynamically
+ <phrase revision='sysv'>in the boot scripts.</phrase>
+ <phrase revision='openrc'>by the OpenRC services.</phrase>
+ <phrase revision='systemd'>when a user logs into the system.</phrase>
+ </para></note>
<!-- AFAIK they are not vital for system function, users requiring such
info should rely on systemd-logind or elogind or some custom PAM
diff --git a/chapter08/chapter08.xml b/chapter08/chapter08.xml
index 6d0461f50..78c4caf27 100644
--- a/chapter08/chapter08.xml
+++ b/chapter08/chapter08.xml
@@ -89,25 +89,30 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="vim.xml"/>
- <!-- systemd only -->
+ <!-- systemd -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="markupsafe.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="jinja2.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="systemd.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dbus.xml"/>
- <!-- sysv only -->
+ <!-- openrc,sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/>
- <!-- Both sysv on systemd builds -->
+ <!-- systemd,openrc,sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-db.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="procps.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
- <!-- Both sysv and systemd builds -->
+ <!-- systemd,openrc,sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/>
- <!-- sysv only -->
+ <!-- openrc,sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
+
+ <!-- openrc -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openrc.xml"/>
+
+ <!-- sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/>
diff --git a/chapter08/glibc.xml b/chapter08/glibc.xml
index 589e5602a..5c9c7536f 100644
--- a/chapter08/glibc.xml
+++ b/chapter08/glibc.xml
@@ -262,8 +262,8 @@ esac</userinput></screen>
</para>
</listitem>
- <!-- Otherwise on lfs-systemd nscd will fail to start on boot,
- and on both lfs-sysv and lfs-systemd useradd etc. will try
+ <!-- Otherwise on lfs systemd, nscd will fail to start on boot,
+ and on all lfs init systems, useradd etc. will try
to start nscd, then nscd will fail to start as well and
produce some spurious error message. -->
<listitem>
@@ -463,7 +463,7 @@ localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</userinput></screen>
<para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
following:</para>
-<screen revision='sysv'><userinput>cat > /etc/nsswitch.conf << "EOF"
+<screen revision='openrc,sysv'><userinput>cat > /etc/nsswitch.conf << "EOF"
<literal># Begin /etc/nsswitch.conf
passwd: files
diff --git a/chapter08/man-db.xml b/chapter08/man-db.xml
index e6d141987..0bf8e8caf 100644
--- a/chapter08/man-db.xml
+++ b/chapter08/man-db.xml
@@ -52,7 +52,7 @@
--with-vgrind=/usr/bin/vgrind \
--with-grap=/usr/bin/grap</userinput></screen>
-<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
+<screen revision="openrc,sysv"><userinput remap="configure">./configure --prefix=/usr \
--docdir=/usr/share/doc/man-db-&man-db-version; \
--sysconfdir=/etc \
--disable-setuid \
@@ -97,7 +97,7 @@
</listitem>
</varlistentry>
- <varlistentry revision="sysv">
+ <varlistentry revision="openrc,sysv">
<term><parameter>--with-systemd...</parameter></term>
<listitem>
<para>These parameters prevent installing unneeded systemd
diff --git a/chapter08/openrc.xml b/chapter08/openrc.xml
new file mode 100644
index 000000000..91e561191
--- /dev/null
+++ b/chapter08/openrc.xml
@@ -0,0 +1,356 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-system-openrc" role="wrap" revision="openrc">
+ <?dbhtml filename="openrc.html"?>
+
+ <sect1info condition="script">
+ <productname>openrc</productname>
+ <productnumber>&openrc-version;</productnumber>
+ <address>&openrc-url;</address>
+ </sect1info>
+
+ <title>OpenRC-&openrc-version;</title>
+
+ <indexterm zone="ch-system-openrc">
+ <primary sortas="a-OpenRC">OpenRC</primary>
+ </indexterm>
+
+ <sect2 role="package">
+ <title/>
+
+ <para>The OpenRC package contains programs for controlling the startup,
+ running, and shutdown of the system.</para>
+
+ <segmentedlist>
+ <segtitle>&buildtime;</segtitle>
+ <segtitle>&diskspace;</segtitle>
+
+ <seglistitem>
+ <seg>&openrc-fin-sbu;</seg>
+ <seg>&openrc-fin-du;</seg>
+ </seglistitem>
+ </segmentedlist>
+
+ </sect2>
+
+ <sect2 role="installation">
+ <title>Installation of OpenRC</title>
+
+ <para>Fix a script to allow a normal installation:</para>
+
+<screen><userinput remap="pre">sed -i '/set -u/d' tools/meson_final.sh</userinput></screen>
+
+ <para>Prepare OpenRC for compilation:</para>
+
+<screen><userinput remap="configure">mkdir build
+cd build
+
+meson setup --prefix=/usr \
+ --buildtype=release \
+ -D pam=false ..</userinput></screen>
+
+ <variablelist>
+ <title>The meaning of the configure options:</title>
+
+ <varlistentry>
+ <term><parameter>-D pam=false</parameter></term>
+ <listitem>
+ <para>This disables needing Linux-PAM for the build, since it is not
+ installed yet.</para>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ <para>Compile the package:</para>
+
+<screen><userinput remap="make">ninja</userinput></screen>
+
+ <para>To run the tests, issue:</para>
+
+<screen><userinput remap="test">ninja test</userinput></screen>
+
+ <para>Install the package:</para>
+
+<screen><userinput remap="install">ninja install &&
+mv -v /sbin/rc-update /bin</userinput></screen>
+
+ <para>OpenRC provides <application>init</application> and other programs of
+ its own. However, the shorthands for them aren't created. Create the
+ symlinks:</para>
+
+<screen><userinput>for i in {init,shutdown}; do
+ ln -sv openrc-$i /sbin/$i
+done
+
+cat > /sbin/poweroff << "EOF"
+<literal>#!/bin/sh
+/sbin/shutdown --poweroff now</literal>
+EOF
+
+cat > /sbin/reboot << "EOF"
+<literal>#!/bin/sh
+/sbin/shutdown --reboot now</literal>
+EOF
+
+chmod 755 /sbin/poweroff /sbin/reboot</userinput></screen>
+
+ </sect2>
+
+ <sect2 id="contents-openrc" role="content">
+ <title>Contents of OpenRC</title>
+
+ <segmentedlist>
+ <segtitle>Installed programs</segtitle>
+ <segtitle>Installed libraries</segtitle>
+ <segtitle>Installed directories</segtitle>
+
+ <seglistitem>
+ <seg>
+ rc-status,
+ init (link to openrc-init),
+ openrc,
+ openrc-init,
+ openrc-run,
+ openrc-shutdown,
+ poweroff,
+ rc-service,
+ rc-sstat,
+ rc-update,
+ reboot,
+ shutdown (link to openrc-shutdown),
+ start-stop-daemon, and
+ supervise-daemon
+ </seg>
+ <seg>
+ libeinfo.so and
+ librc.so
+ </seg>
+ <seg>
+ /etc/conf.d,
+ /etc/init.d,
+ /etc/local.d,
+ /etc/runlevels,
+ /etc/sysctl.d,
+ /usr/libexec/rc, and
+ /usr/share/openrc
+ </seg>
+ </seglistitem>
+ </segmentedlist>
+
+ <variablelist>
+ <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+ <?dbfo list-presentation="list"?>
+ <?dbhtml list-presentation="table"?>
+
+ <varlistentry id="rc-status">
+ <term><command>rc-status</command></term>
+ <listitem>
+ <para>
+ Gives the status of a service
+ </para>
+ <indexterm zone="ch-system-openrc rc-status">
+ <primary sortas="b-rc-status">rc-status</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="init">
+ <term><command>init</command></term>
+ <listitem>
+ <para>
+ Is the first process to be started when the kernel has initialized
+ the hardware; it takes over the boot process and starts all the
+ services; symlink to <command>openrc-init</command>
+ </para>
+ <indexterm zone="ch-system-openrc init">
+ <primary sortas="b-init">init</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="openrc">
+ <term><command>openrc</command></term>
+ <listitem>
+ <para>
+ starts and stops services on a given runlevel
+ </para>
+ <indexterm zone="ch-system-openrc openrc">
+ <primary sortas="b-openrc">openrc</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="openrc-init">
+ <term><command>openrc-init</command></term>
+ <listitem>
+ <para>
+ Gets called from <command>init</command> and starts every service
+ as needed
+ </para>
+ <indexterm zone="ch-system-openrc openrc-init">
+ <primary sortas="b-openrc-init">openrc-init</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="openrc-run">
+ <term><command>openrc-run</command></term>
+ <listitem>
+ <para>
+ Allows using shell commands in a service file
+ </para>
+ <indexterm zone="ch-system-openrc openrc-run">
+ <primary sortas="b-openrc-run">openrc-run</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="openrc-shutdown">
+ <term><command>openrc-shutdown</command></term>
+ <listitem>
+ <para>
+ Brings the system down in a secure way, signaling all processes and
+ notifying all logged-in users
+ </para>
+ <indexterm zone="ch-system-openrc openrc-shutdown">
+ <primary sortas="b-openrc-shutdown">openrc-shutdown</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="poweroff">
+ <term><command>poweroff</command></term>
+ <listitem>
+ <para>
+ Calls <command>openrc-shutdown</command> with
+ <parameter>--poweroff</parameter>, stopping all services and
+ processes before shutting down the system
+ </para>
+ <indexterm zone="ch-system-openrc poweroff">
+ <primary sortas="b-poweroff">poweroff</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="rc-service">
+ <term><command>rc-service</command></term>
+ <listitem>
+ <para>
+ Runs a given service after locating it
+ </para>
+ <indexterm zone="ch-system-openrc rc-service">
+ <primary sortas="b-rc-service">rc-service</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="rc-sstat">
+ <term><command>rc-sstat</command></term>
+ <listitem>
+ <para>
+ Gives the status of the most crucial services, followed by normal
+ services
+ </para>
+ <indexterm zone="ch-system-openrc rc-sstat">
+ <primary sortas="b-rc-sstat">rc-sstat</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="rc-update">
+ <term><command>rc-update</command></term>
+ <listitem>
+ <para>
+ Adds and removes services on a runlevel
+ </para>
+ <indexterm zone="ch-system-openrc rc-update">
+ <primary sortas="b-rc-update">rc-update</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="reboot">
+ <term><command>reboot</command></term>
+ <listitem>
+ <para>
+ Calls <command>openrc-shutdown</command> with
+ <parameter>--reboot</parameter>, stopping all services and
+ processes before telling the system to reboot
+ </para>
+ <indexterm zone="ch-system-openrc reboot">
+ <primary sortas="b-reboot">reboot</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="shutdown">
+ <term><command>shutdown</command></term>
+ <listitem>
+ <para>
+ Is a symlink to <command>openrc-shutdown</command>
+ </para>
+ <indexterm zone="ch-system-openrc shutdown">
+ <primary sortas="b-shutdown">shutdown</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="start-stop-daemon">
+ <term><command>start-stop-daemon</command></term>
+ <listitem>
+ <para>
+ Starts or stops a daemon in a service file
+ </para>
+ <indexterm zone="ch-system-openrc start-stop-daemon">
+ <primary sortas="b-start-stop-daemon">start-stop-daemon</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="supervise-daemon">
+ <term><command>supervise-daemon</command></term>
+ <listitem>
+ <para>
+ Supervises a daemon in a service file
+ </para>
+ <indexterm zone="ch-system-openrc supervise-daemon">
+ <primary sortas="b-supervise-daemon">supervise-daemon</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="libeinfo">
+ <term><filename class="libraryfile">libeinfo</filename></term>
+ <listitem>
+ <para>
+ Contains functions for outputting colored messages
+ </para>
+ <indexterm zone="ch-system-openrc libeinfo">
+ <primary sortas="c-libeinfo">libeinfo</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry id="librc">
+ <term><filename class="libraryfile">librc</filename></term>
+ <listitem>
+ <para>
+ Provides the core OpenRC functions
+ </para>
+ <indexterm zone="ch-system-openrc librc">
+ <primary sortas="c-librc">librc</primary>
+ </indexterm>
+ </listitem>
+ </varlistentry>
+
+ </variablelist>
+
+ </sect2>
+
+</sect1>
diff --git a/chapter08/pkgmgt.xml b/chapter08/pkgmgt.xml
index daa1040b5..fa98af3fa 100644
--- a/chapter08/pkgmgt.xml
+++ b/chapter08/pkgmgt.xml
@@ -368,7 +368,7 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install</userinput></screen>
<filename>/etc/fstab</filename>,
<filename>/etc/passwd</filename>,
<filename>/etc/group</filename>,
- <phrase revision="systemd">
+ <phrase revision="systemd,openrc">
<filename>/etc/shadow</filename>, and
<filename>/etc/ld.so.conf</filename>.
</phrase>
diff --git a/chapter08/procps.xml b/chapter08/procps.xml
index 8dccfd697..1e0e0c27c 100644
--- a/chapter08/procps.xml
+++ b/chapter08/procps.xml
@@ -42,7 +42,7 @@
<para>Prepare Procps-ng for compilation:</para>
-<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr \
+<screen revision="openrc,sysv"><userinput remap="configure">./configure --prefix=/usr \
--docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
--disable-static \
--disable-kill \
diff --git a/chapter08/sysklogd.xml b/chapter08/sysklogd.xml
index 4bd5c00cd..c93e0c9f1 100644
--- a/chapter08/sysklogd.xml
+++ b/chapter08/sysklogd.xml
@@ -5,7 +5,7 @@
%general-entities;
]>
-<sect1 id="ch-system-sysklogd" role="wrap" revision="sysv">
+<sect1 id="ch-system-sysklogd" role="wrap" revision="openrc,sysv">
<?dbhtml filename="sysklogd.html"?>
<sect1info condition="script">
diff --git a/chapter08/udev.xml b/chapter08/udev.xml
index 65b2f0d54..5415eeaaf 100644
--- a/chapter08/udev.xml
+++ b/chapter08/udev.xml
@@ -5,7 +5,7 @@
%general-entities;
]>
-<sect1 id="ch-system-udev" role="wrap" revision="sysv">
+<sect1 id="ch-system-udev" role="wrap" revision="openrc,sysv">
<?dbhtml filename="udev.html"?>
<sect1info condition="script">
@@ -281,7 +281,7 @@ cp src/libudev/libudev.pc /usr/lib32/pkgconfig/</userinput></screen>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
- <varlistentry id="udevadm" revision="sysv">
+ <varlistentry id="udevadm" revision="openrc,sysv">
<term><command>udevadm</command></term>
<listitem>
<para>Generic udev administration tool: controls the udevd daemon,
diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml
index 627cb85c9..6f0b58f46 100644
--- a/chapter08/util-linux.xml
+++ b/chapter08/util-linux.xml
@@ -44,7 +44,7 @@
<para>Prepare Util-linux for compilation:</para>
- <screen revision="sysv"><userinput remap="configure">./configure --bindir=/usr/bin \
+ <screen revision="openrc,sysv"><userinput remap="configure">./configure --bindir=/usr/bin \
--libdir=/usr/lib \
--runstatedir=/run \
--sbindir=/usr/sbin \
diff --git a/chapter09/chapter09.xml b/chapter09/chapter09.xml
index 3f4db0d6b..8e5a01405 100644
--- a/chapter09/chapter09.xml
+++ b/chapter09/chapter09.xml
@@ -11,8 +11,10 @@
<title>System Configuration</title>
- <!-- sysv -->
+ <!-- openrc,sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
+
+ <!-- sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bootscripts.xml"/>
<!-- systemd -->
@@ -23,10 +25,15 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="udev.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="symlinks.xml"/>
- <!-- sysv -->
+ <!-- openrc,sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="network.xml"/>
+
+ <!-- sysv -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usage.xml"/>
+ <!-- openrc -->
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="usagerc.xml"/>
+
<!-- systemd -->
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="clock.xml"/>
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="consoled.xml"/>
diff --git a/chapter09/introduction.xml b/chapter09/introduction.xml
index cad7be2a5..96541797d 100644
--- a/chapter09/introduction.xml
+++ b/chapter09/introduction.xml
@@ -5,20 +5,34 @@
%general-entities;
]>
-<sect1 id="ch-config-introduction" revision="sysv">
+<sect1 id="ch-config-introduction" revision="openrc,sysv">
<?dbhtml filename="introduction.html"?>
<title>Introduction</title>
<para>Booting a Linux system involves several tasks. The process must
- mount both virtual and real file systems, initialize devices,
+ mount both virtual and real file systems, initialize devices,
check file systems for integrity, mount and activate any swap partitions or files, set
the system clock, bring up networking, start any daemons required by the
system, and accomplish any other custom tasks specified by the user. This
process must be organized to ensure the tasks are performed in the correct
order and executed as quickly as possible.</para>
- <sect2 id='sysv-desc'>
+
+ <sect2 revision='openrc' id='openrc-desc'>
+ <title>OpenRC</title>
+
+ <para>OpenRC combines the methodology of both SysVinit and Systemd.
+ OpenRC has the concept of services with dependency information, yet it uses
+ a run level scheme which is similar to SysVinit. OpenRC, like SysVinit and
+ Systemd, uses <command>init</command> and starts up every process and
+ daemon as required. While you can choose which run level you want to be on,
+ <literal>default</literal> has the most services and is the default. For
+ information on run levels, see <xref linkend="ch-config-usage"/>.</para>
+
+ </sect2>
+
+ <sect2 revision='sysv' id='sysv-desc'>
<title>System V</title>
<para>System V is the classic boot process that has been used in Unix and
@@ -43,44 +57,74 @@
<para>The usual default run level is 3 or 5.</para>
- <bridgehead renderas="sect3">Advantages</bridgehead>
+ </sect2>
+
+ <sect2>
+ <title>Advantages</title>
<itemizedlist>
<listitem>
- <para>Established, well understood system.</para>
+ <para>Established, well understood system.</para>
</listitem>
<listitem>
- <para>Easy to customize.</para>
+ <para>Easy to customize.</para>
+ </listitem>
+
+ <listitem revision="openrc">
+ <para>Well supported and backed by major Linux distributions.</para>
+ </listitem>
+
+ <listitem revision="openrc">
+ <para>Parallelized.</para>
+ </listitem>
+
+ <listitem revision="openrc">
+ <para>Cgroups support.</para>
</listitem>
</itemizedlist>
+ </sect2>
- <bridgehead renderas="sect3">Disadvantages</bridgehead>
+ <sect2>
+ <title>Disadvantages</title>
<itemizedlist>
- <listitem>
- <para>May be slower to boot. A medium speed base LFS system
- takes 8-12 seconds where the boot time is measured from the
- first kernel message to the login prompt. Network
- connectivity is typically established about 2 seconds
- after the login prompt.</para>
+ <listitem revision="openrc">
+ <para>It is not as convenient as Systemd.</para>
</listitem>
- <listitem>
- <para>Serial processing of boot tasks. This is related to the previous
- point. A delay in any process, such as a file system check, will
- delay the entire boot process.</para>
+ <listitem revision="openrc">
+ <para>It does not provide the amount of tooling Systemd does.</para>
</listitem>
- <listitem>
- <para>Does not directly support advanced features like
- control groups (cgroups) and per-user fair share scheduling.</para>
+ <listitem revision="openrc">
+ <para>Certain features that projects depend on that only exist in
+ Systemd may take a while before seeing parity in OpenRC.</para>
</listitem>
- <listitem>
- <para>Adding scripts requires manual, static sequencing decisions.</para>
+ <listitem revision="sysv">
+ <para>May be slower to boot. A medium speed base LFS system
+ takes 8-12 seconds where the boot time is measured from the
+ first kernel message to the login prompt. Network
+ connectivity is typically established about 2 seconds
+ after the login prompt.</para>
+ </listitem>
+
+ <listitem revision="sysv">
+ <para>Serial processing of boot tasks. This is related to the previous
+ point. A delay in any process, such as a file system check, will
+ delay the entire boot process.</para>
+ </listitem>
+
+ <listitem revision="sysv">
+ <para>Does not directly support advanced features like
+ control groups (cgroups) and per-user fair share scheduling.</para>
+ </listitem>
+
+ <listitem revision="sysv">
+ <para>Adding scripts requires manual, static sequencing decisions.</para>
</listitem>
</itemizedlist>
@@ -88,4 +132,3 @@
</sect2>
</sect1>
-
diff --git a/chapter09/locale.xml b/chapter09/locale.xml
index f738e1994..ceb066b97 100644
--- a/chapter09/locale.xml
+++ b/chapter09/locale.xml
@@ -127,7 +127,7 @@ EOF</userinput></screen>
<para><phrase revision='systemd'>The login shells are often unaffected by
the settings in <filename>/etc/locale.conf</filename>. </phrase>Create the
<filename>/etc/profile</filename>
- <phrase revision='sysv'>once the proper locale settings have been
+ <phrase revision='openrc,sysv'>once the proper locale settings have been
determined to set the desired locale</phrase><phrase
revision='systemd'>to read the locale settings from
<filename>/etc/locale.conf</filename> and export them</phrase>,
@@ -158,7 +158,7 @@ fi
# End /etc/profile</literal>
EOF</userinput></screen>
-<screen revision="sysv"><userinput>cat > /etc/profile << "EOF"
+<screen revision="openrc,sysv"><userinput>cat > /etc/profile << "EOF"
<literal># Begin /etc/profile
for i in $(locale); do
diff --git a/chapter09/network.xml b/chapter09/network.xml
index 4c6caafc5..ca1ab5ca3 100644
--- a/chapter09/network.xml
+++ b/chapter09/network.xml
@@ -5,7 +5,7 @@
%general-entities;
]>
-<sect1 id="ch-config-network" revision="sysv">
+<sect1 id="ch-config-network" revision="openrc,sysv">
<?dbhtml filename="network.html"?>
<title>General Network Configuration</title>
@@ -17,7 +17,8 @@
<sect2>
<title>Creating Network Interface Configuration Files</title>
- <para>The files in <filename class="directory">/etc/sysconfig/</filename>
+ <para revision="sysv">The files in <filename
+ class="directory">/etc/sysconfig/</filename>
usually determine which interfaces are brought up and down by the network
script. This directory should
contain a file for each interface to be configured, such as
@@ -27,6 +28,10 @@
address(es), subnet masks, and so forth. The stem of
the filename must be <emphasis>ifconfig</emphasis>.</para>
+ <para revision="openrc">The <filename>/etc/conf.d/network</filename> file
+ determines which interfaces are brought up and down by the
+ <command>network</command> service.</para>
+
<note>
<para>If the procedure in the previous section was not used, udev
will assign network card interface names based on system physical
@@ -44,11 +49,15 @@
<emphasis>even in the chroot environment</emphasis>.</para>
</note>
- <para>The following command creates a sample file for the
+ <para revision="openrc">To specify the interfaces you want to have brought
+ up, edit the <filename>/etc/conf.d/network</filename> configuration file,
+ which has plenty of comments.</para>
+
+ <para revision="sysv">The following command creates a sample file for the
<emphasis>eth0</emphasis> device with a static IP address:</para>
<!-- jhalfs relies on the values for IFACE, IP, etc. If you want to change
them, please inform the jhalfs maintainer(s). -->
-<screen><userinput>cd /etc/sysconfig/
+<screen revision="sysv"><userinput>cd /etc/sysconfig/
cat > ifconfig.<replaceable>eth0</replaceable> << "EOF"
<literal>ONBOOT=<replaceable>yes</replaceable>
IFACE=<replaceable>eth0</replaceable>
@@ -59,42 +68,44 @@ PREFIX=<replaceable>24</replaceable>
BROADCAST=<replaceable>192.168.1.255</replaceable></literal>
EOF</userinput></screen>
- <para>The values in italics must be changed in each file, to set
- the interfaces up correctly.</para>
-
- <para>If the <envar>ONBOOT</envar> variable is set to <literal>yes</literal> the
- System V network script will bring up the Network Interface Card (NIC) during
- the system boot process. If set to anything besides <literal>yes</literal>, the NIC
- will be ignored by the network script and will not be started automatically.
- Interfaces can be manually started or stopped with the
- <command>ifup</command> and <command>ifdown</command> commands.</para>
-
- <para>The <envar>IFACE</envar> variable defines the interface name,
- for example, eth0. It is required for all network device configuration
- files. The filename extension must match this value.</para>
-
- <para>The <envar>SERVICE</envar> variable defines the method used for
- obtaining the IP address. The LFS-Bootscripts package has a modular IP
- assignment format, and creating additional files in the <filename
- class="directory">/lib/services/</filename> directory allows other IP
- assignment methods. This is commonly used for Dynamic Host Configuration
- Protocol (DHCP), which is addressed in the BLFS book.</para>
-
- <para>The <envar>GATEWAY</envar> variable should contain the default
- gateway IP address, if one is present. If not, then comment out the
- variable entirely.</para>
-
- <para>The <envar>PREFIX</envar> variable specifies the number of
- bits used in the subnet. Each segment of an IP address is 8 bits. If the
- subnet's netmask is 255.255.255.0, then it is using the first three segments
- (24 bits) to specify the network number. If the netmask is 255.255.255.240,
- the subnet is using the first 28 bits. Prefixes longer than 24 bits are
- commonly used by DSL and cable-based Internet Service Providers (ISPs).
- In this example (PREFIX=24), the netmask is 255.255.255.0. Adjust the
- <envar>PREFIX</envar> variable according to your specific subnet.
- If omitted, the PREFIX defaults to 24.</para>
-
- <para>For more information see the <command>ifup</command> man page.</para>
+ <para revision="sysv">The values in italics must be changed in each file,
+ to set the interfaces up correctly.</para>
+
+ <para revision="sysv">If the <envar>ONBOOT</envar> variable is set to
+ <literal>yes</literal> the System V network script will bring up the Network
+ Interface Card (NIC) during the system boot process. If set to anything
+ besides <literal>yes</literal>, the NIC will be ignored by the network
+ script and will not be started automatically. Interfaces can be manually
+ started or stopped with the <command>ifup</command> and
+ <command>ifdown</command> commands.</para>
+
+ <para revision="sysv">The <envar>IFACE</envar> variable defines the
+ interface name, for example, eth0. It is required for all network device
+ configuration files. The filename extension must match this value.</para>
+
+ <para revision="sysv">The <envar>SERVICE</envar> variable defines the
+ method used for obtaining the IP address. The LFS-Bootscripts package has
+ a modular IP assignment format, and creating additional files in the
+ <filename class="directory">/lib/services/</filename> directory allows
+ other IP assignment methods. This is commonly used for Dynamic Host
+ Configuration Protocol (DHCP), which is addressed in the BLFS book.</para>
+
+ <para revision="sysv">The <envar>GATEWAY</envar> variable should contain
+ the default gateway IP address, if one is present. If not, then comment out
+ the variable entirely.</para>
+
+ <para revision="sysv">The <envar>PREFIX</envar> variable specifies the
+ number of bits used in the subnet. Each segment of an IP address is 8 bits.
+ If the subnet's netmask is 255.255.255.0, then it is using the first three
+ segments (24 bits) to specify the network number. If the netmask is
+ 255.255.255.240, the subnet is using the first 28 bits. Prefixes longer
+ than 24 bits are commonly used by DSL and cable-based Internet Service
+ Providers (ISPs). In this example (PREFIX=24), the netmask is
+ 255.255.255.0. Adjust the <envar>PREFIX</envar> variable according to your
+ specific subnet. If omitted, the PREFIX defaults to 24.</para>
+
+ <para revision="sysv">For more information see the <command>ifup</command>
+ man page.</para>
</sect2>
<sect2 id="resolv.conf">
diff --git a/chapter09/symlinks.xml b/chapter09/symlinks.xml
index cd2d58077..b1f955ed2 100644
--- a/chapter09/symlinks.xml
+++ b/chapter09/symlinks.xml
@@ -10,7 +10,7 @@
<title>Managing Devices</title>
- <sect2 revision="sysv">
+ <sect2 revision="openrc,sysv">
<title>Network Devices</title>
@@ -129,7 +129,7 @@
</sect2>
- <sect2 revision="sysv">
+ <sect2 revision="openrc,sysv">
<title>CD-ROM Symlinks</title>
diff --git a/chapter09/udev.xml b/chapter09/udev.xml
index 06db345a2..8c96d8483 100644
--- a/chapter09/udev.xml
+++ b/chapter09/udev.xml
@@ -16,7 +16,7 @@
</indexterm>
<para>In <xref linkend="chapter-building-system"/>, we installed the udev
- daemon when <phrase revision="sysv">udev</phrase>
+ daemon when <phrase revision="openrc,sysv">udev</phrase>
<phrase revision="systemd">systemd</phrase> was built. Before we go into the
details regarding how udev works, a brief history of previous methods of
handling devices is in order.</para>
@@ -229,8 +229,8 @@
manual page for more information on <quote>softdep</quote> syntax and
capabilities.</para>
- <para revision="sysv">If the module in question is not a wrapper and is
- useful by itself, configure the <command>modules</command> bootscript to
+ <para revision="sysv">If the module in question is not a wrapper
+ and is useful by itself, configure the <command>modules</command> bootscript to
load this module on system boot. To do this, add the module name to the
<filename>/etc/sysconfig/modules</filename> file on a separate line.
This works for wrapper modules too, but is suboptimal in that case.</para>
diff --git a/chapter09/usagerc.xml b/chapter09/usagerc.xml
new file mode 100644
index 000000000..311ca8189
--- /dev/null
+++ b/chapter09/usagerc.xml
@@ -0,0 +1,334 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+ <!ENTITY % general-entities SYSTEM "../general.ent">
+ %general-entities;
+]>
+
+<sect1 id="ch-config-usage" revision="openrc">
+ <?dbhtml filename="usage.html"?>
+
+ <title>OpenRC Usage and Configuration</title>
+
+ <indexterm zone="ch-config-usage">
+ <primary sortas="a-Usage">Usage</primary>
+ <secondary>usage</secondary>
+ </indexterm>
+
+ <sect2>
+ <title>How Does OpenRC Work?</title>
+
+ <para>This version of LFS uses a special booting facility named OpenRC,
+ which starts services according to a series of <emphasis>run
+ levels</emphasis>. These runlevels are slightly different from init systems
+ like SysVinit. While these runlevels exist, there is much less complexity
+ involved with OpenRC services. The process doesn't require
+ bootscripts.</para>
+
+ <para>There is an alternative boot procedure called
+ <command>systemd</command>. We will not discuss that boot process any
+ further here. For a detailed description visit <ulink
+ url="https://www.linux.com/training-tutorials/understanding-and-using-systemd/"/>.</para>
+
+ <para>OpenRC's run level scheme has five run levels that are the most
+ important, with the ability to add more.
+ Each one of the five corresponds to certain modes the computer is in, like
+ if it's booting, shutting down, or has no networking. Here are the
+ descriptions of the different run levels as they are implemented in LFS:</para>
+
+ <itemizedlist>
+ <listitem>
+ <para>
+ sysinit: brings up and mounts kernel virtual filesystems
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ boot: starts up important services like setting the time and checks
+ the filesystem
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ nonetwork: default without networking
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ default: where most services should be, like setting up audio
+ services
+ </para>
+ </listitem>
+ <listitem>
+ <para>
+ shutdown: kills all processes and remounts <filename
+ class="directory">/</filename> in read-only mode
+ </para>
+ </listitem>
+ </itemizedlist>
+
+ <para>
+ Each service has dependency information, so a service on a given run
+ level will be started at the correct time if it has correct dependency
+ information.
+ </para>
+
+ </sect2>
+
+ <sect2 id="conf-openrc" role="configuration">
+ <title>Configuring OpenRC</title>
+
+ <indexterm zone="conf-openrc">
+ <primary sortas="a-OpenRC">OpenRC</primary>
+ <secondary>configuring</secondary>
+ </indexterm>
+
+ <para>Whenever a system is started, <command>agetty</command> is ran for a
+ number of <literal>tty</literal> devices. OpenRC provides an
+ <command>agetty</command> service but doesn't start it for each
+ <literal>tty</literal> that's needed. Create and enable those
+ services:</para>
+
+<screen><userinput>rm -vf /etc/runlevels/default/agetty*
+for i in $(seq 1 6); do
+ ln -sfv agetty /etc/init.d/agetty.tty$i
+ rc-update add agetty.tty$i default
+done</userinput></screen>
+
+ <para>These <literal>tty</literal> services are started on the
+ <literal>default</literal> run level.</para>
+
+ </sect2>
+
+ <sect2 id="ch-config-udevd">
+ <title>Creating the Udevd Service</title>
+
+ <indexterm zone="ch-config-udevd">
+ <primary sortas="d-udevd">udevd</primary>
+ <secondary>configuring</secondary></indexterm>
+
+ <para>OpenRC doesn't ship services for <command>udevd</command>, leading to
+ kernel modules not being loaded. Create and enable them now:</para>
+
+<screen><userinput>cat > /etc/init.d/udevd << "EOF"
+<literal>#!/sbin/openrc-run
+# Starts the udevd daemon.
+# Authors: Zeckma - [email protected]
+# Version: LFS &version;
+
+description="starts the udevd daemon"
+
+command=/sbin/udevd
+command_background=yes
+pidfile="/run/${RC_SVCNAME}.pid"
+
+depend() {
+ after localnet
+ after modules
+}
+
+stop() {
+ ebegin "Stopping ${RC_SVCNAME}"
+ /bin/udevadm control --exit
+ eend $?
+}</literal>
+EOF
+
+cat > /etc/init.d/udev-trigger << "EOF"
+<literal>#!/sbin/openrc-run
+# Coldplugs devices and settles the udevd daemon.
+# Authors: Zeckma - [email protected]
+# Version: LFS &version;
+
+description="coldplugs devices"
+
+depend() {
+ after udevd
+ provides dev
+ keyword -shutdown
+}
+
+start() {
+ ebegin "Coldplugging devices"
+
+ /bin/udevadm trigger --action=add --type=subsystems
+ /bin/udevadm trigger --action=add --type=devices
+ /bin/udevadm trigger --action=change --type=devices
+
+# Wait for udevd to process the uevents we triggered
+ /bin/udevadm settle --timeout=5
+
+# If any LVM based partitions are on the system, ensure they
+# are activated so they can be used.
+ if [ -x /sbin/vgchange ]; then /sbin/vgchange -a y >/dev/null; fi
+}</literal>
+EOF
+
+for i in udev{d,-trigger}; do
+ chmod 755 /etc/init.d/$i
+ rc-update add $i sysinit
+done</userinput></screen>
+
+ <para>
+ These services should load most if not all modules automatically. If you
+ need to load a given module but it isn't being loaded, pass the module
+ name to the <filename>/etc/conf.d/modules</filename> configuration file.
+ </para>
+
+ </sect2>
+
+ <sect2 id="ch-config-sysklogd">
+ <title>Creating the Sysklogd Service</title>
+
+ <indexterm zone="ch-config-sysklogd">
+ <primary sortas="d-sysklogd">sysklogd</primary>
+ <secondary>configuring</secondary></indexterm>
+
+ <para>OpenRC doesn't ship a service for <command>syslogd</command>, leading
+ important messages not being captured. Create and enable the service for the
+ logger:</para>
+
+<screen><userinput>cat > /etc/init.d/sysklogd << "EOF"
+<literal>#!/sbin/openrc-run
+# Starts the sysklogd daemon.
+# Authors: Zeckma - [email protected]
+# Version: LFS &version;
+
+command=/sbin/syslogd
+pidfile="/run/${RC_SVCNAME}.pid"
+command_background=true
+command_args="-F ${sysklogd_options}"
+
+depend() {
+ need clock hostname
+ after root
+ provide logger
+}
+
+reload() {
+ ebegin "Reloading sysklogd"
+ start-stop-daemon --signal HUP --pidfile ${pidfile}
+ eend $?
+}</literal>
+EOF
+
+chmod 755 /etc/init.d/sysklogd
+rc-update add sysklogd boot</userinput></screen>
+
+ </sect2>
+
+ <sect2 id="ch-config-clock">
+ <title>Configuring the System Clock</title>
+
+ <indexterm zone="ch-config-clock">
+ <primary sortas="d-setclock">setclock</primary>
+ <secondary>configuring</secondary></indexterm>
+
+ <para>OpenRC provides a <command>hwclock</command> service which reads from
+ the hardware clock. It then sets the time. This time is obtained from either
+ applying timezone data from <filename>/etc/localtime</filename>, or it simply
+ doesn't do anything and displays the time as-is. In order to know what to do
+ with the hardware time, it needs to decide whether the time is UTC or local.
+ It has no way to do this on its own, so a configuration file is needed.
+ OpenRC provides one already, and should be edited.</para>
+
+ <para>If you cannot remember whether or not the hardware clock is set to UTC,
+ find out by running the <userinput>hwclock --localtime --show</userinput>
+ command. This will display what the current time is according to the hardware
+ clock. If this time matches whatever your watch says, then the hardware clock is
+ set to local time. If the output from <command>hwclock</command> is not local
+ time, chances are it is set to UTC time. Verify this by adding or subtracting
+ the proper amount of hours for the timezone to the time shown by
+ <command>hwclock</command>. For example, if you are currently in the MST
+ timezone, which is also known as GMT -0700, add seven hours to the local
+ time.</para>
+
+ <para>Once you know the hardware time uses, edit
+ <filename>/etc/conf.d/hwclock</filename> as necessary. There are plenty of
+ comments explaining what to edit.</para>
+
+ </sect2>
+
+ <sect2 id="ch-config-console">
+ <?dbhtml filename="console.html"?>
+
+ <title>Configuring the Linux Console</title>
+
+ <indexterm zone="ch-config-console">
+ <primary sortas="d-console">console</primary>
+ <secondary>configuring</secondary>
+ </indexterm>
+
+ <para>This section discusses how to configure the
+ <command>consolefont</command> and <command>keymap</command> services that
+ set up the console font and keyboard map. If non-ASCII characters (e.g., the
+ copyright sign, the British pound sign, and the Euro symbol) will not be used
+ and the keyboard is a U.S. one, much of this section can be skipped. Without
+ the configuration files, the <command>consolefont</command> and
+ <command>keymap</command> services will use the defaults.</para>
+
+ <para>The <command>consolefont</command> service reads the
+ <filename>/etc/conf.d/consolefont</filename> file for configuration
+ information. Decide which screen font will be used. Search <filename
+ class="directory">/usr/share/consolefonts</filename> for valid fonts.</para>
+
+ <para>The <command>keymaps</command> service reads the
+ <filename>/etc/conf.d/keymaps</filename> file for configuration
+ information. Decide which keymap will be used. Various
+ language-specific HOWTOs can also help with this; see <ulink
+ url="https://tldp.org/HOWTO/HOWTO-INDEX/other-lang.html"/>. If still in
+ doubt, look in the <filename class="directory">/usr/share/keymaps</filename>
+ directory for valid keymaps.</para>
+
+ <para>For both <command>consolefont</command> and <command>keymaps</command>,
+ configuration files exist for both and have comments that give good
+ information about what to provide to each parameter.</para>
+
+ <!-- Added because folks keep posting their console file with X questions
+ to blfs-support list -->
+ <note>
+ <para>The configuration files for the console only control
+ the Linux text console localization. It has nothing to do with setting
+ the proper keyboard layout and terminal fonts in the X Window System, with
+ ssh sessions, or with a serial console.</para>
+ </note>
+
+ </sect2>
+
+ <sect2 id="ch-config-agetty">
+ <title>Configuring Agetty</title>
+
+ <para>
+ If you don't want the boot logs to be cleared on the first TTY, which
+ Agetty will clear them by default, add <option>--noclear</option> to
+ <literal>agetty_options</literal> in the
+ <filename>/etc/conf.d/agetty</filename> file.
+ </para>
+
+ </sect2>
+
+ <sect2 id="ch-config-rc">
+ <title>The rc.conf File</title>
+
+ <indexterm zone="ch-config-rc">
+ <primary sortas="a-rc.conf">rc.conf</primary>
+ </indexterm>
+
+ <para>The <filename>/etc/rc.conf</filename> file contains settings that
+ control how OpenRC starts and operates. For example, you can tell OpenRC to
+ start services in parallel, or you can specify what run level you want the
+ system to run at. In most cases, you won't need to edit this file.</para>
+
+ </sect2>
+
+ <sect2 id="ch-config-other-rc">
+ <title>Other OpenRC Configuration Files</title>
+
+ <para>Many other services have configuration files in <filename
+ class="directory">/etc/conf.d</filename> and should match the service name
+ found in <filename class="directory">/etc/init.d</filename>. If a service
+ gives you any trouble, there may be a configuration file for it
+ already, and should have comments provided.</para>
+
+ </sect2>
+</sect1>
diff --git a/chapter10/fstab.xml b/chapter10/fstab.xml
index 8eb314b87..c825fa558 100644
--- a/chapter10/fstab.xml
+++ b/chapter10/fstab.xml
@@ -38,7 +38,7 @@ cgroup2 /sys/fs/cgroup cgroup2 nosuid,noexec,nodev 0 0
# End /etc/fstab</literal>
EOF</userinput></screen>
-<screen revision="systemd"><userinput>cat > /etc/fstab << "EOF"
+<screen revision="systemd,openrc"><userinput>cat > /etc/fstab << "EOF"
<literal># Begin /etc/fstab
# file system mount-point type options dump fsck
diff --git a/chapter10/grub.xml b/chapter10/grub.xml
index fd0d52eb1..8f9ff7e75 100644
--- a/chapter10/grub.xml
+++ b/chapter10/grub.xml
@@ -294,8 +294,8 @@ insmod efi_uga
set gfxpayload=1024x768x32
-menuentry "GNU/Linux, Linux &linux-version;-lfs-&version;" {
- linux /boot/vmlinuz-&linux-version;-lfs-&version; root=/dev/sda2 ro
+menuentry "GNU/Linux, Linux &linux-version;" {
+ linux /boot/vmlinuz-&linux-version; root=/dev/sda2 ro
}</literal>
EOF</userinput></screen>
<!-- GOP is probably not needed anyhow, since we're not using terminal_output
diff --git a/chapter10/kernel.xml b/chapter10/kernel.xml
index 11194fdb7..ff9e21e88 100644
--- a/chapter10/kernel.xml
+++ b/chapter10/kernel.xml
@@ -138,6 +138,9 @@
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="kernel/sysv.xml"/>
+ <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
+ href="kernel/openrc.xml"/>
+
<xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
href="kernel/systemd.xml"/>
@@ -430,7 +433,7 @@
the automatic setup of the boot process described in the next section. The
following command assumes an x86 architecture:</para>
-<screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;-lfs-&version;</userinput></screen>
+<screen><userinput remap="install">cp -iv arch/x86/boot/bzImage /boot/vmlinuz-&linux-version;</userinput></screen>
<para><filename>System.map</filename> is a symbol file for the kernel.
It maps the function entry points of every function in the kernel API,
@@ -547,7 +550,7 @@ EOF</userinput></screen>
<seglistitem>
<seg>config-&linux-version;,
- vmlinuz-&linux-version;-lfs-&version;,
+ vmlinuz-&linux-version;,
and System.map-&linux-version;</seg>
<seg>/lib/modules, /usr/share/doc/linux-&linux-version;</seg>
</seglistitem>
@@ -569,7 +572,7 @@ EOF</userinput></screen>
</varlistentry>
<varlistentry id="lfskernel">
- <term><filename>vmlinuz-&linux-version;-lfs-&version;</filename></term>
+ <term><filename>vmlinuz-&linux-version;</filename></term>
<listitem>
<para>The engine of the Linux system. When turning on the computer,
the kernel is the first part of the operating system that gets loaded.
diff --git a/chapter10/kernel/openrc.toml b/chapter10/kernel/openrc.toml
new file mode 100644
index 000000000..9a75bc9f2
--- /dev/null
+++ b/chapter10/kernel/openrc.toml
@@ -0,0 +1,23 @@
+WERROR=' '
+PSI='*'
+PSI_DEFAULT_DISABLED=' '
+IKHEADERS=' '
+CGROUPS='*'
+MEMCG='*'
+EXPERT=' '
+RELOCATABLE='*'
+RANDOMIZE_BASE='*'
+STACKPROTECTOR='*'
+STACKPROTECTOR_STRONG='*'
+UEVENT_HELPER=' '
+DEVTMPFS='*'
+DEVTMPFS_MOUNT='*'
+SYSFB_SIMPLEFB='*'
+DRM='*'
+DRM_PANIC='*'
+DRM_PANIC_SCREEN='kmsg'
+DRM_FBDEV_EMULATION='*'
+DRM_SIMPLEDRM='*'
+FRAMEBUFFER_CONSOLE='*'
+
+revision='openrc'
diff --git a/chapter10/kernel/openrc.xml b/chapter10/kernel/openrc.xml
new file mode 100644
index 000000000..c51837f90
--- /dev/null
+++ b/chapter10/kernel/openrc.xml
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE note PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
+ "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd">
+<!-- Automatically generated by kernel-config.py
+ DO NOT EDIT! -->
+<screen role="nodump" revision="openrc"><emphasis role='blue'>G</emphasis>eneral setup --->
+ [ ] <emphasis role='blue'>C</emphasis>ompile the kernel with warnings as errors [WERROR]
+ <emphasis role='blue'>C</emphasis>PU/Task time and stats accounting --->
+ [*] <emphasis role='blue'>P</emphasis>ressure stall information tracking [PSI]
+ [ ] <emphasis role='blue'>R</emphasis>equire boot parameter to enable pressure stall information tracking
+ ... [PSI_DEFAULT_DISABLED]
+ < > <emphasis role='blue'>E</emphasis>nable kernel headers through /sys/kernel/kheaders.tar.xz [IKHEADERS]
+ [*] <emphasis role='blue'>C</emphasis>ontrol Group support ---> [CGROUPS]
+ [*] M<emphasis role='blue'>e</emphasis>mory controller [MEMCG]
+ [ ] <emphasis role='blue'>C</emphasis>onfigure standard kernel features (expert users) ---> [EXPERT]
+
+<emphasis role='blue'>P</emphasis>rocessor type and features --->
+ [*] <emphasis role='blue'>B</emphasis>uild a relocatable kernel [RELOCATABLE]
+ [*] <emphasis role='blue'>R</emphasis>andomize the address of the kernel image (KASLR) [RANDOMIZE_BASE]
+
+<emphasis role='blue'>G</emphasis>eneral architecture-dependent options --->
+ [*] <emphasis role='blue'>S</emphasis>tack Protector buffer overflow detection [STACKPROTECTOR]
+ [*] <emphasis role='blue'>S</emphasis>trong Stack Protector [STACKPROTECTOR_STRONG]
+
+<emphasis role='blue'>D</emphasis>evice Drivers --->
+ <emphasis role='blue'>G</emphasis>eneric Driver Options --->
+ [ ] <emphasis role='blue'>S</emphasis>upport for uevent helper [UEVENT_HELPER]
+ [*] M<emphasis role='blue'>a</emphasis>intain a devtmpfs filesystem to mount at /dev [DEVTMPFS]
+ [*] <emphasis role='blue'>A</emphasis>utomount devtmpfs at /dev, after the kernel mounted the rootfs
+ ... [DEVTMPFS_MOUNT]
+ <emphasis role='blue'>F</emphasis>irmware Drivers --->
+ [*] M<emphasis role='blue'>a</emphasis>rk VGA/VBE/EFI FB as generic system framebuffer [SYSFB_SIMPLEFB]
+ <emphasis role='blue'>G</emphasis>raphics support --->
+ <*> <emphasis role='blue'>D</emphasis>irect Rendering Manager (XFree86 4.1.0 and higher DRI support) --->
+ ... [DRM]
+ [*] <emphasis role='blue'>D</emphasis>isplay a user-friendly message when a kernel panic occurs
+ ... [DRM_PANIC]
+ (kmsg) <emphasis role='blue'>P</emphasis>anic screen formatter [DRM_PANIC_SCREEN]
+ <emphasis role='blue'>S</emphasis>upported DRM clients --->
+ [*] <emphasis role='blue'>E</emphasis>nable legacy fbdev support for your modesetting driver
+ ... [DRM_FBDEV_EMULATION]
+ <emphasis role='blue'>D</emphasis>rivers for system framebuffers --->
+ <*> <emphasis role='blue'>S</emphasis>imple framebuffer driver [DRM_SIMPLEDRM]
+ <emphasis role='blue'>C</emphasis>onsole display driver support --->
+ [*] <emphasis role='blue'>F</emphasis>ramebuffer Console support [FRAMEBUFFER_CONSOLE]</screen>
diff --git a/chapter11/reboot.xml b/chapter11/reboot.xml
index 497445346..8431871c4 100644
--- a/chapter11/reboot.xml
+++ b/chapter11/reboot.xml
@@ -41,7 +41,7 @@
you to perform copy/paste actions in your virtual
terminals.</para></listitem>
- <listitem revision="sysv"><para>
+ <listitem revision="openrc,sysv"><para>
If you are in a situation where static IP configuration
does not meet your networking requirements, installing a package
such as <ulink url='&blfs-book;basicnet/dhcpcd.html'>dhcpcd</ulink>
diff --git a/general.ent b/general.ent
index fda49a185..c3b6195e5 100644
--- a/general.ent
+++ b/general.ent
@@ -26,8 +26,12 @@
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book; -->
<!ENTITY errata "&lfs-root;lfs/errata/development/">
]]>
+<![ %openrc; [
+<!ENTITY short-version "svn"> <!-- Used below in &blfs-book; -->
+<!ENTITY errata "&lfs-root;lfs/errata/development/">
+]]>
<![ %systemd; [
-<!ENTITY short-version "systemd"> <!-- Used below in &blfs-book; -->
+<!ENTITY short-version "systemd"> <!-- Used below in &blfs-book; -->
<!ENTITY errata "&lfs-root;lfs/errata/systemd/">
]]>
<!ENTITY generic-version "development"> <!-- Used below in
@@ -42,6 +46,10 @@
<!ENTITY version "%relnum;">
<!ENTITY short-version "%relnum;"> <!-- Used below in &blfs-book; -->
]]>
+<![ %openrc; [
+<!ENTITY version "%relnum;">
+<!ENTITY short-version "%relnum;"> <!-- Used below in &blfs-book; -->
+]]>
<![ %systemd; [
<!ENTITY version "%relnum;">
<!ENTITY short-version "%relnum;-systemd"> <!-- Used below in &blfs-book; -->
@@ -78,12 +86,21 @@
<![ %sysv; [
<!ENTITY wget-list "wget-list-sysv">
]]>
+<![ %openrc; [
+<!ENTITY wget-list "wget-list-openrc">
+]]>
<![ %systemd; [
<!ENTITY wget-list "wget-list-systemd">
]]>
<!ENTITY lfs-root "https://www.linuxfromscratch.org/">
+<![ %openrc; [
+<!ENTITY blfs-root "&lfs-root;~zeckma/openrc/blfs/">
+]]>
<!ENTITY blfs-root "&lfs-root;blfs/">
+<![ %openrc; [
+<!ENTITY blfs-book "&blfs-root;&short-version;/">
+]]>
<!ENTITY blfs-book "&blfs-root;view/&short-version;/">
<!ENTITY faq-root "&lfs-root;faq/">
<!ENTITY hints-root "&lfs-root;hints/downloads/files/">
diff --git a/git-version.sh b/git-version.sh
index 4c9d431eb..eccef2dfc 100755
--- a/git-version.sh
+++ b/git-version.sh
@@ -1,30 +1,32 @@
#!/bin/bash
-if [ "$1" = sysv ]; then
- SYSV="INCLUDE"
- SYSTEMD="IGNORE "
-elif [ "$1" = systemd ]; then
- SYSV="IGNORE "
+if [ "$1" = systemd ]; then
SYSTEMD="INCLUDE"
+ OPENRC="IGNORE"
+ SYSV="IGNORE"
+elif [ "$1" = openrc ]; then
+ SYSTEMD="IGNORE"
+ OPENRC="INCLUDE"
+ SYSV="IGNORE"
+elif [ "$1" = sysv ]; then
+ SYSTEMD="IGNORE"
+ OPENRC="IGNORE"
+ SYSV="INCLUDE"
else
- echo You must provide either \"sysv\" or \"systemd\" as argument
+ echo You must provide \"systemd\", \"openrc\", or \"sysv\" as an argument
exit 1
fi
-echo "<!ENTITY % sysv \"$SYSV\">" > conditional.ent
-echo "<!ENTITY % systemd \"$SYSTEMD\">" >> conditional.ent
+echo "<!ENTITY % systemd \"$SYSTEMD\">" > conditional.ent
+echo "<!ENTITY % openrc \"$OPENRC\">" >> conditional.ent
+echo "<!ENTITY % sysv \"$SYSV\">" >> conditional.ent
if ! git status > /dev/null; then
# Either it's not a git repository or git is unavailable.
# Just workaround.
- echo "<![ %sysv; [" > version.ent
- echo "<!ENTITY version \"unknown\">" >> version.ent
- echo "]]>" >> version.ent
- echo "<![ %systemd; [" >> version.ent
- echo "<!ENTITY version \"unknown-systemd\">" >> version.ent
- echo "]]>" >> version.ent
- echo "<!ENTITY releasedate \"unknown\">" >> version.ent
- echo "<!ENTITY copyrightdate \"1999-2023\">" >> version.ent
+ echo "<!ENTITY version \"unknown\">" > version.ent
+ echo "<!ENTITY releasedate \"unknown\">" >> version.ent
+ echo "<!ENTITY copyrightdate \"1999-2023\">" >> version.ent
exit 0
fi
@@ -51,11 +53,6 @@ sha="$(git describe --abbrev=1 --always --exclude '*')"
githash=$(echo -n "#" && echo -n "$sha")
version="$githash"
-echo "<![ %sysv; [" > version.ent
-echo "<!ENTITY version \"$version\">" >> version.ent
-echo "]]>" >> version.ent
-echo "<![ %systemd; [" >> version.ent
-echo "<!ENTITY version \"$version\">" >> version.ent
-echo "]]>" >> version.ent
+echo "<!ENTITY version \"$version\">" > version.ent
echo "<!ENTITY releasedate \"$full_date\">" >> version.ent
echo "<!ENTITY copyrightdate \"1999-$year\">" >> version.ent
diff --git a/lfs-latest-git.php b/lfs-latest-git.php
index 0eab5e887..40dea844f 100644
--- a/lfs-latest-git.php
+++ b/lfs-latest-git.php
@@ -140,6 +140,7 @@ if ( $package == "mpc" ) $dirpath = "https://ftp.gnu.org/gnu/mpc";
if ( $package == "mpfr" ) $dirpath = "https://mpfr.loria.fr/mpfr-current";
if ( $package == "ncurses" ) $dirpath = "https://invisible-mirror.net/archives/ncurses";
if ( $package == "ninja" ) $dirpath = github("ninja-build/ninja");
+if ( $package == "openrc" ) $dirpath = github("OpenRC/openrc");
if ( $package == "openssl" ) $dirpath = github("openssl/openssl");
if ( $package == "packaging" ) $dirpath = "https://pypi.org/rss/project/packaging/releases.xml";
if ( $package == "pcre2" ) $dirpath = github("PCRE2Project/pcre2");
diff --git a/packages.ent b/packages.ent
index d436e688a..070030fef 100644
--- a/packages.ent
+++ b/packages.ent
@@ -553,6 +553,14 @@
<!ENTITY ninja-fin-du "43 MB">
<!ENTITY ninja-fin-sbu "0.2 SBU">
+<!ENTITY openrc-version "0.63">
+<!ENTITY openrc-size "260 KB">
+<!ENTITY openrc-url "&github;/OpenRC/openrc/archive/&openrc-version;/openrc-&openrc-version;.tar.gz">
+<!ENTITY openrc-md5 "f73566fc120e19e5a96fb0134cbb5ac8">
+<!ENTITY openrc-home "https://wiki.gentoo.org/wiki/OpenRC">
+<!ENTITY openrc-fin-du "13 MB">
+<!ENTITY openrc-fin-sbu "0.1 SBU">
+
<!ENTITY openssl-version "3.6.1">
<!ENTITY openssl-size "53,606 KB">
<!ENTITY openssl-url "&github;/openssl/openssl/releases/download/openssl-&openssl-version;/openssl-&openssl-version;.tar.gz">
@@ -763,13 +771,22 @@
<!ENTITY tzdata-md5 "09a2e016d36a4c7136475dd75acd4dbc">
<!ENTITY tzdata-home "https://www.iana.org/time-zones">
+<![ %openrc; [
+<!ENTITY udev-lfs-version "udev-lfs-20251217">
+<!ENTITY udev-lfs-size "12 KB">
+<!ENTITY udev-lfs-url "&lfs-root;~zeckma/&udev-lfs-version;.tar.xz">
+<!ENTITY udev-lfs-md5 "0f800adc86b5c96897575d7ce440dab6">
+<!ENTITY udev-lfs-home " ">
+<!ENTITY udev-fin-du "162 MB">
+<!ENTITY udev-fin-sbu "0.1 SBU">
+]]>
<!ENTITY udev-lfs-version "udev-lfs-20230818">
<!ENTITY udev-lfs-size "10 KB">
<!ENTITY udev-lfs-url "&anduin-sources;/&udev-lfs-version;.tar.xz">
<!ENTITY udev-lfs-md5 "acd4360d8a5c3ef320b9db88d275dae6">
<!ENTITY udev-lfs-home " ">
-<!ENTITY udev-fin-du "162 MB">
-<!ENTITY udev-fin-sbu "0.1 SBU">
+<!ENTITY udev-fin-du "162 MB">
+<!ENTITY udev-fin-sbu "0.1 SBU">
<!ENTITY util-linux-minor "2.41">
<!ENTITY util-linux-version "2.41.3"> <!-- 2.41.x -->
diff --git a/prologue/bookinfo.xml b/prologue/bookinfo.xml
index b705f2646..5f0e0218d 100644
--- a/prologue/bookinfo.xml
+++ b/prologue/bookinfo.xml
@@ -6,7 +6,9 @@
]>
<bookinfo>
- <title>Multilib Linux From Scratch<phrase revision='sysv'> (SysVinit Edition)</phrase></title>
+ <title>Multilib Linux From Scratch
+ <phrase revision='openrc'>(OpenRC Edition)</phrase>
+ <phrase revision='sysv'>(SysVinit Edition)</phrase></title>
<subtitle>Version &version;</subtitle>
<subtitle>Published &releasedate;</subtitle>
diff --git a/prologue/standards.xml b/prologue/standards.xml
index 88d894dad..3b4d8a78b 100644
--- a/prologue/standards.xml
+++ b/prologue/standards.xml
@@ -64,9 +64,10 @@
<listitem>
<para>
Bash, Bc, Binutils, Coreutils, Diffutils, File, Findutils, Gawk,
- GCC, Gettext, Glibc, Grep, Gzip, M4, Man-DB, Procps, Psmisc,
- Sed, Shadow, <phrase revision='sysv'>SysVinit</phrase><phrase
- revision='systemd'>Systemd</phrase>, Tar, Util-linux, Zlib
+ GCC, Gettext, Glibc, Grep, Gzip, M4, Man-DB, <phrase
+ revision='openrc'>OpenRC,</phrase> Procps, Psmisc,
+ Sed, Shadow, <phrase revision='sysv'>SysVinit,</phrase><phrase
+ revision='systemd'>Systemd,</phrase> Tar, Util-linux, Zlib
</para>
</listitem>
</varlistentry>
diff --git a/prologue/why.xml b/prologue/why.xml
index 18dbc86df..9333609a9 100644
--- a/prologue/why.xml
+++ b/prologue/why.xml
@@ -224,7 +224,7 @@
<para>This package produces a program that generates a perfect hash
function from a set of keys. It is required by
- <phrase revision='sysv'>Udev</phrase>
+ <phrase revision='openrc,sysv'>Udev</phrase>
<phrase revision='systemd'>Systemd</phrase>.</para>
</listitem>
@@ -470,8 +470,19 @@
the packages in LFS.</para>
</listitem>
+ <listitem revision="openrc">
+ <para>OpenRC</para>
+
+ <para>This package provides an <application>init</application> program
+ and system control capabilities as an alternative to Systemd. It has a
+ smaller installation size but strong support compared to others like
+ SysVinit. It is used by a few Linux distributions such as Gentoo and
+ Alpine.</para>
+ </listitem>
+
+
<listitem>
- <para>Openssl</para>
+ <para>OpenSSL</para>
<para>This package provides management tools and libraries relating to
cryptography. These supply cryptographic functions to
@@ -567,7 +578,7 @@
transactional SQL database engine.</para>
</listitem>
- <listitem revision="sysv">
+ <listitem revision="openrc,sysv">
<para>Sysklogd</para>
<para>This package supplies programs for logging system messages,
@@ -580,7 +591,8 @@
<para>This package provides an <application>init</application> program
and several additional boot and system control capabilities as an
- alternative to SysVinit. It is used by many Linux distributions.
+ alternative to other init systems. It is used by many Linux
+ distributions.
</para>
</listitem>
@@ -589,10 +601,10 @@
<para>This package provides the <application>init</application>
program, the parent of all the other processes on a running Linux
- system. </para>
+ system.</para>
</listitem>
- <listitem revision="sysv">
+ <listitem revision="openrc,sysv">
<para>Udev</para>
<para>This package is a device manager. It dynamically controls the
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
--
http://lists.linuxfromscratch.org/sympa/info/lfs-book
Unsubscribe: See the above information page