aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8
diff options
context:
space:
mode:
Diffstat (limited to 'chapter8')
-rw-r--r--chapter8/acl.sh13
-rw-r--r--chapter8/attr.sh13
-rw-r--r--chapter8/autoconf.sh7
-rw-r--r--chapter8/automake.sh9
-rw-r--r--chapter8/bash.sh17
-rw-r--r--chapter8/bc.sh6
-rw-r--r--chapter8/binutils.sh23
-rw-r--r--chapter8/bison.sh7
-rw-r--r--chapter8/bzip2.sh21
-rw-r--r--chapter8/check.sh7
-rw-r--r--chapter8/coreutils.sh25
-rw-r--r--chapter8/dejagnu.sh9
-rw-r--r--chapter8/diffutils.sh7
-rw-r--r--chapter8/e2fsprogs.sh25
-rw-r--r--chapter8/eudev.sh24
-rw-r--r--chapter8/expat.sh11
-rw-r--r--chapter8/expect.sh11
-rw-r--r--chapter8/file.sh5
-rw-r--r--chapter8/findutils.sh10
-rw-r--r--chapter8/flex.sh10
-rw-r--r--chapter8/gawk.sh12
-rw-r--r--chapter8/gcc.sh46
-rw-r--r--chapter8/gdbm.sh9
-rw-r--r--chapter8/gettext.sh10
-rw-r--r--chapter8/glibc.sh78
-rw-r--r--chapter8/gmp.sh16
-rw-r--r--chapter8/gperf.sh7
-rw-r--r--chapter8/grep.sh7
-rw-r--r--chapter8/groff.sh7
-rw-r--r--chapter8/grub.sh15
-rw-r--r--chapter8/gzip.sh9
-rw-r--r--chapter8/iana-etc.sh3
-rw-r--r--chapter8/inetutils.sh18
-rw-r--r--chapter8/intltool.sh10
-rw-r--r--chapter8/iproute2.sh10
-rw-r--r--chapter8/isl.sh11
-rw-r--r--chapter8/kbd.sh15
-rw-r--r--chapter8/kmod.sh19
-rw-r--r--chapter8/less.sh7
-rw-r--r--chapter8/libcap.sh12
-rw-r--r--chapter8/libelf.sh12
-rw-r--r--chapter8/libffi.sh7
-rw-r--r--chapter8/libpipeline.sh7
-rw-r--r--chapter8/libtool.sh9
-rw-r--r--chapter8/m4.sh8
-rw-r--r--chapter8/make.sh7
-rw-r--r--chapter8/man-db.sh16
-rw-r--r--chapter8/man-pages.sh3
-rw-r--r--chapter8/meson.sh6
-rw-r--r--chapter8/mpc.sh11
-rw-r--r--chapter8/mpfr.sh12
-rw-r--r--chapter8/ncurses.sh29
-rw-r--r--chapter8/ninja.sh16
-rw-r--r--chapter8/openssl.sh16
-rw-r--r--chapter8/patch.sh7
-rw-r--r--chapter8/perl.sh26
-rw-r--r--chapter8/pkg-config.sh9
-rw-r--r--chapter8/procps-ng.sh15
-rw-r--r--chapter8/psmisc.sh10
-rw-r--r--chapter8/python.sh19
-rw-r--r--chapter8/readline.sh18
-rw-r--r--chapter8/sed.sh11
-rw-r--r--chapter8/shadow.sh26
-rw-r--r--chapter8/sysklogd.sh22
-rw-r--r--chapter8/sysvinit.sh7
-rw-r--r--chapter8/tar.sh10
-rw-r--r--chapter8/tcl.sh35
-rw-r--r--chapter8/texinfo.sh9
-rw-r--r--chapter8/util-linux.sh20
-rw-r--r--chapter8/vim.sh34
-rw-r--r--chapter8/xml-parser.sh7
-rw-r--r--chapter8/xz.sh12
-rw-r--r--chapter8/zlib.sh9
-rw-r--r--chapter8/zstd.sh8
74 files changed, 1054 insertions, 0 deletions
diff --git a/chapter8/acl.sh b/chapter8/acl.sh
new file mode 100644
index 0000000..da4caae
--- /dev/null
+++ b/chapter8/acl.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --bindir=/bin \
+ --disable-static \
+ --libexecdir=/usr/lib \
+ --docdir=/usr/share/doc/acl-"${VERSION}"
+
+make
+make -j1 install
+
+mv -v /usr/lib/libacl.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libacl.so)" /usr/lib/libacl.so
diff --git a/chapter8/attr.sh b/chapter8/attr.sh
new file mode 100644
index 0000000..f68d6cb
--- /dev/null
+++ b/chapter8/attr.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --bindir=/bin \
+ --disable-static \
+ --sysconfdir=/etc \
+ --docdir=/usr/share/doc/attr-"${VERSION}"
+
+make
+make -j1 install
+
+mv -v /usr/lib/libattr.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libattr.so)" /usr/lib/libattr.so
diff --git a/chapter8/autoconf.sh b/chapter8/autoconf.sh
new file mode 100644
index 0000000..c3588fd
--- /dev/null
+++ b/chapter8/autoconf.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
diff --git a/chapter8/automake.sh b/chapter8/automake.sh
new file mode 100644
index 0000000..e2b76e8
--- /dev/null
+++ b/chapter8/automake.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+sed -i "s/''/etags/" t/tags-lisp-space.sh
+
+./configure --prefix=/usr --docdir=/usr/share/doc/automake-"${VERSION}"
+
+make
+
+make -j1 install
diff --git a/chapter8/bash.sh b/chapter8/bash.sh
new file mode 100644
index 0000000..65eb2d8
--- /dev/null
+++ b/chapter8/bash.sh
@@ -0,0 +1,17 @@
+#!/bin/bash
+
+patch -Np1 -i ../bash-"${VERSION}"-fixes-1.patch
+
+sed -i '/^bashline.o:.*shmbchar.h/a bashline.o: ${DEFDIR}/builtext.h' Makefile.in
+
+./configure --prefix=/usr \
+ --docdir=/usr/share/doc/bash-"${VERSION}" \
+ --without-bash-malloc \
+ --with-installed-readline
+
+make
+
+make -j1 install
+mv -vf /usr/bin/bash /bin
+
+#exec /bin/bash --login +h
diff --git a/chapter8/bc.sh b/chapter8/bc.sh
new file mode 100644
index 0000000..c1d3014
--- /dev/null
+++ b/chapter8/bc.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+PREFIX=/usr CC=gcc ./configure.sh -G -O3
+
+make
+make -j1 install
diff --git a/chapter8/binutils.sh b/chapter8/binutils.sh
new file mode 100644
index 0000000..41a99b1
--- /dev/null
+++ b/chapter8/binutils.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+expect -c "spawn ls"
+
+sed -i '/@\tincremental_copy/d' gold/testsuite/Makefile.in
+
+mkdir -v build
+cd build || exit 1
+
+../configure --prefix=/usr \
+ --enable-gold \
+ --enable-ld=default \
+ --enable-plugins \
+ --enable-shared \
+ --disable-werror \
+ --enable-64-bit-bfd \
+ --with-system-zlib
+
+make tooldir=/usr
+
+make tooldir=/usr -j1 install
+
+rm -fv /usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes}.a
diff --git a/chapter8/bison.sh b/chapter8/bison.sh
new file mode 100644
index 0000000..eb97728
--- /dev/null
+++ b/chapter8/bison.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr --docdir=/usr/share/doc/bison-"${VERSION}"
+
+make
+
+make -j1 install
diff --git a/chapter8/bzip2.sh b/chapter8/bzip2.sh
new file mode 100644
index 0000000..b1b4459
--- /dev/null
+++ b/chapter8/bzip2.sh
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+patch -Np1 -i ../bzip2-"${VERSION}"-install_docs-1.patch
+
+sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile
+sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile
+
+make -f Makefile-libbz2_so
+make clean
+make
+
+make PREFIX=/usr -j1 install
+
+cp -v bzip2-shared /bin/bzip2
+cp -av libbz2.so* /lib
+ln -sv ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so
+rm -v /usr/bin/{bunzip2,bzcat,bzip2}
+ln -sv bzip2 /bin/bunzip2
+ln -sv bzip2 /bin/bzcat
+
+rm -fv /usr/lib/libbz2.a
diff --git a/chapter8/check.sh b/chapter8/check.sh
new file mode 100644
index 0000000..9a4f704
--- /dev/null
+++ b/chapter8/check.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr --disable-static
+
+make
+
+make docdir=/usr/share/doc/check-"${VERSION}" -j1 install
diff --git a/chapter8/coreutils.sh b/chapter8/coreutils.sh
new file mode 100644
index 0000000..62ceb69
--- /dev/null
+++ b/chapter8/coreutils.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+echo $NINJAJOBS
+
+patch -Np1 -i ../coreutils-"${VERSION}"-i18n-1.patch
+
+sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk
+
+autoreconf -fiv
+FORCE_UNSAFE_CONFIGURE=1 ./configure \
+ --prefix=/usr \
+ --enable-no-install-program=kill,uptime
+
+make
+
+make -j1 install
+
+mv -v /usr/bin/{cat,chgrp,chmod,chown,cp,date,dd,df,echo} /bin
+mv -v /usr/bin/{false,ln,ls,mkdir,mknod,mv,pwd,rm} /bin
+mv -v /usr/bin/{rmdir,stty,sync,true,uname} /bin
+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
+
+mv -v /usr/bin/{head,nice,sleep,touch} /bin
diff --git a/chapter8/dejagnu.sh b/chapter8/dejagnu.sh
new file mode 100644
index 0000000..fc94545
--- /dev/null
+++ b/chapter8/dejagnu.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+makeinfo --html --no-split -o doc/dejagnu.html doc/dejagnu.texi
+makeinfo --plaintext -o doc/dejagnu.txt doc/dejagnu.texi
+
+make -j1 install
+install -v -dm755 /usr/share/doc/dejagnu-"${VERSION}"
+install -v -m644 doc/dejagnu.{html,txt} /usr/share/doc/dejagnu-"${VERSION}"
diff --git a/chapter8/diffutils.sh b/chapter8/diffutils.sh
new file mode 100644
index 0000000..c3588fd
--- /dev/null
+++ b/chapter8/diffutils.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
diff --git a/chapter8/e2fsprogs.sh b/chapter8/e2fsprogs.sh
new file mode 100644
index 0000000..b872707
--- /dev/null
+++ b/chapter8/e2fsprogs.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+mkdir -v build
+cd build || exit 1
+
+../configure --prefix=/usr \
+ --bindir=/bin \
+ --with-root-prefix="" \
+ --enable-elf-shlibs \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-uuidd \
+ --disable-fsck
+
+make
+
+make -j1 install
+
+rm -fv /usr/lib/{libcom_err,libe2p,libext2fs,libss}.a
+gunzip -v /usr/share/info/libext2fs.info.gz
+install-info --dir-file=/usr/share/info/dir /usr/share/info/libext2fs.info
+
+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
diff --git a/chapter8/eudev.sh b/chapter8/eudev.sh
new file mode 100644
index 0000000..a15e189
--- /dev/null
+++ b/chapter8/eudev.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --bindir=/sbin \
+ --sbindir=/sbin \
+ --libdir=/usr/lib \
+ --sysconfdir=/etc \
+ --libexecdir=/lib \
+ --with-rootprefix= \
+ --with-rootlibdir=/lib \
+ --enable-manpages \
+ --disable-static
+
+make
+
+mkdir -pv /lib/udev/rules.d
+mkdir -pv /etc/udev/rules.d
+
+make -j1 install
+
+tar -xvf ../udev-lfs-20171102.tar.xz
+make -f udev-lfs-20171102/Makefile.lfs install
+
+udevadm hwdb --update
diff --git a/chapter8/expat.sh b/chapter8/expat.sh
new file mode 100644
index 0000000..1e21feb
--- /dev/null
+++ b/chapter8/expat.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-static \
+ --docdir=/usr/share/doc/expat-"${VERSION}"
+
+make
+
+make -j1 install
+
+install -v -m644 doc/*.{html,png,css} /usr/share/doc/expat-"${VERSION}"
diff --git a/chapter8/expect.sh b/chapter8/expect.sh
new file mode 100644
index 0000000..1b7ccdc
--- /dev/null
+++ b/chapter8/expect.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --with-tcl=/usr/lib \
+ --enable-shared \
+ --mandir=/usr/share/man \
+ --with-tclinclude=/usr/include
+
+make
+make -j1 install
+ln -svf expect"${VERSION}"/libexpect"${VERSION}".so /usr/lib
diff --git a/chapter8/file.sh b/chapter8/file.sh
new file mode 100644
index 0000000..5adb7d7
--- /dev/null
+++ b/chapter8/file.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+make
+make -j1 install
diff --git a/chapter8/findutils.sh b/chapter8/findutils.sh
new file mode 100644
index 0000000..b058eea
--- /dev/null
+++ b/chapter8/findutils.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+./configure --prefix=/usr --localstatedir=/var/lib/locate
+
+make
+
+make -j1 install
+
+mv -v /usr/bin/find /bin
+sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb
diff --git a/chapter8/flex.sh b/chapter8/flex.sh
new file mode 100644
index 0000000..58d7b29
--- /dev/null
+++ b/chapter8/flex.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --docdir=/usr/share/doc/flex-"${VERSION}" \
+ --disable-static
+
+make
+
+make -j1 install
+ln -sv flex /usr/bin/lex
diff --git a/chapter8/gawk.sh b/chapter8/gawk.sh
new file mode 100644
index 0000000..eb7c111
--- /dev/null
+++ b/chapter8/gawk.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+sed -i 's/extras//' Makefile.in
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
+
+mkdir -v /usr/share/doc/gawk-"${VERSION}"
+cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-"${VERSION}"
diff --git a/chapter8/gcc.sh b/chapter8/gcc.sh
new file mode 100644
index 0000000..7b4df3b
--- /dev/null
+++ b/chapter8/gcc.sh
@@ -0,0 +1,46 @@
+#!/bin/bash
+
+case $(uname -m) in
+ x86_64)
+ sed -e '/m64=/s/lib64/lib/' \
+ -i.orig gcc/config/i386/t-linux64
+ ;;
+esac
+
+mkdir -v build
+cd build || exit 1
+
+../configure --prefix=/usr \
+ LD=ld \
+ --enable-languages=c,c++ \
+ --disable-multilib \
+ --disable-bootstrap \
+ --with-system-zlib
+
+make
+
+make -j1 install
+rm -rf /usr/lib/gcc/"$(gcc -dumpmachine)"/"${VERSION}"/include-fixed/bits/
+
+chown -v -R root:root \
+ /usr/lib/gcc/*linux-gnu/"${VERSION}"/include{,-fixed}
+
+ln -sv ../usr/bin/cpp /lib
+
+ln -sfv ../../libexec/gcc/"$(gcc -dumpmachine)"/"${VERSION}"/liblto_plugin.so \
+ /usr/lib/bfd-plugins/
+
+echo 'int main(){}' > dummy.c
+cc dummy.c -v -Wl,--verbose &> dummy.log
+readelf -l a.out | grep ': /lib'
+
+grep -o '/usr/lib.*/crt[1in].*succeeded' dummy.log
+grep -B4 '^ /usr/include' dummy.log
+grep 'SEARCH.*/usr/lib' dummy.log |sed 's|; |\n|g'
+grep "/lib.*/libc.so.6 " dummy.log
+grep found dummy.log
+
+rm -v dummy.c a.out dummy.log
+
+mkdir -pv /usr/share/gdb/auto-load/usr/lib
+mv -v /usr/lib/*gdb.py /usr/share/gdb/auto-load/usr/lib
diff --git a/chapter8/gdbm.sh b/chapter8/gdbm.sh
new file mode 100644
index 0000000..adf3947
--- /dev/null
+++ b/chapter8/gdbm.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-static \
+ --enable-libgdbm-compat
+
+make
+
+make -j1 install
diff --git a/chapter8/gettext.sh b/chapter8/gettext.sh
new file mode 100644
index 0000000..1ff6c97
--- /dev/null
+++ b/chapter8/gettext.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-static \
+ --docdir=/usr/share/doc/gettext-"${VERSION}"
+
+make
+
+make -j1 install
+chmod -v 0755 /usr/lib/preloadable_libintl.so
diff --git a/chapter8/glibc.sh b/chapter8/glibc.sh
new file mode 100644
index 0000000..21289b1
--- /dev/null
+++ b/chapter8/glibc.sh
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+patch -Np1 -i ../glibc-"${VERSION}"-fhs-1.patch
+
+sed -e '402a\ *result = local->data.services[database_index];' \
+ -i nss/nss_database.c
+
+mkdir -v build
+cd build || exit 1
+
+../configure --prefix=/usr \
+ --disable-werror \
+ --enable-kernel=5.10.0 \
+ --enable-stack-protector=strong \
+ --with-headers=/usr/include \
+ libc_cv_slibdir=/lib
+
+make PARALLELMFLAGS="${MAKEFLAGS}"
+
+touch /etc/ld.so.conf
+
+sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
+
+make -j1 install
+
+cp -v ../nscd/nscd.conf /etc/nscd.conf
+mkdir -pv /var/cache/nscd
+
+make localedata/install-locales
+
+cat > /etc/nsswitch.conf << "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
+
+tar -xf ../../tzdata2021a.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
+
+ln -sfv /usr/share/zoneinfo/America/Chicago /etc/localtime
+
+cat > /etc/ld.so.conf << "EOF"
+# Begin /etc/ld.so.conf
+/usr/local/lib
+/opt/lib
+
+EOF
+
+cat >> /etc/ld.so.conf << "EOF"
+# Add an include directory
+include /etc/ld.so.conf.d/*.conf
+
+EOF
+mkdir -pv /etc/ld.so.conf.d
diff --git a/chapter8/gmp.sh b/chapter8/gmp.sh
new file mode 100644
index 0000000..f853d52
--- /dev/null
+++ b/chapter8/gmp.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+# Uncomment for generic libraries
+# cp -v configfsf.guess config.guess
+# cp -v configfsf.sub config.sub
+
+./configure --prefix=/usr \
+ --enable-cxx \
+ --disable-static \
+ --docdir=/usr/share/doc/gmp-"${VERSION}"
+
+make
+make html
+
+make -j1 install
+make -j1 install-html
diff --git a/chapter8/gperf.sh b/chapter8/gperf.sh
new file mode 100644
index 0000000..66c6e76
--- /dev/null
+++ b/chapter8/gperf.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr --docdir=/usr/share/doc/gperf-"${VERSION}"
+
+make
+
+make -j1 install
diff --git a/chapter8/grep.sh b/chapter8/grep.sh
new file mode 100644
index 0000000..3c82a41
--- /dev/null
+++ b/chapter8/grep.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr --bindir=/bin
+
+make
+
+make -j1 install
diff --git a/chapter8/groff.sh b/chapter8/groff.sh
new file mode 100644
index 0000000..ec6b15c
--- /dev/null
+++ b/chapter8/groff.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+PAGE=letter ./configure --prefix=/usr
+
+make
+
+make -j1 install
diff --git a/chapter8/grub.sh b/chapter8/grub.sh
new file mode 100644
index 0000000..edb7b3b
--- /dev/null
+++ b/chapter8/grub.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+sed "s/gold-version/& -R .note.gnu.property/" \
+ -i Makefile.in grub-core/Makefile.in
+
+./configure --prefix=/usr \
+ --sbindir=/sbin \
+ --sysconfdir=/etc \
+ --disable-efiemu \
+ --disable-werror
+
+make
+
+make -j1 install
+mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions
diff --git a/chapter8/gzip.sh b/chapter8/gzip.sh
new file mode 100644
index 0000000..dbf30a3
--- /dev/null
+++ b/chapter8/gzip.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
+
+mv -v /usr/bin/gzip /bin
diff --git a/chapter8/iana-etc.sh b/chapter8/iana-etc.sh
new file mode 100644
index 0000000..8576a80
--- /dev/null
+++ b/chapter8/iana-etc.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+cp -v services protocols /etc
diff --git a/chapter8/inetutils.sh b/chapter8/inetutils.sh
new file mode 100644
index 0000000..3999fb7
--- /dev/null
+++ b/chapter8/inetutils.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --localstatedir=/var \
+ --disable-logger \
+ --disable-whois \
+ --disable-rcp \
+ --disable-rexec \
+ --disable-rlogin \
+ --disable-rsh \
+ --disable-servers
+
+make
+
+make -j1 install
+
+mv -v /usr/bin/{hostname,ping,ping6,traceroute} /bin
+mv -v /usr/bin/ifconfig /sbin
diff --git a/chapter8/intltool.sh b/chapter8/intltool.sh
new file mode 100644
index 0000000..0ab53c5
--- /dev/null
+++ b/chapter8/intltool.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i 's:\\\${:\\\$\\{:' intltool-update.in
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
+install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-"${VERSION}"/I18N-HOWTO
diff --git a/chapter8/iproute2.sh b/chapter8/iproute2.sh
new file mode 100644
index 0000000..efa8e3f
--- /dev/null
+++ b/chapter8/iproute2.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+sed -i /ARPD/d Makefile
+rm -fv man/man8/arpd.8
+
+sed -i 's/.m_ipt.o//' tc/Makefile
+
+make
+
+make DOCDIR=/usr/share/doc/iproute2-"${VERSION}" -j1 install
diff --git a/chapter8/isl.sh b/chapter8/isl.sh
new file mode 100644
index 0000000..3a98da1
--- /dev/null
+++ b/chapter8/isl.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-static \
+ --docdir=/usr/share/doc/isl-"${VERSION}"
+
+make
+make html
+
+make -j1 install
+make -j1 install-html
diff --git a/chapter8/kbd.sh b/chapter8/kbd.sh
new file mode 100644
index 0000000..81b369c
--- /dev/null
+++ b/chapter8/kbd.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+patch -Np1 -i ../kbd-"${VERSION}"-backspace-1.patch
+
+sed -i '/RESIZECONS_PROGS=/s/yes/no/' configure
+sed -i 's/resizecons.8 //' docs/man/man8/Makefile.in
+
+./configure --prefix=/usr --disable-vlock
+
+make
+
+make -j1 install
+
+mkdir -v /usr/share/doc/kbd-"${VERSION}"
+cp -R -v docs/doc/* /usr/share/doc/kbd-"${VERSION}"
diff --git a/chapter8/kmod.sh b/chapter8/kmod.sh
new file mode 100644
index 0000000..65e3a5f
--- /dev/null
+++ b/chapter8/kmod.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --bindir=/bin \
+ --sysconfdir=/etc \
+ --with-rootlibdir=/lib \
+ --with-xz \
+ --with-zstd \
+ --with-zlib
+
+make
+
+make -j1 install
+
+for target in depmod insmod lsmod modinfo modprobe rmmod; do
+ ln -sfv ../bin/kmod /sbin/"${target}"
+done
+
+ln -sfv kmod /bin/lsmod
diff --git a/chapter8/less.sh b/chapter8/less.sh
new file mode 100644
index 0000000..8bdbea9
--- /dev/null
+++ b/chapter8/less.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr --sysconfdir=/etc
+
+make
+
+make -j1 install
diff --git a/chapter8/libcap.sh b/chapter8/libcap.sh
new file mode 100644
index 0000000..41ff39c
--- /dev/null
+++ b/chapter8/libcap.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+sed -i '/install -m.*STA/d' libcap/Makefile
+
+make prefix=/usr lib=lib
+
+make prefix=/usr lib=lib -j1 install
+for libname in cap psx; do
+ mv -v /usr/lib/lib"${libname}".so.* /lib
+ ln -sfv ../../lib/lib"${libname}".so.2 /usr/lib/lib"${libname}".so
+ chmod -v 755 /lib/lib"${libname}".so.2.48
+done
diff --git a/chapter8/libelf.sh b/chapter8/libelf.sh
new file mode 100644
index 0000000..ef91c85
--- /dev/null
+++ b/chapter8/libelf.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-debuginfod \
+ --enable-libdebuginfod=dummy \
+ --libdir=/lib
+
+make
+
+make -C libelf -j1 install
+install -vm644 config/libelf.pc /usr/lib/pkgconfig
+rm /lib/libelf.a
diff --git a/chapter8/libffi.sh b/chapter8/libffi.sh
new file mode 100644
index 0000000..51846d6
--- /dev/null
+++ b/chapter8/libffi.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr --disable-static --with-gcc-arch=native
+
+make
+
+make -j1 install
diff --git a/chapter8/libpipeline.sh b/chapter8/libpipeline.sh
new file mode 100644
index 0000000..c3588fd
--- /dev/null
+++ b/chapter8/libpipeline.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
diff --git a/chapter8/libtool.sh b/chapter8/libtool.sh
new file mode 100644
index 0000000..819a697
--- /dev/null
+++ b/chapter8/libtool.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
+
+rm -fv /usr/lib/libltdl.a
diff --git a/chapter8/m4.sh b/chapter8/m4.sh
new file mode 100644
index 0000000..1ccef8e
--- /dev/null
+++ b/chapter8/m4.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+sed -i 's/IO_ftrylockfile/IO_EOF_SEEN/' lib/*.c
+echo "#define _IO_IN_BACKUP 0x100" >> lib/stdio-impl.h
+
+./configure --prefix=/usr
+make
+make -j1 install
diff --git a/chapter8/make.sh b/chapter8/make.sh
new file mode 100644
index 0000000..c3588fd
--- /dev/null
+++ b/chapter8/make.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
diff --git a/chapter8/man-db.sh b/chapter8/man-db.sh
new file mode 100644
index 0000000..be0d139
--- /dev/null
+++ b/chapter8/man-db.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --docdir=/usr/share/doc/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=
+
+make
+
+make -j1 install
diff --git a/chapter8/man-pages.sh b/chapter8/man-pages.sh
new file mode 100644
index 0000000..db9dad4
--- /dev/null
+++ b/chapter8/man-pages.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+
+make -j1 install
diff --git a/chapter8/meson.sh b/chapter8/meson.sh
new file mode 100644
index 0000000..df3a017
--- /dev/null
+++ b/chapter8/meson.sh
@@ -0,0 +1,6 @@
+#!/bin/bash
+
+python3 setup.py build
+
+python3 setup.py install --root=dest
+cp -rv dest/* /
diff --git a/chapter8/mpc.sh b/chapter8/mpc.sh
new file mode 100644
index 0000000..8093f46
--- /dev/null
+++ b/chapter8/mpc.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-static \
+ --docdir=/usr/share/doc/mpc-"${VERSION}"
+
+make
+make html
+
+make -j1 install
+make -j1 install-html
diff --git a/chapter8/mpfr.sh b/chapter8/mpfr.sh
new file mode 100644
index 0000000..f73b287
--- /dev/null
+++ b/chapter8/mpfr.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --disable-static \
+ --enable-thread-safe \
+ --docdir=/usr/share/doc/mpfr-"${VERSION}"
+
+make
+make html
+
+make -j1 install
+make -j1 install-html
diff --git a/chapter8/ncurses.sh b/chapter8/ncurses.sh
new file mode 100644
index 0000000..918c829
--- /dev/null
+++ b/chapter8/ncurses.sh
@@ -0,0 +1,29 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ --with-shared \
+ --without-debug \
+ --without-normal \
+ --enable-pc-files \
+ --enable-widec
+
+make
+make -j1 install
+
+mv -v /usr/lib/libncursesw.so.6* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libncursesw.so)" /usr/lib/libncursesw.so
+for lib in ncurses form panel menu ; do
+ rm -vf /usr/lib/lib"${lib}".so
+ echo "INPUT(-l${lib}w)" > /usr/lib/lib"${lib}".so
+ ln -sfv "${lib}"w.pc /usr/lib/pkgconfig/"${lib}".pc
+done
+
+rm -vf /usr/lib/libcursesw.so
+echo "INPUT(-lncursesw)" > /usr/lib/libcursesw.so
+ln -sfv libncurses.so /usr/lib/libcurses.so
+
+rm -fv /usr/lib/libncurses++w.a
+
+mkdir -v /usr/share/doc/ncurses-"${VERSION}"
+cp -v -R doc/* /usr/share/doc/ncurses-"${VERSION}"
diff --git a/chapter8/ninja.sh b/chapter8/ninja.sh
new file mode 100644
index 0000000..3f93e56
--- /dev/null
+++ b/chapter8/ninja.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+export NINJAJOBS=4
+
+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
+
+python3 configure.py --bootstrap
+
+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
diff --git a/chapter8/openssl.sh b/chapter8/openssl.sh
new file mode 100644
index 0000000..d7b5e9b
--- /dev/null
+++ b/chapter8/openssl.sh
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+./config --prefix=/usr \
+ --openssldir=/etc/ssl \
+ --libdir=lib \
+ shared \
+ zlib-dynamic
+
+make
+
+sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile
+make MANSUFFIX=ssl install
+
+mv -v /usr/share/doc/openssl /usr/share/doc/openssl-"${VERSION}"
+
+cp -vfr doc/* /usr/share/doc/openssl-"${VERSION}"
diff --git a/chapter8/patch.sh b/chapter8/patch.sh
new file mode 100644
index 0000000..c3588fd
--- /dev/null
+++ b/chapter8/patch.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
diff --git a/chapter8/perl.sh b/chapter8/perl.sh
new file mode 100644
index 0000000..c7afaaf
--- /dev/null
+++ b/chapter8/perl.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+MAJMIN="$(cut -d\. -f1,2 <<< "${VERSION}")"
+
+export BUILD_ZLIB=False
+export BUILD_BZIP2=0
+
+sh Configure -des \
+ -Dprefix=/usr \
+ -Dvendorprefix=/usr \
+ -Dprivlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \
+ -Darchlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \
+ -Dsitelib=/usr/lib/perl5/"${MAJMIN}"/site_perl \
+ -Dsitearch=/usr/lib/perl5/"${MAJMIN}"/site_perl \
+ -Dvendorlib=/usr/lib/perl5/"${MAJMIN}"/vendor_perl \
+ -Dvendorarch=/usr/lib/perl5/"${MAJMIN}"/vendor_perl \
+ -Dman1dir=/usr/share/man/man1 \
+ -Dman3dir=/usr/share/man/man3 \
+ -Dpager="/usr/bin/less -isR" \
+ -Duseshrplib \
+ -Dusethreads
+
+make
+
+make -j1 install
+unset BUILD_ZLIB BUILD_BZIP2
diff --git a/chapter8/pkg-config.sh b/chapter8/pkg-config.sh
new file mode 100644
index 0000000..395d190
--- /dev/null
+++ b/chapter8/pkg-config.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --with-internal-glib \
+ --disable-host-tool \
+ --docdir=/usr/share/doc/pkg-config-"${VERSION}"
+
+make
+make -j1 install
diff --git a/chapter8/procps-ng.sh b/chapter8/procps-ng.sh
new file mode 100644
index 0000000..a21e6e4
--- /dev/null
+++ b/chapter8/procps-ng.sh
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --exec-prefix= \
+ --libdir=/usr/lib \
+ --docdir=/usr/share/doc/procps-ng-"${VERSION}" \
+ --disable-static \
+ --disable-kill
+
+make
+
+make -j1 install
+
+mv -v /usr/lib/libprocps.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libprocps.so)" /usr/lib/libprocps.so
diff --git a/chapter8/psmisc.sh b/chapter8/psmisc.sh
new file mode 100644
index 0000000..b57d459
--- /dev/null
+++ b/chapter8/psmisc.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
+
+mv -v /usr/bin/fuser /bin
+mv -v /usr/bin/killall /bin
diff --git a/chapter8/python.sh b/chapter8/python.sh
new file mode 100644
index 0000000..f0e1ce9
--- /dev/null
+++ b/chapter8/python.sh
@@ -0,0 +1,19 @@
+#!/bin/bash
+
+./configure --prefix=/usr \
+ --enable-shared \
+ --with-system-expat \
+ --with-system-ffi \
+ --with-ensurepip=yes
+
+make
+
+make -j1 install
+
+install -v -dm755 /usr/share/doc/python-"${VERSION}"/html
+
+tar --strip-components=1 \
+ --no-same-owner \
+ --no-same-permissions \
+ -C /usr/share/doc/python-"${VERSION}"/html \
+ -xvf ../python-"${VERSION}"-docs-html.tar.bz2
diff --git a/chapter8/readline.sh b/chapter8/readline.sh
new file mode 100644
index 0000000..be3dcc0
--- /dev/null
+++ b/chapter8/readline.sh
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+sed -i '/MV.*old/d' Makefile.in
+sed -i '/{OLDSUFF}/c:' support/shlib-install
+
+./configure --prefix=/usr \
+ --disable-static \
+ --with-curses \
+ --docdir=/usr/share/doc/readline-"${VERSION}"
+
+make SHLIB_LIBS="-lncursesw"
+make SHLIB_LIBS="-lncursesw" -j1 install
+
+mv -v /usr/lib/lib{readline,history}.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libreadline.so)" /usr/lib/libreadline.so
+ln -sfv ../../lib/"$(readlink /usr/lib/libhistory.so )" /usr/lib/libhistory.so
+
+install -v -m644 doc/*.{ps,pdf,html,dvi} /usr/share/doc/readline-"${VERSION}"
diff --git a/chapter8/sed.sh b/chapter8/sed.sh
new file mode 100644
index 0000000..97e8197
--- /dev/null
+++ b/chapter8/sed.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+
+./configure --prefix=/usr --bindir=/bin
+
+make
+make html
+
+make -j1 install
+
+install -d -m755 /usr/share/doc/sed-"${VERSION}"
+install -m644 doc/sed.html /usr/share/doc/sed-"${VERSION}"
diff --git a/chapter8/shadow.sh b/chapter8/shadow.sh
new file mode 100644
index 0000000..f0254de
--- /dev/null
+++ b/chapter8/shadow.sh
@@ -0,0 +1,26 @@
+#!/bin/bash
+
+ROOTPW='$1$5RPAAd$oejpw8ErihLIB7vmGE4SV1'
+
+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 / /' {} \;
+
+sed -e 's:#ENCRYPT_METHOD DES:ENCRYPT_METHOD SHA512:' \
+ -e 's:/var/spool/mail:/var/mail:' \
+ -i etc/login.defs
+
+sed -i 's/1000/999/' etc/useradd
+
+touch /usr/bin/passwd
+./configure --sysconfdir=/etc \
+ --with-group-name-max-length=32
+
+make
+make -j1 install
+
+pwconv
+grpconv
+
+usermod -p "${ROOTPW}" root
diff --git a/chapter8/sysklogd.sh b/chapter8/sysklogd.sh
new file mode 100644
index 0000000..7d28f51
--- /dev/null
+++ b/chapter8/sysklogd.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+sed -i '/Error loading kernel symbols/{n;n;d}' ksym_mod.c
+sed -i 's/union wait/int/' syslogd.c
+
+make
+
+make BINDIR=/sbin -j1 install
+
+cat > /etc/syslog.conf << "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
diff --git a/chapter8/sysvinit.sh b/chapter8/sysvinit.sh
new file mode 100644
index 0000000..563a21a
--- /dev/null
+++ b/chapter8/sysvinit.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+patch -Np1 -i ../sysvinit-"${VERSION}"-consolidated-1.patch
+
+make
+
+make -j1 install
diff --git a/chapter8/tar.sh b/chapter8/tar.sh
new file mode 100644
index 0000000..312a500
--- /dev/null
+++ b/chapter8/tar.sh
@@ -0,0 +1,10 @@
+#!/bin/bash
+
+FORCE_UNSAFE_CONFIGURE=1 \
+./configure --prefix=/usr \
+ --bindir=/bin
+
+make
+
+make -j1 install
+make -C doc install-html docdir=/usr/share/doc/tar-"${VERSION}"
diff --git a/chapter8/tcl.sh b/chapter8/tcl.sh
new file mode 100644
index 0000000..688dc5e
--- /dev/null
+++ b/chapter8/tcl.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+tar -xf ../tcl"${VERSION}"-html.tar.gz --strip-components=1
+
+SRCDIR=$(pwd)
+cd unix || exit 1
+./configure --prefix=/usr \
+ --mandir=/usr/share/man \
+ "$([ "$(uname -m)" = x86_64 ] && echo --enable-64bit)"
+
+make
+
+sed -e "s|${SRCDIR}/unix|/usr/lib|" \
+ -e "s|${SRCDIR}|/usr/include|" \
+ -i tclConfig.sh
+
+sed -e "s|${SRCDIR}/unix/pkgs/tdbc1.1.2|/usr/lib/tdbc1.1.2|" \
+ -e "s|${SRCDIR}/pkgs/tdbc1.1.2/generic|/usr/include|" \
+ -e "s|${SRCDIR}/pkgs/tdbc1.1.2/library|/usr/lib/tcl8.6|" \
+ -e "s|${SRCDIR}/pkgs/tdbc1.1.2|/usr/include|" \
+ -i pkgs/tdbc1.1.2/tdbcConfig.sh
+
+sed -e "s|${SRCDIR}/unix/pkgs/itcl4.2.1|/usr/lib/itcl4.2.1|" \
+ -e "s|${SRCDIR}/pkgs/itcl4.2.1/generic|/usr/include|" \
+ -e "s|${SRCDIR}/pkgs/itcl4.2.1|/usr/include|" \
+ -i pkgs/itcl4.2.1/itclConfig.sh
+
+unset SRCDIR
+
+make -j1 install
+
+chmod -v u+w /usr/lib/libtcl8.6.so
+make -j1 install-private-headers
+ln -sfv tclsh8.6 /usr/bin/tclsh
+mv /usr/share/man/man3/{Thread,Tcl_Thread}.3
diff --git a/chapter8/texinfo.sh b/chapter8/texinfo.sh
new file mode 100644
index 0000000..bfd324f
--- /dev/null
+++ b/chapter8/texinfo.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+
+make
+
+make -j1 install
+
+make TEXMF=/usr/share/texmf install-tex
diff --git a/chapter8/util-linux.sh b/chapter8/util-linux.sh
new file mode 100644
index 0000000..f44bb38
--- /dev/null
+++ b/chapter8/util-linux.sh
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
+ --docdir=/usr/share/doc/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 \
+ runstatedir=/run
+
+make
+
+make -j1 install
diff --git a/chapter8/vim.sh b/chapter8/vim.sh
new file mode 100644
index 0000000..6543279
--- /dev/null
+++ b/chapter8/vim.sh
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h
+
+./configure --prefix=/usr
+
+make
+
+make -j1 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
+
+ln -sv ../vim/vim82/doc /usr/share/doc/vim-"${VERSION}"
+
+cat > /etc/vimrc << "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 (&term == "xterm") || (&term == "putty")
+ set background=dark
+endif
+
+" End /etc/vimrc
+EOF
diff --git a/chapter8/xml-parser.sh b/chapter8/xml-parser.sh
new file mode 100644
index 0000000..468c6f1
--- /dev/null
+++ b/chapter8/xml-parser.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+perl Makefile.PL
+
+make
+
+make -j1 install
diff --git a/chapter8/xz.sh b/chapter8/xz.sh
new file mode 100644
index 0000000..5204163
--- /dev/null
+++ b/chapter8/xz.sh
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+
+./configure --prefix=/usr \
+ --disable-static \
+ --docdir=/usr/share/doc/xz-"${VERSION}"
+
+make
+make -j1 install
+mv -v /usr/bin/{lzma,unlzma,lzcat,xz,unxz,xzcat} /bin
+mv -v /usr/lib/liblzma.so.* /lib
+ln -svf ../../lib/"$(readlink /usr/lib/liblzma.so)" /usr/lib/liblzma.so
diff --git a/chapter8/zlib.sh b/chapter8/zlib.sh
new file mode 100644
index 0000000..47dfba2
--- /dev/null
+++ b/chapter8/zlib.sh
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+./configure --prefix=/usr
+make
+make -j1 install
+
+mv -v /usr/lib/libz.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libz.so)" /usr/lib/libz.so
+rm -fv /usr/lib/libz.a
diff --git a/chapter8/zstd.sh b/chapter8/zstd.sh
new file mode 100644
index 0000000..56b5ddb
--- /dev/null
+++ b/chapter8/zstd.sh
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+make
+make prefix=/usr -j1 install
+
+rm -v /usr/lib/libzstd.a
+mv -v /usr/lib/libzstd.so.* /lib
+ln -sfv ../../lib/"$(readlink /usr/lib/libzstd.so)" /usr/lib/libzstd.so