diff -Naurp LFS_orig/chapter03/packages.xml LFS-pacman/chapter03/packages.xml
--- LFS_orig/chapter03/packages.xml	2022-06-16 20:04:57.554521819 -0500
+++ LFS-pacman/chapter03/packages.xml	2022-06-16 20:05:13.894522425 -0500
@@ -48,6 +48,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Asciidoc (&asciidoc-version;) - <token>&asciidoc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&asciidoc-home;"/></para>
+        <para>Download: <ulink url="&asciidoc-url;"/></para>
+        <para>MD5 sum: <literal>&asciidoc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Autoconf (&autoconf-version;) - <token>&autoconf-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&autoconf-home;"/></para>
@@ -85,6 +94,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Berekely DB (&db-version;) - <token>&db-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&db-home;"/></para>
+        <para>Download: <ulink url="&db-url;"/></para>
+        <para>MD5 sum: <literal>&db-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Binutils (&binutils-version;) - <token>&binutils-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&binutils-home;"/></para>
@@ -129,6 +147,24 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>Cracklib (&cracklib-version;) - <token>&cracklib-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&cracklib-home;"/></para>
+        <para>Download: <ulink url="&cracklib-url;"/></para>
+        <para>MD5 sum: <literal>&cracklib-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Curl (&curl-version;) - <token>&curl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&curl-home;"/></para>
+        <para>Download: <ulink url="&curl-url;"/></para>
+        <para>MD5 sum: <literal>&curl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry revision="systemd">
       <term>D-Bus (&dbus-version;) - <token>&dbus-size;</token>:</term>
       <listitem>
@@ -157,6 +193,24 @@
     </varlistentry>
 
     <varlistentry>
+      <term>DocBook XML DTD (&docbook-45-xml-version;) - <token>&docbook-45-xml-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&docbook-45-xml-home;"/></para>
+        <para>Download: <ulink url="&docbook-45-xml-url;"/></para>
+        <para>MD5 sum: <literal>&docbook-45-xml-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>DocBook XSL (&docbook-xsl-version;) - <token>&docbook-xsl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&docbook-xsl-home;"/></para>
+        <para>Download: <ulink url="&docbook-xsl-url;"/></para>
+        <para>MD5 sum: <literal>&docbook-xsl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>E2fsprogs (&e2fsprogs-version;) - <token>&e2fsprogs-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&e2fsprogs-home;"/></para>
@@ -201,6 +255,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Fakeroot (&fakeroot-version;) - <token>&fakeroot-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&fakeroot-home;"/></para>
+        <para>Download: <ulink url="&fakeroot-url;"/></para>
+        <para>MD5 sum: <literal>&fakeroot-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>File (&file-version;) - <token>&file-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&file-home;"/></para>
@@ -283,6 +346,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Gnupg (&gnupg-version;) - <token>&gnupg-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&gnupg-home;"/></para>
+        <para>Download: <ulink url="&gnupg-url;"/></para>
+        <para>MD5 sum: <literal>&gnupg-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Gperf (&gperf-version;) - <token>&gperf-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&gperf-home;"/></para>
@@ -292,6 +364,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Gpgme (&gpgme-version;) - <token>&gpgme-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&gpgme-home;"/></para>
+        <para>Download: <ulink url="&gpgme-url;"/></para>
+        <para>MD5 sum: <literal>&gpgme-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Grep (&grep-version;) - <token>&grep-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&grep-home;"/></para>
@@ -364,6 +445,15 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>ISL (&isl-version;) - <token>&isl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&isl-home;"/></para>
+        <para>Download: <ulink url="&isl-url;"/></para>
+        <para>MD5 sum: <literal>&isl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry revision="systemd">
       <term>Jinja2 (&jinja2-version;) - <token>&jinja2-size;</token>:</term>
       <listitem>
@@ -410,6 +500,24 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Libarchive (&libarchive-version;) - <token>&libarchive-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libarchive-home;"/></para>
+        <para>Download: <ulink url="&libarchive-url;"/></para>
+        <para>MD5 sum: <literal>&libarchive-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libassuan (&libassuan-version;) - <token>&libassuan-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libassuan-home;"/></para>
+        <para>Download: <ulink url="&libassuan-url;"/></para>
+        <para>MD5 sum: <literal>&libassuan-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Libcap (&libcap-version;) - <token>&libcap-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&libcap-home;"/></para>
@@ -428,6 +536,42 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Libgcrypt (&libgcrypt-version;) - <token>&libgcrypt-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libgcrypt-home;"/></para>
+        <para>Download: <ulink url="&libgcrypt-url;"/></para>
+        <para>MD5 sum: <literal>&libgcrypt-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libgpg-error (&libgpg-error-version;) - <token>&libgpg-error-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libgpg-error-home;"/></para>
+        <para>Download: <ulink url="&libgpg-error-url;"/></para>
+        <para>MD5 sum: <literal>&libgpg-error-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libksba (&libksba-version;) - <token>&libksba-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libksba-home;"/></para>
+        <para>Download: <ulink url="&libksba-url;"/></para>
+        <para>MD5 sum: <literal>&libksba-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libnsl (&libnsl-version;) - <token>&libnsl-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libnsl-home;"/></para>
+        <para>Download: <ulink url="&libnsl-url;"/></para>
+        <para>MD5 sum: <literal>&libnsl-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Libpipeline (&libpipeline-version;) - <token>&libpipeline-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&libpipeline-home;"/></para>
@@ -437,6 +581,33 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Libpwquality (&libpwquality-version;) - <token>&libpwquality-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libpwquality-home;"/></para>
+        <para>Download: <ulink url="&libpwquality-url;"/></para>
+        <para>MD5 sum: <literal>&libpwquality-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libtasn1 (&libtasn1-version;) - <token>&libtasn1-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libtasn1-home;"/></para>
+        <para>Download: <ulink url="&libtasn1-url;"/></para>
+        <para>MD5 sum: <literal>&libtasn1-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libtirpc (&libtirpc-version;) - <token>&libtirpc-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libtirpc-home;"/></para>
+        <para>Download: <ulink url="&libtirpc-url;"/></para>
+        <para>MD5 sum: <literal>&libtirpc-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Libtool (&libtool-version;) - <token>&libtool-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&libtool-home;"/></para>
@@ -446,6 +617,33 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Libusb (&libusb-version;) - <token>&libusb-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libusb-home;"/></para>
+        <para>Download: <ulink url="&libusb-url;"/></para>
+        <para>MD5 sum: <literal>&libusb-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libxml2 (&libxml2-version;) - <token>&libxml2-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libxml2-home;"/></para>
+        <para>Download: <ulink url="&libxml2-url;"/></para>
+        <para>MD5 sum: <literal>&libxml2-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Libxslt (&libxslt-version;) - <token>&libxslt-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&libxslt-home;"/></para>
+        <para>Download: <ulink url="&libxslt-url;"/></para>
+        <para>MD5 sum: <literal>&libxslt-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Linux (&linux-version;) - <token>&linux-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&linux-home;"/></para>
@@ -469,6 +667,26 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Linux-PAM (&linux-pam-version;) - <token>&linux-pam-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&linux-pam-home;"/></para>
+        <para>Download: <ulink url="&linux-pam-url;"/></para>
+        <para>MD5 sum: <literal>&linux-pam-md5;</literal></para>
+        <para>Docs Download: <ulink url="&linux-pam-docs-url;"/></para>
+        <para>Docs MD5 sum: <literal>&linux-pam-docs-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>LZO (&lzo-version;) - <token>&lzo-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&lzo-home;"/></para>
+        <para>Download: <ulink url="&lzo-url;"/></para>
+        <para>MD5 sum: <literal>&lzo-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>M4 (&m4-version;) - <token>&m4-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&m4-home;"/></para>
@@ -487,6 +705,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Make-ca (&make-ca-version;) - <token>&make-ca-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&make-ca-home;"/></para>
+        <para>Download: <ulink url="&make-ca-url;"/></para>
+        <para>MD5 sum: <literal>&make-ca-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Man-DB (&man-db-version;) - <token>&man-db-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&man-db-home;"/></para>
@@ -550,6 +777,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Nettle (&nettle-version;) - <token>&nettle-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&nettle-home;"/></para>
+        <para>Download: <ulink url="&nettle-url;"/></para>
+        <para>MD5 sum: <literal>&nettle-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Ninja (&ninja-version;) - <token>&ninja-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&ninja-home;"/></para>
@@ -559,6 +795,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Npth (&npth-version;) - <token>&npth-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&npth-home;"/></para>
+        <para>Download: <ulink url="&npth-url;"/></para>
+        <para>MD5 sum: <literal>&npth-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>OpenSSL (&openssl-version;) - <token>&openssl-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&openssl-home;"/></para>
@@ -568,6 +813,42 @@
     </varlistentry>
 
     <varlistentry>
+      <term>P11-kit (&p11-kit-version;) - <token>&p11-kit-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&p11-kit-home;"/></para>
+        <para>Download: <ulink url="&p11-kit-url;"/></para>
+        <para>MD5 sum: <literal>&p11-kit-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Pacman (&pacman-version;) - <token>&pacman-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&pacman-home;"/></para>
+        <para>Download: <ulink url="&pacman-url;"/></para>
+        <para>MD5 sum: <literal>&pacman-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Pacman-contrib (&pacman-contrib-version;) - <token>&pacman-contrib-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&pacman-contrib-home;"/></para>
+        <para>Download: <ulink url="&pacman-contrib-url;"/></para>
+        <para>MD5 sum: <literal>&pacman-contrib-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>Pacman-hooks (&pacman-hooks-version;) - <token>&pacman-hooks-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&pacman-home;"/></para>
+        <para>Download: <ulink url="&pacman-hooks-url;"/></para>
+        <para>MD5 sum: <literal>&pacman-hooks-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Patch (&patch-version;) - <token>&patch-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&patch-home;"/></para>
@@ -586,6 +867,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>pip (&pip-version;) - <token>&pip-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&pip-home;"/></para>
+        <para>Download: <ulink url="&pip-url;"/></para>
+        <para>MD5 sum: <literal>&pip-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Pkg-config (&pkgconfig-version;) - <token>&pkgconfig-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&pkgconfig-home;"/></para>
@@ -613,6 +903,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>Pth (&pth-version;) - <token>&pth-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&pth-home;"/></para>
+        <para>Download: <ulink url="&pth-url;"/></para>
+        <para>MD5 sum: <literal>&pth-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Python (&python-version;) - <token>&python-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&python-home;"/></para>
@@ -639,6 +938,15 @@
     </varlistentry>
 
     <varlistentry>
+      <term>RPCsvc-proto (&rpcsvc-proto-version;) - <token>&rpcsvc-proto-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&rpcsvc-proto-home;"/></para>
+        <para>Download: <ulink url="&rpcsvc-proto-url;"/></para>
+        <para>MD5 sum: <literal>&rpcsvc-proto-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Sed (&sed-version;) - <token>&sed-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&sed-home;"/></para>
@@ -648,6 +956,24 @@
     </varlistentry>
 
     <varlistentry>
+      <term>setuptools (&setuptools-version;) - <token>&setuptools-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&setuptools-home;"/></para>
+        <para>Download: <ulink url="&setuptools-url;"/></para>
+        <para>MD5 sum: <literal>&setuptools-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term>sgml-common (&sgml-common-version;) - <token>&sgml-common-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&sgml-common-home;"/></para>
+        <para>Download: <ulink url="&sgml-common-url;"/></para>
+        <para>MD5 sum: <literal>&sgml-common-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
       <term>Shadow (&shadow-version;) - <token>&shadow-size;</token>:</term>
       <listitem>
         <para>Home page: <ulink url="&shadow-home;"/></para>
@@ -656,6 +982,18 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>SQLite (&sqlite-version;) - <token>&sqlite-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&sqlite-home;"/></para>
+        <para>Download: <ulink url="&sqlite-url;"/></para>
+        <para>MD5 sum: <literal>&sqlite-md5;</literal></para>
+        <para>Doc Download: <ulink url="&sqlite-doc-url;"/></para>
+        <para>Doc MD5 sum: <literal>&sqlite-doc-md5;</literal></para>
+        <para>Doc Size: <literal>&sqlite-doc-size;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry revision="sysv">
       <term>Sysklogd (&sysklogd-version;) - <token>&sysklogd-size;</token>:</term>
       <listitem>
@@ -751,6 +1089,15 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>Unzip (&unzip-version;) - <token>&unzip-size;</token>:</term>
+      <listitem>
+        <para>Home page: <ulink url="&unzip-home;"/></para>
+        <para>Download: <ulink url="&unzip-url;"/></para>
+        <para>MD5 sum: <literal>&unzip-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term>Util-linux (&util-linux-version;) - <token>&util-linux-size;</token>:</term>
       <listitem>
diff -Naurp LFS_orig/chapter03/patches.xml LFS-pacman/chapter03/patches.xml
--- LFS_orig/chapter03/patches.xml	2022-06-16 20:04:57.554521819 -0500
+++ LFS-pacman/chapter03/patches.xml	2022-06-16 20:05:13.894522425 -0500
@@ -59,6 +59,15 @@
         <para>MD5 sum: <literal>&coreutils-i18n-patch-md5;</literal></para>
       </listitem>
     </varlistentry>
+
+    <varlistentry>
+      <term>Coreutils Uname Patch - <token>&coreutils-uname-patch-size;</token>:</term>
+      <listitem>
+        <para>Download: <ulink url="https://www.linuxfromscratch.org/~dj/&coreutils-i18n-patch;"/></para>
+        <para>MD5 sum: <literal>&coreutils-i18n-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
 <!--
     <varlistentry>
       <term>Coreutils Chmod Fix Patch - <token>&coreutils-chmod-patch-size;</token>:</term>
@@ -68,6 +77,15 @@
       </listitem>
    </varlistentry>
 -->
+   
+   <varlistentry>
+      <term>Docbook XSL stack fix patch - <token>&docbook-xsl-stack-fix-patch-size;</token></term>
+      <listitem>
+        <para>Download: <ulink url="http://www.linuxfromscratch.org/patches/blfs/svn/&docbook-xsl-stack-fix-patch;"/></para>
+        <para>MD5 sum: <literal>&docbook-xsl-stack-fix-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
 <!--
     <varlistentry>
       <term>File Upstream Fixes Patch - <token>&file-upstream-fixes-patch-size;</token>:</term>
@@ -109,6 +127,15 @@
       </listitem>
     </varlistentry>
 -->
+    
+    <varlistentry>
+      <term>Pacman Consolodated Fixes patch - <token>&pacman-fixes-patch-size;</token></term>
+      <listitem>
+        <para>Download: <ulink url="http://www.linuxfromscratch.org/~dj/&pacman-fixes-patch;"/></para>
+        <para>MD5 sum: <literal>&pacman-fixes-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
 <!--
     <varlistentry>
       <term>Perl Upstream Fix Patch - <token>&perl-fix-patch-size;</token>:</term>
@@ -118,6 +145,15 @@
       </listitem>
     </varlistentry>
 -->
+
+    <varlistentry>
+      <term>SGML Common manpage patch - <token>&sgml-common-manpage-patch-size;</token></term>
+      <listitem>
+        <para>Download: <ulink url="http://www.linuxfromscratch.org/patches/blfs/svn/&sgml-common-manpage-patch;"/></para>
+        <para>MD5 sum: <literal>&sgml-common-manpage-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
 <!--
     <varlistentry>
       <term>Shadow Segfault Fix Patch - <token>&shadow-segfault-patch-size;</token>:</term>
@@ -151,6 +187,14 @@
       </listitem>
     </varlistentry>
 
+    <varlistentry>
+      <term>Unzip Consolidated Fixes patch - <token>&unzip-consolidated-patch-size;</token></term>
+      <listitem>
+        <para>Download: <ulink url="http://www.linuxfromscratch.org/patches/blfs/svn/&unzip-consolidated-patch;"/></para>
+        <para>MD5 sum: <literal>&unzip-consolidated-patch-md5;</literal></para>
+      </listitem>
+    </varlistentry>
+
     <varlistentry>
       <term>Xz Upstream Fix Patch - <token>&xz-upstream-fix-patch-size;</token>:</term>
       <listitem>
diff -Naurp LFS_orig/chapter05/glibc.xml LFS-pacman/chapter05/glibc.xml
--- LFS_orig/chapter05/glibc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter05/glibc.xml	2022-06-16 20:05:13.897855758 -0500
@@ -23,11 +23,11 @@
 
   <sect2 role="package">
     <title/>
-
+    <!--
     <xi:include xmlns:xi="http://www.w3.org/2001/XInclude"
     href="../chapter08/glibc.xml"
     xpointer="xpointer(/sect1/sect2[1]/para[1])"/>
-
+    -->
     <segmentedlist>
       <segtitle>&buildtime;</segtitle>
       <segtitle>&diskspace;</segtitle>
@@ -231,7 +231,7 @@ readelf -l a.out | grep '/ld-linux'</use
 <screen><userinput>$LFS/tools/libexec/gcc/$LFS_TGT/&gcc-version;/install-tools/mkheaders</userinput></screen>
 
   </sect2>
-
+  
   <sect2 role="content">
     <title/>
 
@@ -239,5 +239,5 @@ readelf -l a.out | grep '/ld-linux'</use
     <xref linkend="contents-glibc" role="."/></para>
 
   </sect2>
-
+ 
 </sect1>
diff -Naurp LFS_orig/chapter05/linux-headers.xml LFS-pacman/chapter05/linux-headers.xml
--- LFS_orig/chapter05/linux-headers.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter05/linux-headers.xml	2022-06-16 20:05:13.897855758 -0500
@@ -16,10 +16,10 @@
 
   <title>Linux-&linux-version; API Headers</title>
 
-  <indexterm zone="ch-tools-linux-headers">
+<!--    <indexterm zone="ch-tools-linux-headers">
     <primary sortas="a-Linux">Linux</primary>
     <secondary>tools, API headers</secondary>
-  </indexterm>
+    </indexterm> -->
 
   <sect2 role="package">
     <title/>
@@ -65,6 +65,7 @@ rm usr/include/Makefile
 
   </sect2>
 
+<!--
   <sect2 id="contents-linux-headers" role="content">
     <title>Contents of Linux API Headers</title>
 
@@ -203,5 +204,5 @@ rm usr/include/Makefile
     </variablelist>
 
   </sect2>
-
+  -->
 </sect1>
diff -Naurp LFS_orig/chapter07/bzip2.xml LFS-pacman/chapter07/bzip2.xml
--- LFS_orig/chapter07/bzip2.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/bzip2.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-bzip2" role="wrap">
+  <?dbhtml filename="bzip2.html"?>
+
+  <sect1info condition="script">
+    <productname>bzip2</productname>
+    <productnumber>&bzip2-version;</productnumber>
+    <address>&bzip2-url;</address>
+  </sect1info>
+
+  <title>Bzip2-&bzip2-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Bzip2 package contains programs for compressing and decompressing
+    files. Compressing text files with <command>bzip2</command> yields a much
+    better compression percentage than with the traditional
+    <command>gzip</command>.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&bzip2-fin-sbu;</seg>
+        <seg>&bzip2-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Bzip2</title>
+
+   <para>The following command ensures installation of symbolic links are relative:</para>
+
+<screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
+
+    <para>Prepare Bzip2 for compilation with:</para>
+
+<screen><userinput remap="make">make -f Makefile-libbz2_so
+make clean</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make parameter:</title>
+
+      <varlistentry>
+        <term><parameter>-f Makefile-libbz2_so</parameter></term>
+        <listitem>
+          <para>This will cause Bzip2 to be built using a different
+          <filename>Makefile</filename> file, in this case the
+          <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
+          <filename class="libraryfile">libbz2.so</filename> library and links
+          the Bzip2 utilities against it.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile and test the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the programs:</para>
+
+<screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
+
+    <para>Install the shared library:</para>
+<screen><userinput remap="install">cp -av libbz2.so.* /usr/lib
+ln -sv libbz2.so.&bzip2-version; /usr/lib/libbz2.so</userinput></screen>
+
+    <para>Install the shared <command>bzip2</command> binary into the
+    <filename class="directory">/usr/bin</filename> directory, and replace
+    two copies of <command>bzip2</command> with symlinks:</para>
+
+<screen><userinput remap="install">cp -v bzip2-shared /usr/bin/bzip2
+for i in /usr/bin/{bzcat,bunzip2}; do
+  ln -sfv bzip2 $i
+done</userinput></screen>
+
+    <para>Remove a useless static library:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/libbz2.a</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/chapter07.xml LFS-pacman/chapter07/chapter07.xml
--- LFS_orig/chapter07/chapter07.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter07/chapter07.xml	2022-06-16 20:05:13.897855758 -0500
@@ -24,6 +24,36 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="texinfo.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="util-linux.xml"/>
 
+  <!-- These required for pacman packagemanagement -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libgpg-error.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libassuan.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pth.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libgcrypt.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libksba.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtasn1.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sqlite.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="nettle.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libarchive.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkg-config.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python-2nd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="setuptools.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pip.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fakeroot.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="curl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pacman.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pacman-contrib.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>
+
 <!--
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>
diff -Naurp LFS_orig/chapter07/coreutils.xml LFS-pacman/chapter07/coreutils.xml
--- LFS_orig/chapter07/coreutils.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/coreutils.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,76 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-coreutils-2" role="wrap">
+
+  <?dbhtml filename="coreutils.html"?>
+
+  <sect1info condition="script">
+    <productname>coreutils</productname>
+    <productnumber>&coreutils-version;</productnumber>
+    <address>&coreutils-url;</address>
+  </sect1info>
+
+  <title>Coreutils-&coreutils-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Coreutils package contains utilities for showing and setting the
+    basic system characteristics.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&coreutils-fin-sbu;</seg>
+        <seg>&coreutils-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Coreutils</title>
+
+    <para>Prepare Coreutils for compilation:</para>
+
+    <screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1 ./configure       \
+    --prefix=/usr \
+    --enable-no-install-program=kill,uptime</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--enable-no-install-program=kill,uptime</parameter></term>
+        <listitem>
+          <para>The purpose of this switch is to prevent Coreutils from
+          installing binaries that will be installed by other packages later.
+          </para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+    <para>Move programs to the locations specified by the FHS:</para>
+
+<screen><userinput remap="install">mv -v /usr/bin/chroot /usr/sbin
+mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
+sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/createfiles.xml LFS-pacman/chapter07/createfiles.xml
--- LFS_orig/chapter07/createfiles.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter07/createfiles.xml	2022-06-16 20:05:13.897855758 -0500
@@ -66,6 +66,7 @@ bin:x:1:1:bin:/dev/null:/usr/bin/false
 daemon:x:6:6:Daemon User:/dev/null:/usr/bin/false
 messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/usr/bin/false
 uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false
+pacman:x:102:102:Pacman Packaging User:/home/pacman:/bin/bash
 nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false</literal>
 EOF</userinput></screen>
 
@@ -83,6 +84,7 @@ systemd-timesync:x:78:78:systemd Time Sy
 systemd-coredump:x:79:79:systemd Core Dumper:/:/usr/bin/false
 uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/usr/bin/false
 systemd-oom:x:81:81:systemd Out Of Memory Daemon:/:/usr/bin/false
+pacman:x:102:102:Pacman Packaging User:/home/pacman:/bin/bash
 nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false</literal>
 EOF</userinput></screen>
 
@@ -116,6 +118,7 @@ mail:x:34:
 kvm:x:61:
 uuidd:x:80:
 wheel:x:97:
+pacman:x:102:
 users:x:999:
 nogroup:x:65534:</literal>
 EOF</userinput></screen>
@@ -153,6 +156,7 @@ systemd-coredump:x:79:
 uuidd:x:80:
 systemd-oom:x:81:
 wheel:x:97:
+pacman:x:102:
 users:x:999:
 nogroup:x:65534:</literal>
 EOF</userinput></screen>
diff -Naurp LFS_orig/chapter07/curl.xml LFS-pacman/chapter07/curl.xml
--- LFS_orig/chapter07/curl.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/curl.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,125 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-curl" role="wrap">
+  <?dbhtml filename="curl.html"?>
+
+  <sect1info condition="script">
+    <productname>curl</productname>
+    <productnumber>&curl-version;</productnumber>
+    <address>&curl-url;</address>
+  </sect1info>
+
+  <title>Curl-&curl-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>cURL</application> package contains an utility
+      and a library used for transferring files with URL syntax to any of
+      the following protocols: FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP,
+      TELNET, DICT, LDAP, LDAPS and FILE. Its ability to both download
+      and upload files can be incorporated into other programs to support
+      functions like streaming media.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&curl-fin-sbu;</seg>
+        <seg>&curl-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title/>
+
+    <para>
+      Configure <application>cURL</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr                           \
+            --disable-static                        \
+            --enable-threaded-resolver              \
+            --with-openssl                          \
+            --with-ca-path=/etc/ssl/certs</userinput></screen>
+
+    <para>
+      Build <application>cURL</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>cURL</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--enable-threaded-resolver</parameter>: This switch enables
+      <application>cURL</application>'s builtin threaded DNS resolver.
+    </para>
+
+    <para>
+      <parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
+      switch sets the location of the BLFS Certificate Authority store.
+    </para>
+
+    <para>
+      <option>--with-gssapi</option>: This parameter adds
+      <application>Kerberos 5</application> support to
+      <filename class="libraryfile">libcurl</filename>.
+    </para>
+
+    <para>
+      <option>--without-ssl --with-gnutls</option>: Use to
+      build with <application>GnuTLS</application> support
+      instead of <application>OpenSSL</application> for SSL/TLS.
+    </para>
+
+    <para>
+      <option>--with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt</option>: Use
+      this switch instead of <parameter>--with-ca-path</parameter> if
+      building with <application>GnuTLS</application> support
+      instead of <application>OpenSSL</application> for SSL/TLS.
+    </para>
+
+    <para>
+      <option>--with-libssh2</option>: This paramater adds
+      <application>SSH</application> support to cURL. This is disabled
+      by default.
+    </para>
+
+    <para>
+      <option>--enable-ares</option>: This paramater adds
+      support for DNS resolution through the c-ares library. It is disabled
+      by default, but does speed up DNS resolution queries.
+    </para>
+
+    <para>
+      <command>find docs ... -exec rm {} \;</command>: This command removes
+      <filename>Makefiles</filename> and man files from the documentation
+      directory that would otherwise be installed by the commands that follow.
+    </para>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/expat.xml LFS-pacman/chapter07/expat.xml
--- LFS_orig/chapter07/expat.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/expat.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-expat" role="wrap">
+  <?dbhtml filename="expat.html"?>
+
+  <sect1info condition="script">
+    <productname>expat</productname>
+    <productnumber>&expat-version;</productnumber>
+    <address>&expat-url;</address>
+  </sect1info>
+
+  <title>Expat-&expat-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Expat package contains a stream oriented C library for
+    parsing XML.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&expat-fin-sbu;</seg>
+        <seg>&expat-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Expat</title>
+
+    <para>Prepare Expat for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr    \
+            --disable-static \
+            --docdir=/usr/share/doc/expat-&expat-version;</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/fakeroot.xml LFS-pacman/chapter07/fakeroot.xml
--- LFS_orig/chapter07/fakeroot.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/fakeroot.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,55 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-fakeroot" role="wrap">
+  <?dbhtml filename="fakeroot.html"?>
+
+  <sect1info condition="script">
+    <productname>fakeroot</productname>
+    <productnumber>&fakeroot-version;</productnumber>
+    <address>&fakeroot-url;</address>
+  </sect1info>
+
+  <title>Fakeroot-&fakeroot-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Fakeroot package contains programs for simulating superuser
+    privileges.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&fakeroot-fin-sbu;</seg>
+        <seg>&fakeroot-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Fakeroot</title>
+
+    <para>Prepare Fakeroot for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static
+sed '/SUBDIRS/s/doc //' -i Makefile</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/gmp.xml LFS-pacman/chapter07/gmp.xml
--- LFS_orig/chapter07/gmp.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/gmp.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,95 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-gmp" role="wrap">
+  <?dbhtml filename="gmp.html"?>
+
+  <sect1info condition="script">
+    <productname>gmp</productname>
+    <productnumber>&gmp-version;</productnumber>
+    <address>&gmp-url;</address>
+  </sect1info>
+
+  <title>GMP-&gmp-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The GMP package contains math libraries. These have useful functions
+    for arbitrary precision arithmetic.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gmp-fin-sbu;</seg>
+        <seg>&gmp-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of GMP</title>
+
+    <note>
+      <para>If you are building for 32-bit x86, but you have a CPU which is
+      capable of running 64-bit code <emphasis>and</emphasis> you have specified
+      <envar>CFLAGS</envar> in the environment, the configure script will
+      attempt to configure for 64-bits and fail.
+      Avoid this by invoking the configure command below with
+<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
+    </note>
+
+      <para>The default settings of GMP produce libraries optimized for the
+      host processor. Build generic libraries, suitable for package managment
+      by running the following:</para>
+
+<screen><userinput>cp -v configfsf.guess config.guess
+cp -v configfsf.sub   config.sub</userinput></screen>
+
+    <para>Prepare GMP for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr    \
+            --enable-cxx     \
+            --disable-static \
+            --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the new configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--enable-cxx</parameter></term>
+        <listitem>
+          <para>This parameter enables C++ support</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--docdir=/usr/share/doc/gmp-&gmp-version;</parameter></term>
+        <listitem>
+          <para>This variable specifies the correct place for the
+          documentation.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package and generate the HTML documentation:</para>
+
+<screen><userinput remap="make">make
+make html</userinput></screen>
+
+    <para>Install the package and its documentation:</para>
+
+<screen><userinput remap="install">make install
+make install-html</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libarchive.xml LFS-pacman/chapter07/libarchive.xml
--- LFS_orig/chapter07/libarchive.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libarchive.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,65 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libarchive" role="wrap">
+  <?dbhtml filename="libarchive.html"?>
+
+  <sect1info condition="script">
+    <productname>libarchive</productname>
+    <productnumber>&libarchive-version;</productnumber>
+    <address>&libarchive-url;</address>
+  </sect1info>
+
+  <title>Libarchive-&libarchive-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libarchive</application> library provides a single
+      interface for reading/writing various compression formats.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libarchive-fin-sbu;</seg>
+        <seg>&libarchive-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libarchive</title>
+
+    <para>
+      Configure <application>libarchive</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>
+      Build <application>libarchive</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>libarchive</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libassuan.xml LFS-pacman/chapter07/libassuan.xml
--- LFS_orig/chapter07/libassuan.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libassuan.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,73 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libassuan" role="wrap">
+  <?dbhtml filename="libassuan.html"?>
+
+  <sect1info condition="script">
+    <productname>libassuan</productname>
+    <productnumber>&libassuan-version;</productnumber>
+    <address>&libassuan-url;</address>
+  </sect1info>
+
+  <title>Libassuan-&libassuan-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libassuan</application> package contains an inter
+      process communication library used by some of the other
+      <application>GnuPG</application> related packages.
+      <application>libassuan</application>'s primary use is to allow a
+      client to interact with a non-persistent server.
+      <application>libassuan</application> is not, however, limited to
+      use with <application>GnuPG</application> servers and clients. It
+      was designed to be flexible enough to meet the demands of many
+      transaction based environments with non-persistent servers.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libassuan-fin-sbu;</seg>
+        <seg>&libassuan-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Libassuan</title>
+
+    <para>
+      Install <application>libassuan</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
+
+    <para>
+      Compile the package:
+    </para>
+
+<screen><userinput remap="make">make
+make -C doc html
+makeinfo --html --no-split -o doc/assuan_nochunks.html doc/assuan.texi
+makeinfo --plaintext       -o doc/assuan.txt           doc/assuan.texi</userinput></screen>
+
+    <para>
+      Install the package:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libcap.xml LFS-pacman/chapter07/libcap.xml
--- LFS_orig/chapter07/libcap.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libcap.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,70 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libcap" role="wrap">
+  <?dbhtml filename="libcap.html"?>
+
+  <sect1info condition="script">
+    <productname>libcap</productname>
+    <productnumber>&libcap-version;</productnumber>
+    <address>&libcap-url;</address>
+  </sect1info>
+
+  <title>Libcap-&libcap-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Libcap package implements the user-space interfaces to the POSIX
+    1003.1e capabilities available in Linux kernels. These capabilities are a
+    partitioning of the all powerful root privilege into a set of distinct
+    privileges.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libcap-fin-sbu;</seg>
+        <seg>&libcap-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Libcap</title>
+
+    <para>Prevent static libraries from being installed:</para>
+
+<screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the make option:</title>
+
+      <varlistentry>
+        <term><parameter>lib=lib</parameter></term>
+        <listitem>
+          <para>This parameter sets the library directory to
+          <filename>/usr/lib</filename> rather than
+          <filename>/usr/lib64</filename> on x86_64. It has no effect on
+          x86.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make prefix=/usr lib=lib install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libffi.xml LFS-pacman/chapter07/libffi.xml
--- LFS_orig/chapter07/libffi.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libffi.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libffi" role="wrap">
+  <?dbhtml filename="libffi.html"?>
+
+  <sect1info condition="script">
+    <productname>libffi</productname>
+    <productnumber>&libffi-version;</productnumber>
+    <address>&libffi-url;</address>
+  </sect1info>
+
+  <title>Libffi-&libffi-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Libffi library provides a portable, high level programming
+    interface to various calling conventions. This allows a programmer to call
+    any function specified by a call interface description at run time.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libffi-fin-sbu;</seg>
+        <seg>&libffi-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Libffi</title>
+
+    <para>Prepare libffi for compilation:</para>
+
+    <screen><userinput remap="configure">./configure --prefix=/usr      \
+            --disable-static   \
+            --without-gcc-arch \
+            --disable-exec-static-tramp</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><parameter>--without-gcc-arch</parameter></term>
+        <listitem>
+          <para>Ensure GCC does not optimizes specifically for the current
+	      system. If this is not specified, the system is guessed and the code
+          generated may not be correct for some systems.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <!-- To editors: try to remove it once GJS fixed (at GNOME 43) -->
+        <term><parameter>--disable-exec-static-tramp</parameter></term>
+        <listitem>
+          <para>Disable static trampoline support.  It's a new security
+          feature in libffi, but some BLFS packages (notably
+          <application>GJS</application>) have not been adapted for it.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
+
diff -Naurp LFS_orig/chapter07/libgcrypt.xml LFS-pacman/chapter07/libgcrypt.xml
--- LFS_orig/chapter07/libgcrypt.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libgcrypt.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libgcrypt" role="wrap">
+  <?dbhtml filename="libgcrypt.html"?>
+
+  <sect1info condition="script">
+    <productname>libgcrypt</productname>
+    <productnumber>&libgcrypt-version;</productnumber>
+    <address>&libgcrypt-url;</address>
+  </sect1info>
+
+  <title>Libgcrypt-&libgcrypt-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libgcrypt</application> package contains a general
+      purpose crypto library based on the code used in
+      <application>GnuPG</application>. The library provides a high level
+      interface to cryptographic building blocks using an extendable and flexible
+      API.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libgcrypt-fin-sbu;</seg>
+        <seg>&libgcrypt-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libgcrypt</title>
+
+    <para>
+      Configure <application>libgcrypt</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
+
+    <para>
+      Build <application>libgcrypt</application> with the following commands:
+    </para>
+
+<screen><userinput remap="make">make
+make -C doc html
+makeinfo --html --no-split -o doc/gcrypt_nochunks.html doc/gcrypt.texi
+makeinfo --plaintext       -o doc/gcrypt.txt           doc/gcrypt.texi</userinput></screen>
+
+    <para>
+      Now install the package:
+    </para>
+
+    <screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <option>--with-capabilities</option>: This option enables libcap2 support.
+    </para>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libgpg-error.xml LFS-pacman/chapter07/libgpg-error.xml
--- LFS_orig/chapter07/libgpg-error.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libgpg-error.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libgpg-error" role="wrap">
+  <?dbhtml filename="libgpg-error.html"?>
+
+  <sect1info condition="script">
+    <productname>libgpg-error</productname>
+    <productnumber>&libgpg-error-version;</productnumber>
+    <address>&libgpg-error-url;</address>
+  </sect1info>
+
+  <title>Libgpg-error-&libgpg-error-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>Libgpg-error</application> package contains a
+      library that defines common error values for all
+      <application>GnuPG</application> components.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libgpg-error-fin-sbu;</seg>
+        <seg>&libgpg-error-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libgpg-error</title>
+
+    <para>
+      Prepare <application>libgpg-error</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr
+make</userinput></screen>
+
+    <para>
+      Now, install <application>libgpg-error</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libksba.xml LFS-pacman/chapter07/libksba.xml
--- LFS_orig/chapter07/libksba.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libksba.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libksba" role="wrap">
+  <?dbhtml filename="libksba.html"?>
+
+  <sect1info condition="script">
+    <productname>libksba</productname>
+    <productnumber>&libksba-version;</productnumber>
+    <address>&libksba-url;</address>
+  </sect1info>
+
+  <title>Libksba-&libksba-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>Libksba</application> package contains a library
+      used to make X.509 certificates as well as making the CMS (Cryptographic
+      Message Syntax) easily accessible by other applications. Both
+      specifications are building blocks of S/MIME and TLS. The library does
+      not rely on another cryptographic library but provides hooks for easy
+      integration with <application>Libgcrypt</application>.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libksba-fin-sbu;</seg>
+        <seg>&libksba-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Libksba</title>
+
+    <para>
+      Configure <application>Libksba</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
+
+    <para>
+      Build <application>Libksba</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install with the following command:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/libtasn1.xml LFS-pacman/chapter07/libtasn1.xml
--- LFS_orig/chapter07/libtasn1.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/libtasn1.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,66 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-libtasn1" role="wrap">
+  <?dbhtml filename="libtasn1.html"?>
+
+  <sect1info condition="script">
+    <productname>libtasn1</productname>
+    <productnumber>&libtasn1-version;</productnumber>
+    <address>&libtasn1-url;</address>
+  </sect1info>
+
+  <title>Libtasn1-&libtasn1-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      <application>libtasn1</application> is a highly portable C library
+      that encodes and decodes DER/BER data following an ASN.1 schema.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libtasn1-fin-sbu;</seg>
+        <seg>&libtasn1-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libtasn1</title>
+
+    <para>
+      Configure <application>libtasn1</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>
+      Build <application>libtasn1</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+
+    <para>
+      Install <application>libtasn1</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/meson.xml LFS-pacman/chapter07/meson.xml
--- LFS_orig/chapter07/meson.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/meson.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-meson" role="wrap">
+  <?dbhtml filename="meson.html"?>
+
+  <sect1info condition="script">
+    <productname>meson</productname>
+    <productnumber>&meson-version;</productnumber>
+    <address>&meson-url;</address>
+  </sect1info>
+
+  <title>Meson-&meson-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>Meson is an open source build system meant to be both extremely fast
+    and as user friendly as possible.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+      <seglistitem>
+        <seg>&meson-fin-sbu;</seg>
+        <seg>&meson-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Meson</title>
+<!--
+    <para>First, apply a patch that fixes an issue identified upstream:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&meson-fix-patch;</userinput></screen>
+-->
+    <para>Compile Meson with the following command:</para>
+
+<screen><userinput remap="make">python3 setup.py install --root=dest</userinput></screen>
+
+    <para>The test suite requires some packages out of the scope of LFS.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">cp -rv dest/* /</userinput></screen>
+
+  </sect2>
+
+</sect1>
+
diff -Naurp LFS_orig/chapter07/nettle.xml LFS-pacman/chapter07/nettle.xml
--- LFS_orig/chapter07/nettle.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/nettle.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-nettle" role="wrap">
+  <?dbhtml filename="nettle.html"?>
+
+  <sect1info condition="script">
+    <productname>nettle</productname>
+    <productnumber>&nettle-version;</productnumber>
+    <address>&nettle-url;</address>
+  </sect1info>
+
+  <title>Nettle-&nettle-version;</title>
+
+  <sect2 role="package">
+    <title>Introduction to Nettle</title>
+
+    <para>
+      The <application>Nettle</application> package contains a low-level
+      cryptographic library that is designed to fit easily in many contexts.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&nettle-fin-sbu;</seg>
+        <seg>&nettle-fin-du;</seg>
+      </seglistitem>
+      </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Nettle</title>
+
+    <para>
+      Install <application>Nettle</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput>./configure --prefix=/usr --disable-static &amp;&amp;
+make</userinput></screen>
+
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>make install
+chmod   -v   755 /usr/lib/lib{hogweed,nettle}.so</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/ninja.xml LFS-pacman/chapter07/ninja.xml
--- LFS_orig/chapter07/ninja.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/ninja.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-ninja" role="wrap">
+  <?dbhtml filename="ninja.html"?>
+
+  <sect1info condition="script">
+    <productname>ninja</productname>
+    <productnumber>&ninja-version;</productnumber>
+    <address>&ninja-url;</address>
+  </sect1info>
+
+  <title>Ninja-&ninja-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>Ninja is a small build system with a focus on speed.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&ninja-fin-sbu;</seg>
+        <seg>&ninja-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Ninja</title>
+
+    <para>When run, ninja normally runs a maximum number of processes
+    in parallel.  By default this is the number of cores on the system
+    plus two.  In some cases this can overheat a CPU or run a system out
+    of memory.  If run from the command line, passing a -jN parameter
+    will limit the number of parallel processes, but some packages
+    embed the execution of ninja and do not pass a -j parameter.</para>
+
+    <para>Using the <emphasis>optional</emphasis> procedure below allows a user to
+    limit the number of parallel processes via an environment variable,
+    NINJAJOBS.  <emphasis role="bold">For example</emphasis>, setting:
+
+    <screen>export NINJAJOBS=4</screen>
+
+    will limit ninja to four parallel processes.</para>
+
+    <para>If desired, add the capability to use the environment variable
+    NINJAJOBS by running:</para>
+
+<screen><userinput remap="pre">sed -i '/int Guess/a \
+  int   j = 0;\
+  char* jobs = getenv( "NINJAJOBS" );\
+  if ( jobs != NULL ) j = atoi( jobs );\
+  if ( j > 0 ) return j;\
+' src/ninja.cc</userinput></screen>
+
+    <para>Build Ninja with:</para>
+
+<screen><userinput remap="configure">python3 configure.py --bootstrap</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the build option:</title>
+
+      <varlistentry>
+        <term><parameter>--bootstrap</parameter></term>
+        <listitem>
+          <para>This parameter forces ninja to rebuild itself for the current
+          system.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">install -vm755 ninja /usr/bin/</userinput></screen>
+
+  </sect2>
+
+</sect1>
+
diff -Naurp LFS_orig/chapter07/openssl.xml LFS-pacman/chapter07/openssl.xml
--- LFS_orig/chapter07/openssl.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/openssl.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-openssl" role="wrap">
+  <?dbhtml filename="openssl.html"?>
+
+  <sect1info condition="script">
+    <productname>openssl</productname>
+    <productnumber>&openssl-version;</productnumber>
+    <address>&openssl-url;</address>
+  </sect1info>
+
+  <title>OpenSSL-&openssl-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The OpenSSL package contains  management tools and libraries relating
+    to cryptography. These are useful for providing cryptographic functions
+    to other packages, such as OpenSSH, email applications, and web browsers
+    (for accessing HTTPS sites).  </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&openssl-fin-sbu;</seg>
+        <seg>&openssl-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of OpenSSL</title>
+
+    <para>Prepare OpenSSL for compilation:</para>
+
+<screen><userinput remap="configure">./config --prefix=/usr         \
+         --openssldir=/etc/ssl \
+         --libdir=lib          \
+         shared                \
+         zlib-dynamic</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make test</userinput></screen>
+
+    <para>One test, 30-test_afalg.t, is known to fail on some kernel
+    configurations (depending on inconsistent values of
+    CONFIG_CRYPTO_USER_API* settings.) If it fails, it can safely be
+    ignored.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
+make MANSUFFIX=ssl install</userinput></screen>
+
+    <para>Add the version to the documentation directory name, to be
+    consistent with other packages:</para>
+
+<screen><userinput remap="install">mv -v /usr/share/doc/openssl /usr/share/doc/openssl-&openssl-version;</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/pacman-contrib.xml LFS-pacman/chapter07/pacman-contrib.xml
--- LFS_orig/chapter07/pacman-contrib.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/pacman-contrib.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-pacman-contrib" role="wrap">
+  <?dbhtml filename="pacman-contrib.html"?>
+
+  <sect1info condition="script">
+    <productname>pacman-contrib</productname>
+    <productnumber>&pacman-contrib-version;</productnumber>
+    <address>&pacman-contrib-url;</address>
+  </sect1info>
+
+  <title>Pacman-contirb-&pacman-contrib-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Pacman-contirb package contains scripts and tools for Pacman
+    systems.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pacman-contrib-fin-sbu;</seg>
+        <seg>&pacman-contrib-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Pacman-contirb</title>
+
+    <para>Prepare Pacman-contirb for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr        \
+            --sysconfdir=/etc    \
+            --localstatedir=/var \
+            --disable-doc</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install
+rm -rf /usr/share/vim</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/pacman.xml LFS-pacman/chapter07/pacman.xml
--- LFS_orig/chapter07/pacman.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/pacman.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,117 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-pacman" role="wrap">
+  <?dbhtml filename="pacman.html"?>
+
+  <sect1info condition="script">
+    <productname>pacman</productname>
+    <productnumber>&pacman-version;</productnumber>
+    <address>&pacman-url;</address>
+  </sect1info>
+
+  <title>Pacman-&pacman-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Pacman package contains programs for simulating superuser
+    privileges.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pacman-fin-sbu;</seg>
+        <seg>&pacman-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Pacman</title>
+
+    <para>Fix a few post-release issues:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../&pacman-fixes-patch;</userinput></screen>
+
+    <para>Prepare Pacman for compilation:</para>
+
+<screen><userinput remap="configure">tar -xf ../pacman-hooks-&pacman-hooks-version;.tar.xz
+meson --prefix=/usr                   \
+      --buildtype=plain               \
+      -Ddoc=disabled                  \
+      -Ddoxygen=disabled              \
+      -Dscriptlet-shell=/usr/bin/bash \
+      -Dldconfig=/usr/bin/ldconfig    \
+      build</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">meson compile -C build</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">meson install -C build</userinput></screen>
+
+    <para>Install the hooks:</para>
+
+<screen revision="sysv"><userinput remap="install">rm -f pacman-hooks-&pacman-hooks-version;/hooks/*systemd*
+rm -f pacman-hooks-&pacman-hooks-version;/hooks/dbus-reload.hook
+rm -f pacman-hooks-&pacman-hooks-version;/scripts/*systemd*
+sed '/^Target/s@/\*@/*.info*@' -i \
+    pacman-hooks-&pacman-hooks-version;/hooks/texinfo-install.hook
+install -vdm755 /usr/share/libalpm/{hooks,scripts}/
+install -vm644  pacman-hooks-&pacman-hooks-version;/hooks/* \
+                /usr/share/libalpm/hooks/
+install -vm755  pacman-hooks-&pacman-hooks-version;/scripts/* \
+                /usr/share/libalpm/scripts/</userinput></screen>
+
+    <para>Modify the makepkg.conf file:</para>
+
+<screen><userinput remap="install">cat &gt;&gt; /etc/makepkg.conf &lt;&lt; "EOF"
+<literal>PACKAGER="Linux From Scratch &gt;lfs-dev@lists.linuxfromscrtch.org&lt;"
+PKGDEST="/srv/pacman/repos/LFS"
+SRCDEST="/sources"
+LOGDEST="/srv/pacman/logs/LFS"
+EOF
+sed -e /PKGEXT/s/gz/xz/                                \
+    -e /SRCEXT/s/gz/xz/                                \
+    -e /^INTEGRITY/s/ck/md5/                           \
+    -e '/^OPTIONS/s/\([^!]\)emptydirs/\1!emptydirs/'   \
+    -e '/^OPTIONS/s/\([^!]\)libtoo/\1!libtool/'        \
+    -e '/^OPTIONS/s/\([^!]\)staticlibs/\1!staticlibs/' \
+    -i /etc/makepkg.conf</literal></userinput></screen>
+
+    <para>Modify the pacman.conf file:</para>
+
+<screen><userinput remap="install">cat &gt;&gt; /etc/pacman.conf &lt;&lt; "EOF"
+<literal>
+[LFS]
+# Uncomment after GPGME is installed in the final build
+# SigLevel = Optional TrustAll
+Server = file:///srv/pacman/repos/LFS
+
+EOF</literal></userinput></screen>
+
+    <para>Initialize the Main repository. In this case, you want the directory
+    to be writable by anybody in the
+    <systemitem class="username">pacman</systemitem>. In addition, we set the
+    group sticky bit (2) so that any direcoties created will also have the same
+    group ownership.</para>
+
+<screen><userinput remap="install">install -o pacman -d /home/pacman
+install -o root -g pacman -vdm2775 /srv/pacman/{repos,source,logs}/LFS
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz
+pacman -Tv
+pacman -Syu</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/pip.xml LFS-pacman/chapter07/pip.xml
--- LFS_orig/chapter07/pip.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/pip.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,52 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-pip" role="wrap">
+  <?dbhtml filename="pip.html"?>
+
+  <sect1info condition="script">
+    <productname>pip</productname>
+    <productnumber>&pip-version;</productnumber>
+    <address>&pip-url;</address>
+  </sect1info>
+
+  <title>pip-&pip-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The pip package provides a method to easily download, build,
+    install, upgrade, and uninstall Python packages</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pip-fin-sbu;</seg>
+        <seg>&pip-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of pip</title>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">python3 setup.py build</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">python3 setup.py install --prefix=/usr --optimize=1
+ln -sfv pip3.10 /usr/bin/pip3
+ln -sfv pip3.10 /usr/bin/pip</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/pkg-config.xml LFS-pacman/chapter07/pkg-config.xml
--- LFS_orig/chapter07/pkg-config.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/pkg-config.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,83 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-pkgconfig" role="wrap">
+  <?dbhtml filename="pkg-config.html"?>
+
+  <sect1info condition="script">
+    <productname>pkg-config</productname>
+    <productnumber>&pkgconfig-version;</productnumber>
+    <address>&pkgconfig-url;</address>
+  </sect1info>
+
+  <title>Pkg-config-&pkgconfig-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The pkg-config package contains a tool for passing the include path
+    and/or library paths to build tools during the configure and make phases
+    of package installations.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pkgconfig-fin-sbu;</seg>
+        <seg>&pkgconfig-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Pkg-config</title>
+
+    <para>Prepare Pkg-config for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr              \
+            --with-internal-glib       \
+            --disable-host-tool        \
+            --docdir=/usr/share/doc/pkg-config-&pkgconfig-version;</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the new configure options:</title>
+
+      <varlistentry>
+        <term><parameter>--with-internal-glib</parameter></term>
+        <listitem>
+          <para>This will allow pkg-config to use its internal version of
+          Glib because an external version is not available in LFS.</para>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry>
+        <term><parameter>--disable-host-tool</parameter></term>
+        <listitem>
+          <para>This option disables the creation of an undesired hard link
+          to the pkg-config program.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/pth.xml LFS-pacman/chapter07/pth.xml
--- LFS_orig/chapter07/pth.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/pth.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-pth" role="wrap">
+  <?dbhtml filename="pth.html"?>
+
+  <sect1info condition="script">
+    <productname>pth</productname>
+    <productnumber>&pth-version;</productnumber>
+    <address>&pth-url;</address>
+  </sect1info>
+
+  <title>Pth-&pth-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>Pth</application> package contains a very portable
+      POSIX/ANSI-C based library for Unix platforms which provides
+      non-preemptive priority-based scheduling for multiple threads of
+      execution (multithreading) inside event-driven applications. All
+      threads run in the same address space of the server application, but
+      each thread has its own individual program-counter, run-time stack,
+      signal mask and errno variable.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pth-fin-sbu;</seg>
+        <seg>&pth-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+
+  <sect2 role="installation">
+    <title>Installation of Pth</title>
+
+    <caution>
+      <para>
+        Don't add the <option>--enable-pthread</option> parameter to the
+        <command>configure</command> command below else you will overwrite the
+        pthread library and interface header installed by the
+        <application>Glibc</application> package in LFS.
+      </para>
+    </caution>
+
+    <para>
+      Install <application>Pth</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="configure">sed -i 's#$(LOBJS): Makefile#$(LOBJS): pth_p.h Makefile#' Makefile.in
+./configure --prefix=/usr           \
+            --disable-static        \
+            --mandir=/usr/share/man</userinput></screen>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install the package with the following commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/python-2nd.xml LFS-pacman/chapter07/python-2nd.xml
--- LFS_orig/chapter07/python-2nd.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/python-2nd.xml	2022-06-16 20:05:13.897855758 -0500
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-Python-2nd" role="wrap">
+  <?dbhtml filename="Python-2nd.html"?>
+
+  <sect1info condition="script">
+    <productname>Python</productname>
+    <productnumber>&python-version;</productnumber>
+    <address>&python-url;</address>
+  </sect1info>
+
+  <title>Python-&python-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Python 3 package contains the Python development environment. It
+    is useful for object-oriented programming, writing scripts, prototyping
+    large programs, or developing entire applications.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&python-fin-sbu;</seg>
+        <seg>&python-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Reinstallation of Python 3</title>
+
+    <para>Prepare Python for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr        \
+            --enable-shared      \
+            --with-system-expat  \
+            --with-system-ffi    \
+            --enable-optimizations</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure options:</title>
+
+    <varlistentry>
+      <term><parameter>--with-system-expat</parameter></term>
+      <listitem>
+        <para>This switch enables linking against system version of
+        <application>Expat</application>.</para>
+       </listitem>
+     </varlistentry>
+
+    <varlistentry>
+      <term><parameter>--with-system-ffi</parameter></term>
+      <listitem>
+        <para>This switch enables linking against system version of
+        <application>libffi</application>.</para>
+      </listitem>
+    </varlistentry>
+
+    <varlistentry>
+      <term><parameter>--enable-optimizations</parameter></term>
+      <listitem>
+        <para>This switch enables stable, but expensive, optimizations.</para>
+      </listitem>
+    </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Running the tests at this point is not recommended.  The
+    tests are known to hang indefinitely in the partial LFS environment.
+    If desired, the tests can be rerun at the end of this chapter or
+    when Python 3 is reinstalled in BLFS.  To run the tests anyway,
+    issue <command>make test</command>.</para>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+    <para>In serveral places we use the <command>pip3</command> command to
+    install Python 3 programs and modules for all users as
+    <systemitem class='username'>root</systemitem>. This conflicts
+    with the Python developers recommendation to install packages into a
+    virtual environment or the home directory of a regular user (by running
+    <command>pip3</command> as this user). To this end, a multi-line warning
+    is written when using <command>pip3</command> as the
+    <systemitem class='username'>root</systemitem> user.  The main reason
+    of this recommendation is for avoiding a conflict with the system
+    package manager (<command>pacman</command>). Suppress this warning by
+    running the following command:</para>
+
+<screen><userinput remap="install">sed -e '/def warn_if_run_as_root/a\    return' \
+    -i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py
+</userinput></screen>
+
+    <important>
+      <para>
+        In LFS and BLFS we normally build and install Python modules with the
+        <command>pip3</command> command.  Please take care that the
+        <command>pip3 install</command> commands in both the books should be
+        run as the &root; user unless it's for a Python virtual environment.
+        Running a <command>pip3 install</command> as a non-&root; user may seem
+        to work fine, but it will cause the installed module to be inaccessible
+        by other users.
+      </para>
+
+      <para>
+        <command>pip3 install</command> will not reinstall an already installed
+        module by default.  For using the <command>pip3 install</command>
+        command to upgrade a module (for example, from meson-0.61.3 to
+        meson-0.62.0), insert the option <parameter>--upgrade</parameter> into
+        the command line.  If it's really necessary to downgrade a module or
+        reinstall the same version for some reason, insert 
+        <parameter>--force-reinstall</parameter> into the command line.
+      </para>
+    </important>
+
+    <variablelist>
+      <title>The meaning of the documentation install commands:</title>
+
+    <varlistentry>
+      <term><option>--no-same-owner</option> and <option>--no-same-permissions</option></term>
+      <listitem>
+        <para>Ensure the installed files have the correct ownership and
+        permissions.  Without these options, using <application>tar</application>
+        will install the package files with the upstream creator's values.
+        </para>
+      </listitem>
+    </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
+
diff -Naurp LFS_orig/chapter07/setuptools.xml LFS-pacman/chapter07/setuptools.xml
--- LFS_orig/chapter07/setuptools.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/setuptools.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,50 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-setuptools" role="wrap">
+  <?dbhtml filename="setuptools.html"?>
+
+  <sect1info condition="script">
+    <productname>setuptools</productname>
+    <productnumber>&setuptools-version;</productnumber>
+    <address>&setuptools-url;</address>
+  </sect1info>
+
+  <title>setuptools-&setuptools-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The setuptools package provides a method to easily download, build,
+    install, upgrade, and uninstall Python packages</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&setuptools-fin-sbu;</seg>
+        <seg>&setuptools-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of setuptools</title>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">python3 setup.py build</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">python3 setup.py install --optimize=1 --skip-build</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/shadow.xml LFS-pacman/chapter07/shadow.xml
--- LFS_orig/chapter07/shadow.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/shadow.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,137 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-shadow" role="wrap">
+  <?dbhtml filename="shadow.html"?>
+
+  <sect1info condition="script">
+    <productname>shadow</productname>
+    <productnumber>&shadow-version;</productnumber>
+    <address>&shadow-url;</address>
+  </sect1info>
+
+  <title>Shadow-&shadow-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Shadow package contains programs for handling passwords in a secure
+    way.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&shadow-fin-sbu;</seg>
+        <seg>&shadow-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Shadow</title>
+
+    <note>
+      <para>If you would like to enforce the use of strong passwords, refer to
+      <ulink url="&blfs-book;postlfs/cracklib.html"/> for installing
+      CrackLib prior to building Shadow. Then add
+      <parameter>--with-libcrack</parameter> to the <command>configure</command>
+      command below.</para>
+    </note>
+
+    <para>Disable the installation of the <command>groups</command> program
+    and its man pages, as Coreutils provides a better version. Also,
+    prevent the installation of manual pages that will be installed in
+    <xref linkend="ch-system-man-pages"/>:</para>
+
+<screen><userinput remap="pre">sed -i 's/groups$(EXEEXT) //' src/Makefile.in
+find man -name Makefile.in -exec sed -i 's/groups\.1 / /'   {} \;
+find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
+find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;</userinput></screen>
+
+    <para>Instead of using the default
+    <emphasis>crypt</emphasis> method, use the more secure
+    <emphasis>SHA-512</emphasis> method of password encryption, which also
+    allows passwords longer than 8 characters. It is also necessary to change
+    the obsolete <filename class="directory">/var/spool/mail</filename> location
+    for user mailboxes that Shadow uses by default to the <filename
+    class="directory">/var/mail</filename> location used currently. And,
+    get rid of <filename class="directory">/bin</filename> and
+    <filename class="directory">/sbin</filename> from <envar>PATH</envar>,
+    since they are simply symlinks to their counterpart in
+    <filename class="directory">/usr</filename>.</para>
+
+    <note>
+      <para>If <filename class="directory">/bin</filename> and/or
+      <filename class="directory">/sbin</filename> are preferred to be
+      left over in <envar>PATH</envar> for some reason, modify
+      <envar>PATH</envar> in <filename>.bashrc</filename> after LFS is
+      built.</para>
+    </note>
+
+<screen><userinput remap="pre">sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
+    -e 's:/var/spool/mail:/var/mail:'                 \
+    -e '/PATH=/{s@/sbin:@@;s@/bin:@@}'                \
+    -i etc/login.defs</userinput></screen>
+
+    <note>
+      <para>If you chose to build Shadow with Cracklib support, run the following:</para>
+
+<screen role="nodump"><userinput>sed -i 's:DICTPATH.*:DICTPATH\t/lib/cracklib/pw_dict:' etc/login.defs</userinput></screen>
+    </note>
+<!--
+    <para>Make a minor change to make the first group number generated
+    by useradd 1000:</para>
+
+<screen><userinput remap="pre">sed -i 's/1000/999/' etc/useradd</userinput></screen>
+-->
+<!--
+    <para>Fix a simple programming error by modifying a file with following command:</para>
+
+<screen><userinput remap="pre">sed -e "224s/rounds/min_rounds/" -i libmisc/salt.c</userinput></screen>
+-->
+    <para>Prepare Shadow for compilation:</para>
+
+<screen><userinput remap="configure">touch /usr/bin/passwd
+./configure --sysconfdir=/etc \
+            --disable-static  \
+            --with-group-name-max-length=32</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the configure option:</title>
+
+      <varlistentry>
+        <term><command>touch /usr/bin/passwd</command></term>
+        <listitem>
+          <para>The file <filename>/usr/bin/passwd</filename> needs
+          to exist because its location is hardcoded in some programs, and
+          if it does not exist, the default location is not right.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><parameter>--with-group-name-max-length=32</parameter></term>
+        <listitem>
+          <para>The maximum user name is 32 characters.  Make the maximum
+          group name the same.</para>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+    <para>Compile the package:</para>
+
+    <screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+    <screen><userinput remap="install">make exec_prefix=/usr install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/sqlite.xml LFS-pacman/chapter07/sqlite.xml
--- LFS_orig/chapter07/sqlite.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/sqlite.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,75 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-sqlite" role="wrap">
+  <?dbhtml filename="sqlite.html"?>
+
+  <sect1info condition="script">
+    <productname>sqlite</productname>
+    <productnumber>&sqlite-version;</productnumber>
+    <address>&sqlite-url;</address>
+  </sect1info>
+
+  <title>SQLite-&sqlite-version;</title>
+
+  <sect2 role="package">
+    <title>Introduction to SQLite</title>
+
+    <para>
+      The <application>SQLite</application> package is a software library that
+      implements a self-contained, serverless, zero-configuration, transactional
+      SQL database engine.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&sqlite-fin-sbu;</seg>
+        <seg>&sqlite-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of SQLite</title>
+
+    <para>
+      Configure <application>SQLite</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr     \
+            --disable-static  \
+            --enable-fts5     \
+            CPPFLAGS="-DSQLITE_ENABLE_FTS3=1            \
+                      -DSQLITE_ENABLE_FTS4=1            \
+                      -DSQLITE_ENABLE_COLUMN_METADATA=1 \
+                      -DSQLITE_ENABLE_UNLOCK_NOTIFY=1   \
+                      -DSQLITE_ENABLE_DBSTAT_VTAB=1     \
+                      -DSQLITE_SECURE_DELETE=1          \
+                      -DSQLITE_ENABLE_FTS3_TOKENIZER=1"</userinput></screen>
+
+    <para>
+      Build <application>SQLite</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>SQLite</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter07/zlib.xml LFS-pacman/chapter07/zlib.xml
--- LFS_orig/chapter07/zlib.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter07/zlib.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,62 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tools-zlib" role="wrap">
+  <?dbhtml filename="zlib.html"?>
+
+  <sect1info condition="script">
+    <productname>zlib</productname>
+    <productnumber>&zlib-version;</productnumber>
+    <address>&zlib-url;</address>
+  </sect1info>
+
+  <title>Zlib-&zlib-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Zlib package contains compression and decompression routines used by
+    some programs.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&zlib-fin-sbu;</seg>
+        <seg>&zlib-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Zlib</title>
+
+    <para>Prepare Zlib for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+    <para>Remove a useless static library:</para>
+
+<screen><userinput remap="install">rm -fv /usr/lib/libz.a</userinput></screen>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/acl.xml LFS-pacman/chapter08/acl.xml
--- LFS_orig/chapter08/acl.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/acl.xml	2022-06-16 20:05:13.901189092 -0500
@@ -39,9 +39,79 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Acl</title>
 
+    <para>Create the PKGBUILD for the Acl package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/acl
+cd /sources/acl
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="acl"
+pkgver="&acl-version;"
+pkgrel="1"
+pkgdesc="The Acl package contains utilities to administer Access Control Lists."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2.1')
+groups=('core')
+depends=('attr'
+         'glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'm4'
+             'make'
+             'perl'
+             'sed'
+             'texinfo')
+checkdepends=('automake'
+              'diffutils'
+              'findutils'
+              'libtool')
+source=('&acl-url;')
+md5sums=('&acl-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr         \
+              --disable-static      \
+              --docdir=/usr/share/doc/acl-${pkgver}
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/acl-&acl-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Acl package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S acl --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/acl
+cp PKGBUILD /srv/pacman/source/LFS/acl
+cd /sources
+rm -rf acl</userinput></screen>
+
     <para>Prepare Acl for compilation:</para>
 
 <screen><userinput remap="configure">./configure --prefix=/usr         \
diff -Naurp LFS_orig/chapter08/asciidoc.xml LFS-pacman/chapter08/asciidoc.xml
--- LFS_orig/chapter08/asciidoc.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/asciidoc.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,135 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-asciidoc" role="wrap">
+  <?dbhtml filename="asciidoc.html"?>
+
+  <sect1info condition="script">
+    <productname>asciidoc</productname>
+    <productnumber>&asciidoc-version;</productnumber>
+    <address>&asciidoc-url;</address>
+  </sect1info>
+
+  <title>Asciidoc-&asciidoc-version;</title>
+
+  <indexterm zone="ch-system-asciidoc">
+    <primary sortas="a-Asciidoc">Asciidoc</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to Asciidoc</title>
+
+    <para>
+      The <application>Asciidoc</application> package is a text document
+      format for writing notes, documentation, articles, books, ebooks,
+      slideshows, web pages, man pages and blogs. AsciiDoc files can be
+      translated to many formats including HTML, PDF, EPUB, and man page.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&asciidoc-fin-sbu;</seg>
+        <seg>&asciidoc-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Asciidoc</title>
+
+    <para>
+      First, fix a build problem if the optional dependencies are not installed:
+    </para>
+
+<screen><userinput remap='pre'>sed -i 's:doc/testasciidoc.1::' Makefile.in</userinput></screen>
+
+    <para>
+      Configure <application>Asciidoc</application> by running
+      the following commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr     \
+            --sysconfdir=/etc \
+            --docdir=/usr/share/doc/asciidoc-&asciidoc-version;</userinput></screen>
+    <para>
+      Build <application>Asciidoc</application> by running
+      the following commands:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>Asciidoc</application> by running
+      the following commands:
+    </para>
+
+<screen><userinput remap="install">make install
+make docs</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          a2x (symlink to a2x.py),
+          a2x.py,
+          asciidoc (symlink to asciidoc.py), and
+          asciidoc.py
+        </seg>
+        <seg>None</seg>
+        <seg>/etc/asciidoc and
+             /usr/share/doc/asciidoc-&asciidoc-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="a2x">
+        <term><command>a2x</command></term>
+        <listitem>
+          <para>
+            is a toolchain manager for AsciiDoc
+            (converts Asciidoc text files to other file formats).
+          </para>
+          <indexterm zone="ch-system-asciidoc a2x">
+            <primary sortas="b-a2x">a2x</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="asciidoc-prog">
+        <term><command>asciidoc</command></term>
+        <listitem>
+          <para>
+            converts an AsciiDoc text file to HTML or DocBook
+          </para>
+          <indexterm zone="ch-system-asciidoc asciidoc-prog">
+            <primary sortas="b-asciidoc-prog">asciidoc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/attr.xml LFS-pacman/chapter08/attr.xml
--- LFS_orig/chapter08/attr.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/attr.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,29 +38,83 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Attr</title>
 
-    <para>Prepare Attr for compilation:</para>
+    <para>Create the PKGBUILD for the Attr package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr     \
-            --disable-static  \
-            --sysconfdir=/etc \
-            --docdir=/usr/share/doc/attr-&attr-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>The tests need to be run on a filesystem that supports extended
-    attributes such as the ext2, ext3, or ext4 filesystems.
-    To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/attr
+cd /sources/attr
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="attr"
+pkgver="&attr-version;"
+pkgrel="1"
+pkgdesc="The attr package contains utilities to administer the extended attributes on filesystem objects."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2.1')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'm4'
+             'make'
+             'perl'
+             'sed'
+             'texinfo')
+checkdepends=('automake'
+              'diffutils'
+              'findutils'
+              'libtool')
+source=('&attr-url;')
+md5sums=('&attr-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr     \
+              --disable-static  \
+              --sysconfdir=/etc \
+              --docdir=/usr/share/doc/attr-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/attr-&attr-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Attr package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S attr --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/attr
+cp PKGBUILD /srv/pacman/source/LFS/attr
+cd /sources
+rm -rf attr</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/autoconf.xml LFS-pacman/chapter08/autoconf.xml
--- LFS_orig/chapter08/autoconf.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/autoconf.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,15 +38,80 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Autoconf</title>
-<!--
-    <para>First, apply a patch fixes several problems that occur with the latest
-    perl, libtool, and bash versions.</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&autoconf-fixes-patch;</userinput></screen>
--->
-    <para>Prepare Autoconf for compilation:</para>
+
+    <para>Create the PKGBUILD for the Autoconf package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/autoconf
+cd /sources/autoconf
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="autoconf"
+pkgver="&autoconf-version;"
+pkgrel="1"
+pkgdesc="The Autoconf package contains programs for producing shell scripts that can automatically configure source code."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'GPLv2')
+groups=('core')
+depends=('bash'
+         'coreutils'
+         'grep'
+         'm4'
+         'make'
+         'sed'
+         'texinfo'
+         'rootfs')
+makedepends=('perl')
+checkdepends=('automake'
+              'diffutils'
+              'findutils'
+              'gcc'
+              'libtool')
+optdepends=('emacs')
+source=('&autoconf-url;'
+md5sums=('&autoconf-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/autoconf-&autoconf-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Autoconf package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S autoconf --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/autoconf
+cp PKGBUILD /srv/pacman/source/LFS/autoconf
+cd /sources
+rm -rf autoconf</userinput></screen>
+
+<para>Prepare Autoconf for compilation:</para>
 
 <screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
 
diff -Naurp LFS_orig/chapter08/automake.xml LFS-pacman/chapter08/automake.xml
--- LFS_orig/chapter08/automake.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/automake.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,32 +38,88 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Automake</title>
-<!--
-    <para>Fix a failing test:</para>
-
-<screen><userinput remap="pre">sed -i "s/''/etags/" t/tags-lisp-space.sh</userinput></screen>
--->
-    <para>Prepare Automake for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/automake-&automake-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para> Using the -j4 make option speeds up the tests, even on systems with
-    only one processor, due to internal delays in individual tests.  To test
-    the results, issue:</para>
-
-<screen><userinput remap="test">make -j4 check</userinput></screen>
-
-    <para>The test t/subobj.sh is known to fail.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+    
+    <para>Create the PKGBUILD for the Automake package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/automake
+cd /sources/automake
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="automake"
+pkgver="&automake-version;"
+pkgrel="1"
+pkgdesc="The Automake package contains programs for generating Makefiles for use with Autoconf."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('bash'
+         'coreutils'
+         'grep'
+         'm4'
+         'sed'
+         'texinfo'
+         'rootfs')
+makedepends=('autoconf'
+             'gettext'
+             'make'
+             'perl')
+checkdepends=('binutils'
+              'bison'
+              'bzip2'
+              'dejagnu'
+              'diffutils'
+              'expect'
+              'findutils'
+              'flex'
+              'gcc'
+              'gettext'
+              'gzip'
+              'libtool'
+              'tar')
+source=('&automake-url;')
+md5sums=('&automake-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --docdir=/usr/share/doc/automake-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # Use j4 at a minimum due to long waits
+  # One test (t/subobj.sh) is known to fail
+  make -k -j4 check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/automake-&automake-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Automake package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S automake --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/automake
+cp PKGBUILD /srv/pacman/source/LFS/automake
+cd /sources
+rm -rf automake</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/bash.xml LFS-pacman/chapter08/bash.xml
--- LFS_orig/chapter08/bash.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/bash.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,15 +37,66 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Bash</title>
 
-    <para>Prepare Bash for compilation:</para>
+    <para>Create the PKGBUILD for the Bash package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr                      \
-            --docdir=/usr/share/doc/bash-&bash-version; \
-            --without-bash-malloc              \
-            --with-installed-readline</userinput></screen>
+<screen><userinput>mkdir /sources/bash
+cd /sources/bash
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="bash"
+pkgver="&bash-version;"
+pkgrel="1"
+pkgdesc="The Bash package contains the Bourne-Again SHell."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'ncurses'
+         'readline'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'bison'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'patch'
+             'sed'
+             'texinfo')
+checkdepends=('expect'
+              'shadow')
+optdepends=('xorg')
+source=('&bash-url;')
+md5sums=('&bash-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr                      \
+              --docdir=/usr/share/doc/bash-${version} \
+              --without-bash-malloc              \
+              --with-installed-readline
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure option:</title>
@@ -62,34 +113,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/bash-&bash-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>Skip down to <quote>Install the
-    package</quote> if not running the test suite.</para>
+    <para>Update the local cache and install the Bash package:</para>
 
-    <para>To prepare the tests, ensure that the <systemitem class="username">tester</systemitem> user can write to the sources tree:</para>
+<screen><userinput>pacman -Syu
+pacman -S bash --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="test">chown -Rv tester .</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-    <para>The testsuite of the package is designed to be run as a non-&root;
-    user that owns the terminal connected to standard input.  To satisfy the
-    requirement, spawn a new pseudo terminal using
-    <application>Expect</application> and run the tests as the <systemitem
-    class="username">tester</systemitem> user:</para>
-
-<screen><userinput remap="test">su -s /usr/bin/expect tester &lt;&lt; EOF
-set timeout -1
-spawn make tests
-expect eof
-lassign [wait] _ _ _ value
-exit $value
-EOF</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/bash
+cp PKGBUILD /srv/pacman/source/LFS/bash
+cd /sources
+rm -rf bash</userinput></screen>
 
     <para>Run the newly compiled <command>bash</command> program (replacing the one that is
     currently being executed):</para>
diff -Naurp LFS_orig/chapter08/bc.xml LFS-pacman/chapter08/bc.xml
--- LFS_orig/chapter08/bc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/bc.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,12 +38,56 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Bc</title>
 
-    <para>Prepare Bc for compilation:</para>
+    <para>Create the PKGBUILD for the Bc package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">CC=gcc ./configure --prefix=/usr -G -O3</userinput></screen>
+<screen><userinput>mkdir /sources/bc
+cd /sources/bc
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="bc"
+pkgver="&bc-version;"
+pkgrel="1"
+pkgdesc="The Bc package contains an arbitrary precision numeric processing language."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('glibc'
+         'ncurses'
+         'readline'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make')
+checkdepends=('gawk')
+source=('&bc-url;')
+md5sums=('&bc-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  CC=gcc ./configure --prefix=/usr -G -O3
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make test
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -71,18 +115,23 @@
       </varlistentry>
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/bc-&bc-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>To test bc, run:</para>
+    <para>Update the local cache and install the Bc package:</para>
 
-<screen><userinput remap="test">make test</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S bc --overwrite \* -dd --noconfirm</userinput></screen>
 
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/bc
+cp PKGBUILD /srv/pacman/source/LFS/bc
+cd /sources
+rm -rf bc</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/binutils.xml LFS-pacman/chapter08/binutils.xml
--- LFS_orig/chapter08/binutils.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/binutils.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,13 +38,13 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Binutils</title>
 
     <para>Verify that the PTYs are working properly inside the chroot
     environment by performing a simple test:</para>
 
-<screen><userinput remap="test">expect -c "spawn ls"</userinput></screen>
+<screen><userinput>expect -c "spawn ls"</userinput></screen>
 
     <para>This command should output the following:</para>
 
@@ -57,44 +57,92 @@
 <screen><computeroutput>The system has no more ptys.
 Ask your system administrator to create more.</computeroutput></screen>
 
-    <para>Upstream has made a patch to fix a problem when using binutils
-    for building some BLFS packages with Link Time Optimization (LTO)
-    enabled.  Apply that now:</para>
-
- <screen><userinput remap="pre">patch -Np1 -i ../&binutils-lto-patch;</userinput></screen>
-
-<!--
-    <para>An error in the building system causes the shipped man pages to
-    be empty.  Workaround the issue and remove the shipped man pages, so the
-    man pages will be regenerated correctly:</para>
-
-<screen><userinput remap="pre">sed -i '63d' etc/texi2pod.pl
-find -name \*.1 -delete</userinput></screen>
--->
-
-    <para>
-      Now make a fix identified upstream that affects building some packages:
-     </para>
-
-<screen><userinput remap="pre">sed -e '/R_386_TLS_LE /i \   || (TYPE) == R_386_TLS_IE \\' \
-    -i ./bfd/elfxx-x86.h</userinput></screen>
-
-    <para>The Binutils documentation recommends building Binutils
-    in a dedicated build directory:</para>
-
-<screen><userinput remap="pre">mkdir -v build
-cd       build</userinput></screen>
-
-    <para>Prepare Binutils for compilation:</para>
-
-<screen><userinput remap="configure">../configure --prefix=/usr       \
-             --enable-gold       \
-             --enable-ld=default \
-             --enable-plugins    \
-             --enable-shared     \
-             --disable-werror    \
-             --enable-64-bit-bfd \
-             --with-system-zlib</userinput></screen>
+
+    <para>Create the PKGBUILD for the Binutils package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/binutils
+cd /sources/binutils
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="binutils"
+pkgver="&binutils-version;"
+pkgrel="1"
+pkgdesc="The Binutils package contains a linker, an assembler, and other tools for handling object files."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'GPLv3'
+         'LGPLv2'
+         'LGPLv3')
+options=('!emptydirs' 'staticlibs' '!strip')
+groups=('core')
+depends=('glibc'
+         'zlib'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'file'
+             'flex'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'perl'
+             'sed'
+             'texinfo')
+checkdepends=('dejagnu'
+              'expect')
+optdepends=('elfutils')
+source=('&binutils-url;'
+        '&patches-root;&binutils-lto-patch;')
+md5sums=('&binutils-md5;'
+         '&binutils-lto-patch-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Fix a problem with Link Time Optimization (LTO) enabled.
+  patch -Np1 -i ${srcdir}/&binutils-lto-patch;
+
+  # Now make a fix identified upstream that affects building some packages
+  sed -e '/R_386_TLS_LE /i \   || (TYPE) == R_386_TLS_IE \\' \
+      -i ./bfd/elfxx-x86.h
+
+  # Build in a separate build directory
+  mkdir -v build
+}
+
+build(){
+  cd ${pkgname}-${pkgver}/build
+  ../configure --prefix=/usr       \
+               --enable-gold       \
+               --enable-ld=default \
+               --enable-plugins    \
+               --enable-shared     \
+               --disable-werror    \
+               --enable-64-bit-bfd \
+               --with-system-zlib
+  make tooldir=/usr
+}
+
+check(){
+  cd ${pkgname}-${pkgver}/build
+  make -k check 2&gt;&amp;1 || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}/build
+  make DESTDIR=${pkgdir} tooldir=/usr install
+
+  # Remove unneeded static libraries
+  rm -fv ${pkgdir}/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a
+}</literal>
+REALEOF</userinput></screen>
+
     <variablelist>
       <title>The meaning of the configure parameters:</title>
 
@@ -139,10 +187,6 @@ cd       build</userinput></screen>
 
     </variablelist>
 
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make tooldir=/usr</userinput></screen>
-
     <variablelist>
       <title>The meaning of the make parameter:</title>
 
@@ -165,30 +209,23 @@ cd       build</userinput></screen>
 
     </variablelist>
 
-    <important>
-      <para>The test suite for Binutils in this section is considered critical.
-      Do not skip it under any circumstances.</para>
-    </important>
-
-    <para>Test the results:</para>
-
-<screen><userinput remap="test">make -k check</userinput></screen>
-<!--
-    <para>Four tests related to zlib are known to fail.</para>
--->
-<!--
-    <para>Seven gold tests are known to fail with gcc-11.1.0</para>
-
-    <para>Four ld tests named <quote>Run property ...</quote> are known to
-    fail.</para>
- -->
-    <para>Install the package:</para>
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/binutils-&binutils-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Binutils package:</para>
 
-<screen><userinput remap="install">make tooldir=/usr install</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S binutils --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Remove useless static libraries:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/binutils
+cp PKGBUILD /srv/pacman/source/LFS/binutils
+cd /sources
+rm -rf binutils</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/bison.xml LFS-pacman/chapter08/bison.xml
--- LFS_orig/chapter08/bison.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/bison.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,24 +37,78 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Bison</title>
 
-    <para>Prepare Bison for compilation:</para>
+    <para>Create the PKGBUILD for the Bison package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/bison-&bison-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results (about 5.5 SBU), issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/bison
+cd /sources/bison
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="bison"
+pkgver="&bison-version;"
+pkgrel="1"
+pkgdesc="The Bison package contains a parser generator."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'm4'
+             'make'
+             'perl'
+             'sed')
+checkdepends=('diffutils'
+              'findutils'
+              'flex')
+optdepends=('doxygen')
+source=('&bison-url;')
+md5sums=('&bison-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --docdir=/usr/share/doc/${pkgname}-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/bison-&bison-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Bison package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S bison --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/bison
+cp PKGBUILD /srv/pacman/source/LFS/bison
+cd /sources
+rm -rf bison</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/bzip2.xml LFS-pacman/chapter08/bzip2.xml
--- LFS_orig/chapter08/bzip2.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/bzip2.xml	2022-06-16 20:05:13.901189092 -0500
@@ -40,66 +40,98 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Bzip2</title>
 
-    <para>Apply a patch that will install the documentation for this package:</para>
+    <para>Create the PKGBUILD for the Bzip2 package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">patch -Np1 -i ../&bzip2-docs-patch;</userinput></screen>
-
-   <para>The following command ensures installation of symbolic links are relative:</para>
-
-<screen><userinput remap="pre">sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile</userinput></screen>
-
-    <para>Ensure the man pages are installed into the correct location:</para>
-
-<screen><userinput remap="pre">sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile</userinput></screen>
-
-    <para>Prepare Bzip2 for compilation with:</para>
-
-<screen><userinput remap="make">make -f Makefile-libbz2_so
-make clean</userinput></screen>
-
-    <variablelist>
-      <title>The meaning of the make parameter:</title>
-
-      <varlistentry>
-        <term><parameter>-f Makefile-libbz2_so</parameter></term>
-        <listitem>
-          <para>This will cause Bzip2 to be built using a different
-          <filename>Makefile</filename> file, in this case the
-          <filename>Makefile-libbz2_so</filename> file, which creates a dynamic
-          <filename class="libraryfile">libbz2.so</filename> library and links
-          the Bzip2 utilities against it.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-    <para>Compile and test the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>Install the programs:</para>
-
-<screen><userinput remap="install">make PREFIX=/usr install</userinput></screen>
-
-    <para>Install the shared library:</para>
-<screen><userinput remap="install">cp -av libbz2.so.* /usr/lib
-ln -sv libbz2.so.&bzip2-version; /usr/lib/libbz2.so</userinput></screen>
-
-    <para>Install the shared <command>bzip2</command> binary into the
-    <filename class="directory">/usr/bin</filename> directory, and replace
-    two copies of <command>bzip2</command> with symlinks:</para>
-
-<screen><userinput remap="install">cp -v bzip2-shared /usr/bin/bzip2
-for i in /usr/bin/{bzcat,bunzip2}; do
-  ln -sfv bzip2 $i
-done</userinput></screen>
-
-    <para>Remove a useless static library:</para>
-
-<screen><userinput remap="install">rm -fv /usr/lib/libbz2.a</userinput></screen>
+<screen><userinput>mkdir /sources/bzip2
+cd /sources/bzip2
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="bzip2"
+pkgver="&bzip2-version;"
+pkgrel="1"
+pkgdesc="The Bzip2 package contains programs for compressing and decompressing files with bzip2 compression."
+arch=('x86'
+      'x86_64')
+license=('BSD3C'
+         'custom')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'make'
+             'patch')
+source=('&bzip2-url;'
+        '&bzip2-docs-patch;')
+md5sums=('&bzip2-md5;'
+         '&bzip2-docs-patch-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Apply a patch that will install the documentation
+  patch -Np1 -i ${srcdir}/bzip2-&bzip2-version;-install_docs-1.patch
+
+  # Ensure installation of symbolic links are relative
+  sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
+
+  # Ensure the man pages are installed into the correct location
+  sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+
+  # Create the shared bzip2 library and force the tools to link dynamically
+  make -f Makefile-libbz2_so
+  make clean
+
+  # build the tools (which will now link against the shared library)
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  
+  # Install the programs
+  make PREFIX=${pkgdir}/usr install
+
+  # Install the libraries
+  cp -av libbz2.so.* ${pkgdir}/usr/lib
+  ln -sv libbz2.so.1.0.8 ${pkgdir}/usr/lib/libbz2.so
+  cp -v bzip2-shared ${pkgdir}/usr/bin/bzip2
+  for i in ${pkgdir}/usr/bin/{bzcat,bunzip2}; do
+    ln -sfv bzip2 $i
+  done
+  rm -fv ${pkgdir}/usr/lib/libbz2.a
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/bzip2-&bzip2-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Bzip2 package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S bzip2 --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/bzip2
+cp PKGBUILD /srv/pacman/source/LFS/bzip2
+cd /sources
+rm -rf bzip2</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/chapter08.xml LFS-pacman/chapter08/chapter08.xml
--- LFS_orig/chapter08/chapter08.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/chapter08.xml	2022-06-16 20:05:13.901189092 -0500
@@ -13,9 +13,12 @@
 
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rootfs.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-headers.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tzdata.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
@@ -36,6 +39,16 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>
+
+  <!-- The following required to build Linux-PAM -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="rpcsvc-proto.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtirpc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libnsl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="db.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="linux-pam.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cracklib.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpwquality.xml"/>
+
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>
@@ -63,6 +76,8 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="setuptools.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pip.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wheel.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>
@@ -104,6 +119,37 @@
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysvinit.xml"/>
 
+
+  <!-- Pacman Additions -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libgpg-error.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libassuan.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pth.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libgcrypt.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libksba.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="npth.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libusb.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtasn1.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="p11-kit.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make-ca.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="curl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="unzip.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sqlite.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gnupg.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gpgme.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libxml2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="lzo.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="nettle.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libarchive.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sgml-common.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="docbook-45-xml.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="docbook-xsl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libxslt.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="asciidoc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="fakeroot.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pacman.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pacman-contrib.xml"/>
+
+  <!-- both sysv and systemd -->
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="aboutdebug.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/>
   <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cleanup.xml"/>
diff -Naurp LFS_orig/chapter08/chapter08.xml.orig LFS-pacman/chapter08/chapter08.xml.orig
--- LFS_orig/chapter08/chapter08.xml.orig	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/chapter08.xml.orig	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,111 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!DOCTYPE chapter 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;
+]>
+
+<chapter id="chapter-building-system" xreflabel="Chapter&nbsp;8">
+  <?dbhtml dir="chapter08"?>
+  <?dbhtml filename="chapter08.html"?>
+
+  <title>Installing Basic System Software</title>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="introduction.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgmgt.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="man-pages.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iana-etc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="glibc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zlib.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bzip2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xz.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="zstd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="file.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="readline.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="m4.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="flex.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tcl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expect.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="dejagnu.xml"/>
+
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="binutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gmp.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpfr.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="mpc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="attr.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="acl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libcap.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="shadow.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gcc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="pkgconfig.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ncurses.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sed.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="psmisc.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gettext.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bison.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grep.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="bash.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libtool.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gdbm.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gperf.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="expat.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="inetutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="less.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="perl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="xml-parser.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="intltool.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="autoconf.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="automake.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="openssl.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kmod.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libelf.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libffi.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="python.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="wheel.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="ninja.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="meson.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="coreutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="check.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="diffutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gawk.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="findutils.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="groff.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="grub.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="gzip.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="iproute2.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="kbd.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="libpipeline.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="make.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="patch.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="tar.xml"/>
+  <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 -->
+  <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 -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="eudev.xml"/>
+
+  <!-- Both sysv on systemd builds -->
+  <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 -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="e2fsprogs.xml"/>
+
+  <!-- sysv only -->
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="sysklogd.xml"/>
+  <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"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="stripping.xml"/>
+  <xi:include xmlns:xi="http://www.w3.org/2001/XInclude" href="cleanup.xml"/>
+
+</chapter>
diff -Naurp LFS_orig/chapter08/check.xml LFS-pacman/chapter08/check.xml
--- LFS_orig/chapter08/check.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/check.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,28 +37,70 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Check</title>
 
-    <para>Prepare Check for compilation:</para>
+    <para>Create the PKGBUILD for the Check package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
-
-    <para>Build the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>Compilation is now complete.  To run the Check test suite, issue the
-    following command:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-<!--    <para>Note that the Check test suite may take a relatively long
-    (up to 4 SBU) time.</para>
--->
-    <para>Install the package:</para>
-
-    <screen><userinput remap="install">make docdir=/usr/share/doc/check-&check-version; install</userinput></screen>
+<screen><userinput>mkdir /sources/check
+cd /sources/check
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="check"
+pkgver="&check-version;"
+pkgrel="1"
+pkgdesc="Check is a unit testing framework for C."
+arch=('x86'
+      'x86_64')
+license=('LGPLv2.1')
+groups=('core')
+depends=('bash'
+         'gawk'
+         'rootfs')
+makedepends=('gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+source=('&check-url;')
+md5sums=('&check-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --disable-static
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} docdir=/usr/share/doc/check-${pkgver} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/check-&check-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Check package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S check --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/check
+cp PKGBUILD /srv/pacman/source/LFS/check
+cd /sources
+rm -rf check</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/coreutils.xml LFS-pacman/chapter08/coreutils.xml
--- LFS_orig/chapter08/coreutils.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/coreutils.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,35 +38,101 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Coreutils</title>
 
-    <para>POSIX requires that programs from Coreutils recognize character
-    boundaries correctly even in multibyte locales. The following patch fixes
-    this non-compliance and other internationalization-related bugs.</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-i18n-patch;</userinput></screen>
-
-    <note>
-      <para>In the past, many bugs were found in this patch. When reporting new
-      bugs to Coreutils maintainers, please check first if they are reproducible
-      without this patch.</para>
-    </note>
-
-   <!-- this has been fixed in upstream gnulib, when a new version of
-   coreutils is released, please check #4055 to see if the change has been
-   picked up in this package -->
-<!--
-   <para>Now, fix a problem with chmod return values:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&coreutils-chmod-patch;</userinput></screen>
--->
-    <para>Now prepare Coreutils for compilation:</para>
-
-<screen><userinput remap="configure">autoreconf -fiv
-FORCE_UNSAFE_CONFIGURE=1 ./configure \
-            --prefix=/usr            \
-            --enable-no-install-program=kill,uptime</userinput></screen>
+    <para>Create the PKGBUILD for the Coreutils package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/coreutils
+cd /sources/coreutils
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="coreutils"
+pkgver="&coreutils-version;"
+pkgrel="1"
+pkgdesc="The Coreutils package contains utilities for showing and setting the basic system characteristics."
+arch=('x86'
+      'x86_64')
+license=('GPLv3'
+         'LGPLv2.1'
+         'LGPLv3')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'gmp'
+             'grep'
+             'libcap'
+             'make'
+             'openssl'
+             'patch'
+             'perl'
+             'sed'
+             'texinfo')
+checkdepends=('diffutils'
+              'e2fsprogs'
+              'findutils'
+              'shadow'
+              'util-linux')
+optdepends=('expectpm'
+            'io-tty')
+source=("https://ftp.gnu.org/gnu/${pkgname}/${pkgname}-${pkgver}.tar.xz"
+        "https://www.linuxfromscratch.org/patches/downloads/${pkgname}/${pkgname}-${pkgver}-i18n-1.patch"
+        "https://www.linuxfromscratch.org/~dj/${pkgname}-${pkgver}-uname-1.patch")
+md5sums=('&coreutils-md5;'
+         '&coreutils-i18n-patch-md5;'
+         '&coreutils-uname-patch-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # POSIX requires that programs from Coreutils recognize character
+  # boundaries correctly even in multibyte locales. The following patch 
+  # fixes this non-compliance and other internationalization-related bugs.
+  patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-i18n-1.patch
+
+  # In the past, many bugs were found in this patch. When reporting new
+  # bugs to Coreutils maintainers, please check first if they are reproducible
+  # without this patch.
+
+
+  # The following patch is not in LFS proper, but is nice to have IMO and
+  # allows the uname program to use data from /proc/cpuinfo to give
+  # more proper model specific info (uname -m).
+  patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-uname-1.patch
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  autoreconf -fiv
+  ./configure       \
+      --prefix=/usr \
+      --enable-no-install-program=kill,uptime
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # A few tests are known to fail
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  install -vdm755 ${pkgdir}/usr/sbin
+  mv -v ${pkgdir}/usr/bin/chroot ${pkgdir}/usr/sbin
+  install -vdm755 ${pkgdir}/usr/share/man/man8
+  mv -v ${pkgdir}/usr/share/man/man1/chroot.1 ${pkgdir}/usr/share/man/man8/chroot.8
+  sed -i 's/"1"/"8"/' ${pkgdir}/usr/share/man/man8/chroot.8
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -81,15 +147,6 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
       </varlistentry>
 
       <varlistentry>
-        <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>
-        <listitem>
-          <para>This environment variable allows the package to be
-          built as the <systemitem class="username">root</systemitem> user.
-          </para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
         <term><parameter>--enable-no-install-program=kill,uptime</parameter></term>
         <listitem>
           <para>The purpose of this switch is to prevent Coreutils from
@@ -99,50 +156,23 @@ FORCE_UNSAFE_CONFIGURE=1 ./configure \
       </varlistentry>
     </variablelist>
 
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>Skip down to <quote>Install the
-    package</quote> if not running the test suite.</para>
-
-    <para>Now the test suite is ready to be run. First, run the tests that are
-    meant to be run as user <systemitem class="username">root</systemitem>:</para>
-
-<screen><userinput remap="test">make NON_ROOT_USERNAME=tester check-root</userinput></screen>
-
-    <para>We're going to run the remainder of the tests as the
-    <systemitem class="username">tester</systemitem> user. Certain tests
-    require that the user be a member of more than one group. So that
-    these tests are not skipped, add a temporary group and make the
-    user <systemitem class="username">tester</systemitem> a part of it:</para>
-
-<screen><userinput remap="test">echo "dummy:x:102:tester" &gt;&gt; /etc/group</userinput></screen>
-
-    <para>Fix some of the permissions so that the non-&root; user can
-    compile and run the tests:</para>
-
-<screen><userinput remap="test">chown -Rv tester . </userinput></screen>
-
-    <para>Now run the tests:</para>
-
-<screen><userinput remap="test">su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check"</userinput></screen>
+    &pacman-build-add;
 
-<!-- test-getlogin is now skipped
-    <para>The test-getlogin test is known to fail in the LFS chroot environment.</para>
--->
-    <para>Remove the temporary group:</para>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/coreutils-&coreutils-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-<screen><userinput remap="test">sed -i '/dummy/d' /etc/group</userinput></screen>
-    <para>Install the package:</para>
+    <para>Update the local cache and install the Coreutils package:</para>
 
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S coreutils --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Move programs to the locations specified by the FHS:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">mv -v /usr/bin/chroot /usr/sbin
-mv -v /usr/share/man/man1/chroot.1 /usr/share/man/man8/chroot.8
-sed -i 's/"1"/"8"/' /usr/share/man/man8/chroot.8</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/coreutils
+cp PKGBUILD /srv/pacman/source/LFS/coreutils
+cd /sources
+rm -rf coreutils</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/cracklib.xml LFS-pacman/chapter08/cracklib.xml
--- LFS_orig/chapter08/cracklib.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/cracklib.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,309 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="cracklib" xreflabel="CrackLib-&cracklib-version;">
+  <?dbhtml filename="cracklib.html"?>
+
+  <sect1info condition="script">
+    <productname>cracklib</productname>
+    <productnumber>&cracklib-version;</productnumber>
+    <address>&cracklib-url;</address>
+  </sect1info>
+
+  <title>CrackLib-&cracklib-version;</title>
+
+  <indexterm zone="cracklib">
+    <primary sortas="a-CrackLib">CrackLib</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to CrackLib</title>
+
+    <para>
+      The <application>CrackLib</application> package contains a
+      library used to enforce strong passwords by comparing user selected
+      passwords to words in chosen word lists.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&cracklib-fin-sbu;</seg>
+        <seg>&cracklib-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of CrackLib</title>
+
+    <para>Create the PKGBUILD for the Cracklib package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/cracklib
+cd /sources/cracklib
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="cracklib"
+pkgver="&cracklib-version;"
+pkgrel="1"
+pkgdesc="The CrackLib package contains a library used to enforce strong passwords by comparing user selected passwords to words in chosen word lists." 
+arch=('x86'
+      'x86_64')
+url="http://www.gnu.org/software/cracklib"
+license=('GPLv3')
+depends=('glibc'
+         'linux-pam')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'glibc'
+             'grep'
+             'linux-pam'
+             'shadow'
+             'sed')
+source=("&cracklib-url;"
+        "&cracklib-words-url;")
+md5sums=('&cracklib-md5;'
+         '&cracklib-words-md5;')
+install="cracklib.install"
+backup=("usr/share/dict/cracklib-extra-words")
+options=('emptydirs')
+
+prepare(){
+  cd "${pkgname}-${pkgver}"
+  # Remove a meaningless warning
+  sed -i '/skipping/d' util/packer.c
+  # Fix build with newer Python
+  sed -i '15209 s/.*/am_cv_python_version=&python-minor;/' configure
+}
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  PYTHON=python3 CPPFLAGS=-I/usr/include/python3.10 \
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --with-default-dict=/usr/lib/cracklib/pw_dict
+  make
+}
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+  install -v -m644 -D "${srcdir}/cracklib}-words-${pkgver}.bz2" \
+                      "${pkgdir}/usr/share/dict/cracklib-words.bz2"
+  bzip2 -d -v "${pkgdir}/usr/share/dict/cracklib-words.bz2"
+  ln -v -sf cracklib-words "${pkgdir}/usr/share/dict/words"
+  echo "linuxfromscratch" &gt;&gt; "${pkgdir}/usr/share/dict/cracklib-extra-words"
+  install -v -m755 -d "${pkgdir}/usr/lib/cracklib"
+}</literal>
+REALEOF</userinput></screen>
+
+    <para>We have also listed an install file in the above PKGBUILD that will
+    install the default dictionary and create our combined wordlists:</para>
+
+<screen><userinput>cat &gt; cracklib.install &lt;&lt; "REALEOF"
+<literal>post_install(){
+  echo $(hostname) &gt;&gt;  /usr/share/dict/cracklib-extra-words
+  create-cracklib-dict /usr/share/dict/cracklib-words \
+                       /usr/share/dict/cracklib-extra-words
+}
+
+post_upgrade(){
+  post_install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/cracklib-&cracklib-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Cracklib package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S cracklib --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/cracklib
+cp PKGBUILD /srv/pacman/source/LFS/cracklib
+cp cracklib.install /srv/pacman/source/LFS/cracklib
+cd /sources
+rm -rf cracklib</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <command>sed -i '/skipping/d' util/packer.c</command>:
+      Remove a meaningless warning.
+    </para>
+
+    <para>
+      <envar>PYTHON=python3</envar>: This forces the installation of
+      python bindings for Python 3, even if Python 2 is installed.
+    </para>
+
+    <para>
+      <envar>CPPFLAGS=-I/usr/include/python&python-minor;</envar>:
+      This works around an issue caused by incorrect usage of Python 3
+      headers.
+    </para>
+
+    <para>
+      <parameter>--with-default-dict=/lib/cracklib/pw_dict</parameter>:
+      This parameter forces the installation of the
+      <application>CrackLib</application> dictionary to the
+      <filename class="directory">/lib</filename> hierarchy.
+    </para>
+
+    <para>
+      <command>install -v -m644 -D ...</command>: This command creates the
+      <filename class="directory">/usr/share/dict</filename> directory (if it
+      doesn't already exist) and installs the compressed word list there.
+    </para>
+
+    <para>
+      <command>ln -v -s cracklib-words /usr/share/dict/words</command>: The
+      word list is linked to <filename>/usr/share/dict/words</filename> as
+      historically, <filename>words</filename> is the primary word list in the
+      <filename class="directory">/usr/share/dict</filename> directory. Omit
+      this command if you already have a
+      <filename>/usr/share/dict/words</filename> file installed on your system.
+    </para>
+
+    <para>
+      <command>echo $(hostname) >>...</command>: The value of
+      <command>hostname</command> is echoed to a file called
+      <filename>cracklib-extra-words</filename>. This extra file is intended
+      to be a site specific list which includes easy to guess passwords such
+      as company or department names, user names, product names, computer
+      names, domain names, etc.
+    </para>
+
+    <para>
+      <command>create-cracklib-dict ...</command>: This command creates the
+      <application>CrackLib</application> dictionary from the word lists.
+      Modify the command to add any additional word lists you have installed.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>cracklib-check, cracklib-format, cracklib-packer,
+        cracklib-unpacker and create-cracklib-dict</seg>
+
+        <seg>libcrack.so and the _cracklib.so
+          (<application>Python</application> module)</seg>
+
+        <seg>/lib/cracklib, /usr/share/dict and /usr/share/cracklib</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="cracklib-check">
+        <term><command>cracklib-check</command></term>
+        <listitem>
+          <para>
+            is used to determine if a password is strong
+          </para>
+          <indexterm zone="cracklib cracklib-check">
+            <primary sortas="b-cracklib-check">cracklib-check</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="cracklib-format">
+        <term><command>cracklib-format</command></term>
+        <listitem>
+          <para>
+            is used to format text files (lowercases all words,
+            removes control characters and sorts the lists)
+          </para>
+          <indexterm zone="cracklib cracklib-format">
+            <primary sortas="b-cracklib-format">cracklib-format</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+     <varlistentry id="cracklib-packer">
+        <term><command>cracklib-packer</command></term>
+        <listitem>
+          <para>
+            creates a database with words read from standard input
+          </para>
+          <indexterm zone="cracklib cracklib-packer">
+            <primary sortas="b-cracklib-packer">cracklib-packer</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+     <varlistentry id="cracklib-unpacker">
+        <term><command>cracklib-unpacker</command></term>
+        <listitem>
+          <para>
+            displays on standard output the database specified
+          </para>
+          <indexterm zone="cracklib cracklib-packer">
+            <primary sortas="b-cracklib-packer">cracklib-packer</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="create-cracklib-dict">
+        <term><command>create-cracklib-dict</command></term>
+        <listitem>
+          <para>
+            is used to create the <application>CrackLib</application>
+            dictionary from the given word list(s)
+          </para>
+          <indexterm zone="cracklib create-cracklib-dict">
+            <primary sortas="b-create-cracklib-dict">create-cracklib-dict</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libcrack">
+        <term><filename class="libraryfile">libcrack.so</filename></term>
+        <listitem>
+          <para>
+            provides a fast dictionary lookup method for strong
+            password enforcement
+          </para>
+          <indexterm zone="cracklib libcrack">
+            <primary sortas="c-libcrack">libcrack.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/curl.xml LFS-pacman/chapter08/curl.xml
--- LFS_orig/chapter08/curl.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/curl.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,202 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-curl" role="wrap">
+  <?dbhtml filename="curl.html"?>
+
+  <sect1info condition="script">
+    <productname>curl</productname>
+    <productnumber>&curl-version;</productnumber>
+    <address>&curl-url;</address>
+  </sect1info>
+
+  <title>Curl-&curl-version;</title>
+
+  <indexterm zone="ch-system-curl">
+    <primary sortas="a-Curl">Curl</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>cURL</application> package contains an utility
+      and a library used for transferring files with URL syntax to any of
+      the following protocols: FTP, FTPS, HTTP, HTTPS, SCP, SFTP, TFTP,
+      TELNET, DICT, LDAP, LDAPS and FILE. Its ability to both download
+      and upload files can be incorporated into other programs to support
+      functions like streaming media.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&curl-fin-sbu;</seg>
+        <seg>&curl-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title/>
+
+    <para>
+      Configure <application>cURL</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr                           \
+            --disable-static                        \
+            --enable-threaded-resolver              \
+            --with-ca-path=/etc/ssl/certs</userinput></screen>
+
+    <para>
+      Build <application>cURL</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>cURL</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install
+rm -rf docs/examples/.deps
+find docs \( -name Makefile\* -o -name \*.1 -o -name \*.3 \) -exec rm {} \;
+
+install -v -d -m755 /usr/share/doc/curl-&curl-version;
+cp -v -R docs/*     /usr/share/doc/curl-&curl-version;</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--enable-threaded-resolver</parameter>: This switch enables
+      <application>cURL</application>'s builtin threaded DNS resolver.
+    </para>
+
+    <para>
+      <parameter>--with-ca-path=/etc/ssl/certs</parameter>: This
+      switch sets the location of the BLFS Certificate Authority store.
+    </para>
+
+    <para>
+      <option>--with-gssapi</option>: This parameter adds
+      <application>Kerberos 5</application> support to
+      <filename class="libraryfile">libcurl</filename>.
+    </para>
+
+    <para>
+      <option>--without-ssl --with-gnutls</option>: Use to
+      build with <application>GnuTLS</application> support
+      instead of <application>OpenSSL</application> for SSL/TLS.
+    </para>
+
+    <para>
+      <option>--with-ca-bundle=/etc/pki/tls/certs/ca-bundle.crt</option>: Use
+      this switch instead of <parameter>--with-ca-path</parameter> if
+      building with <application>GnuTLS</application> support
+      instead of <application>OpenSSL</application> for SSL/TLS.
+    </para>
+
+    <para>
+      <option>--with-libssh2</option>: This paramater adds
+      <application>SSH</application> support to cURL. This is disabled
+      by default.
+    </para>
+
+    <para>
+      <option>--enable-ares</option>: This paramater adds
+      support for DNS resolution through the c-ares library. It is disabled
+      by default, but does speed up DNS resolution queries.
+    </para>
+
+    <para>
+      <command>find docs ... -exec rm {} \;</command>: This command removes
+      <filename>Makefiles</filename> and man files from the documentation
+      directory that would otherwise be installed by the commands that follow.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+           curl and curl-config
+        </seg>
+        <seg>
+           libcurl.so
+        </seg>
+        <seg>
+          /usr/include/curl and
+          /usr/share/doc/curl-&curl-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="curl-prog">
+        <term><command>curl</command></term>
+        <listitem>
+         <para>
+           is a command line tool for transferring files with URL syntax.
+         </para>
+          <indexterm zone="ch-system-curl curl-prog">
+            <primary sortas="b-curl">curl</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="curl-config">
+        <term><command>curl-config</command></term>
+        <listitem>
+          <para>
+            prints information about the last compile, like libraries
+            linked to and prefix setting.
+          </para>
+          <indexterm zone="ch-system-curl curl-config">
+            <primary sortas="b-curl-config">curl-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libcurl">
+        <term><filename class="libraryfile">libcurl.so</filename></term>
+        <listitem>
+          <para>
+            provides the API functions required by
+            <command>curl</command> and other programs.
+          </para>
+          <indexterm zone="ch-system-curl libcurl">
+            <primary sortas="c-libcurl">libcurl.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/db.xml LFS-pacman/chapter08/db.xml
--- LFS_orig/chapter08/db.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/db.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,388 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="db" xreflabel="Berkeley DB-&db-version;">
+  <?dbhtml filename="db.html"?>
+
+  <sect1info condition="script">
+    <productname>db</productname>
+    <productnumber>&db-version;</productnumber>
+    <address>&db-url;</address>
+  </sect1info>
+
+  <title>Berkeley DB-&db-version;</title>
+
+  <indexterm zone="db">
+    <primary sortas="a-Berkeley-DB">Berkeley DB</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to Berkeley DB</title>
+
+    <para>
+      The <application>Berkeley DB</application> package contains programs and
+      utilities used by many other applications for database related functions.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&db-fin-sbu;</seg>
+        <seg>&db-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Berkeley DB</title>
+
+    <para>Create the PKGBUILD for the Berkeley DB package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/db
+cd /sources/db
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="db"
+pkgver="&db-version;"
+pkgrel="5"
+pkgdesc="The Berkeley DB embedded database system"
+arch=('x86'
+      'x86_64')
+license=('custom')
+depends=('gcc-libs' 'sh')
+source=("&db-url;")
+md5sums=('&db-md5;')
+
+prepare() {
+  cd $pkgname-$pkgv&db-version;
+  # Apply a fix so that this will compile with current versions of g++
+  sed -i 's/\(__atomic_compare_exchange\)/\1_db/' src/dbinc/atomic.h
+}
+
+build() {
+  cd "${srcdir}"/$pkgname-${pkgver}/build_unix
+  ../dist/configure --prefix=/usr      \
+                    --enable-compat185 \
+                    --enable-dbm       \
+                    --disable-static   \
+                    --enable-cxx
+  make
+}
+
+package() {
+  cd "${srcdir}"/$pkgname-${pkgver}/build_unix
+  make DESTDIR="${pkgdir}" docdir=/usr/share/doc/db-${pkgver} install
+  chown -v -R root:root                      \
+      ${pkgdir}/usr/bin/db_*                 \
+      ${pkgdir}/usr/include/db{,_185,_cxx}.h \
+      ${pkgdir}/usr/lib/libdb*.{so,la}       \
+      ${pkgdir}/usr/share/doc/db-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/db-&db-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Berkeley DB package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S db --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/db
+cp PKGBUILD /srv/pacman/source/LFS/db
+cd /sources
+rm -rf db</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <command>cd build_unix &amp;&amp; ../dist/configure
+      --prefix=/usr...</command>: This replaces the normal
+      <command>./configure</command> command, as
+      <application>Berkeley DB</application> comes with various build
+      directories for different platforms.
+    </para>
+
+    <para>
+      <parameter>--enable-compat185</parameter>: This switch enables building
+      the DB-1.85 compatibility API.
+    </para>
+
+    <para>
+      <parameter>--enable-cxx</parameter>: This switch enables building C++ API
+      libraries.
+    </para>
+
+    <para>
+      <parameter>--enable-dbm</parameter>: Enables legacy interface support
+      needed by some older packages.
+    </para>
+
+    <para>
+      <command>make docdir=/usr/share/doc/db-&db-version; install</command>:
+      This installs the documentation in the standard location instead of
+      <filename class="directory">/usr/docs</filename>.
+    </para>
+
+    <para>
+      <command>chown -v -R root:root ...</command>:This command changes the
+      ownership of various installed files from the uid:gid of the builder to
+      root:root.
+    </para>
+
+    <para>
+      <option>--enable-tcl --with-tcl=/usr/lib</option>: Enables
+      <application>Tcl</application> support in DB and creates the
+      <filename class="libraryfile">libdb_tcl</filename> libraries.
+    </para>
+
+    <para>
+      <option>--enable-java</option>: Enables <application>Java</application>
+      support in DB and creates the
+      <filename class="libraryfile">libdb_java</filename> libraries.
+<!--
+checking if java works... yes
+checking for javac... /opt/jdk/bin/javac
+checking absolute path of javac... /opt/jdk/bin/javac
+checking java version... 10.0.1
+configure: error: Java version 1.3 or higher required, got 10.0.1
+-->
+      Support is currently broken with Java-11.x.
+    </para>
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          db_archive,
+          db_checkpoint,
+          db_deadlock,
+          db_dump,
+          db_hotbackup,
+          db_load,
+          db_log_verify,
+          db_printlog,
+          db_recover,
+          db_replicate,
+          db_stat,
+          db_tuner,
+          db_upgrade, and
+          db_verify
+        </seg>
+        <seg>
+          libdb.so,
+          libdb_cxx.so, and
+<!--      libdb_java.so, and -->
+          libdb_tcl.so
+        </seg>
+        <seg>/usr/share/doc/db-&db-version;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="db_archive">
+        <term><command>db_archive</command></term>
+        <listitem>
+          <para>
+            prints the pathnames of log files that are no longer in use
+          </para>
+          <indexterm zone="db db_archive">
+            <primary sortas="b-db_archive">db_archive</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_checkpoint">
+        <term><command>db_checkpoint</command></term>
+        <listitem>
+          <para>
+            is a daemon process used to monitor and checkpoint database logs
+          </para>
+          <indexterm zone="db db_checkpoint">
+            <primary sortas="b-db_checkpoint">db_checkpoint</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_deadlock">
+        <term><command>db_deadlock</command></term>
+        <listitem>
+          <para>
+            is used to abort lock requests when deadlocks are detected
+          </para>
+          <indexterm zone="db db_deadlock">
+            <primary sortas="b-db_deadlock">db_deadlock</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_dump">
+        <term><command>db_dump</command></term>
+        <listitem>
+          <para>
+            converts database files to a flat file format readable by
+            <command>db_load</command>
+          </para>
+          <indexterm zone="db db_dump">
+            <primary sortas="b-db_dump">db_dump</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_hotbackup">
+        <term><command>db_hotbackup</command></term>
+        <listitem>
+          <para>
+            creates "hot backup" or "hot failover" snapshots of Berkeley DB
+            databases
+          </para>
+          <indexterm zone="db db_hotbackup">
+            <primary sortas="b-db_hotbackup">db_hotbackup</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_load">
+        <term><command>db_load</command></term>
+        <listitem>
+          <para>
+            is used to create database files from flat files created with
+            <command>db_dump</command>
+          </para>
+          <indexterm zone="db db_load">
+            <primary sortas="b-db_load">db_load</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_log_verify">
+        <term><command>db_log_verify</command></term>
+        <listitem>
+          <para>
+            verifies the log files of a database
+          </para>
+          <indexterm zone="db db_log_verify">
+            <primary sortas="b-db_log_verify">db_log_verify</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_printlog">
+        <term><command>db_printlog</command></term>
+        <listitem>
+          <para>
+            converts database log files to human readable text
+          </para>
+          <indexterm zone="db db_printlog">
+            <primary sortas="b-db_printlog">db_printlog</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_recover">
+        <term><command>db_recover</command></term>
+        <listitem>
+          <para>
+            is used to restore a database to a consistent state after a failure
+          </para>
+          <indexterm zone="db db_recover">
+            <primary sortas="b-db_recover">db_recover</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_replicate">
+        <term><command>db_replicate</command></term>
+        <listitem>
+          <para>
+            is a daemon process that provides replication/HA services on a
+            transactional environment
+          </para>
+          <indexterm zone="db db_replicate">
+            <primary sortas="b-db_replicate">db_replicate</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_stat">
+        <term><command>db_stat</command></term>
+        <listitem>
+          <para>
+            displays database environment statistics
+          </para>
+          <indexterm zone="db db_stat">
+            <primary sortas="b-db_stat">db_stat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_tuner">
+        <term><command>db_tuner</command></term>
+        <listitem>
+          <para>
+            analyzes the data in a btree database, and suggests a page size that
+            is likely to deliver optimal operation
+          </para>
+          <indexterm zone="db db_tuner">
+            <primary sortas="b-db_tuner">db_tuner</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_upgrade">
+        <term><command>db_upgrade</command></term>
+        <listitem>
+          <para>
+            is used to upgrade database files to a newer version of
+            <application>Berkeley DB</application>
+          </para>
+          <indexterm zone="db db_upgrade">
+            <primary sortas="b-db_upgrade">db_upgrade</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="db_verify">
+        <term><command>db_verify</command></term>
+        <listitem>
+          <para>
+            is used to run consistency checks on database files
+          </para>
+          <indexterm zone="db db_verify">
+            <primary sortas="b-db_verify">db_verify</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/dejagnu.xml LFS-pacman/chapter08/dejagnu.xml
--- LFS_orig/chapter08/dejagnu.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/dejagnu.xml	2022-06-16 20:05:13.904522425 -0500
@@ -39,30 +39,82 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of DejaGNU</title>
 
-    <para>The upstream recommends building DejaGNU in a dedicated build
-    directory:</para>
+    <para>Create the PKGBUILD for the DejaGnu package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">mkdir -v build
-cd       build</userinput></screen>
-
-    <para>Prepare DejaGNU for compilation:</para>
-
-<screen><userinput remap="configure">../configure --prefix=/usr
-makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi
-makeinfo --plaintext       -o doc/dejagnu.txt  ../doc/dejagnu.texi</userinput></screen>
-
-    <para>Build and install the package:</para>
-
-<screen><userinput remap="install">make install
-install -v -dm755  /usr/share/doc/dejagnu-&dejagnu-version;
-install -v -m644   doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-&dejagnu-version;</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
+<screen><userinput>mkdir /sources/dejagnu
+cd /sources/dejagnu
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="dejagnu"
+pkgver="&dejagnu-version;"
+pkgrel="1"
+pkgdesc=""
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('expect'
+         'bash'
+         'rootfs')
+makedepends=('coreutils'
+             'diffutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+source=('&dejagnu-url;')
+md5sums=('&dejagnu-md5;')
+
+# DejaGnu should be built in a subdir
+prepare(){
+  cd ${pkgname}-${pkgver}
+  mkdir -v build
+}
+
+build(){
+  cd ${pkgname}-${pkgver}/build
+  ../configure --prefix=/usr
+  makeinfo --html --no-split -o doc/dejagnu.html ../doc/dejagnu.texi
+  makeinfo --plaintext       -o doc/dejagnu.txt  ../doc/dejagnu.texi
+}
+
+# The testsuite must be run after installation -- ignore for this package
+#check(){
+#  cd ${pkgname}-${pkgver}/build
+#  make check
+#}
+
+package(){
+cd ${pkgname}-${pkgver}/build
+make DESTDIR=${pkgdir} install
+install -v -dm755  ${pkgdir}/usr/share/doc/dejagnu-${pkgver}
+install -v -m644   doc/dejagnu.{html,txt} ${pkgdir}/usr/share/doc/dejagnu-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/dejagnu-&dejagnu-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the DejaGnu package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S dejagnu --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/dejagnu
+cp PKGBUILD /srv/pacman/source/LFS/dejagnu
+cd /sources
+rm -rf dejagnu</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/diffutils.xml LFS-pacman/chapter08/diffutils.xml
--- LFS_orig/chapter08/diffutils.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/diffutils.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,24 +38,75 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Diffutils</title>
 
-    <para>Prepare Diffutils for compilation:</para>
+    <para>Create the PKGBUILD for the Diffutils package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/diffutils
+cd /sources/diffutils
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="diffutils"
+pkgver="&diffutils-version;"
+pkgrel="1"
+pkgdesc="The Diffutils package contains programs that show the differences between files or directories."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('perl')
+source=('&diffutils-url;')
+md5sums=('&diffutils-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/diffutils-&diffutils-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Diffutils package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S diffutils --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/diffutils
+cp PKGBUILD /srv/pacman/source/LFS/diffutils
+cd /sources
+rm -rf diffutils</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/docbook-45-xml.xml LFS-pacman/chapter08/docbook-45-xml.xml
--- LFS_orig/chapter08/docbook-45-xml.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/docbook-45-xml.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,271 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-docbook-45-xml" role="wrap">
+  <?dbhtml filename="docbook-45-xml.html"?>
+
+  <sect1info condition="script">
+    <productname>docbook-45-xml</productname>
+    <productnumber>&docbook-45-xml-version;</productnumber>
+    <address>&docbook-45-xml-url;</address>
+  </sect1info>
+
+  <title>DocBook-XML-&docbook-45-xml-version;</title>
+
+  <indexterm zone="ch-system-docbook-45-xml">
+    <primary sortas="a-Docbook-45-XML">Docbook-4.5 XML DTD</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>DocBook-4.5 XML DTD</application>-&docbook-45-xml-version;
+      package contains document type definitions for verification of XML data
+      files against the DocBook rule set. These are useful for structuring
+      books and software documentation to a standard allowing you to utilize
+      transformations already written for that standard.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&docbook-45-xml-fin-sbu;</seg>
+        <seg>&docbook-45-xml-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of DocBook-4.5 XML DTD</title>
+
+    <para>
+      Install <application>DocBook XML DTD</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="install">install -v -d -m755 /usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;
+install -v -d -m755 /etc/xml
+chown -R root:root .
+cp -v -af docbook.cat *.dtd ent/ *.mod \
+    /usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;</userinput></screen>
+
+    <para>
+      Create (or update) and populate the <filename>/etc/xml/docbook</filename>
+      catalog file by running the following
+      commands:
+    </para>
+
+<screen><?dbfo keep-together="auto"?><userinput remap="install">if [ ! -e /etc/xml/docbook ]; then
+    xmlcatalog --noout --create /etc/xml/docbook
+fi
+xmlcatalog --noout --add "public" \
+    "-//OASIS//DTD DocBook XML V&docbook-45-xml-version;//EN" \
+    "http://www.oasis-open.org/docbook/xml/&docbook-45-xml-version;/docbookx.dtd" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//DTD DocBook XML CALS Table Model V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/calstblx.dtd" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//DTD XML Exchange Table Model 19990315//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/soextblx.dtd" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//ELEMENTS DocBook XML Information Pool V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/dbpoolx.mod" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//ELEMENTS DocBook XML Document Hierarchy V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/dbhierx.mod" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//ELEMENTS DocBook XML HTML Tables V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/htmltblx.mod" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//ENTITIES DocBook XML Notations V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/dbnotnx.mod" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//ENTITIES DocBook XML Character Entities V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/dbcentx.mod" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "public" \
+    "-//OASIS//ENTITIES DocBook XML Additional General Entities V&docbook-45-xml-version;//EN" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;/dbgenent.mod" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "rewriteSystem" \
+    "http://www.oasis-open.org/docbook/xml/&docbook-45-xml-version;" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;" \
+    /etc/xml/docbook
+xmlcatalog --noout --add "rewriteURI" \
+    "http://www.oasis-open.org/docbook/xml/&docbook-45-xml-version;" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;" \
+    /etc/xml/docbook</userinput></screen>
+
+    <para>
+      Create (or update) and populate the
+      <filename>/etc/xml/catalog</filename> catalog file by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="install">if [ ! -e /etc/xml/catalog ]; then
+    xmlcatalog --noout --create /etc/xml/catalog
+fi
+xmlcatalog --noout --add "delegatePublic" \
+    "-//OASIS//ENTITIES DocBook XML" \
+    "file:///etc/xml/docbook" \
+    /etc/xml/catalog
+xmlcatalog --noout --add "delegatePublic" \
+    "-//OASIS//DTD DocBook XML" \
+    "file:///etc/xml/docbook" \
+    /etc/xml/catalog
+xmlcatalog --noout --add "delegateSystem" \
+    "http://www.oasis-open.org/docbook/" \
+    "file:///etc/xml/docbook" \
+    /etc/xml/catalog
+xmlcatalog --noout --add "delegateURI" \
+    "http://www.oasis-open.org/docbook/" \
+    "file:///etc/xml/docbook" \
+    /etc/xml/catalog</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="configuration">
+    <title>Configuring DocBook-4.5 XML DTD</title>
+
+    <sect3 id="docbook-config">
+      <title>Config Files</title>
+
+      <para>
+        <filename>/etc/xml/catalog</filename> and
+        <filename>/etc/xml/docbook</filename>
+      </para>
+
+      <indexterm zone="ch-system-docbook-45-xml docbook-config">
+        <primary sortas="e-etc-xml-docbook">/etc/xml/docbook</primary>
+      </indexterm>
+
+      <indexterm zone="ch-system-docbook-45-xml docbook-config">
+        <primary sortas="e-etc-xml-catalog">/etc/xml/catalog</primary>
+      </indexterm>
+
+    </sect3>
+
+    <sect3>
+      <title>Configuration Information</title>
+
+      <para>
+        The above installation creates the files and updates the catalogs.
+        In order to utilize <application>DocBook XML DTD</application>
+        V&docbook-45-xml-version; when any version 4.x is requested in the System
+        Identifier, you need to add additional statements to the catalog
+        files. If you have any of the <application>DocBook XML
+        DTD</application>'s referenced below already installed on your
+        system, remove those entries from the <command>for</command> command
+        below (issue the commands as the <systemitem
+        class="username">root</systemitem> user):
+      </para>
+
+<screen><userinput remap="install">for DTDVERSION in 4.1.2 4.2 4.3 4.4
+do
+  xmlcatalog --noout --add "public" \
+    "-//OASIS//DTD DocBook XML V$DTDVERSION//EN" \
+    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/docbookx.dtd" \
+    /etc/xml/docbook
+  xmlcatalog --noout --add "rewriteSystem" \
+    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;" \
+    /etc/xml/docbook
+  xmlcatalog --noout --add "rewriteURI" \
+    "http://www.oasis-open.org/docbook/xml/$DTDVERSION" \
+    "file:///usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;" \
+    /etc/xml/docbook
+  xmlcatalog --noout --add "delegateSystem" \
+    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
+    "file:///etc/xml/docbook" \
+    /etc/xml/catalog
+  xmlcatalog --noout --add "delegateURI" \
+    "http://www.oasis-open.org/docbook/xml/$DTDVERSION/" \
+    "file:///etc/xml/docbook" \
+    /etc/xml/catalog
+done</userinput></screen>
+
+    </sect3>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Files</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>None</seg>
+        <seg>None</seg>
+        <seg>DTD, MOD and ENT files</seg>
+        <seg>/etc/xml and /usr/share/xml/docbook/xml-dtd-&docbook-45-xml-version;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="DTD-files">
+        <term><filename>DTD files</filename></term>
+        <listitem>
+          <para>
+            contain a document type definition which defines the element
+            types and the attribute lists that can be used in the corresponding
+            <filename>XML</filename> files.
+          </para>
+          <indexterm zone="ch-system-docbook-45-xml DTD-files">
+            <primary sortas="g-XML-DTD-files">XML DTD Files</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="MOD-files">
+        <term><filename>MOD files</filename></term>
+        <listitem>
+          <para>
+            contain components of the document type definition that
+            are sourced into the <filename>DTD</filename> files.
+          </para>
+          <indexterm zone="ch-system-docbook-45-xml MOD-files">
+            <primary sortas="g-XML-MOD-files">XML MOD files</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="ENT-files">
+        <term><filename>ENT files</filename></term>
+        <listitem>
+          <para>
+            contain lists of named character entities allowed in HTML.
+          </para>
+          <indexterm zone="ch-system-docbook-45-xml ENT-files">
+            <primary sortas="g-XML-ENT-files">XML entity files</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/docbook-xsl.xml LFS-pacman/chapter08/docbook-xsl.xml
--- LFS_orig/chapter08/docbook-xsl.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/docbook-xsl.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,175 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-docbook-xsl" role="wrap">
+  <?dbhtml filename="docbook-xsl.html"?>
+
+  <sect1info condition="script">
+    <productname>docbook-xsl</productname>
+    <productnumber>&docbook-xsl-version;</productnumber>
+    <address>&docbook-xsl-url;</address>
+  </sect1info>
+
+  <title>Docbook-XSL-&docbook-xsl-version;</title>
+
+  <indexterm zone="ch-system-docbook-xsl">
+    <primary sortas="a-Docbook-XSL">Docbook-XSL</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>DocBook XSL Stylesheets</application>
+      package contains XSL stylesheets. These are useful for
+      performing transformations on XML DocBook files.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&docbook-xsl-fin-sbu;</seg>
+        <seg>&docbook-xsl-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of DocBook XSL Stylesheets</title>
+
+    <para>
+      First, fix a problem that causes stack overflows when doing recursion:
+    </para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../docbook-xsl-nons-&docbook-xsl-version;-stack_fix-1.patch</userinput></screen>
+
+
+    <para>
+      Install <application>DocBook XSL Stylesheets</application>
+      by running the following commands:
+    </para>
+
+<screen><userinput remap="install">install -v -m755 -d /usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;
+
+cp -v -R VERSION assembly common eclipse epub epub3 extensions fo        \
+         highlighting html htmlhelp images javahelp lib manpages params  \
+         profiling roundtrip slides template tests tools webhelp website \
+         xhtml xhtml-1_1 xhtml5                                          \
+    /usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;
+
+ln -s VERSION /usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;/VERSION.xsl
+
+install -v -m644 -D README \
+                    /usr/share/doc/docbook-xsl-nons-&docbook-xsl-version;/README.txt
+install -v -m644    RELEASE-NOTES* NEWS* \
+                    /usr/share/doc/docbook-xsl-nons-&docbook-xsl-version;</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="configuration">
+    <title>Configuring DocBook XSL Stylesheets</title>
+
+    <sect3 id="docbook-xsl-config">
+      <title>Config Files</title>
+
+      <para>
+        <filename>/etc/xml/catalog</filename>
+      </para>
+
+      <indexterm zone="ch-system-docbook-xsl docbook-xsl-config">
+        <primary sortas="e-etc-xml-catalog">/etc/xml/catalog</primary>
+      </indexterm>
+
+    </sect3>
+
+    <sect3>
+      <title>Configuration Information</title>
+
+      <para>
+        Create (or append) and populate the XML catalog file using the
+        following commands as the <systemitem
+        class="username">root</systemitem> user:
+      </para>
+
+<screen role="root"><userinput>if [ ! -d /etc/xml ]; then install -v -m755 -d /etc/xml; fi
+if [ ! -f /etc/xml/catalog ]; then
+    xmlcatalog --noout --create /etc/xml/catalog
+fi
+
+xmlcatalog --noout --add "rewriteSystem" \
+           "https://cdn.docbook.org/release/xsl-nons/&docbook-xsl-version;" \
+           "/usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteURI" \
+           "https://cdn.docbook.org/release/xsl-nons/&docbook-xsl-version;" \
+           "/usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteSystem" \
+           "https://cdn.docbook.org/release/xsl-nons/current" \
+           "/usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteURI" \
+           "https://cdn.docbook.org/release/xsl-nons/current" \
+           "/usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteSystem" \
+           "http://docbook.sourceforge.net/release/xsl/current" \
+           "/usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;" \
+    /etc/xml/catalog
+
+xmlcatalog --noout --add "rewriteURI" \
+           "http://docbook.sourceforge.net/release/xsl/current" \
+           "/usr/share/xml/docbook/xsl-stylesheets-nons-&docbook-xsl-version;" \
+    /etc/xml/catalog</userinput></screen>
+
+    </sect3>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Files</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>/usr/share/xml/docbook/xsl-stylesheets-&docbook-xsl-version;/*/*.xsl</seg>
+        <seg>/usr/share/xml/docbook/xsl-stylesheets-&docbook-xsl-version; and
+        /usr/share/doc/docbook-xsl-&docbook-xsl-version;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="xsl-stylesheets">
+        <term><filename>XSL Stylesheets</filename></term>
+        <listitem>
+          <para>
+            are used for performing transformations on XML files.
+          </para>
+          <indexterm zone="ch-system-docbook-xsl xsl-stylesheets">
+            <primary sortas="g-XSL-Stylesheets">XSL Stylesheets</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/e2fsprogs.xml LFS-pacman/chapter08/e2fsprogs.xml
--- LFS_orig/chapter08/e2fsprogs.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/e2fsprogs.xml	2022-06-16 20:05:13.907855759 -0500
@@ -41,24 +41,84 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of E2fsprogs</title>
 
-    <para>The e2fsprogs documentation recommends that the package be built in
-    a subdirectory of the source tree: </para>
-
-<screen><userinput remap="pre">mkdir -v build
-cd       build</userinput></screen>
-
-    <para>Prepare e2fsprogs for compilation:</para>
+    <para>Create the PKGBUILD for the E2fsprogs package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">../configure --prefix=/usr           \
-             --sysconfdir=/etc       \
-             --enable-elf-shlibs     \
-             --disable-libblkid      \
-             --disable-libuuid       \
-             --disable-uuidd         \
-             --disable-fsck</userinput></screen>
+<screen><userinput>mkdir /sources/e2fsprogs
+cd /sources/e2fsprogs
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="e2fsprogs"
+pkgver="&e2fsprogs-version;"
+pkgrel="1"
+pkgdesc="The e2fsprogs package contains the utilities for handling the ext2, ext3, and ext4 file systems."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'GPLv2'
+         'MIT')
+groups=('core')
+depends=('glibc'
+         'util-linux'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'gzip'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('procps-ng'
+              'psmisc')
+source=('&e2fsprogs-url;')
+md5sums=('&e2fsprogs-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+  mkdir -v build
+}
+
+build(){
+  cd ${pkgname}-${pkgver}/build
+  ../configure --prefix=/usr           \
+               --sysconfdir=/etc       \
+               --enable-elf-shlibs     \
+               --disable-libblkid      \
+               --disable-libuuid       \
+               --disable-uuidd         \
+               --disable-fsck
+make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}/build
+  # One test (u_direct_io) is known to fail on some systems.
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}/build
+  make DESTDIR=${pkgdir} install
+
+  # Remove static libraries
+  rm -fv ${pkgdir}/usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
+
+  # Use uncompressed info page in package
+  gunzip -v ${pkgdir}/usr/share/info/libext2fs.info.gz
+
+  # Build additonal info doc
+  makeinfo -o    doc/com_err.info ../lib/et/com_err.texinfo
+  install -vm644 doc/com_err.info ${pkgdir}/usr/share/info
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -85,53 +145,24 @@ cd       build</userinput></screen>
 
     </variablelist>
 
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To run the tests, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
+    &pacman-build-add;
 
-    <para>One test, u_direct_io, is known to fail on some systems.</para>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/e2fsprogs-&e2fsprogs-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-<!-- This is a ridiculous amount now! And is it still true?
-     Does not appear to be true for version 1.46.3.  Time with tests
-     26 seconds with tests (With lots of cores and ram and an ssd disk).
+    <para>Update the local cache and install the E2fsprogs package:</para>
 
-    <para>One of the e2fsprogs tests will attempt to allocate 256 MB of memory.
-    If you do not have significantly more RAM than this, be sure to enable
-    sufficient swap space for the test. See <xref
-    linkend="ch-partitioning-creatingfilesystem"/> and <xref
-    linkend="ch-partitioning-mounting"/>
-    for details on creating and enabling swap space.</para>
-
-    <para>On a spinning disk, the tests take a little more than 4 SBUs. They
-    can be much shorter on an SSD (down to about 1.5 SBUs).</para>
--->
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Remove useless static libraries:</para>
-
-<screen><userinput remap="install">rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a</userinput></screen>
-
-    <para>This package installs a gzipped
-    <filename class="extension">.info</filename> file but doesn't update the
-    system-wide <filename>dir</filename> file. Unzip this file and then update
-    the system <filename>dir</filename> file using the following
-    commands:</para>
+<screen><userinput>pacman -Syu
+pacman -S e2fsprogs --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="install">gunzip -v /usr/share/info/libext2fs.info.gz
-install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-    <para>If desired, create and install some additional documentation by
-    issuing the following commands:</para>
+<screen><userinput>mkdir /srv/pacman/source/LFS/e2fsprogs
+cp PKGBUILD /srv/pacman/source/LFS/e2fsprogs
+cd /sources
+rm -rf e2fsprogs</userinput></screen>
 
-<screen><userinput remap="install">makeinfo -o      doc/com_err.info ../lib/et/com_err.texinfo
-install -v -m644 doc/com_err.info /usr/share/info
-install-info --dir-file=/usr/share/info/dir /usr/share/info/com_err.info</userinput></screen>
   </sect2>
 
   <sect2 id="contents-e2fsprogs" role="content">
diff -Naurp LFS_orig/chapter08/eudev.xml LFS-pacman/chapter08/eudev.xml
--- LFS_orig/chapter08/eudev.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/eudev.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,50 +37,99 @@
     </segmentedlist>
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Eudev</title>
-<!--
-    <para>First, fix a test script:</para>
 
-<screen><userinput remap="pre">sed -r -i 's|/usr(/bin/test)|\1|' test/udev-test.pl</userinput></screen>
--->
-<!--
-    <para>Next, remove an unneeded line that causes a build failure:</para>
-
-<screen><userinput remap="pre">sed -i '/keyboard_lookup_key/d' src/udev/udev-builtin-keyboard.c</userinput></screen>
--->
-
-    <para>Prepare Eudev for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr           \
-            --bindir=/usr/sbin      \
-            --sysconfdir=/etc       \
-            --enable-manpages       \
-            --disable-static</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>Create some directories now that are needed for tests, but
-    will also be used as a part of installation:</para>
-
-<screen><userinput remap="test">mkdir -pv /usr/lib/udev/rules.d
-mkdir -pv /etc/udev/rules.d</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Install some custom rules and support files useful in an LFS
-    environment:</para>
-
-<screen><userinput remap="install">tar -xvf ../&udev-lfs-version;.tar.xz
-make -f &udev-lfs-version;/Makefile.lfs install</userinput></screen>
+    <para>The test suite for the Eudev package must have the
+    <filename class="directory">/usr/lib/udev/rules.d/</filename> and
+    <filename class="directory">/etc/udev/rules.d/</filename> must exist for the
+    test suite to run correctly:</para>
+
+<screen><userinput>install -vdm755 /usr/lib/udev/rules.d
+install -vdm755 /etc/udev/rules.d</userinput></screen>
+
+    <para>Create the PKGBUILD for the Eudev package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/eudev
+cd /sources/eudev
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="eudev"
+pkgver="&eudev-version;"
+pkgrel="1"
+pkgdesc="The Eudev package contains programs for dynamic creation of device nodes." 
+arch=('x86'
+      'x86_64')
+license=('GPL3')
+groups=('core')
+depends=('glibc')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'gzip'
+             'make'
+             'sed'
+             'texinfo'
+             'util-linux')
+source=('&eudev-url;'
+        '&udev-lfs-url;')
+noextract=(&udev-lfs-version;.tar.xz)
+md5sums=('&eudev-md5;'
+         '&udev-lfs-md5;')
+options=('emptydirs')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr      \
+              --bindir=/usr/sbin \
+              --sysconfdir=/etc  \
+              --enable-manpages  \
+              --disable-static
+  make
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  # The /usr/lib/udev/rules.d and /etc/udev/rules.d folders must exist for tests
+  if test -d /usr/lib/udev/rules.d -a -d /etc/udev/rules.d; then
+    make check
+  fi
+}
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  install -vdm755 "${pkgdir}/lib/udev/rules.d"
+  install -vdm755 "${pkgdir}/etc/udev/rules.d"
+  make DESTDIR="${pkgdir}" install
+
+  # Install the udev rules appropriate for LFS
+  tar -xvf ${srcdir}/&udev-lfs-version;.tar.xz
+  make DESTDIR=${pkgdir} -f &udev-lfs-version;/Makefile.lfs install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/eudev-&eudev-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Eudev package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S eudev --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/eudev
+cp PKGBUILD /srv/pacman/source/LFS/eudev
+cd /sources
+rm -rf eudev</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/expat.xml LFS-pacman/chapter08/expat.xml
--- LFS_orig/chapter08/expat.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/expat.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,30 +38,75 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Expat</title>
 
-    <para>Prepare Expat for compilation:</para>
+    <para>Create the PKGBUILD for the Expat package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --disable-static \
-            --docdir=/usr/share/doc/expat-&expat-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>If desired, install the documentation:</para>
-
-<screen><userinput remap="install">install -v -m644 doc/*.{html,css} /usr/share/doc/expat-&expat-version;</userinput></screen>
+<screen><userinput>mkdir /sources/expat
+cd /sources/expat
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="expat"
+pkgver="&expat-version;"
+pkgrel="1"
+pkgdesc=""
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+source=('&expat-url;')
+md5sums=('&expat-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --docdir=/usr/share/doc/expat-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/expat-&expat-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Expat package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S expat --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/expat
+cp PKGBUILD /srv/pacman/source/LFS/expat
+cd /sources
+rm -rf expat</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/expect.xml LFS-pacman/chapter08/expect.xml
--- LFS_orig/chapter08/expect.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/expect.xml	2022-06-16 20:05:13.901189092 -0500
@@ -45,16 +45,62 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Expect</title>
 
-    <para>Prepare Expect for compilation:</para>
+    <para>Create the PKGBUILD for the Expect package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr           \
-            --with-tcl=/usr/lib     \
-            --enable-shared         \
-            --mandir=/usr/share/man \
-            --with-tclinclude=/usr/include</userinput></screen>
+<screen><userinput>mkdir /sources/expect
+cd /sources/expect
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="expect"
+pkgver="&expect-version;"
+pkgrel="1"
+pkgdesc="The Expect package contains tools for automating, via scripted dialogues, interactive applications."
+arch=('x86'
+      'x86_64')
+license=('PD')
+groups=('core')
+depends=('glibc'
+         'tcl'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'grep'
+             'make'
+             'patch'
+             'sed')
+optdepends=('tk')
+source=('&expect-url;')
+md5sums=('&expect-md5;')
+
+build(){
+  cd ${pkgname}${pkgver}
+  ./configure --prefix=/usr           \
+              --with-tcl=/usr/lib     \
+              --enable-shared         \
+              --mandir=/usr/share/man \
+              --with-tclinclude=/usr/include
+  make
+}
+
+check(){
+  cd ${pkgname}${pkgver}
+  make test
+}
+
+package(){
+  cd ${pkgname}${pkgver}
+  make DESTDIR=${pkgdir} install
+  ln -svf expect${pkgver}/libexpect${pkgver}.so /usr/lib
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -78,18 +124,23 @@
 
     </variablelist>
 
-    <para>Build the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/expect-&expect-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>To test the results, issue:</para>
+    <para>Update the local cache and install the Expect package:</para>
 
-<screen><userinput remap="test">make test</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S expect --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install
-ln -svf expect&expect-version;/libexpect&expect-version;.so /usr/lib</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/expect
+cp PKGBUILD /srv/pacman/source/LFS/expect
+cd /sources
+rm -rf expect</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/fakeroot.xml LFS-pacman/chapter08/fakeroot.xml
--- LFS_orig/chapter08/fakeroot.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/fakeroot.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-fakeroot" role="wrap">
+  <?dbhtml filename="fakeroot.html"?>
+
+  <sect1info condition="script">
+    <productname>fakeroot</productname>
+    <productnumber>&fakeroot-version;</productnumber>
+    <address>&fakeroot-url;</address>
+  </sect1info>
+
+  <title>Fakeroot-&fakeroot-version;</title>
+
+  <indexterm zone="ch-system-fakeroot">
+    <primary sortas="a-Fakeroot">Fakeroot</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Fakeroot package contains programs for simulating superuser
+    privileges.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&fakeroot-fin-sbu;</seg>
+        <seg>&fakeroot-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Fakeroot</title>
+
+    <para>Fix an error with Fakeroot:</para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../silence-dlerror.patch</userinput></screen>
+
+    <para>Prepare Fakeroot for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-fakeroot" role="content">
+    <title>Contents of Fakeroot</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed library</segtitle>
+
+      <seglistitem>
+        <seg>faked and fakeroot</seg>
+        <seg>libfakeroot.so</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="faked">
+        <term><command>faked</command></term>
+        <listitem>
+          <para>is a daemon that remembers fake ownership/permissions of files
+          manipulated by fakeroot processes.</para>
+          <indexterm zone="ch-system-fakeroot faked">
+            <primary sortas="b-faked">faked</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="fakeroot">
+        <term><command>fakeroot</command></term>
+        <listitem>
+          <para>runs a command in an environment faking root privileges for
+          file manipulation.</para>
+          <indexterm zone="ch-system-fakeroot fakeroot">
+            <primary sortas="b-fakeroot">fakeroot</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libfakeroot">
+        <term><filename class="libraryfile">libfakeroot.so</filename></term>
+        <listitem>
+          <para>is the primary fakeroot library.</para>
+          <indexterm zone="ch-system-fakeroot libfakeroot">
+            <primary sortas="c-libfakeroot">libfakeroot.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/file.xml LFS-pacman/chapter08/file.xml
--- LFS_orig/chapter08/file.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/file.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,24 +38,78 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of File</title>
 
-    <para>Prepare File for compilation:</para>
+    <para>Create the PKGBUILD for the File package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/file
+cd /sources/file
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="file"
+pkgver="&file-version;"
+pkgrel="1"
+pkgdesc="The File package contains a utility for determining the type of a given file or files."
+arch=('x86'
+      'x86_64')
+license=('BSD3C'
+         'custom')
+groups=('core')
+depends=('glibc'
+         'bzip2'
+         'xz'
+         'zlib'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+optdepends=('libseccomp')
+source=('&file-url;')
+md5sums=('&file-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/file-&file-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the File package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S file --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/file
+cp PKGBUILD /srv/pacman/source/LFS/file
+cd /sources
+rm -rf file</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/findutils.xml LFS-pacman/chapter08/findutils.xml
--- LFS_orig/chapter08/findutils.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/findutils.xml	2022-06-16 20:05:13.901189092 -0500
@@ -40,15 +40,62 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Findutils</title>
 
-    <para>Prepare Findutils for compilation:</para>
+    <para>Create the PKGBUILD for the Findutils package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">case $(uname -m) in
-    i?86)   TIME_T_32_BIT_OK=yes ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
-    x86_64) ./configure --prefix=/usr --localstatedir=/var/lib/locate ;;
-esac</userinput></screen>
+<screen><userinput>mkdir /sources/findutils
+cd /sources/findutils
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="findutils"
+pkgver="&findutils-version;"
+pkgrel="1"
+pkgdesc="The Findutils package contains programs to find files."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('bash'
+         'glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('dejagnu'
+              'diffutils'
+              'expect')
+source=('&findutils-url;')
+md5sums=('&findutils-md5;')
+
+build(){
+  # If building 32 bit, adjust build flags
+  CONFFLAGS=""
+  if [ `uname -m` == "x86" ]; then CONFFLAGS="TIME_T_32_BIT_OK=yes"; fi
+
+  cd ${pkgname}-${pkgver}
+  ${CONFFLAGS} ./configure --prefix=/usr --localstatedir=/var/lib/locate
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -71,18 +118,24 @@ esac</userinput></screen>
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/findutils-&findutils-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>To test the results, issue:</para>
+    <para>Update the local cache and install the Findutils package:</para>
 
-<screen><userinput remap="test">chown -Rv tester .
-su tester -c "PATH=$PATH make check"</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S findutils --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/findutils
+cp PKGBUILD /srv/pacman/source/LFS/findutils
+cd /sources
+rm -rf findutils</userinput></screen>
 
-<screen><userinput remap="install">make install</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/flex.xml LFS-pacman/chapter08/flex.xml
--- LFS_orig/chapter08/flex.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/flex.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,44 +38,81 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Flex</title>
 
-<!--
-    <para>First, fix a problem introduced with glibc-2.26:</para>
+    <para>Create the PKGBUILD for the Flex package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">sed -i "/math.h/a #include &lt;malloc.h&gt;" src/flexdef.h</userinput></screen>
-
-    <para>The build procedure assumes the <application>help2man</application>
-    program is available to create a man page from the executable - -help option.
-    This is not present, so we use an environment variable to skip this process.
-    Now, prepare Flex for compilation:</para> -->
-
-    <para>Prepare Flex for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr \
-            --docdir=/usr/share/doc/flex-&flex-version; \
-            --disable-static</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results (about 0.5 SBU), issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>A few programs do not know about <command>flex</command> yet and
-    try to run its predecessor, <command>lex</command>. To support those
-    programs, create a symbolic link named <filename>lex</filename> that
-    runs <filename>flex</filename> in <command>lex</command> emulation
-    mode:</para>
-
-<screen><userinput remap="install">ln -sv flex /usr/bin/lex</userinput></screen>
+<screen><userinput>mkdir /sources/flex
+cd /sources/flex
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="flex"
+pkgver="&flex-version;"
+pkgrel="1"
+pkgdesc="The Flex package contains a utility for generating programs that recognize patterns in text."
+arch=('x86'
+      'x86_64')
+license=('BSD3C'
+         'custom')
+groups=('core')
+depends=('bash'
+         'glibc'
+         'm4'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'patch'
+             'sed'
+             'texinfo')
+checkdepends=('bison'
+              'gawk')
+source=('&flex-url;')
+md5sums=('&flex-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr \
+              --docdir=/usr/share/doc/flex-${pkgver} \
+              --disable-static
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  ln -sv flex ${pkgdir}/usr/bin/lex
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/flex-&flex-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Flex package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S flex --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/flex
+cp PKGBUILD /srv/pacman/source/LFS/flex
+cd /sources
+rm -rf flex</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gawk.xml LFS-pacman/chapter08/gawk.xml
--- LFS_orig/chapter08/gawk.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gawk.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,33 +37,89 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Gawk</title>
 
-    <para>First, ensure some unneeded files are not installed:</para>
+    <para>Create the PKGBUILD for the Gawk package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">sed -i 's/extras//' Makefile.in</userinput></screen>
-
-    <para>Prepare Gawk for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>If desired, install the documentation:</para>
-
-<screen><userinput remap="install">mkdir -pv                                   /usr/share/doc/gawk-&gawk-version;
-cp    -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-&gawk-version;</userinput></screen>
+<screen><userinput>mkdir /sources/gawk
+cd /sources/gawk
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="gawk"
+pkgver="&gawk-version;"
+pkgrel="1"
+pkgdesc="gawk 5.1.0"
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('bash'
+         'glibc'
+         'mpfr'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'gmp'
+             'grep'
+             'make'
+             'patch'
+             'readline'
+             'sed'
+             'texinfo')
+checkdepends=('diffutils')
+optdepends=('libsigsegv')
+source=('&gawk-md5;')
+md5sums=('&gawk-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+  # Enusre some unneeded files are not installed
+  sed -i 's/extras//' Makefile.in
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+
+  # Install the documentation
+  mkdir -v ${pkgdir}/usr/share/doc/gawk-${pkgver}
+  cp    -v doc/{awkforai.txt,*.{eps,pdf,jpg}} ${pkgdir}/usr/share/doc/gawk-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gawk-&gawk-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Gawk package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S gawk --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/gawk
+cp PKGBUILD /srv/pacman/source/LFS/gawk
+cd /sources
+rm -rf gawk</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gcc.xml LFS-pacman/chapter08/gcc.xml
--- LFS_orig/chapter08/gcc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gcc.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,253 +38,370 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of GCC</title>
-<!--
-    <para>At first, fix an issue breaking
-    <filename class="libraryfile">libasan.a</filename> building this package
-    with Glibc-2.34 or later:</para>
-
-<screen><userinput remap="pre">sed -e '/static.*SIGSTKSZ/d' \
-    -e 's/return kAltStackSize/return SIGSTKSZ * 4/' \
-    -i libsanitizer/sanitizer_common/sanitizer_posix_libcdep.cpp</userinput></screen>
--->
-    <para>If building on x86_64, change the default directory name for 64-bit
-    libraries to <quote>lib</quote>:</para>
 
-<screen><userinput remap="pre">case $(uname -m) in
-  x86_64)
-    sed -e '/m64=/s/lib64/lib/' \
-        -i.orig gcc/config/i386/t-linux64
-  ;;
-esac</userinput></screen>
-
-    <para>The GCC documentation recommends building GCC in a dedicated build directory:</para>
-
-<screen><userinput remap="pre">mkdir -v build
-cd       build</userinput></screen>
-
-    <para>Prepare GCC for compilation:</para>
-
-<screen><userinput remap="configure">../configure --prefix=/usr            \
-             LD=ld                    \
-             --enable-languages=c,c++ \
-             --disable-multilib       \
-             --disable-bootstrap      \
-             --with-system-zlib</userinput></screen>
-
-    <para>Note that for other programming languages there are some prerequisites that
-    are not yet available. See the
-    <ulink url="&blfs-book;general/gcc.html">BLFS Book GCC page</ulink>
-    for instructions on how to build all of GCC's supported languages.</para>
-
-    <variablelist>
-      <title>The meaning of the new configure parameters:</title>
-
-      <varlistentry>
-        <term><parameter>LD=ld</parameter></term>
-        <listitem>
-          <para>This parameter makes the configure script use the ld installed
-          by the binutils built earlier in this chapter, rather than
-          the cross-built version which would otherwise be used.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>--with-system-zlib</parameter></term>
-        <listitem>
-          <para>This switch tells GCC to link to the system installed copy of
-          the zlib library, rather than its own internal copy.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <important>
-      <para>In this section, the test suite for GCC is considered
-      important, but it takes a long time. First time builders are 
-      encouraged to not skip it.  The time to run the tests can be
-      reduced significantly by adding -jx to the make command below
-      where x is the number of cores on your system.</para>
-    </important>
-
-   <para>One set of tests in the GCC test suite is known to exhaust the default
-   stack, so increase the stack size prior to running the tests:</para>
-
-<screen><userinput remap="test">ulimit -s 32768</userinput></screen>
-
-    <para>Test the results as a non-privileged user, but do not stop at errors:</para>
-
-<screen><userinput remap="test">chown -Rv tester .
-su tester -c "PATH=$PATH make -k check"</userinput></screen>
-
-    <para>To receive a summary of the test suite results, run:</para>
-
-<screen><userinput remap="test">../contrib/test_summary</userinput></screen>
-
-    <para>For only the summaries, pipe the output through
-    <userinput>grep -A7 Summ</userinput>.</para>
-
-    <para>Results can be compared with those located at <ulink
-    url="&test-results;"/> and
-    <ulink url="https://gcc.gnu.org/ml/gcc-testresults/"/>.</para>
-
-    <para>In g++, four tests related to PR100400 are known to be reported
-    as both XPASS and FAIL.  It's because the test file for this known issue
-    is not well written.</para>
-
-    <para>A few unexpected failures cannot always be avoided. The GCC developers
-    are usually aware of these issues, but have not resolved them yet.
-    Unless the test results are vastly different from those at the above URL,
-    it is safe to continue.</para>
-
-    <!--note><para>
-      On some combinations of kernel configuration and AMD processors
-      there may be more than 1100 failures in the gcc.target/i386/mpx
-      tests (which are designed to test the MPX option on recent
-      Intel processors). These can safely be ignored on AMD
-      processors. These tests will also fail on Intel processors if MPX support
-      is not enabled in the kernel even though it is present on the CPU.
-    </para></note-->
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>The GCC build directory is owned by <systemitem class="username">
-    tester</systemitem> now and the ownership of the installed header
-    directory (and its content) will be incorrect.  Change the ownership to
-    <systemitem class="username">root</systemitem> user and group:</para>
-
-<screen><userinput remap="install">chown -v -R root:root \
-    /usr/lib/gcc/$(gcc -dumpmachine)/&gcc-version;/include{,-fixed}</userinput></screen>
-
-    <para>Create a symlink required by the <ulink
-    url="https://refspecs.linuxfoundation.org/FHS_3.0/fhs/ch03s09.html">FHS</ulink>
-    for "historical" reasons.</para>
-
-<screen><userinput remap="install">ln -svr /usr/bin/cpp /usr/lib</userinput></screen>
-  <!-- already done earlier
-    <para>Many packages use the name <command>cc</command> to call the C
-    compiler. To satisfy those packages, create a symlink:</para>
-
-<screen><userinput remap="install">ln -sv gcc /usr/bin/cc</userinput></screen>
-  -->
-    <para>Add a compatibility symlink to enable building programs with
-    Link Time Optimization (LTO):</para>
-
-<screen><userinput remap="install">ln -sfv ../../libexec/gcc/$(gcc -dumpmachine)/&gcc-version;/liblto_plugin.so \
-        /usr/lib/bfd-plugins/</userinput></screen>
+    <note><para>In the following build, we depart from LFS considerably in
+    that we build the first (and only) split package in this version of
+    LFS. Feel free to replace the PKGBUILD with a static one that generates
+    only the combined gcc and g++ packages, but otherwise, this installs all
+    of the languages included in GCC.</para></note>
+
+    <para>Create the PKGBUILD for the GCC package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/gcc
+cd /sources/gcc
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgbase=gcc
+pkgname=(gcc-ada
+         gcc-d
+         gcc-fortran
+         gcc-go
+         gcc-objc
+         gcc)
+pkgver="&gcc-version;"
+_islver="&isl-version;"
+pkgrel=1
+arch=('x86'
+      'x86_64')
+url="https://gcc.gnu.org/"
+license=('GPL'
+         'LGPL'
+         'FDL'
+         'custom')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'findutils'
+             'gawk' 
+             'gcc'
+             'gettext'
+             'glibc'
+             'gmp'
+             'grep'
+             'm4'
+             'make'
+             'mpc'
+             'mpfr'
+             'patch'
+             'perl'
+             'sed'
+             'tar'
+             'texinfo')
+checkdepends=('dejagnu'
+              'inetutils')
+source=("&gcc-url;"
+        "&isl-url;")
+md5sume=("&gcc-md5;"
+         "&isl-md5;")
+options=('!emptydirs' 'staticlibs')
+
+# If you want to modify what is actually built for a local build, set these 0
+_build_ada=1
+_build_d=1
+_build_fortran=1
+_build_go=1
+_build_objc=1
+
+_confargs=""
+_languages="c,c++,lto"
+
+# See if we have ada
+_have_ada=$(pacman -Q gcc-ada > /dev/null 2&gt;&amp;1 &amp;&amp; echo "1" || echo "0")
+
+prepare(){
+  cd ${srcdir}/${pkgbase}-${pkgver}
 
-    <para>Now that our final toolchain is in place, it is important to again ensure
-    that compiling and linking will work as expected. We do this by performing
-    some sanity checks:</para>
+  # link isl for in-tree build
+  ln -s ../isl-${_islver} isl
 
-<screen><userinput>echo 'int main(){}' &gt; dummy.c
-cc dummy.c -v -Wl,--verbose &amp;&gt; dummy.log
-readelf -l a.out | grep ': /lib'</userinput></screen>
+  # hack! - some configure tests for header files using "$CPP $CPPFLAGS"
+  sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
 
-  <para>There should be no errors,
-  and the output of the last command will be (allowing for
-  platform-specific differences in the dynamic linker name):</para>
-
-<screen><computeroutput>[Requesting program interpreter: /lib64/ld-linux-x86-64.so.2]</computeroutput></screen>
-
-  <para>Now make sure that we're setup to use the correct start files:</para>
-
-<screen><userinput>grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log</userinput></screen>
-
-  <para>The output of the last command should be:</para>
-
-<screen><computeroutput>/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crt1.o succeeded
-/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crti.o succeeded
-/usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/../../../../lib/crtn.o succeeded</computeroutput></screen>
-
-  <para>Depending on your machine architecture, the above may differ slightly.
-  The difference will be the name of the directory
-  after <filename class="directory">/usr/lib/gcc</filename>. The important
-  thing to look for here is that <command>gcc</command> has found all three
-  <filename>crt*.o</filename> files under the
-  <filename class="directory">/usr/lib</filename> directory.</para>
-
-  <para>Verify that the compiler is searching for the correct header
-  files:</para>
-
-<screen><userinput>grep -B4 '^ /usr/include' dummy.log</userinput></screen>
-
-  <para>This command should return the following output:</para>
-
-<screen><computeroutput>#include &lt;...&gt; search starts here:
- /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include
- /usr/local/include
- /usr/lib/gcc/x86_64-pc-linux-gnu/&gcc-version;/include-fixed
- /usr/include</computeroutput></screen>
-
-   <para>Again, the directory named after your target triplet may be
-   different than the above, depending on your system architecture.</para>
-
-  <para>Next, verify that the new linker is being used with the correct search paths:</para>
-
-<screen><userinput>grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'</userinput></screen>
-
-  <para>References to paths that have components with '-linux-gnu' should
-  be ignored, but otherwise the output of the last command should be:</para>
-
-<screen><computeroutput>SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib64")
-SEARCH_DIR("/usr/local/lib64")
-SEARCH_DIR("/lib64")
-SEARCH_DIR("/usr/lib64")
-SEARCH_DIR("/usr/x86_64-pc-linux-gnu/lib")
-SEARCH_DIR("/usr/local/lib")
-SEARCH_DIR("/lib")
-SEARCH_DIR("/usr/lib");</computeroutput></screen>
-
-   <para>A 32-bit system may see a few different directories. For example, here
-   is the output from an i686 machine:</para>
-
-<screen><computeroutput>SEARCH_DIR("/usr/i686-pc-linux-gnu/lib32")
-SEARCH_DIR("/usr/local/lib32")
-SEARCH_DIR("/lib32")
-SEARCH_DIR("/usr/lib32")
-SEARCH_DIR("/usr/i686-pc-linux-gnu/lib")
-SEARCH_DIR("/usr/local/lib")
-SEARCH_DIR("/lib")
-SEARCH_DIR("/usr/lib");</computeroutput></screen>
-
-  <para>Next make sure that we're using the correct libc:</para>
-
-<screen><userinput>grep "/lib.*/libc.so.6 " dummy.log</userinput></screen>
-
-  <para>The output of the last command should be:</para>
-
-<screen><computeroutput>attempt to open /usr/lib/libc.so.6 succeeded</computeroutput></screen>
-
-  <para>Make sure GCC is using the correct dynamic linker:</para>
-
-<screen><userinput>grep found dummy.log</userinput></screen>
-
-  <para>The output of the last command should be (allowing for
-  platform-specific differences in dynamic linker name):</para>
-
-<screen><computeroutput>found ld-linux-x86-64.so.2 at /usr/lib/ld-linux-x86-64.so.2</computeroutput></screen>
-
-  <para>If the output does not appear as shown above or is not received
-  at all, then something is seriously wrong. Investigate and retrace the
-  steps to find out where the problem is and correct it. <!--The most likely
-  reason is that something went wrong with the specs file adjustment.--> Any
-  issues will need to be resolved before continuing with the process.</para>
-
-  <para>Once everything is working correctly, clean up the test files:</para>
-
-<screen><userinput>rm -v dummy.c a.out dummy.log</userinput></screen>
-
-    <para>Finally, move a misplaced file:</para>
+  # adjust libdir for x86_64
+  if [ `uname -m` == "x86_64" ]; then
+    sed -e '/m64=/s/lib64/lib/' \
+        -i.orig gcc/config/i386/t-linux64
+  fi
+  mkdir build
 
-<screen><userinput remap="install">mkdir -pv /usr/share/gdb/auto-load/usr/lib
-mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib</userinput></screen>
+  if [[ "x${_build_ada}" == "x1" ]]; then
+    if [[ "x${_have_ada}" == "x0" ]]; then
+      cd ${srcdir}
+      /usr/bin/curl -gqb "" -fLC - --retry 3 --retry-delay 3 -o gnat.tar.xz \
+          http://www.linuxfromscratch.org/~dj/gnat-community-2019-20190517-x86_64-linux-bin.tar.xz
+      gnat_md5sum="61fed3586ed369b980556f6f78c927c5"
+      if test "${gnat_md5sum}" != "$(/usr/bin/md5sum gnat.tar.xz | cut -d " " -f 1)"; then
+        echo "Error! Failure downloading GNAT."
+        exit 1
+      fi
+      find ${srcdir}/gnat -name ld -exec mv -v {} {}.old \;
+      find ${srcdir}/gnat -name as -exec mv -v {} {}.old \;
+    fi
+  fi
+}
+
+build(){
+  cd "${srcdir}/${pkgbase}-${pkgver}/build"
+
+  # Handle options
+  if [[ "x${_build_ada}" == "x1" ]]; then
+    _languages="${_languages},ada"
+    # Only bootstrap if we don't already hava ada installed
+    if [[ "${_have_ada}" == "1" ]]; then
+      _confargs="${_confargs} --disable-bootstrap"
+    else
+      export PATH=${srcdir}/gnat/bin:${PATH}
+    fi
+  fi
+
+  if [[ "x${_build_fortran}" == "x1" ]]; then
+    _languages="${_languages},fortran"
+  fi
+
+  if [[ "x${_build_go}" == "x1" ]]; then
+    _languages="${_languages},go"
+  fi
+
+  if [[ "x${_build_objc}" == "x1" ]]; then
+    _languages="${_languages},objc,obj-c++"
+  fi
+
+  if [[ "x${_build_d}" == "x1" ]]; then
+    _languages="${_languages},d"
+  fi
+
+  # using -pipe causes spurious test-suite failures
+  # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48565
+  CFLAGS=${CFLAGS/-pipe/}
+  CXXFLAGS=${CXXFLAGS/-pipe/}
+
+  ../configure                           \
+       --prefix=/usr                     \
+       --libdir=/usr/lib                 \
+       --disable-multilib                \
+       --with-system-zlib                \
+       ${_confargs}                      \
+       --enable-languages=${_languages}
+  make
+
+  # Install to temp location and extract split packages from there
+  make DESTDIR=${srcdir}/gcc-dest install
+}
+
+check(){
+  cd ${srcdir}/${pkgbase}-${pkgver}/build
+  make -k check || true
+  ${srcdir}/${pkgbase}-${pkgver}/contrib/test_summary
+}
+
+package_gcc-ada(){
+  pkgdesc="The GCC package contains the GNU compiler collection (Ada front-end)"
+  depends=("gcc=${pkgver}-${pkgrel}")
+
+  install -vdm755 ${pkgdir}/usr/bin
+  mv -v ${srcdir}/gcc-dest/usr/bin/gnat* ${pkgdir}/usr/bin
+
+  install -vdm755 \
+      ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/plugin/include
+  mv -v ${srcdir}/gcc-dest/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/ada* \
+        ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}
+  mv -v ${srcdir}/gcc-dest/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/plugin/include/ada \
+       ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/plugin/include
+  install -vdm755 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/adalib
+  install -vm644 ${srcdir}/${pkgbase}-${pkgver}/build/gcc/ada/rts/*.ali \
+                 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/adalib
+  install -vdm755 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/adainclude
+  install -vm644 ${srcdir}/${pkgbase}-${pkgver}/build/gcc/ada/rts/*.adb \
+                 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/adainclude
+  install -vm644 ${srcdir}/${pkgbase}-${pkgver}/build/gcc/ada/rts/*.ads \
+                 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/adainclude
+
+
+  install -vdm755 ${pkgdir}/usr/libexec/gcc/$CARCH-pc-linux-gnu/${pkgver}
+  mv -v ${srcdir}/gcc-dest/usr/libexec/gcc/$CARCH-pc-linux-gnu/${pkgver}/gnat1 \
+        ${pkgdir}/usr/libexec/gcc/$CARCH-pc-linux-gnu/${pkgver}
+
+  install -vdm755 ${pkgdir}/usr/share/info
+  mv -v ${srcdir}/gcc-dest/usr/share/info/gnat* ${pkgdir}/usr/share/info
+}
+
+package_gcc-d(){
+  pkgdesc="The GCC package contains the GNU compiler collection (D front-end)"
+  depends=("gcc=${pkgver}-${pkgrel}")
+
+  install -vdm755 ${pkgdir}/usr/bin
+  mv -v ${srcdir}/gcc-dest/usr/bin/{,$CARCH-pc-linux-gnu-}gdc ${pkgdir}/usr/bin
+
+  install -vdm755 ${pkgdir}/usr/include/dlang
+  ln -sf /usr/lib/gcc/$CARCH-pc-linux/gnu/${pkgver}/include/d \
+        ${pkgdir}/usr/include/dlang/gdc
+
+  install -vdm755 ${pkgdir}/usr/share/{info,man/man1}
+  mv -v ${srcdir}/gcc-dest/usr/share/info/gdc.info ${pkgdir}/usr/share/info
+  mv -v ${srcdir}/gcc-dest/usr/share/man/man1/gdc.1 ${pkgdir}/usr/share/man/man1
+
+  install -vdm755 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/include
+  mv -v ${srcdir}/gcc-dest/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/include/d \
+        ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/include
+  install -vDm755 ${srcdir}/gcc-${pkgver}/build/gcc/d21 \
+        ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/
+  mv -v ${srcdir}/gcc-dest/usr/lib/libg{druntime,phobos}.* ${pkgdir}/usr/lib
+}
+
+package_gcc-go(){
+  pkgdesc="The GCC package contains the GNU compiler collection (Go front-end)"
+  depends=("gcc=${pkgver}-${pkgrel}")
+
+  install -vdm755 ${pkgdir}/usr/bin
+  mv -v ${srcdir}/gcc-dest/usr/bin/{{,$CARCH-pc-linux-gnu-}gccgo,go{,fmt}} \
+        ${pkgdir}/usr/bin
+
+  install -vdm755 ${pkgdir}/usr/lib
+  mv -v ${srcdir}/gcc-dest/usr/lib/libgo.* ${pkgdir}/usr/lib
+  mv -v ${srcdir}/gcc-dest/usr/lib/libgo{,lib}begin.a ${pkgdir}/usr/lib
+  mv -v ${srcdir}/gcc-dest/usr/lib/go ${pkgdir}/usr/lib
+
+  install -vdm755 ${pkgdir}/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}
+  mv -v ${srcdir}/gcc-dest/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}/{cgo,go1} \
+        ${pkgdir}/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}
+
+  install -vdm755 ${pkgdir}/usr/share/{info,man/man1}
+  mv -v ${srcdir}/gcc-dest/usr/share/info/gccgo.info ${pkgdir}/usr/share/info
+  mv -v ${srcdir}/gcc-dest/usr/share/man/man1/{gccgo,go,gofmt}.1 \
+        ${pkgdir}/usr/share/man/man1
+}
+
+package_gcc-fortran(){
+  pkgdesc="The GCC package contains the GNU compiler collection (Fortran front-end)"
+  depends=("gcc=${pkgver}-${pkgrel}")
+
+  install -vdm755 ${pkgdir}/usr/bin
+  mv -v ${srcdir}/gcc-dest/usr/bin/{,$CARCH-pc-linux-gnu-}gfortran \
+        ${pkgdir}/usr/bin
+
+  install -vdm755 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}
+  mv -v ${srcdir}/gcc-dest/usr/lib/libgfortran* ${pkgdir}/usr/lib
+  mv -v ${srcdir}/gcc-dest/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/libcaf* \
+        ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/
+  mv -v ${srcdir}/gcc-dest/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/finclude \
+        ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/
+
+  install -vdm755 ${pkgdir}/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}
+  mv -v ${srcdir}/gcc-dest/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}/f951 \
+        ${pkgdir}/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}
+
+  install -vdm755 ${pkgdir}/usr/share/{info,man/man1}
+  mv -v ${srcdir}/gcc-dest/usr/share/info/gfortran.info ${pkgdir}/usr/share/info
+  mv -v ${srcdir}/gcc-dest/usr/share/man/man1/gfortran.1 \
+        ${pkgdir}/usr/share/man/man1
+}
+
+package_gcc-objc(){
+  pkgdesc="The GCC package contains the GNU compiler collection (Objective-C front-end)"
+  depends=("gcc=${pkgver}-${pkgrel}")
+
+  install -vdm755 ${pkgdir}/usr/lib
+  mv -v ${srcdir}/gcc-dest/usr/lib/libobjc* ${pkgdir}/usr/lib
+
+  install -vdm755 ${pkgdir}/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}
+  mv -v ${srcdir}/gcc-dest/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}/cc1obj{,plus} \
+       ${pkgdir}/usr/libexec/gcc/${CARCH}-pc-linux-gnu/${pkgver}
+
+  install -vdm755 ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/plugin/include
+  mv -v ${srcdir}/gcc-dest/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/plugin/include/objc \
+        ${pkgdir}/usr/lib/gcc/$CARCH-pc-linux-gnu/${pkgver}/plugin/include
+}
+
+package_gcc(){
+  pkgdesc="The GCC package contains the GNU compiler collection (C and C++ front-ends)"
+  depends=("glibc")
+  groups=('core')
+
+  install -vdm755 ${pkgdir}/usr/
+  mv -v ${srcdir}/gcc-dest/usr/* ${pkgdir}/usr/
+
+  install -vdm755 ${pkgdir}/usr/share/gdb/auto-load/usr/lib
+  mv -v ${pkgdir}/usr/lib/*gdb.py ${pkgdir}/usr/share/gdb/auto-load/usr/lib
+
+  install -vdm755 ${pkgdir}/lib
+  ln -vsf ../usr/bin/cpp ${pkgdir}/lib
+  ln -vsf gcc ${pkgdir}/usr/bin/cc
+
+  install -vdm755 ${pkgdir}/usr/lib/bfd-plugins
+  ln -sfv ../../libexec/gcc/$CARCH-pc-linux-gnu/${pkgver}/liblto_plugin.so \
+          ${pkgdir}/usr/lib/bfd-plugins
+
+  # Strip most of the package if not a debug build - be picky so debug works
+  if check_option 'debug' n; then
+    options+=('!strip')
+
+    # Executables
+    find "$pkgdir"/usr/bin -type f -executable -exec strip $STRIP_BINARIES {} + 2&gt; /dev/null || true
+    find "${pkgdir}"/usr/lib/libexec/ \
+     -type f -executable \
+     -not -name "*.so*" \
+     -not -name "*.a" \
+     -not -name "*.sh" \
+     -exec strip $STRIP_BINARIES {} + 2&gt; /dev/null || true
+
+    # Libraries
+    find "$pkgdir"/usr/lib -name '*.a' -type f -exec strip $STRIP_STATIC {} + 2&gt; /dev/null || true
+    find "$pkgdir"/usr/lib \
+      -type f \
+      -name '*.so' \
+      -not -name "libquadmath*" \
+      -not -name "libstdc++*" \
+      -not -name "libitm*" \
+      -not -name "libatomic*" \
+      -exec strip $STRIP_SHARED {} + 2&gt; /dev/null || true
+ 
+  fi
+
+}</literal>
+REALEOF</userinput></screen>
+
+    <para>Prepare the build directory for the pacman user and build the packages:</para>
+
+<screen><userinput>chown -R root:pacman .
+chmod 2775 .
+chmod 664 PKGBUILD
+su pacman -c 'makepkg -L --nodeps'</userinput></screen>
+
+    <para>Add the newly created packages to the central package repository:</para>
+
+<screen><userinput>
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gcc-&gcc-version;-1-$(uname -m).pkg.tar.xz
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gcc-objc-&gcc-version;-1-$(uname -m).pkg.tar.xz
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gcc-fortran-&gcc-version;-1-$(uname -m).pkg.tar.xz
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gcc-go-&gcc-version;-1-$(uname -m).pkg.tar.xz
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gcc-d-&gcc-version;-1-$(uname -m).pkg.tar.xz
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gcc-ada-&gcc-version;-1-$(uname -m).pkg.tar.xz
+
+</userinput></screen>
+
+    <para>Update the local cache and install the GCC packages:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S gcc{,-objc,-fortran,-go,-d,-ada} --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/gcc
+cp PKGBUILD /srv/pacman/source/LFS/gcc
+cd /sources
+rm -rf gcc</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gdbm.xml LFS-pacman/chapter08/gdbm.xml
--- LFS_orig/chapter08/gdbm.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gdbm.xml	2022-06-16 20:05:13.901189092 -0500
@@ -41,18 +41,57 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of GDBM</title>
-<!--
-    <para>First, fix an issue first identified by gcc-10:</para>
 
-<screen><userinput remap="pre">sed -r -i '/^char.*parseopt_program_(doc|args)/d' src/parseopt.c</userinput></screen>
--->
-    <para>Prepare GDBM for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --disable-static \
-            --enable-libgdbm-compat</userinput></screen>
+    <para>Create the PKGBUILD for the Gdbm package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/gdbm
+cd /sources/gdbm
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="gdbm"
+pkgver="&gdbm-version;"
+pkgrel="1"
+pkgdesc="The GDBM package contains the GNU Database Manager."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('bash'
+         'glibc'
+         'readline'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+source=('&gdbm-url;')
+md5sums=('&gdbm-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --enable-libgdbm-compat
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure option:</title>
@@ -67,21 +106,23 @@
       </varlistentry>
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gdbm-&gdbm-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-<screen><userinput remap="make">make</userinput></screen>
+    <para>Update the local cache and install the Gdbm package:</para>
 
-    <para>To test the results, issue:</para>
+<screen><userinput>pacman -Syu
+pacman -S gdbm --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="test">make check</userinput></screen>
-<!--
-    <para>
-      One test, <filename>version</filename>, is known to fail.
-    </para>
--->
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/gdbm
+cp PKGBUILD /srv/pacman/source/LFS/gdbm
+cd /sources
+rm -rf gdbm</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gettext.xml LFS-pacman/chapter08/gettext.xml
--- LFS_orig/chapter08/gettext.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gettext.xml	2022-06-16 20:05:13.904522425 -0500
@@ -40,44 +40,82 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Gettext</title>
 
-    <para>Prepare Gettext for compilation:</para>
+    <para>Create the PKGBUILD for the Gettext package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --disable-static \
-            --docdir=/usr/share/doc/gettext-&gettext-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<!--<screen><userinput remap="make">make BISON_LOCALEDIR=/usr/share/locale</userinput></screen>-->
-<screen><userinput remap="make">make</userinput></screen>
-<!--
-   <variablelist>
-      <title>The meaning of the make parameter:</title>
-
-      <varlistentry>
-        <term><parameter>BISON_LOCALEDIR=/usr/share/locale</parameter></term>
-        <listitem>
-          <para>Since bison is not yet installed in /usr, configure hardcodes
-          the directory containing translations for the bison program (the
-	  "locale" directory) as /tools/share/locale. Passing this variable
-           to make allows overriding the choice made by configure.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
--->
-    <para>To test the results (this takes a long time, around 3 SBUs),
-    issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install
-chmod -v 0755 /usr/lib/preloadable_libintl.so</userinput></screen>
+<screen><userinput>mkdir /sources/gettext
+cd /sources/gettext
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="gettext"
+pkgver="&gettext-version;"
+pkgrel="1"
+pkgdesc="The Gettext package contains utilities for internationalization and localization."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('acl'
+         'bash'
+         'gcc'
+         'glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gawk'
+             'grep'
+             'make'
+             'ncurses'
+             'sed'
+             'texinfo')
+checkdepends=('diffutils'
+              'perl'
+              'tcl')
+source=('&gettext-url;')
+md5sums=('&gettext-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --docdir=/usr/share/doc/gettext-${pkgver{
+  make
+}
+
+check(){
+  # Note, this takes a long time, about 3 SBU
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make -j1 DESTDIR=${pkgdir} install
+  chmod -v 0755 ${pkgdir}/usr/lib/preloadable_libintl.so
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gettext-&gettext-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Gettext package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S gettext --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/gettext
+cp PKGBUILD /srv/pacman/source/LFS/gettext
+cd /sources
+rm -rf gettext</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/glibc.xml LFS-pacman/chapter08/glibc.xml
--- LFS_orig/chapter08/glibc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/glibc.xml	2022-06-16 20:05:13.901189092 -0500
@@ -13,7 +13,7 @@
     <productnumber>&glibc-version;</productnumber>
     <address>&glibc-url;</address>
   </sect1info>
-
+  
   <title>Glibc-&glibc-version;</title>
 
   <indexterm zone="ch-system-glibc">
@@ -22,7 +22,6 @@
 
   <sect2 role="package">
     <title/>
-
     <para>The Glibc package contains the main C library. This library provides
     the basic routines for allocating memory, searching directories, opening and
     closing files, reading and writing files, string handling, pattern matching,
@@ -40,42 +39,290 @@
 
   </sect2>
 
-  <sect2 role="installation">
-    <title>Installation of Glibc</title>
+  <sect2>
+    <title>Installation of GlibC</title>
+
+    <para>Unlike in LFS, we will need to be able to generate locales on the fly
+    and for the target system. To do so, we've borrowed a script from Arch Linux.
+    Create the locale-gen script with the following command:</para>
+
+<screen><userinput>mkdir /sources/glibc
+cd /sources/glibc
+cat &gt; locale-gen &lt;&lt; "REALEOF"
+<literal>#!/bin/sh
+
+set -e
+
+LOCALEGEN=/etc/locale.gen
+LOCALES=/usr/share/i18n/locales
+if [ -n "$POSIXLY_CORRECT" ]; then
+  unset POSIXLY_CORRECT
+fi
+
+
+[ -f $LOCALEGEN -a -s $LOCALEGEN ] || exit 0;
+
+# Remove all old locale dir and locale-archive before generating new
+# locale data.
+rm -rf /usr/lib/locale/* || true
+
+umask 022
+
+is_entry_ok() {
+  if [ -n "$locale" -a -n "$charset" ] ; then
+    true
+  else
+    echo "error: Bad entry '$locale $charset'"
+    false
+  fi
+}
+
+echo "Generating locales..."
+while read locale charset; do \
+	case $locale in \#*) continue;; "") continue;; esac; \
+	is_entry_ok || continue
+	echo -n "  `echo $locale | sed 's/\([^.\@]*\).*/\1/'`"; \
+	echo -n ".$charset"; \
+	echo -n `echo $locale | sed 's/\([^\@]*\)\(\@.*\)*/\2/'`; \
+	echo -n '...'; \
+        if [ -f $LOCALES/$locale ]; then input=$locale; else \
+        input=`echo $locale | sed 's/\([^.]*\)[^@]*\(.*\)/\1\2/'`; fi; \
+	localedef -i $input -c -f $charset -A /usr/share/locale/locale.alias $locale; \
+	echo ' done'; \
+done &lt; $LOCALEGEN
+echo -n "  C.UTF-8... "
+localedef -i POSIX -c -f UTF-8 C.UTF-8 \
+	  -A /usr/share/locale/locale.alias &gt; /dev/null 2&gt;&amp;1 || true
+echo "done"
+echo -n "  ja_JP.SIJS... "
+localedef -i ja_JP -c -f SHIFT_JIS ja_JP.SIJS \
+	  -A /usr/share/locale/locale.alias &gt; /dev/null 2&gt;&amp;1 || true
+echo "done"
+echo "Generation complete."</literal>
+REALEOF</userinput></screen>
+
+    <para>Now create the list of default locales required for testsuites in LFS:</para>
+
+<screen><userinput>cat &gt; locale.default &lt;&lt; "REALEOF"
+<literal>cs_CZ.UTF-8 UTF-8  
+de_DE@euro ISO-8859-15  
+de_DE ISO-8859-1  
+de_DE.UTF-8 UTF-8  
+el_GR ISO-8859-7  
+en_GB ISO-8859-1  
+en_GB.UTF-8 UTF-8  
+en_HK ISO-8859-1  
+en_PH ISO-8859-1  
+en_US ISO-8859-1  
+en_US.UTF-8 UTF-8  
+es_ES@euro ISO-8859-15  
+es_MX ISO-8859-1  
+fa_IR UTF-8  
+fr_FR@euro ISO-8859-15  
+fr_FR ISO-8859-1  
+fr_FR.UTF-8 UTF-8  
+is_IS ISO-8859-1  
+is_IS.UTF-8 UTF-8  
+it_IT@euro ISO-8859-15  
+it_IT ISO-8859-1  
+it_IT.UTF-8 UTF-8  
+ja_JP.EUC-JP EUC-JP  
+ja_JP.UTF-8 UTF-8  
+nl_NL@euro ISO-8859-15  
+ru_RU.KOI8-R KOI8-R  
+ru_RU.UTF-8 UTF-8  
+se_NO UTF-8  
+ta_IN UTF-8  
+tr_TR.UTF-8 UTF-8  
+zh_CN.GB18030 GB18030  
+zh_HK BIG5-HKSCS  
+zh_TW.UTF-8 UTF-8  </literal>
+REALEOF</userinput></screen>
+
+    <para>Now create the header for the combined configuration file that will
+    reinstall the locales (in addition the items above, the full list will be
+    populated as part of the package function):</para>
+
+<screen><userinput>cat &gt; locale.gen.txt &lt;&lt; "REALEOF"
+<literal># Configuration file for locale-gen
+#
+# lists of locales that are to be generated by the locale-gen command.
+#
+# Each line is of the form:
+#
+#     &lt;locale&gt; &lt;charset&gt;
+#
+#  where &lt;locale&gt; is one of the locales given in /usr/share/i18n/locales
+#  and &lt;charset&gt; is one of the character sets listed in /usr/share/i18n/charmaps
+#
+#  Examples:
+#  en_US ISO-8859-1
+#  en_US.UTF-8 UTF-8
+#  de_DE ISO-8859-1
+#  de_DE@euro ISO-8859-15
+#
+#  The locale-gen command will generate all the locales,
+#  placing them in /usr/lib/locale.
+#
+#  A list of supported locales is included in this file.
+#  Uncomment the ones you need.
+#</literal>
+REALEOF</userinput></screen>
+
+    <para>You need to regenrate the installed locales on isntallation of a new
+    version of GLibC. Create an install file which runs localegen on both first
+    installation and on upgrades:</para>
+
+<screen><userinput>cat &gt; glibc.install &lt;&lt; "REALEOF"
+<literal># glibc.install
+
+post_install(){
+  /usr/bin/locale-gen
+}
+
+post_upgrade(){
+  /usr/bin/locale-gen
+}</literal>
+REALEOF</userinput></screen>
+
+    <para>Finally, create the PKGBUILD for the GLibC package:</para>
+
+<screen><userinput>cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname=glibc
+pkgver=&glibc-version;
+pkgrel=1
+pkgdesc="The Glibc package contains the main C library. This library provides the basic routines for allocating memory, searching directories, opening and closing files, reading and writing files, string handling, pattern matching, arithmetic, and so on."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2.1'
+         'PD')
+install=glibc.install
+options=('!emptydirs' 'staticlibs' '!strip')
+groups=('core')
+depends=('rootfs')
+makedepends=('bash'
+             'binutils'
+             'bison'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'gettext'
+             'grep'
+             'gzip'
+             'linux-api-headers'
+             'make'
+             'perl'
+             'python'
+             'sed'
+             'texinfo')
+checkdepends=('file')
+backup=('etc/nsswitch.conf'
+        'etc/locale.gen'
+        'etc/localtime')
+source=("&glibc-url;"
+        "&patches-root;&glibc-fhs-patch;"
+        'locale.default'
+        'locale.gen.txt'
+        'locale-gen')
+md5sums=('&glibc-md5;'
+         '&glibc-fhs-patch-md5;'
+         ''
+         ''
+         '')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+  patch -Np1 -i ${srcdir}/glibc-${pkgver}-fhs-1.patch
+  mkdir -v build
+  cd       build
+  echo "rootsbindir=/usr/sbin" &gt; configparms
+}
+
+build(){
+  cd ${pkgname}-${pkgver}/build
+  ../configure --prefix=/usr                            \
+               --disable-werror                         \
+               --enable-kernel=3.2                      \
+               --enable-stack-protector=strong          \
+               --with-headers=/usr/include              \
+               libc_cv_slibdir=/usr/lib
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}/build
+  make -k check 2&gt;&amp;1 || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}/build
+
+  # Fixes harmless warning on installation
+  mkdir -pv ${pkgdir}/etc
+  touch ${pkgdir}/etc/ld.so.conf
+
+  # Skip unneeded sanity check that fails in minimal chroot
+  sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
+
+  make install_root=${pkgdir} -j1 install
+
+  # Fix a hardcoded path to DL in ldd
+  sed '/RTLDLIST=/s@/usr@@g' -i ${pkgdir}/usr/bin/ldd
+
+  # Setup NSCD
+  cp -v ../nscd/nscd.conf ${pkgdir}/etc/nscd.conf
+  mkdir -pv ${pkgdir}/var/cache/nscd
+
+  # Install the default nsswitch.conf file
+  cat &gt; ${pkgdir}/etc/nsswitch.conf &lt;&lt; "EOF"
+# Begin /etc/nsswitch.conf
+
+passwd: files
+group: files
+shadow: files
+
+hosts: files dns
+networks: files
+
+protocols: files
+services: files
+ethers: files
+rpc: files
+
+# End /etc/nsswitch.conf
+EOF
 
-<!-- applied in 2.35 (commit b805aebd42364fe696e417808a700fdb9800c9e8)
-    <para>First, fix a security problem identified upstream:</para>
 
-    <screen><userinput remap="pre">sed -e '/NOTIFY_REMOVED)/s/)/ \&amp;\&amp; data.attr != NULL)/' \
-    -i sysdeps/unix/sysv/linux/mq_notify.c</userinput></screen>
--->
-    <para>Some of the Glibc programs use the non-FHS compliant
-    <filename class="directory">/var/db</filename> directory to store
-    their runtime data. Apply the following patch to make such programs
-    store their runtime data in the FHS-compliant locations:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&glibc-fhs-patch;</userinput></screen>
-
-    <para>The Glibc documentation recommends building Glibc
-    in a dedicated build directory:</para>
-
-<screen><userinput remap="pre">mkdir -v build
-cd       build</userinput></screen>
-
-    <para>Ensure that the <command>ldconfig</command> and <command>sln</command>
-    utilities will be installed into
-    <filename class="directory">/usr/sbin</filename>:</para>
-
-<screen><userinput remap="pre">echo "rootsbindir=/usr/sbin" &gt; configparms</userinput></screen>
-
-    <para>Prepare Glibc for compilation:</para>
-
-<screen><userinput remap="configure">../configure --prefix=/usr                            \
-             --disable-werror                         \
-             --enable-kernel=&min-kernel;                      \
-             --enable-stack-protector=strong          \
-             --with-headers=/usr/include              \
-             libc_cv_slibdir=/usr/lib</userinput></screen>
+  # locale-gen taken from Arch Linux
+  # Install needed locales for testsuites in LFS build
+  install -vdm755 "${pkgdir}/usr/bin"
+  install -vm755 "${srcdir}/locale-gen" "${pkgdir}/usr/bin"
+  install -vdm755 "${pkgdir}/etc"
+
+  # Install header for locale.gen onfiguration file
+  install -vm644 "${srcdir}/locale.gen.txt" "${pkgdir}/etc/locale.gen"
+  echo -e "\n# Default uncommented locales are requried for LFS testsuites\n" \
+    &gt;&gt; "${pkgdir}/etc/locale.gen"
+
+  # Append (commented) all avaialble locales to the locale.gen file
+  sed -e '1,3d' -e 's|/| |g' -e 's|\\| |g' -e 's|^|#|g' \
+    ${srcdir}/${pkgname}-${pkgver}/localedata/SUPPORTED \
+    &gt;&gt; "${pkgdir}/etc/locale.gen"
+
+  # Uncomment the required locales for LFS testsuites by default
+  while read -r locale; do
+    sed -e "/^#${locale}/s|#|# Required for testsuites\n|" \
+        -i "${pkgdir}/etc/locale.gen"
+  done &lt; ${srcdir}/locale.default
+
+  # Don't install ld.so.c{onf,ache} files - included in rootfs package 
+  rm -f ${pkgdir}/etc/ld.so.c{onf,ache}
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -108,7 +355,7 @@ cd       build</userinput></screen>
       </varlistentry>
 <!-- do we need this one? -->
       <varlistentry>
-        <term><parameter>--with-headers=/usr/include</parameter></term>
+          <term><parameter>--with-headers=/usr/include</parameter></term>
         <listitem>
           <para>This option tells the build system where to find the
           kernel API headers.</para>
@@ -125,356 +372,35 @@ cd       build</userinput></screen>
 
     </variablelist>
 
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <important>
-      <para>In this section, the test suite for Glibc is considered critical.
-      Do not skip it under any circumstance.</para>
-    </important>
-
-    <para>Generally a few tests do not pass. The test failures listed below
-    are usually safe to ignore.</para>
-
-<!-- Use remap="make" here to work around a jhalfs issue. -->
-<!--<screen><userinput remap="make">case $(uname -m) in
-  i?86)   ln -sfnv $PWD/elf/ld-linux.so.2        /lib ;;
-  x86_64) ln -sfnv $PWD/elf/ld-linux-x86-64.so.2 /lib ;;
-esac</userinput></screen>
-
-    <note><para>The symbolic link above is needed to run the tests at this
-    stage of building in the chroot environment.  It will be overwritten
-    in the install phase below.</para></note>
--->
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>You may see some test failures. The Glibc test suite is
-    somewhat dependent on the host system. A few failures out of
-    over 4200 tests can generally be ignored. This is a list of the
-    most common issues seen for recent versions of LFS:</para>
-
-    <itemizedlist>
-
-      <listitem>
-        <para><emphasis>io/tst-lchmod</emphasis>
-        is known to fail in the LFS chroot environment.</para>
-      </listitem>
-
-      <listitem>
-        <para><emphasis>misc/tst-ttyname</emphasis>
-        is known to fail in the LFS chroot environment.</para>
-      </listitem>
-
-      <listitem>
-        <para>The <emphasis>nss/tst-nss-files-hosts-long</emphasis>
-        test is known to fail if the system has no non-loopback IP
-        addresses.</para> <!-- PR 24816 -->
-      </listitem>
-
-      <listitem>
-        <para>The <emphasis>nss/tst-nss-files-hosts-multi</emphasis>
-        test is known to fail on relatively slow systems due to an internal
-        timeout.</para>
-      </listitem>
-<!--
-      <listitem>
-        <para>The <emphasis>rt/tst-cputimer{1,2,3}</emphasis> tests depend on
-        the host system kernel. Kernels 4.14.91&ndash;4.14.96,
-        4.19.13&ndash;4.19.18, and 4.20.0&ndash;4.20.5 are known to
-        cause these tests to fail.
-        </para>
-      </listitem>
-
-      <listitem>
-        <para>The math tests sometimes fail when running on
-        systems where the CPU is not a relatively new Intel or
-        AMD processor.</para>
-      </listitem>
--->
-    </itemizedlist>
-
-    <para>Though it is a harmless message, the install stage of Glibc will
-    complain about the absence of <filename>/etc/ld.so.conf</filename>.
-    Prevent this warning with:</para>
-
-<screen><userinput remap="install">touch /etc/ld.so.conf</userinput></screen>
-
-    <para>Fix the Makefile to skip an unneeded sanity check
-    that fails in the LFS partial environment:
-    </para>
-
-<screen><userinput remap="install">sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Fix hardcoded path to the executable loader in
-    <command>ldd</command> script:</para>
-
-<screen><userinput remap="install">sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd</userinput></screen>
-
-    <para>Install the configuration file and runtime directory for
-    <command>nscd</command>:</para>
-
-<screen><userinput remap="install">cp -v ../nscd/nscd.conf /etc/nscd.conf
-mkdir -pv /var/cache/nscd</userinput></screen>
-
-    <para revision="systemd">Install the systemd support files for
-    <command>nscd</command>:</para>
-
-    <screen revision="systemd"><userinput remap="install">install -v -Dm644 ../nscd/nscd.tmpfiles /usr/lib/tmpfiles.d/nscd.conf
-install -v -Dm644 ../nscd/nscd.service /usr/lib/systemd/system/nscd.service</userinput></screen>
-
-    <para>Next, install the locales that can make the system respond in a
-    different language.  None of the locales are required, but if some of them
-    are missing, the test suites of future packages would skip important
-    testcases.</para>
-
-    <para>Individual locales can be installed using the
-    <command>localedef</command> program. E.g., the second
-    <command>localedef</command> command below combines the
-    <filename>/usr/share/i18n/locales/cs_CZ</filename>
-    charset-independent locale definition with the
-    <filename>/usr/share/i18n/charmaps/UTF-8.gz</filename>
-    charmap definition and appends the result to the
-    <filename>/usr/lib/locale/locale-archive</filename> file.
-    The following instructions will install the minimum set of
-    locales necessary for the optimal coverage of tests:</para>
-
-<screen role="nodump"><userinput remap="locale-test">mkdir -pv /usr/lib/locale
-localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
-localedef -i cs_CZ -f UTF-8 cs_CZ.UTF-8
-localedef -i de_DE -f ISO-8859-1 de_DE
-localedef -i de_DE@euro -f ISO-8859-15 de_DE@euro
-localedef -i de_DE -f UTF-8 de_DE.UTF-8
-localedef -i el_GR -f ISO-8859-7 el_GR
-localedef -i en_GB -f ISO-8859-1 en_GB
-localedef -i en_GB -f UTF-8 en_GB.UTF-8
-localedef -i en_HK -f ISO-8859-1 en_HK
-localedef -i en_PH -f ISO-8859-1 en_PH
-localedef -i en_US -f ISO-8859-1 en_US
-localedef -i en_US -f UTF-8 en_US.UTF-8
-localedef -i es_ES -f ISO-8859-15 es_ES@euro
-localedef -i es_MX -f ISO-8859-1 es_MX
-localedef -i fa_IR -f UTF-8 fa_IR
-localedef -i fr_FR -f ISO-8859-1 fr_FR
-localedef -i fr_FR@euro -f ISO-8859-15 fr_FR@euro
-localedef -i fr_FR -f UTF-8 fr_FR.UTF-8
-localedef -i is_IS -f ISO-8859-1 is_IS
-localedef -i is_IS -f UTF-8 is_IS.UTF-8
-localedef -i it_IT -f ISO-8859-1 it_IT
-localedef -i it_IT -f ISO-8859-15 it_IT@euro
-localedef -i it_IT -f UTF-8 it_IT.UTF-8
-localedef -i ja_JP -f EUC-JP ja_JP
-localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
-localedef -i ja_JP -f UTF-8 ja_JP.UTF-8
-localedef -i nl_NL@euro -f ISO-8859-15 nl_NL@euro
-localedef -i ru_RU -f KOI8-R ru_RU.KOI8-R
-localedef -i ru_RU -f UTF-8 ru_RU.UTF-8
-localedef -i se_NO -f UTF-8 se_NO.UTF-8
-localedef -i ta_IN -f UTF-8 ta_IN.UTF-8
-localedef -i tr_TR -f UTF-8 tr_TR.UTF-8
-localedef -i zh_CN -f GB18030 zh_CN.GB18030
-localedef -i zh_HK -f BIG5-HKSCS zh_HK.BIG5-HKSCS
-localedef -i zh_TW -f UTF-8 zh_TW.UTF-8</userinput></screen>
-
-    <para>In addition, install the locale for your own country, language and
-    character set.</para>
-
-    <para>Alternatively, install all locales listed in the
-    <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
-    (it includes every locale listed above and many more) at once with the
-    following time-consuming command:</para>
-
-<screen><userinput remap="locale-full">make localedata/install-locales</userinput></screen>
-
-    <para>Then use the <command>localedef</command> command to create and
-    install locales not listed in the
-    <filename>glibc-&glibc-version;/localedata/SUPPORTED</filename> file
-    when you need them. For instance, the following two locales are
-    needed for some tests later in this chapter:</para>
-
-<screen role="nodump"><userinput remap="locale-full">localedef -i POSIX -f UTF-8 C.UTF-8 2> /dev/null || true
-localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true</userinput></screen>
-
-    <note><para>Glibc now uses libidn2 when resolving internationalized
-    domain names.  This is a run time dependency.  If this capability
-    is needed, the instructions for installing libidn2 are in the
-    <ulink url="&blfs-book;general/libidn2.html">BLFS libidn2 page</ulink>.
-    </para></note>
-
-  </sect2>
-
-  <sect2 id="conf-glibc" role="configuration">
-    <title>Configuring Glibc</title>
-
-    <indexterm zone="conf-glibc">
-      <primary sortas="e-/etc/nsswitch.conf">/etc/nsswitch.conf</primary>
-    </indexterm>
-
-    <indexterm zone="conf-glibc">
-      <primary sortas="e-/etc/localtime">/etc/localtime</primary>
-    </indexterm>
-
-  <sect3>
-  <title>Adding nsswitch.conf</title>
-
-    <para>The <filename>/etc/nsswitch.conf</filename> file needs to be created
-    because the Glibc defaults do not work well in a networked environment.
-    </para>
-
-    <para>Create a new file <filename>/etc/nsswitch.conf</filename> by running the
-    following:</para>
-
-<screen><userinput>cat &gt; /etc/nsswitch.conf &lt;&lt; "EOF"
-<literal># Begin /etc/nsswitch.conf
-
-passwd: files
-group: files
-shadow: files
-
-hosts: files dns
-networks: files
-
-protocols: files
-services: files
-ethers: files
-rpc: files
-
-# End /etc/nsswitch.conf</literal>
-EOF</userinput></screen>
-
-    </sect3>
-
-    <sect3>
-    <title>Adding time zone data</title>
-
-    <para>Install and set up the time zone data with the following:</para>
-<screen><userinput>tar -xf ../../tzdata&tzdata-version;.tar.gz
-
-ZONEINFO=/usr/share/zoneinfo
-mkdir -pv $ZONEINFO/{posix,right}
-
-for tz in etcetera southamerica northamerica europe africa antarctica  \
-          asia australasia backward; do
-    zic -L /dev/null   -d $ZONEINFO       ${tz}
-    zic -L /dev/null   -d $ZONEINFO/posix ${tz}
-    zic -L leapseconds -d $ZONEINFO/right ${tz}
-done
-
-cp -v zone.tab zone1970.tab iso3166.tab $ZONEINFO
-zic -d $ZONEINFO -p America/New_York
-unset ZONEINFO</userinput></screen>
-
-    <variablelist>
-      <title>The meaning of the zic commands:</title>
-
-      <varlistentry>
-        <term><parameter>zic -L /dev/null ...</parameter></term>
-        <listitem>
-          <para>This creates posix time zones without any leap seconds.  It is
-          conventional to put these in both
-          <filename class="directory">zoneinfo</filename> and
-          <filename class="directory">zoneinfo/posix</filename>. It is
-          necessary to put the POSIX time zones in
-          <filename class="directory">zoneinfo</filename>, otherwise various
-          test-suites will report errors. On an embedded system, where space is
-          tight and you do not intend to ever update the time zones, you could save
-          1.9 MB by not using the <filename class="directory">posix</filename>
-          directory, but some applications or test-suites might produce some
-          failures.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><parameter>zic -L leapseconds ...</parameter></term>
-        <listitem>
-          <para>This creates right time zones, including leap seconds. On an
-          embedded system, where space is tight and you do not intend to
-          ever update the time zones, or care about the correct time, you could
-          save 1.9MB by omitting the <filename class="directory">right</filename>
-          directory.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><parameter>zic ... -p ...</parameter></term>
-        <listitem>
-          <para>This creates the <filename>posixrules</filename> file. We use
-          New York because POSIX requires the daylight savings time rules
-          to be in accordance with US rules.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-
-
-    <para>One way to determine the local time zone is to run the following
-    script:</para>
+    <para>Prepare the build directory for the pacman user and build the
+    package (unlike previous packages, note the use of the 'updpkgsums'
+    command to populate the checksums for the newly created files):</para>
+
+<screen><userinput>chown -R root:pacman .
+chmod 2775 .
+chmod 664 PKGBUILD
+su pacman -c 'updpkgsums'
+su pacman -c 'makepkg -L --nodeps'</userinput></screen>
+
+    <para>Add the package to the central repository:</para>
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/glibc-&glibc-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the glibc package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S glibc --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/glibc
+cp locale-gen locale.default locale.gen.txt glibc.install PKGBUILD \
+   /srv/pacman/source/LFS/glibc
+cd /sources
+rm -rf glibc</userinput></screen>
 
-<screen role="nodump"><userinput>tzselect</userinput></screen>
-
-    <para>After answering a few questions about the location, the script will
-    output the name of the time zone (e.g.,
-    <emphasis>America/Edmonton</emphasis>). There are also some other possible
-    time zones listed in <filename
-    class='directory'>/usr/share/zoneinfo</filename> such as
-    <emphasis>Canada/Eastern</emphasis> or <emphasis>EST5EDT</emphasis> that
-    are not identified by the script but can be used.</para>
-
-    <para>Then create the <filename>/etc/localtime</filename> file by
-    running:</para>
-
-<screen><userinput>ln -sfv /usr/share/zoneinfo/<replaceable>&lt;xxx&gt;</replaceable> /etc/localtime</userinput></screen>
-
-    <para>Replace <replaceable>&lt;xxx&gt;</replaceable> with the name of the
-    time zone selected (e.g., Canada/Eastern).</para>
-
-  </sect3>
-
-  <sect3 id="conf-ld" role="configuration">
-    <title>Configuring the Dynamic Loader</title>
-
-    <indexterm zone="conf-ld">
-      <primary sortas="e-/etc/ld.so.conf">/etc/ld.so.conf</primary>
-    </indexterm>
-
-    <para>By default, the dynamic loader (<filename
-    class="libraryfile">/lib/ld-linux.so.2</filename>) searches through
-    <filename class="directory">/lib</filename> and <filename
-    class="directory">/usr/lib</filename> for dynamic libraries that are
-    needed by programs as they are run. However, if there are libraries in
-    directories other than <filename class="directory">/lib</filename> and
-    <filename class="directory">/usr/lib</filename>, these need to be added
-    to the <filename>/etc/ld.so.conf</filename> file in order for the
-    dynamic loader to find them. Two directories that are commonly known
-    to contain additional libraries are <filename
-    class="directory">/usr/local/lib</filename> and <filename
-    class="directory">/opt/lib</filename>, so add those directories to the
-    dynamic loader's search path.</para>
-
-    <para>Create a new file <filename>/etc/ld.so.conf</filename> by running the
-    following:</para>
-
-<screen><userinput>cat &gt; /etc/ld.so.conf &lt;&lt; "EOF"
-<literal># Begin /etc/ld.so.conf
-/usr/local/lib
-/opt/lib
-</literal>
-EOF</userinput></screen>
-
-  <para>If desired, the dynamic loader can also search a directory and
-  include the contents of files found there.  Generally the files in
-  this include directory are one line specifying the desired library path.
-  To add this capability run the following commands:</para>
-
-<screen role="nodump"><userinput>cat &gt;&gt; /etc/ld.so.conf &lt;&lt; "EOF"
-<literal># Add an include directory
-include /etc/ld.so.conf.d/*.conf
-</literal>
-EOF
-mkdir -pv /etc/ld.so.conf.d</userinput></screen>
-
-  </sect3>
   </sect2>
 
   <sect2 id="contents-glibc" role="content">
@@ -972,3 +898,4 @@ mkdir -pv /etc/ld.so.conf.d</userinput><
   </sect2>
 
 </sect1>
+
diff -Naurp LFS_orig/chapter08/gmp.xml LFS-pacman/chapter08/gmp.xml
--- LFS_orig/chapter08/gmp.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gmp.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,34 +38,73 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of GMP</title>
 
-    <note>
-      <para>If you are building for 32-bit x86, but you have a CPU which is
-      capable of running 64-bit code <emphasis>and</emphasis> you have specified
-      <envar>CFLAGS</envar> in the environment, the configure script will
-      attempt to configure for 64-bits and fail.
-      Avoid this by invoking the configure command below with
-<screen role="nodump"><userinput><parameter>ABI=32</parameter> ./configure ...</userinput></screen></para>
-    </note>
-
-    <note>
-      <para>The default settings of GMP produce libraries optimized for
-      the host processor.  If libraries suitable for processors less
-      capable than the host's CPU are desired, generic libraries can be
-      created by running the following:
-
-<screen role="nodump"><userinput>cp -v configfsf.guess config.guess
-cp -v configfsf.sub   config.sub</userinput></screen></para>
-    </note>
-
-    <para>Prepare GMP for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --enable-cxx     \
-            --disable-static \
-            --docdir=/usr/share/doc/gmp-&gmp-version;</userinput></screen>
+    <para>Create the PKGBUILD for the GMP package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/gmp
+cd /sources/gmp
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="gmp"
+pkgver="&gmp-version;"
+pkgrel="1"
+pkgdesc="The GMP package contains math libraries for arbitrary precision arithmetic."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'GPLv3'
+         'LGPLv3')
+groups=('core')
+depends=('gcc'
+         'glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'grep'
+             'm4'
+             'make'
+             'sed'
+             'texinfo')
+source=('&gmp-url;')
+md5sums=('&gmp-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+
+  # If configuring for x86, you need to specify ABI
+  CONFFLAGS=""
+  if [ $(uname -m) == "x86" ]; then CONFFLAGS='ABI=32'; fi
+
+  # Configure for generic targer (appropriate for packaging)
+  cp -v config{fsf,}.guess
+  cp -v config{fsf,}.sub
+
+  ${CONFFLAGS} ./configure --prefix=/usr    \
+                           --enable-cxx     \
+                           --disable-static \
+                           --docdir=/usr/share/doc/gmp-${pkgver}
+  make
+  make html
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  make DESTDIR=${pkgdir} install-html
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>
@@ -87,36 +126,23 @@ cp -v configfsf.sub   config.sub</userin
 
     </variablelist>
 
-    <para>Compile the package and generate the HTML documentation:</para>
-
-<screen><userinput remap="make">make
-make html</userinput></screen>
-
-    <important>
-      <para>The test suite for GMP in this section is considered critical.
-      Do not skip it under any circumstances.</para>
-    </important>
-
-    <para>Test the results:</para>
-
-<screen><userinput remap="test">make check 2>&amp;1 | tee gmp-check-log</userinput></screen>
+    &pacman-build-add;
 
-    <caution><para>The code in gmp is highly optimized for the processor where
-    it is built. Occasionally, the code that detects the processor misidentifies
-    the system capabilities and there will be errors in the tests or other
-    applications using the gmp libraries with the message "Illegal
-    instruction".  In this case, gmp should be reconfigured with the option
-    --build=x86_64-pc-linux-gnu and rebuilt.</para></caution>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gmp-&gmp-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>Ensure that all 197 tests in the test suite passed.
-    Check the results by issuing the following command:</para>
+    <para>Update the local cache and install the GMP package:</para>
 
-<screen><userinput remap="test">awk '/# PASS:/{total+=$3} ; END{print total}' gmp-check-log</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S gmp --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package and its documentation:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install
-make install-html</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/gmp
+cp PKGBUILD /srv/pacman/source/LFS/gmp
+cd /sources
+rm -rf gmp</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gnupg.xml LFS-pacman/chapter08/gnupg.xml
--- LFS_orig/chapter08/gnupg.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/gnupg.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,146 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-gnupg" role="wrap">
+  <?dbhtml filename="gnupg.html"?>
+
+  <sect1info condition="script">
+    <productname>gnupg</productname>
+    <productnumber>&gnupg-version;</productnumber>
+    <address>&gnupg-url;</address>
+  </sect1info>
+
+  <title>Gnupg-&gnupg-version;</title>
+
+  <indexterm zone="ch-system-gnupg">
+    <primary sortas="a-Gnupg">Gnupg</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to GnuPG</title>
+
+    <para>The <application>GnuPG</application> package contains a
+    public/private key encryptor. This is useful for signing
+    files or emails as proof of identity and preventing tampering with
+    the contents of the file or email. For a more enhanced version of
+    GnuPG which supports S/MIME, see the gnupg2
+    package.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gnupg-fin-sbu;</seg>
+        <seg>&gnupg-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of GnuPG</title>
+
+    <para>Configure <application>GnuPG</application> by running the following
+    commands:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --libexecdir=/usr/lib</userinput></screen>
+
+    <para>Build <application>GnuPG</application> by running the following
+    commands:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>To test the results, issue:</para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>Install <application>GnuPG</application> by running the following
+    commands:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para><parameter>--libexecdir=/usr/lib</parameter>: This command
+    creates a <filename class="directory">gnupg</filename> directory in
+    <filename class="directory">/usr/lib</filename> instead of
+    <filename class="directory">/usr/libexec</filename>.</para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>gpg, gpg-zip, gpgsplit, and gpgv</seg>
+        <seg>None</seg>
+        <seg>/usr/lib/gnupg, /usr/share/gnupg and
+        /usr/share/doc/gnupg-&gnupg-version;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="gpg">
+        <term><command>gpg</command></term>
+        <listitem>
+          <para>is the backend (command-line interface) for
+          this OpenPGP implementation.</para>
+          <indexterm zone="ch-system-gnupg gpg">
+            <primary sortas="b-gpg">gpg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpg-zip">
+        <term><command>gpg-zip</command></term>
+        <listitem>
+          <para>shell script that implements a gpg-ized version of
+          <command>tar</command>.</para>
+          <indexterm zone="ch-system-gnupg gpg-zip">
+            <primary sortas="b-gpg-zip">gpg-zip</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpgsplit">
+        <term><command>gpgsplit</command></term>
+        <listitem>
+          <para>separates key rings.</para>
+          <indexterm zone="ch-system-gnupg gpgsplit">
+            <primary sortas="b-gpgsplit">gpgsplit</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpgv">
+        <term><command>gpgv</command></term>
+        <listitem>
+          <para>is a verify only version of <command>gpg</command>.</para>
+          <indexterm zone="ch-system-gnupg gpgv">
+            <primary sortas="b-gpgv">gpgv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/gperf.xml LFS-pacman/chapter08/gperf.xml
--- LFS_orig/chapter08/gperf.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gperf.xml	2022-06-16 20:05:13.907855759 -0500
@@ -37,26 +37,72 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Gperf</title>
 
-    <para>Prepare Gperf for compilation:</para>
+    <para>Create the PKGBUILD for the Gperf package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --docdir=/usr/share/doc/gperf-&gperf-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>The tests are known to fail if running multiple
-    simultaneous tests (-j option greater than 1). To test
-    the results, issue:</para>
-
-<screen><userinput remap="test">make -j1 check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/gperf
+cd /sources/gperf
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="gperf"
+pkgver="&gperf-version;"
+pkgrel="1"
+pkgdesc="Gperf generates a perfect hash function from a key set."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('gcc'
+         'glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'make')
+checkdepends=('diffutils'
+              'expect')
+source=('&gperf-url;')
+md5sums=('&gperf-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --docdir=/usr/share/doc/gperf-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # The tests are known to fail if j>1
+  make -j1 check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gperf-&gperf-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Gperf package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S gperf --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/gperf
+cp PKGBUILD /srv/pacman/source/LFS/gperf
+cd /sources
+rm -rf gperf</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gpgme.xml LFS-pacman/chapter08/gpgme.xml
--- LFS_orig/chapter08/gpgme.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/gpgme.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,207 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-gpgme" role="wrap">
+  <?dbhtml filename="gpgme.html"?>
+
+  <sect1info condition="script">
+    <productname>gpgme</productname>
+    <productnumber>&gpgme-version;</productnumber>
+    <address>&gpgme-url;</address>
+  </sect1info>
+
+  <title>Gpgme-&gpgme-version;</title>
+
+  <indexterm zone="ch-system-gpgme">
+    <primary sortas="a-Gpgme">Gpgme</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>GPGME</application> package is a C library
+      that allows cryptography support to be added to a
+      program. It is designed to make access to public key crypto
+      engines like <application>GnuPG</application> or GpgSM easier
+      for applications. <application>GPGME</application> provides
+      a high-level crypto API for encryption, decryption, signing,
+      signature verification and key management.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&gpgme-fin-sbu;</seg>
+        <seg>&gpgme-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of GPGME</title>
+
+    <para>
+      Configure <application>GPGME</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-gpg-test</userinput></screen>
+
+    <para>
+      Build <application>GPGME</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>GPGME</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--disable-gpg-test</parameter>: if this parameter is not
+      passed to configure, the test programs are built during
+      <command>make</command> stage, which requires gnupg2.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          gpgme-config, gpgme-json, and gpgme-tool
+        </seg>
+        <seg>
+          libgpgme, libgpgmepp.so, and libqgpgme.so
+        </seg>
+        <seg>
+          /usr/include/{gpgme++,qgpgme,QGpgME},
+          /usr/lib/cmake/{Gpgmepp,QGpgme}.
+          /usr/lib/python{2.7,3.7}/site-packages/gpg, and
+          /usr/share/common-lisp/source/gpgme
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="gpgme-config">
+        <term><command>gpgme-config</command></term>
+        <listitem>
+          <para>
+            is used to obtain <application>GPGME</application> compilation and
+            linking information.
+          </para>
+          <indexterm zone="ch-system-gpgme gpgme-config">
+            <primary sortas="b-gpgme-config">gpgme-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpgme-json">
+        <term><command>gpgme-json</command></term>
+        <listitem>
+          <para>
+            outputs <application>GPGME</application> commands in JSON format.
+          </para>
+          <indexterm zone="ch-system-gpgme gpgme-json">
+            <primary sortas="b-gpgme-json">gpgme-json</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpgme-tool">
+        <term><command>gpgme-tool</command></term>
+        <listitem>
+          <para>
+            prints fingerprint and keyid with keyservers.
+          </para>
+          <indexterm zone="ch-system-gpgme gpgme-tool">
+            <primary sortas="b-gpgme-tool">gpgme-tool</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <!-- As of 1.13.1, this library isn't present anymore.
+      <varlistentry id="libgpgme-pthread">
+        <term><filename class="libraryfile">libgpgme-pthread.so</filename></term>
+        <listitem>
+          <para>
+            contains the <application>GPGME</application> API functions for
+            applications using pthread.
+          </para>
+          <indexterm zone="ch-system-gpgme libgpgme-pthread">
+            <primary sortas="c-libgpgme-pthread">libgpgme-pthread.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+      -->
+
+      <varlistentry id="libgpgme">
+        <term><filename class="libraryfile">libgpgme.so</filename></term>
+        <listitem>
+          <para>
+            contains the <application>GPGME</application> API functions.
+          </para>
+          <indexterm zone="ch-system-gpgme libgpgme">
+            <primary sortas="c-libgpgme">libgpgme.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libgpgmepp">
+        <term><filename class="libraryfile">libgpgmepp.so</filename></term>
+        <listitem>
+          <para>
+            contains the C++ <application>GPGME</application> API functions.
+          </para>
+          <indexterm zone="ch-system-gpgme libgpgmepp">
+            <primary sortas="c-libgpgmepp">libgpgmepp.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libqgpgme">
+        <term><filename class="libraryfile">libqgpgme.so</filename></term>
+        <listitem>
+          <para>
+            contains API functions for handling GPG operations in
+            <application>Qt</application> applications.
+          </para>
+          <indexterm zone="ch-system-gpgme libqgpgme">
+            <primary sortas="c-libqgpgme">libqgpgme.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/grep.xml LFS-pacman/chapter08/grep.xml
--- LFS_orig/chapter08/grep.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/grep.xml	2022-06-16 20:05:13.904522425 -0500
@@ -37,24 +37,78 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Grep</title>
 
-    <para>Prepare Grep for compilation:</para>
+    <para>Create the PKGBUILD for the Grep package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/grep
+cd /sources/grep
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="grep"
+pkgver="3.8"
+pkgrel="1"
+pkgdesc="The Grep package contains programs for searching through the contents of files."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'patch'
+             'sed'
+             'texinfo')
+checkdepends=('gawk')
+optdepends=('pcre'
+            'libsigsegv')
+source=('&grep-url;')
+md5sums=('&grep-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/grep-&grep-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Grep package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S grep --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/grep
+cp PKGBUILD /srv/pacman/source/LFS/grep
+cd /sources
+rm -rf grep</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/groff.xml LFS-pacman/chapter08/groff.xml
--- LFS_orig/chapter08/groff.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/groff.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,30 +38,87 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Groff</title>
 
-    <para>Groff expects the environment variable <envar>PAGE</envar> to
-    contain the default paper size. For users in the United States,
-    <parameter>PAGE=letter</parameter> is appropriate. Elsewhere,
-    <parameter>PAGE=A4</parameter> may be more suitable. While the default
-    paper size is configured during compilation, it can be overridden later
-    by echoing either <quote>A4</quote> or <quote>letter</quote> to the
-    <filename>/etc/papersize</filename> file.</para>
+    <para>Create the PKGBUILD for the Groff package with the following
+    commands:</para>
 
-    <para>Prepare Groff for compilation:</para>
-
-<screen><userinput remap="configure">PAGE=<replaceable>&lt;paper_size&gt;</replaceable> ./configure --prefix=/usr</userinput></screen>
-
-    <para>This package does not support parallel build. Compile the package:</para>
-
-<screen><userinput remap="make">make -j1</userinput></screen>
-
-    <para>This package does not come with a test suite.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/groff
+cd /sources/groff
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="groff"
+pkgver="1.22.4"
+pkgrel="1"
+pkgdesc="groff 1.22.4"
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('gcc'
+         'glibc'
+         'perl'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'bison'
+             'coreutils'
+             'gawk'
+             'grep'
+             'make'
+             'patch'
+             'sed'
+             'texinfo')
+optdepends=('ghostscript'
+            'uchardet')
+backup=('etc/papersize')
+source=('https://ftp.gnu.org/gnu/groff/groff-1.22.4.tar.gz')
+md5sums=('08fb04335e2f5e73f23ea4c3adbf0c5f')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  # Groff expects the environment variable PAGE to contain the default paper
+  # size. For users in the United States, PAGE=letter is appropriate. Elsewhere,
+  # PAGE=A4 may be more suitable. While the default paper size is configured
+  # during compilation, it can be overridden later by echoing either “A4” or
+  # “letter” to the /etc/papersize file.
+  PAGE=letter ./configure --prefix=/usr
+
+  # This package does not support parallel build.
+  make -j1
+}
+
+# This package does not come with a test suite
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+
+  # Create the /etc/papersize file
+  install -vdm755 ${pkgdir}/etc
+  echo "letter" > ${pkgdir}/etc/papersize
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/groff-&groff-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Groff package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S groff --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/groff
+cp PKGBUILD /srv/pacman/source/LFS/groff
+cd /sources
+rm -rf groff</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/grub.xml LFS-pacman/chapter08/grub.xml
--- LFS_orig/chapter08/grub.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/grub.xml	2022-06-16 20:05:13.904522425 -0500
@@ -37,7 +37,7 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of GRUB</title>
 
     <note>
@@ -50,12 +50,68 @@
       </para>
     </note>
 
-    <para>Prepare GRUB for compilation:</para>
+    <para>Create the PKGBUILD for the Grub package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr          \
-            --sysconfdir=/etc      \
-            --disable-efiemu       \
-            --disable-werror</userinput></screen>
+<screen><userinput>mkdir /sources/grub
+cd /sources/grub
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+## Reminder: this PKGBUILD does not include UEFI support, only BIOS support.
+## If you need UEFI support, consult the BLFS book at:
+## &blfs-book;postlfs/grub-efi.html
+
+pkgname="grub"
+pkgver="&grub-version;"
+pkgrel="1"
+pkgdesc="The GRUB package contains the GRand Unified Bootloader."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('bash'
+         'gcc'
+         'gettext'
+         'glibc'
+         'xz'
+         'sed'
+         'rootfs')
+makedepends=('binutils'
+             'bison'
+             'coreutils'
+             'diffutils'
+             'grep'
+             'make'
+             'ncurses'
+             'texinfo')
+backup=('etc/grub/grub.cfg')
+source=('&grub-url;')
+md5sums=('&grub-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr          \
+              --sysconfdir=/etc      \
+              --disable-efiemu       \
+              --disable-werror
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+
+  # Install an empty grub.cfg
+  install -vdm755 ${pkgdir}/etc/grub
+  touch ${pkgdir}/etc/grub/grub.cfg
+
+  # Install the Bash completion file
+  install -vdm755 ${pkgdir}/usr/share/bash-completions/completions
+  mv -v ${pkgdir}/etc/bash_completion.d/grub \
+        ${pkgdir}/usr/share/bash-completion/completions
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>
@@ -78,21 +134,26 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/grub-&grub-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>The test suite for this packages is not recommended.  Most of
-    the tests depend on packages that are not available in the limited
-    LFS environment. To run the tests anyway, run <command>make check</command>.</para>
+    <para>Update the local cache and install the Grub package:</para>
 
-    <para>Install the package:</para>
+<screen><userinput>pacman -Syu
+pacman -S grub --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="install">make install
-mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-  <para>Using GRUB to make your LFS system bootable will be discussed in
-  <xref linkend="ch-bootable-grub"/>.</para>
+<screen><userinput>mkdir /srv/pacman/source/LFS/grub
+cp PKGBUILD /srv/pacman/source/LFS/grub
+cd /sources
+rm -rf grub</userinput></screen>
+
+    <para>Using GRUB to make your LFS system bootable will be discussed in
+    <xref linkend="ch-bootable-grub"/>.</para>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/gzip.xml LFS-pacman/chapter08/gzip.xml
--- LFS_orig/chapter08/gzip.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/gzip.xml	2022-06-16 20:05:13.907855759 -0500
@@ -38,24 +38,74 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Gzip</title>
 
-    <para>Prepare Gzip for compilation:</para>
+    <para>Create the PKGBUILD for the Gzip package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/gzip
+cd /sources/gzip
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="gzip"
+pkgver="&gzip-version;"
+pkgrel="1"
+pkgdesc="The Gzip package contains programs for compressing and decompressing files."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('bash'
+         'glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('diffutils'
+              'less')
+source=('&gzip-url;')
+md5sums=('&gzip-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/gzip-&gzip-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Gzip package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S gzip --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/gzip
+cp PKGBUILD /srv/pacman/source/LFS/gzip
+cd /sources
+rm -rf gzip</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/iana-etc.xml LFS-pacman/chapter08/iana-etc.xml
--- LFS_orig/chapter08/iana-etc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/iana-etc.xml	2022-06-16 20:05:13.907855759 -0500
@@ -41,9 +41,51 @@
   <sect2 role="installation">
     <title>Installation of Iana-Etc</title>
 
-    <para>For this package, we only need to copy the files into place:</para>
+    <para>Prepare the PKGBUILD file for iana-etc:</para>
 
-<screen><userinput remap="install">cp services protocols /etc</userinput></screen>
+<screen><userinput>mkdir /sources/iana-etc
+cd /sources/iana-etc
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname=iana-etc
+pkgver=&iana-etc-version;
+pkgrel=1
+pkgdesc="The Iana-Etc package provides data for network services and protocols."
+arch=('any')
+license=('PD')
+groups=('core')
+depends=('rootfs')
+makedepends=('coreutils')
+backup=('etc/protocols'
+        'etc/services')
+source=("&iana-etc-url;")
+md5sums=('&iana-etc-md5;')
+
+package(){
+  cd ${pkgname}-${pkgver}
+  install -vdm755 ${pkgdir}/etc
+  cp services protocols ${pkgdir}/etc
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/iana-etc-&iana-etc-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the iana-etc package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S iana-etc --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/iana-etc
+cp PKGBUILD /srv/pacman/source/LFS/iana-etc
+cd /sources
+rm -rf iana-etc</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/inetutils.xml LFS-pacman/chapter08/inetutils.xml
--- LFS_orig/chapter08/inetutils.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/inetutils.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,21 +37,69 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Inetutils</title>
 
-    <para>Prepare Inetutils for compilation:</para>
+    <para>Create the PKGBUILD for the Inetutils package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr        \
-            --bindir=/usr/bin    \
-            --localstatedir=/var \
-            --disable-logger     \
-            --disable-whois      \
-            --disable-rcp        \
-            --disable-rexec      \
-            --disable-rlogin     \
-            --disable-rsh        \
-            --disable-servers</userinput></screen>
+<screen><userinput>mkdir /sources/inetutils
+cd /sources/inetutils
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="inetutils"
+pkgver="&inetutils-version;"
+pkgrel="1"
+pkgdesc="The Inetutils package contains programs for basic networking."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('gcc'
+         'glibc'
+         'ncurses'
+         'readline'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'grep'
+             'make'
+             'patch'
+             'sed'
+             'texinfo'
+             'zlib')
+source=('&inetutils-url;')
+md5sums=('&inetutils-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr        \
+              --bindir=/usr/bin    \
+              --localstatedir=/var \
+              --disable-logger     \
+              --disable-whois      \
+              --disable-rcp        \
+              --disable-rexec      \
+              --disable-rlogin     \
+              --disable-rsh        \
+              --disable-servers
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  install -vdm755 ${pkgdir}/usr/sbin
+  mv -v ${pkgdir}/usr/{,s}bin/ifconfig
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -98,26 +146,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/inetutils-&inetutils-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>To test the results, issue:</para>
+    <para>Update the local cache and install the Inetutils package:</para>
 
-<screen><userinput remap="test">make check</userinput></screen>
-<!--
-    <note><para>One test, libls.sh, may fail in the initial chroot
-    environment but will pass if the test is rerun after the LFS system
-    is complete. One test, ping-localhost.sh, will fail if the host
-    system does not have ipv6 capability.</para></note>
--->
-    <para>Install the package:</para>
+<screen><userinput>pacman -Syu
+pacman -S inetutils --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="install">make install</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-    <para>Move a program to the proper location:</para>
-
-<screen><userinput remap="install">mv -v /usr/{,s}bin/ifconfig</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/inetutils
+cp PKGBUILD /srv/pacman/source/LFS/inetutils
+cd /sources
+rm -rf inetutils</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/intltool.xml LFS-pacman/chapter08/intltool.xml
--- LFS_orig/chapter08/intltool.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/intltool.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,33 +38,80 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Intltool</title>
 
-    <para>First fix a warning that is caused by perl-5.22 and later:</para>
+    <para>Create the PKGBUILD for the Intltool package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">sed -i 's:\\\${:\\\$\\{:' intltool-update.in</userinput></screen>
-
-    <note><para>The above regular expression looks unusual because of all the
-    backslashes.  What it does is add a backslash before the right brace
-    character in the sequence '\${' resulting in '\$\{'.</para></note>
-
-    <para>Prepare Intltool for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install
-install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-&intltool-version;/I18N-HOWTO</userinput></screen>
+<screen><userinput>mkdir /sources/intltool
+cd /sources/intltool
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="intltool"
+pkgver="&intltool-version;"
+pkgrel="1"
+pkgdesc="The Intltool is used for extracting translatable strings from source files."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('autoconf'
+         'automake'
+         'bash'
+         'glibc'
+         'grep'
+         'perl'
+         'sed'
+         'rootfs')
+makedepends=('gawk'
+             'xml-parser')
+checkdepends=('perl')
+source=('&intltool-url;')
+md5sums=('&intltool-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}</literal>
+  # Fix a warning that is caused by perl-5.22 and later
+<literal>  sed -i 's:\\\${:\\\$\\{:' intltool-update.in
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  install -v -Dm644 doc/I18N-HOWTO ${pkgdir}/usr/share/doc/intltool-${pkgver}/I18N-HOWTO
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/intltool-&intltool-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Intltool package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S intltool --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/intltool
+cp PKGBUILD /srv/pacman/source/LFS/intltool
+cd /sources
+rm -rf intltool</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/iproute2.xml LFS-pacman/chapter08/iproute2.xml
--- LFS_orig/chapter08/iproute2.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/iproute2.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,50 +38,80 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of IPRoute2</title>
 
-    <para>The <command>arpd</command> program included in this package will not
-    be built since it is dependent on Berkeley DB, which is not installed in
-    LFS. However, a directory for <command>arpd</command> and a man page will still
-    be installed. Prevent this by running the commands below.
-    If the <command>arpd</command> binary is needed,
-    instructions for compiling Berkeley DB can be found in the BLFS Book at
-    <ulink url="&blfs-book;server/db.html"/>.
-    </para>
-
-<screen><userinput remap="pre">sed -i /ARPD/d Makefile
-rm -fv man/man8/arpd.8</userinput></screen>
-
-<!-- fixed upstream for 5.16.0
-    <para>It is also necessary to disable building two modules that
-    require <ulink url="&blfs-book;postlfs/iptables.html"/>.</para>
-
-<screen><userinput remap="pre">sed -i 's/.m_ipt.o//' tc/Makefile</userinput></screen>
--->
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make NETNS_RUN_DIR=/run/netns</userinput></screen>
-
-    <para>This package does not have a working test suite.</para>
-<!-- currently not useful, no tests actually run
-    <para>This package comes with a test suite, but due to assumptions it makes,
-    it is not possible to reliably run these tests from within the chroot
-    environment. If you wish to run these tests after booting into your new LFS
-    system, ensure you enable <filename>/proc/config.gz</filename> support
-    in your kernel (&quot;General setup&quot; -> &quot;Enable access to
-    .config through /proc/config.gz&quot; [CONFIG_IKCONFIG_PROC]), then run
-    'make alltests' from the <filename class="directory">testsuite/</filename>
-    subdirectory.</para>-->
+    <para>Create the PKGBUILD for the IPRoute2 package with the following
+    commands:</para>
 
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make SBINDIR=/usr/sbin install</userinput></screen>
-
-    <para>If desired, install the documentation:</para>
-
-<screen><userinput remap="install">mkdir -pv             /usr/share/doc/iproute2-&iproute2-version;
-cp -v COPYING README* /usr/share/doc/iproute2-&iproute2-version;</userinput></screen>
+<screen><userinput>mkdir /sources/iproute2
+cd /sources/iproute2
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="iproute2"
+pkgver="&iproute2-version;"
+pkgrel=1
+pkgdesc="The IPRoute2 package contains programs for basic and advanced IP-based networking."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('bash'
+         'coreutils'
+         'glibc'
+         'libcap'
+         'libelf'
+         'zlib'
+         'rootfs')
+makedepends=('bison'
+             'flex'
+             'gcc'
+             'make'
+             'linux-api-headers')
+optdepends=('db'
+            'iptables')
+source=("https://www.kernel.org/pub/linux/utils/net/${pkgname}/${pkgname}-${pkgver}.tar.xz")
+md5sums=('&iproute2-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+  # We do not build these in LFS proper, but in a pacman build, we already have
+  # db available - uncomment if you still want to omit the build of arpd
+  # sed -i /ARPD/d Makefile
+  # rm -fv man/man8/arpd.8
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  make NETNS_RUN_DIR=/run/netns
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} SBINDIR=/usr/sbin install
+  install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+  install -vm644 COPYING README* ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/iproute2-&iproute2-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the IPRoute2 package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S iproute2 --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/iproute2
+cp PKGBUILD /srv/pacman/source/LFS/iproute2
+cd /sources
+rm -rf iproute2</userinput></screen>
 
   </sect2>
 
@@ -93,9 +123,9 @@ cp -v COPYING README* /usr/share/doc/ipr
       <segtitle>Installed directories</segtitle>
 
       <seglistitem>
-        <seg>bridge, ctstat (link to lnstat), genl, ifcfg, ifstat, ip, lnstat,
-        nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to lnstat), ss,
-        and tc</seg>
+        <seg>arpd, bridge, ctstat (link to lnstat), genl, ifcfg, ifstat, ip,
+        lnstat, nstat, routef, routel, rtacct, rtmon, rtpr, rtstat (link to
+        lnstat), ss, and tc</seg>
         <seg>/etc/iproute2, /usr/lib/tc, and /usr/share/doc/iproute2-&iproute2-version;
         </seg>
       </seglistitem>
@@ -106,6 +136,16 @@ cp -v COPYING README* /usr/share/doc/ipr
       <?dbfo list-presentation="list"?>
       <?dbhtml list-presentation="table"?>
 
+      <varlistentry id="arpd">
+        <term><command>arpd</command></term>
+        <listitem>
+          <para>A userspace arp caching daemon</para>
+          <indexterm zone="ch-system-iproute2 arpd">
+            <primary sortas="b-arpd">arpd</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
       <varlistentry id="bridge">
         <term><command>bridge</command></term>
         <listitem>
diff -Naurp LFS_orig/chapter08/kbd.xml LFS-pacman/chapter08/kbd.xml
--- LFS_orig/chapter08/kbd.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/kbd.xml	2022-06-16 20:05:13.907855759 -0500
@@ -38,55 +38,98 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Kbd</title>
 
-    <para>The behaviour of the backspace and delete keys is not consistent
-    across the keymaps in the Kbd package. The following patch fixes this
-    issue for i386 keymaps:</para>
+    <para>Create the PKGBUILD for the Kbd package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">patch -Np1 -i ../&kbd-backspace-patch;</userinput></screen>
-
-    <para>After patching, the backspace key generates the character with code 127,
-    and the delete key generates a well-known escape sequence.</para>
-
-    <para>Remove the redundant <command>resizecons</command> program (it requires
-    the defunct svgalib to provide the video mode files - for normal use
-    <command>setfont</command> sizes the console appropriately) together with its
-    manpage.</para>
-
-<screen><userinput remap="pre">sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure
-sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in</userinput></screen>
-
-    <para>Prepare Kbd for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr --disable-vlock</userinput></screen>
-
-    <variablelist>
-      <title>The meaning of the configure option:</title>
-
-      <varlistentry>
-        <term><parameter>--disable-vlock</parameter></term>
-        <listitem>
-          <para>This option prevents the vlock utility from being built because it
-          requires the PAM library, which isn't available in the chroot
-          environment.</para>
-       </listitem>
-      </varlistentry>
-
-    </variablelist>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/kbd
+cd /sources/kbd
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="kbd"
+pkgver="&kbd-version;"
+pkgrel="1"
+pkgdesc="The Kbd package contains key-table files, console fonts, and keyboard utilities."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('bash'
+         'coreutils'
+         'glibc'
+         'linux-pam'
+         'rootfs')
+makedepends=('binutils'
+             'bison'
+             'check'
+             'flex'
+             'gcc'
+             'gettext'
+             'gzip'
+             'make'
+             'patch'
+             'sed')
+source=('&kbd-url;'
+        '&patches-root;&kbd-backspace-patch;')
+md5sums=('&kbd-md5;'
+         '&kbd-backspace-patch-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # The behaviour of the backspace and delete keys is not consistent
+  # across the keymaps in the Kbd package. The following patch fixes this
+  # issue for i386 keymaps
+  patch -Np1 -i ${srcdir}/kbd-2.4.0-backspace-1.patch
+
+  # Remove the redundant resizeicons program (it requires the defunct svgalib to
+  # provide the video mode files - for normal use setfont sizes the console
+  # appropriately) together with its manpage.
+  sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure
+  sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+
+  # Unlike in vanila LFS, we do not disable vclock as PAM is installed
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make -j1 DESTDIR=${pkgdir} install
+  mkdir -v            ${pkgdir}/usr/share/doc/kbd-${pkgver}
+  cp -R -v docs/doc/* ${pkgdir}/usr/share/doc/kbd-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/kbd-&kbd-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Kbd package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S kbd --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/kbd
+cp PKGBUILD /srv/pacman/source/LFS/kbd
+cd /sources
+rm -rf kbd</userinput></screen>
 
     <note>
       <para>For some languages (e.g., Belarusian) the Kbd package doesn't
@@ -95,11 +138,6 @@ sed -i 's/resizecons.8 //' docs/man/man8
       such languages have to download working keymaps separately.</para>
     </note>
 
-    <para>If desired, install the documentation:</para>
-
-<screen><userinput remap="install">mkdir -pv           /usr/share/doc/kbd-&kbd-version;
-cp -R -v docs/doc/* /usr/share/doc/kbd-&kbd-version;</userinput></screen>
-
   </sect2>
 
   <sect2 id="contents-kbd" role="content">
@@ -115,7 +153,7 @@ cp -R -v docs/doc/* /usr/share/doc/kbd-&
         mapscrn, openvt, psfaddtable (link to psfxtable), psfgettable (link to
         psfxtable), psfstriptable (link to psfxtable), psfxtable, <!--resizecons,-->
         setfont, setkeycodes, setleds, setmetamode, setvtrgb,
-        showconsolefont, showkey, unicode_start, and unicode_stop</seg>
+        showconsolefont, showkey, unicode_start, unicode_stop, and vlock</seg>
         <seg>/usr/share/consolefonts, /usr/share/consoletrans, /usr/share/keymaps,
         /usr/share/doc/kbd-&kbd-version;,  and /usr/share/unimaps</seg>
       </seglistitem>
@@ -384,6 +422,16 @@ cp -R -v docs/doc/* /usr/share/doc/kbd-&
           </indexterm>
         </listitem>
       </varlistentry>
+
+      <varlistentry id="vlock">
+        <term><command>vlock</command></term>
+        <listitem>
+          <para>Locks one or more sessions on the Linux console</para>
+          <indexterm zone="ch-system-kbd vlock">
+            <primary sortas="b-vlock">vlock</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
 
     </variablelist>
 
diff -Naurp LFS_orig/chapter08/kmod.xml LFS-pacman/chapter08/kmod.xml
--- LFS_orig/chapter08/kmod.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/kmod.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,17 +38,66 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Kmod</title>
 
-    <para>Prepare Kmod for compilation:</para>
+    <para>Create the PKGBUILD for the Kmod package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr          \
-            --sysconfdir=/etc      \
-            --with-openssl         \
-            --with-xz              \
-            --with-zstd            \
-            --with-zlib</userinput></screen>
+<screen><userinput>mkdir /sources/kmod
+cd /sources/kmod
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="kmod"
+pkgver="&kmod-version;"
+pkgrel="1"
+pkgdesc="The Kmod package contains libraries and utilities for loading kernel modules."
+arch=('x86'
+      'x86_64')
+license=('LGPLv2.1')
+groups=('core')
+depends=('glibc'
+         'xz'
+         'zlib'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'bison'
+             'coreutils'
+             'flex'
+             'gcc'
+             'gettext'
+             'gzip'
+             'make'
+             'pkg-config'
+             'sed')
+source=('&kmod-url;')
+md5sums=('&kmod-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr          \
+              --sysconfdir=/etc      \
+              --with-xz              \
+              --with-zstd            \
+              --with-zlib
+  make
+}
+
+# The test suite of this package requires raw kernel headers.
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+
+  # Create symlinks for compatibility with Module-Init-Tools
+  for target in depmod insmod modinfo modprobe rmmod; do
+    ln -sfv ../bin/kmod ${pkgdir}/usr/sbin/$target
+  done
+  ln -sfv kmod ${pkgdir}/usr/bin/lsmod
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -76,25 +125,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/kmod-&kmod-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>The test suite of this package requires raw kernel headers
-    (not the <quote>sanitized</quote> kernel headers installed earlier),
-    which are beyond the scope of LFS.</para>
+    <para>Update the local cache and install the Kmod package:</para>
 
-    <para>Install the package and create symlinks for
-    compatibility with Module-Init-Tools (the package that previously handled
-    Linux kernel modules):</para>
+<screen><userinput>pacman -Syu
+pacman -S kmod --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="install">make install
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-for target in depmod insmod modinfo modprobe rmmod; do
-  ln -sfv ../bin/kmod /usr/sbin/$target
-done
-
-ln -sfv kmod /usr/bin/lsmod</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/kmod
+cp PKGBUILD /srv/pacman/source/LFS/kmod
+cd /sources
+rm -rf kmod</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/less.xml LFS-pacman/chapter08/less.xml
--- LFS_orig/chapter08/less.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/less.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,12 +37,51 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Less</title>
 
-    <para>Prepare Less for compilation:</para>
+    <para>Create the PKGBUILD for the Less package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr --sysconfdir=/etc</userinput></screen>
+<screen><userinput>mkdir /sources/less
+cd /sources/less
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="less"
+pkgver="&less-version;"
+pkgrel="1"
+pkgdesc="The Less package contains a text file viewer."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'ncurses'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+optdepends=('pcre')
+source=('&less-url;')
+md5sums=('&less-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr --sysconfdir=/etc
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -58,15 +97,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/less-&less-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>This package does not come with a test suite.</para>
+    <para>Update the local cache and install the Less package:</para>
 
-    <para>Install the package:</para>
+<screen><userinput>pacman -Syu
+pacman -S less --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="install">make install</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/less
+cp PKGBUILD /srv/pacman/source/LFS/less
+cd /sources
+rm -rf less</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/libarchive.xml LFS-pacman/chapter08/libarchive.xml
--- LFS_orig/chapter08/libarchive.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libarchive.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libarchive" role="wrap">
+  <?dbhtml filename="libarchive.html"?>
+
+  <sect1info condition="script">
+    <productname>libarchive</productname>
+    <productnumber>&libarchive-version;</productnumber>
+    <address>&libarchive-url;</address>
+  </sect1info>
+
+  <title>Libarchive-&libarchive-version;</title>
+
+  <indexterm zone="ch-system-libarchive">
+    <primary sortas="a-Libarchive">Libarchive</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libarchive</application> library provides a single
+      interface for reading/writing various compression formats.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libarchive-fin-sbu;</seg>
+        <seg>&libarchive-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libarchive</title>
+
+    <para>
+      Configure <application>libarchive</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>
+      Build <application>libarchive</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      To test the results, issue:
+    </para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>
+      Install <application>libarchive</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          bsdcat, bsdcpio, and bsdtar
+        </seg>
+        <seg>
+          libarchive.so
+        </seg>
+        <seg>
+          None
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="bsdcat">
+        <term><command>bsdcat</command></term>
+        <listitem>
+          <para>
+            expands files to standard output.
+          </para>
+          <indexterm zone="ch-system-libarchive bsdcat">
+            <primary sortas="b-bsdcat">bsdcat</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="bsdcpio">
+        <term><command>bsdcpio</command></term>
+        <listitem>
+          <para>
+            is a tool similar to <command>cpio</command>.
+          </para>
+          <indexterm zone="ch-system-libarchive bsdcpio">
+            <primary sortas="b-bsdcpio">bsdcpio</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="bsdtar">
+        <term><command>bsdtar</command></term>
+        <listitem>
+          <para>
+            is a tool similar to GNU <command>tar</command>.
+          </para>
+          <indexterm zone="ch-system-libarchive bsdtar">
+            <primary sortas="b-bsdtar">bsdtar</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libarchive-lib">
+        <term><filename class="libraryfile">libarchive.so</filename></term>
+        <listitem>
+          <para>
+            is a library that can create and read several streaming
+            archive formats.
+          </para>
+          <indexterm zone="ch-system-libarchive libarchive-lib">
+            <primary sortas="c-libarchive">libarchive.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libassuan.xml LFS-pacman/chapter08/libassuan.xml
--- LFS_orig/chapter08/libassuan.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libassuan.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libassuan" role="wrap">
+  <?dbhtml filename="libassuan.html"?>
+
+  <sect1info condition="script">
+    <productname>libassuan</productname>
+    <productnumber>&libassuan-version;</productnumber>
+    <address>&libassuan-url;</address>
+  </sect1info>
+
+  <title>Libassuan-&libassuan-version;</title>
+
+  <indexterm zone="ch-system-libassuan">
+    <primary sortas="a-Libassuan">Libassuan</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libassuan</application> package contains an inter
+      process communication library used by some of the other
+      <application>GnuPG</application> related packages.
+      <application>libassuan</application>'s primary use is to allow a
+      client to interact with a non-persistent server.
+      <application>libassuan</application> is not, however, limited to
+      use with <application>GnuPG</application> servers and clients. It
+      was designed to be flexible enough to meet the demands of many
+      transaction based environments with non-persistent servers.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libassuan-fin-sbu;</seg>
+        <seg>&libassuan-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Libassuan</title>
+
+    <para>Create the PKGBUILD for the Libassuan package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/libassuan
+cd /sources/libassuan
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libassuan"
+pkgver="&libassuan-version;"
+pkgrel="1"
+pkgdesc="${pkgname} ${pkgver}"
+arch=('x86'
+      'x86_64')
+license=('GPLv3'
+         'LGPLv2.1')
+groups=('core')
+depends=('glibc'
+         'libgpg-error')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'inetutils'
+             'make'
+             'readline'
+             'sed')
+source=('&libassuan-url;')
+md5sums=('&libassuan-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr
+  make
+
+  # Build the documenatation
+  make -C doc html
+  makeinfo --html --no-split -o doc/assuan_nochunks.html doc/assuan.texi
+  makeinfo --plaintext       -o doc/assuan.txt           doc/assuan.texi
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}/" install
+
+  # Install documentation
+  install -vdm755 ${pkgdir}/usr/share/doc/libassuan-${pkgver}/html
+  install -vm644  doc/assuan.html/* \
+                  ${pkgdir}/usr/share/doc/libassuan-${pkgver}/html
+  install -vm644  doc/assuan_nochunks.html \
+                  ${pkgdir}/usr/share/doc/libassuan-${pkgver}
+  install -vm644  doc/assuan.{txt,texi} \
+                  ${pkgdir}/usr/share/doc/libassuan-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libassuan-&libassuan-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libassuan package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libassuan --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libassuan
+cp PKGBUILD /srv/pacman/source/LFS/libassuan
+cd /sources
+rm -rf libassuan</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          libassuan-config
+        </seg>
+        <seg>
+          libassuan.so
+        </seg>
+        <seg>
+          /usr/share/doc/libassuan-&libassuan-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="libassuan-config">
+        <term><command>libassuan-config</command></term>
+        <listitem>
+          <para>
+            is a <filename class="libraryfile">libassuan</filename> build information script.
+          </para>
+          <indexterm zone="ch-system-libassuan libassuan-config">
+            <primary sortas="b-libassuan-config">libassuan-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libassuan-lib">
+        <term><filename class="libraryfile">libassuan.so</filename></term>
+        <listitem>
+          <para>
+            is an inter process communication library which
+            implements the Assuan protocol.
+          </para>
+          <indexterm zone="ch-system-libassuan libassuan-lib">
+            <primary sortas="c-libassuan">libassuan.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libcap.xml LFS-pacman/chapter08/libcap.xml
--- LFS_orig/chapter08/libcap.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/libcap.xml	2022-06-16 20:05:13.901189092 -0500
@@ -40,16 +40,73 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Libcap</title>
 
-    <para>Prevent static libraries from being installed:</para>
+    <para>Create the PKGBUILD for the Libcap package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">sed -i '/install -m.*STA/d' libcap/Makefile</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make prefix=/usr lib=lib</userinput></screen>
+<screen><userinput>mkdir /sources/libcap
+cd /sources/libcap
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libcap"
+pkgver="&libcap-version;"
+pkgrel="1"
+pkgdesc="The Libcap package implements the user-space interfaces to the POSIX 1003.1e capabilities available in Linux kernels."
+arch=('x86'
+      'x86_64')
+license=('BSD3C'
+         'GPLv2')
+groups=('core')
+depends=('glibc'
+         'linux-pam'
+         'rootfs')
+makedepends=('attr'
+             'bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'glibc'
+             'linux-pam'
+             'make'
+             'perl'
+             'rootfs'
+             'sed')
+backup=('etc/security/capability.conf')
+install="libcap.install"
+source=("&libcap-url;")
+md5sums=('&libcap-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Prevent installation of static libs
+  sed -i '/install -m.*STA/d' libcap/Makefile
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  make prefix=/usr lib=lib
+  make -C pam_cap
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make test
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} prefix=/usr lib=lib install
+  chmod -v 755 ${pkgdir}/usr/lib/lib{cap,psx}.so.${pkgver}
+  install -vdm755 ${pkgdir}/usr/lib/security
+  install -vm755 pam_cap/pam_cap.so ${pkgdir}/usr/lib/security
+  install -vdm755 ${pkgdir}/etc/security
+  install -vm644 pam_cap/capability.conf ${pkgdir}/etc/security
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the make option:</title>
@@ -65,13 +122,38 @@
       </varlistentry>
     </variablelist>
 
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make test</userinput></screen>
-
-    <para>Install the package:</para>
+    <para>You will also need to enable libcap in the Linux-PAM configuration
+    once installed:</para>
 
-<screen><userinput remap="install">make prefix=/usr lib=lib install</userinput></screen>
+<screen><userinput>cat &gt; libcap.install &lt;&lt; REALEOF
+<literal>post_install(){
+    mv -v /etc/pam.d/system-auth{,.bak} &amp;&amp;
+    cat &gt; /etc/pam.d/system-auth &lt;&lt; "EOF" &amp;&amp;
+# Begin /etc/pam.d/system-auth
+
+auth      optional    pam_cap.so
+EOF
+    tail -n +3 /etc/pam.d/system-auth.bak &gt;&gt; /etc/pam.d/system-auth
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libcap-&libcap-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libcap package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libcap --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libcap
+cp PKGBUILD /srv/pacman/source/LFS/libcap
+cd /sources
+rm -rf libcap</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/libelf.xml LFS-pacman/chapter08/libelf.xml
--- LFS_orig/chapter08/libelf.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/libelf.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,33 +38,73 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Libelf</title>
 
-      <para>Libelf is part of elfutils-&elfutils-version; package. Use
-      the elfutils-&elfutils-version;.tar.bz2 as the source tarball.</para>
+    <para>Libelf is part of elfutils-&elfutils-version; package. Use
+    the elfutils-&elfutils-version;.tar.bz2 as the source tarball.</para>
 
-    <para>Prepare Libelf for compilation:</para>
+    <para>Create the PKGBUILD for the Libelf package with the following
+    commands:</para>
 
-    <screen><userinput remap="configure">./configure --prefix=/usr                \
-            --disable-debuginfod         \
-            --enable-libdebuginfod=dummy</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-<!--    <para>One test, run-elfclassify.sh, is known to fail.</para>-->
-
-    <para>Install only Libelf:</para>
-
-<screen><userinput remap="install">make -C libelf install
-install -vm644 config/libelf.pc /usr/lib/pkgconfig
-rm /usr/lib/libelf.a</userinput></screen>
+<screen><userinput>mkdir /sources/libelf
+cd /sources/libelf
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libelf"
+_pkgname="elfutils"
+pkgver="&elfutils-version;"
+pkgrel="1"
+pkgdesc=""
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'GPLv3'
+         'LGPLv3')
+groups=('core')
+source=('&elfutils-url;')
+md5sums=('&elfutils-md5;')
+
+build(){
+  cd ${_pkgname}-${pkgver}
+  ./configure --prefix=/usr                \
+              --disable-debuginfod         \
+              --enable-libdebuginfod=dummy
+  make
+}
+
+check(){
+  cd ${_pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${_pkgname}-${pkgver}
+  # Install only libelf
+  make DESTDIR=${pkgdir} -C libelf install
+  install -vm644 config/libelf.pc ${pkgdir}/usr/lib/pkgconfig
+  rm ${pkgdir}/usr/lib/libelf.a
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libelf-&elfutils-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libelf package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libelf --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libelf
+cp PKGBUILD /srv/pacman/source/LFS/libelf
+cd /sources
+rm -rf libelf</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/libffi.xml LFS-pacman/chapter08/libffi.xml
--- LFS_orig/chapter08/libffi.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/libffi.xml	2022-06-16 20:05:13.904522425 -0500
@@ -39,40 +39,68 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Libffi</title>
 
-    <note>
-      <para>Similar to GMP, libffi builds with optimizations specific
-      to the processor in use. If building for another system, change the
-      value of the <parameter>--with-gcc-arch=</parameter> parameter in the
-      following command to an architecture name fully implemented by the
-      CPU on that system.
-      If this is not done, all applications that link to libffi will trigger
-      Illegal Operation Errors.</para>
-    </note>
-
-    <para>Prepare libffi for compilation:</para>
-
-    <screen><userinput remap="configure">./configure --prefix=/usr          \
-            --disable-static       \
-            --with-gcc-arch=native \
-            --disable-exec-static-tramp</userinput></screen>
+    <para>Create the PKGBUILD for the Libffi package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/libffi
+cd /sources/libffi
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libffi"
+pkgver="&libffi-version;"
+pkgrel="1"
+pkgdesc="The Libffi library provides a portable, high level programming interface to various calling conventions."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'GPLv2'
+         'MIT')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'make'
+             'sed')
+checkdepends=('dejagnu')
+source=('&libffi-url;')
+md5sums=('&libffi-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr          \
+              --disable-static       \
+              --with-gcc-arch=native \
+              --disable-exec-static-tramp
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure option:</title>
 
       <varlistentry>
-        <term><parameter>--with-gcc-arch=native</parameter></term>
+        <term><parameter>--without-gcc-arch</parameter></term>
         <listitem>
-          <para>Ensure GCC optimizes for the current system.  If this
-          is not specified, the system is guessed and the code generated
-          may not be correct for some systems.  If the generated code
-          will be copied from the native system to a less capable
-          system, use the less capable system as a parameter. For details
-          about alternative system types, see <ulink
-          url='https://gcc.gnu.org/onlinedocs/gcc-&gcc-version;/gcc/x86-Options.html'>
-          the x86 options in the GCC manual</ulink>.</para>
+          <para>Ensure GCC does not optimize for the current system. If this is
+	      is not specified, the system is guessed and the code generated may not
+	      be correct for some systems.</para>
         </listitem>
       </varlistentry>
 
@@ -88,17 +116,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libffi-&libffi-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>To test the results, issue:</para>
+    <para>Update the local cache and install the Libffi package:</para>
 
-<screen><userinput remap="test">make check</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S libffi --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/libffi
+cp PKGBUILD /srv/pacman/source/LFS/libffi
+cd /sources
+rm -rf libffi</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/libgcrypt.xml LFS-pacman/chapter08/libgcrypt.xml
--- LFS_orig/chapter08/libgcrypt.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libgcrypt.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,234 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libgcrypt" role="wrap">
+  <?dbhtml filename="libgcrypt.html"?>
+
+  <sect1info condition="script">
+    <productname>libgcrypt</productname>
+    <productnumber>&libgcrypt-version;</productnumber>
+    <address>&libgcrypt-url;</address>
+  </sect1info>
+
+  <title>Libgcrypt-&libgcrypt-version;</title>
+
+  <indexterm zone="ch-system-libgcrypt">
+    <primary sortas="a-Libgcrypt">Libgcrypt</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libgcrypt</application> package contains a general
+      purpose crypto library based on the code used in
+      <application>GnuPG</application>. The library provides a high level
+      interface to cryptographic building blocks using an extendable and flexible
+      API.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libgcrypt-fin-sbu;</seg>
+        <seg>&libgcrypt-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Libgcrypt</title>
+
+    <para>Create the PKGBUILD for the Libgcrypt package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/libgcrypt
+cd /sources/libgcrypt
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libgcrypt"
+pkgver="&libgcrypt-version;
+pkgrel="1"
+pkgdesc="${pkgname} ${pkgver}"
+arch=('x86'
+      x86_64')
+license=('GPLv2'
+         'LGPLv2.1')
+groups=('core')
+depends=('glibc'
+         'libcap'
+         'libgpg-error'
+         'rootfs')
+makedepends=('bash'
+         'binutils'
+         'coreutils'
+         'gawk'
+         'gcc'
+         'gettext'
+         'glibc'
+         'grep'
+         'make'
+         'sed')
+source=('&libgcrypt-url;)
+md5sums=('&libgcrypt-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr --with-capabilities
+  make
+  make -C doc html
+  makeinfo --html --no-split -o doc/gcrypt_nochunks.html doc/gcrypt.texi
+  makeinfo --plaintext       -o doc/gcrypt.txt           doc/gcrypt.texi
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}/" install
+  install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+  install -vm644  README doc/{README.apichanges,fips*,libgcrypt*} \
+                  ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+  install -vdm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
+  install -vm644  doc/gcrypt.html/* \
+                  ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
+  install -vm644  doc/gcrypt_nochunks.html \
+                  ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+  install -vm644  doc/gcrypt.{txt,texi} \
+                  ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libgcrypt-&libgcrypt-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libgcrypt package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libgcrypt --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libgcrypt
+cp PKGBUILD /srv/pacman/source/LFS/libgcrypt
+cd /sources
+rm -rf libgcrypt</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <option>--with-capabilities</option>: This option enables libcap2 support.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          dumpsexp, hmac256, libgcrypt-config, and mpicalc
+        </seg>
+        <seg>
+          libgcrypt.so
+        </seg>
+        <seg>
+          /usr/share/doc/libgcrypt-&libgcrypt-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="dumpsexp">
+        <term><command>dumpsexp</command></term>
+        <listitem>
+          <para>
+            is a debug tool for S-expressions.
+          </para>
+          <indexterm zone="ch-system-libgcrypt dumpsexp">
+            <primary sortas="b-dumpsexp">dumpsexp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="hmac256">
+        <term><command>hmac256</command></term>
+        <listitem>
+          <para>
+            is a standalone HMAC-SHA-256 implementation used to compute
+            an HMAC-SHA-256 authentication code.
+          </para>
+          <indexterm zone="ch-system-libgcrypt hmac256">
+            <primary sortas="b-hmac256">hmac256</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libgcrypt-config">
+        <term><command>libgcrypt-config</command></term>
+        <listitem>
+          <para>
+            determines the compile and linker flags that should be used to
+            compile and link programs that use <filename class="libraryfile">libgcrypt</filename>.
+          </para>
+          <indexterm zone="ch-system-libgcrypt libgcrypt-config">
+            <primary sortas="b-libgcrypt-config">libgcrypt-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mpicalc">
+        <term><command>mpicalc</command></term>
+        <listitem>
+          <para>
+            is a RPN (Reverse Polish Notation) calculator.
+          </para>
+          <indexterm zone="ch-system-libgcrypt mpicalc">
+            <primary sortas="b-mpicalc">mpicalc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libgcrypt-lib">
+        <term><filename class="libraryfile">libgcrypt.so</filename></term>
+        <listitem>
+          <para>
+            contains the cryptographic API functions.
+          </para>
+          <indexterm zone="ch-system-libgcrypt libgcrypt-lib">
+            <primary sortas="c-libgcrypt">libgcrypt.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libgpg-error.xml LFS-pacman/chapter08/libgpg-error.xml
--- LFS_orig/chapter08/libgpg-error.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libgpg-error.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,215 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libgpg-error" role="wrap">
+  <?dbhtml filename="libgpg-error.html"?>
+
+  <sect1info condition="script">
+    <productname>libgpg-error</productname>
+    <productnumber>&libgpg-error-version;</productnumber>
+    <address>&libgpg-error-url;</address>
+  </sect1info>
+
+  <title>Libgpg-error-&libgpg-error-version;</title>
+
+  <indexterm zone="ch-system-libgpg-error">
+    <primary sortas="a-Libgpg-errors">Libgpg-error</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>Libgpg-error</application> package contains a
+      library that defines common error values for all
+      <application>GnuPG</application> components.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libgpg-error-fin-sbu;</seg>
+        <seg>&libgpg-error-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Libgpg-error</title>
+
+    <para>Create the PKGBUILD for the Libgpg-error package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/libgpg-error
+cd /sources/libgpg-error
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libgpg-error"
+pkgver="&libgpg-error-version;"
+pkgrel="1"
+pkgdesc="Libgpg-error contains a library that defines common error values for GnuPG components."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2.1')
+groups=('core')
+depends=('glibc')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'gettext'
+             'grep'
+             'inetutils'
+             'make'
+             'readline'
+             'sed')
+source=('&libgpg-error-url;')
+md5sums=('&libgpg-error-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}/" install
+  install -vDm644 README ${pkgdir}/usr/share/doc/libgpg-error-${pkgver}/README
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libgp-error-&libgpg-error-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libgpg-error package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libgpg-error --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libgpg-error
+cp PKGBUILD /srv/pacman/source/LFS/libgpg-error
+cd /sources
+rm -rf libgpg-error</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          gpg-error, gpg-error-config, gpgrt-config, and yat2m
+        </seg>
+        <seg>
+          libgpg-error.so
+        </seg>
+        <seg>
+          /usr/share/common-lisp/source/gpg-error,
+          /usr/share/libgpg-error, and
+          /usr/share/doc/libgpg-error-&libgpg-error-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="gpg-error">
+        <term><command>gpg-error</command></term>
+        <listitem>
+          <para>
+            is used to determine <application>libgpg-error</application>
+            error codes.
+          </para>
+          <indexterm zone="ch-system-libgpg-error gpg-error">
+            <primary sortas="b-gpg-error">gpg-error</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpg-error-config">
+        <term><command>gpg-error-config</command></term>
+        <listitem>
+          <para>
+            is a utility used to configure and build applications based on
+            the <application>libgpg-error</application> library. It can be used
+            to query the C compiler and linker flags which are required to
+            correctly compile and link the application against the
+            <application>libgpg-error</application> library.
+          </para>
+          <indexterm zone="ch-system-libgpg-error gpg-error-config">
+            <primary sortas="b-gpg-error-config">gpg-error-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="gpgrt-config">
+        <term><command>gpgrt-config</command></term>
+        <listitem>
+          <para>
+            is the same script as <command>gpg-error-config</command>.
+          </para>
+          <indexterm zone="ch-system-libgpg-error gpgrt-config">
+            <primary sortas="b-gpgrt-config">gpgrt-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="yat2m">
+        <term><command>yat2m</command></term>
+        <listitem>
+          <para>
+            extracts man pages from a Texinfo source.
+          </para>
+          <indexterm zone="ch-system-libgpg-error yat2m">
+            <primary sortas="b-yat2m">yat2m</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libgpg-error-lib">
+        <term><filename class="libraryfile">libgpg-error.so</filename></term>
+        <listitem>
+          <para>
+            contains the <application>libgpg-error</application> API
+            functions.
+          </para>
+          <indexterm zone="ch-system-libgpg-error libgpg-error-lib">
+            <primary sortas="c-libgpg-error">libgpg-error.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libksba.xml LFS-pacman/chapter08/libksba.xml
--- LFS_orig/chapter08/libksba.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libksba.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,169 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libksba" role="wrap">
+  <?dbhtml filename="libksba.html"?>
+
+  <sect1info condition="script">
+    <productname>libksba</productname>
+    <productnumber>&libksba-version;</productnumber>
+    <address>&libksba-url;</address>
+  </sect1info>
+
+  <title>Libksba-&libksba-version;</title>
+
+  <indexterm zone="ch-system-libksba">
+    <primary sortas="a-Libksba">Libksba</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>Libksba</application> package contains a library
+      used to make X.509 certificates as well as making the CMS (Cryptographic
+      Message Syntax) easily accessible by other applications. Both
+      specifications are building blocks of S/MIME and TLS. The library does
+      not rely on another cryptographic library but provides hooks for easy
+      integration with <application>Libgcrypt</application>.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libksba-fin-sbu;</seg>
+        <seg>&libksba-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Libksba</title>
+
+    <para>Create the PKGBUILD for the Libksba package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/libksba
+cd /sources/libksba
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libksba"
+pkgver="&libksba-version;"
+pkgrel="1"
+pkgdesc="${pkgname} ${pkgver}"
+arch=('x86'
+      x86_64')
+license=('GPLv2'
+         'GPLv3'
+         'LGPLv3')
+groups=('core')
+depends=('glibc'
+         'libgcrypt'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+source=('&libksba-url;')
+md5sums=('&libksba-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}/" install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libksba-&libksba-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libksba package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libksba --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libksba
+cp PKGBUILD /srv/pacman/source/LFS/libksba
+cd /sources
+rm -rf libksba</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>ksba-config</seg>
+        <seg>libksba.so</seg>
+        <seg>None<!--/usr/share/doc/libksba-&libksba-version;--></seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="ksba-config">
+        <term><command>ksba-config</command></term>
+        <listitem>
+          <para>
+            is a utility used to configure and build applications based on
+            the libksba(3) library. It can be used to query the C compiler and
+            linker flags which are required to correctly compile and link the
+            application against the libksba(3) library.
+          </para>
+          <indexterm zone="ch-system-libksba ksba-config">
+            <primary sortas="b-ksba-config">ksba-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libksba-lib">
+        <term><filename class='libraryfile'>libksba.{so,a}</filename></term>
+        <listitem>
+          <para>
+            contains the cryptographic API functions.
+          </para>
+          <indexterm zone="ch-system-libksba libksba-lib">
+            <primary sortas="c-libksba">libksba.{so,a}</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libnsl.xml LFS-pacman/chapter08/libnsl.xml
--- LFS_orig/chapter08/libnsl.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libnsl.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="libnsllib" xreflabel="libnsl-&libnsl-version;">
+  <?dbhtml filename="libnsl.html"?>
+
+  <sect1info condition="script">
+    <productname>libnsl</productname>
+    <productnumber>&libnsl-version;</productnumber>
+    <address>&libnsl-url;</address>
+  </sect1info>
+
+  <title>Libnsl-&libnsl-version;</title>
+
+  <indexterm zone="libnsl">
+    <primary sortas="a-libnsl">libnsl</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to Libnsl</title>
+
+    <para>
+      The <application>libnsl</application> package contains the public client
+      interface for NIS(YP). It replaces the NIS library that used to
+      be in glibc.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&zlib-fin-sbu;</seg>
+        <seg>&zlib-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Libnsl</title>
+
+    <para>Create the PKGBUILD for the Libnsl package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/zlib
+cd /sources/zlib
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libnsl"
+pkgver="&libnsl-version;"
+pkgrel="1"
+pkgdesc="The libnsl package contains the public client interface for NIS(YP) and NIS+."
+arch=(x86_64)
+license=('LGPLv2.1'
+         'LGPLv3')
+# Optional Dependencies:
+# $(pacman -Q keyutils &gt;/dev/null 2&gt;&amp;1 &amp;&amp; echo 'keyutils')
+# $(pacman -Q mitkrb5 &gt;/dev/null 2&gt;&amp;1 &amp;&amp; echo 'mitkrb5')
+depends=('glibc'
+         'libtirpc')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'glibc'
+             'grep'
+             'libtirpc'
+             'sed')
+# $(pacman -Q keyutils &gt;/dev/null 2&gt;&amp;1 || echo 'keyutils:use key management')
+# $(pacman -Q mitkrb5 &gt;/dev/null 2&gt;&amp;1 || echo 'mitkrb5:add GSSAPI suppot')
+optdepends=('keyutils'
+            'mitkrb5')
+source=("https://github.com/thkukuk/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
+md5sums('&libnsl-md5;')
+
+build() {
+  cd "${pkgname}-${pkgver}"
+  ./configure --sysconfdir=/etc --disable-static
+  make
+}
+
+package() {
+  cd "${pkgname}-${pkgver}"
+make DESTDIR="${pkgdir}" install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libnsl-&libnsl-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libnsl package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libnsl --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libnsl
+cp PKGBUILD /srv/pacman/source/LFS/libnsl
+cd /sources
+rm -rf libnsl</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          None
+        </seg>
+        <seg>
+          libnsl.so
+        </seg>
+        <seg>
+          None
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="libnsl-lib">
+        <term><filename class="libraryfile">libnsl.so</filename></term>
+        <listitem>
+          <para>
+            provides the NIS (YP) API functions required by other programs
+          </para>
+          <indexterm zone="libnsl libnsl-lib">
+            <primary sortas="c-libnsl">libnsl.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libpipeline.xml LFS-pacman/chapter08/libpipeline.xml
--- LFS_orig/chapter08/libpipeline.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/libpipeline.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,24 +38,75 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Libpipeline</title>
 
-    <para>Prepare Libpipeline for compilation:</para>
+    <para>Create the PKGBUILD for the Libpipeline package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/libpipeline
+cd /sources/libpipeline
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libpipeline"
+pkgver="&libpipeline-version;"
+pkgrel="1"
+pkgdesc="The Libpipeline package contains a library for manipulating pipelines of subprocesses in a flexible and convenient way."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('check')
+source=('&libpipeline-url;')
+md5sums=('&libpipeline-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libpipeline-&libpipeline-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libpipeline package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libpipeline --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libpipeline
+cp PKGBUILD /srv/pacman/source/LFS/libpipeline
+cd /sources
+rm -rf libpipeline</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/libpwquality.xml LFS-pacman/chapter08/libpwquality.xml
--- LFS_orig/chapter08/libpwquality.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libpwquality.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,310 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="libpwquality" xreflabel="libpwquality-&libpwquality-version;">
+  <?dbhtml filename="libpwquality.html"?>
+
+  <sect1info condition="script">
+    <productname>libpwquality</productname>
+    <productnumber>&libpwquality-version;</productnumber>
+    <address>&libpwquality-url;</address>
+  </sect1info>
+
+  <title>Libpwquality-&libpwquality-version;</title>
+
+  <indexterm zone="libpwquality">
+    <primary sortas="a-libpwquality">libpwquality</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to Libpwquality</title>
+
+    <para>
+      The <application>libpwquality</application> package provides common
+      functions for password quality checking and also scoring them based on
+      their apparent randomness. The library also provides a function for
+      generating random passwords with good pronounceability.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libpwquality-fin-sbu;</seg>
+        <seg>&libpwquality-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Libpwquality</title>
+
+    <para>Create the PKGBUILD for the Libpwquality package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/libpwquality
+cd /sources/libpwquality
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libpwquality"
+pkgver="&libpwquality-version;"
+pkgrel="1"
+pkgdesc="The libpwquality package provides common functions for password quality checking and also scoring them based on their apparent randomness."
+arch=('x86'
+      'x86_64')
+url="https://github.com/libpwquality/libpwquality"
+license=('GPLv3')
+depends=('cracklib'
+         'glibc'
+         'linux-pam'
+         'python')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'cracklib'
+             'gcc'
+             'glibc'
+             'grep'
+             'linux-pam'
+             'make'
+             'python'
+             'sed'
+             'shadow')
+backup=('etc/security/pwquality.conf')
+install='libpwquality-install'
+source=("&libpwquality-url;")
+md5sums=('&libpwquality-md5;')
+
+build() {
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr                      \
+              --disable-static                   \
+              --with-securedir=/usr/lib/security \
+              --with-python-binary=python3
+  make
+}
+
+package() {
+  cd "${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+}</literal>
+REALEOF</userinput></screen>
+
+    <para>You will also need to update the default Linux-PAM password
+    configuration when installing Libpwquality:</para>
+
+<screen><userinput>cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal>post_install(){
+  mv /etc/pam.d/system-password{,.orig}
+  cat &gt; /etc/pam.d/system-password &lt;&lt; "EOF"
+# Begin /etc/pam.d/system-password
+
+# check new passwords for strength (man pam_pwquality)
+password  required    pam_pwquality.so   authtok_type=UNIX retry=1 difok=1 \
+                                         minlen=8 dcredit=0 ucredit=0 \
+                                         lcredit=0 ocredit=0 minclass=1 \
+                                         maxrepeat=0 maxsequence=0 \
+                                         maxclassrepeat=0 geoscheck=0 \
+                                         dictcheck=1 usercheck=1 \
+                                         enforcing=1 badwords="" \
+                                         dictpath=/usr/lib/cracklib/pw_dict
+# use sha512 hash for encryption, use shadow, and use the
+# authentication token (chosen password) set by pam_pwquality
+# above (or any previous modules)
+password  required    pam_unix.so        sha512 shadow use_authtok
+
+# End /etc/pam.d/system-password
+EOF
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libpwquality-&libpwquality-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libpwquality package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libpwquality --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libpwquality
+cp PKGBUILD /srv/pacman/source/LFS/libpwquality
+cp libpwquality.install /srv/pacman/source/LFS/libpwquality
+cd /sources
+rm -rf libpwquality</userinput></screen>
+
+    <para>
+      Install <application>libpwquality</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput>./configure --prefix=/usr                      \
+            --disable-static                   \
+            --with-securedir=/usr/lib/security \
+            --with-python-binary=python3       &amp;&amp;
+make</userinput></screen>
+
+    <para>
+      This package does not come with a test suite.
+    </para>
+
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--with-python-binary=python3</parameter>: This parameter gives
+      the location of the <application>Python</application> binary. The default
+      is <parameter>python</parameter>, and requires Python-2.x.
+    </para>
+
+  </sect2>
+
+  <sect2 role="configuration">
+    <title>Configuring libpwquality</title>
+
+<!--
+    <para>
+      <application>libpwquality</application> is intended to be a
+      functional replacement for the <filename>pam_cracklib.so</filename>
+      module with additional options. To replace the
+      <filename>pam_cracklib.so</filename> module with the
+      <filename>pam_pwquality.so</filename> module, execute the following
+      commands as the <systemitem class="username">root</systemitem> user:
+    </para>
+-->
+
+    <para>
+      <application>libpwquality</application> is intended to be a
+      functional replacement for the now-obsolete
+      <filename>pam_cracklib.so</filename> PAM module. To configure the system
+      to use the <filename>pam_pwquality</filename> module, execute the
+      following commands as the
+      <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>mv /etc/pam.d/system-password{,.orig} &amp;&amp;
+cat &gt; /etc/pam.d/system-password &lt;&lt; "EOF"
+<literal># Begin /etc/pam.d/system-password
+
+# check new passwords for strength (man pam_pwquality)
+password  required    pam_pwquality.so   authtok_type=UNIX retry=1 difok=1 \
+                                         minlen=8 dcredit=0 ucredit=0 \
+                                         lcredit=0 ocredit=0 minclass=1 \
+                                         maxrepeat=0 maxsequence=0 \
+                                         maxclassrepeat=0 geoscheck=0 \
+                                         dictcheck=1 usercheck=1 \
+                                         enforcing=1 badwords="" \
+                                         dictpath=/usr/lib/cracklib/pw_dict
+# use sha512 hash for encryption, use shadow, and use the
+# authentication token (chosen password) set by pam_pwquality
+# above (or any previous modules)
+password  required    pam_unix.so        sha512 shadow use_authtok
+
+# End /etc/pam.d/system-password</literal>
+EOF
+</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          pwscore and pwmake
+        </seg>
+        <seg>
+          pam_pwquality.so and libpwquality.so
+        </seg>
+        <seg>
+          None
+          <!-- /etc/security was installed by Linux-PAM -->
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="pwmake">
+        <term><command>pwmake</command></term>
+        <listitem>
+          <para>
+            is a simple configurable tool for generating random
+            and relatively easily pronounceable passwords
+          </para>
+          <indexterm zone="libpwquality pwmake">
+            <primary sortas="b-pwmake">pwmake</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pwscore">
+        <term><command>pwscore</command></term>
+        <listitem>
+          <para>
+            is a simple tool for checking quality of a password
+          </para>
+          <indexterm zone="libpwquality pwscore">
+            <primary sortas="b-pwscore">pwscore</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libpwquality-lib">
+        <term><filename class="libraryfile">libpwquality.so</filename></term>
+        <listitem>
+          <para>
+            contains API functions for checking the password quality
+          </para>
+          <indexterm zone="libpwquality libpwquality-lib">
+            <primary sortas="c-libpwquality">libpwquality.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pam_pwquality">
+        <term><filename class="libraryfile">pam_pwquality.so</filename></term>
+        <listitem>
+          <para>
+            is a <application>Linux PAM</application> module used to perform
+            password quality checking
+          </para>
+          <indexterm zone="libpwquality pam_pwquality">
+            <primary sortas="c-pam_pwquality">pam_pwquality.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libtasn1.xml LFS-pacman/chapter08/libtasn1.xml
--- LFS_orig/chapter08/libtasn1.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libtasn1.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,154 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libtasn1" role="wrap">
+  <?dbhtml filename="libtasn1.html"?>
+
+  <sect1info condition="script">
+    <productname>libtasn1</productname>
+    <productnumber>&libtasn1-version;</productnumber>
+    <address>&libtasn1-url;</address>
+  </sect1info>
+
+  <title>Libtasn1-&libtasn1-version;</title>
+
+  <indexterm zone="ch-system-libtasn1">
+    <primary sortas="a-Libtasn1">Libtasn1</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      <application>libtasn1</application> is a highly portable C library
+      that encodes and decodes DER/BER data following an ASN.1 schema.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libtasn1-fin-sbu;</seg>
+        <seg>&libtasn1-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libtasn1</title>
+
+    <para>
+      Configure <application>libtasn1</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>
+      Build <application>libtasn1</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      To test the results, issue: <command>make check</command>.
+    </para>
+
+    <para>
+      Install <application>libtasn1</application> by running the
+      following command:
+    </para>
+
+<screen><userinput remap="install">make install
+make -C doc/reference install-data-local</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          asn1Coding, asn1Decoding and asn1Parser
+        </seg>
+        <seg>
+          libtasn1.so
+        </seg>
+        <seg>
+          /usr/share/gtk-doc/html/libtasn1
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="asn1Coding">
+        <term><command>asn1Coding</command></term>
+        <listitem>
+          <para>
+            is an ASN.1 DER encoder.
+          </para>
+          <indexterm zone="ch-system-libtasn1 asn1Coding">
+            <primary sortas="b-asn1Coding">asn1Coding</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="asn1Decoding">
+        <term><command>asn1Decoding</command></term>
+        <listitem>
+          <para>
+            is an ASN.1 DER decoder.
+          </para>
+          <indexterm zone="ch-system-libtasn1 asn1Decoding">
+            <primary sortas="b-asn1Decoding">asn1Decoding</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="asn1Parser">
+        <term><command>asn1Parser</command></term>
+        <listitem>
+          <para>
+            is an ASN.1 syntax tree generator for
+            <application>libtasn1</application>.
+          </para>
+          <indexterm zone="ch-system-libtasn1 asn1Parser">
+            <primary sortas="b-asn1Parser">asn1Parser</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libtasn1-lib">
+        <term><filename class="libraryfile">libtasn1.so</filename></term>
+        <listitem>
+          <para>
+            is a library for Abstract Syntax Notation One (ASN.1) and
+            Distinguish Encoding Rules (DER) manipulation.
+          </para>
+          <indexterm zone="ch-system-libtasn1 libtasn1-lib">
+            <primary sortas="c-libtasn1">libtasn1.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libtirpc.xml LFS-pacman/chapter08/libtirpc.xml
--- LFS_orig/chapter08/libtirpc.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libtirpc.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,181 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="libtirpc" xreflabel="libtirpc-&libtirpc-version;">
+  <?dbhtml filename="libtirpc.html"?>
+
+  <sect1info condition="script">
+    <productname>libtirpc</productname>
+    <productnumber>&libtirpc-version;</productnumber>
+    <address>&libtirpc-url;</address>
+  </sect1info>
+
+  <title>libtirpc-&libtirpc-version;</title>
+
+  <indexterm zone="libtirpc">
+    <primary sortas="a-libtirpc">libtirpc</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to libtirpc</title>
+
+    <para>
+      The <application>libtirpc</application> package contains
+      libraries that support programs that use the Remote Procedure Call (RPC)
+      API. It replaces the RPC, but not the NIS library entries that
+      used to be in glibc.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libtirpc-fin-sbu;</seg>
+        <seg>&libtirpc-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of libtirpc</title>
+
+<screen><userinput>mkdir /sources/libtirpc
+cd /sources/libtirpc
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libtirpc"
+pkgver="&libtirpc-version;"
+pkgrel="1"
+pkgdesc="The libtirpc package contains libraries that support programs that use the Remote Procedure Call (RPC) API."
+arch=('x86'
+      'x86_64')
+license=('BSD3C')
+#        Conditional dependencies (commendted $() cases below) can be used in a
+#        complete environment, but not the limted environment in Chapter 8
+#        because the pacman database is not yet complete.
+#        These two examples would be used in depends/makedepends and optdepends
+#        respectively, and would add to the depends and makedepends arrays in
+#        the binary package if they are installed, or add to the optdepends
+#        array if not installed:
+# $(pacman -Q mitkrb5 &gt;/dev/null 2&gt;&amp;1 &amp;&amp; echo 'mitkrb5')
+# $(pacman -Q mitkrb5 &gt;/dev/null 2&gt;&amp;1 || echo 'mitkrb5: provide GSSAPI support')
+#        Note the optional description for the optdepends test variant above
+#        Also, take care with condtionals in PKGBUILD files as they are run by
+#        bash +e. If a negative pipestatus is possible, use a subshell as above.
+depends=('glibc')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'glibc'
+             'grep'
+             'make'
+             'sed')
+optdepends=('mitkrb5')
+backup=('etc/netconfig')
+source=(https://downloads.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.bz2)
+md5sum=('&libtirpc-md5;')
+
+build() {
+# Optional deps must be handled here too if necesasry, for example:
+#  _confargs=""
+#  pacman -Q mitkrb5 >/dev/null 2&gt;&amp;1 || _confargs="${_confargs} --disable-gssapi"
+# Replace the "--disable-gssapi" argument with "${_confargs}" once in a full
+# build environment
+
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --sysconf=/etc   \
+              --disable-static --disable-gssapi
+
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}" install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libtirpc-&libtirpc-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the libtirpc package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libtirpc --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libtirpc
+cp PKGBUILD /srv/pacman/source/LFS/libtirpc
+cd /sources
+rm -rf libtirpc</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--disable-gssapi</parameter>: This switch is needed if
+      no GSSAPI is installed. Remove this switch if you have one
+      installed (for example MIT KRB 5) and you wish to use it.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          None
+        </seg>
+        <seg>
+          libtirpc.so
+        </seg>
+        <seg>
+          /usr/include/tirpc
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="libtirpc-lib">
+        <term><filename class="libraryfile">libtirpc.so</filename></term>
+        <listitem>
+          <para>
+            provides the Remote Procedure Call (RPC) API functions required by
+            other programs
+          </para>
+          <indexterm zone="libtirpc libtirpc-lib">
+            <primary sortas="c-libtirpc">libtirpc.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libtool.xml LFS-pacman/chapter08/libtool.xml
--- LFS_orig/chapter08/libtool.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/libtool.xml	2022-06-16 20:05:13.907855759 -0500
@@ -42,42 +42,84 @@
   <sect2 role="installation">
     <title>Installation of Libtool</title>
 
-    <para>Prepare Libtool for compilation:</para>
+    <para>Create the PKGBUILD for the Libtool package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-<para>To test the results<!--(about 11.0 SBU)-->, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <note><para>The test time for libtool can be reduced significantly on a
-    system with multiple cores.  To do this, append
-    <command>TESTSUITEFLAGS=-j&lt;N&gt;</command> to the line above.  For
-    instance, using -j4 can reduce the test time by over 60
-    percent.</para></note>
-
-    <para>Five tests are known to fail in the LFS build environment due
-    to a circular dependency, but all tests pass if rechecked after
-    automake is installed.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <!-- dev: - -disable-static works but causes additional test failures
-              so we manually remove the static library -->
-
-    <para>Remove a useless static library:</para>
-
-<screen><userinput remap="install">rm -fv /usr/lib/libltdl.a</userinput></screen>
+<screen><userinput>mkdir /sources/libtool
+cd /sources/libtool
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="libtool"
+pkgver="&libtool-version;"
+pkgrel="1"
+pkgdesc="The Libtool package contains the GNU generic library support script."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('autoconf'
+         'automake'
+         'bash'
+         'binutils'
+         'coreutils'
+         'file'
+         'gcc'
+         'glibc'
+         'grep'
+         'make'
+         'sed'
+         'rootfs')
+makedepends=('diffutils'
+             'gawk'
+             'texinfo')
+checkdepends=('autoconf'
+              'automake'
+              'findutils')
+source=('&libtool-url;')
+md5sums=('&libtool-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # Note that the test time can be greatly reduced by using -jx
+  # Additionally, five tests are known to fail in chroot, but pass after
+  # automake is installed.
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  rm -fv ${pkgdir}/usr/lib/libltdl.a
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/libtool-&libtool-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Libtool package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S libtool --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/libtool
+cp PKGBUILD /srv/pacman/source/LFS/libtool
+cd /sources
+rm -rf libtool</userinput></screen>
 
   </sect2>
 
-
   <sect2 id="contents-libtool" role="content">
     <title>Contents of Libtool</title>
 
diff -Naurp LFS_orig/chapter08/libusb.xml LFS-pacman/chapter08/libusb.xml
--- LFS_orig/chapter08/libusb.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libusb.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libusb" role="wrap">
+  <?dbhtml filename="libusb.html"?>
+
+  <sect1info condition="script">
+    <productname>libusb</productname>
+    <productnumber>&libusb-version;</productnumber>
+    <address>&libusb-url;</address>
+  </sect1info>
+
+  <title>Libusb-&libusb-version;</title>
+
+  <indexterm zone="ch-system-libusb">
+    <primary sortas="a-Libusb">Libusb</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to libusb</title>
+
+    <para>
+      The <application>libusb</application> package contains a library
+      used by some applications for USB device access.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libusb-fin-sbu;</seg>
+        <seg>&libusb-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libusb</title>
+
+    <note>
+      <para>
+        This package does not support parallel build.
+      </para>
+    </note>
+
+    <para>
+      Configure <application>libusb</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="configure">sed -i "s/^PROJECT_LOGO/#&amp;/" doc/doxygen.cfg.in
+
+./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>
+      Build <application>libusb</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="make">make -j1</userinput></screen>
+
+    <para>
+      This package does not come with a test suite.
+    </para>
+
+    <para>
+      Install <application>libusb</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <command>sed -i ...</command>: This sed prevents a warning when
+      building the documentation.
+    </para>
+  </sect2>
+
+  <sect2 role="configuration">
+    <title>Configuring Libusb</title>
+
+    <para id="libusb-kernel">
+      To access raw USB devices (those not treated as a disk by the mass-storage
+      driver), appropriate support must be available in the kernel.  Check your
+      kernel configuration:
+    </para>
+
+<screen><literal>Device Drivers ---&gt;
+  [*] USB support ---&gt;                   [CONFIG_USB_SUPPORT]
+    &lt;*/M&gt; Support for Host-side USB      [CONFIG_USB]
+    (Select any USB hardware device drivers you may need on the same page)</literal></screen>
+
+    <indexterm zone="ch-system-libusb libusb-kernel">
+      <primary sortas="d-USB-device-filesystem">Support for Host-side USB</primary>
+    </indexterm>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          None
+        </seg>
+        <seg>
+          libusb-1.0.so
+        </seg>
+        <seg>
+          /usr/include/libusb-1.0 and
+          /usr/share/doc/libusb-&libusb-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="libusb-lib">
+        <term><filename class='libraryfile'>libusb-1.0.so</filename></term>
+        <listitem>
+          <para>
+            contains API functions used for accessing USB hardware.
+          </para>
+          <indexterm zone="ch-system-libusb libusb-lib">
+            <primary sortas="c-libusb">libusb-1.0.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libxml2.xml LFS-pacman/chapter08/libxml2.xml
--- LFS_orig/chapter08/libxml2.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libxml2.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,220 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libxml2" role="wrap">
+  <?dbhtml filename="libxml2.html"?>
+
+  <sect1info condition="script">
+    <productname>libxml2</productname>
+    <productnumber>&libxml2-version;</productnumber>
+    <address>&libxml2-url;</address>
+  </sect1info>
+
+  <title>Libxml2-&libxml2-version;</title>
+
+  <indexterm zone="ch-system-libxml2">
+    <primary sortas="a-Libxml2">Libxml2</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to libxml2</title>
+
+    <para>
+      The <application>libxml2</application> package contains libraries
+      and utilities used for parsing XML files.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libxml2-fin-sbu;</seg>
+        <seg>&libxml2-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title/>
+
+    <para>
+      Install <application>libxml2</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr    \
+            --disable-static \
+            --with-history   \
+            --with-python=/usr/bin/python3</userinput></screen>
+
+    <para>
+      Build <application>libxml2</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      Install <application>libxml2</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--with-history</parameter>: This switch enables
+      <application>Readline</application> support when running
+      <command>xmlcatalog</command> or <command>xmllint</command> in shell mode.
+    </para>
+
+    <para>
+      <parameter>--with-python=/usr/bin/python3</parameter>: Allows building
+      the libxml2 module with Python3 instead of Python2.
+    </para>
+
+    <para>
+      <option>--with-threads</option>: Add this switch to enable multithread
+      support.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          xml2-config,
+          xmlcatalog, and
+          xmllint <!--and the
+          drv_libxml2.py and libxml2.py <application>Python3</application>
+          modules.  These are pythin modules, not programs -->
+        </seg>
+        <seg>
+          libxml2.so and
+          libxml2mod.so (<application>Python3</application> module)
+        </seg>
+        <seg>
+          /usr/include/libxml2,
+          /usr/lib/cmake/libxml2,
+          /usr/share/doc/libxml2-&libxml2-version;,
+          /usr/share/doc/libxml2-python-&libxml2-version;, and
+          /usr/share/gtk-doc/html/libxml2
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="xml2-config">
+        <term><command>xml2-config</command></term>
+        <listitem>
+          <para>
+            determines the compile and linker flags that should be used to
+            compile and link programs that use
+            <filename class='libraryfile'>libxml2</filename>.
+          </para>
+          <indexterm zone="ch-system-libxml2 xml2-config">
+            <primary sortas="b-xml2-config">xml2-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="xmlcatalog">
+        <term><command>xmlcatalog</command></term>
+        <listitem>
+          <para>
+            is used to monitor and manipulate XML and SGML catalogs.
+          </para>
+          <indexterm zone="ch-system-libxml2 xmlcatalog">
+            <primary sortas="b-xmlcatalog">xmlcatalog</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="xmllint">
+        <term><command>xmllint</command></term>
+        <listitem>
+          <para>
+            parses XML files and outputs reports (based upon options) to detect
+            errors in XML coding.
+          </para>
+          <indexterm zone="ch-system-libxml2 xmllint">
+            <primary sortas="b-xmllint">xmllint</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+<!--
+      <varlistentry id="drv_libxml2.py3">
+        <term><command>drv_libxml2.py</command></term>
+        <listitem>
+          <para>
+            is a SAX <application>Python3</application> driver for libxml2.
+          </para>
+          <indexterm zone="ch-system-libxml2 drv_libxml2.py3">
+            <primary sortas="b-drv_libxml2.py3">drv_libxml2.py for Python3</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libxml2.py3">
+        <term><command>libxml2.py</command></term>
+        <listitem>
+          <para>
+            is the <application>Python3</application> binding for libxml2.
+          </para>
+          <indexterm zone="ch-system-libxml2 libxml2.py3">
+            <primary sortas="b-libxml2.py3">libxml2.py for Python3</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+-->
+      <varlistentry id="libxml2-lib">
+        <term><filename class="libraryfile">libxml2.so</filename></term>
+        <listitem>
+          <para>
+            provides functions for programs to parse files that use the XML
+            format.
+          </para>
+          <indexterm zone="ch-system-libxml2 libxml2-lib">
+            <primary sortas="c-libxml2">libxml2.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libxml2mod3">
+        <term><filename class="libraryfile">libxml2mod.so</filename></term>
+        <listitem>
+          <para>
+            is the interface for <application>Python3</application>
+            to use <filename class="libraryfile">libxml2.so</filename>.
+          </para>
+          <indexterm zone="ch-system-libxml2 libxml2mod3">
+            <primary sortas="c-libxml2mod">libxml2mod.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/libxslt.xml LFS-pacman/chapter08/libxslt.xml
--- LFS_orig/chapter08/libxslt.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/libxslt.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-libxslt" role="wrap">
+  <?dbhtml filename="libxslt.html"?>
+
+  <sect1info condition="script">
+    <productname>libxslt</productname>
+    <productnumber>&libxslt-version;</productnumber>
+    <address>&libxslt-url;</address>
+  </sect1info>
+
+  <title>Libxslt-&libxslt-version;</title>
+
+  <indexterm zone="ch-system-libxslt">
+    <primary sortas="a-Libxslt">Libxslt</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>libxslt</application> package contains
+      XSLT libraries used for extending <filename
+      class="libraryfile">libxml2</filename> libraries to
+      support XSLT files.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&libxslt-fin-sbu;</seg>
+        <seg>&libxslt-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of libxslt</title>
+
+    <para>
+      Configure <application>libxslt</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="configure">sed -i s/3000/5000/ libxslt/transform.c doc/xsltproc.{1,xml}
+./configure --prefix=/usr --disable-static</userinput></screen>
+
+    <para>
+      Build <application>libxslt</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      A shipped man page is glitched.  If the recommended dependencies are
+      installed, regenerate it by running the following commands:
+	 </para>
+
+<screen><userinput remap="make">sed -e 's@http://cdn.docbook.org/release/xsl@https://cdn.docbook.org/release/xsl-nons@' \
+    -e 's@\$Date\$@31 October 2019@' -i doc/xsltproc.xml
+xsltproc/xsltproc --nonet doc/xsltproc.xml -o doc/xsltproc.1</userinput></screen>
+
+    <para>
+      To test the results, issue:
+    </para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>
+      Install <application>libxslt</application> by running the following
+      command:
+    </para>
+
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <command>sed -i s/3000/5000/ ...</command>: this increases the recursion
+      limit in libxslt. This is needed by some packages for their documentation.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          xslt-config and xsltproc
+        </seg>
+        <seg>
+          libexslt.so, libxslt.so and optionally, libxsltmod.so
+          <application>Python</application> module
+        </seg>
+        <seg>
+          /usr/include/libexslt,
+          /usr/include/libxslt,
+          /usr/lib/libxslt-plugins,
+          /usr/share/doc/libxslt-&libxslt-version;, and
+          /usr/share/doc/libxslt-python-&libxslt-version;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="xslt-config">
+        <term><command>xslt-config</command></term>
+        <listitem>
+          <para>
+            is used to find out the pre-processor, linking and
+            compiling flags necessary to use the <application>libxslt</application>
+            libraries in 3rd-party programs.
+          </para>
+          <indexterm zone="ch-system-libxslt xslt-config">
+            <primary sortas="b-xslt-config">xslt-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="xsltproc">
+        <term><command>xsltproc</command></term>
+        <listitem>
+          <para>
+            is used to apply XSLT stylesheets to XML documents.
+          </para>
+          <indexterm zone="ch-system-libxslt xsltproc">
+            <primary sortas="b-xsltproc">xsltproc</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libexslt">
+        <term><filename class="libraryfile">libexslt.so</filename></term>
+        <listitem>
+          <para>
+            is used to provide extensions to XSLT functions.
+          </para>
+          <indexterm zone="ch-system-libxslt libexslt">
+            <primary sortas="c-libexslt">libexslt.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libxslt-lib">
+        <term><filename class="libraryfile">libxslt.so</filename></term>
+        <listitem>
+          <para>
+            provides extensions to the
+            <filename class="libraryfile">libxml2</filename>
+            libraries to parse files that use the XSLT format.
+          </para>
+          <indexterm zone="ch-system-libxslt libxslt-lib">
+            <primary sortas="c-libxslt">libxslt.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/linux-headers.xml LFS-pacman/chapter08/linux-headers.xml
--- LFS_orig/chapter08/linux-headers.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/linux-headers.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-linux-headers" role="wrap">
+  <?dbhtml filename="linux-headers.html"?>
+
+  <sect1info condition="script">
+    <productname>linux-headers</productname>
+    <productnumber>&linux-version;</productnumber>
+    <address>&linux-url;</address>
+  </sect1info>
+
+  <title>Linux-&linux-version; API Headers</title>
+
+  <indexterm zone="ch-system-linux-headers">
+    <primary sortas="a-Linux">Linux</primary>
+    <secondary>tools, API headers</secondary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Linux API Headers (in linux-&linux-version;.tar.xz) expose the
+    kernel's API for use by Glibc.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&linux-headers-fin-sbu;</seg>
+        <seg>&linux-headers-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Linux API Headers</title>
+
+    <para>The Linux kernel needs to expose an Application Programming Interface
+    (API) for the system's C library (Glibc in LFS) to use.  This is done
+    by way of sanitizing various C header files that are shipped in the Linux
+    kernel source tarball.</para>
+
+    <para>Prepare the PKGBUILD for the Linux API headers:</para>
+
+<screen><userinput>mkdir /sources/linux-api-headers
+cd /sources/linux-api-headers
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="linux-api-headers"
+pkgver="&linux-version;"
+pkgrel="1"
+pkgdesc="Linux Kernel Application Programming Interface (API)"
+arch=('any')
+license=('GPLv2')
+groups=('core')
+depends=('rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'findutils'
+             'gcc'
+             'glibc'
+             'grep'
+             'gzip'
+             'make'
+             'perl'
+             'sed')
+source=("&linux-url;")
+md5sums=('&linux-md5;')
+
+prepare(){
+  cd "linux-${pkgver}"
+  make mrproper
+}
+
+build(){
+  cd "linux-${pkgver}"
+  make headers
+  find usr/include -name '.*' -delete
+  rm usr/include/Makefile
+}
+
+package(){
+  cd "linux-${pkgver}"
+  mkdir "${pkgdir}/usr"
+  cp -rv usr/include "${pkgdir}/usr/"
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/linux-api-headers-&linux-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the rootfs package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S linux-api-headers --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/linux-api-headers
+cp PKGBUILD /srv/pacman/source/LFS/linux-api-headers
+cd /sources
+rm -rf linux-api-headers</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-linux-headers" role="content">
+    <title>Contents of Linux API Headers</title>
+
+    <segmentedlist>
+      <segtitle>Installed headers</segtitle>
+      <segtitle>Installed directories</segtitle>
+
+      <seglistitem>
+        <seg>/usr/include/asm/*.h, /usr/include/asm-generic/*.h,
+        /usr/include/drm/*.h, /usr/include/linux/*.h, /usr/include/misc/*.h,
+        /usr/include/mtd/*.h, /usr/include/rdma/*.h, /usr/include/scsi/*.h,
+        /usr/include/sound/*.h, /usr/include/video/*.h,
+        and /usr/include/xen/*.h</seg>
+        <seg>/usr/include/asm, /usr/include/asm-generic, /usr/include/drm,
+        /usr/include/linux, /usr/include/misc, /usr/include/mtd,
+        /usr/include/rdma, /usr/include/scsi, /usr/include/sound,
+        /usr/include/video, and /usr/include/xen</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="asm">
+        <term><filename class="headerfile">/usr/include/asm/*.h</filename></term>
+        <listitem>
+          <para>The Linux API ASM Headers</para>
+          <indexterm zone="ch-tools-linux-headers asm">
+            <primary sortas="e-/usr/include/asm/*.h">/usr/include/asm/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+     <varlistentry id="asm-generic">
+        <term><filename class="headerfile">/usr/include/asm-generic/*.h</filename></term>
+        <listitem>
+          <para>The Linux API ASM Generic Headers</para>
+          <indexterm zone="ch-tools-linux-headers asm-generic">
+            <primary sortas="e-/usr/include/asm-generic/*.h">/usr/include/asm-generic/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="drm">
+        <term><filename class="headerfile">/usr/include/drm/*.h</filename></term>
+        <listitem>
+          <para>The Linux API DRM Headers</para>
+          <indexterm zone="ch-tools-linux-headers drm">
+            <primary sortas="e-/usr/include/drm/*.h">/usr/include/drm/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="linux">
+        <term><filename class="headerfile">/usr/include/linux/*.h</filename></term>
+        <listitem>
+          <para>The Linux API Linux Headers</para>
+          <indexterm zone="ch-tools-linux-headers linux">
+            <primary sortas="e-/usr/include/linux/*.h">/usr/include/linux/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="misc">
+        <term><filename class="headerfile">/usr/include/misc/*.h</filename></term>
+        <listitem>
+          <para>The Linux API Miscellaneous Headers</para>
+          <indexterm zone="ch-tools-linux-headers misc">
+            <primary sortas="e-/usr/include/misc/*.h">/usr/include/misc/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mtd">
+        <term><filename class="headerfile">/usr/include/mtd/*.h</filename></term>
+        <listitem>
+          <para>The Linux API MTD Headers</para>
+          <indexterm zone="ch-tools-linux-headers mtd">
+            <primary sortas="e-/usr/include/mtd/*.h">/usr/include/mtd/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rdma">
+        <term><filename class="headerfile">/usr/include/rdma/*.h</filename></term>
+        <listitem>
+          <para>The Linux API RDMA Headers</para>
+          <indexterm zone="ch-tools-linux-headers rdma">
+            <primary sortas="e-/usr/include/rdma/*.h">/usr/include/rdma/*.h</primary>
+         </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="scsi">
+        <term><filename class="headerfile">/usr/include/scsi/*.h</filename></term>
+        <listitem>
+          <para>The Linux API SCSI Headers</para>
+          <indexterm zone="ch-tools-linux-headers scsi">
+            <primary sortas="e-/usr/include/scsi/*.h">/usr/include/scsi/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="sound">
+        <term><filename class="headerfile">/usr/include/sound/*.h</filename></term>
+        <listitem>
+          <para>The Linux API Sound Headers</para>
+          <indexterm zone="ch-tools-linux-headers sound">
+           <primary sortas="e-/usr/include/sound/*.h">/usr/include/sound/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="video">
+        <term><filename class="headerfile">/usr/include/video/*.h</filename></term>
+        <listitem>
+          <para>The Linux API Video Headers</para>
+          <indexterm zone="ch-tools-linux-headers video">
+            <primary sortas="e-/usr/include/video/*.h">/usr/include/video/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="xen">
+        <term><filename class="headerfile">/usr/include/xen/*.h</filename></term>
+        <listitem>
+          <para>The Linux API Xen Headers</para>
+          <indexterm zone="ch-tools-linux-headers xen">
+            <primary sortas="e-/usr/include/xen/*.h">/usr/include/xen/*.h</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/linux-pam.xml LFS-pacman/chapter08/linux-pam.xml
--- LFS_orig/chapter08/linux-pam.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/linux-pam.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,335 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="linux-pam" xreflabel="Linux-PAM-&linux-pam-version;">
+  <?dbhtml filename="linux-pam.html"?>
+
+  <sect1info condition="script">
+    <productname>linux-pam</productname>
+    <productnumber>&linux-pam-version;</productnumber>
+    <address>&linux-pam-url;</address>
+  </sect1info>
+
+  <title>Linux-PAM-&linux-pam-version;</title>
+
+  <indexterm zone="linux-pam">
+    <primary sortas="a-Linux-PAM">Linux-PAM</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to Linux PAM</title>
+
+    <para>
+      The <application>Linux PAM</application> package contains
+      Pluggable Authentication Modules used to enable the local
+      system administrator to choose how applications authenticate
+      users.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&linux-pam-fin-sbu;</seg>
+        <seg>&linux-pam-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Linux PAM</title>
+
+    <para>Create the PKGBUILD for the Linux PAM package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/linux-pam
+cd /sources/linux-pam
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="linux-pam"
+pkgver="&linux-pam-version;"
+pkgrel="1"
+pkgdesc="The Linux PAM package contains Pluggable Authentication Modules used to enable the local system administrator to choose how applications authenticate users."
+arch=('i686' 'x86'
+      'x86_64')
+url="http://www.gnu.org/software/${pkgname}/"
+license=('GPL')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gettext'
+             'gcc'
+             'glibc'
+             'grep'
+             'libnsl'
+             'libtirpc'
+             'sed'
+             'shadow')
+# $(pacman -Q db &gt;/dev/null 2&gt;&amp;1 &amp;&amp; echo 'db')
+depends=('db'
+         'glibc'
+         'libnsl'
+         'libtirpc'
+         'shadow')
+# optdepends=$(pacman -Q db &gt;/dev/null 2&gt;&amp;1 || echo 'db: Use Berkely DB for backend')
+source=("https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/Linux-PAM-${pkgver}.tar.xz"
+        "https://github.com/${pkgname}/${pkgname}/releases/download/v${pkgver}/Linux-PAM-${pkgver}-docs.tar.xz")
+md5sums=('&linux-pam-md5;'
+         '&linux-pam-docs-md5;')
+noextract=("Linux-PAM-${pkgver}-docs.tar.xz")
+backup=('etc/pam.d/system-account'
+        'etc/pam.d/system-auth'
+        'etc/pam.d/system-session'
+        'etc/pam.d/system-password'
+        'etc/pam.d/other')
+
+prepare(){
+  cd "Linux-PAM-${pkgver}"
+  tar -xf "../Linux-PAM-${pkgver}-docs.tar.xz" --strip-components=1
+}
+
+build(){
+  cd "Linux-PAM-${pkgver}"
+  ./configure --prefix=/usr                    \
+              --sbindir=/usr/sbin              \
+              --sysconfdir=/etc                \
+              --libdir=/usr/lib                \
+              --enable-securedir=/usr/lib/security \
+              --docdir="/usr/share/doc/Linux-PAM-${pkgver}"
+  make
+}
+
+package(){
+  cd "Linux-PAM-${pkgver}"
+  make DESTDIR="${pkgdir}" install
+# Remove systemd specific files
+  rm -rf "${pkgdir}/usr/lib/systemd"
+  chmod -v 4755 "${pkgdir}/usr/sbin/unix_chkpwd"
+
+# /etc/pam.d files
+  install -vdm755 "${pkgdir}/etc/pam.d"
+  cat &gt; "${pkgdir}/etc/pam.d/system-account" &lt;&lt; "EOF"
+# Begin /etc/pam.d/system-account
+
+account   required    pam_unix.so
+
+# End /etc/pam.d/system-account
+EOF
+
+  cat &gt; "${pkgdir}/etc/pam.d/system-auth" &lt;&lt; "EOF"
+# Begin /etc/pam.d/system-auth
+
+auth      required    pam_unix.so
+auth      optional    pam_cap.so
+
+# End /etc/pam.d/system-auth
+EOF
+
+  cat &gt; "${pkgdir}/etc/pam.d/system-session" &lt;&lt; "EOF"
+# Begin /etc/pam.d/system-session
+
+session   required    pam_unix.so
+
+# End /etc/pam.d/system-session
+EOF
+
+  cat &gt; "${pkgdir}/etc/pam.d/system-password" &lt;&lt; "EOF"
+# Begin /etc/pam.d/system-password
+
+# use sha512 hash for encryption, use shadow, and use any previously
+# defined authentication token (chosen password) set by prior module
+password  required    pam_unix.so       sha512 shadow try_first_pass
+
+# End /etc/pam.d/system-password
+EOF
+
+  cat &gt; "${pkgdir}/etc/pam.d/other" &lt;&lt; "EOF"
+# Begin /etc/pam.d/other
+
+auth        required        pam_warn.so
+auth        required        pam_deny.so
+account     required        pam_warn.so
+account     required        pam_deny.so
+password    required        pam_warn.so
+password    required        pam_deny.so
+session     required        pam_warn.so
+session     required        pam_deny.so
+
+# End /etc/pam.d/other
+EOF
+}</literal>
+REALEOF</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          faillock, mkhomedir_helper, pam_namespace_helper,
+          pam_timestamp_check, pwhistory_helper, unix_chkpwd and
+          unix_update
+        </seg>
+        <seg>
+          libpam.so, libpamc.so and libpam_misc.so
+        </seg>
+        <seg>
+          /etc/security,
+          /usr/lib/security,
+          /usr/include/security and
+          /usr/share/doc/Linux-PAM-&linux-pam-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="faillock">
+        <term><command>faillock</command></term>
+        <listitem>
+          <para>
+            displays and modifies the authentication failure record files
+          </para>
+          <indexterm zone="linux-pam faillock">
+            <primary sortas="b-faillock">faillock</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="mkhomedir_helper">
+        <term><command>mkhomedir_helper</command></term>
+        <listitem>
+          <para>
+            is a helper binary that creates home directories
+          </para>
+          <indexterm zone="linux-pam mkhomedir_helper">
+            <primary sortas="b-mkhomedir_helper">mkhomedir_helper</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pam_namespace_helper">
+        <term><command>pam_namespace_helper</command></term>
+        <listitem>
+          <para>
+            is a helper program used to configure a private namespace for a
+            user session
+          </para>
+          <indexterm zone="linux-pam pam_namespace_helper">
+            <primary sortas="b-pam_namespace_helper">pam_namespace_helper</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pwhistory_helper">
+        <term><command>pwhistory_helper</command></term>
+        <listitem>
+          <para>
+            is a helper program that transfers password hashes from passwd or
+            shadow to opasswd
+          </para>
+          <indexterm zone="linux-pam pwhistory_helper">
+            <primary sortas="b-pwhistory_helper">pwhistory_helper</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+<!-- Removed with the removal of the pam_tally{,2} module
+      <varlistentry id="pam_tally">
+        <term><command>pam_tally</command></term>
+        <listitem>
+          <para>
+            is used to interrogate and manipulate the login counter file.
+          </para>
+          <indexterm zone="linux-pam pam_tally">
+            <primary sortas="b-pam_tally">pam_tally</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pam_tally2">
+        <term><command>pam_tally2</command></term>
+        <listitem>
+          <para>
+            is used to interrogate and manipulate the login counter file, but
+            does not have some limitations that <command>pam_tally</command>
+            does.
+          </para>
+          <indexterm zone="linux-pam pam_tally2">
+            <primary sortas="b-pam_tally2">pam_tally2</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+-->
+
+      <varlistentry id="pam_timestamp_check">
+        <term><command>pam_timestamp_check</command></term>
+        <listitem>
+          <para>
+            is used to check if the default timestamp is valid
+          </para>
+          <indexterm zone="linux-pam pam_timestamp_check">
+            <primary sortas="b-pam_timestamp_check">pam_timestamp_check</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="unix_chkpwd">
+        <term><command>unix_chkpwd</command></term>
+        <listitem>
+          <para>
+            is a helper binary that verifies the password of the current user
+          </para>
+          <indexterm zone="linux-pam unix_chkpwd">
+            <primary sortas="b-unix_chkpwd">unix_chkpwd</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="unix_update">
+        <term><command>unix_update</command></term>
+        <listitem>
+          <para>
+            is a helper binary that updates the password of a given user
+          </para>
+          <indexterm zone="linux-pam unix_update">
+            <primary sortas="b-unix_update">unix_update</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libpam">
+        <term><filename class="libraryfile">libpam.so</filename></term>
+        <listitem>
+          <para>
+            provides the interfaces between applications and the
+            PAM modules
+          </para>
+          <indexterm zone="linux-pam libpam">
+            <primary sortas="c-libpam">libpam.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/lzo.xml LFS-pacman/chapter08/lzo.xml
--- LFS_orig/chapter08/lzo.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/lzo.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,122 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-lzo" role="wrap">
+  <?dbhtml filename="lzo.html"?>
+
+  <sect1info condition="script">
+    <productname>lzo</productname>
+    <productnumber>&lzo-version;</productnumber>
+    <address>&lzo-url;</address>
+  </sect1info>
+
+  <title>Lzo-&lzo-version;</title>
+
+  <indexterm zone="ch-system-lzo">
+    <primary sortas="a-Lzo">Lzo</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      <application>LZO</application> is a data compression
+      library which is suitable for data decompression and compression in
+      real-time. This means it favors speed over compression ratio.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&lzo-fin-sbu;</seg>
+        <seg>&lzo-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of LZO</title>
+
+    <para>
+      Configure <application>LZO</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr                    \
+            --enable-shared                  \
+            --disable-static                 \
+            --docdir=/usr/share/doc/lzo-&lzo-version;</userinput></screen>
+
+    <para>
+      Build <application>LZO</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      To test the results, issue:
+    </para>
+
+<screen><userinput remap="test">make check</userinput></screen>
+
+    <para>
+      Install <application>LZO</application> by running the
+      following commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          None
+        </seg>
+        <seg>
+          liblzo2.so
+        </seg>
+        <seg>
+          /usr/include/lzo and
+          /usr/share/doc/lzo
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+    <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="liblzo2">
+        <term><filename class='libraryfile'>liblzo2.so</filename></term>
+        <listitem>
+          <para>
+            is a data compression and decompression library.
+          </para>
+          <indexterm zone="ch-system-lzo liblzo2">
+            <primary sortas="c-liblzo2">liblzo2.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/m4.xml LFS-pacman/chapter08/m4.xml
--- LFS_orig/chapter08/m4.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/m4.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,29 +37,74 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of M4</title>
-<!--
-    <para>First, make some fixes required by glibc-2.28 and later:</para>
-
-<screen><userinput remap="pre">sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
-echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h</userinput></screen>
--->
-    <para>Prepare M4 for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+    
+    <para>Create the PKGBUILD for the M4 package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/m4
+cd /sources/m4
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="m4"
+pkgver="&m4-version;"
+pkgrel="1"
+pkgdesc="The M4 package contains a macro processor."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('bash'
+         'glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('diffutils')
+optdepends=('libsigsegv')
+source=('&m4-url;')
+md5sums=('&m4-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/m4-&m4-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the zlib package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S m4 --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/m4
+cp PKGBUILD /srv/pacman/source/LFS/m4
+cd /sources
+rm -rf m4</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/make-ca.xml LFS-pacman/chapter08/make-ca.xml
--- LFS_orig/chapter08/make-ca.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/make-ca.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,235 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-make-ca" role="wrap">
+  <?dbhtml filename="make-ca.html"?>
+
+  <sect1info condition="script">
+    <productname>make-ca</productname>
+    <productnumber>&make-ca-version;</productnumber>
+    <address>&make-ca-url;</address>
+  </sect1info>
+
+  <title>Make-ca-&make-ca-version;</title>
+
+  <indexterm zone="ch-system-make-ca">
+    <primary sortas="a-Make-ca">Make-ca</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to make-ca</title>
+
+    <para>
+      Public Key Infrastructure (PKI) is a method to validate the authenticity
+      of an otherwise unknown entity across untrusted networks. PKI works by
+      establishing a chain of trust, rather than trusting each individual host
+      or entity explicitly. In order for a certificate presented by a remote
+      entity to be trusted, that certificate must present a complete chain of
+      certificates that can be validated using the root certificate of a
+      Certificate Authority (CA) that is trusted by the local machine.
+    </para>
+
+    <para>
+      Establishing trust with a CA involves validating things like company
+      address, ownership, contact information, etc., and ensuring that the CA
+      has followed best practices, such as undergoing periodic security audits
+      by independent investigators and maintaining an always available
+      certificate revocation list. This is well outside the scope of BLFS (as
+      it is for most Linux distributions). The certificate store provided here
+      is taken from the Mozilla Foundation, who have established very strict
+      inclusion policies described <ulink
+        url="https://www.mozilla.org/en-US/about/governance/policies/security-group/certs/">here</ulink>.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&make-ca-fin-sbu;</seg>
+        <seg>&make-ca-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of make-ca</title>
+
+    <para>
+      The <application>make-ca</application> script will download and process
+      the certificates included in the <filename>certdata.txt</filename> file
+      for use as trust anchors for the p11-kit trust module.
+      Additionally, it will generate system certificate stores used by BLFS
+      applications (if the recommended and optional applications are present
+      on the system). Any local certificates stored in
+      <filename>/etc/ssl/local</filename> will be imported to both the trust
+      anchors and the generated certificate stores (overriding Mozilla's
+      trust). Additionally, any modified trust values will be copied from the
+      trust anchors to <filename>/etc/ssl/local</filename> prior to any
+      updates, preserving custom trust values that differ from Mozilla when
+      using the <command>trust</command> utility from
+      <application>p11-kit</application> to operate on the trust store.
+    </para>
+
+    <para>
+      To install the various certificate stores, first install the
+      <application>make-ca</application> script into the correct location.
+      As the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen><userinput remap="install">make install
+install -vdm755 /etc/ssl/local</userinput></screen>
+
+    <note>
+      <para>
+        If running the script a second time with the same version of
+        <filename>certdata.txt</filename>, for instance, to add additional
+        stores as the requisite software is installed, add the
+        <parameter>-r</parameter> switch to the command line. If packaging,
+        run <command>make-ca --help</command> to see all available command
+        line options.
+      </para>
+    </note>
+
+<screen><userinput remap="install">/usr/sbin/make-ca -g</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="configuration" id="make-ca-config">
+    <title>Configuring make-ca</title>
+
+    <para>
+      For most users, no additional configuration is necessary, however,
+      the default <filename>certdata.txt</filename> file provided by make-ca
+      is obtained from the mozilla-release branch, and is modified to provide a
+      Mercurial revision. This will be the correct version for most systems.
+      There are several other variants of the file available for use that might
+      be preferred for one reason or another, including the files shipped with
+      Mozilla products in this book. RedHat and OpenSUSE, for instance, use the
+      version included in nss. Additional upstream downloads
+      are available at the links included in
+      <filename>/etc/make-ca.conf.dist</filename>. Simply copy the file to
+      <filename>/etc/make-ca.conf</filename> and edit as appropriate.
+    </para>
+
+    <indexterm zone="ch-system-make-ca make-ca-config">
+      <primary sortas="e-etc-make-ca-conf">/etc/make-ca.conf</primary>
+    </indexterm>
+
+    <bridgehead renderas="sect3">About Trust Arguments</bridgehead>
+
+    <para>
+      There are three trust types that are recognized by the
+      <application>make-ca</application> script, SSL/TLS, S/Mime, and code
+      signing. For <application>OpenSSL</application>, these are
+      <parameter>serverAuth</parameter>,
+      <parameter>emailProtection</parameter>, and
+      <parameter>codeSigning</parameter> respectively. If one of the three
+      trust arguments is omitted, the certificate is neither trusted, nor
+      rejected for that role. Clients that use
+      <application>OpenSSL</application> or <application>NSS</application>
+      encountering this certificate will present a warning to the user.
+      Clients using
+      <application>GnuTLS</application> without
+      <application>p11-kit</application> support are not aware of trusted
+      certificates. To include this CA into the
+      <filename>ca-bundle.crt</filename>,
+      <filename>email-ca-bundle.crt</filename>, or
+      <filename>objsign-ca-bundle.crt</filename> files
+      (the <application>GnuTLS</application> legacy bundles), it must have the
+      appropriate trust arguments.
+    </para>
+
+    <bridgehead renderas="sect3">Adding Additional CA Certificates</bridgehead>
+
+    <para>
+      The <filename class="directory">/etc/ssl/local</filename> directory
+      is available to add additional CA certificates to the system. For
+      instance, you might need to add an organization or government CA
+      certificate. Files in this directory must be in the
+      <application>OpenSSL</application> trusted certificate format. To
+      create an <application>OpenSSL</application> trusted certificate from
+      a regular PEM encoded file, you need to add trust arguments to the
+      <command>openssl</command> command, and create a new certificate. For
+      example, using the <ulink url="http://www.cacert.org/">CAcert</ulink>
+      roots, if you want to trust both for all three roles, the following
+      commands will create appropriate OpenSSL trusted certificates (run as
+      the <systemitem class="username">root</systemitem> user after
+      wget is installed):
+    </para>
+
+<screen role="nodump"><userinput>wget http://www.cacert.org/certs/root.crt &amp;&amp;
+wget http://www.cacert.org/certs/class3.crt &amp;&amp;
+openssl x509 -in root.crt -text -fingerprint -setalias "CAcert Class 1 root" \
+        -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
+        > /etc/ssl/local/CAcert_Class_1_root.pem &amp;&amp;
+openssl x509 -in class3.crt -text -fingerprint -setalias "CAcert Class 3 root" \
+        -addtrust serverAuth -addtrust emailProtection -addtrust codeSigning \
+        > /etc/ssl/local/CAcert_Class_3_root.pem &amp;&amp;
+/usr/sbin/make-ca -r -f</userinput></screen>
+
+    <bridgehead renderas="sect3">Overriding Mozilla Trust</bridgehead>
+
+    <para>
+      Occasionally, there may be instances where you don't agree with
+      Mozilla's inclusion of a particular certificate authority. If you'd like
+      to override the default trust of a particular CA, simply create a copy of
+      the existing certificate in <filename
+      class="directory">/etc/ssl/local</filename> with different trust
+      arguments. For example, if you'd like to distrust the
+      "Makebelieve_CA_Root" file, run the following commands:
+    </para>
+
+<screen role="nodump"><userinput>openssl x509 -in /etc/ssl/certs/Makebelieve_CA_Root.pem \
+             -text \
+             -fingerprint \
+             -setalias "Disabled Makebelieve CA Root" \
+             -addreject serverAuth \
+             -addreject emailProtection \
+             -addreject codeSigning \
+       > /etc/ssl/local/Disabled_Makebelieve_CA_Root.pem &amp;&amp;
+/usr/sbin/make-ca -r -f</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>make-ca</seg>
+        <seg>/etc/ssl/{certs,local} and
+        /etc/pki/{nssdb,anchors,tls/{certs,java}}</seg>
+      </seglistitem>
+    </segmentedlist>
+
+   <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="make-ca-bin">
+        <term><command>make-ca</command></term>
+        <listitem>
+          <para>
+            is a shell script that adapts a current version of
+            <filename>certdata.txt</filename>, and prepares it for use
+            as the system trust store.
+          </para>
+          <indexterm zone="ch-system-make-ca make-ca-bin">
+            <primary sortas="b-make-ca">make-ca</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+   </variablelist>
+
+  </sect2>
+</sect1>
diff -Naurp LFS_orig/chapter08/make.xml LFS-pacman/chapter08/make.xml
--- LFS_orig/chapter08/make.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/make.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,32 +38,79 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Make</title>
-<!--
-    <para>Again, work around an error caused by glibc-2.27 and later:</para>
 
-<screen><userinput remap="pre">sed -i '211,217 d; 219,229 d; 232 d' glob/glob.c</userinput></screen>
--->
-    <para>Prepare Make for compilation:</para>
+    <para>Create the PKGBUILD for the Make package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/make
+cd /sources/make
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="make"
+pkgver="&make-version;"
+pkgrel="1"
+pkgdesc="The Make package contains a program for controlling the generation of executables and other non-source files of a package from source files."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('perl'
+              'procps-ng')
+optdepends=('guile')
+source=('&make-url;')
+md5sums=('&make-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/make-&make-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Make package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S make --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/make
+cp PKGBUILD /srv/pacman/source/LFS/make
+cd /sources
+rm -rf make</userinput></screen>
 
   </sect2>
 
-
   <sect2 id="contents-make" role="content">
     <title>Contents of Make</title>
 
diff -Naurp LFS_orig/chapter08/man-db.xml LFS-pacman/chapter08/man-db.xml
--- LFS_orig/chapter08/man-db.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/man-db.xml	2022-06-16 20:05:13.901189092 -0500
@@ -38,30 +38,137 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Man-DB</title>
 
-    <para>Prepare Man-DB for compilation:</para>
+    <para>Create the PKGBUILD for the Man-DB package with the following
+    commands:</para>
 
-<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr                         \
-            --docdir=/usr/share/doc/man-db-&man-db-version; \
-            --sysconfdir=/etc                     \
-            --disable-setuid                      \
-            --enable-cache-owner=bin              \
-            --with-browser=/usr/bin/lynx          \
-            --with-vgrind=/usr/bin/vgrind         \
-            --with-grap=/usr/bin/grap</userinput></screen>
-
-<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr                         \
-            --docdir=/usr/share/doc/man-db-&man-db-version; \
-            --sysconfdir=/etc                     \
-            --disable-setuid                      \
-            --enable-cache-owner=bin              \
-            --with-browser=/usr/bin/lynx          \
-            --with-vgrind=/usr/bin/vgrind         \
-            --with-grap=/usr/bin/grap             \
-            --with-systemdtmpfilesdir=            \
-            --with-systemdsystemunitdir=</userinput></screen>
+<screen revision="sysv"><userinput>mkdir /sources/man-db
+cd /sources/man-db
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="man-db"
+pkgver="&man-db-version;"
+pkgrel="1"
+pkgdesc="The Man-DB package contains programs for finding and viewing man pages."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2.1')
+groups=('core')
+depends=('bash'
+         'gdbm'
+         'groff'
+         'glibc'
+         'gzip'
+         'less'
+         'libpipeline'
+         'zlib'
+         'rootfs')
+makedepends=('binutils'
+             'bzip2'
+             'coreutils'
+             'flex'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'xz')
+checkdepends=('util-linux')
+optdepends=('libseccomp')
+source=('&man-db-url;')
+md5sums=('&man-db-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr                        \
+              --docdir=/usr/share/doc/man-db-${pkgver} \
+              --sysconfdir=/etc                    \
+              --disable-setuid                     \
+              --enable-cache-owner=bin             \
+              --with-browser=/usr/bin/lynx         \
+              --with-vgrind=/usr/bin/vgrind        \
+              --with-grap=/usr/bin/grap            \
+              --with-systemdtmpfilesdir=           \
+              --with-systemdsystemunitdir=
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+<screen revision="systemd"><userinput>mkdir /sources/man-db
+cd /sources/man-db
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="man-db"
+pkgver="&man-db-version;"
+pkgrel="1"
+pkgdesc="The Man-DB package contains programs for finding and viewing man pages."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2.1')
+groups=('core')
+depends=('bash'
+         'gdbm'
+         'groff'
+         'glibc'
+         'gzip'
+         'less'
+         'libpipeline'
+         'zlib'
+         'rootfs')
+makedepends=('binutils'
+             'bzip2'
+             'coreutils'
+             'flex'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'xz')
+checkdepends=('util-linux')
+optdepends=('libseccomp')
+source=('&man-db-url;')
+md5sums=('&man-db-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr                        \
+              --docdir=/usr/share/doc/man-db-${pkgver} \
+              --sysconfdir=/etc                    \
+              --disable-setuid                     \
+              --enable-cache-owner=bin             \
+              --with-browser=/usr/bin/lynx         \
+              --with-vgrind=/usr/bin/vgrind        \
+              --with-grap=/usr/bin/grap
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -107,17 +214,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/man-db-&man-db-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-   <para>To test the results, issue:</para>
+    <para>Update the local cache and install the Man-DB package:</para>
 
-<screen><userinput remap="test">make check</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S man-db --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/man-db
+cp PKGBUILD /srv/pacman/source/LFS/man-db
+cd /sources
+rm -rf man-db</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/man-pages.xml LFS-pacman/chapter08/man-pages.xml
--- LFS_orig/chapter08/man-pages.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/man-pages.xml	2022-06-16 20:05:13.901189092 -0500
@@ -37,12 +37,54 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Man-pages</title>
 
-    <para>Install Man-pages by running:</para>
+    <para>Prepare the PKGBUILD with the following commands:</para>
 
-<screen><userinput remap="install">make prefix=/usr install</userinput></screen>
+<screen><userinput>mkdir /sources/man-pages
+cd /sources/man-pages
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="man-pages"
+pkgver="&man-pages-version;"
+pkgrel="1"
+pkgdesc="The Man-pages package contains over 2,200 man pages."
+arch=('any')
+license=('custom')
+groups=('core')
+makedepends=('bash'
+             'coreutils'
+             'make')
+source=('&man-pages-url;')
+md5sums=('&man-pages-md5;')
+
+package(){
+  cd ${pkgname}-${pkgver}
+  mkdir -pv ${pkgdir}/usr/share/man/man{1..8}
+  make -j1 DESTDIR=${pkgdir} prefix=/usr install
+  chown -R root:root ${pkgdir}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/man-pages-&man-pages-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the man-pages package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S man-pages --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/man-pages
+cp PKGBUILD /srv/pacman/source/LFS/man-pages
+cd /sources
+rm -rf man-pages</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/meson.xml LFS-pacman/chapter08/meson.xml
--- LFS_orig/chapter08/meson.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/meson.xml	2022-06-16 20:05:13.904522425 -0500
@@ -35,55 +35,63 @@
       </seglistitem>
     </segmentedlist>
 
-    <tip revision="sysv">
-      <para>This section is not strictly required for LFS if not using
-      systemd. On the other hand, meson/ninja is a powerful build system,
-      which is expected to be used more and more often. It is required for
-      several packages in <ulink url="&blfs-book;">the BLFS
-      book</ulink>.</para>
-    </tip>
-
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Meson</title>
-<!--
-    <para>First, apply a patch that fixes an issue identified upstream:</para>
 
-<screen><userinput remap="pre">patch -Np1 -i ../&meson-fix-patch;</userinput></screen>
--->
-    <para>Compile Meson with the following command:</para>
-
-<screen><userinput remap="make">pip3 wheel -w dist --no-build-isolation --no-deps $PWD</userinput></screen>
-
-    <para>The test suite requires some packages out of the scope of LFS.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">pip3 install --no-index --find-links dist meson
-install -vDm644 data/shell-completions/bash/meson /usr/share/bash-completion/completions/meson
-install -vDm644 data/shell-completions/zsh/_meson /usr/share/zsh/site-functions/_meson</userinput></screen>
-
-    <variablelist>
-      <title>The meaning of the install parameters:</title>
-
-      <varlistentry>
-        <term><parameter>-w dist</parameter></term>
-        <listitem>
-           <para>Put the created wheels into the
-           <filename class='directory'>dist</filename> directory.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>--find-links dist</parameter></term>
-        <listitem>
-           <para>Install wheels from the
-           <filename class='directory'>dist</filename> directory.</para>
-        </listitem>
-      </varlistentry>
+    <para>Create the PKGBUILD for the Meson package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/meson
+cd /sources/meson
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="meson"
+pkgver="&meson-version;"
+pkgrel="1"
+pkgdesc="Meson is an open source build system meant to be both extremely fast and as user friendly as possible."
+arch=('any')
+license=('Apachev2')
+groups=('core')
+depends=('python'
+         'rootfs')
+makedepends=('ninja')
+source=('&meson-url;')
+md5sums=('&meson-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  python3 setup.py build
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  python3 setup.py install --root="${pkgdir}" --optimize=1 --skip-build
+  install -vDm644 data/shell-completions/bash/meson ${pkgdir}/usr/share/bash-completion/completions/meson
+  install -vDm644 data/shell-completions/zsh/_meson ${pkgdir}/usr/share/zsh/site-functions/_meson
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/meson-&meson-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Meson package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S meson --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/meson
+cp PKGBUILD /srv/pacman/source/LFS/meson
+cd /sources
+rm -rf meson</userinput></screen>
 
-    </variablelist>
   </sect2>
 
   <sect2 id="contents-meson" role="content">
diff -Naurp LFS_orig/chapter08/mpc.xml LFS-pacman/chapter08/mpc.xml
--- LFS_orig/chapter08/mpc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/mpc.xml	2022-06-16 20:05:13.907855759 -0500
@@ -39,32 +39,83 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of MPC</title>
 
-    <para>Prepare MPC for compilation:</para>
+    <para>Create the PKGBUILD for the MPC package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --disable-static \
-            --docdir=/usr/share/doc/mpc-&mpc-version;</userinput></screen>
-
-    <para>Compile the package and generate the HTML documentation:</para>
-
-<screen><userinput remap="make">make
-make html</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package and its documentation:</para>
-
-<screen><userinput remap="install">make install
-make install-html</userinput></screen>
+<screen><userinput>mkdir /sources/mpc
+cd /sources/mpc
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="mpc"
+pkgver="&mpc-version;"
+pkgrel="1"
+pkgdesc="The MPC package contains a math library for arbitrarily high precision with proper rounding."
+arch=('x86'
+      'x86_64')
+license=('LGPLv3')
+groups=('core')
+depends=('glibc'
+         'gmp'
+         'mpfr'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+source=('&mpc-url;')
+md5sums=('&mpc-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --docdir=/usr/share/doc/mpc-${pkgver}
+  make
+  make html
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  make DESTDIR=${pkgdir} install-html
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/mpc-&mpc-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the MPC package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S mpc --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/mpc
+cp PKGBUILD /srv/pacman/source/LFS/mpc
+cd /sources
+rm -rf mpc</userinput></screen>
 
   </sect2>
 
-
   <sect2 id="contents-mpc" role="content">
     <title>Contents of MPC</title>
 
diff -Naurp LFS_orig/chapter08/mpfr.xml LFS-pacman/chapter08/mpfr.xml
--- LFS_orig/chapter08/mpfr.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/mpfr.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,38 +38,84 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of MPFR</title>
 
-    <para>Prepare MPFR for compilation:</para>
+    <para>Create the PKGBUILD for the MPFR package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr        \
-            --disable-static     \
-            --enable-thread-safe \
-            --docdir=/usr/share/doc/mpfr-&mpfr-version;</userinput></screen>
-
-    <para>Compile the package and generate the HTML documentation:</para>
-
-<screen><userinput remap="make">make
-make html</userinput></screen>
-
-    <important>
-      <para>The test suite for MPFR in this section is considered critical.
-      Do not skip it under any circumstances.</para>
-    </important>
-
-    <para>Test the results and ensure that all tests passed:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package and its documentation:</para>
-
-<screen><userinput remap="install">make install
-make install-html</userinput></screen>
+<screen><userinput>mkdir /sources/mpfr
+cd /sources/mpfr
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="mpfr"
+pkgver="&mpfr-version;"
+pkgrel="1"
+pkgdesc="The MPFR package contains functions for multiple precision math."
+arch=('x86'
+      'x86_64')
+license=('GPLv3'
+         'LGPLv3')
+groups=('core')
+depends=('glibc'
+         'gmp'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+source=('&mpfr-url;')
+md5sums=('&mpfr-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr        \
+              --disable-static     \
+              --enable-thread-safe \
+              --docdir=/usr/share/doc/mpfr-${pkgver}
+  make
+  make html
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  make DESTDIR=${pkgdir} install-html
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/mpfr-&mpfr-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the MPFR package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S mpfr --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/mpfr
+cp PKGBUILD /srv/pacman/source/LFS/mpfr
+cd /sources
+rm -rf mpfr</userinput></screen>
 
   </sect2>
 
-
   <sect2 id="contents-mpfr" role="content">
     <title>Contents of MPFR</title>
 
diff -Naurp LFS_orig/chapter08/ncurses.xml LFS-pacman/chapter08/ncurses.xml
--- LFS_orig/chapter08/ncurses.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/ncurses.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,19 +38,89 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Ncurses</title>
 
-    <para>Prepare Ncurses for compilation:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr           \
-            --mandir=/usr/share/man \
-            --with-shared           \
-            --without-debug         \
-            --without-normal        \
-            --enable-pc-files       \
-            --enable-widec          \
-            --with-pkg-config-libdir=/usr/lib/pkgconfig</userinput></screen>
+    <para>Create the PKGBUILD for the Ncurses package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/ncurses
+cd /sources/ncurses
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="ncurses"
+pkgver="&ncurses-version;"
+pkgrel="1"
+pkgdesc="The Ncurses package contains libraries for terminal-independent handling of character screens."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'patch'
+             'sed')
+source=('&ncurses-url;')
+md5sums=('&ncurses-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr           \
+              --mandir=/usr/share/man \
+              --with-shared           \
+              --without-debug         \
+              --without-normal        \
+              --enable-pc-files       \
+              --enable-widec          \
+              --with-pkg-config-libdir=/usr/lib/pkgconfig
+  make
+}
+
+package(){
+  make DESTDIR=${pkgdir} install
+
+  # Not strictly necessary, but remove static archives
+  rm -v  ${pkgdir}/usr/lib/{libncursesw.so.${pkgver},libncurses++w.a}
+
+  # Create compatibility symlinks for non-wide ncurses
+  for lib in ncurses form panel menu ; do
+      rm -vf                    ${pkgdir}/usr/lib/lib${lib}.so
+      echo "INPUT(-l${lib}w)" > ${pkgdir}/usr/lib/lib${lib}.so
+      ln -sfv ${lib}w.pc        ${pkgdir}/usr/lib/pkgconfig/${lib}.pc
+  done
+
+  # Same thing for curses intead of ncurses
+  rm -vf                     ${pkgdir}/usr/lib/libcursesw.so
+  echo "INPUT(-lncursesw)" > ${pkgdir}/usr/lib/libcursesw.so
+  ln -sfv libncurses.so      ${pkgdir}/usr/lib/libcurses.so
+
+  # install documentation
+  mkdir -v       ${pkgdir}/usr/share/doc/ncurses-${pkgver}
+  cp -v -R doc/* ${pkgdir}/usr/share/doc/ncurses-${pkgver}
+
+  # Build/install the version 5 compatible library for old binaries
+  make distclean
+  ./configure --prefix=/usr    \
+              --with-shared    \
+              --without-normal \
+              --without-debug  \
+              --without-cxx-binding \
+              --with-abi-version=5 
+  make sources libs
+  cp -av lib/lib*.so.5* ${pkgdir}/usr/lib
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>
@@ -87,77 +157,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/ncurses-&ncurses-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Ncurses package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S ncurses --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="make">make</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-    <para>This package has a test suite, but it can only be run after the
-    package has been installed.  The tests reside in the
-    <filename class="directory">test/</filename> directory.  See the
-    <filename>README</filename> file in that directory for further details.
-    </para>
-
-    <!-- To editors: crash of shell process was very rare but really
-         observed.  We can't simply remove /usr/lib/libncursesw.so.6.x like 
-         how we handle libmozjs-xx.so in BLFS because bash needs it, and
-         make will spawn new shell processes during "make install".  -->
-
-    <para>The installation of this package will overwrite
-    <filename class="libraryfile">libncursesw.so.&ncurses-version;</filename>
-    in-place.  It may crash the shell process which is using code and data
-    from the library file.  Install the package with
-    <literal>DESTDIR</literal>, and replace the library file correctly using
-    <command>install</command> command.  A useless static archive which is
-    not handled by <command>configure</command> is also removed:</para>
-
-<screen><userinput remap="install">make DESTDIR=$PWD/dest install
-install -vm755 dest/usr/lib/libncursesw.so.&ncurses-version; /usr/lib
-rm -v  dest/usr/lib/{libncursesw.so.&ncurses-version;,libncurses++w.a}
-cp -av dest/* /</userinput></screen>
-
-    <para>Many applications still expect the linker to be able to find
-    non-wide-character Ncurses libraries. Trick such applications into linking with
-    wide-character libraries by means of symlinks and linker scripts:</para>
-
-<screen><userinput remap="install">for lib in ncurses form panel menu ; do
-    rm -vf                    /usr/lib/lib${lib}.so
-    echo "INPUT(-l${lib}w)" &gt; /usr/lib/lib${lib}.so
-    ln -sfv ${lib}w.pc        /usr/lib/pkgconfig/${lib}.pc
-done</userinput></screen>
-
-    <para>Finally, make sure that old applications that look for
-    <filename class="libraryfile">-lcurses</filename> at build time are still
-    buildable:</para>
-
-<screen><userinput remap="install">rm -vf                     /usr/lib/libcursesw.so
-echo "INPUT(-lncursesw)" &gt; /usr/lib/libcursesw.so
-ln -sfv libncurses.so      /usr/lib/libcurses.so</userinput></screen>
-
-    <para>If desired, install the Ncurses documentation:</para>
-
-<screen><userinput remap="install">mkdir -pv      /usr/share/doc/ncurses-&ncurses-version;
-cp -v -R doc/* /usr/share/doc/ncurses-&ncurses-version;</userinput></screen>
-
-    <note>
-
-      <para>The instructions above don't create non-wide-character Ncurses
-      libraries since no package installed by compiling from sources would link
-      against them at runtime. However, the only known binary-only
-      applications that link against non-wide-character Ncurses libraries
-      require version 5.  If you must have such libraries because of some binary-only
-      application or to be compliant with LSB, build the package again with the
-      following commands:</para>
-
-<screen role="nodump"><userinput>make distclean
-./configure --prefix=/usr    \
-            --with-shared    \
-            --without-normal \
-            --without-debug  \
-            --without-cxx-binding \
-            --with-abi-version=5
-make sources libs
-cp -av lib/lib*.so.5* /usr/lib</userinput></screen>
-    </note>
+<screen><userinput>mkdir /srv/pacman/source/LFS/ncurses
+cp PKGBUILD /srv/pacman/source/LFS/ncurses
+cd /sources
+rm -rf ncurses</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/nettle.xml LFS-pacman/chapter08/nettle.xml
--- LFS_orig/chapter08/nettle.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/nettle.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-nettle" role="wrap">
+  <?dbhtml filename="nettle.html"?>
+
+  <sect1info condition="script">
+    <productname>nettle</productname>
+    <productnumber>&nettle-version;</productnumber>
+    <address>&nettle-url;</address>
+  </sect1info>
+
+  <title>Nettle-&nettle-version;</title>
+
+  <indexterm zone="ch-system-nettle">
+    <primary sortas="a-Nettle">Nettle</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to Nettle</title>
+
+    <para>
+      The <application>Nettle</application> package contains a low-level
+      cryptographic library that is designed to fit easily in many contexts.
+      </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&nettle-fin-sbu;</seg>
+        <seg>&nettle-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+</sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Nettle</title>
+
+    <para>
+      Install <application>Nettle</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput>./configure --prefix=/usr --disable-static &amp;&amp;
+make</userinput></screen>
+
+    <para>
+      To test the results, issue: <command>make check</command>.
+    </para>
+
+    <para>
+      Now, as the <systemitem class="username">root</systemitem> user:
+    </para>
+
+<screen role="root"><userinput>make install &amp;&amp;
+chmod   -v   755 /usr/lib/lib{hogweed,nettle}.so &amp;&amp;
+install -v -m755 -d /usr/share/doc/nettle-&nettle-version; &amp;&amp;
+install -v -m644 nettle.html /usr/share/doc/nettle-&nettle-version;</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          nettle-hash, nettle-lfib-stream, nettle-pbkdf2,
+          pkcs1-conv and sexp-conv
+        </seg>
+        <seg>
+          libhogweed.so and libnettle.so
+        </seg>
+        <seg>
+          /usr/include/nettle and /usr/share/doc/nettle-&nettle-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="nettle-hash">
+        <term><command>nettle-hash</command></term>
+        <listitem>
+          <para>
+            calculates a hash value using a specified algorithm
+          </para>
+          <indexterm zone="ch-system-nettle nettle-hash">
+            <primary sortas="b-nettle-hash">nettle-hash</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="nettle-lfib-stream">
+        <term><command>nettle-lfib-stream</command></term>
+        <listitem>
+          <para>
+            outputs a sequence of pseudorandom (non-cryptographic)  bytes,
+            using Knuth's lagged fibonacci generator. The stream is useful for
+            testing, but should not be used to generate cryptographic keys or
+            anything else that needs real randomness
+          </para>
+          <indexterm zone="ch-system-nettle nettle-lfib-stream">
+            <primary sortas="b-nettle-lfib-stream">nettle-lfib-stream</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="nettle-pbkdf2">
+        <term><command>nettle-pbkdf2</command></term>
+        <listitem>
+          <para>
+            is a password-based key derivation function that takes a password
+            or a passphrase as input and returns a strengthened password,
+            which is protected against pre-computation attacks by using
+            salting and other expensive computations.
+          </para>
+          <indexterm zone="ch-system-nettle nettle-pbkdf2">
+            <primary sortas="b-nettle-pbkdf2">nettle-pbkdf2</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pkcs1-conv">
+        <term><command>pkcs1-conv</command></term>
+        <listitem>
+          <para>
+            converts private and public RSA keys from PKCS #1 format to
+            sexp format
+          </para>
+          <indexterm zone="ch-system-nettle pkcs1-conv">
+            <primary sortas="b-pkcs1-conv">pkcs1-conv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="sexp-conv">
+        <term><command>sexp-conv</command></term>
+        <listitem>
+          <para>
+            converts an s-expression to a different encoding
+          </para>
+          <indexterm zone="ch-system-nettle sexp-conv">
+            <primary sortas="b-sexp-conv">sexp-conv</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/ninja.xml LFS-pacman/chapter08/ninja.xml
--- LFS_orig/chapter08/ninja.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/ninja.xml	2022-06-16 20:05:13.904522425 -0500
@@ -35,48 +35,70 @@
       </seglistitem>
     </segmentedlist>
 
-    <tip revision="sysv">
-      <para>This section is not strictly required for LFS if not using
-      systemd. On the other hand, ninja associated to meson makes
-      a powerful build system combination,
-      which is expected to be used more and more often. It is required for
-      several packages in <ulink url="&blfs-book;">the BLFS
-      book</ulink>.</para>
-    </tip>
-
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Ninja</title>
 
-    <para>When run, ninja normally runs a maximum number of processes
-    in parallel.  By default this is the number of cores on the system
-    plus two.  In some cases this can overheat a CPU or run a system out
-    of memory.  If run from the command line, passing a -jN parameter
-    will limit the number of parallel processes, but some packages
-    embed the execution of ninja and do not pass a -j parameter.</para>
-
-    <para>Using the <emphasis>optional</emphasis> procedure below allows a user to
-    limit the number of parallel processes via an environment variable,
-    NINJAJOBS.  <emphasis role="bold">For example</emphasis>, setting:
-
-    <screen>export NINJAJOBS=4</screen>
-
-    will limit ninja to four parallel processes.</para>
-
-    <para>If desired, add the capability to use the environment variable
-    NINJAJOBS by running:</para>
-
-<screen><userinput remap="pre">sed -i '/int Guess/a \
-  int   j = 0;\
-  char* jobs = getenv( "NINJAJOBS" );\
-  if ( jobs != NULL ) j = atoi( jobs );\
-  if ( j > 0 ) return j;\
-' src/ninja.cc</userinput></screen>
-
-    <para>Build Ninja with:</para>
+    <para>Create the PKGBUILD for the Ninja package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">python3 configure.py --bootstrap</userinput></screen>
+<screen><userinput>mkdir /sources/ninja
+cd /sources/ninja
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="ninja"
+pkgver="&ninja-version;"
+pkgrel="1"
+pkgdesc="Ninja is a small build system with a focus on speed."
+arch=('x86'
+      'x86_64')
+license=('Apachev2')
+groups=('core')
+depends=('gcc'
+         'glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'python')
+optdepends=('asciidoc'
+            'doxygen'
+            'emacs'
+            're2c')
+source=('&ninja-url;')
+md5sums=('&ninja-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Enable the "$NINJAJOBS" environment variable to control number or threads used
+  sed -i '/int Guess/a \
+    int   j = 0;\
+    char* jobs = getenv( "NINJAJOBS" );\
+    if ( jobs != NULL ) j = atoi( jobs );\
+    if ( j > 0 ) return j;\
+  ' src/ninja.cc
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  python3 configure.py --bootstrap
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  ./ninja ninja_test
+  ./ninja_test --gtest_filter=-SubprocessTest.SetWithLots
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  install -vm755 ninja ${pkgdir}/usr/bin/
+  install -vDm644 misc/bash-completion ${pkgdir}/usr/share/bash-completion/completions/ninja
+  install -vDm644 misc/zsh-completion  ${pkgdir}/usr/share/zsh/site-functions/_ninja
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the build option:</title>
@@ -91,16 +113,23 @@
 
     </variablelist>
 
-    <para>To test the results, issue:</para>
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/ninja-&ninja-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Ninja package:</para>
 
-<screen><userinput remap="test">./ninja ninja_test
-./ninja_test --gtest_filter=-SubprocessTest.SetWithLots</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S ninja --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">install -vm755 ninja /usr/bin/
-install -vDm644 misc/bash-completion /usr/share/bash-completion/completions/ninja
-install -vDm644 misc/zsh-completion  /usr/share/zsh/site-functions/_ninja</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/ninja
+cp PKGBUILD /srv/pacman/source/LFS/ninja
+cd /sources
+rm -rf ninja</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/npth.xml LFS-pacman/chapter08/npth.xml
--- LFS_orig/chapter08/npth.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/npth.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-npth" role="wrap">
+  <?dbhtml filename="npth.html"?>
+
+  <sect1info condition="script">
+    <productname>npth</productname>
+    <productnumber>&npth-version;</productnumber>
+    <address>&npth-url;</address>
+  </sect1info>
+
+  <title>Npth-&npth-version;</title>
+
+  <indexterm zone="ch-system-npth">
+    <primary sortas="a-Npth">Npth</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>NPth</application> package contains a very portable
+      POSIX/ANSI-C based library for Unix platforms which provides
+      non-preemptive priority-based scheduling for multiple threads of
+      execution (multithreading) inside event-driven applications. All threads
+      run in the same address space of the server application, but each thread
+      has its own individual program-counter, run-time stack, signal mask and
+      errno variable.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&npth-fin-sbu;</seg>
+        <seg>&npth-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of NPth</title>
+
+    <para>Create the PKGBUILD for the NPth package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/npth
+cd /sources/npth
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="npth"
+pkgver="&npth-version;"
+pkgrel="1"
+pkgdesc="${pkgname} ${pkgver}"
+arch=('x86'
+      'x86_64')
+license=('LGPLv2.1')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+source=('&npth-url;')
+md5sums=('&npth-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  make -k check || true
+}
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/npth-&npth-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the NPth package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S npth --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/npth
+cp PKGBUILD /srv/pacman/source/LFS/npth
+cd /sources
+rm -rf npth</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>npth-config</seg>
+        <seg>libnpth.so</seg>
+        <seg>None</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="npth-config">
+        <term><command>npth-config</command></term>
+        <listitem>
+          <para>
+            is a utility used to configure and build applications based on
+            the npth library. It can be used to query the C compiler and
+            linker flags which are required to correctly compile and link the
+            application against the npth library.
+          </para>
+          <indexterm zone="ch-system-npth npth-config">
+            <primary sortas="b-npth-config">npth-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libnpth">
+        <term><filename class="libraryfile">libnpth.so</filename></term>
+        <listitem>
+          <para>
+            contains the API functions used by the New Portable Threads
+            Library.
+          </para>
+          <indexterm zone="ch-system-npth libnpth">
+            <primary sortas="c-libnpth">libnpth.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </sect2>
+</sect1>
diff -Naurp LFS_orig/chapter08/openssl.xml LFS-pacman/chapter08/openssl.xml
--- LFS_orig/chapter08/openssl.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/openssl.xml	2022-06-16 20:05:13.907855759 -0500
@@ -40,62 +40,82 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of OpenSSL</title>
 
-    <para>Prepare OpenSSL for compilation:</para>
+    <para>Create the PKGBUILD for the OpenSSL package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./config --prefix=/usr         \
-         --openssldir=/etc/ssl \
-         --libdir=lib          \
-         shared                \
-         zlib-dynamic</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make test</userinput></screen>
-
-    <para>One test, 30-test_afalg.t, is known to fail on some kernel
-    configurations (depending on inconsistent values of
-    CONFIG_CRYPTO_USER_API* settings.) If it fails, it can safely be
-    ignored.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
-make MANSUFFIX=ssl install</userinput></screen>
-
-    <para>Add the version to the documentation directory name, to be
-    consistent with other packages:</para>
-
-<screen><userinput remap="install">mv -v /usr/share/doc/openssl /usr/share/doc/openssl-&openssl-version;</userinput></screen>
-
-    <para>If desired, install some additional documentation:</para>
-
-<screen><userinput remap="install">cp -vfr doc/* /usr/share/doc/openssl-&openssl-version;</userinput></screen>
-
-    <note>
-      <para>
-        You should update OpenSSL when a new version which fixes vulnerabilities
-        is announced. The releases run in series, with a letter for each release
-        after the initial release (e.g. 1.1.1, 1.1.1a, 1.1.1b, etc). Because LFS
-        installs only the shared libraries, there is no need to recompile packages
-        which link to <filename class="libraryfile">libcrypto.so</filename> or
-        <filename class="libraryfile">libssl.so</filename>
-        <emphasis>when upgrading in the same series.</emphasis>
-      </para>
-
-      <para>
-        However, any running programs linked to those libraries need to be stopped
-        and restarted. Read the related entries in
-        <xref linkend='pkgmgmt-upgrade-issues'/> for details.
-      </para>
-
-    </note>
+<screen><userinput>mkdir /sources/openssl
+cd /sources/openssl
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="openssl"
+pkgver="&openssl-version;"
+pkgrel="1"
+pkgdesc="The OpenSSL package contains management tools and libraries relating to cryptography."
+arch=('x86'
+      'x86_64')
+license=('OpenSSL'
+         'SSLeay')
+groups=('core')
+depends=('glibc'
+         'perl'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'make')
+source=('&openssl-url;)
+md5sums=('&openssl-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./config --prefix=/usr         \
+           --openssldir=/etc/ssl \
+           --libdir=/lib         \
+           shared                \
+           zlib-dynamic
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # One test (30-test_afalg.t) is know to fail
+  make -k test || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+
+  # Do not install static libs
+  sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
+  
+  make -j1 DESTDIR=${pkgdir} MANSUFFIX=ssl install
+  mv -v ${pkgdir}/usr/share/doc/openssl \
+        ${pkgdir}/usr/share/doc/openssl-${pkgver}
+  cp -vfr doc/* ${pkgdir}/usr/share/doc/openssl-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/openssl-&openssl-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the OpenSSL package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S openssl --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/openssl
+cp PKGBUILD /srv/pacman/source/LFS/openssl
+cd /sources
+rm -rf openssl</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/p11-kit.xml LFS-pacman/chapter08/p11-kit.xml
--- LFS_orig/chapter08/p11-kit.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/p11-kit.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,229 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-p11-kit" role="wrap">
+  <?dbhtml filename="p11-kit.html"?>
+
+  <sect1info condition="script">
+    <productname>p11-kit</productname>
+    <productnumber>&p11-kit-version;</productnumber>
+    <address>&p11-kit-url;</address>
+  </sect1info>
+
+  <title>P11-kit-&p11-kit-version;</title>
+
+  <indexterm zone="ch-system-p11-kit">
+    <primary sortas="a-P11-kit">P11-kit</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to p11-kit</title>
+
+    <para>
+      The <application>p11-kit</application> package provides a way to load and
+      enumerate PKCS #11 (a Cryptographic Token Interface Standard) modules.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&p11-kit-fin-sbu;</seg>
+        <seg>&p11-kit-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of p11-kit</title>
+
+    <para>
+      Prepare the distribution specific anchor hook:
+    </para>
+
+<screen><userinput remap="pre">sed '20,$ d' -i trust/trust-extract-compat.in
+cat &gt;&gt; trust/trust-extract-compat.in &lt;&lt; "EOF"
+<literal># Copy existing anchor modifications to /etc/ssl/local
+/usr/libexec/make-ca/copy-trust-modifications
+
+# Generate a new trust store
+/usr/sbin/make-ca -f -g</literal>
+EOF</userinput></screen>
+
+    <para>
+      Configure <application>p11-kit</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr     \
+            --sysconfdir=/etc \
+            --with-trust-paths=/etc/pki/anchors</userinput></screen>
+
+    <para>
+      Build <application>p11-kit</application> by running the following
+      command:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      To test the results, issue: <command>make check</command>.
+      Many tests will fail if the test suite is run as the
+      <systemitem class="username"> root</systemitem> user.
+    </para>
+
+    <para>
+      Install <application>p11-kit</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install &amp;&amp;
+ln -sfv /usr/libexec/p11-kit/trust-extract-compat \
+        /usr/bin/update-ca-certificates</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--with-trust-paths=/etc/pki/anchors</parameter>: this switch
+      sets the location of trusted certificates used by libp11-kit.so.
+    </para>
+
+    <para>
+      <option>--with-hash-impl=freebl</option>: Use this switch if you want to
+      use the Freebl library from <application>NSS</application> for SHA1 and
+      MD5 hashing.
+    </para>
+
+  </sect2>
+
+  <sect2 role="configuration">
+    <title>Configuring p11-kit</title>
+
+    <para>
+      The <application>p11-kit</application> trust module
+      (<filename>/usr/lib/pkcs11/p11-kit-trust.so</filename>) can be used as a
+      drop-in replacement for <filename>/usr/lib/libnssckbi.so</filename> to
+      transparently make the system CAs available to
+      <application>NSS</application> aware applications, rather than the static
+      list provided by <filename>/usr/lib/libnssckbi.so</filename>. As the
+      <systemitem class="username">root</systemitem> user, execute the
+      following commands:
+    </para>
+
+<screen><userinput remap="install">ln -sfv ./pkcs11/p11-kit-trust.so /usr/lib/libnssckbi.so</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          p11-kit, trust, and update-ca-certificates
+        </seg>
+        <seg>
+          libp11-kit.so and p11-kit-proxy.so
+        </seg>
+        <seg>
+          /etc/pkcs11,
+          /usr/include/p11-kit-1,
+          /usr/lib/pkcs11,
+          /usr/libexec/p11-kit,
+          /usr/share/gtk-doc/html/p11-kit, and
+          /usr/share/p11-kit
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="p11-kit-prog">
+        <term><command>p11-kit</command></term>
+        <listitem>
+          <para>
+            is a command line tool that can be used to perform operations
+            on PKCS#11 modules configured on the system.
+          </para>
+          <indexterm zone="ch-system-p11-kit p11-kit-prog">
+            <primary sortas="b-p11-kit">p11-kit</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="trust">
+        <term><command>trust</command></term>
+        <listitem>
+          <para>
+            is a command line tool to examine and modify the shared trust
+            policy store.
+          </para>
+          <indexterm zone="ch-system-p11-kit trust">
+            <primary sortas="b-trust">trust</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="update-ca-certificates">
+        <term><command>update-ca-certificates</command></term>
+        <listitem>
+          <para>
+            is a command line tool to both extract local certificates from an
+            updated anchor store, and regenerate all anchors and certificate
+            stores on the system. This is done unconditionally on BLFS using
+            the <parameter>--force</parameter> and <parameter>--get</parameter>
+            flags to <command>make-ca</command> and should likely not be used
+            for automated updates.
+          </para>
+          <indexterm zone="ch-system-p11-kit update-ca-certificates">
+            <primary sortas="b-update-ca-certificates">update-ca-certificates</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libp11-kit">
+        <term><filename class="libraryfile">libp11-kit.so</filename></term>
+        <listitem>
+          <para>
+            contains functions used to coordinate initialization and
+            finalization of any PKCS#11 module.
+          </para>
+          <indexterm zone="ch-system-p11-kit libp11-kit">
+            <primary sortas="c-libp11-kit">libp11-kit.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="p11-kit-proxy">
+        <term><filename class="libraryfile">p11-kit-proxy.so</filename></term>
+        <listitem>
+          <para>
+            is the PKCS#11 proxy module.
+          </para>
+          <indexterm zone="ch-system-p11-kit p11-kit-proxy">
+            <primary sortas="c-p11-kit-proxy">p11-kit-proxy.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/pacman-contrib.xml LFS-pacman/chapter08/pacman-contrib.xml
--- LFS_orig/chapter08/pacman-contrib.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/pacman-contrib.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,199 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-pacman-contrib" role="wrap">
+  <?dbhtml filename="pacman-contrib.html"?>
+
+  <sect1info condition="script">
+    <productname>pacman-contrib</productname>
+    <productnumber>&pacman-contrib-version;</productnumber>
+    <address>&pacman-contrib-url;</address>
+  </sect1info>
+
+  <title>Pacman-contirb-&pacman-contrib-version;</title>
+
+  <indexterm zone="ch-system-pacman-contrib">
+    <primary sortas="a-Pacman-contirb">Pacman-contirb</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Pacman-contirb package contains scripts and tools for Pacman
+    systems.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pacman-contrib-fin-sbu;</seg>
+        <seg>&pacman-contrib-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Pacman-contirb</title>
+
+    <para>Prepare Pacman-contirb for compilation:</para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr        \
+            --sysconfdir=/etc    \
+            --localstatedir=/var</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+
+  </sect2>
+
+  <sect2 id="contents-pacman-contrib" role="content">
+    <title>Contents of Pacman-contirb</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+
+      <seglistitem>
+        <seg>checkupdates, paccache, pacdiff, paclist, paclog-pkglist,
+        pacscripts, pacsearch, pacsort, pactree, rankmirrors, and
+        updpkgsums</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="checkupdates">
+        <term><command>checkupdates</command></term>
+        <listitem>
+          <para>is a utility to safely prints a list of pending updates.</para>
+          <indexterm zone="ch-system-pacman-contrib checkupdates">
+            <primary sortas="b-checkupdates">checkupdates</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="paccache">
+        <term><command>paccache</command></term>
+        <listitem>
+          <para>is a flexible pacman cache cleaning utility.</para>
+          <indexterm zone="ch-system-pacman-contrib paccache">
+            <primary sortas="b-paccache">paccache</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacdiff">
+        <term><command>pacdiff</command></term>
+        <listitem>
+          <para>is a pacorig, pacnew and pacsave configuration file maintenance
+          utility.</para>
+          <indexterm zone="ch-system-pacman-contrib pacdiff">
+            <primary sortas="b-pacdiff">pacdiff</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="paclist">
+        <term><command>paclist</command></term>
+        <listitem>
+          <para>is a utility to list all installed packages from a given
+          repo.</para>
+          <indexterm zone="ch-system-pacman-contrib paclist">
+            <primary sortas="b-paclist">paclist</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="paclog-pkglist">
+        <term><command>paclog-pkglist</command></term>
+        <listitem>
+          <para>is a utiltiy to parse a log file into a list of currently
+          installed packages.</para>
+          <indexterm zone="ch-system-pacman-contrib paclog-pkglist">
+            <primary sortas="b-paclog-pkglist">paclog-pkglist</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacscripts">
+        <term><command>pacscripts</command></term>
+        <listitem>
+          <para>is a utiltiy to print the {pre,post}_{install,remove,upgrade}
+          scripts of a given package.</para>
+          <indexterm zone="ch-system-pacman-contrib pacscripts">
+            <primary sortas="b-pacscripts">pacscripts</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacsearch">
+        <term><command>pacsearch</command></term>
+        <listitem>
+          <para>is a utility to search using both the local and the sync
+          databases.</para>
+          <indexterm zone="ch-system-pacman-contrib pacsearch">
+            <primary sortas="b-pacsearch">pacsearch</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacsort">
+        <term><command>pacsort</command></term>
+        <listitem>
+          <para>is a sort utility implementing alpm_pkg_vercmp.</para>
+          <indexterm zone="ch-system-pacman-contrib pacsort">
+            <primary sortas="b-pacsort">pacsort</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pactree">
+        <term><command>pactree</command></term>
+        <listitem>
+          <para>is a package dependency tree viewer.</para>
+          <indexterm zone="ch-system-pacman-contrib pactree">
+            <primary sortas="b-pactree">pactree</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="rankmirrors">
+        <term><command>rankmirrors</command></term>
+        <listitem>
+          <para>is a utility to rank pacman mirrors by their connection and
+          opening speed.</para>
+          <indexterm zone="ch-system-pacman-contrib rankmirrors">
+            <primary sortas="b-rankmirrors">rankmirrors</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="updpkgsums">
+        <term><command>updpkgsums</command></term>
+        <listitem>
+          <para>is a utility to update the checksums of a PKGBUILD file.</para>
+          <indexterm zone="ch-system-pacman-contrib updpkgsums">
+            <primary sortas="b-updpkgsums">updpkgsums</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/pacman.xml LFS-pacman/chapter08/pacman.xml
--- LFS_orig/chapter08/pacman.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/pacman.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-pacman" role="wrap">
+  <?dbhtml filename="pacman.html"?>
+
+  <sect1info condition="script">
+    <productname>pacman</productname>
+    <productnumber>&pacman-version;</productnumber>
+    <address>&pacman-url;</address>
+  </sect1info>
+
+  <title>Pacman-&pacman-version;</title>
+
+  <indexterm zone="ch-system-pacman">
+    <primary sortas="a-Pacman">Pacman</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Pacman package contains programs for simulating superuser
+    privileges.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pacman-fin-sbu;</seg>
+        <seg>&pacman-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Pacman</title>
+
+    <para>Fix a few post-release issues:</para>
+
+<screen><userinput>patch -Np1 -i ../&pacman-fixes-patch;</userinput></screen>
+
+    <para>Prepare Pacman for compilation:</para>
+
+<screen><userinput remap="configure">tar -xf ../pacman-hooks-&pacman-hooks-version;.tar.xz
+meson --prefix=/usr                   \
+      --buildtype=plain               \
+      -Ddoc=enabled                   \
+      -Ddoxygen=disabled              \
+      -Dscriptlet-shell=/usr/bin/bash \
+      -Dldconfig=/usr/bin/ldconfig    \
+      build</userinput></screen>
+
+    <para>Compile the package:</para>
+
+<screen><userinput remap="make">meson compile -C build</userinput></screen>
+
+    <para>Install the package:</para>
+
+<screen><userinput remap="install">meson install -C build</userinput></screen>
+
+    <para>Install the hooks:</para>
+
+<screen revision="sysv"><userinput remap="install">rm -f pacman-hooks-&pacman-hooks-version;/hooks/*systemd*
+rm -f pacman-hooks-&pacman-hooks-version;/hooks/dbus-reload.hook
+rm -f pacman-hooks-&pacman-hooks-version;/scripts/*systemd*
+sed '/^Target/s@/\*@/*.info*@' -i \
+    pacman-hooks-&pacman-hooks-version;/hooks/texinfo-install.hook
+install -vdm755 /usr/share/libalpm/{hooks,scripts}/
+install -vm644  pacman-hooks-&pacman-hooks-version;/hooks/* \
+                /usr/share/libalpm/hooks/
+install -vm755  pacman-hooks-$&pacman-hooks-version;/scripts/* \
+                /usr/share/libalpm/scripts/</userinput></screen>
+
+    <para>Modify the makepkg.conf file:</para>
+
+<screen><userinput remap="install">cat &gt;&gt; /etc/makepkg.conf &lt;&lt; "EOF"
+<literal>PACKAGER="Linux From Scratch &gt;lfs-dev@lists.linuxfromscrtch.org&lt;"
+PKGDEST="/srv/pacman/repos/LFS"
+SRCDEST="/sources"
+LOGDEST="/srv/pacman/logs/LFS"
+EOF
+sed -e /PKGEXT/s/gz/xz/                                \
+    -e /SRCEXT/s/gz/xz/                                \
+    -e /^INTEGRITY/s/ck/md5/                           \
+    -e '/^OPTIONS/s/\([^!]\)emptydirs/\1!emptydirs/'   \
+    -e '/^OPTIONS/s/\([^!]\)libtoo/\1!libtool/'        \
+    -e '/^OPTIONS/s/\([^!]\)staticlibs/\1!staticlibs/' \
+    -i /etc/makepkg.conf</literal></userinput></screen>
+
+    <para>Modify the pacman.conf file:</para>
+
+<screen><userinput remap="install">cat &gt;&gt; /etc/pacman.conf &lt;&lt; "EOF"
+<literal>
+[LFS]
+SigLevel = Optional TrustAll
+Server = file:///srv/pacman/repos/LFS
+
+EOF</literal></userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-pacman" role="content">
+    <title>Contents of Pacman</title>
+
+    <segmentedlist>
+      <segtitle>Installed programs</segtitle>
+      <segtitle>Installed libraries</segtitle>
+      <segtitle>Installed directories</segtitle>
+
+      <seglistitem>
+        <seg>makepkg, makepkg-template, pacman, pacman-conf, pacman-db-upgrade,
+        pacman-key, repo-add, repo-elephant, repo-remove, testpkg, and
+        vercmp</seg>
+        <seg>libalpm.so</seg>
+        <seg>/usr/share/makepkg, /usr/share/pacman, and /srv/pacman/repos</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="makepkg">
+        <term><command>makepkg</command></term>
+        <listitem>
+          <para>is a script to automate the building of packages.</para>
+          <indexterm zone="ch-system-pacman makepkg">
+            <primary sortas="b-makepkg">makepkg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="makepkg-template">
+        <term><command>makepkg-template</command></term>
+        <listitem>
+          <para>is a script to ease the work of maintaining multiple similar
+           PKGBUILDs.</para>
+          <indexterm zone="ch-system-pacman makepkg-template">
+            <primary sortas="b-makepkg-template">makepkg-template</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacman">
+        <term><command>pacman</command></term>
+        <listitem>
+          <para>is a package management utility that tracks installed packages
+          on a Linux system.</para>
+          <indexterm zone="ch-system-pacman pacman">
+            <primary sortas="b-pacman">pacman</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacman-conf">
+        <term><command>pacman-conf</command></term>
+        <listitem>
+          <para>is a utility for parsing the pacman configuration file and
+          returning script-friendly output.</para>
+          <indexterm zone="ch-system-pacman pacman-conf">
+            <primary sortas="b-pacman-conf">pacman-conf</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacman-db-upgrade">
+        <term><command>pacman-db-upgrade</command></term>
+        <listitem>
+          <para>is a tool to upgrade the local pacman database to a newer
+          format.</para>
+          <indexterm zone="ch-system-pacman pacman-db-upgrade">
+            <primary sortas="b-pacman-db-upgrade">pacman-db-upgrade</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="pacman-key">
+        <term><command>pacman-key</command></term>
+        <listitem>
+          <para>is a wrapper script for GnuPG used to manage pacman’s
+          keyring.</para>
+          <indexterm zone="ch-system-pacman pacman-key">
+            <primary sortas="b-pacman-key">pacman-key</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="repo-add">
+        <term><command>repo-add</command></term>
+        <listitem>
+          <para>is a tool to update a package database by reading a built
+          package file.</para>
+          <indexterm zone="ch-system-pacman repo-add">
+            <primary sortas="b-repo-add">repo-add</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="repo-elephant">
+        <term><command>repo-elephant</command></term>
+        <listitem>
+          <para>is an internal devleoper command not intended for users or
+          sysadmins.</para>
+          <indexterm zone="ch-system-pacman repo-elephant">
+            <primary sortas="b-repo-elephant">repo-elephant</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="repo-remove">
+        <term><command>repo-remove</command></term>
+        <listitem>
+          <para>is a tool to update a package database by removing the package
+          name specified on the command line.</para>
+          <indexterm zone="ch-system-pacman repo-remove">
+            <primary sortas="b-repo-remove">repo-remove</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="testpkg">
+        <term><command>testpkg</command></term>
+        <listitem>
+          <para>is a utility to test a pacman package for validity.</para>
+          <indexterm zone="ch-system-pacman testpkg">
+            <primary sortas="b-testpkg">testpkg</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="vercmp">
+        <term><command>vercmp</command></term>
+        <listitem>
+          <para>is a utility to determine the relationship between two given
+          version numbers.</para>
+          <indexterm zone="ch-system-pacman vercmp">
+            <primary sortas="b-vercmp">vercmp</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libalpm">
+        <term><filename class="libraryfile">libalpm.so</filename></term>
+        <listitem>
+          <para>is the primary library for package management functions.</para>
+          <indexterm zone="ch-system-pacman libalpm">
+            <primary sortas="c-ibalpm">libalpm.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/patch.xml LFS-pacman/chapter08/patch.xml
--- LFS_orig/chapter08/patch.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/patch.xml	2022-06-16 20:05:13.904522425 -0500
@@ -39,24 +39,74 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Patch</title>
 
-    <para>Prepare Patch for compilation:</para>
+    <para>Create the PKGBUILD for the Patch package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/patch
+cd /sources/patch
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="patch"
+pkgver="&patch-version;"
+pkgrel="1"
+pkgdesc="The Patch package contains a program for modifying or creating files via patch file."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'patch'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+checkdepends=('diffutils')
+optdepends=('ed')
+source=('&patch-url;')
+md5sums=('&patch-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/patch-&patch-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Patch package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S patch --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/patch
+cp PKGBUILD /srv/pacman/source/LFS/patch
+cd /sources
+rm -rf patch</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/perl.xml LFS-pacman/chapter08/perl.xml
--- LFS_orig/chapter08/perl.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/perl.xml	2022-06-16 20:05:13.907855759 -0500
@@ -38,42 +38,92 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Perl</title>
-<!--
-    <para>First, apply a patch that fixes an issue highlighted by recent
-    versions of gdbm:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&perl-fix-patch;</userinput></screen>
--->
-    <para>This version of Perl now builds the Compress::Raw::Zlib and
-    Compress::Raw::BZip2 modules. By
-    default Perl will use an internal copy of the sources for the build.
-    Issue the following command so that Perl will use the libraries
-    installed on the system:</para>
-
-<screen><userinput remap="pre">export BUILD_ZLIB=False
-export BUILD_BZIP2=0</userinput></screen>
-
-    <para>To have full control over the way Perl is set up, you can remove the
-    <quote>-des</quote> options from the following command and hand-pick the way
-    this package is built. Alternatively, use the command exactly as below to
-    use the defaults that Perl auto-detects:</para>
-
- <screen><userinput remap="configure">sh Configure -des                                         \
-             -Dprefix=/usr                                \
-             -Dvendorprefix=/usr                          \
-             -Dprivlib=/usr/lib/perl5/&perl-version-min;/core_perl      \
-             -Darchlib=/usr/lib/perl5/&perl-version-min;/core_perl      \
-             -Dsitelib=/usr/lib/perl5/&perl-version-min;/site_perl      \
-             -Dsitearch=/usr/lib/perl5/&perl-version-min;/site_perl     \
-             -Dvendorlib=/usr/lib/perl5/&perl-version-min;/vendor_perl  \
-             -Dvendorarch=/usr/lib/perl5/&perl-version-min;/vendor_perl \
-             -Dman1dir=/usr/share/man/man1                \
-             -Dman3dir=/usr/share/man/man3                \
-             -Dpager="/usr/bin/less -isR"                 \
-             -Duseshrplib                                 \
-             -Dusethreads</userinput></screen>
+
+    <para>Create the PKGBUILD for the Perl package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/perl
+cd /sources/perl
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="perl"
+pkgver="&perl-version;"
+pkgrel="1"
+pkgdesc="The Perl package contains the Practical Extraction and Report Language."
+arch=('x86'
+      'x86_64')
+license=('GPLv1')
+groups=('core')
+depends=('db'
+         'gdbm'
+         'glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'groff'
+             'make'
+             'sed'
+             'zlib')
+checkdepends=('iana-etc'
+              'less'
+              'procps-ng')
+source=('&perl-url;')
+md5sums=('&perl-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+
+  # This version of Perl now builds the Compress::Raw::Zlib and
+  # Compress::Raw::BZip2 modules. By default Perl will use an
+  # internal copy of the sources for the build. Set the following
+  # so that Perl will use the libraries installed on the system
+  export BUILD_ZLIB=False
+  export BUILD_BZIP2=0
+
+  sh Configure -des                                         \
+               -Dprefix=/usr                                \
+               -Dvendorprefix=/usr                          \
+               -Dprivlib=/usr/lib/perl5/5.34/core_perl      \
+               -Darchlib=/usr/lib/perl5/5.34/core_perl      \
+               -Dsitelib=/usr/lib/perl5/5.34/site_perl      \
+               -Dsitearch=/usr/lib/perl5/5.34/site_perl     \
+               -Dvendorlib=/usr/lib/perl5/5.34/vendor_perl  \
+               -Dvendorarch=/usr/lib/perl5/5.34/vendor_perl \
+               -Dman1dir=/usr/share/man/man1                \
+               -Dman3dir=/usr/share/man/man3                \
+               -Dpager="/usr/bin/less -isR"                 \
+               -Duseshrplib                                 \
+               -Dusethreads
+  make
+}
+
+check(){
+  # Same as before
+  export BUILD_ZLIB=False
+  export BUILD_BZIP2=0
+
+  cd ${pkgname}-${pkgver}
+
+  # 9 tests are known to fail due to newer zlib, just exit 0
+  make -k test || true
+}
+
+package(){
+  # Same as before
+  export BUILD_ZLIB=False
+  export BUILD_BZIP2=0
+
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
@@ -131,22 +181,23 @@ export BUILD_BZIP2=0</userinput></screen
 
     </variablelist>
 
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
+    &pacman-build-add;
 
-    <para>To test the results (approximately 11 SBU), issue:</para>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/perl-&perl-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-<screen><userinput remap="test">make test</userinput></screen>
+    <para>Update the local cache and install the Perl package:</para>
 
-    <note>
-       <para>Nine tests fail due to using the most recent version of zlib.</para>
-    </note>
+<screen><userinput>pacman -Syu
+pacman -S perl --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package and clean up:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install
-unset BUILD_ZLIB BUILD_BZIP2</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/perl
+cp PKGBUILD /srv/pacman/source/LFS/perl
+cd /sources
+rm -rf perl</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/pip.xml LFS-pacman/chapter08/pip.xml
--- LFS_orig/chapter08/pip.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/pip.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,132 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-pip" role="wrap">
+  <?dbhtml filename="pip.html"?>
+
+  <sect1info condition="script">
+    <productname>pip</productname>
+    <productnumber>&pip-version;</productnumber>
+    <address>&pip-url;</address>
+  </sect1info>
+
+  <title>pip-&pip-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The pip package provides a method to easily download, build,
+    install, upgrade, and uninstall Python packages.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pip-fin-sbu;</seg>
+        <seg>&pip-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of Pip</title>
+
+    <para>Create the PKGBUILD for the Pip package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/pip
+cd /sources/pip
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="pip"
+pkgver="&pip-version;"
+pkgrel="1"
+pkgdesc="The Pip package provides a method to easily download, build, install, upgrade, and uninstall Python packages"
+arch=('any')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('python'
+         'setuptools')
+source=('&pip-url;')
+md5sums=('&pip-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  python3 setup.py build
+}
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+  ln -sfv pip&python-minor; ${pkgdir}/usr/bin/pip3
+  ln -sfv pip&python-minor; ${pkgdir}/usr/bin/pip
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/pip-&pip-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Pip package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S pip --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/pip
+cp PKGBUILD /srv/pacman/source/LFS/pip
+cd /sources
+rm -rf pip</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-pip" role="content">
+      <title>Contents of Pip</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          /usr/bin/pip&python-minor;
+        </seg>
+        <seg>
+          /usr/lib/python&python-minor;/site-packages/pip{,-&pip-version;-py&python-minor;.egg-info}
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="pip">
+        <term><command>pip&python-minor;</command></term>
+        <listitem>
+          <para>
+            The package installer for Python. You can use pip to install
+            packages from Python Package Index and other indexes
+          </para>
+          <indexterm zone="ch-system-pip">
+            <primary sortas="b-pip">pip&python-minor;</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/pkgconfig.xml LFS-pacman/chapter08/pkgconfig.xml
--- LFS_orig/chapter08/pkgconfig.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/pkgconfig.xml	2022-06-16 20:05:13.904522425 -0500
@@ -39,15 +39,59 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Pkg-config</title>
 
-    <para>Prepare Pkg-config for compilation:</para>
+    <para>Create the PKGBUILD for the Pkg-config package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr              \
-            --with-internal-glib       \
-            --disable-host-tool        \
-            --docdir=/usr/share/doc/pkg-config-&pkgconfig-version;</userinput></screen>
+<screen><userinput>mkdir /sources/pkg-config
+cd /sources/pkg-config
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="pkg-config"
+pkgver="&pkgconfig-version;"
+pkgrel="1"
+pkgdesc="The pkg-config package contains a tool for passing the include and library paths to a configure script."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('Bash'
+             'Binutils'
+             'Coreutils'
+             'Gawk'
+             'GCC'
+             'Glibc'
+             'Grep'
+             'Make'
+             'Popt'
+             'Sed')
+source=('&pkgconfig-url;')
+md5sums=('&pkgconfig-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr              \
+              --with-internal-glib       \
+              --disable-host-tool        \
+              --docdir=/usr/share/doc/pkg-config-${pkgver}
+make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the new configure options:</title>
@@ -70,17 +114,23 @@
 
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/pkg-config-&pkgconfig-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>To test the results, issue:</para>
+    <para>Update the local cache and install the Pkg-config package:</para>
 
-<screen><userinput remap="test">make check</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S pkg-config --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/pkg-config
+cp PKGBUILD /srv/pacman/source/LFS/pkg-config
+cd /sources
+rm -rf pkg-config</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/pkgmgt.xml LFS-pacman/chapter08/pkgmgt.xml
--- LFS_orig/chapter08/pkgmgt.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/pkgmgt.xml	2022-06-16 20:05:13.901189092 -0500
@@ -13,33 +13,11 @@
   <para>Package Management is an often requested addition to the LFS Book. A
   Package Manager allows tracking the installation of files making it easy to
   remove and upgrade packages. As well as the binary and library files, a
-  package manager will handle the installation of configuration files.  Before
-  you begin to wonder, NO&mdash;this section will not talk about nor recommend
-  any particular package manager. What it provides is a roundup of the more
-  popular techniques and how they work. The perfect package manager for you may
-  be among these techniques or may be a combination of two or more of these
-  techniques. This section briefly mentions issues that may arise when upgrading
-  packages.</para>
-
-  <para>Some reasons why no package manager is mentioned in LFS or BLFS
-  include:</para>
-
-  <itemizedlist>
-    <listitem>
-      <para>Dealing with package management takes the focus away from the goals
-      of these books&mdash;teaching how a Linux system is built.</para>
-    </listitem>
-
-    <listitem>
-      <para>There are multiple solutions for package management, each having
-      its strengths and drawbacks.  Including one that satisfies all audiences
-      is difficult.</para>
-    </listitem>
-  </itemizedlist>
-
-  <para>There are some hints written on the topic of package management. Visit
-  the <ulink url="&hints-root;">Hints Project</ulink> and see if one of them
-  fits your need.</para>
+  package manager will handle the installation of configuration files.</para>
+
+  <para>In this modified version of the LFS book, we've elected to use Pacman
+  as the package manager. Most of the build and installation commands apply
+  equally to RPM or other binary pacaking tools.</para>
 
   <sect2 id='pkgmgmt-upgrade-issues'>
     <title>Upgrade Issues</title>
@@ -61,11 +39,9 @@
       </listitem>
 
       <listitem>
-        <para>If Linux API headers or Glibc needs to be upgraded to a newer
-        version, (e.g.  from glibc-2.31 to glibc-2.32), it is safer to
-        rebuild LFS.  Though you <emphasis>may</emphasis> be able to rebuild
-        all the packages in their dependency order, we do not recommend
-        it.  </para>
+        <para>If GLibC needs to be updated to a newer version, you should also
+        update the Linux API Headrs at the same time. In fact, this is the only
+        time that the Linux API Headers should ever be updated.</para>
       </listitem>
 
       <listitem> <para>If a package containing a shared library is updated, and
@@ -84,24 +60,6 @@
       libraries unless all the dependent packages are recompiled.</para>
       </listitem>
 
-      <listitem> <para>If a package containing a shared library is updated,
-      and the name of library doesn't change, but the version number of the
-      library <emphasis role="bold">file</emphasis> decreases (for example,
-      the name of the library is kept named
-      <filename class='libraryfile'>libfoo.so.1</filename>,
-      but the name of library file is changed from
-      <filename class='libraryfile'>libfoo.so.1.25</filename> to
-      <filename class='libraryfile'>libfoo.so.1.24</filename>),
-      you should remove the library file from the previously installed version
-      (<filename class='libraryfile'>libfoo.so.1.25</filename> in the case).
-      Or, a <command>ldconfig</command> run (by yourself using a command
-      line, or by the installation of some package) will reset the symlink
-      <filename class='libraryfile'>libfoo.so.1</filename> to point to
-      the old library file because it seems having a <quote>newer</quote>
-      version, as its version number is larger.  This situation may happen if
-      you have to downgrade a package, or the package changes the versioning
-      scheme of library files suddenly.</para> </listitem>
-
       <listitem><para>If a package containing a shared library is updated,
       and the name of library doesn't change, but a severe issue
       (especially, a security vulnerability) is fixed, all running programs
@@ -129,20 +87,6 @@
         <systemitem class='username'>root</systemitem> user.
       </para></listitem>
 
-      <listitem>
-        <para>If a binary or a shared library is overwritten, the processes
-        using the code or data in the binary or library may crash.  The
-        correct way to update a binary or a shared library without causing
-        the process to crash is to remove it first, then install the new
-        version into position. The <command>install</command> command
-        provided by <application>Coreutils</application> has already
-        implemented this and most packages use it to install binaries and
-        libraries.  This means that you won't be troubled by this issue most of the time.
-        However, the install process of some packages (notably Mozilla JS
-        in BLFS) just overwrites the file if it exists and causes a crash, so
-        it's safer to save your work and close unneeded running processes
-        before updating a package.</para>
-      </listitem>
     </itemizedlist>
 
   </sect2>
@@ -150,9 +94,10 @@
   <sect2>
     <title>Package Management Techniques</title>
 
-    <para>The following are some common package management techniques. Before
-    making a decision on a package manager, do some research on the various
-    techniques, particularly the drawbacks of the particular scheme.</para>
+    <para>The following are some common package management techniques. Although
+    a decision on a package manager has already been made, it is important to
+    be familiar with the available techniques, particularly the drawbacks of
+    the particular scheme.</para>
 
     <sect3>
       <title>It is All in My Head!</title>
@@ -284,14 +229,12 @@ make DESTDIR=/usr/pkg/libfoo/1.1 install
       commercial distributions. Examples of package managers that follow this
       approach are RPM (which, incidentally, is required by the <ulink
       url="http://refspecs.linuxfoundation.org/lsb.shtml">Linux
-      Standard Base Specification</ulink>), pkg-utils, Debian's apt, and
-      Gentoo's Portage system.  A hint describing how to adopt this style of
+      Standard Base Specification</ulink>), pkg-utils, Debian's apt,
+      Gentoo's Portage system, and of course, Arch's Pacman (used in this book).
+      A hint describing how to adopt this style of
       package management for LFS systems is located at <ulink
       url="&hints-root;fakeroot.txt"/>.</para>
 
-      <para>Creation of package files that include dependency information is
-      complex and is beyond the scope of LFS.</para>
-
       <para>Slackware uses a <command>tar</command> based system for package
       archives.  This system purposely does not handle package dependencies
       as more complex package managers do.  For details of Slackware package
diff -Naurp LFS_orig/chapter08/procps.xml LFS-pacman/chapter08/procps.xml
--- LFS_orig/chapter08/procps.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/procps.xml	2022-06-16 20:05:13.904522425 -0500
@@ -40,18 +40,105 @@
   <sect2 role="installation">
     <title>Installation of Procps-ng</title>
 
-    <para>Prepare procps-ng for compilation:</para>
+    <para>Create the PKGBUILD for the Procps-ng package with the following
+    commands:</para>
 
-<screen revision="sysv"><userinput remap="configure">./configure --prefix=/usr                            \
-            --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
-            --disable-static                         \
-            --disable-kill</userinput></screen>
-
-<screen revision="systemd"><userinput remap="configure">./configure --prefix=/usr                            \
-            --docdir=/usr/share/doc/procps-ng-&procps-ng-version; \
-            --disable-static                         \
-            --disable-kill                           \
-            --with-systemd</userinput></screen>
+<screen revision="sysv"><userinput>mkdir /sources/procps-ng
+cd /sources/procps-ng
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="procps-ng"
+pkgver="&procps-ng-version;"
+pkgrel="1"
+pkgdesc="The Procps-ng package contains programs for monitoring processes."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'glibc'
+             'make'
+             'ncurses')
+checkdepends=('dejagnu')
+groups=('core')
+source=('&procps-ng-url;')
+md5sums=('&procps-ng-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr                            \
+              --docdir=/usr/share/doc/procps-ng-${pkgver} \
+              --disable-static                         \
+              --disable-kill
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # One test (free with commit) may fail
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+<screen revision="systemd"><userinput>mkdir /sources/procps-ng
+cd /sources/procps-ng
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="procps-ng"
+pkgver="&procps-ng-version;"
+pkgrel="1"
+pkgdesc="The Procps-ng package contains programs for monitoring processes."
+arch=('x86'
+      'x86_64')
+license=('GPLv2'
+         'LGPLv2')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'glibc'
+             'make'
+             'ncurses')
+checkdepends=('dejagnu')
+groups=('core')
+source=('&procps-ng-url;')
+md5sums=('&procps-ng-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr                            \
+              --docdir=/usr/share/doc/procps-ng-${pkgver} \
+              --disable-static                         \
+              --disable-kill                           \
+              --with-systemd
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # One test (free with commit) may fail
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure option:</title>
@@ -65,37 +152,23 @@
       </varlistentry>
     </variablelist>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
-<!--
-    <para>The test suite needs some custom modifications for LFS.
-    Remove a test that fails when scripting does not use a tty device and
-    fix two others.
-    To run the test suite, run the following commands:</para>
-
-<screen><userinput remap="test">sed -i -r 's|(pmap_initname)\\\$|\1|' testsuite/pmap.test/pmap.exp
-sed -i '/set tty/d' testsuite/pkill.test/pkill.exp
-rm testsuite/pgrep.test/pgrep.exp
-make check</userinput></screen>
--->
-    <para> To run the test suite, run:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <!-- It's because "free -v" shows "used" greater than "total", and
-         a negative "free" for "Comm" line.  The "total" value is from
-         "CommitLimit" in /proc/meminfo, which is the limit for one process.
-         But the "used" value is from "Committed_AS" in the same file,
-         which is the total commited virtual memory space of all processes.
-         I'll make a report to upstream anyway.  -->
-    <para>One test named <filename>free with commit</filename>
-    may fail if some applications with a custom memory allocator (for
-    example, JVM and Web browsers) are running on the host distro.</para>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/procps-ng-&procps-ng-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>Install the package:</para>
+    <para>Update the local cache and install the Procps-ng package:</para>
 
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S procps-ng --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/procps-ng
+cp PKGBUILD /srv/pacman/source/LFS/procps-ng
+cd /sources
+rm -rf procps-ng</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/psmisc.xml LFS-pacman/chapter08/psmisc.xml
--- LFS_orig/chapter08/psmisc.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/psmisc.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,22 +38,68 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Psmisc</title>
 
-    <para>Prepare Psmisc for compilation:</para>
+    <para>Create the PKGBUILD for the Psmisc package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>This package does not come with a test suite.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/psmisc
+cd /sources/psmisc
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="psmisc"
+pkgver="&psmisc-version;"
+pkgrel="1"
+pkgdesc="The Psmisc package contains programs for displaying information about running processes."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'ncurses'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed')
+source=('&psmisc-url;')
+md5sums=('&psmisc-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make -j1 DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/psmisc-&psmisc-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Psmisc package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S psmisc --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/psmisc
+cp PKGBUILD /srv/pacman/source/LFS/psmisc
+cd /sources
+rm -rf psmisc</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/pth.xml LFS-pacman/chapter08/pth.xml
--- LFS_orig/chapter08/pth.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/pth.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,184 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-pth" role="wrap">
+  <?dbhtml filename="pth.html"?>
+
+  <sect1info condition="script">
+    <productname>pth</productname>
+    <productnumber>&pth-version;</productnumber>
+    <address>&pth-url;</address>
+  </sect1info>
+
+  <title>Pth-&pth-version;</title>
+
+  <indexterm zone="ch-system-pth">
+    <primary sortas="a-Pth">Pth</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>Pth</application> package contains a very portable
+      POSIX/ANSI-C based library for Unix platforms which provides
+      non-preemptive priority-based scheduling for multiple threads of
+      execution (multithreading) inside event-driven applications. All
+      threads run in the same address space of the server application, but
+      each thread has its own individual program-counter, run-time stack,
+      signal mask and errno variable.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&pth-fin-sbu;</seg>
+        <seg>&pth-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+
+  <sect2>
+    <title>Installation of Pth</title>
+
+    <para>Create the PKGBUILD for the Pth package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/pth
+cd /sources/pth
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="pth"
+pkgver="&pth-version;"
+pkgrel="1"
+pkgdesc="${pkgname} ${pkgver}"
+arch=('x86'
+      'x86_64')
+license=('LGPLv2.1')
+groups=('core')
+groups=('core')
+depends=('glibc'
+         'libnsl')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+optdepends=('gcc-fortran')
+source=('&pth-url;')
+md5sums=('&pth-md5;')
+
+prepare(){
+  cd "${pkgname}-${pkgver}"
+
+  # Fix a compilation error
+  sed -i 's#$(LOBJS): Makefile#$(LOBJS): pth_p.h Makefile#' Makefile.in
+}
+
+build(){
+  cd "${pkgname}-${pkgver}"
+
+  # Don't add the --enable-pthread parameter to the configure command below else
+  # you will overwrite the pthread library and interface header installed by the
+  # Glibc package.
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --mandir=/usr/share/man
+  make
+}
+
+check(){
+  cd "${pkgname}-${pkgver}"
+  make test
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="${pkgdir}/" install
+  install -vdm755 /usr/share/doc/pth-${pkgver}
+  install -vm644  README PORTING SUPPORT TESTS \
+                  ${pkgdir}/usr/share/doc/pth-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/pth-&pth-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Pth package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S pth --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/pth
+cp PKGBUILD /srv/pacman/source/LFS/pth
+cd /sources
+rm -rf pth</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>pth-config</seg>
+        <seg>libpth.so</seg>
+        <seg>/usr/share/doc/pth-&pth-version;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="pth-config">
+        <term><command>pth-config</command></term>
+        <listitem>
+          <para>
+            is a utility used to configure and build applications based on
+            the pth(3) library. It can be used to query the C compiler and
+            linker flags which are required to correctly compile and link the
+            application against the pth(3) library.
+          </para>
+          <indexterm zone="ch-system-pth pth-config">
+            <primary sortas="b-pth-config">pth-config</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libpth">
+        <term><filename class="libraryfile">libpth.so</filename></term>
+        <listitem>
+          <para>
+            contains the API functions used by the GNU Portable Threads
+            Library.
+          </para>
+          <indexterm zone="ch-system-pth libpth">
+            <primary sortas="c-libpth">libpth.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+  </sect2>
+</sect1>
diff -Naurp LFS_orig/chapter08/python.xml LFS-pacman/chapter08/python.xml
--- LFS_orig/chapter08/python.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/python.xml	2022-06-16 20:05:13.904522425 -0500
@@ -42,104 +42,132 @@
   <sect2 role="installation">
     <title>Installation of Python 3</title>
 
-    <para>Prepare Python for compilation:</para>
+    <para>Create the PKGBUILD for the Python 3 package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr        \
-            --enable-shared      \
-            --with-system-expat  \
-            --with-system-ffi    \
-            --enable-optimizations</userinput></screen>
+<screen><userinput>mkdir /sources/python
+cd /sources/python
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="python"
+_pkgname="Python"
+pkgver="&python-version;"
+_pkgminor="&python-minor;"
+pkgrel="1"
+pkgdesc="The Python 3 package contains the Python development environment."
+arch=('x86'
+      'x86_64')
+license=('PSFLv2')
+groups=('core')
+depends=('bzip2'
+         'expat'
+         'gdbm'
+         'glibc'
+         'libffi'
+         'ncurses'
+         'openssl'
+         'rootfs'
+         'zlib')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'util-linux')
+checkdepends=('gdb'
+              'valgrind')
+optdepends=('berkeley-db'
+            'libnsl'
+            'sqlite'
+            'tk')
+source=("https://www.python.org/ftp/${pkgname}/${pkgver}/${_pkgname}-${pkgver}.tar.xz"
+        "https://www.python.org/ftp/${pkgname}/doc/${pkgver}/${pkgname}-${pkgver}-docs-html.tar.bz2")
+noextract=("${pkgname}-${pkgver}-docs-html.tar.bz2")
+md5sums=('&python-md5;'
+         '&python-docs-md5;')
+
+build(){
+  cd ${_pkgname}-${pkgver}
+  ./configure --prefix=/usr        \
+              --enable-shared      \
+              --with-system-expat  \
+              --with-system-ffi    \
+              --with-ensurepip=no  \
+              --enable-optimizations
+  make
+}
+
+# Running the tests at this point is not recommended. The tests are known to
+# hang indefinitely in the partial LFS environment. Future rebuilds/upgrades
+# should uncomment the following block
+#check(){
+#  cd ${_pkgname}-${pkgver}
+#  make check
+#}
+
+package(){
+  cd ${_pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+
+  # Disable the multi-line warning about running as root when packaging:
+  sed -e '/def warn_if_run_as_root/a\    return' \
+      -i ${pkgdir}/usr/lib/python${_pkgminor}/site-packages/pip/_internal/cli/req_command.py
+
+  # Install the Python documentation
+  install -v -dm755 ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html
+  tar --strip-components=1  \
+      --no-same-owner       \
+      --no-same-permissions \
+      -C ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/html \
+      -xvf ${srcdir}/${pkgname}-${pkgver}-docs-html.tar.bz2
+
+  # Remove pycache from pkgdir
+  for dir in `find ${pkgdir} -name __pycache__`; do
+    rm -rf $dir
+  done
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure options:</title>
 
-    <varlistentry>
-      <term><parameter>--with-system-expat</parameter></term>
-      <listitem>
-        <para>This switch enables linking against system version of
-        <application>Expat</application>.</para>
-       </listitem>
-     </varlistentry>
-
-    <varlistentry>
-      <term><parameter>--with-system-ffi</parameter></term>
-      <listitem>
-        <para>This switch enables linking against system version of
-        <application>libffi</application>.</para>
-      </listitem>
-    </varlistentry>
-
-    <varlistentry>
-      <term><parameter>--enable-optimizations</parameter></term>
-      <listitem>
-        <para>This switch enables stable, but expensive, optimizations.</para>
-      </listitem>
-    </varlistentry>
+      <varlistentry>
+        <term><parameter>--with-system-expat</parameter></term>
+        <listitem>
+          <para>This switch enables linking against system version of
+          <application>Expat</application>.</para>
+         </listitem>
+       </varlistentry>
 
-    </variablelist>
+      <varlistentry>
+        <term><parameter>--with-system-ffi</parameter></term>
+        <listitem>
+          <para>This switch enables linking against system version of
+          <application>libffi</application>.</para>
+        </listitem>
+      </varlistentry>
 
-    <para>Compile the package:</para>
+      <varlistentry>
+        <term><parameter>--with-ensurepip=no</parameter></term>
+        <listitem>
+            <para>Unlike in standard LFS, because we are packaging, we do not
+            want to install pip as part of the python build, but rather
+            independently, as is setuptools.</para>
+        </listitem>
+      </varlistentry>
 
-<screen><userinput remap="make">make</userinput></screen>
+      <varlistentry>
+        <term><parameter>--enable-optimizations</parameter></term>
+        <listitem>
+          <para>This switch enables stable, but expensive, optimizations.</para>
+        </listitem>
+      </varlistentry>
 
-    <para>Running the tests at this point is not recommended.  The
-    tests are known to hang indefinitely in the partial LFS environment.
-    If desired, the tests can be rerun at the end of this chapter or
-    when Python 3 is reinstalled in BLFS.  To run the tests anyway,
-    issue <command>make test</command>.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>In serveral places we use the <command>pip3</command> command to
-    install Python 3 programs and modules for all users as
-    <systemitem class='username'>root</systemitem>. This conflicts
-    with the Python developers recommendation to install packages into a
-    virtual environment or the home directory of a regular user (by running
-    <command>pip3</command> as this user). To this end, a multi-line warning
-    is written when using <command>pip3</command> as the
-    <systemitem class='username'>root</systemitem> user.  The main reason
-    of this recommendation is for avoiding a conflict with the system
-    package manager (<command>dpkg</command> for example), but LFS does not
-    have a system-wide package manager so this is not a problem.  If desired,
-    suppress this warning by running the following command:</para>
-
-<screen><userinput remap="install">sed -e '/def warn_if_run_as_root/a\    return' \
-    -i /usr/lib/python3.10/site-packages/pip/_internal/cli/req_command.py
-</userinput></screen>
-
-    <important>
-      <para>
-        In LFS and BLFS we normally build and install Python modules with the
-        <command>pip3</command> command.  Please take care that the
-        <command>pip3 install</command> commands in both the books should be
-        run as the &root; user unless it's for a Python virtual environment.
-        Running a <command>pip3 install</command> as a non-&root; user may seem
-        to work fine, but it will cause the installed module to be inaccessible
-        by other users.
-      </para>
-
-      <para>
-        <command>pip3 install</command> will not reinstall an already installed
-        module by default.  For using the <command>pip3 install</command>
-        command to upgrade a module (for example, from meson-0.61.3 to
-        meson-0.62.0), insert the option <parameter>--upgrade</parameter> into
-        the command line.  If it's really necessary to downgrade a module or
-        reinstall the same version for some reason, insert 
-        <parameter>--force-reinstall</parameter> into the command line.
-      </para>
-    </important>
-
-    <para>If desired, install the preformatted documentation:</para>
-
-<screen><userinput remap="install">install -v -dm755 /usr/share/doc/python-&python-version;/html
-
-tar --strip-components=1  \
-    --no-same-owner       \
-    --no-same-permissions \
-    -C /usr/share/doc/python-&python-version;/html \
-    -xvf ../python-&python-version;-docs-html.tar.bz2</userinput></screen>
+    </variablelist>
 
     <variablelist>
       <title>The meaning of the documentation install commands:</title>
@@ -156,6 +184,24 @@ tar --strip-components=1  \
 
     </variablelist>
 
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/python-&python-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Python 3 package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S python --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/python
+cp PKGBUILD /srv/pacman/source/LFS/python
+cd /sources
+rm -rf python</userinput></screen>
+
   </sect2>
 
   <sect2 id="contents-python" role="content">
@@ -168,7 +214,7 @@ tar --strip-components=1  \
 
       <seglistitem>
         <seg>
-          2to3, idle3, pip3, pydoc3, python3, and python3-config
+        2to3, idle3, <!--pip3,--> pydoc3, python3, and python3-config
         </seg>
         <seg>
           libpython&python-minor;.so and libpython3.so
@@ -215,7 +261,7 @@ tar --strip-components=1  \
           </indexterm>
         </listitem>
       </varlistentry>
-
+      <!--
       <varlistentry id="pip3">
         <term><command>pip3</command></term>
         <listitem>
@@ -228,7 +274,7 @@ tar --strip-components=1  \
           </indexterm>
         </listitem>
       </varlistentry>
-
+      -->
       <varlistentry id="pydoc3">
         <term><command>pydoc3</command></term>
         <listitem>
diff -Naurp LFS_orig/chapter08/readline.xml LFS-pacman/chapter08/readline.xml
--- LFS_orig/chapter08/readline.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/readline.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,23 +38,56 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Readline</title>
 
-    <para>Reinstalling Readline will cause the old libraries to be moved to
-    &lt;libraryname&gt;.old. While this is normally not a problem, in some cases
-    it can trigger a linking bug in <command>ldconfig</command>. This can be
-    avoided by issuing the following two seds:</para>
-
-<screen><userinput remap="pre">sed -i '/MV.*old/d' Makefile.in
-sed -i '/{OLDSUFF}/c:' support/shlib-install</userinput></screen>
-
-    <para>Prepare Readline for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --disable-static \
-            --with-curses    \
-            --docdir=/usr/share/doc/readline-&readline-version;</userinput></screen>
+    <para>Create the PKGBUILD for the Readline package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/readline
+cd /sources/readline
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="readline"
+pkgver="&readline-version;"
+pkgrel="1"
+pkgdesc="The Readline package offers command-line editing and history capabilities."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'ncurses'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gawk'
+             'gcc'
+             'grep'
+             'make'
+             'patch'
+             'sed'
+             'texinfo')
+source=('&readline-url;')
+md5sums=('&readline-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --with-curses    \
+              --docdir=/usr/share/doc/readline-${pkgver}
+  make SHLIB_LIBS="-lncursesw"
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} SHLIB_LIBS="-lncursesw" install
+  install -v -m644 doc/*.{ps,pdf,html,dvi} ${pkgdir}/usr/share/doc/readline-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
 
      <variablelist>
       <title>The meaning of the configure option:</title>
@@ -71,10 +104,6 @@ sed -i '/{OLDSUFF}/c:' support/shlib-ins
 
     </variablelist>
 
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make SHLIB_LIBS="-lncursesw"</userinput></screen>
-
     <variablelist>
       <title>The meaning of the make option:</title>
 
@@ -90,13 +119,23 @@ sed -i '/{OLDSUFF}/c:' support/shlib-ins
 
     <para>This package does not come with a test suite.</para>
 
-    <para>Install the package:</para>
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/readline-&readline-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Readline package:</para>
 
-<screen><userinput remap="install">make SHLIB_LIBS="-lncursesw" install</userinput></screen>
+<screen><userinput>pacman -Syu
+pacman -S readline --overwrite \* -dd --noconfirm</userinput></screen>
 
-    <para>If desired, install the documentation:</para>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="install">install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-&readline-version;</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/readline
+cp PKGBUILD /srv/pacman/source/LFS/readline
+cd /sources
+rm -rf readline</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/rootfs.xml LFS-pacman/chapter08/rootfs.xml
--- LFS_orig/chapter08/rootfs.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/rootfs.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,589 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-rootfs" role="wrap">
+  <?dbhtml filename="rootfs.html"?>
+
+  <title>The root filesystem package</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The rootfs package provides the root filesystem layout, essential files
+    and symlinks, and base configuration files used in an LFS system.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&rootfs-fin-sbu;</seg>
+        <seg>&rootfs-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installaiton of the rootfs package</title>
+
+    <para>While most of these directories and links were installed to the main
+    LFS partition in <xref linkend='ch-tools-creatingdirs'/> and
+    <xref linkend='ch-tools-createfiles'/>, they also need to be packaged and
+    reinstalled. Additionally, other configuration files from
+    <xref linkend='chapter-config'/> and parts of BLFS are included.
+    Prepare the PKGBUILD for the rootfs package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/rootfs
+cd /sources/rootfs
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname=rootfs
+pkgver=1.1
+pkgrel=1
+pkgdesc="Skeleton directory layout"
+arch=('any')
+license=('CC-BY-SA-2.0')
+groups=('core')
+backup=('etc/fstab'
+        'etc/group'
+        'etc/hosts'
+        'etc/inputrc'
+        'etc/ld.so.conf'
+        'etc/ld.so.cache'
+        'etc/passwd'
+        'etc/resolv.conf'
+        'etc/shells'
+        'usr/share/info/dir'
+        'var/log/btmp'
+        'var/log/faillog'
+        'var/log/lastlog'
+        'var/log/wtmp')
+# Don't compress /usr/share/info/dir
+options=(!zipman emptydirs)
+
+package(){
+  # Don't remove /usr/share/info/dir for only this package
+  PURGE_TARGETS=(.packlist *.pod)
+
+  # LFS Section 4.2
+  install -vdm755 ${pkgdir}/{etc,lib64,usr/{bin,lib,sbin},var}
+  for i in bin lib sbin; do
+    ln -sfv usr/$i ${pkgdir}/$i
+  done
+
+  # LFS Section 7.3
+  install -vdm755 ${pkgdir}/{dev,proc,run,sys}
+
+  # LFS Section 7.3.1
+  mknod -m 666 ${pkgdir}/dev/console c 5 1
+  mknod -m 666 ${pkgdir}/dev/null c 1 3
+
+  # LFS Section 7.5
+  install -vdm755 ${pkgdir}/{boot,home,mnt,opt,srv}
+  install -vdm755 ${pkgdir}/etc/{opt,sysconfig}
+  install -vdm755 ${pkgdir}/lib/firmware
+  install -vdm755 ${pkgdir}/media/{floppy,cdrom}
+  install -vdm755 ${pkgdir}/usr/{,local/}{include,src}
+  install -vdm755 ${pkgdir}/usr/local/{bin,lib,sbin}
+  install -vdm755 ${pkgdir}/usr/{,local/}share/{color,dict,doc,info,locale,man}
+  install -vdm755 ${pkgdir}/usr/{,local/}share/{misc,terminfo,zoneinfo}
+  install -vdm755 ${pkgdir}/usr/{,local/}share/man/man{1..8}
+  install -vdm755 ${pkgdir}/var/{cache,local,log,mail,opt,spool}
+  install -vdm755 ${pkgdir}/var/lib/{color,misc,locate}
+  install -vdm750 ${pkgdir}/root
+  install -vdm1777 ${pkgdir}{,/var}/tmp
+  ln -sfv /run ${pkgdir}/var/run
+  ln -sfv /run/lock ${pkgdir}/var/lock
+
+  # LFS Section 7.6
+  ln -sfv /proc/self/mounts ${pkgdir}/etc/mtab
+  cat &gt; ${pkgdir}/etc/passwd &lt;&lt; "EOF"
+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:/run/dbus:/bin/false
+uuidd:x:80:80:UUID Generation Daemon User:/dev/null:/bin/false
+tester:x:101:101::/home/tester:/bin/bash
+pacman:x:102:102:Pacman Packaging User:/home/pacman:/bin/bash
+nobody:x:65534:65534:Unprivileged User:/dev/null:/usr/bin/false
+EOF
+  cat &gt; ${pkgdir}/etc/group &lt;&lt; "EOF"
+root:x:0:
+bin:x:1:daemon
+sys:x:2:
+kmem:x:3:
+tape:x:4:
+tty:x:5:
+daemon:x:6:
+floppy:x:7:
+disk:x:8:
+lp:x:9:
+dialout:x:10:
+audio:x:11:
+video:x:12:
+utmp:x:13:
+usb:x:14:
+cdrom:x:15:
+adm:x:16:
+messagebus:x:18:
+input:x:24:
+mail:x:34:
+kvm:x:61:
+uuidd:x:80:
+wheel:x:97:
+tester:x:101:
+pacman:x:102:
+users:x:999:
+nogroup:x:65534:
+EOF
+
+  install -o 101 -d /home/tester
+  touch ${pkgdir}/var/log/{btmp,lastlog,faillog,wtmp}
+  chgrp -v utmp ${pkgdir}/var/log/lastlog
+  chmod -v 664  ${pkgdir}/var/log/lastlog
+  chmod -v 600  ${pkgdir}/var/log/btmp
+
+  # LFS Sections 7.6 and 9.5.4
+  cat &gt; ${pkgdir}/etc/hosts &lt;&lt; "EOF"
+# Begin /etc/hosts
+
+# IPv4
+127.0.0.1 localhost.localdomain localhost
+# Populate the follwoing lines after installation
+#127.0.1.1 &gt;FQDN&lt; &gt;HOSTNAME&lt;
+#&gt;192.168.1.1&lt; &gt;FQDN&lt; &gt;HOSTNAME&lt; [alias1] [alias2 ...]
+
+# IPv6
+::1       localhost ip6-localhost ip6-loopback
+ff02::1   ip6-allnodes
+ff02::2   ip6-allrouters
+
+# End /etc/hosts
+EOF
+
+  # LFS Section 8.5.2.3
+  install -vdm755 ${pkgdir}/etc/ld.so.conf.d/
+  cat &gt; ${pkgdir}/etc/ld.so.conf &lt;&lt; "EOF"
+# Begin /etc/ld.so.conf
+
+/usr/local/lib
+/opt/lib
+
+# Add an include directory
+include /etc/ld.so.conf.d/*.conf
+
+# End /etc/ld.so.conf
+EOF
+
+  # LFS Section 9.5.2
+  cat &gt; ${pkgdir}/etc/resolv.conf &lt;&lt; "EOF"
+# Begin /etc/resolv.conf
+
+domain localdomain
+nameserver 8.8.8.8
+nameserver 8.8.4.4
+
+# End /etc/resolv.conf
+EOF
+
+  # LFS Section 9.5.3
+  echo "lfs" &gt; ${pkgdir}/etc/hostname
+
+  # LFS Section 9.7 and BLFS Bash Shell Startup Files
+  cat &gt; ${pkgdir}/etc/profile &lt;&lt; "EOF"
+# Begin /etc/profile
+# Written for Beyond Linux From Scratch
+# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
+# modifications by Dagmar d'Surreal &lt;rivyqntzne@pbzpnfg.arg&gt;
+
+# System wide environment variables and startup programs.
+
+# System wide aliases and functions should go in /etc/bashrc.  Personal
+# environment variables and startup programs should go into
+# ~/.bash_profile.  Personal aliases and functions should go into
+# ~/.bashrc.
+
+# Functions to help us manage paths.  Second argument is the name of the
+# path variable to be modified (default: PATH)
+pathremove () {
+        local IFS=':'
+        local NEWPATH
+        local DIR
+        local PATHVARIABLE=${2:-PATH}
+        for DIR in ${!PATHVARIABLE} ; do
+                if [ "$DIR" != "$1" ] ; then
+                  NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
+                fi
+        done
+        export $PATHVARIABLE="$NEWPATH"
+}
+
+pathprepend () {
+        pathremove $1 $2
+        local PATHVARIABLE=${2:-PATH}
+        export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
+}
+
+pathappend () {
+        pathremove $1 $2
+        local PATHVARIABLE=${2:-PATH}
+        export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
+}
+
+export -f pathremove pathprepend pathappend
+
+# Set the initial path
+export PATH=/bin:/usr/bin
+
+if [ $EUID -eq 0 ] ; then
+        pathappend /sbin:/usr/sbin
+        unset HISTFILE
+fi
+
+# Setup some environment variables.
+export HISTSIZE=1000
+export HISTIGNORE="&amp;:[bf]g:exit"
+
+# Set some defaults for graphical systems
+export XDG_DATA_DIRS=${XDG_DATA_DIRS:-/usr/share/}
+export XDG_CONFIG_DIRS=${XDG_CONFIG_DIRS:-/etc/xdg/}
+export XDG_RUNTIME_DIR=${XDG_RUNTIME_DIR:-/tmp/xdg-$USER}
+
+# Setup different prompt colors for local/remote and root/non-root users
+NORMAL="\[\e[0m\]"
+RED="\[\e[1;31m\]"
+GREEN="\[\e[1;32m\]"
+YELLOW="\[\e[1;33m\]"
+MAGENTA="\[\e[1;35m\]"
+CYAN="\[\e[1;36m\]"
+
+# Set local prompt color
+if [[ $EUID == 0 ]] ; then
+  if [[ $TERM == "screen" ]] ; then
+    PS1="$RED\u [ $NORMAL\w$RED ] (screen)# $NORMAL"
+  else
+    PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
+  fi
+else
+  if [[ $TERM == "screen" ]] ; then
+    PS1="$YELLOW\w [ $NORMAL\w$YELLOW] (screen)\$ $NORMAL"
+  else
+    PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
+  fi
+fi
+
+# Set remote prompt
+if [[ "$SSH_CLIENT" != "" ]] ; then
+  if [[ $EUID == 0 ]] ; then
+    if [[ $TERM == "screen" ]] ; then
+      PS1="$MAGENTA\u@\h [ $NORMAL\w$MAGENTA ] (screen)# $NORMAL"
+    else
+      PS1="$MAGENTA\u@\h [ $NORMAL\w$MAGENTA ]# $NORMAL"
+    fi
+  else
+    if [[ $TERM == "screen" ]] ; then
+      PS1="$CYAN\u@\h [ $NORMAL\w$CYAN ] (screen)\$ $NORMAL"
+    else
+      PS1="$CYAN\u@\h [ $NORMAL\w$CYAN ]\$ $NORMAL"
+    fi
+  fi
+fi
+
+for script in /etc/profile.d/*.sh ; do
+        if [ -r $script ] ; then
+                . $script
+        fi
+done
+
+unset script RED GREEN MAGENTA CYAN YELLOW NORMAL
+
+# End /etc/profile
+EOF
+  install --directory --mode=0755 --owner=root --group=root ${pkgdir}/etc/profile.d
+  cat &gt; ${pkgdir}/etc/profile.d/bash_completion.sh &lt;&lt; "EOF"
+# Begin /etc/profile.d/bash_completion.sh
+# Import bash completion scripts
+
+# If the bash-completion package is installed, use its configuration instead
+if [ -f /usr/share/bash-completion/bash_completion ]; then
+
+  # Check for interactive bash and that we haven't already been sourced.
+  if [ -n "${BASH_VERSION-}" -a -n "${PS1-}" -a -z "${BASH_COMPLETION_VERSINFO-}" ]; then
+
+    # Check for recent enough version of bash.
+    if [ ${BASH_VERSINFO[0]} -gt 4 ] || \
+       [ ${BASH_VERSINFO[0]} -eq 4 -a ${BASH_VERSINFO[1]} -ge 1 ]; then
+       [ -r "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion" ] &amp;&amp; \
+            . "${XDG_CONFIG_HOME:-$HOME/.config}/bash_completion"
+       if shopt -q progcomp &amp;&amp; [ -r /usr/share/bash-completion/bash_completion ]; then
+          # Source completion code.
+          . /usr/share/bash-completion/bash_completion
+       fi
+    fi
+  fi
+
+else
+
+  # bash-completions are not installed, use only bash completion directory
+  if shopt -q progcomp; then
+    for script in /etc/bash_completion.d/* ; do
+      if [ -r $script ] ; then
+        . $script
+      fi
+    done
+  fi
+fi
+
+# End /etc/profile.d/bash_completion.sh
+EOF
+  install --directory --mode=0755 --owner=root --group=root ${pkgdir}/etc/bash_completion.d
+  cat &gt; ${pkgdir}/etc/profile.d/dircolors.sh &lt;&lt; "EOF"
+# Setup for /bin/ls and /bin/grep to support color, the alias is in /etc/bashrc.
+if [ -f "/etc/dircolors" ] ; then
+        eval $(dircolors -b /etc/dircolors)
+fi
+
+if [ -f "$HOME/.dircolors" ] ; then
+        eval $(dircolors -b $HOME/.dircolors)
+fi
+
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+EOF
+  cat &gt; ${pkgdir}/etc/profile.d/extrapaths.sh &lt;&lt; "EOF"
+if [ -d /usr/local/lib/pkgconfig ] ; then
+        pathappend /usr/local/lib/pkgconfig PKG_CONFIG_PATH
+fi
+if [ -d /usr/local/bin ]; then
+        pathprepend /usr/local/bin
+fi
+if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
+        pathprepend /usr/local/sbin
+fi
+
+if [ -d /usr/local/share ]; then
+        pathprepend /usr/local/share XDG_DATA_DIRS
+fi
+
+# Set some defaults before other applications add to these paths.
+pathappend /usr/share/man  MANPATH
+pathappend /usr/share/info INFOPATH
+EOF
+  cat &gt; ${pkgdir}/etc/profile.d/readline.sh &lt;&lt; "EOF"
+# Setup the INPUTRC environment variable.
+if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
+        INPUTRC=/etc/inputrc
+fi
+export INPUTRC
+EOF
+  cat &gt; ${pkgdir}/etc/profile.d/umask.sh &lt;&lt; "EOF"
+# By default, the umask should be set.
+if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then
+  umask 002
+else
+  umask 022
+fi
+EOF
+  cat &gt; ${pkgdir}/etc/profile.d/i18n.sh &lt;&lt; "EOF"
+# Set up i18n variables
+export LANG=en_US.UTF-8
+EOF
+  cat &gt; ${pkgdir}/etc/bashrc &lt;&lt; "EOF"
+# Begin /etc/bashrc
+# Written for Beyond Linux From Scratch
+# by James Robertson &lt;jameswrobertson@earthlink.net&gt;
+# updated by Bruce Dubbs &lt;bdubbs@linuxfromscratch.org&gt;
+
+# System wide aliases and functions.
+
+# System wide environment variables and startup programs should go into
+# /etc/profile.  Personal environment variables and startup programs
+# should go into ~/.bash_profile.  Personal aliases and functions should
+# go into ~/.bashrc
+
+# Provides colored /bin/ls and /bin/grep commands.  Used in conjunction
+# with code in /etc/profile.
+
+alias ls='ls --color=auto'
+alias grep='grep --color=auto'
+
+# Provides prompt for non-login shells, specifically shells started
+# in the X environment. [Review the LFS archive thread titled
+# PS1 Environment Variable for a great case study behind this script
+# addendum.]
+
+# Setup different prompt colors for local/remote and root/non-root users
+NORMAL="\[\e[0m\]"
+RED="\[\e[1;31m\]"
+GREEN="\[\e[1;32m\]"
+YELLOW="\[\e[1;33m\]"
+MAGENTA="\[\e[1;35m\]"
+CYAN="\[\e[1;36m\]"
+
+# Set local prompt color
+if [[ $EUID == 0 ]] ; then
+  if [[ $TERM == "screen" ]] ; then
+    PS1="$RED\u [ $NORMAL\w$RED ] (screen)# $NORMAL"
+  else
+    PS1="$RED\u [ $NORMAL\w$RED ]# $NORMAL"
+  fi
+else
+  if [[ $TERM == "screen" ]] ; then
+    PS1="$YELLOW\w [ $NORMAL\w$YELLOW] (screen)\$ $NORMAL"
+  else
+    PS1="$GREEN\u [ $NORMAL\w$GREEN ]\$ $NORMAL"
+  fi
+fi
+
+# Set remote prompt
+if [[ "$SSH_CLIENT" != "" ]] ; then
+  if [[ $EUID == 0 ]] ; then
+    if [[ $TERM == "screen" ]] ; then
+      PS1="$MAGENTA\u\h [ $NORMAL\w$MAGENTA ] (screen)# $NORMAL"
+    else
+      PS1="$MAGENTA\u@\h [ $NORMAL\w$MAGENTA ]# $NORMAL"
+    fi
+  else
+    if [[ $TERM == "screen" ]] ; then
+      PS1="$CYAN\u@\h [ $NORMAL\w$CYAN ] (screen)\$ $NORMAL"
+    else
+      PS1="$CYAN\u@\h [ $NORMAL\w$CYAN ]\$ $NORMAL"
+    fi
+  fi
+fi
+
+unset RED GREEN MAGENTA YELLOW CYAN NORMAL
+
+# End /etc/bashrc
+EOF
+
+  # LFS Section 9.8
+  cat &gt; ${pkgdir}/etc/inputrc &lt;&lt; "EOF"
+# Begin /etc/inputrc
+# Modified by Chris Lynn &gt;roryo@roryo.dynup.net&lt;
+
+# Allow the command prompt to wrap to the next line
+set horizontal-scroll-mode Off
+
+# Enable 8bit input
+set meta-flag On
+set input-meta On
+
+# Turns off 8th bit stripping
+set convert-meta Off
+
+# Keep the 8th bit for display
+set output-meta On
+
+# none, visible or audible
+set bell-style none
+
+# All of the following map the escape sequence of the value
+# contained in the 1st argument to the readline specific functions
+"\eOd": backward-word
+"\eOc": forward-word
+
+# for linux console
+"\e[1~": beginning-of-line
+"\e[4~": end-of-line
+"\e[5~": beginning-of-history
+"\e[6~": end-of-history
+"\e[3~": delete-char
+"\e[2~": quoted-insert
+
+# for xterm
+"\eOH": beginning-of-line
+"\eOF": end-of-line
+
+# for Konsole
+"\e[H": beginning-of-line
+"\e[F": end-of-line
+
+# End /etc/inputrc"${pkgdir}/
+EOF
+
+  # LFS Section 9.9
+  cat &gt; ${pkgdir}/etc/shells &lt;&lt; "EOF"
+# Begin /etc/shells
+
+/bin/sh
+/bin/bash
+
+# End /etc/shells
+EOF
+
+  # LFS Section 10.2
+  cat &gt; ${pkgdir}/etc/fstab &lt;&lt; "EOF"
+# Begin /etc/fstab
+
+# file system  mount-point  type     options             dump  fsck
+#                                                              order
+/dev/&gt;xxx&lt;     /            &gt;fff&lt;    defaults            1     1
+/dev/&gt;yyy&lt;     swap         swap     pri=1               0     0
+proc           /proc        proc     nosuid,noexec,nodev 0     0
+sysfs          /sys         sysfs    nosuid,noexec,nodev 0     0
+devpts         /dev/pts     devpts   gid=5,mode=620      0     0
+tmpfs          /run         tmpfs    defaults            0     0
+devtmpfs       /dev         devtmpfs mode=0755,nosuid    0     0
+
+# End /etc/fstab
+EOF
+
+  # Post LFS fixes:
+  touch ${pkgdir}/usr/share/info/dir
+  chmod 0644 ${pkgdir}/usr/share/info/dir
+  touch ${pkgdir}/etc/ld.so.cache
+  chmod 0644 ${pkgdir}/etc/ld.so.cache
+  chmod 0555 ${pkgdir}/proc
+  chmod 1777 ${pkgdir}/run
+  chmod 0555 ${pkgdir}/sys
+}
+REALEOF</literal></userinput></screen>
+
+    <para>Produce the rootfs package using the following commands:</para>
+
+<screen><userinput>chown -R root:pacman .
+chmod 2775 .
+chmod 664 PKGBUILD
+su pacman -c 'makepkg -L --nodeps'</userinput></screen>
+
+    <para>Add the newly created package to the central package repository:</para>
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/rootfs-1.1-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the rootfs package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S rootfs --overwrite \* -dd --noconfirm</userinput></screen>
+
+
+    <para>Despite the overwrite flag above, configuration files are a special
+    case and are added to the filesystem with a ".pacnew" file extension.
+    Overwrite the original files with the ones from this package using the
+    following command:</para>
+
+<screen><userinput>for file in `find / -name "*.pacnew"`
+do
+    cp -vf "${file}" "${file%.*}"
+done</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/rootfs
+cp PKGBUILD /srv/pacman/source/LFS/rootfs
+cd /sources
+rm -rf rootfs</userinput></screen>
+
+  </sect2>
+
+</sect1>
+
diff -Naurp LFS_orig/chapter08/rpcsvc-proto.xml LFS-pacman/chapter08/rpcsvc-proto.xml
--- LFS_orig/chapter08/rpcsvc-proto.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/rpcsvc-proto.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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="rpcsvc-proto" xreflabel="rpcsvc-proto-&rpcsvc-proto-version;">
+  <?dbhtml filename="rpcsvc-proto.html"?>
+
+  <sect1info condition="script">
+    <productname>rpcsvc-proto</productname>
+    <productnumber>&rpcsvc-proto-version;</productnumber>
+    <address>&rpcsvc-proto-url;</address>
+  </sect1info>
+
+  <title>rpcsvc-proto-&rpcsvc-proto-version;</title>
+
+  <indexterm zone="rpcsvc-proto">
+    <primary sortas="a-rpcsvc-proto">rpcsvc-proto</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to rpcsvc-proto</title>
+
+    <para>
+      The <application>rpcsvc-proto</application> package contains the rcpsvc
+      protocol files and headers, formerly included with glibc, that are not
+      included in replacement <xref linkend="libtirpc"/>, along with the rpcgen
+      program.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&rpcsvc-proto-fin-sbu;</seg>
+        <seg>&rpcsvc-proto-fin-du;</seg>
+      </seglistitem>
+  </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of rpcsvc-proto</title>
+
+    <para>Create the PKGBUILD for the rpcsvc-propo package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/rpcsvc-proto
+cd /sources/rpcsvc-proto
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="rpcsvc-proto"
+pkgver="&rpcsvc-proto-version;"
+pkgrel="1"
+pkgdesc="The rpcsvc-proto package contains the rcpsvc protocol files and headers, formerly included with glibc."
+arch=('x86'
+      'x86_64')
+license=('BSD3C')
+groups=('core')
+depends=('glibc')
+makedepends=('binutils'
+             'coreutils'
+             'gettext'
+             'gcc'
+             'glibc'
+             'grep'
+             'make'
+             'sed')
+source=("https://github.com/thkukuk/${pkgname}/releases/download/v${pkgver}/${pkgname}-${pkgver}.tar.xz")
+md5sums=('&rpcsvc-proto-md5;')
+
+build() {
+  cd ${pkgname}-${pkgver}
+  ./configure --sysconfdir=/etc
+  make
+}
+
+package() {
+  cd ${pkgname}-${pkgver}
+  make DESTDIR="$pkgdir" install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/rpcsvc-proto-&rpcsvc-proto-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the rpcsvc-proto package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S rpcsvc-proto --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/rpcsvc-proto
+cp PKGBUILD /srv/pacman/source/LFS/rpcsvc-proto
+cd /sources
+rm -rf rpcsvc-proto</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          rpcgen
+        </seg>
+        <seg>
+          None
+        </seg>
+        <seg>
+          /usr/include/rpcsvc
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="rpcgen">
+        <term><command>rpcgen</command></term>
+        <listitem>
+          <para>
+            Generates C code to implement the RPC protocol
+          </para>
+          <indexterm zone="rpcsvc-proto rpcgen">
+            <primary sortas="b-rpcgen">rpcgen</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/sed.xml LFS-pacman/chapter08/sed.xml
--- LFS_orig/chapter08/sed.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/sed.xml	2022-06-16 20:05:13.904522425 -0500
@@ -37,28 +37,80 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Sed</title>
 
-    <para>Prepare Sed for compilation:</para>
+    <para>Create the PKGBUILD for the Sed package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package and generate the HTML documentation:</para>
-
-<screen><userinput remap="make">make
-make html</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">chown -Rv tester .
-su tester -c "PATH=$PATH make check"</userinput></screen>
-
-    <para>Install the package and its documentation:</para>
-
-<screen><userinput remap="install">make install
-install -d -m755           /usr/share/doc/sed-&sed-version;
-install -m644 doc/sed.html /usr/share/doc/sed-&sed-version;</userinput></screen>
+<screen><userinput>mkdir /sources/sed
+cd /sources/sed
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="sed"
+pkgver="&sed-version;"
+pkgrel="1"
+pkgdesc="The Sed package contains a stream editor."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('acl'
+         'attr'
+         'glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('diffutils'
+              'gawk')
+source=('&sed-url;')
+md5sums=('&sed-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+   ./configure --prefix=/usr
+  make
+  make html
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make -k check 2&gt;&amp;1 || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  install -d -m755           ${pkgdir}/usr/share/doc/sed-${pkgver}
+  install -m644 doc/sed.html ${pkgdir}/usr/share/doc/sed-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/sed-&sed-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Sed package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S sed --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/sed
+cp PKGBUILD /srv/pacman/source/LFS/sed
+cd /sources
+rm -rf sed</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/setuptools.xml LFS-pacman/chapter08/setuptools.xml
--- LFS_orig/chapter08/setuptools.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/setuptools.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,106 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-setuptools" role="wrap">
+  <?dbhtml filename="setuptools.html"?>
+
+  <sect1info condition="script">
+    <productname>setuptools</productname>
+    <productnumber>&setuptools-version;</productnumber>
+    <address>&setuptools-url;</address>
+  </sect1info>
+
+  <title>Setuptools-&setuptools-version;</title>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The Setuptools module provides a method to easily download,
+    build, install, upgrade, and uninstall Python packages.</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&setuptools-fin-sbu;</seg>
+        <seg>&setuptools-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of Setuptools</title>
+
+    <para>Create the PKGBUILD for the Setuptools package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/setuptools
+cd /sources/setuptools
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="setuptools"
+pkgver="&setuptools-version;"
+pkgrel="1"
+pkgdesc="The Setuptools module provides a method to easily download, build, install, upgrade, and uninstall Python packages."
+arch=('any')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('python')
+source=('&setuptools-url;')
+md5sums=('&setuptools-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  python3 setup.py build
+}
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1 --skip-build
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/setuptools-&setuptools-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Setuptools package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S setuptools --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/setuptools
+cp PKGBUILD /srv/pacman/source/LFS/setuptools
+cd /sources
+rm -rf setuptools</userinput></screen>
+
+  </sect2>
+
+  <sect2 id="contents-setuptools" role="content">
+      <title>Contents of Setuptools</title>
+
+    <segmentedlist>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>
+          /usr/include/python&python-minor;/site-packages/setuptools{,-58.1.0-py3.10.egg-info}
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/sgml-common.xml LFS-pacman/chapter08/sgml-common.xml
--- LFS_orig/chapter08/sgml-common.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/sgml-common.xml	2022-06-16 20:05:13.901189092 -0500
@@ -0,0 +1,203 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-sgml-common" role="wrap">
+  <?dbhtml filename="sgml-common.html"?>
+
+  <sect1info condition="script">
+    <productname>sgml-common</productname>
+    <productnumber>&sgml-common-version;</productnumber>
+    <address>&sgml-common-url;</address>
+  </sect1info>
+
+  <title>sgml-common-&sgml-common-version;</title>
+
+  <indexterm zone="ch-system-sgml-common">
+    <primary sortas="a-sgml-common">sgml-common</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>SGML Common</application> package contains
+      <command>install-catalog</command>. This is useful for creating and
+      maintaining centralized SGML catalogs.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&sgml-common-fin-sbu;</seg>
+        <seg>&sgml-common-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of SGML Common</title>
+
+    <para>
+      Instead of the normal convention of including the autotools files
+      in the package, the maintainers included symlinks to the files in
+      <filename class="directory">/usr/share/automake</filename>. For previous
+      versions of <application>Automake</application> this convention is
+      correct, but recent versions of <application>Automake</application>
+      install the internal files in version specific directories. This causes
+      the <command>configure</command> script to abort. To fix this error, the
+      autotools are regenerated. Since the included
+      <filename>Makefile.am</filename> file uses a syntax not supported by
+      current versions of <application>Automake</application>, a patch is
+      required to fix the syntax.
+    </para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../sgml-common-0.6.3-manpage-1.patch &amp;&amp;
+autoreconf -f -i</userinput></screen>
+
+    <para>
+      Configure <application>SGML Common</application> by
+      running the following commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr --sysconfdir=/etc</userinput></screen>
+
+    <para>
+      Build <application>SGML Common</application> by
+      running the following commands:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      This package does not come with a test suite.
+    </para>
+
+    <para>
+      Install <application>SGML Common</application> by
+      running the following commands:
+    </para>
+
+<screen><userinput remap="install">make docdir=/usr/share/doc install
+
+install-catalog --add /etc/sgml/sgml-ent.cat \
+    /usr/share/sgml/sgml-iso-entities-8879.1986/catalog
+
+install-catalog --add /etc/sgml/sgml-docbook.cat \
+    /etc/sgml/sgml-ent.cat</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="configuration">
+    <title>Configuring SGML Common</title>
+
+    <sect3 id="sgml-common-config">
+      <title>Config Files</title>
+
+      <para>
+        <filename>/etc/sgml/sgml.conf</filename>
+      </para>
+
+      <indexterm zone="ch-system-sgml-common sgml-common-config">
+        <primary sortas="e-etc-sgml-sgml.conf">/etc/sgml/sgml.conf</primary>
+      </indexterm>
+
+    </sect3>
+
+    <sect3>
+      <title>Configuration Information</title>
+
+      <para>
+        No change in this file is necessary.
+      </para>
+
+    </sect3>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Files</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>install-catalog and sgmlwhich</seg>
+        <seg>None</seg>
+        <seg>SGML and XML DocBook entity files</seg>
+        <seg>/etc/sgml, /usr/share/doc/sgml-common-&sgml-common-version;, and
+        /usr/share/sgml</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="install-catalog">
+        <term><command>install-catalog</command></term>
+        <listitem>
+          <para>
+            creates a centralized catalog that maintains references to
+            catalogs scattered throughout the
+            <filename class="directory">/usr/share/sgml</filename> directory
+          tree.
+          </para>
+          <indexterm zone="ch-system-sgml-common install-catalog">
+            <primary sortas="b-install-catalog">install-catalog</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="sgmlwhich">
+        <term><command>sgmlwhich</command></term>
+        <listitem>
+          <para>
+            prints to standard output the name of the main configuration file.
+          </para>
+          <indexterm zone="ch-system-sgml-common sgmlwhich">
+            <primary sortas="b-sgmlwhich">sgmlwhich</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="SGML-entities">
+        <term><filename>SGML entities files</filename></term>
+        <listitem>
+          <para>
+            contains the basic character entities defined with SDATA entries.
+          </para>
+          <indexterm zone="ch-system-sgml-common SGML-entities">
+            <primary sortas="g-SGML-ENT-files">SGML entity files</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="XML-entities">
+        <term><filename>XML entities files</filename></term>
+        <listitem>
+          <para>
+            contains the basic character entities defined by a hexadecimal
+            representation of the Unicode character number.
+          </para>
+          <indexterm zone="ch-system-sgml-common XML-entities">
+            <primary sortas="g-XML-ENT-files">XML entity files</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/shadow.xml LFS-pacman/chapter08/shadow.xml
--- LFS_orig/chapter08/shadow.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/shadow.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,87 +38,263 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Shadow</title>
 
-    <note>
-      <para>If you would like to enforce the use of strong passwords, refer to
-      <ulink url="&blfs-book;postlfs/cracklib.html"/> for installing
-      CrackLib prior to building Shadow. Then add
-      <parameter>--with-libcrack</parameter> to the <command>configure</command>
-      command below.</para>
-    </note>
-
-    <para>Disable the installation of the <command>groups</command> program
-    and its man pages, as Coreutils provides a better version. Also,
-    prevent the installation of manual pages that were already installed in
-    <xref linkend="ch-system-man-pages"/>:</para>
-
-<screen><userinput remap="pre">sed -i 's/groups$(EXEEXT) //' src/Makefile.in
-find man -name Makefile.in -exec sed -i 's/groups\.1 / /'   {} \;
-find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
-find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;</userinput></screen>
-
-    <para id="shadow-login_defs">Instead of using the default
-    <emphasis>crypt</emphasis> method, use the more secure
-    <emphasis>SHA-512</emphasis> method of password encryption, which also
-    allows passwords longer than 8 characters. It is also necessary to change
-    the obsolete <filename class="directory">/var/spool/mail</filename> location
-    for user mailboxes that Shadow uses by default to the <filename
-    class="directory">/var/mail</filename> location used currently. And,
-    get rid of <filename class="directory">/bin</filename> and
-    <filename class="directory">/sbin</filename> from <envar>PATH</envar>,
-    since they are simply symlinks to their counterpart in
-    <filename class="directory">/usr</filename>.</para>
-
-    <note>
-      <para>If <filename class="directory">/bin</filename> and/or
-      <filename class="directory">/sbin</filename> are preferred to be
-      left over in <envar>PATH</envar> for some reason, modify
-      <envar>PATH</envar> in <filename>.bashrc</filename> after LFS is
-      built.</para>
-    </note>
-
-<screen><userinput remap="pre">sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
-    -e 's:/var/spool/mail:/var/mail:'                 \
-    -e '/PATH=/{s@/sbin:@@;s@/bin:@@}'                \
-    -i etc/login.defs</userinput></screen>
-
-    <note>
-      <para>If you chose to build Shadow with Cracklib support, run the following:</para>
-
-<screen role="nodump"><userinput>sed -i 's:DICTPATH.*:DICTPATH\t/lib/cracklib/pw_dict:' etc/login.defs</userinput></screen>
-    </note>
-<!--
-    <para>Make a minor change to make the first group number generated
-    by useradd 1000:</para>
-
-<screen><userinput remap="pre">sed -i 's/1000/999/' etc/useradd</userinput></screen>
--->
-<!--
-    <para>Fix a simple programming error by modifying a file with following command:</para>
-
-<screen><userinput remap="pre">sed -e "224s/rounds/min_rounds/" -i libmisc/salt.c</userinput></screen>
--->
-    <para>Prepare Shadow for compilation:</para>
-
-<screen><userinput remap="configure">touch /usr/bin/passwd
-./configure --sysconfdir=/etc \
-            --disable-static  \
-            --with-group-name-max-length=32</userinput></screen>
+    <para>Create the PKGBUILD for the Shadow package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/shadow
+cd /sources/shadow
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="shadow"
+pkgver="&shadow-version;"
+pkgrel="1"
+pkgdesc="The Shadow package contains programs for handling passwords in a secure way."
+arch=('x86'
+      'x86_64')
+url="https://github.com/shadow-maint/"
+license=('GPL')
+groups=('core')
+makedepends=('acl'
+             'bash'
+             'binutils'
+             'coreutils'
+             'cracklib'
+             'gcc'
+             'gettext'
+             'glibc'
+             'grep'
+             'linux-pam'
+             'libpwquality'
+             'make'
+             'sed'
+             'texinfo')
+depends=('acl'
+         'bash'
+         'cracklib'
+         'linux-pam'
+         'libpwquality')
+source=("&shadow-url;")
+md5sums=('&shadow-md5;')
+groups=('core')
+install="shadow.install"
+backup=('etc/default/useradd'
+        'etc/login.defs'
+        'etc/pam.d/login'
+        'etc/pam.d/passwd'
+        'etc/pam.d/su'
+        'etc/pam.d/chage'
+        'etc/pam.d/chfn'
+        'etc/pam.d/chgpasswd'
+        'etc/pam.d/chpasswd'
+        'etc/pam.d/chsh'
+        'etc/pam.d/groupadd'
+        'etc/pam.d/groupdel'
+        'etc/pam.d/groupmems'
+        'etc/pam.d/groupmod'
+        'etc/pam.d/newusers'
+        'etc/pam.d/useradd'
+        'etc/pam.d/userdel'
+        'etc/pam.d/usermod')
+prepare(){
+  cd "${pkgname}-${pkgver}"
+
+  # prevent installation of the groups command (included with coreutils)
+  sed -i 's/groups$(EXEEXT) //' src/Makefile.in
+
+  # Prevent installation of man-pages that are installed by other packages
+  find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \;
+  find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \;
+  find man -name Makefile.in -exec sed -i 's/passwd\.5 / /'   {} \;
+
+  # Default to SHA512 instead of DES for password hashing
+  sed -e 's@#ENCRYPT_METHOD DES@ENCRYPT_METHOD SHA512@' \
+      -e 's@/var/spool/mail@/var/mail@'                 \
+      -e '/PATH=/{s@/sbin:@@;s@/bin:@@}'                \
+      -i etc/login.defs
+}
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  ./configure --sysconfdir=/etc \
+              --disable-static  \
+              --with-group-name-max-length=32
+  make
+}
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  make DESTDIR="${pkgdir}" exec_prefix=/usr install
+  make DESTDIR="${pkgdir}" -C man install-man
+
+  # Linux-PAM configuration:
+  ##### login.defs
+  for FUNCTION in FAIL_DELAY               \
+                  FAILLOG_ENAB             \
+                  LASTLOG_ENAB             \
+                  MAIL_CHECK_ENAB          \
+                  OBSCURE_CHECKS_ENAB      \
+                  PORTTIME_CHECKS_ENAB     \
+                  QUOTAS_ENAB              \
+                  CONSOLE MOTD_FILE        \
+                  FTMP_FILE NOLOGINS_FILE  \
+                  ENV_HZ PASS_MIN_LEN      \
+                  SU_WHEEL_ONLY            \
+                  CRACKLIB_DICTPATH        \
+                  PASS_CHANGE_TRIES        \
+                  PASS_ALWAYS_WARN         \
+                  CHFN_AUTH ENCRYPT_METHOD \
+                  ENVIRON_FILE
+  do
+    sed -i "s/^${FUNCTION}/# &amp;/" "${pkgdir}/etc/login.defs"
+  done
+
+  ##### login
+  cat &gt; "${pkgdir}/etc/pam.d/login" &lt;&lt; "EOF"
+# Begin /etc/pam.d/login
+
+# Set failure delay before next prompt to 3 seconds
+auth      optional    pam_faildelay.so  delay=3000000
+
+# Check to make sure that the user is allowed to login
+auth      requisite   pam_nologin.so
+
+# Check to make sure that root is allowed to login
+# Disabled by default. You will need to create /etc/securetty
+# file for this module to function. See man 5 securetty.
+#auth      required    pam_securetty.so
+
+# Additional group memberships - disabled by default
+#auth      optional    pam_group.so
+
+# include the system auth settings
+auth      include     system-auth
+
+# check access for the user
+account   required    pam_access.so
+
+# include the system account settings
+account   include     system-account
+
+# Set default environment variables for the user
+session   required    pam_env.so
+
+# Set resource limits for the user
+session   required    pam_limits.so
+
+# Display date of last login - Disabled by default
+#session   optional    pam_lastlog.so
+
+# Display the message of the day - Disabled by default
+#session   optional    pam_motd.so
+
+# Check user's mail - Disabled by default
+#session   optional    pam_mail.so      standard quiet
+
+# include the system session and password settings
+session   include     system-session
+password  include     system-password
+
+# End /etc/pam.d/login
+EOF
+
+  ##### passwd
+  cat &gt; "${pkgdir}/etc/pam.d/passwd" &lt;&lt; "EOF"
+# Begin /etc/pam.d/passwd
+
+password  include     system-password
+
+# End /etc/pam.d/passwd
+EOF
+
+  ##### su
+  cat &gt; "${pkgdir}/etc/pam.d/su" &lt;&lt; "EOF"
+# Begin /etc/pam.d/su
+
+# always allow root
+auth      sufficient  pam_rootok.so
+
+# Allow users in the wheel group to execute su without a password
+# disabled by default
+#auth      sufficient  pam_wheel.so trust use_uid
+
+# include system auth settings
+auth      include     system-auth
+
+# limit su to users in the wheel group
+# disabled by default
+#auth      required    pam_wheel.so use_uid
+
+# include the system account settings
+account   include     system-account
+
+# Set default environment variables for the service user
+session   required    pam_env.so
+
+# include system session defaults
+session   include     system-session
+
+# End /etc/pam.d/su
+EOF
+
+  ##### chpasswd and newusers
+  cat &gt; "${pkgdir}/etc/pam.d/chpasswd" &lt;&lt; "EOF"
+# Begin /etc/pam.d/chpasswd
+
+# always allow root
+auth      sufficient  pam_rootok.so
+
+# include system auth and account settings
+auth      include     system-auth
+account   include     system-account
+password  include     system-password
+
+# End /etc/pam.d/chpasswd
+EOF
+
+  sed -e s/chpasswd/newusers/ ${pkgdir}/etc/pam.d/chpasswd \
+                            &gt; /etc/pam.d/newusers
+
+  ##### chage chfn chgpasswd chsh groupadd groupdel
+  ##### groupmems groupmod useradd userdel usermod
+  cat &gt; "${pkgdir}/etc/pam.d/chage" &lt;&lt; "EOF"
+# Begin /etc/pam.d/chage
+
+# always allow root
+auth      sufficient  pam_rootok.so
+
+# include system auth, account, and session settings
+auth      include     system-auth
+account   include     system-account
+session   include     system-session
+
+# Always permit for authentication updates
+password  required    pam_permit.so
+
+# End /etc/pam.d/chage
+EOF
+
+  for PROGRAM in chfn chgpasswd chsh groupadd groupdel \
+                 groupmems groupmod useradd userdel usermod
+  do
+    install -v -m644 "${pkgdir}/etc/pam.d/chage" \
+                     "${pkgdir}/etc/pam.d/${PROGRAM}"
+    sed -i "s/chage/$PROGRAM/" "${pkgdir}/etc/pam.d/${PROGRAM}"
+  done
+
+  ##### /etc/default/useradd
+  install -vdm755 ${pkgdir}/etc/default/
+  echo "GROUPS=999" > ${pkgdir}/etc/default/useradd
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the configure option:</title>
 
       <varlistentry>
-        <term><command>touch /usr/bin/passwd</command></term>
-        <listitem>
-          <para>The file <filename>/usr/bin/passwd</filename> needs
-          to exist because its location is hardcoded in some programs, and
-          if it does not exist, the default location is not right.</para>
-        </listitem>
-      </varlistentry>
-      <varlistentry>
         <term><parameter>--with-group-name-max-length=32</parameter></term>
         <listitem>
           <para>The maximum user name is 32 characters.  Make the maximum
@@ -128,104 +304,34 @@ find man -name Makefile.in -exec sed -i
 
     </variablelist>
 
-    <para>Compile the package:</para>
-
-    <screen><userinput remap="make">make</userinput></screen>
-
-    <para>This package does not come with a test suite.</para>
-
-    <para>Install the package:</para>
-
-    <screen><userinput remap="install">make exec_prefix=/usr install
-make -C man install-man</userinput></screen>
-
-  </sect2>
-
-  <sect2 id="conf-shadow" role="configuration">
-    <title>Configuring Shadow</title>
-
-    <indexterm zone="conf-shadow">
-      <primary sortas="a-Shadow">Shadow</primary>
-      <secondary>configuring</secondary>
-    </indexterm>
-
-    <para>This package contains utilities to add, modify, and delete users and
-    groups; set and change their passwords; and perform other administrative
-    tasks. For a full explanation of what <emphasis>password shadowing</emphasis>
-    means, see the <filename>doc/HOWTO</filename> file within the unpacked
-    source tree. If using Shadow support, keep in mind that programs which need
-    to verify passwords (display managers, FTP programs, pop3 daemons, etc.)
-    must be Shadow-compliant. That is, they need to be able to work with
-    shadowed passwords.</para>
-
-    <para>To enable shadowed passwords, run the following command:</para>
-
-<screen><userinput>pwconv</userinput></screen>
-
-    <para>To enable shadowed group passwords, run:</para>
-
-<screen><userinput>grpconv</userinput></screen>
-
-    <para>Shadow's default configuration for the <command>useradd</command>
-    utility has a few caveats that need some explanation. First, the default
-    action for the <command>useradd</command> utility is to create the user and
-    a group of the same name as the user. By default the user ID (UID) and
-    group ID (GID) numbers will begin with 1000. This means if you don't pass
-    parameters to <command>useradd</command>, each user will be a member of a
-    unique group on the system. If this behavior is undesirable, you'll need
-    to pass one of the <parameter>-g</parameter> or <parameter>-N</parameter>
-    parameter to <command>useradd</command> or to change the setting of
-    <parameter>USERGROUPS_ENAB</parameter> in
-    <filename>/etc/login.defs</filename>. See <filename>useradd(8)</filename>
-    for more information.</para>
-
-    <para>Second, to change the default parameters, the file
-    <filename>/etc/default/useradd</filename> needs to be created and tailored
-    to suit your particular needs. Create it with:</para>
-
-<screen><userinput>mkdir -p /etc/default
-useradd -D --gid 999</userinput></screen>
+    <para>Also, you will need to convert the existing passwd and groups
+    files to the shadowed versions upon installation:</para>
 
-    <variablelist>
-      <title><filename>/etc/default/useradd</filename> Parameter Explanations</title>
-
-      <varlistentry>
-        <term><parameter>GROUP=999</parameter></term>
-        <listitem>
-          <para>This parameter sets the beginning of the group numbers used in
-          the <filename>/etc/group</filename> file. The particular value 999
-          comes from the <parameter>--gid</parameter> parameter above.  You can
-          modify it to anything you desire.
-
-          Note that <command>useradd</command> will never reuse a UID or GID.
-          If the number identified in this parameter is used, it will use the
-          next available number. Note also that if you don't have a group with
-          an ID equal to this number on your system the first time you use
-          <command>useradd</command> without the <parameter>-g</parameter>
-          parameter, you will get a message displayed on the terminal that
-          says: <computeroutput>useradd: unknown GID 999</computeroutput>,
-          although the account is correctly created. That is why we have
-          created the group <systemitem class="groupname">users</systemitem>
-          with this group ID in <xref linkend='ch-tools-createfiles'/>.</para>
-
-        </listitem>
-      </varlistentry>
-      <varlistentry>
-        <term><parameter>CREATE_MAIL_SPOOL=yes</parameter></term>
-        <listitem>
-          <para>This parameter causes <command>useradd</command> to create a
-          mailbox file for the newly created user. <command>useradd</command>
-          will make the group ownership of this file to the
-          <systemitem class="groupname">mail</systemitem> group with 0660
-          permissions. If you would prefer that these mailbox files are not
-          created by <command>useradd</command>, issue the following
-          command:</para>
-
-<screen><userinput>sed -i '/MAIL/s/yes/no/' /etc/default/useradd</userinput></screen>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
+<screen><userinput>cat &gt; shadow.install &lt;&lt; REALEOF
+<literal>post_install(){
+    pwconv
+    grpconv
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/shadow-&shadow-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Shadow package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S shadow --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/shadow
+cp PKGBUILD /srv/pacman/source/LFS/shadow
+cp shadow.install /srv/pacman/source/LFS/shadow
+cd /sources
+rm -rf shadow</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/sqlite.xml LFS-pacman/chapter08/sqlite.xml
--- LFS_orig/chapter08/sqlite.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/sqlite.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,183 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-sqlite" role="wrap">
+  <?dbhtml filename="sqlite.html"?>
+
+  <sect1info condition="script">
+    <productname>sqlite</productname>
+    <productnumber>&sqlite-version;</productnumber>
+    <address>&sqlite-url;</address>
+  </sect1info>
+
+  <title>SQLite-&sqlite-version;</title>
+
+  <indexterm zone="ch-system-sqlite">
+    <primary sortas="a-SQLite">SQLite</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title>Introduction to SQLite</title>
+
+    <para>
+      The <application>SQLite</application> package is a software library that
+      implements a self-contained, serverless, zero-configuration, transactional
+      SQL database engine.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&sqlite-fin-sbu;</seg>
+        <seg>&sqlite-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of SQLite</title>
+
+    <para>
+      Issue the following command
+      to install the documentation into the source tree:
+    </para>
+
+<screen><userinput remap="pre">unzip -q ../sqlite-doc-&sqlite-doc-version;.zip</userinput></screen>
+
+    <para>
+      Configure <application>SQLite</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="configure">./configure --prefix=/usr     \
+            --disable-static  \
+            --enable-fts5     \
+            CPPFLAGS="-DSQLITE_ENABLE_FTS3=1            \
+                      -DSQLITE_ENABLE_FTS4=1            \
+                      -DSQLITE_ENABLE_COLUMN_METADATA=1 \
+                      -DSQLITE_ENABLE_UNLOCK_NOTIFY=1   \
+                      -DSQLITE_ENABLE_DBSTAT_VTAB=1     \
+                      -DSQLITE_SECURE_DELETE=1          \
+                      -DSQLITE_ENABLE_FTS3_TOKENIZER=1"</userinput></screen>
+
+    <para>
+      Build <application>SQLite</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="make">make</userinput></screen>
+
+    <para>
+      This package does not come with a test suite.
+    </para>
+
+    <para>
+      Install <application>SQLite</application> by running the following
+      commands:
+    </para>
+
+<screen><userinput remap="install">make install</userinput></screen>
+
+    <para>
+      Issue the following commands to install the documentation:
+    </para>
+
+<screen><userinput remap="install">install -v -m755 -d /usr/share/doc/sqlite-&sqlite-version;
+cp -v -R sqlite-doc-&sqlite-doc-version;/* /usr/share/doc/sqlite-&sqlite-version;</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <parameter>--enable-fts5</parameter>: This switch enables support for
+      version 5 of the full text search extension.
+    </para>
+
+    <para>
+      <parameter>CFLAGS="-g -O2
+      -DSQLITE_ENABLE_FTS3=1
+      -DSQLITE_ENABLE_FTS3_TOKENIZER=1
+      -DSQLITE_ENABLE_FTS4=1
+      -DSQLITE_ENABLE_COLUMN_METADATA=1
+      -DSQLITE_SECURE_DELETE
+      -DSQLITE_ENABLE_UNLOCK_NOTIFY=1
+      -DSQLITE_ENABLE_DBSTAT_VTAB=1"</parameter>: Applications such as
+      <application>SeaMonkey</application> require these options
+      to be turned on.
+      The only way to do this is to include them in
+      the CFLAGS.
+      By default, these are set to <literal>"-g -O2"</literal> so we
+      specify that to preserve those settings. You may, of course, wish to omit
+      the <literal>'-g'</literal> if you do not wish to create debugging
+      information. For further information on what can be specified see <ulink
+      url="http://www.sqlite.org/compile.html"/>.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Program</segtitle>
+      <segtitle>Installed Library</segtitle>
+      <segtitle>Installed Directory</segtitle>
+
+      <seglistitem>
+        <seg>
+          sqlite3
+        </seg>
+        <seg>
+          libsqlite3.so
+        </seg>
+        <seg>
+          /usr/share/doc/sqlite-&sqlite-version;
+        </seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="sqlite3">
+        <term><command>sqlite3</command></term>
+        <listitem>
+          <para>
+            A terminal-based front-end to the <application>SQLite</application>
+            library that can evaluate queries interactively and display the
+            results.
+          </para>
+          <indexterm zone="ch-system-sqlite sqlite3">
+            <primary sortas="b-sqlite3">sqlite3</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="libsqlite3">
+        <term><filename class="libraryfile">libsqlite3.so</filename></term>
+        <listitem>
+          <para>
+            contains the <application>SQLite</application> API functions.
+          </para>
+          <indexterm zone="ch-system-sqlite libsqlite3">
+            <primary sortas="c-libsqlite3">libsqlite3.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/sysklogd.xml LFS-pacman/chapter08/sysklogd.xml
--- LFS_orig/chapter08/sysklogd.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/sysklogd.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,24 +38,92 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Sysklogd</title>
 
-    <para>First, fix problems that causes a segmentation fault under
-    some conditions in klogd and fix an obsolete program construct:</para>
+    <para>Create the PKGBUILD for the Sysklogd package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
-sed -i 's/union wait/int/' syslogd.c</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>This package does not come with a test suite.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make BINDIR=/sbin install</userinput></screen>
+<screen><userinput>mkdir /sources/sysklogd
+cd /sources/sysklogd
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="sysklogd"
+pkgver="&sysklogd-version;"
+pkgrel="1"
+pkgdesc="The sysklogd package contains programs for logging system messages."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'make'
+             'patch')
+backup=('etc/syslog.conf')
+source=('&sysklogd-url;')
+md5sums=('&sysklogd-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Fix problems that cause a segmentation fault in klogd
+  sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
+
+  # Fix an obsolete program construct in syslogd
+  sed -i 's/union wait/int/' syslogd.c
+}
+
+# This package does not come with a test suite
+
+build(){
+  cd ${pkgname}-${pkgver}
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make BINDIR=${pkgdir}/sbin prefix=${pkgdir} install
+
+  # Install the default syslog.conf - this will be replaced after the build
+  install -vdm755 ${pkgdir}/etc
+  cat &gt; ${pkgdir}/etc/syslog.conf &lt;&lt; "EOF"
+# Begin /etc/syslog.conf
+
+auth,authpriv.* -/var/log/auth.log
+*.*;auth,authpriv.none -/var/log/sys.log
+daemon.* -/var/log/daemon.log
+kern.* -/var/log/kern.log
+mail.* -/var/log/mail.log
+user.* -/var/log/user.log
+*.emerg *
+
+# End /etc/syslog.conf
+EOF
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/sysklogd-&sysklogd-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Sysklogd package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S sysklogd --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/sysklogd
+cp PKGBUILD /srv/pacman/source/LFS/sysklogd
+cd /sources
+rm -rf sysklogd</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/sysvinit.xml LFS-pacman/chapter08/sysvinit.xml
--- LFS_orig/chapter08/sysvinit.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/sysvinit.xml	2022-06-16 20:05:13.907855759 -0500
@@ -38,49 +38,83 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Sysvinit</title>
 
-<!--
-    <para>When run-levels are changed (for example, when halting the
-    system), <command>init</command> sends termination signals to those
-    processes that <command>init</command> itself started and that should
-    not be running in the new run-level.  While doing this,
-    <command>init</command> outputs messages like <quote>Sending processes
-    the TERM signal</quote> which seem to imply that it is sending these
-    signals to all currently running processes. To avoid this
-    misinterpretation, modify the source so that these messages read like
-    <quote>Sending processes configured via /etc/inittab the TERM signal</quote>
-    instead:</para>
-
-<screen><userinput remap="pre">sed -i 's@Sending processes@&amp; configured via /etc/inittab@g' src/init.c</userinput></screen>
-
-    <para>Maintained versions of the <command>wall</command>,
-    <command>mountpoint</command>, <command>last</command>,
-    <command>mesg</command>, <command>sulogin</command>, and
-    <command>utmpdump</command> programs were installed earlier by Util-linux.
-    Suppress the installation of Sysvinit's versions of these programs and
-    their man pages:</para>
-
-<screen><userinput remap="make">sed -ri -e '/utmpdump/d'   \
-        -e '/mountpoint/d' \
-        -e '/mesg/d'       \
-        -e 's/= sulogin(\.8)?/=/' src/Makefile</userinput></screen>
--->
-    <para>First, apply a patch that removes several programs installed by other
-    packages, clarifies a message, and fixes a compiler warning:</para>
-
-<screen><userinput remap="pre">patch -Np1 -i ../&sysvinit-consolidated-patch;</userinput></screen>
-
-    <para>Compile the package:</para>
+    <para>Create the PKGBUILD for the Sysvinit package with the following
+    commands:</para>
 
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>This package does not come with a test suite.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/sysvinit
+cd /sources/sysvinit
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="sysvinit"
+pkgver="&sysvinit-version;"
+pkgrel="1"
+pkgdesc="The Sysvinit package contains programs for controlling the startup, running, and shutdown of the system."
+arch=('x86'
+      x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'make'
+             'sed')
+backup=('etc/inittab')
+options=('emptydirs')
+source=('&sysvinit-url;'
+        '&patches-root;&sysvinit-consolidated-patch;'
+        'inittab.default')
+md5sums=('&sysvinit-md5;'
+         '&sysvinit-consolidated-patch-md5;'
+         '')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Apply a patch that removes several programs installed by other packages,
+  # clarifies a message, and fixes a compiler warning
+  patch -Np1 -i ${srcdir}/${pkgname}-${pkgver}-consolidated-1.patch
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  make
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make ROOT=${pkgdir} install
+
+  # Install the inittab.d folder
+  install -vdm755 ${pkgdir}/etc/inittab.d
+
+  # Install the default /etc/inittab
+  install -vm644 ${srcdir}/inittab.default ${pkgdir}/etc/inittab
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/sysvinit-&sysvinit-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Sysvinit package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S sysvinit --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/sysvinit
+cp PKGBUILD /srv/pacman/source/LFS/sysvinit
+cd /sources
+rm -rf sysvinit</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/tar.xml LFS-pacman/chapter08/tar.xml
--- LFS_orig/chapter08/tar.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/tar.xml	2022-06-16 20:05:13.907855759 -0500
@@ -40,46 +40,90 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Tar</title>
 
-    <para>Prepare Tar for compilation:</para>
+    <para>Create the PKGBUILD for the Tar package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">FORCE_UNSAFE_CONFIGURE=1  \
-./configure --prefix=/usr</userinput></screen>
-
-    <variablelist>
-      <title>The meaning of the configure option:</title>
-
-      <varlistentry>
-        <term><envar>FORCE_UNSAFE_CONFIGURE=1</envar></term>
-        <listitem>
-          <para>This forces the test for <function>mknod</function> to be run
-          as <systemitem class="username">root</systemitem>.
-          It is generally considered dangerous to run this test as
-          the <systemitem class="username">root</systemitem> user, but as it
-          is being run on a system that has only been
-          partially built, overriding it is OK.</para>
-        </listitem>
-      </varlistentry>
-    </variablelist>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>One test, capabilities: binary store/restore, is known to fail if it is
-    run (LFS lacks selinux), but will be skipped if the host kernel does
-    not support extended attributes on the filesystem used for building LFS.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install
-make -C doc install-html docdir=/usr/share/doc/tar-&tar-version;</userinput></screen>
+<screen><userinput>mkdir /sources/tar
+cd /sources/tar
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="tar"
+pkgver="&tar-version;"
+pkgrel="1"
+pkgdesc="The Tar package provides the ability to create and extract tar archives."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('acl'
+         'attr'
+         'bzip2'
+         'glibc'
+         'gzip'
+         'xz'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'bison'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'inetutils'
+             'make'
+             'sed'
+             'texinfo')
+checkdepends=('autoconf'
+              'diffutils'
+              'findutils'
+              'gawk'
+              'gzip')
+source=('&tar-url;')
+md5sums=('&tar-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+
+  # Since building as the pacman user, no need for the workaround in LFS
+  # proper for "FORCE_UNSAFE_CONFIGURE=1":
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # One test (capabilities: binary store/restore) is know to fail
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  make DESTDIR=${pkgdir} -C doc install-html docdir=/usr/share/doc/tar-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/tar-&tar-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Tar package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S tar --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/tar
+cp PKGBUILD /srv/pacman/source/LFS/tar
+cd /sources
+rm -rf tar</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/tcl.xml LFS-pacman/chapter08/tcl.xml
--- LFS_orig/chapter08/tcl.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/tcl.xml	2022-06-16 20:05:13.904522425 -0500
@@ -41,7 +41,7 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Tcl</title>
 
     <para>This package and the next two (Expect and DejaGNU) are
@@ -50,78 +50,115 @@
     excessive, but it is very reassuring, if not essential, to know that the
     most important tools are working properly.</para>
 
-<!--    <para>Note that the Tcl package used here is a minimal version needed
-    to run the LFS tests.  For the full package, see the
-    <ulink url='&blfs-book;general/tcl.html'>BLFS Tcl procedures</ulink>.</para>-->
+    <para>Create the PKGBUILD for the Tcl package with the following
+    commands:</para>
 
-    <para>First, unpack the documentation by issuing the following command:</para>
-
-<screen><userinput remap="pre">tar -xf ../tcl&tcl-version;-html.tar.gz --strip-components=1</userinput></screen>
-
-    <para>Prepare Tcl for compilation:</para>
-
-<screen><userinput remap="configure">SRCDIR=$(pwd)
-cd unix
-./configure --prefix=/usr           \
-            --mandir=/usr/share/man</userinput></screen>
-
-    <para>Build the package:</para>
-
-<screen><userinput remap="make">make
-
-sed -e "s|$SRCDIR/unix|/usr/lib|" \
-    -e "s|$SRCDIR|/usr/include|"  \
-    -i tclConfig.sh
-
-sed -e "s|$SRCDIR/unix/pkgs/tdbc&tdbc-ver;|/usr/lib/tdbc&tdbc-ver;|" \
-    -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/generic|/usr/include|"    \
-    -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;/library|/usr/lib/tcl8.6|" \
-    -e "s|$SRCDIR/pkgs/tdbc&tdbc-ver;|/usr/include|"            \
-    -i pkgs/tdbc&tdbc-ver;/tdbcConfig.sh
-
-sed -e "s|$SRCDIR/unix/pkgs/itcl&itcl-ver;|/usr/lib/itcl&itcl-ver;|" \
-    -e "s|$SRCDIR/pkgs/itcl&itcl-ver;/generic|/usr/include|"    \
-    -e "s|$SRCDIR/pkgs/itcl&itcl-ver;|/usr/include|"            \
-    -i pkgs/itcl&itcl-ver;/itclConfig.sh
-
-unset SRCDIR</userinput></screen>
-
-    <para>The various <quote>sed</quote> instructions after the
-    <quote>make</quote> command removes references to the build directory from
-    the configuration files and replaces them with the install directory.
-    This is not mandatory for the remainder of LFS, but may be needed in case a
-    package built later uses Tcl.</para>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make test</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Make the installed library writable so debugging symbols can
-    be removed later:</para>
-
-<screen><userinput remap="install">chmod -v u+w /usr/lib/libtcl&tcl-major-version;.so</userinput></screen>
-
-    <para>Install Tcl's headers. The next package, Expect, requires them.</para>
-
-<screen><userinput remap="install">make install-private-headers</userinput></screen>
-
-    <para>Now make a necessary symbolic link:</para>
-
-<screen><userinput remap="install">ln -sfv tclsh&tcl-major-version; /usr/bin/tclsh</userinput></screen>
-
-    <para>Rename a man page that conflicts with a Perl man page:</para>
-
-    <screen><userinput remap="install">mv /usr/share/man/man3/{Thread,Tcl_Thread}.3</userinput></screen>
-
-    <para>If you downloaded the optional documentation, install it by issuing
-    the following commands:</para>
-
- <screen><userinput remap="install">mkdir -v -p /usr/share/doc/tcl-&tcl-version;
-cp -v -r  ../html/* /usr/share/doc/tcl-&tcl-version;</userinput></screen>
+<screen><userinput>mkdir /sources/tcl
+cd /sources/tcl
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="tcl"
+pkgver="&tcl-version;"
+_itclver="&itcl-ver;"
+_tclshver="8.6"
+_tdcbver="&tdbc-ver;"
+pkgrel="1"
+pkgdesc="The Tcl package contains the Tool Command Language, a robust general-purpose scripting language."
+arch=('x86'
+      'x86_64')
+license=('UC-Regents3C')
+groups=('core')
+depends=('glibc'
+         'zlib'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+source=('&tcl-url;'
+        '&tcl-docs-url;')
+noextract=('tcl${pkgver}-html.tar.gz')
+md5sums=('&tcl-md5;'
+         '&tcl-docs-md5;')
+
+prepare(){
+  cd ${pkgname}${pkgver}
+  tar -xf ${srcdir}/tcl${pkgver}-html.tar.gz --strip-components=1
+}
+
+build(){
+  cd ${pkgname}${pkgver}
+  SRCDIR=$(pwd)
+  cd unix
+  ./configure --prefix=/usr           \
+              --mandir=/usr/share/man
+  make
+
+  sed -e "s|$SRCDIR/unix|/usr/lib|" \
+      -e "s|$SRCDIR|/usr/include|"  \
+      -i tclConfig.sh
+
+  sed -e "s|$SRCDIR/unix/pkgs/tdbc${_tcdbver}|/usr/lib/tdbc${_tcdbver}|" \
+      -e "s|$SRCDIR/pkgs/tdbc${_tcdbver}/generic|/usr/include|"    \
+      -e "s|$SRCDIR/pkgs/tdbc${_tcdbver}/library|/usr/lib/tcl${_tclshver}|" \
+      -e "s|$SRCDIR/pkgs/tdbc${_tcdbver}|/usr/include|"            \
+      -i pkgs/tdbc${_tcdbver}/tdbcConfig.sh
+
+  sed -e "s|$SRCDIR/unix/pkgs/itcl${_itclver}|/usr/lib/itcl${_itclver}|" \
+      -e "s|$SRCDIR/pkgs/itcl${_itclver}/generic|/usr/include|"    \
+      -e "s|$SRCDIR/pkgs/itcl${_itclver}|/usr/include|"            \
+      -i pkgs/itcl${_itclver}/itclConfig.sh
+
+  unset SRCDIR
+}
+
+check(){
+  cd ${pkgname}${pkgver}/unix
+  make test
+}
+
+package(){
+  cd ${pkgname}${pkgver}/unix
+  make DESTDIR=${pkgdir} install
+  chmod -v u+w ${pkgdir}/usr/lib/libtcl${_tclshver}.so
+
+  # Install the package's private headers (required only for Expect)
+  make DESTDIR=${pkgdir} install-private-headers
+
+  # Create an unversioned tclsh symlink
+  ln -sfv tclsh${_tclshver} ${pkgdir}/usr/bin/tclsh
+
+  # Rename a man page that conflicts with Perl
+  mv ${pkgdir}/usr/share/man/man3/{Thread,Tcl_Thread}.3
+
+  # Install documentation
+  mkdir -pv /usr/share/doc/tcl-${pkgver}
+  cp -rv  ../html/* /usr/share/doc/tcl-${pkgver}
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/tcl-&tcl-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Tcl package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S tcl --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/tcl
+cp PKGBUILD /srv/pacman/source/LFS/tcl
+cd /sources
+rm -rf tcl</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/texinfo.xml LFS-pacman/chapter08/texinfo.xml
--- LFS_orig/chapter08/texinfo.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/texinfo.xml	2022-06-16 20:05:13.907855759 -0500
@@ -38,52 +38,65 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Texinfo</title>
 
-    <para>Prepare Texinfo for compilation:</para>
+    <para>Create the PKGBUILD for the Texinfo package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-<!--
-    <variablelist>
-      <title>The meaning of the configure option:</title>
-
-      <varlistentry>
-        <term><parameter>- -disable-static</parameter></term>
-        <listitem>
-          <para>In this case, the top-level configure script will complain that
-          this is an unrecognized option, but the configure script for
-          XSParagraph recognizes it and uses it to disable installing a static
-          <filename class="libraryfile">XSParagraph.a</filename> to <filename
-          class="directory">/usr/lib/texinfo</filename>.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
--->
-
-    <para>Again, fix an issue building the package with Glibc-2.34 or later:</para>
-
-<screen><userinput remap="pre">sed -e 's/__attribute_nonnull__/__nonnull/' \
-    -i gnulib/lib/malloc/dynarray-skeleton.c</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Optionally, install the components belonging in a TeX
-    installation:</para>
-    <!-- FIXME: doesn't the TeX installation in BLFS overwrite files there? -->
-
-<screen><userinput remap="install">make TEXMF=/usr/share/texmf install-tex</userinput></screen>
+<screen><userinput>mkdir /sources/texinfo
+cd /sources/texinfo
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="texinfo"
+pkgver="&texinfo-version;"
+pkgrel="1"
+pkgdesc="The Texinfo package contains programs for reading, writing, and converting info pages."
+arch=('x86'
+      'x86_64')
+license=('GPLv3')
+groups=('core')
+depends=('glibc'
+         'ncurses'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'patch'
+             'sed')
+source=('&texinfo-url;')
+md5sums=('&texinfo-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Fix an issue building the package with Glibc-2.34 or later
+  sed -e 's/__attribute_nonnull__/__nonnull/' \
+      -i gnulib/lib/malloc/dynarray-skeleton.c
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  make DESTDIR=${pkgdir} TEXMF=/usr/share/texmf install-tex
+}</literal>
+REALEOF</userinput></screen>
 
     <variablelist>
       <title>The meaning of the make parameter:</title>
@@ -99,6 +112,24 @@
 
     </variablelist>
 
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/texinfo-&texinfo-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Texinfo package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S texinfo --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/texinfo
+cp PKGBUILD /srv/pacman/source/LFS/texinfo
+cd /sources
+rm -rf texinfo</userinput></screen>
+
     <para>The Info documentation system uses a plain text file to hold its list of
     menu entries. The file is located at <filename>/usr/share/info/dir</filename>.
     Unfortunately, due to occasional problems in the Makefiles of various packages,
diff -Naurp LFS_orig/chapter08/tzdata.xml LFS-pacman/chapter08/tzdata.xml
--- LFS_orig/chapter08/tzdata.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/tzdata.xml	2022-06-16 20:05:13.904522425 -0500
@@ -0,0 +1,152 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-tzdata" role="wrap">
+  <?dbhtml filename="tzdata.html"?>
+
+  <sect1info condition="script">
+    <productname>tzdata</productname>
+    <productnumber>&tzdata-version;</productnumber>
+    <address>&tzdata-url;</address>
+  </sect1info>
+
+  <title>TZData-&tzdata-version;</title>
+
+  <indexterm zone="ch-system-tzdata">
+    <primary sortas="a-TZData">TZData</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>The TZ data package contains code and data that represent the history
+    of local time for many representative locations around the globe."</para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&tzdata-fin-sbu;</seg>
+        <seg>&tzdata-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2>
+    <title>Installation of TZ Data</title>
+
+    <para>Create the PKGBUILD for the TZ Data package with the following
+    commands:</para>
+
+<screen><userinput>mkdir /sources/tzdata
+cd /sources/tzdata
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname=tzdata
+_ver=&tzdata-version;
+pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
+pkgrel=1
+pkgdesc="Contains code and data that represent the history of local time for many representative locations around the globe."
+arch=('x86'
+      'x86_64')
+url="http://www.iana.org/time-zones/"
+license=('GPL')
+groups=('core')
+options=('!debug' '!strip')
+makedepends=('bash'
+             'coreutils'
+             'glibc'
+             'grep'
+             'make')
+depends=('glibc')
+source=("&tzdata-url;")
+md5sums=('&tzdata-md5;')
+
+package(){
+  cd "${srcdir}"
+  ZONEINFO="${pkgdir}/usr/share/zoneinfo"
+  install -vdm755 "${ZONEINFO}"/{posix,right}
+
+  for tz in etcetera southamerica northamerica europe africa antarctica  \
+          asia australasia backward; do
+    /usr/sbin/zic -L /dev/null   -d "${ZONEINFO}"       "${tz}"
+    /usr/sbin/zic -L /dev/null   -d "${ZONEINFO}/posix" "${tz}"
+    /usr/sbin/zic -L leapseconds -d "${ZONEINFO}/right" "${tz}"
+  done
+
+  cp -v zone.tab zone1970.tab iso3166.tab "${ZONEINFO}"
+  /usr/sbin/zic -d "${ZONEINFO}" -p America/New_York
+  unset ZONEINFO
+}</literal>
+REALEOF</userinput></screen>
+
+    <variablelist>
+      <title>The meaning of the zic commands:</title>
+
+      <varlistentry>
+        <term><parameter>zic -L /dev/null ...</parameter></term>
+        <listitem>
+          <para>This creates posix time zones without any leap seconds.  It is
+          conventional to put these in both
+          <filename class="directory">zoneinfo</filename> and
+          <filename class="directory">zoneinfo/posix</filename>. It is
+          necessary to put the POSIX time zones in
+          <filename class="directory">zoneinfo</filename>, otherwise various
+          test-suites will report errors. On an embedded system, where space is
+          tight and you do not intend to ever update the time zones, you could save
+          1.9 MB by not using the <filename class="directory">posix</filename>
+          directory, but some applications or test-suites might produce some
+          failures.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><parameter>zic -L leapseconds ...</parameter></term>
+        <listitem>
+          <para>This creates right time zones, including leap seconds. On an
+          embedded system, where space is tight and you do not intend to
+          ever update the time zones, or care about the correct time, you could
+          save 1.9MB by omitting the <filename class="directory">right</filename>
+          directory.</para>
+        </listitem>
+      </varlistentry>
+      <varlistentry>
+        <term><parameter>zic ... -p ...</parameter></term>
+        <listitem>
+          <para>This creates the <filename>posixrules</filename> file. We use
+          New York because POSIX requires the daylight savings time rules
+          to be in accordance with US rules.</para>
+        </listitem>
+      </varlistentry>
+    </variablelist>
+
+    &pacman-build-add;
+
+<screen><userinput>_ver=&tzdata-version;
+pkgver=${_ver/[a-z]/.${_ver//[0-9.]/}}
+repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/tzdata-${pkgver}-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the tzdata package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S tzdata --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/tzdata
+cp PKGBUILD /srv/pacman/source/LFS/tzdata
+cd /sources
+rm -rf tzdata</userinput></screen>
+
+  </sect2>
+
+</sect1>
+
diff -Naurp LFS_orig/chapter08/unzip.xml LFS-pacman/chapter08/unzip.xml
--- LFS_orig/chapter08/unzip.xml	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/chapter08/unzip.xml	2022-06-16 20:05:13.907855759 -0500
@@ -0,0 +1,190 @@
+<?xml version="1.0" encoding="ISO-8859-1"?>
+<!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-unzip" role="wrap">
+  <?dbhtml filename="unzip.html"?>
+
+  <sect1info condition="script">
+    <productname>unzip</productname>
+    <productnumber>&unzip-version;</productnumber>
+    <address>&unzip-url;</address>
+  </sect1info>
+
+  <title>Unzip-&unzip-version;</title>
+
+  <indexterm zone="ch-system-unzip">
+    <primary sortas="a-Unzip">Unzip</primary>
+  </indexterm>
+
+  <sect2 role="package">
+    <title/>
+
+    <para>
+      The <application>UnZip</application> package contains
+      <filename>ZIP</filename> extraction utilities. These are useful for
+      extracting files from <filename>ZIP</filename> archives.
+      <filename>ZIP</filename> archives are created with
+      <application>PKZIP</application> or <application>Info-ZIP</application>
+      utilities, primarily in a DOS environment.
+    </para>
+
+    <segmentedlist>
+      <segtitle>&buildtime;</segtitle>
+      <segtitle>&diskspace;</segtitle>
+
+      <seglistitem>
+        <seg>&unzip-fin-sbu;</seg>
+        <seg>&unzip-fin-du;</seg>
+      </seglistitem>
+    </segmentedlist>
+
+  </sect2>
+
+  <sect2 role="installation">
+    <title>Installation of UnZip</title>
+
+    <para>
+      First apply the patch:
+    </para>
+
+<screen><userinput remap="pre">patch -Np1 -i ../unzip-&unzip-version;-consolidated_fixes-1.patch</userinput></screen>
+
+    <para>
+      Now compile the package:
+    </para>
+
+<screen><userinput remap="make">make -f unix/Makefile generic</userinput></screen>
+
+    <para>
+      Now, install:
+    </para>
+
+<screen><userinput remap="install">make prefix=/usr MANDIR=/usr/share/man/man1 \
+ -f unix/Makefile install</userinput></screen>
+
+  </sect2>
+
+  <sect2 role="commands">
+    <title>Command Explanations</title>
+
+    <para>
+      <command>make -f unix/Makefile generic</command>:
+      This target begins by running a configure script (unlike the older
+      targets such as linux and linux_noasm) which creates a flags file that
+      is then used in the build. This ensures that the 32-bit x86 build
+      receives the right flags to unzip files which which are larger than 2GB
+      when extracted.
+    </para>
+
+  </sect2>
+
+  <sect2 role="content">
+    <title>Contents</title>
+
+    <segmentedlist>
+      <segtitle>Installed Programs</segtitle>
+      <segtitle>Installed Libraries</segtitle>
+      <segtitle>Installed Directories</segtitle>
+
+      <seglistitem>
+        <seg>funzip, unzip, unzipfsx, zipgrep, and zipinfo</seg>
+        <seg>None</seg>
+        <seg>None</seg>
+      </seglistitem>
+    </segmentedlist>
+
+    <variablelist>
+      <bridgehead renderas="sect3">Short Descriptions</bridgehead>
+      <?dbfo list-presentation="list"?>
+      <?dbhtml list-presentation="table"?>
+
+      <varlistentry id="funzip">
+        <term><command>funzip</command></term>
+        <listitem>
+          <para>
+            allows the output of <command>unzip</command> commands to be
+            redirected.
+          </para>
+          <indexterm zone="ch-system-unzip funzip">
+            <primary sortas="b-funzip">funzip</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="unzip-prog">
+        <term><command>unzip</command></term>
+        <listitem>
+          <para>
+            lists, tests or extracts files from a <filename>ZIP</filename>
+            archive.
+          </para>
+          <indexterm zone="ch-system-unzip unzip-prog">
+            <primary sortas="b-unzip">unzip</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="unzipfsx">
+        <term><command>unzipfsx</command></term>
+        <listitem>
+          <para>
+            is a self-extracting stub that can be prepended to a
+            <filename>ZIP</filename> archive.  Files in this format allow the
+            recipient to decompress the archive without installing
+            <application>UnZip</application>.
+          </para>
+          <indexterm zone="ch-system-unzip unzipfsx">
+            <primary sortas="b-unzipfsx">unzipfsx</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="zipgrep">
+        <term><command>zipgrep</command></term>
+        <listitem>
+          <para>
+            searches files in a <filename>ZIP</filename> archive for
+            lines matching a pattern.
+          </para>
+          <indexterm zone="ch-system-unzip zipgrep">
+            <primary sortas="b-zipgrep">zipgrep</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+
+      <varlistentry id="zipinfo">
+        <term><command>zipinfo</command></term>
+        <listitem>
+          <para>
+            produces technical information about the files in a
+            <filename>ZIP</filename> archive, including file access permissions,
+            encryption status, type of compression, etc.
+          </para>
+          <indexterm zone="ch-system-unzip zipinfo">
+            <primary sortas="b-zipinfo">zipinfo</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+<!--
+      <varlistentry id="libunzip">
+        <term><filename class='libraryfile'>libunzip.so</filename></term>
+        <listitem>
+          <para>
+            contains the API functions required by the
+            <application>UnZip</application> programs.
+          </para>
+          <indexterm zone="ch-system-unzip libunzip">
+            <primary sortas="c-libunzip">libunzip.so</primary>
+          </indexterm>
+        </listitem>
+      </varlistentry>
+-->
+    </variablelist>
+
+  </sect2>
+
+</sect1>
diff -Naurp LFS_orig/chapter08/util-linux.xml LFS-pacman/chapter08/util-linux.xml
--- LFS_orig/chapter08/util-linux.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/util-linux.xml	2022-06-16 20:05:13.901189092 -0500
@@ -39,78 +39,170 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Util-linux</title>
 
-    <para>Prepare Util-linux for compilation:</para>
+    <para>Create the PKGBUILD for the Util-linux package with the following
+    commands:</para>
 
-<screen revision="sysv"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime   \
-            --bindir=/usr/bin    \
-            --libdir=/usr/lib    \
-            --sbindir=/usr/sbin  \
-            --docdir=/usr/share/doc/util-linux-&util-linux-version; \
-            --disable-chfn-chsh  \
-            --disable-login      \
-            --disable-nologin    \
-            --disable-su         \
-            --disable-setpriv    \
-            --disable-runuser    \
-            --disable-pylibmount \
-            --disable-static     \
-            --without-python     \
-            --without-systemd    \
-            --without-systemdsystemunitdir</userinput></screen>
-
-<screen revision="systemd"><userinput remap="configure">./configure ADJTIME_PATH=/var/lib/hwclock/adjtime   \
-            --bindir=/usr/bin    \
-            --libdir=/usr/lib    \
-            --sbindir=/usr/sbin  \
-            --docdir=/usr/share/doc/util-linux-&util-linux-version; \
-            --disable-chfn-chsh  \
-            --disable-login      \
-            --disable-nologin    \
-            --disable-su         \
-            --disable-setpriv    \
-            --disable-runuser    \
-            --disable-pylibmount \
-            --disable-static     \
-            --without-python</userinput></screen>
+<screen revision="sysv"><userinput>mkdir /sources/util-linux
+cd /sources/util-linux
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="util-linux"
+pkgver="&util-linux-version;"
+pkgrel="1"
+pkgdesc="The Util-linux package contains miscellaneous utility programs."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'libcap'
+         'ncurses'
+         'readline'
+         'zlib'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'udev'
+             'findutils'
+             'gawk'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed')
+optdepends=('smartmontools')
+source=('&util-linux-url;')
+md5sums=('&util-linux-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime   \
+              --bindir=/usr/bin    \
+              --libdir=/usr/lib    \
+              --sbindir=/usr/sbin  \
+              --docdir=/usr/share/doc/util-linux-${pkgver} \
+              --disable-chfn-chsh  \
+              --disable-login      \
+              --disable-nologin    \
+              --disable-su         \
+              --disable-setpriv    \
+              --disable-runuser    \
+              --disable-pylibmount \
+              --disable-static     \
+              --without-python     \
+              --without-systemd    \
+              --without-systemdsystemunitdir
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # The hardlink tests will fail if the host's kernel does not have the option
+  # CONFIG_CRYPTO_USER_API_HASH set.
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+<screen revision="systemd"><userinput>mkdir /sources/util-linux
+cd /sources/util-linux
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="util-linux"
+pkgver="&util-linux-version;"
+pkgrel="1"
+pkgdesc="The Util-linux package contains miscellaneous utility programs."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'libcap'
+         'ncurses'
+         'readline'
+         'zlib'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'udev'
+             'findutils'
+             'gawk'
+             'gcc'
+             'gettext'
+             'grep'
+             'make'
+             'sed')
+optdepends=('smartmontools')
+source=('&util-linux-url;')
+md5sums=('&util-linux-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure ADJTIME_PATH=/var/lib/hwclock/adjtime   \
+              --bindir=/usr/bin    \
+              --libdir=/usr/lib    \
+              --sbindir=/usr/sbin  \
+              --docdir=/usr/share/doc/util-linux-${pkgver} \
+              --disable-chfn-chsh  \
+              --disable-login      \
+              --disable-nologin    \
+              --disable-su         \
+              --disable-setpriv    \
+              --disable-runuser    \
+              --disable-pylibmount \
+              --disable-static     \
+              --without-python
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # The hardlink tests will fail if the host's kernel does not have the option
+  # CONFIG_CRYPTO_USER_API_HASH set.
+  make -k check || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
 
     <para>The --disable and --without options prevent warnings about
     building components that require packages not in LFS or are
     inconsistent with programs installed by other packages.</para>
 
-    <para>Compile the package:</para>
+    &pacman-build-add;
 
-<screen><userinput remap="make">make</userinput></screen>
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/util-linux-&util-linux-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-    <para>If desired, run the test suite as a non-&root; user:</para>
+    <para>Update the local cache and install the Util-linux package:</para>
 
-    <warning><para>Running the test suite as the
-    <systemitem class="username">root</systemitem> user can be harmful to
-    your system.  To run it, the CONFIG_SCSI_DEBUG option for the kernel must
-    be available in the currently running system and must be built as a
-    module.  Building it into the kernel will prevent booting.  For complete
-    coverage, other BLFS packages must be installed.  If desired, this test can
-    be run after rebooting into the completed LFS system and running:</para>
+<screen><userinput>pacman -Syu
+pacman -S util-linux --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen role="nodump"><userinput>bash tests/run.sh --srcdir=$PWD --builddir=$PWD</userinput></screen>
-    </warning>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-<screen><userinput remap="test">chown -Rv tester .
-su tester -c "make -k check"</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/util-linux
+cp PKGBUILD /srv/pacman/source/LFS/util-linux
+cd /sources
+rm -rf util-linux</userinput></screen>
 
-    <para>The <emphasis>hardlink</emphasis> tests will fail if the host's kernel 
-    does not have the option CONFIG_CRYPTO_USER_API_HASH set.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-<!--
-  <para>Finally, install the man pages:</para>
-
-<screen><userinput remap="install">tar -xf ../util-linux-man-pages-&util-linux-version;.tar.xz - -directory /usr/share/man - -strip-components=1</userinput></screen>
--->
   </sect2>
 
   <sect2 id="contents-utillinux" role="content">
diff -Naurp LFS_orig/chapter08/vim.xml LFS-pacman/chapter08/vim.xml
--- LFS_orig/chapter08/vim.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/vim.xml	2022-06-16 20:05:13.904522425 -0500
@@ -46,61 +46,129 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Vim</title>
 
-    <para>First, change the default location of the <filename>vimrc</filename>
-    configuration file to <filename class="directory">/etc</filename>:</para>
+    <para>Create the PKGBUILD for the Vim package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">echo '#define SYS_VIMRC_FILE "/etc/vimrc"' &gt;&gt; src/feature.h</userinput></screen>
-
-    <para>Prepare vim for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To prepare the tests, ensure that user
-    <systemitem class="username">tester</systemitem> can write
-    to the source tree:</para>
-
-<screen><userinput remap="test">chown -Rv tester .</userinput></screen>
-
-    <para>Now run the tests as user <systemitem
-    class="username">tester</systemitem>:</para>
-
-<screen><userinput remap="test">su tester -c "LANG=en_US.UTF-8 make -j1 test" &amp;> vim-test.log</userinput></screen>
-
-    <para>The test suite outputs a lot of binary data to the screen.  This can
-    cause issues with the settings of the current terminal.  The problem can be
-    avoided by redirecting the output to a log file as shown above.  A
-    successful test will result in the words "ALL DONE" in the log file
-    at completion.</para>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Many users are used to using <command>vi</command> instead of
-    <command>vim</command>. To allow execution of <command>vim</command>
-    when users habitually enter <command>vi</command>, create a
-    symlink for both the binary and the man page in the provided
-    languages:</para>
-
-<screen><userinput remap="install">ln -sv vim /usr/bin/vi
-for L in  /usr/share/man/{,*/}man1/vim.1; do
-    ln -sv vim.1 $(dirname $L)/vi.1
-done</userinput></screen>
-
-    <para>By default, vim's documentation is installed in <filename
-    class="directory">/usr/share/vim</filename>. The following symlink
-    allows the documentation to be accessed via <filename
-    class="directory">/usr/share/doc/vim-&vim-version;</filename>, making
-    it consistent with the location of documentation for other packages:</para>
-
-<screen><userinput remap="install">ln -sv ../&vim-docdir;/doc /usr/share/doc/vim-&vim-version;</userinput></screen>
+<screen><userinput>mkdir /sources/vim
+cd /sources/vim
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="vim"
+pkgver="&vim-version;"
+pkgrel="1"
+pkgdesc="The Vim package contains a powerful text editor."
+arch=('x86'
+      'x86_64')
+license=('VIM')
+groups=('core')
+depends=('acl'
+         'attr'
+         'glibc'
+         'python'
+         'ncurses'
+         'tcl'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'grep'
+             'make'
+             'sed')
+optdepends=('xorg'
+            'gtk+2'
+            'lesstif'
+            'ruby'
+            'gpm')
+backup=('etc/vimrc')
+source=(&vim-url;)
+md5sums=('&vim-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+
+  # Change the default location of the vimrc configuration file to /etc
+  echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  # Output test log to elsewhere to avoid screen artifacts
+  # Tests are known to have timing issues if run in parrallel
+  LANG=en_US.UTF-8 make -j1 test &amp;&gt; vim-test.log || true
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+
+  # Create a vi compatibility link and man pages
+  ln -sv vim ${pkgdir}/usr/bin/vi
+  for L in  ${pkgdir}/usr/share/man/{,*/}man1/vim.1; do
+      ln -sv vim.1 $(dirname $L)/vi.1
+  done
+
+  # By default, vim installs documentation in /usr/share/vim
+  install -vdm755 ${pkgdir}/usr/share/doc
+  ln -sv ../vim/vim82/doc ${pkgdir}/usr/share/doc/${pkgname}-${pkgver}
+
+  # Create a default vimrc
+  # Note: this will be updated manually immediately after the build
+  install -vdm755 "${pkgdir}/etc"
+  cat &gt; "${pkgdir}/etc/vimrc" &lt;&lt; "EOF"
+" Begin /etc/vimrc
+
+" Ensure defaults are set before customizing settings, not after
+source $VIMRUNTIME/defaults.vim
+let skip_defaults_vim=1
+
+set nocompatible
+set backspace=2
+set mouse=
+syntax on
+if (&amp;term == "xterm") || (&amp;term == "putty")
+  set background=dark
+endif
+
+" End /etc/vimrc
+EOF
+
+  # Use vim syntax files from the packges rather than from VIM sources
+  rm -f "${pkgdir}/usr/share/vim/vim${shortver}/ftdetect"/{meson,PKGBUILD}.vim
+  rm -f "${pkgdir}/usr/share/vim/vim${shortver}/indent/meson.vim"
+  rm -f "${pkgdir}/usr/share/vim/vim${shortver}/syntax"/{meson,ninja,PKGBUILD}.vim
+  rm -f "${pkgdir}/usr/share/vim/vim${shortver}/ftplugin"/{meson,PKGBUILD}.vim
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/vim-&vim-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Vim package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S vim --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/vim
+cp PKGBUILD /srv/pacman/source/LFS/vim
+cd /sources
+rm -rf vim</userinput></screen>
 
     <para>If an X Window System is going to be installed on the LFS
     system, it may be necessary to recompile vim after installing X. Vim
diff -Naurp LFS_orig/chapter08/wheel.xml LFS-pacman/chapter08/wheel.xml
--- LFS_orig/chapter08/wheel.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/wheel.xml	2022-06-16 20:05:13.907855759 -0500
@@ -37,41 +37,61 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Wheel</title>
 
-    <para>Install wheel with the following command:</para>
+    <para>Create the PKGBUILD for the Wheel package with the following
+    commands:</para>
 
-<screen><userinput remap="install">pip3 install --no-index $PWD</userinput></screen>
-
-    <variablelist>
-      <title>The meaning of the pip3 options:</title>
-
-      <varlistentry>
-        <term><command>install</command></term>
-        <listitem>
-           <para>Install the package.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>--no-index</parameter></term>
-        <listitem>
-          <para>Prevent pip from fetching files from the online package
-          repository (PyPI). If packages are installed in the correct order,
-          then it won't need to fetch any files in the first place, but this
-          option adds some safety in case of user error.</para>
-        </listitem>
-      </varlistentry>
-
-      <varlistentry>
-        <term><parameter>$PWD</parameter></term>
-        <listitem>
-           <para>Look for files to install in the current working directory.</para>
-        </listitem>
-      </varlistentry>
-
-    </variablelist>
+<screen><userinput>mkdir /sources/wheel
+cd /sources/wheel
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="wheel"
+pkgver="&wheel-version;"
+pkgrel="1"
+pkgdesc="The wheel module is the reference implementation of the Python wheel packaging standard."
+arch=('any')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('python'
+         'setuptools')
+source=('&wheel-url;')
+md5sums=('&wheel-md5;')
+
+build(){
+  cd "${pkgname}-${pkgver}"
+  python3 setup.py build
+}
+
+# The testsuite for this package depends on the coverage module
+# Add back after LFS
+
+package(){
+  cd "${pkgname}-${pkgver}"
+  python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/wheel-&wheel-version;-1-any.pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Wheel package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S wheel --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/wheel
+cp PKGBUILD /srv/pacman/source/LFS/wheel
+cd /sources
+rm -rf wheel</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/xml-parser.xml LFS-pacman/chapter08/xml-parser.xml
--- LFS_orig/chapter08/xml-parser.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/xml-parser.xml	2022-06-16 20:05:13.904522425 -0500
@@ -38,24 +38,63 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of XML::Parser</title>
 
-    <para>Prepare XML::Parser for compilation:</para>
+    <para>Create the PKGBUILD for the XML::Parser package with the following
+    commands:</para>
 
-<screen><userinput remap="configure">perl Makefile.PL</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make test</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/xml-parser
+cd /sources/xml-parser
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="xml-parser"
+_pkgname="XML-Parser"
+pkgver="&xml-parser-version;"
+pkgrel="1"
+pkgdesc="The XML::Parser module is a Perl interface to James Clark's XML parser, Expat."
+arch=('x86'
+      'x86_64')
+license=('custom')
+groups=('core')
+source=('&xml-parser-url;')
+md5sums=('&xml-parser-md5;')
+
+build(){
+  cd ${_pkgname}-${pkgver}
+  perl Makefile.PL
+  make
+}
+
+check(){
+  cd ${_pkgname}-${pkgver}
+  make test
+}
+
+package(){
+  cd ${_pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/xml-parser-&xml-parser-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the XML::Parser package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S xml-parser --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/xml-parser
+cp PKGBUILD /srv/pacman/source/LFS/xml-parser
+cd /sources
+rm -rf xml-parser</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/xz.xml LFS-pacman/chapter08/xz.xml
--- LFS_orig/chapter08/xz.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/xz.xml	2022-06-16 20:05:13.904522425 -0500
@@ -41,30 +41,84 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Xz</title>
 
-    <para>Apply a patch to fix an issue in xzgrep:</para>
+    <para>Create the PKGBUILD for the Xz package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">patch -Np1 -i ../&xz-upstream-fix-patch;</userinput></screen>
-
-    <para>Prepare Xz for compilation with:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr    \
-            --disable-static \
-            --docdir=/usr/share/doc/xz-&xz-version;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
+<screen><userinput>mkdir /sources/xz
+cd /sources/xz
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="xz"
+pkgver="&xz-version;"
+pkgrel="1"
+pkgdesc="The Xz package contains programs for compressing and decompressing files."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'GPLv2'
+         'GPLv3'
+         'LGPLv2.1'
+         'PD')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'diffutils'
+             'gcc'
+             'make')
+source=('&xz-url;'
+        '&patches-root;&xz-upstream-fix-patch;')
+md5sums=('&xz-md5;'
+         '&xz-upstream-fix-patch-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+  # Fix an issue in xzgrep
+  patch -Np1 -i ${srcdir}/&xz-upstream-fix-patch;
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr    \
+              --disable-static \
+              --docdir=/usr/share/doc/xz-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/xz-&xz-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the zlib package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S xz --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/xz
+cp PKGBUILD /srv/pacman/source/LFS/xz
+cd /sources
+rm -rf xz</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/zlib.xml LFS-pacman/chapter08/zlib.xml
--- LFS_orig/chapter08/zlib.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/zlib.xml	2022-06-16 20:05:13.907855759 -0500
@@ -7,7 +7,7 @@
 
 <sect1 id="ch-system-zlib" role="wrap">
   <?dbhtml filename="zlib.html"?>
-
+  
   <sect1info condition="script">
     <productname>zlib</productname>
     <productnumber>&zlib-version;</productnumber>
@@ -38,28 +38,72 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Zlib</title>
 
-    <para>Prepare Zlib for compilation:</para>
-
-<screen><userinput remap="configure">./configure --prefix=/usr</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make</userinput></screen>
-
-    <para>To test the results, issue:</para>
-
-<screen><userinput remap="test">make check</userinput></screen>
-
-    <para>Install the package:</para>
-
-<screen><userinput remap="install">make install</userinput></screen>
-
-    <para>Remove a useless static library:</para>
+    <para>Create the PKGBUILD for the ZLib package with the following
+    commands:</para>
 
-<screen><userinput remap="install">rm -fv /usr/lib/libz.a</userinput></screen>
+<screen><userinput>mkdir /sources/zlib
+cd /sources/zlib
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="zlib"
+pkgver="&zlib-version;"
+pkgrel="1"
+pkgdesc="The Zlib package contains compression and decompression routines used by some programs."
+arch=('x86'
+      'x86_64')
+license=('custom'
+         'MIT')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('bash'
+             'binutils'
+             'coreutils'
+             'gcc'
+             'make'
+             'sed')
+source=('&zlib-url;')
+md5sums=('&zlib-md5;')
+
+build(){
+  cd ${pkgname}-${pkgver}
+  ./configure --prefix=/usr
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make -j1 DESTDIR=${pkgdir} install
+  rm -fv ${pkgdir}/usr/lib/libz.a
+}</literal>
+REALEOF</userinput></screen>
+
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/zlib-&zlib-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
+
+    <para>Update the local cache and install the Zlib package:</para>
+
+<screen><userinput>pacman -Syu
+pacman -S zlib --overwrite \* -dd --noconfirm</userinput></screen>
+
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
+
+<screen><userinput>mkdir /srv/pacman/source/LFS/zlib
+cp PKGBUILD /srv/pacman/source/LFS/zlib
+cd /sources
+rm -rf zlib</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/chapter08/zstd.xml LFS-pacman/chapter08/zstd.xml
--- LFS_orig/chapter08/zstd.xml	2022-06-16 20:04:57.557855152 -0500
+++ LFS-pacman/chapter08/zstd.xml	2022-06-16 20:05:13.901189092 -0500
@@ -39,16 +39,60 @@
 
   </sect2>
 
-  <sect2 role="installation">
+  <sect2>
     <title>Installation of Zstd</title>
 
-    <para>Apply a patch to fix some issues identified by upstream:</para>
+    <para>Create the PKGBUILD for the Zstd package with the following
+    commands:</para>
 
-<screen><userinput remap="pre">patch -Np1 -i ../&zstd-upstream-fixes-patch;</userinput></screen>
-
-    <para>Compile the package:</para>
-
-<screen><userinput remap="make">make prefix=/usr</userinput></screen>
+<screen><userinput>mkdir /sources/zstd
+cd /sources/zstd
+cat &gt; PKGBUILD &lt;&lt; "REALEOF"
+<literal># Maintainer: Linux From Scratch &lt;lfs-dev@lists.linuxfromscratch.org&gt;
+
+pkgname="zstd"
+pkgver="&zstd-version;"
+pkgrel="1"
+pkgdesc="Zstandard is a real-time compression algorithm, providing high compression ratios."
+arch=('x86'
+      'x86_64')
+license=('GPLv2')
+groups=('core')
+depends=('glibc'
+         'rootfs')
+makedepends=('binutils'
+             'coreutils'
+             'gcc'
+             'gzip'
+             'make'
+             'xz')
+source=('&zstd-url;'
+        '&patches-root;&zstd-upstream-fixes-patch;')
+md5sums=('&zstd-md5;'
+         '&zstd-upstream-fixes-patch-md5;')
+
+prepare(){
+  cd ${pkgname}-${pkgver}
+  # Fix some issues identified by upstream
+  patch -Np1 -i ${srcdir}/&zstd-upstream-fixes-patch;
+}
+
+build(){
+  cd ${pkgname}-${pkgver}
+  make
+}
+
+check(){
+  cd ${pkgname}-${pkgver}
+  make check
+}
+
+package(){
+  cd ${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} prefix=/usr install
+  rm -v ${pkgdir}/usr/lib/libzstd.a
+}</literal>
+REALEOF</userinput></screen>
 
     <note>
        <para>In the test output there are several places that
@@ -56,16 +100,23 @@
        test failure. There should be no test failures.</para>
     </note>
 
-    <para>To test the results, issue:</para>
+    &pacman-build-add;
+
+<screen><userinput>repo-add /srv/pacman/repos/LFS/LFS.db.tar.xz \
+         /srv/pacman/repos/LFS/zstd-&zstd-version;-1-$(uname -m).pkg.tar.xz</userinput></screen>
 
-<screen><userinput remap="test">make check</userinput></screen>
+    <para>Update the local cache and install the Zstd package:</para>
 
-    <para>Install the package:</para>
+<screen><userinput>pacman -Syu
+pacman -S zstd --overwrite \* -dd --noconfirm</userinput></screen>
 
-<screen><userinput remap="install">make prefix=/usr install</userinput></screen>
+    <para>Finally, copy the source files into the source repository and clean
+    up the build directory:</para>
 
-    <para>Remove the static library:</para>
-<screen><userinput remap="install">rm -v /usr/lib/libzstd.a</userinput></screen>
+<screen><userinput>mkdir /srv/pacman/source/LFS/zstd
+cp PKGBUILD /srv/pacman/source/LFS/zstd
+cd /sources
+rm -rf zstd</userinput></screen>
 
   </sect2>
 
diff -Naurp LFS_orig/conditional.ent LFS-pacman/conditional.ent
--- LFS_orig/conditional.ent	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/conditional.ent	2022-06-16 20:05:13.914522426 -0500
@@ -0,0 +1,2 @@
+<!ENTITY % sysv    "INCLUDE">
+<!ENTITY % systemd "IGNORE ">
diff -Naurp LFS_orig/general.ent LFS-pacman/general.ent
--- LFS_orig/general.ent	2022-06-16 20:04:57.561188485 -0500
+++ LFS-pacman/general.ent	2022-06-16 20:05:13.914522426 -0500
@@ -105,6 +105,7 @@
 
 <!ENTITY gnu             "https://ftp.gnu.org/gnu/">
 <!ENTITY gnu-software    "https://www.gnu.org/software/">
+<!ENTITY gnupg-http      "https://www.gnupg.org/ftp/gcrypt">
 <!ENTITY alpha-gnu       "https://alpha.gnu.org/gnu/">
 <!ENTITY kernel          "https://www.kernel.org/pub/">
 <!ENTITY sourceforge     "https://prdownloads.sourceforge.net/">
@@ -120,3 +121,15 @@
 
 <!ENTITY % patches-entities SYSTEM "patches.ent">
 %patches-entities;
+
+<!-- repetitive blurb for building a pacman package -->
+<!ENTITY pacman-build-add "<para>Prepare the build directory for the pacman user
+                          and build the package:</para>
+
+<screen><userinput>chown -R root:pacman .
+chmod 2775 .
+chmod 664 PKGBUILD
+su pacman -c 'makepkg -L --nodeps'</userinput></screen>
+
+<para>Add the newly created package to the central package repository:</para>">
+
diff -Naurp LFS_orig/Makefile LFS-pacman/Makefile
--- LFS_orig/Makefile	2022-06-16 20:04:57.554521819 -0500
+++ LFS-pacman/Makefile	2022-06-16 20:05:13.907855759 -0500
@@ -23,7 +23,7 @@ ifneq ($(REV), sysv)
 endif
 
 ifeq ($(REV), sysv)
-  BASEDIR         ?= ~/lfs-book
+  BASEDIR         ?= ~/public_html/lfs-book
   PDF_OUTPUT      ?= LFS-BOOK.pdf
   NOCHUNKS_OUTPUT ?= LFS-BOOK.html
   DUMPDIR         ?= ~/cross-lfs-commands
diff -Naurp LFS_orig/packages.ent LFS-pacman/packages.ent
--- LFS_orig/packages.ent	2022-06-16 20:04:57.577855153 -0500
+++ LFS-pacman/packages.ent	2022-06-16 20:05:13.914522426 -0500
@@ -29,6 +29,14 @@
 <!ENTITY attr-fin-du "4.1 MB">
 <!ENTITY attr-fin-sbu "less than 0.1 SBU">
 
+<!ENTITY asciidoc-version "9.0.2">
+<!ENTITY asciidoc-size "1,229 KB">
+<!ENTITY asciidoc-url "https://github.com/asciidoc/asciidoc-py3/releases/download/&asciidoc-version;/asciidoc-&asciidoc-version;.tar.gz">
+<!ENTITY asciidoc-md5 "c93a0cad453540eb94407909e3c673de">
+<!ENTITY asciidoc-home "https://github.com/asciidoc/">
+<!ENTITY asciidoc-fin-du "5.0 MB">
+<!ENTITY asciidoc-fin-sbu "0.1 SBU">
+
 <!ENTITY autoconf-version "2.71">
 <!ENTITY autoconf-size "1,263 KB">
 <!ENTITY autoconf-url "&gnu;autoconf/autoconf-&autoconf-version;.tar.xz">
@@ -114,6 +122,32 @@
 <!ENTITY coreutils-fin-du "153 MB">
 <!ENTITY coreutils-fin-sbu "2.6 SBU">
 
+<!ENTITY cracklib-version "2.97">
+<!ENTITY cracklib-size "592 KB">
+<!ENTITY cracklib-url "https://github.com/cracklib/cracklib/releases/download/v&cracklib-version;/cracklib-&cracklib-version;.tar.bz2">
+<!ENTITY cracklib-md5 "0d68de25332cee5660850528a385427f">
+<!ENTITY cracklib-home "https://github.com/cracklib/">
+<!ENTITY cracklib-fin-du "4,200 KB">
+<!ENTITY cracklib-fin-sbu "less than 0.1 SBU">
+<!ENTITY cracklib-words-url "https://github.com/cracklib/cracklib/releases/download/v&cracklib-version;/cracklib-words-&cracklib-version;.bz2">
+<!ENTITY cracklib-words-md5 "94e9963e4786294f7fb0f2efd7618551">
+
+<!ENTITY curl-version "7.83.0">
+<!ENTITY curl-size "2.4 MB">
+<!ENTITY curl-url "https://curl.haxx.se/download/curl-&curl-version;.tar.xz">
+<!ENTITY curl-md5 "b7924acdea33dedc3150a044789ed0bb">
+<!ENTITY curl-home "https://curl.haxx.se/">
+<!ENTITY curl-fin-du "135 MB">
+<!ENTITY curl-fin-sbu "0.3 SBU">
+
+<!ENTITY db-version "5.3.28">
+<!ENTITY db-size "34,000 KB">
+<!ENTITY db-url "https://anduin.linuxfromscratch.org/BLFS/bdb/db-5.3.28.tar.gz">
+<!ENTITY db-md5 "b99454564d5b4479750567031d66fe24">
+<!ENTITY db-home " retired ">
+<!ENTITY db-fin-du "265,000 KB">
+<!ENTITY db-fin-sbu "0.6 SBU">
+
 <!ENTITY dbus-version "1.14.0">
 <!ENTITY dbus-size "1,332 KB">
 <!ENTITY dbus-url "https://dbus.freedesktop.org/releases/dbus/dbus-&dbus-version;.tar.xz">
@@ -140,6 +174,22 @@
 <!ENTITY diffutils-fin-du "34 MB">
 <!ENTITY diffutils-fin-sbu "0.6 SBU">
 
+<!ENTITY docbook-45-xml-version "4.5">
+<!ENTITY docbook-45-xml-size "96 KB">
+<!ENTITY docbook-45-xml-url "http://www.docbook.org/xml/&docbook-45-xml-version;/docbook-xml-&docbook-45-xml-version;.zip">
+<!ENTITY docbook-45-xml-md5 "03083e288e87a7e829e437358da7ef9e">
+<!ENTITY docbook-45-xml-home "http://www.docbook.org/">
+<!ENTITY docbook-45-xml-fin-du "1.2 MB">
+<!ENTITY docbook-45-xml-fin-sbu "0.1 SBU">
+
+<!ENTITY docbook-xsl-version "1.79.2">
+<!ENTITY docbook-xsl-size "22,528 KB">
+<!ENTITY docbook-xsl-url "https://github.com/docbook/xslt10-stylesheets/releases/download/release/&docbook-xsl-version;/docbook-xsl-nons-&docbook-xsl-version;.tar.bz2">
+<!ENTITY docbook-xsl-md5 "2666d1488d6ced1551d15f31d7ed8c38">
+<!ENTITY docbook-xsl-home "https://github.com/docbook/">
+<!ENTITY docbook-xsl-fin-du "58 MB">
+<!ENTITY docbook-xsl-fin-sbu "0.1 SBU">
+
 <!ENTITY e2fsprogs-version "1.46.5">
 <!ENTITY e2fsprogs-size "9,307 KB">
 <!ENTITY e2fsprogs-url "https://downloads.sourceforge.net/project/e2fsprogs/e2fsprogs/v&e2fsprogs-version;/e2fsprogs-&e2fsprogs-version;.tar.gz">
@@ -179,6 +229,14 @@
 <!ENTITY expect-tmp-du "3.9 MB">
 <!ENTITY expect-tmp-sbu "0.2 SBU">
 
+<!ENTITY fakeroot-version "1.28">
+<!ENTITY fakeroot-size "536 KB">
+<!ENTITY fakeroot-url "https://www.linuxfromscratch.org/~dj/fakeroot-&fakeroot-version;.tar.gz">
+<!ENTITY fakeroot-md5 "75663fa4d0d1eedab0b951bb977bc12f">
+<!ENTITY fakeroot-home "https://www.debian.org/">
+<!ENTITY fakeroot-fin-du "4.5 MB">
+<!ENTITY fakeroot-fin-sbu "0.2 SBU">
+
 <!ENTITY file-version "5.41">
 <!ENTITY file-size "1040 KB">
 <!ENTITY file-url "https://astron.com/pub/file/file-&file-version;.tar.gz">
@@ -276,6 +334,14 @@
 <!ENTITY gmp-fin-du "52 MB">
 <!ENTITY gmp-fin-sbu "1.0 SBU">
 
+<!ENTITY gnupg-version "2.3.6">
+<!ENTITY gnupg-size "7.3 MB">
+<!ENTITY gnupg-url "https://www.gnupg.org/ftp/gcrypt/gnupg/gnupg-&gnupg-version;.tar.bz2">
+<!ENTITY gnupg-md5 "eabfbffae0474c8c3f19fca42a9d7d1e">
+<!ENTITY gnupg-home "https://www.gnu.org/gnupg/">
+<!ENTITY gnupg-fin-du "124 MB">
+<!ENTITY gnupg-fin-sbu "0.4 SBU">
+
 <!ENTITY gperf-version "3.1">
 <!ENTITY gperf-size "1,188 KB">
 <!ENTITY gperf-url "&gnu;gperf/gperf-&gperf-version;.tar.gz">
@@ -284,6 +350,14 @@
 <!ENTITY gperf-fin-du "6.0 MB">
 <!ENTITY gperf-fin-sbu "less than 0.1 SBU">
 
+<!ENTITY gpgme-version "1.17.1">
+<!ENTITY gpgme-size "1.7 MB">
+<!ENTITY gpgme-url "https://www.gnupg.org/ftp/gcrypt/gpgme/gpgme-&gpgme-version;.tar.bz2">
+<!ENTITY gpgme-md5 "4d3c7699e1cdd4095d103f7a6833ae3a">
+<!ENTITY gpgme-home "https://www.gnupg.org/gcrypt/gpgme/">
+<!ENTITY gpgme-fin-du "262 MB">
+<!ENTITY gpgme-fin-sbu "0.6 SBU">
+
 <!ENTITY grep-version "3.7">
 <!ENTITY grep-size "1,603 KB">
 <!ENTITY grep-url "&gnu;grep/grep-&grep-version;.tar.xz">
@@ -353,6 +427,12 @@
 <!ENTITY iproute2-fin-du "15 MB">
 <!ENTITY iproute2-fin-sbu "0.2 SBU">
 
+<!ENTITY isl-version "0.24">
+<!ENTITY isl-size "2.1 MB">
+<!ENTITY isl-url "https://gcc.gnu.org/pub/gcc/infrastructure/isl-&isl-version;.tar.bz2">
+<!ENTITY isl-md5 "dd2f7b78e118c25bd96134a52aae7f4d">
+<!ENTITY isl-home "http://isl.gforge.inria.fr/">
+
 <!ENTITY jinja2-version "3.1.2">
 <!ENTITY jinja2-size "262 KB">
 <!ENTITY jinja2-url "https://files.pythonhosted.org/packages/source/J/Jinja2/Jinja2-&jinja2-version;.tar.gz">
@@ -393,6 +473,24 @@
 <!ENTITY lfs-bootscripts-cfg-du "BOOTSCRIPTS-INSTALL-KB KB">
 <!ENTITY lfs-bootscripts-cfg-sbu "less than 0.1 SBU">
 
+<!ENTITY libarchive-version "3.6.1">
+<!ENTITY libarchive-size "5.0 MB">
+<!ENTITY libarchive-url "https://github.com/libarchive/libarchive/releases/download/v&libarchive-version;/libarchive-&libarchive-version;.tar.xz">
+<!ENTITY libarchive-md5 "9465f7995649c9ea84854a7fd8c76f30">
+<!ENTITY libarchive-home "https://github.com/libarchive/">
+<!ENTITY libarchive-fin-du "41 MB">
+<!ENTITY libarchive-fin-sbu "0.3 SBU">
+
+<!ENTITY libassuan-version "2.5.5">
+<!ENTITY libassuan-size "996 KB">
+<!ENTITY libassuan-url "&gnupg-http;/libassuan/libassuan-&libassuan-version;.tar.bz2">
+<!ENTITY libassuan-md5 "7194453152bb67e3d45da698762b5d6f">
+<!ENTITY libassuan-home "&gnupg-http;">
+<!ENTITY libassuan-tmp-du "7.4 MB">
+<!ENTITY libassuan-tmp-sbu "0.1 SBU">
+<!ENTITY libassuan-fin-du "7.4 MB">
+<!ENTITY libassuan-fin-sbu "0.1 SBU">
+
 <!ENTITY libcap-version "2.64">
 <!ENTITY libcap-size "172 KB">
 <!ENTITY libcap-url "&kernel;linux/libs/security/linux-privs/libcap2/libcap-&libcap-version;.tar.xz">
@@ -409,6 +507,40 @@
 <!ENTITY libffi-fin-du "10 MB">
 <!ENTITY libffi-fin-sbu "1.9 SBU">
 
+<!ENTITY libgcrypt-version "1.10.1">
+<!ENTITY libgcrypt-size "3,600 KB">
+<!ENTITY libgcrypt-url "https://www.gnupg.org/ftp/gcrypt/libgcrypt/libgcrypt-&libgcrypt-version;.tar.bz2">
+<!ENTITY libgcrypt-md5 "8fadbe1fddafa341dce5ef3869f70e25">
+<!ENTITY libgcrypt-home "https://www.gnupg.org/gcrypt/">
+<!ENTITY libgcrypt-fin-du "130 MB">
+<!ENTITY libgcrypt-fin-sbu "0.4 SBU">
+
+<!ENTITY libgpg-error-version "1.45">
+<!ENTITY libgpg-error-size "996 KB">
+<!ENTITY libgpg-error-url "&gnupg-http;/libgpg-error/libgpg-error-&libgpg-error-version;.tar.bz2">
+<!ENTITY libgpg-error-md5 "3bb15e0c29d3a680db7cef15143615e1">
+<!ENTITY libgpg-error-home "&gnupg-http;">
+<!ENTITY libgpg-error-tmp-du "11 MB">
+<!ENTITY libgpg-error-tmp-sbu "0.1 SBU">
+<!ENTITY libgpg-error-fin-du "11 MB">
+<!ENTITY libgpg-error-fin-sbu "0.1 SBU">
+
+<!ENTITY libksba-version "1.6.0">
+<!ENTITY libksba-size "648 KB">
+<!ENTITY libksba-url "https://www.gnupg.org/ftp/gcrypt/libksba/libksba-&libksba-version;.tar.bz2">
+<!ENTITY libksba-md5 "d333b2e1381068d4f9a328240f062f0f">
+<!ENTITY libksba-home "https://www.gnupg.org/gcrypt/">
+<!ENTITY libksba-fin-du "9.3 MB">
+<!ENTITY libksba-fin-sbu "0.1 SBU">
+
+<!ENTITY libnsl-version "2.0.0">
+<!ENTITY libnsl-size "280 KB">
+<!ENTITY libnsl-url "https://github.com/thkukuk/libnsl/releases/download/v&libnsl-version;/libnsl-&libnsl-version;.tar.xz">
+<!ENTITY libnsl-md5 "1e8c0615071ea13202452304de1eaab9">
+<!ENTITY libnsl-home "https://github.com/thkukuk/libnsl/">
+<!ENTITY libnsl-fin-du "3,200 KB">
+<!ENTITY libnsl-fin-sbu "less than 0.1 SBU">
+
 <!ENTITY libpipeline-version "1.5.6">
 <!ENTITY libpipeline-size "954 KB">
 <!ENTITY libpipeline-url "&savannah;/releases/libpipeline/libpipeline-&libpipeline-version;.tar.gz">
@@ -417,6 +549,30 @@
 <!ENTITY libpipeline-fin-du "9.7 MB">
 <!ENTITY libpipeline-fin-sbu "0.1 SBU">
 
+<!ENTITY libpwquality-version "1.4.4">
+<!ENTITY libpwquality-size "420 KB">
+<!ENTITY libpwquality-url "https://github.com/libpwquality/libpwquality/releases/download/libpwquality-&libpwquality-version;/libpwquality-&libpwquality-version;.tar.bz2">
+<!ENTITY libpwquality-md5 "1fe43f6641dbf1e1766e2a02cf68a9c3">
+<!ENTITY libpwquality-home "https://github.com/libpwquality/">
+<!ENTITY libpwquality-fin-du "4,100 KB">
+<!ENTITY libpwquality-fin-sbu "less than 0.1 SBU">
+
+<!ENTITY libtasn1-version "4.18.0">
+<!ENTITY libtasn1-size "1,600 KB">
+<!ENTITY libtasn1-url "https://ftp.gnu.org/gnu/libtasn1/libtasn1-&libtasn1-version;.tar.gz">
+<!ENTITY libtasn1-md5 "8203e72a2c0390515410b2ea2c032f04">
+<!ENTITY libtasn1-home "https://www.gnu.org/libtasn/">
+<!ENTITY libtasn1-fin-du "14 MB">
+<!ENTITY libtasn1-fin-sbu "0.2 SBU">
+
+<!ENTITY libtirpc-version "1.3.2">
+<!ENTITY libtirpc-size "504 KB">
+<!ENTITY libtirpc-url "https://downloads.sourceforge.net/libtirpc/libtirpc-&libtirpc-version;.tar.bz2">
+<!ENTITY libtirpc-md5 "cf4ca51f3fc401bea61c702c69171ab0">
+<!ENTITY libtirpc-home "https://downloads.sourceforge.net/libtirpc/">
+<!ENTITY libtirpc-fin-du "6,700 KB">
+<!ENTITY libtirpc-fin-sbu "less than 0.1 SBU">
+
 <!ENTITY libtool-version "2.4.7">
 <!ENTITY libtool-size "996 KB">
 <!ENTITY libtool-url "&gnu;libtool/libtool-&libtool-version;.tar.xz">
@@ -425,6 +581,30 @@
 <!ENTITY libtool-fin-du "43 MB">
 <!ENTITY libtool-fin-sbu "1.5 SBU">
 
+<!ENTITY libusb-version "1.0.26">
+<!ENTITY libusb-size "608 KB">
+<!ENTITY libusb-url "https://github.com//libusb/libusb/releases/download/v&libusb-version;/libusb-&libusb-version;.tar.bz2">
+<!ENTITY libusb-md5 "9c75660dfe1d659387c37b28c91e3160">
+<!ENTITY libusb-home "https://github.com/libusb">
+<!ENTITY libusb-fin-du "5.8 MB">
+<!ENTITY libusb-fin-sbu "0.1 SBU">
+
+<!ENTITY libxml2-version "2.9.14">
+<!ENTITY libxml2-size "3.0 MB">
+<!ENTITY libxml2-url "https://download.gnome.org/sources/libxml2/2.9/libxml2-2.9.14.tar.xz">
+<!ENTITY libxml2-md5 "b7b3029ac6beb32a7925225515f83ca3">
+<!ENTITY libxml2-home "http://xmlsof.org/">
+<!ENTITY libxml2-fin-du "103 MB">
+<!ENTITY libxml2-fin-sbu "0.4 SBU">
+
+<!ENTITY libxslt-version "1.1.35">
+<!ENTITY libxslt-size "1.7 MB">
+<!ENTITY libxslt-url "https://download.gnome.org/sources/libxslt/1.1/libxslt-1.1.35.tar.xz">
+<!ENTITY libxslt-md5 "5b3a634b77effd8a6268c21173575053">
+<!ENTITY libxslt-home "http://xmlsoft.org/">
+<!ENTITY libxslt-fin-du "36 MB">
+<!ENTITY libxslt-fin-sbu "0.2 SBU">
+
 <!ENTITY linux-major-version "5">
 <!ENTITY linux-minor-version "17">
 <!ENTITY linux-patch-version "7">
@@ -442,9 +622,28 @@
 
 <!ENTITY linux-headers-tmp-du "1.2 GB">
 <!ENTITY linux-headers-tmp-sbu "0.1 SBU">
-<!-- Removed in this book
-<!ENTITY linux-headers-fin-du "1 GB">
-<!ENTITY linux-headers-fin-sbu "0.1 SBU">-->
+<!ENTITY linux-headers-fin-du "1.2 GB">
+<!ENTITY linux-headers-fin-sbu "0.1 SBU">
+
+<!ENTITY linux-pam-version "1.5.2">
+<!ENTITY linux-pam-size "966 KB">
+<!ENTITY linux-pam-url "https://github.com/linux-pam/linux-pam/releases/download/v&linux-pam-version;/Linux-PAM-&linux-pam-version;.tar.xz">
+<!ENTITY linux-pam-md5 "895e8adfa14af334f679bbeb28503f66">
+<!ENTITY linux-pam-home "https://github.com/linux-pam/">
+<!ENTITY linux-pam-fin-du "39,000 KB">
+<!ENTITY linux-pam-fin-sbu "0.4 SBU">
+<!ENTITY linux-pam-docs-version "&linux-pam-version;">
+<!ENTITY linux-pam-docs-size "433 KB">
+<!ENTITY linux-pam-docs-url "https://github.com/linux-pam/linux-pam/releases/download/v&linux-pam-version;/Linux-PAM-&linux-pam-version;-docs.tar.xz">
+<!ENTITY linux-pam-docs-md5 "ceb3dc248cb2f49a40904b93cb91db1b">
+
+<!ENTITY lzo-version "2.10">
+<!ENTITY lzo-size "588 KB">
+<!ENTITY lzo-url "http://www.oberhumer.com/opensource/lzo/download/lzo-&lzo-version;.tar.gz">
+<!ENTITY lzo-md5 "39d3f3f9c55c87b1e5d6888e1420f4b5">
+<!ENTITY lzo-home "https://www.oberhumer.com/opensource/lzo/">
+<!ENTITY lzo-fin-du "12 MB">
+<!ENTITY lzo-fin-sbu "0.3 SBU">
 
 <!ENTITY m4-version "1.4.19">
 <!ENTITY m4-size "1,617 KB">
@@ -466,6 +665,14 @@
 <!ENTITY make-fin-du "13 MB">
 <!ENTITY make-fin-sbu "0.5 SBU">
 
+<!ENTITY make-ca-version "1.10">
+<!ENTITY make-ca-size "32 KB">
+<!ENTITY make-ca-url "https://github.com/lfs-book/make-ca/releases/download/v&make-ca-version;/make-ca-&make-ca-version;.tar.xz">
+<!ENTITY make-ca-md5 "74f1ad16d7a086ac76e0424fd4dfe67b">
+<!ENTITY make-ca-home "https://github.com/djlucas/make-ca/">
+<!ENTITY make-ca-fin-du "6.6 MB">
+<!ENTITY make-ca-fin-sbu "0.1 SBU">
+
 <!ENTITY man-db-version "2.10.2">
 <!ENTITY man-db-size "1,860 KB">
 <!ENTITY man-db-url "&savannah;/releases/man-db/man-db-&man-db-version;.tar.xz">
@@ -524,6 +731,14 @@
 <!ENTITY ncurses-fin-du "45 MB">
 <!ENTITY ncurses-fin-sbu "0.4 SBU">
 
+<!ENTITY nettle-version "3.7.3">
+<!ENTITY nettle-size "2.3 MB">
+<!ENTITY nettle-url "https://ftp.gnu.org/gnu/nettle/nettle-&nettle-version;.tar.gz">
+<!ENTITY nettle-md5 "a60273d0fab9c808646fcf5e9edc2e8f">
+<!ENTITY nettle-home "https://www.gnu.org/nettle/">
+<!ENTITY nettle-fin-du "87 MB">
+<!ENTITY nettle-fin-sbu "0.4 SBU">
+
 <!ENTITY ninja-version "1.10.2">
 <!ENTITY ninja-size "209 KB">
 <!ENTITY ninja-url "&github;/ninja-build/ninja/archive/v&ninja-version;/ninja-&ninja-version;.tar.gz">
@@ -532,6 +747,14 @@
 <!ENTITY ninja-fin-du "64 MB">
 <!ENTITY ninja-fin-sbu "0.2 SBU">
 
+<!ENTITY npth-version "1.6">
+<!ENTITY npth-size "296 KB">
+<!ENTITY npth-url "https://www.gnupg.org/ftp/gcrypt/npth/npth-&npth-version;.tar.bz2">
+<!ENTITY npth-md5 "375d1a15ad969f32d25f1a7630929854">
+<!ENTITY npth-home "https://www.gnupg.org/gcrypt/">
+<!ENTITY npth-fin-du "2.6 MB">
+<!ENTITY npth-fin-sbu "0.1 SBU">
+
 <!ENTITY openssl-version "3.0.3">
 <!ENTITY openssl-size "14,706 KB">
 <!ENTITY openssl-url "https://www.openssl.org/source/openssl-&openssl-version;.tar.gz">
@@ -540,6 +763,35 @@
 <!ENTITY openssl-fin-du "474 MB">
 <!ENTITY openssl-fin-sbu "5.4 SBU">
 
+<!ENTITY p11-kit-version "0.24.1">
+<!ENTITY p11-kit-size "820 KB">
+<!ENTITY p11-kit-url "https://github.com/p11-glue/p11-kit/releases/download/&p11-kit-version;/p11-kit-&p11-kit-version;.tar.xz">
+<!ENTITY p11-kit-md5 "67b2539bdca6b4bedaeecc12864d2796">
+<!ENTITY p11-kit-home "https://github.com/p11-glue/p11-kit/">
+<!ENTITY p11-kit-fin-du "44 MB">
+<!ENTITY p11-kit-fin-sbu "0.5 SBU">
+
+<!ENTITY pacman-version "6.0.1">
+<!ENTITY pacman-size "860 KB">
+<!ENTITY pacman-url "https://sources.archlinux.org/other/pacman/pacman-&pacman-version;.tar.xz">
+<!ENTITY pacman-md5 "f71e6f06867749735960d0c1d199d375">
+<!ENTITY pacman-home "https://sources.archlinux.org/">
+<!ENTITY pacman-fin-du "25.9 MB">
+<!ENTITY pacman-fin-sbu "0.1 SBU">
+
+<!ENTITY pacman-contrib-version "1.5.1">
+<!ENTITY pacman-contrib-size "120 KB">
+<!ENTITY pacman-contrib-url "https://www.linuxfromscratch.org/~dj/pacman-contrib-1.5.1.tar.xz">
+<!ENTITY pacman-contrib-md5 "7e2c52e6ea0fd1c87a84685c9c714429">
+<!ENTITY pacman-contrib-home "https://sources.archlinux.org/">
+<!ENTITY pacman-contrib-fin-du "2.3 MB">
+<!ENTITY pacman-contrib-fin-sbu "0.1 SBU">
+
+<!ENTITY pacman-hooks-version "20210910">
+<!ENTITY pacman-hooks-size "3.2 KB">
+<!ENTITY pacman-hooks-url "https://www.linuxfromscratch.org/~dj/pacman-hooks-&pacman-hooks-version;.tar.xz">
+<!ENTITY pacman-hooks-md5 "721fd08ae68cae1a0f0f849436c51145">
+
 <!ENTITY patch-version "2.7.6">
 <!ENTITY patch-size "766 KB">
 <!ENTITY patch-url "&gnu;patch/patch-&patch-version;.tar.xz">
@@ -564,6 +816,14 @@
 <!ENTITY perl-fin-du "226 MB">
 <!ENTITY perl-fin-sbu "9.3 SBU">
 
+<!ENTITY pip-version "22.0.4">
+<!ENTITY pip-size "2,044 KB">
+<!ENTITY pip-url "https://files.pythonhosted.org/packages/33/c9/e2164122d365d8f823213a53970fa3005eb16218edcfc56ca24cb6deba2b/pip-22.0.4.tar.gz">
+<!ENTITY pip-md5 "ffb2a7aa43004601409b3318777b75a8">
+<!ENTITY pip-home "https://pypi.org/project/pip/">
+<!ENTITY pip-fin-du "1.0 MB">
+<!ENTITY pip-fin-sbu "0.1 SBU">
+
 <!ENTITY pkgconfig-version "0.29.2">
 <!ENTITY pkgconfig-size "1,970 KB">
 <!ENTITY pkgconfig-url "https://pkg-config.freedesktop.org/releases/pkg-config-&pkgconfig-version;.tar.gz">
@@ -588,6 +848,14 @@
 <!ENTITY psmisc-fin-du "5.6 MB">
 <!ENTITY psmisc-fin-sbu "less than 0.1 SBU">
 
+<!ENTITY pth-version "2.0.7">
+<!ENTITY pth-size "652 KB">
+<!ENTITY pth-url "https://ftp.gnu.org/gnu/pth/pth-&pth-version;.tar.gz">
+<!ENTITY pth-md5 "9cb4a25331a4c4db866a31cbe507c793">
+<!ENTITY pth-home "https://www.gnu.org/pth/">
+<!ENTITY pth-fin-du "5 MB">
+<!ENTITY pth-fin-sbu "0.2 SBU">
+
 <!-- If python minor version changes, updates in python and
      meson pages will be needed: python3.6 and python3.6m -->
 
@@ -614,6 +882,17 @@
 <!ENTITY readline-fin-du "15 MB">
 <!ENTITY readline-fin-sbu "0.1 SBU">
 
+<!ENTITY rootfs-fin-du "4.8 MB">
+<!ENTITY rootfs-fin-sbu "less than 0.1 SBU">
+
+<!ENTITY rpcsvc-proto-version "1.4.3">
+<!ENTITY rpcsvc-proto-size "168 KB">
+<!ENTITY rpcsvc-proto-url "https://github.com/thkukuk/rpcsvc-proto/releases/download/v&rpcsvc-proto-version;/rpcsvc-proto-&rpcsvc-proto-version;.tar.xz">
+<!ENTITY rpcsvc-proto-md5 "5cc9a871db85e34ab68a9cecfb448a97">
+<!ENTITY rpcsvc-proto-home "https://github.com/thkukuk/rpcsvc-proto/">
+<!ENTITY rpcsvc-proto-fin-du "2.1 MB">
+<!ENTITY rpcsvc-proto-fin-sbu "less than 0.1 SBU">
+
 <!ENTITY sed-version "4.8">
 <!ENTITY sed-size "1,317 KB">
 <!ENTITY sed-url "&gnu;sed/sed-&sed-version;.tar.xz">
@@ -624,6 +903,22 @@
 <!ENTITY sed-fin-du "31 MB">
 <!ENTITY sed-fin-sbu "0.4 SBU">
 
+<!ENTITY setuptools-version "58.1.0">
+<!ENTITY setuptools-size "2,088 KB">
+<!ENTITY setuptools-url "https://files.pythonhosted.org/packages/59/b8/adeb445fa6c636f78c532f0dd6f847f0f90e709afa7d41396181d438be5a/setuptools-58.1.0.tar.gz">
+<!ENTITY setuptools-md5 "06125126e97d8233ba33da88c18832af">
+<!ENTITY setuptools-home "https://pypi.org/project/setuptools/">
+<!ENTITY setuptools-fin-du "1.0 MB">
+<!ENTITY setuptools-fin-sbu "0.1 SBU">
+
+<!ENTITY sgml-common-version "0.6.3">
+<!ENTITY sgml-common-size "75 KB">
+<!ENTITY sgml-common-url "https://sourceware.org/ftp/docbook-tools/new-trials/SOURCES/sgml-common-&sgml-common-version;.tgz">
+<!ENTITY sgml-common-md5 "103c9828f24820df86e55e7862e28974">
+<!ENTITY sgml-common-home "https:///sourceware.org/">
+<!ENTITY sgml-common-fin-du "1.5 MB">
+<!ENTITY sgml-common-fin-sbu "0.1 SBU">
+
 <!ENTITY shadow-version "4.11.1">
 <!ENTITY shadow-size "1,618 KB">
 <!ENTITY shadow-url "&github;/shadow-maint/shadow/releases/download/v&shadow-version;/shadow-&shadow-version;.tar.xz">
@@ -632,6 +927,19 @@
 <!ENTITY shadow-fin-du "49 MB">
 <!ENTITY shadow-fin-sbu "0.2 SBU">
 
+<!ENTITY sqlite-version "3.38.5">
+<!ENTITY sqlite-size "2,867 KB">
+<!ENTITY sqlite-url "https://sqlite.org/2022/sqlite-autoconf-&sqlite-doc-version;.tar.gz">
+<!ENTITY sqlite-md5 "d7d14ef5e1cf2ce974bdd62a9cee347f">
+<!ENTITY sqlite-home "https://sqlite.org/">
+<!ENTITY sqlite-fin-du "122 MB">
+<!ENTITY sqlite-fin-sbu "0.4 SBU">
+
+<!ENTITY sqlite-doc-version "3380500">
+<!ENTITY sqlite-doc-size "10 MB">
+<!ENTITY sqlite-doc-url "https://sqlite.org/2022/sqlite-doc-&sqlite-doc-version;.zip">
+<!ENTITY sqlite-doc-md5 "166ae80c1aa8d98b71c1b23f98c63b75">
+
 <!ENTITY sysklogd-version "1.5.1">
 <!ENTITY sysklogd-size "88 KB">
 <!ENTITY sysklogd-url "https://www.infodrom.org/projects/sysklogd/download/sysklogd-&sysklogd-version;.tar.gz">
@@ -702,6 +1010,8 @@
 <!ENTITY tzdata-url "https://www.iana.org/time-zones/repository/releases/tzdata&tzdata-version;.tar.gz">
 <!ENTITY tzdata-md5 "081662184f3b902f8e5d96816568432e">
 <!ENTITY tzdata-home "https://www.iana.org/time-zones">
+<!ENTITY tzdata-fin-du "4.9 MB">
+<!ENTITY tzdata-fin-sbu "less than 0.1 SBU">
 
 <!ENTITY udev-lfs-version "udev-lfs-20171102">
 <!ENTITY udev-lfs-size    "11 KB">
@@ -709,6 +1019,14 @@
 <!ENTITY udev-lfs-md5     "27cd82f9a61422e186b9d6759ddf1634">
 <!ENTITY udev-lfs-home    " ">
 
+<!ENTITY unzip-version "6.0">
+<!ENTITY unzip-size "1,331 KB">
+<!ENTITY unzip-url "https://downloads.sourceforge.net/infozip/unzip60.tar.gz">
+<!ENTITY unzip-md5 "62b490407489521db863b523a7f86375">
+<!ENTITY unzip-home "https://www.info-zip.org/">
+<!ENTITY unzip-fin-du "9 MB">
+<!ENTITY unzip-fin-sbu "0.1 SBU">
+
 <!ENTITY util-linux-minor "2.38">
 <!ENTITY util-linux-version "2.38"> <!-- 2.33.x -->
 <!ENTITY util-linux-size "7,177 KB">
diff -Naurp LFS_orig/patches.ent LFS-pacman/patches.ent
--- LFS_orig/patches.ent	2022-06-16 20:04:57.581188487 -0500
+++ LFS-pacman/patches.ent	2022-06-16 20:05:13.914522426 -0500
@@ -23,11 +23,20 @@
 <!ENTITY coreutils-i18n-patch "coreutils-&coreutils-version;-i18n-1.patch">
 <!ENTITY coreutils-i18n-patch-md5 "c1ac7edf095027460716577633da9fc5">
 <!ENTITY coreutils-i18n-patch-size "166 KB">
+
+<!ENTITY coreutils-uname-patch "coreutils-&coreutils-version;-uname-1.patch">
+<!ENTITY coreutils-uname-patch-md5 "34fbf481e0e76cb94ed32442bdb4d928">
+<!ENTITY coreutils-uname-patch-size "4.7 KB">
 <!--
 <!ENTITY coreutils-chmod-patch "coreutils-&coreutils-version;-chmod_fix-1.patch">
 <!ENTITY coreutils-chmod-patch-md5 "4709df88e68279e6ef357aa819ba5b1a">
 <!ENTITY coreutils-chmod-patch-size "3.8 KB">
 -->
+
+<!ENTITY docbook-xsl-stack-fix-patch "docbook-xsl-nons-&docbook-xsl-version;-stack_fix-1.patch">
+<!ENTITY docbook-xsl-stack-fix-patch-md5 "8457bd6ee6b06fbc6dc540e1b096f766">
+<!ENTITY docbook-xsl-stack-fix-patch-size "1.7 KB">
+
 <!--
 <!ENTITY flex-fixes-patch "flex-&flex-version;-upstream_fixes-3.patch">
 <!ENTITY flex-fixes-patch-md5 "b46f6b0380e502a3dfb8b503227cd680">
@@ -71,11 +80,21 @@
 <!ENTITY ninja-limit-jobs-patch-md5 "f537a633532492e805aa342fa869ca45">
 <!ENTITY ninja-limit-jobs-patch-size "2.5 KB">
 -->
+
+<!ENTITY pacman-fixes-patch "pacman-&pacman-version;-fixes-4.patch">
+<!ENTITY pacman-fixes-patch-md5 "021d9b8a5211bd8171efb78e194463c6">
+<!ENTITY pacman-fixes-patch-size "8 KB">
+
 <!--
 <!ENTITY perl-fix-patch "perl-&perl-version;-upstream_fixes-1.patch">
 <!ENTITY perl-fix-patch-md5 "fb42558b59ed95ee00eb9f1c1c9b8056">
 <!ENTITY perl-fix-patch-size "1.6 KB">
 -->
+
+<!ENTITY sgml-common-manpage-patch "sgml-common-&sgml-common-version;-manpage-1.patch">
+<!ENTITY sgml-common-manpage-patch-md5 "645f3c898abd270a9143036824ae121a">
+<!ENTITY sgml-common-manpage-patch-size "0.6 KB">
+
 <!--
 <!ENTITY shadow-segfault-patch "shadow-&shadow-version;-useradd_segfault-1.patch">
 <!ENTITY shadow-segfault-patch-md5 "66b299c0c9ac66fdb7c91b40df5984c0">
@@ -93,6 +112,10 @@
 <!ENTITY systemd-kernel-fixes-patch-md5 "34cee987b35d5d522fd3317e08057c1d">
 <!ENTITY systemd-kernel-fixes-patch-size "2.7 KB">
 
+<!ENTITY unzip-consolidated-patch "unzip-&unzip-version;-consolidated_fixes-1.patch">
+<!ENTITY unzip-consolidated-patch-md5 "14c119ef7019f769497363e5cec306e0">
+<!ENTITY unzip-consolidated-patch-size "600 KB">
+
 <!ENTITY xz-upstream-fix-patch "xz-&xz-version;-upstream_fix-1.patch">
 <!ENTITY xz-upstream-fix-patch-md5 "584c72ea3d8f7502b2770670f3090788">
 <!ENTITY xz-upstream-fix-patch-size "3.7 KB">
diff -Naurp LFS_orig/version.ent LFS-pacman/version.ent
--- LFS_orig/version.ent	1969-12-31 18:00:00.000000000 -0600
+++ LFS-pacman/version.ent	2022-06-16 20:05:13.891189091 -0500
@@ -0,0 +1,8 @@
+<![ %sysv; [
+<!ENTITY version           "r11.1-118+">
+]]>
+<![ %systemd; [
+<!ENTITY version          "r11.1-118-systemd+">
+]]>
+<!ENTITY releasedate       "May 15th, 2022">
+<!ENTITY copyrightdate     "1999-2022">
