aboutsummaryrefslogtreecommitdiffstats
path: root/chapter8
diff options
context:
space:
mode:
Diffstat (limited to 'chapter8')
-rw-r--r--chapter8/bash.sh21
-rw-r--r--chapter8/cleanup.sh71
-rw-r--r--chapter8/e2fsprogs.sh30
-rw-r--r--chapter8/iproute2.sh16
-rw-r--r--chapter8/ncurses.sh33
-rw-r--r--chapter8/python.sh24
6 files changed, 195 insertions, 0 deletions
diff --git a/chapter8/bash.sh b/chapter8/bash.sh
index 73de0bf..ee7124f 100644
--- a/chapter8/bash.sh
+++ b/chapter8/bash.sh
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#!/bin/bash
# shellcheck disable=SC2016
@@ -16,3 +17,23 @@ make -j1 install &&
mv -vf /usr/bin/bash /bin
#exec /bin/bash --login +h
+=======
+#!/bin/bash
+# shellcheck disable=SC2016
+
+patch -Np1 -i ../bash-"${VERSION}"-fixes-2.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
+>>>>>>> 6132c19762b7d74ba7ad06e291b6401c632bbc28
diff --git a/chapter8/cleanup.sh b/chapter8/cleanup.sh
index eb35b67..7262ba6 100644
--- a/chapter8/cleanup.sh
+++ b/chapter8/cleanup.sh
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#!/bin/bash
set -e
@@ -66,3 +67,73 @@ else
success "OK"
sudo touch "${LFS}"/sources/chapter8/cleanup >/dev/null 2>&1
fi
+=======
+#!/bin/bash
+set -e
+
+if [ -f "${LFS}/sources/chapter8/cleanup" ]; then
+ printf "%b" " ${IGRN}Cleanup already performed${RST}\n"
+else
+
+ printf "%b" "${GRN}Cleaning up ${YLW}${LFS}${RST}... "
+
+ {
+
+ sudo rm -rfv "${LFS}"/tmp/*
+ sudo rm -rfv "${LFS}"/tools
+
+ sudo find "${LFS}"/usr/lib -name \*.la -delete
+ sudo find "${LFS}"/usr/libexec -name \*.la -delete
+
+ sudo find "${LFS}"/usr -depth -name "$(uname -m)"-lfs-linux-gnu\* | xargs sudo rm -rfv
+
+ sudo sed '/tester/d' -i "${LFS}"/etc/group
+ sudo sed '/tester/d' -i "${LFS}"/etc/passwd
+ sudo rm -rfv "${LFS}"/home/tester
+
+ #sudo rm -rfv "${LFS}"/usr/share/doc
+ #sudo rm -rfv "${LFS}"/usr/share/info
+ #sudo rm -rfv "${LFS}"/usr/share/man
+
+ # Place debugging symbols for selected libraries in seprate files
+ save_lib="ld-?.*.so libc-?.*.so libpthread-?.*.so libthread_db-?.?.so"
+ pushd "${LFS}"/lib || exit 1
+
+ for LIB in $save_lib; do
+ sudo objcopy --only-keep-debug "${LIB}" "${LIB}".dbg
+ sudo strip --strip-unneeded "${LIB}"
+ sudo objcopy --add-gnu-debuglink="${LIB}".dbg "${LIB}"
+ done
+
+ popd || exit 1
+
+ save_usrlib="libquadmath.so.?.?.? libstdc++.so.?.?.* libitm.so.?.?.? libatomic.so.?.?.?"
+
+ pushd "${LFS}"/usr/lib || exit 1
+
+ for LIB in $save_usrlib; do
+ sudo objcopy --only-keep-debug "${LIB}" "${LIB}".dbg
+ sudo strip --strip-unneeded "${LIB}"
+ sudo objcopy --add-gnu-debuglink="${LIB}".dbg "${LIB}"
+ done
+
+ popd || exit 1
+
+ sudo find "${LFS}"/usr/lib -type f -name \*.a -exec strip --strip-debug {} ';'
+ sudo find "${LFS}"/lib -type f -name \*.so* ! -name \*dbg -exec strip --strip-unneeded {} ';'
+ sudo find "${LFS}"/usr/lib -type f -name \*.so* ! -name \*dbg -exec strip --strip-unneeded {} ';'
+
+
+ sudo find "${LFS}"/bin -type f -exec strip --strip-all {} ';'
+ sudo find "${LFS}"/sbin -type f -exec strip --strip-all {} ';'
+ sudo find "${LFS}"/usr/bin -type f -exec strip --strip-all {} ';'
+ sudo find "${LFS}"/usr/sbin -type f -exec strip --strip-all {} ';'
+ sudo find "${LFS}"/usr/libexec -type f -exec strip --strip-all {} ';'
+
+
+} >"${LFS}"/sources/log/chapter8/cleanup.log 2>&1
+
+ success "OK"
+ sudo touch "${LFS}"/sources/chapter8/cleanup >/dev/null 2>&1
+fi
+>>>>>>> 6132c19762b7d74ba7ad06e291b6401c632bbc28
diff --git a/chapter8/e2fsprogs.sh b/chapter8/e2fsprogs.sh
index fff8359..d789152 100644
--- a/chapter8/e2fsprogs.sh
+++ b/chapter8/e2fsprogs.sh
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#!/bin/bash
set -e
@@ -24,3 +25,32 @@ 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
+=======
+#!/bin/bash
+set -e
+
+mkdir -v build
+cd build || exit 1
+
+../configure --prefix=/usr \
+ --bindir=/bin \
+ --with-root-prefix="" \
+ --sysconfdir=/etc \
+ --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
+>>>>>>> 6132c19762b7d74ba7ad06e291b6401c632bbc28
diff --git a/chapter8/iproute2.sh b/chapter8/iproute2.sh
index cb8dd77..edd989d 100644
--- a/chapter8/iproute2.sh
+++ b/chapter8/iproute2.sh
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#!/bin/bash
set -e
@@ -9,3 +10,18 @@ sed -i 's/.m_ipt.o//' tc/Makefile &&
make &&
make DOCDIR=/usr/share/doc/iproute2-"${VERSION}" -j1 install
+=======
+#!/bin/bash
+set -e
+
+sed -i /ARPD/d Makefile &&
+rm -fv man/man8/arpd.8 &&
+
+sed -i 's/.m_ipt.o//' tc/Makefile &&
+
+make &&
+
+make -j1 install
+mkdir -v /usr/share/doc/iproute2-"${VERSION}"
+cp -v COPYING README* /usr/share/doc/iproute2-"${VERSION}"
+>>>>>>> 6132c19762b7d74ba7ad06e291b6401c632bbc28
diff --git a/chapter8/ncurses.sh b/chapter8/ncurses.sh
index c2640c5..9d3ebbc 100644
--- a/chapter8/ncurses.sh
+++ b/chapter8/ncurses.sh
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#!/bin/bash
set -e
@@ -30,3 +31,35 @@ rm -fv /usr/lib/libncurses++w.a &&
mkdir -v /usr/share/doc/ncurses-"${VERSION}" &&
cp -v -R doc/* /usr/share/doc/ncurses-"${VERSION}"
+=======
+#!/bin/bash
+set -e
+
+./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}"
+>>>>>>> 6132c19762b7d74ba7ad06e291b6401c632bbc28
diff --git a/chapter8/python.sh b/chapter8/python.sh
index 230d4f6..fd7b1a6 100644
--- a/chapter8/python.sh
+++ b/chapter8/python.sh
@@ -1,3 +1,4 @@
+<<<<<<< HEAD
#!/bin/bash
set -e
@@ -20,3 +21,26 @@ tar --strip-components=1 \
--no-same-permissions \
-C /usr/share/doc/python-"${VERSION}"/html \
-xvf ../python-"${VERSION}"-docs-html.tar.bz2
+=======
+#!/bin/bash
+set -e
+
+./configure --prefix=/usr \
+ --enable-shared \
+ --with-system-expat \
+ --with-system-ffi \
+ --with-ensurepip=yes \
+ --enable-optimizations &&
+
+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
+>>>>>>> 6132c19762b7d74ba7ad06e291b6401c632bbc28