lfs-auto/chap8p2.sh
2023-05-07 14:47:59 +02:00

905 lines
25 KiB
Bash

#!/bin/bash
source vars.sh
echo "8.35 ""$LIBTOOL"""
tar xf "$LIBTOOL".tar.xz &&
cd "$LIBTOOL" &&
./configure --prefix=/usr &&
make &&
TESTSUITEFLAGS=-j"$JOBS" make -k check | tee ../check-log_"$LIBTOOL".log;
make install &&
rm -fv /usr/lib/libltdl.a &&
cd .. &&
rm -rf "$LIBTOOL" &&
echo "Finished 8.35 ""$LIBTOOL""" >> build.log &&
echo "$LIBTOOL" >> /installed.txt
echo "8.36 ""$GDBM"""
tar xf "$GDBM".tar.gz &&
cd "$GDBM" &&
./configure --prefix=/usr \
--disable-static \
--enable-libgdbm-compat &&
make &&
make check | tee ../check-log_"$GDBM".log;
make install &&
cd .. &&
rm -rf "$GDBM" &&
echo "Finished 8.36 ""$GDBM""" >> build.log &&
echo "$GDBM" >> /installed.txt
echo "8.37 ""$GPERF"""
tar xf "$GPERF".tar.gz &&
cd "$GPERF" &&
./configure --prefix=/usr --docdir=/usr/share/doc/gperf-3.1 &&
make &&
make -j1 check | tee ../check-log_"$GPERF".log;
make install &&
cd .. &&
rm -rf "$GPERF" &&
echo "Finished 8.37 ""$GPERF""" >> build.log &&
echo "$GPERF" >> /installed.txt
echo "8.38 ""$EXPAT"""
tar xf "$EXPAT".tar.xz &&
cd "$EXPAT" &&
./configure --prefix=/usr \
--disable-static \
--docdir=/usr/share/doc/expat-2.5.0 &&
make &&
make check | tee ../check-log_"$EXPAT".log;
make install &&
install -v -m644 doc/*.{html,css} /usr/share/doc/expat-2.5.0 &&
cd .. &&
rm -rf "$EXPAT" &&
echo "Finished 8.38 ""$EXPAT""" >> build.log &&
echo "$EXPAT" >> /installed.txt
echo "8.39 ""$INETUTILS"""
tar xf "$INETUTILS".tar.xz &&
cd "$INETUTILS" &&
if [ "$TELNETD" = TRUE ]; then
./configure --prefix=/usr \
--bindir=/usr/bin \
--localstatedir=/var \
--disable-logger \
--disable-whois \
--disable-rcp \
--disable-rexec \
--disable-rlogin \
--disable-rsh \
--disable-servers \
--enable-telnetd
else
./configure --prefix=/usr \
--bindir=/usr/bin \
--localstatedir=/var \
--disable-logger \
--disable-whois \
--disable-rcp \
--disable-rexec \
--disable-rlogin \
--disable-rsh \
--disable-servers
fi &&
make &&
make check | tee ../check-log_"$INETUTILS".log;
make install &&
mv -v /usr/{,s}bin/ifconfig &&
if [ "$TELNETD" = TRUE ]; then
cp -v telnetd/telnetd /usr/sbin/in.telnetd &&
cat > /lib/systemd/system/telnetd.socket << "EOF"
[Unit]
Description=Telnet Socket for Per-Connection Servers
[Socket]
ListenStream=23
Accept=yes
[Install]
WantedBy=sockets.target
EOF
cat > /lib/systemd/system/telnetd@.service << "EOF"
[Unit]
Description=Telnet Per-Connection Server
[Service]
ExecStart=-/usr/sbin/in.telnetd
StandardInput=socket
EOF
fi &&
cd .. &&
rm -rf "$INETUTILS" &&
echo "Finished 8.39 ""$INETUTILS""" >> build.log &&
echo "$INETUTILS" >> /installed.txt
echo "8.40 ""$LESS"""
tar xf "$LESS".tar.gz &&
cd "$LESS" &&
./configure --prefix=/usr --sysconfdir=/etc &&
make &&
make install &&
cd .. &&
rm -rf "$LESS" &&
echo "Finished 8.40 ""$LESS""" >> build.log &&
echo "$LESS" >> /installed.txt
echo "8.41 ""$PERL"""
tar xf "$PERL".tar.xz &&
cd "$PERL" &&
export BUILD_ZLIB=False &&
export BUILD_BZIP2=0 &&
sh Configure -des \
-Dprefix=/usr \
-Dvendorprefix=/usr \
-Dprivlib=/usr/lib/perl5/5.36/core_perl \
-Darchlib=/usr/lib/perl5/5.36/core_perl \
-Dsitelib=/usr/lib/perl5/5.36/site_perl \
-Dsitearch=/usr/lib/perl5/5.36/site_perl \
-Dvendorlib=/usr/lib/perl5/5.36/vendor_perl \
-Dvendorarch=/usr/lib/perl5/5.36/vendor_perl \
-Dman1dir=/usr/share/man/man1 \
-Dman3dir=/usr/share/man/man3 \
-Dpager="/usr/bin/less -isR" \
-Duseshrplib \
-Dusethreads &&
make &&
make test | tee ../check-log_"$PERL".log;
make install &&
unset BUILD_ZLIB BUILD_BZIP2 &&
cd .. &&
rm -rf "$PERL" &&
echo "Finished 8.41 ""$PERL""" >> build.log &&
echo "$PERL" >> /installed.txt
echo "8.42 ""$XMLPARSER"""
tar xf "$XMLPARSER".tar.gz &&
cd "$XMLPARSER" &&
perl Makefile.PL &&
make &&
make test | tee ../check-log_"$XMLPARSER".log;
make install &&
cd .. &&
rm -rf "$XMLPARSER" &&
echo "Finished 8.42 ""$XMLPARSER""" >> build.log &&
echo "$PERL" >> /installed.txt
echo "8.43 ""$INTLTOOL"""
tar xf "$INTLTOOL".tar.gz &&
cd "$INTLTOOL" &&
sed -i 's:\\\${:\\\$\\{:' intltool-update.in &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$INTLTOOL".log;
make install &&
install -v -Dm644 doc/I18N-HOWTO /usr/share/doc/intltool-0.51.0/I18N-HOWTO &&
cd .. &&
rm -rf "$INTLTOOL" &&
echo "Finished 8.43 ""$INTLTOOL""" >> build.log &&
echo "$INTLTOOL" >> /installed.txt
echo "8.44 ""$AUTOCONF"""
tar xf "$AUTOCONF".tar.xz &&
cd "$AUTOCONF" &&
sed -e 's/SECONDS|/&SHLVL|/' \
-e '/BASH_ARGV=/a\ /^SHLVL=/ d' \
-i.orig tests/local.at &&
./configure --prefix=/usr &&
make &&
TESTSUITEFLAGS=-j"$JOBS" make check | tee ../check-log_"$AUTOCONF".log;
make install &&
cd .. &&
rm -rf "$AUTOCONF" &&
echo "Finished 8.44 ""$AUTOCONF""" >> build.log &&
echo "$AUTOCONF" >> /installed.txt
echo "8.45 ""$AUTOMAKE"""
tar xf "$AUTOMAKE".tar.xz &&
cd "$AUTOMAKE" &&
./configure --prefix=/usr --docdir=/usr/share/doc/automake-1.16.5 &&
make &&
make -j4 check | tee ../check-log_"$AUTOMAKE".log;
make install &&
cd .. &&
rm -rf "$AUTOMAKE" &&
echo "8.45 ""$AUTOMAKE""" >> build.log &&
echo "$AUTOMAKE" >> /installed.txt
echo "8.46 ""$OPENSSL"""
tar xf "$OPENSSL".tar.gz &&
cd "$OPENSSL" &&
./config --prefix=/usr \
--openssldir=/etc/ssl \
--libdir=lib \
shared \
zlib-dynamic &&
make &&
make test | tee ../check-log_"$OPENSSL".log;
sed -i '/INSTALL_LIBS/s/libcrypto.a libssl.a//' Makefile &&
make MANSUFFIX=ssl install &&
mv -v /usr/share/doc/openssl /usr/share/doc/openssl-3.0.8 &&
cp -vfr doc/* /usr/share/doc/openssl-3.0.8 &&
cd .. &&
rm -rf "$OPENSSL" &&
echo "Finished 8.46 ""$OPENSSL""" >> build.log &&
echo "$OPENSSL" >> /installed.txt
echo "8.47 ""$KMOD"""
tar xf "$KMOD".tar.xz &&
cd "$KMOD" &&
./configure --prefix=/usr \
--sysconfdir=/etc \
--with-openssl \
--with-xz \
--with-zstd \
--with-zlib &&
make &&
make install &&
for target in depmod insmod modinfo modprobe rmmod; do
ln -sfv ../bin/kmod /usr/sbin/$target
done &&
ln -sfv kmod /usr/bin/lsmod &&
cd .. &&
rm -rf "$KMOD" &&
echo "Finished 8.47 ""$KMOD""" >> build.log &&
echo "$KMOD" >> /installed.txt
echo "8.48 Libelf from ""$ELFUTILS"""
tar xf "$ELFUTILS".tar.bz2 &&
cd "$ELFUTILS" &&
./configure --prefix=/usr \
--disable-debuginfod \
--enable-libdebuginfod=dummy &&
make &&
make check | tee ../check-log_"$ELFUTILS".log;
make -C libelf install &&
install -vm644 config/libelf.pc /usr/lib/pkgconfig &&
rm /usr/lib/libelf.a &&
cd .. &&
rm -rf "$ELFUTILS" &&
echo "Finished 8.48 Libelf from ""$ELFUTILS""" >> build.log &&
echo "Libelf from $ELFUTILS" >> /installed.txt
echo "8.49 ""$LIBFFI"""
tar xf "$LIBFFI" &&
cd "$LIBFFI" &&
./configure --prefix=/usr \
--disable-static \
--with-gcc-arch=native &&
make &&
make check | tee ../check-log_"$LIBFFI".log;
make install &&
cd .. &&
rm -rf "$LIBFFI" &&
echo "Finished 8.49 ""$LIBFFI""" >> build.log &&
echo "$LIBFFI" >> /installed.txt
echo "8.50 ""$PYTHON"""
tar xf "$PYTHON".tar.xz &&
cd "$PYTHON" &&
./configure --prefix=/usr \
--enable-shared \
--with-system-expat \
--with-system-ffi \
--enable-optimizations &&
make &&
make install &&
cat > /etc/pip.conf << EOF
[global]
root-user-action = ignore
disable-pip-version-check = true
EOF
install -v -dm755 /usr/share/doc/python-3.11.2/html &&
tar --strip-components=1 \
--no-same-owner \
--no-same-permissions \
-C /usr/share/doc/python-3.11.2/html \
-xvf ../python-3.11.2-docs-html.tar.bz2 &&
cd .. &&
rm -rf "$PYTHON" &&
echo "Finished 8.50 ""$PYTHON""" >> build.log &&
echo "$PYTHON" >> /installed.txt
echo "8.51 ""$WHEEL"""
tar xf "$WHEEL".tar.gz &&
cd "$WHEEL" &&
PYTHONPATH=src pip3 wheel -w dist --no-build-isolation --no-deps $PWD &&
pip3 install --no-index --find-links=dist wheel &&
cd .. &&
rm -rf "$WHEEL" &&
echo "Finished 8.51 ""$WHEEL""" >> build.log &&
echo "$WHEEL" >> /installed.txt
echo "8.52 ""$NINJA"""
tar xf "$NINA".tar.gz &&
cd "$NINJA" &&
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 &&
./ninja ninja_test | tee ../check-log_"$NINJA".log;
./ninja_test --gtest_filter=-SubprocessTest.SetWithLots | tee -a ../check-log_"$NINJA".log;
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 &&
cd .. &&
rm -rf "$NINJA" &&
echo "Finished 8.52 ""$NINJA""" >> build.log &&
echo "$NINJA" >> /installed.txt
echo "8.53 ""$MESON"""
tar xf "$MESON" &&
cd "$MESON" &&
pip3 wheel -w dist --no-build-isolation --no-deps $PWD &&
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 &&
cd .. &&
rm -rf "$MESON" &&
echo "Finished 8.53 ""$MESON""" >> build.log &&
echo "$MESON" >> /installed.txt
echo "8.54 ""$COREUTILS"
tar xf "$COREUTILS".tar.xz &&
cd "$COREUTILS" &&
patch -Np1 -i ../coreutils-9.1-i18n-1.patch &&
autoreconf -fiv &&
FORCE_UNSAFE_CONFIGURE=1 ./configure \
--prefix=/usr \
--enable-no-install-program=kill,uptime &&
make &&
make NON_ROOT_USERNAME=tester check-root &&
echo "dummy:x:102:tester" >> /etc/group &&
chown -Rv tester . &&
su tester -c "PATH=$PATH make RUN_EXPENSIVE_TESTS=yes check" | tee ../check-log_"$COREUTILS".log;
sed -i '/dummy/d' /etc/group &&
make 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 &&
cd .. &&
rm -rf "$COREUTILS" &&
echo "Finished 8.54 ""$COREUTILS" >> build.log &&
echo "$COREUTILS" >> /installed.txt
echo "8.55 ""$CHECK"""
tar xf "$CHECK".tar.gz &&
cd "$CHECK" &&
./configure --prefix=/usr --disable-static &&
make &&
make check | tee ../check-log_"$CHECK".log;
make docdir=/usr/share/doc/check-0.15.2 install &&
cd .. &&
rm -rf "$CHECK" &&
echo "Finished 8.55 ""$CHECK""" >> build.log &&
echo "$CHECK" >> /installed.txt
echo "8.56 ""$DIFFUTILS"""
tar xf "$DIFFUTILS".tar.xz &&
cd "$DIFFUTILS" &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$DIFFUTILS".log;
make install &&
cd .. &&
rm -rf "$DIFFUTILS" &&
echo "Finished 8.56 ""$DIFFUTILS""" >> build.log &&
echo "$DIFFUTILS" >> /installed.txt
echo "8.57 ""$GAWK"""
tar xf "$GAWK".tar.xz &&
cd "$GAWK" &&
sed -i 's/extras//' Makefile.in &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$GAWK".log;
make LN='ln -f' install &&
mkdir -pv /usr/share/doc/gawk-5.2.1 &&
cp -v doc/{awkforai.txt,*.{eps,pdf,jpg}} /usr/share/doc/gawk-5.2.1 &&
cd .. &&
rm -rf "$GAWK" &&
echo "Finished 8.57 ""$GAWK""" >> build.log &&
echo "$GAWK" >> /installed.txt
echo "8.58 ""$FINDUTILS"""
tar xf "$FINDUTILS".tar.xz &&
cd "$FINDUTILS" &&
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 &&
make &&
chown -Rv tester . &&
su tester -c "PATH=$PATH make check" | tee ../check-log_"$FINDUTILS".log;
make install &&
cd .. &&
rm -rf "$FINDUTILS" &&
echo "Finished 8.58 ""$FINDUTILS""" >> build.log &&
echo "$FINDUTILS" >> /installed.txt
echo "8.59 ""$GROFF"""
tar xf "$GROFF".tar.gz &&
cd "$GROFF" &&
PAGE="$PAPERSIZE" ./configure --prefix=/usr &&
make &&
make install &&
cd .. &&
rm -rf "$GROFF" &&
echo "Finished 8.59 ""$GROFF""" >> build.log &&
echo "$GROFF" >> /installed.txt
echo "8.60 ""$GRUB"""
tar xf "$GRUB".tar.xz &&
cd "$GRUB" &&
unset {C,CPP,CXX,LD}FLAGS &&
patch -Np1 -i ../grub-2.06-upstream_fixes-1.patch &&
./configure --prefix=/usr \
--sysconfdir=/etc \
--disable-efiemu \
--disable-werror &&
make &&
make install &&
mv -v /etc/bash_completion.d/grub /usr/share/bash-completion/completions &&
cd .. &&
rm -rf "$GRUB" &&
echo "Finished 8.60 ""$GRUB""" >> build.log &&
echo "$GRUB" >> /installed.txt
echo "8.61 ""$GZIP"""
tar xf "$GZIP".tar.xz &&
cd "$GZIP" &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$GZIP".log;
make install &&
cd .. &&
rm -rf "$GZIP" &&
echo "Finished 8.61 ""$GZIP""" >> build.log &&
echo "$GZIP" >> /installed.txt
echo "8.62 ""$IPROUTE2"""
tar xf "$IPROUTE2".tar.xz &&
cd "$IPROUTE2" &&
sed -i /ARPD/d Makefile &&
rm -fv man/man8/arpd.8 &&
make NETNS_RUN_DIR=/run/netns &&
make SBINDIR=/usr/sbin install &&
mkdir -pv /usr/share/doc/iproute2-6.1.0 &&
cp -v COPYING README* /usr/share/doc/iproute2-6.1.0 &&
cd .. &&
rm -rf "$IPROUTE2" &&
echo "Finished 8.62 ""$IPROUTE2""" >> build.log &&
echo "$IPROUTE2" >> /installed.txt
echo "8.63 ""$KBD"""
tar xf "$KBD".tar.xz &&
cd "$KBD" &&
patch -Np1 -i ../kbd-2.5.1-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 check | tee ../check-log_"$KBD".log;
make install &&
mkdir -pv /usr/share/doc/kbd-2.5.1 &&
cp -R -v docs/doc/* /usr/share/doc/kbd-2.5.1 &&
cd .. &&
rm -rf "$KBD" &&
echo "Finished 8.63 ""$KBD""" >> build.log &&
echo "$KBD" >> /installed.txt
echo "8.64 ""$LIBPIPELINE"""
tar xf "$LIBPIPELINE".tar.gz &&
cd "$LIBPIPELINE" &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$LIBPIPELINE".log;
make install &&
cd .. &&
rm -rf "$LIBPIPELINE" &&
echo "Finished 8.64 ""$LIBPIPELINE""" >> build.log &&
echo "$LIBPIPELINE" >> /installed.txt
echo "8.65 ""$MAKE"""
tar xf "$MAKE".tar.gz &&
cd "$MAKE" &&
sed -e '/ifdef SIGPIPE/,+2 d' \
-e '/undef FATAL_SIG/i FATAL_SIG (SIGPIPE);' \
-i src/main.c &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$MAKE".log;
make install &&
cd .. &&
rm -rf "$MAKE" &&
echo "Finished 8.65 ""$MAKE""" >> build.log &&
echo "$MAKE" >> /installed.txt
echo "8.66 ""$PATCH"""
tar xf "$PATCH".tar.xz &&
cd "$PATCH" &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$PATCH".log;
make install &&
cd .. &&
rm -rf "$PATCH" &&
echo "FInished 8.66 ""$PATCH""" >> build.log &&
echo "$PATCH" >> /installed.txt
echo "8.67 ""$TAR"""
tar xf "$TAR".tar.xz &&
cd "$TAR" &&
FORCE_UNSAFE_CONFIGURE=1 \
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$TAR".log;
make install &&
make -C doc install-html docdir=/usr/share/doc/tar-1.34 &&
cd .. &&
rm -rf "$TAR" &&
echo "Finished 8.67 ""$TAR""" >> build.log &&
echo "$TAR" >> /installed.txt
echo "8.68 ""$TEXINFO"""
tar xf "$TEXINFO" &&
cd "$TEXINFO" &&
./configure --prefix=/usr &&
make &&
make check | tee ../check-log_"$TEXINFO".log;
make install &&
cd .. &&
rm -rf "$TEXINFO" &&
echo "Finished 8.68 ""$TEXINFO""" >> build.log &&
echo "$TEXINFO" >> /installed.txt
echo "8.69 ""$VIM"""
tar xf "$VIM".tar.xz &&
cd "$VIM" &&
echo '#define SYS_VIMRC_FILE "/etc/vimrc"' >> src/feature.h &&
./configure --prefix=/usr &&
make &&
chown -Rv tester . &&
su tester -c "LANG=en_US.UTF-8 make -j1 test" &> vim-test.log;
cp vim-test.log ../check-log_"$VIM".log &&
make 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/vim90/doc /usr/share/doc/vim-9.0.1273 &&
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
cd .. &&
rm -rf "$VIM" &&
echo "Finished 8.69 ""$VIM""" >> build.log &&
echo "$VIM" >> /installed.txt
echo "8.70 ""$MARKUPSAFE"""
tar xf "$MARKUPSAFE".tar.gz &&
cd "$MARKUPSAFE" &&
pip3 wheel -w dist --no-build-isolation --no-deps $PWD &&
pip3 install --no-index --no-user --find-links dist Markupsafe &&
cd .. &&
rm -rf "$MARKUPSAFE" &&
echo "Finished 8.70 ""$MARKUPSAFE""" >> build.log &&
echo "$MARKUPSAFE" >> /installed.txt
echo "8.71 ""$JINJA2"""
tar xf "$JINJA2".tar.gz &&
cd "$JINJA2" &&
pip3 wheel -w dist --no-build-isolation --no-deps $PWD &&
pip3 install --no-index --no-user --find-links dist Jinja2 &&
cd .. &&
rm -rf "$JINJA2" &&
echo "Finished 8.71 ""$JINJA2""" >> build.log &&
echo "$JINJA2" >> /installed.txt
echo "8.72 ""$SYSTEMD"""
tar xf "$SYSTEMD".tar.gz
cd "$SYSTEMD" &&
patch -Np1 -i ../systemd-252-security_fix-1.patch &&
sed -i -e 's/GROUP="render"/GROUP="video"/' \
-e 's/GROUP="sgx", //' rules.d/50-udev-default.rules.in &&
mkdir -p build &&
cd build &&
meson --prefix=/usr \
--buildtype=release \
-Ddefault-dnssec=no \
-Dfirstboot=false \
-Dinstall-tests=false \
-Dldconfig=false \
-Dsysusers=false \
-Drpmmacrosdir=no \
-Dhomed=false \
-Duserdb=false \
-Dman=false \
-Dmode=release \
-Dpamconfdir=no \
-Ddocdir=/usr/share/doc/systemd-252 \
.. &&
ninja &&
ninja install &&
tar -xf ../../systemd-man-pages-252-2.tar.xz --strip-components=1 -C /usr/share/man &&
systemd-machine-id-setup &&
systemctl preset-all &&
systemctl disable systemd-sysupdate{,-reboot} &&
if [ "$TELNETD" = TRUE ]; then
systemctl enable telnetd.socket
fi &&
cd ../.. &&
rm -rf "$SYSTEMD" &&
echo "Finished 8.72 ""$SYSTEMD""" >> build.log &&
echo "$SYSTEMD" >> /installed.txt
echo "8.73 ""$DBUS"""
tar xf "$DBUS".tar.xz &&
cd "$DBUS" &&
./configure --prefix=/usr \
--sysconfdir=/etc \
--localstatedir=/var \
--runstatedir=/run \
--disable-static \
--disable-doxygen-docs \
--disable-xml-docs \
--docdir=/usr/share/doc/dbus-1.14.6 \
--with-system-socket=/run/dbus/system_bus_socket &&
make &&
make install &&
ln -sfv /etc/machine-id /var/lib/dbus &&
cd .. &&
rm -rf "$DBUS" &&
echo "Finished 8.73 ""$DBUS""" >> build.log &&
echo "$DBUS" >> /installed.txt
echo "8.74 ""$MANDB"""
tar xf "$MANDB".tar.xz &&
cd "$MANDB" &&
./configure --prefix=/usr \
--docdir=/usr/share/doc/man-db-2.11.2 \
--sysconfdir=/etc \
--disable-setuid \
--enable-cache-owner=bin \
--with-browser=/usr/bin/lynx \
--with-vgrind=/usr/bin/vgrind \
--with-grap=/usr/bin/grap &&
make &&
make check | tee ../check-log_"$MANDB".log;
make install &&
cd .. &&
rm -rf "$MANDB" &&
echo "Finished 8.74 ""$MANDB""" >> build.log &&
echo "$MANDB" >> /installed.txt
echo "8.75 ""$PROCPSNG"""
tar xf "$PROCPSNG".tar.xz
cd "$PROCPSNG" &&
./configure --prefix=/usr \
--docdir=/usr/share/doc/procps-ng-4.0.2 \
--disable-static \
--disable-kill \
--with-systemd &&
make &&
make check | tee ../check-log_"$MANDB".log;
make install &&
cd .. &&
rm -rf "$PROCPSNG" &&
echo "Finished 8.75 ""$PROCPSNG""" >> build.log &&
echo "$PROCPSNG" >> /installed.txt
echo "8.76 ""$UTILLINUX"""
tar xf "$UTILLINUX".tar.xz &&
cd "$UTILLINUX" &&
./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
--bindir=/usr/bin \
--libdir=/usr/lib \
--sbindir=/usr/sbin \
--disable-chfn-chsh \
--disable-login \
--disable-nologin \
--disable-su \
--disable-setpriv \
--disable-runuser \
--disable-pylibmount \
--disable-static \
--without-python \
--docdir=/usr/share/doc/util-linux-2.38.1 &&
make &&
make install &&
cd .. &&
rm -rf "$UTILLINUX" &&
echo "Finished 8.76 ""$UTILLINUX""" >> build.log &&
echo "$UTILLINUX" >> /installed.txt
echo "8.77 ""$E2FSPROGS"""
tar xf "$E2FSPROGS".tar.gz &&
cd "$E2FSPROGS" &&
mkdir -v build &&
cd build &&
../configure --prefix=/usr \
--sysconfdir=/etc \
--enable-elf-shlibs \
--disable-libblkid \
--disable-libuuid \
--disable-uuidd \
--disable-fsck &&
make &&
make check | tee ../check-log_"$E2FSPROGS".log;
make 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 &&
cd .. &&
rm -rf "$E2FSPROGS" &&
echo "Finished 8.77 ""$E2FSPROGS""" >> build.log &&
echo "$E2FSPROGS" >> /installed.txt
save_usrlib="$(cd /usr/lib; ls ld-linux*[^g])
libc.so.6
libthread_db.so.1
libquadmath.so.0.0.0
libstdc++.so.6.0.30
libitm.so.1.0.0
libatomic.so.1.2.0" &&
cd /usr/lib &&
for LIB in $save_usrlib; do
objcopy --only-keep-debug $LIB $LIB.dbg
cp $LIB /tmp/$LIB
strip --strip-unneeded /tmp/$LIB
objcopy --add-gnu-debuglink=$LIB.dbg /tmp/$LIB
install -vm755 /tmp/$LIB /usr/lib
rm /tmp/$LIB
done &&
online_usrbin="bash find strip" &&
online_usrlib="libbfd-2.40.so
libsframe.so.0.0.0
libhistory.so.8.2
libncursesw.so.6.4
libm.so.6
libreadline.so.8.2
libz.so.1.2.13
$(cd /usr/lib; find libnss*.so* -type f)" &&
for BIN in $online_usrbin; do
cp /usr/bin/$BIN /tmp/$BIN
strip --strip-unneeded /tmp/$BIN
install -vm755 /tmp/$BIN /usr/bin
rm /tmp/$BIN
done &&
for LIB in $online_usrlib; do
cp /usr/lib/$LIB /tmp/$LIB
strip --strip-unneeded /tmp/$LIB
install -vm755 /tmp/$LIB /usr/lib
rm /tmp/$LIB
done &&
for i in $(find /usr/lib -type f -name \*.so* ! -name \*dbg) \
$(find /usr/lib -type f -name \*.a) \
$(find /usr/{bin,sbin,libexec} -type f); do
case "$online_usrbin $online_usrlib $save_usrlib" in
*$(basename $i)* )
;;
* ) strip --strip-unneeded $i
;;
esac
done &&
unset BIN LIB save_usrlib online_usrbin online_usrlib &&
rm -rf /tmp/* &&
find /usr/lib /usr/libexec -name \*.la -delete &&
find /usr -depth -name $(uname -m)-lfs-linux-gnu\* | xargs rm -rf &&
userdel -r tester &&
cat > /etc/systemd/network/10-eth-dhcp.network << "EOF" &&
Name="$NETWORKINTERFACE"
[Network]
DHCP=ipv4
[DHCPv4]
UseDomains=true
EOF
echo "$HOSTNAME" > /etc/hostname &&
cat > /etc/hosts << "EOF" &&
# Begin /etc/hosts
127.0.0.1 localhost.localdomain localhost
127.0.1.1 "$HOSTNAME"."$DOMAIN" "$HOSTNAME"
::1 localhost ip6-localhost ip6-loopback
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
# End /etc/hosts
EOF
cat > /etc/vconsole.conf << "EOF" &&
KEYMAP="$KEYMAP"
FONT=Lat2-Terminus16
EOF
cat > /etc/locale.conf << "EOF" &&
LANG="$LOCALE"
EOF
cat > /etc/inputrc << "EOF" &&
# Begin /etc/inputrc
# Modified by Chris Lynn <roryo@roryo.dynup.net>
# Allow the command prompt to wrap to the next line
set horizontal-scroll-mode Off
# Enable 8-bit 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
EOF
cat > /etc/shells << "EOF" &&
# Begin /etc/shells
/bin/sh
/bin/bash
# End /etc/shells
EOF
mkdir -pv /etc/systemd/system/getty@tty1.service.d &&
cat > /etc/systemd/system/getty@tty1.service.d/noclear.conf << EOF &&
[Service]
TTYVTDisallocate=yes
EOF
# ln -sfv /dev/null /etc/systemd/system/tmp.mount
mkdir -pv /etc/systemd/coredump.conf.d &&
cat > /etc/systemd/coredump.conf.d/maxuse.conf << EOF
[Coredump]
MaxUse=5G
EOF
echo "Continue with chapter 10.2. Creating the /etc/fstab File"