9.1 #1

Merged
cromer merged 46 commits from 9.1 into master 2020-06-02 00:45:19 -04:00
9 changed files with 161 additions and 197 deletions
Showing only changes of commit 4e4480632c - Show all commits

View File

@ -16,7 +16,7 @@
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
OVERVIEW: OVERVIEW:
This build tracks linux from scratch version 8.4 This build tracks linux from scratch version 9.1
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
REQUIREMENTS: REQUIREMENTS:
1. git installed on the host 1. git installed on the host
@ -38,8 +38,7 @@ WARNING:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
GENERAL NOTES: GENERAL NOTES:
This system was designed and debugged on an AMD64 {x86_64} system This system was designed and debugged on an AMD64 {x86_64} system
and I have not tested it on a i686 system as I no longer have or and does not support i686.
use such systems.
The build system installs/work directory: The build system installs/work directory:
/mnt/lfs/usr/src/LFS-RPM /mnt/lfs/usr/src/LFS-RPM
@ -48,8 +47,8 @@ GENERAL NOTES:
creates an initrd so cpu updates and firmware is loaded. creates an initrd so cpu updates and firmware is loaded.
Your lfs kernel should be configured to use this. Your lfs kernel should be configured to use this.
This build has Microcode updates for AMD CPUs. This build has linux-firmware to provide firmware for various
To use it make a link to the proper cpu family. hardware.
See BLFS book for more information. See BLFS book for more information.
I have installed rpm macro files in: I have installed rpm macro files in:
@ -62,11 +61,9 @@ ADDITIONS:
mkinitramfs # to create initrd mkinitramfs # to create initrd
popt # needed for rpm popt # needed for rpm
python2 # needed for rpm python2 # needed for rpm
rpm # package manager rpm # package manager
wget # needed to fetch packages wget # needed to fetch packages
firmware-radeon # firmware for radeon graphics linux-firmware # firmware for various hardware
firmware-realtek # firmware for realtek network
firmware-amd-ucode # microcode updates for AMD CPUs
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
BUILD PROCEDURE: BUILD PROCEDURE:
login as root user login as root user
@ -79,7 +76,7 @@ BUILD PROCEDURE:
cd /mnt/lfs/usr/src goto build directory cd /mnt/lfs/usr/src goto build directory
Now fetch the build system it will go into /mnt/lfs/usr/src/LFS-RPM by default Now fetch the build system it will go into /mnt/lfs/usr/src/LFS-RPM by default
git clone https://github.com/baho-utot/LFS-RPM.git git clone https://git.cromer.cl/cromer/LFS-RPM.git
cd LFS-RPM Lets do this cd LFS-RPM Lets do this
./setup.sh setup environment and fetches source tarballs ./setup.sh setup environment and fetches source tarballs
@ -94,21 +91,21 @@ This completes the build.
GRUB: GRUB:
GPT partitioned drive GPT partitioned drive
menuentry 'Linux From Scratch (8.4) (on /dev/sdxx)' { menuentry 'Linux From Scratch (9.1) (on /dev/sdxx)' {
insmod part_gpt insmod part_gpt
insmod ext2 insmod ext2
set root='hdx,gptx' set root='hdx,gptx'
linux /boot/vmlinuz-4.20.12 root=/dev/sdxx linux /boot/vmlinuz-5.5.3 root=/dev/sdxx
initrd /boot/initrd.img-4.20.12 initrd /boot/initrd.img-5.5.3
} }
MSDOS/BIOS partitioned drive MSDOS/BIOS partitioned drive
menuentry 'Linux From Scratch (8.4) (on /dev/sdxx)' { menuentry 'Linux From Scratch (9.1) (on /dev/sdxx)' {
insmod part_msdos insmod part_msdos
insmod ext2 insmod ext2
set root='hdx,msdosx' set root='hdx,msdosx'
linux /boot/vmlinuz-4.20.12 root=/dev/sdxx linux /boot/vmlinuz-5.5.3 root=/dev/sdxx
initrd /boot/initrd.img-4.20.12 initrd /boot/initrd.img-5.5.3
} }
Change the x's to the proper drives and partition Change the x's to the proper drives and partition
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -119,10 +116,10 @@ INSTALLER SCRIPT:
partition mounted by YOU. partition mounted by YOU.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
SCRIPTS: SCRIPTS:
base.sh* builds chapter 6 base.sh* builds chapter 6
cleanup.sh* cleanup host system after build cleanup.sh* cleanup host system after build
installer.sh* install rpm binaries to mounted partition installer.sh* install rpm binaries to mounted partition
lfs.sh* builds the whole thing lfs.sh* builds the whole thing
setup.sh* configure for build setup.sh* configure for build
tools.sh* builds chapter 5 tools.sh* builds chapter 5
version-check.sh* checks host system for requirements version-check.sh* checks host system for requirements

View File

@ -8,18 +8,18 @@
# filesystem # filesystem
%_sysconfdir /etc %_sysconfdir /etc
%_prefix /usr %_prefix /usr
%_lib /lib %_lib /lib
%_lib64 /lib64 %_lib64 /lib64
%_libdir %{_prefix}/lib %_libdir %{_prefix}/lib
%_libdir64 %{_prefix}/lib64 %_libdir64 %{_prefix}/lib64
%_docdir %{_prefix}/share/doc %_docdir %{_prefix}/share/doc
%_var /var %_var /var
%_localstatedir %{_var} %_localstatedir %{_var}
%_sharedstatedir %{_var}/lib %_sharedstatedir %{_var}/lib
# rpm # rpm
%_topdir /usr/src/LFS-RPM %_topdir /usr/src/LFS-RPM
%_tmppath %{_var}/tmp %_tmppath %{_var}/tmp
%_dbpath %{_var}/lib/rpm %_dbpath %{_var}/lib/rpm
%_unique_build_ids 0 %_unique_build_ids 0
%_build_id_links none %_build_id_links none

219
base.sh
View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Title: ch6.sh # Title: ch6.sh
# Date: 2020-05-30 # Date: 2020-05-31
# Version: 1.0 # Version: 2.0
# Author: chris@cromer.cl # Author: chris@cromer.cl
# Options: # Options:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -22,23 +22,21 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dedicated to Elizabeth my cat of 20 years, Euthanasia on 2019-05-16
#-----------------------------------------------------------------------------
set -o errexit # exit if error...insurance ;) set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized set -o nounset # exit if variable not initalized
set +h # disable hashall set +h # disable hashall
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Master variables # Master variables
PRGNAME=${0##*/} # script name minus the path PRGNAME=${0##*/} # script name minus the path
TOPDIR=${PWD} # parent directory TOPDIR=${PWD} # parent directory
PARENT=/usr/src/LFS-RPM # rpm build directory PARENT=/usr/src/LFS-RPM # rpm build directory
LOGS=LOGS # build logs directory LOGS=LOGS # build logs directory
INFOS=INFO # rpm info log directory INFOS=INFO # rpm info log directory
SPECS=SPECS # rpm spec file directory SPECS=SPECS # rpm spec file directory
PROVIDES=PROVIDES # rpm provides log directory PROVIDES=PROVIDES # rpm provides log directory
REQUIRES=REQUIRES # rpm requires log directory REQUIRES=REQUIRES # rpm requires log directory
RPMS=RPMS # rpm binary package directory RPMS=RPMS # rpm binary package directory
LOGPATH=${TOPDIR}/LOGS # path to log directory LOGPATH=${TOPDIR}/LOGS # path to log directory
LC_ALL=POSIX LC_ALL=POSIX
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
export LC_ALL PATH export LC_ALL PATH
@ -109,7 +107,7 @@ function _build {
rpmbuild -ba ${RPM_SPEC} >> ${_log} 2>&1 && msg_success || msg_failure rpmbuild -ba ${RPM_SPEC} >> ${_log} 2>&1 && msg_success || msg_failure
_status _status
[ "F" == ${RPM_EXISTS} ] && die "ERROR: Binary Missing: ${RPM_BINARY}" [ "F" == ${RPM_EXISTS} ] && die "ERROR: Binary Missing: ${RPM_BINARY}"
rpm -qilp ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${INFOS}/${RPM_NAME} 2>&1 || true rpm -qilp ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${INFOS}/${RPM_NAME} 2>&1 || true
rpm -qp --provides ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${PROVIDES}/${RPM_NAME} 2>&1 || true rpm -qp --provides ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${PROVIDES}/${RPM_NAME} 2>&1 || true
rpm -qp --requires ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${REQUIRES}/${RPM_NAME} 2>&1 || true rpm -qp --requires ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${REQUIRES}/${RPM_NAME} 2>&1 || true
return return
@ -197,16 +195,13 @@ function _symlinks {
ln -vsf /tools/bin/{env,install,perl,printf} /usr/bin >> "${_log}" 2>&1 ln -vsf /tools/bin/{env,install,perl,printf} /usr/bin >> "${_log}" 2>&1
ln -vsf /tools/lib/libgcc_s.so{,.1} /usr/lib >> "${_log}" 2>&1 ln -vsf /tools/lib/libgcc_s.so{,.1} /usr/lib >> "${_log}" 2>&1
ln -vsf /tools/lib/libstdc++.{a,so{,.6}} /usr/lib >> "${_log}" 2>&1 ln -vsf /tools/lib/libstdc++.{a,so{,.6}} /usr/lib >> "${_log}" 2>&1
install -vdm755 /usr/lib/pkgconfig >> "${_log}" 2>&1
ln -vsf bash /bin/sh >> "${_log}" 2>&1 ln -vsf bash /bin/sh >> "${_log}" 2>&1
msg_success msg_success
return return
} }
function _glibc { function _glibc {
ln -sf /tools/lib/gcc /usr/lib
ln -sf ../lib/ld-linux-x86-64.so.2 /lib64 ln -sf ../lib/ld-linux-x86-64.so.2 /lib64
ln -sf ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3 ln -sf ../lib/ld-linux-x86-64.so.2 /lib64/ld-lsb-x86-64.so.3
rm -f /usr/include/limits.h
_build _build
_install _install
/sbin/locale-gen /sbin/locale-gen
@ -255,13 +250,6 @@ function _adjust {
touch ${_log} touch ${_log}
return return
} }
function _bc {
ln -sf /tools/lib/libncursesw.so.6 /usr/lib/libncursesw.so.6
ln -sf libncursesw.so.6 /usr/lib/libncurses.so
_build
_install
return
}
function _gcc { function _gcc {
_build _build
_install _install
@ -321,92 +309,93 @@ function _gcc {
[ -e "${PROVIDES}" ] || install -vdm 755 "${PROVIDES}" [ -e "${PROVIDES}" ] || install -vdm 755 "${PROVIDES}"
[ -e "${REQUIRES}" ] || install -vdm 755 "${REQUIRES}" [ -e "${REQUIRES}" ] || install -vdm 755 "${REQUIRES}"
[ -e "${RPMS}" ] || install -vdm 755 "${RPMS}" [ -e "${RPMS}" ] || install -vdm 755 "${RPMS}"
LIST+="filesystem " # 6.5. Creating Directories LIST+="filesystem " # Creating Directories
LIST+="symlinks " # 6.6. Creating Essential Files and Symlinks LIST+="symlinks " # Creating Essential Files and Symlinks
LIST+="linux-api-headers " # 6.7. Linux-4.20.12 API Headers LIST+="linux-api-headers " # Linux-5.5.3 API Headers
LIST+="man-pages " # 6.8. Man-pages-4.16 LIST+="man-pages " # Man-pages-5.05
LIST+="glibc " # 6.9. Glibc-2.29 LIST+="glibc " # Glibc-2.31
LIST+="tzdata " # 6.9.2.2. Adding time zone data LIST+="tzdata " # Adding time zone data
LIST+="adjust " # 6.10. Adjusting the Toolchain LIST+="adjust " # Adjusting the Toolchain
LIST+="zlib " # 6.11. Zlib-1.2.11 LIST+="zlib " # Zlib-1.2.11
LIST+="file " # 6.12. File-5.36 LIST+="bzip2 " # Bzip2-1.0.8
LIST+="readline " # 6.13. Readline-8.0 LIST+="xz " # Xz-5.2.4
LIST+="m4 " # 6.14. M4-1.4.18 LIST+="file " # File-5.38
LIST+="bc " # 6.15. Bc-1.07.1 LIST+="readline " # Readline-8.0
LIST+="binutils " # 6.16. Binutils-2.32 LIST+="m4 " # M4-1.4.18
LIST+="gmp " # 6.17. GMP-6.1.2 LIST+="bc " # Bc-2.5.3
LIST+="mpfr " # 6.18. MPFR-4.0.2 LIST+="binutils " # Binutils-2.34
LIST+="mpc " # 6.19. MPC-1.1.0 LIST+="gmp " # GMP-6.2.0
LIST+="shadow " # 6.20. Shadow-4.6 LIST+="mpfr " # MPFR-4.0.2
LIST+="gcc " # 6.21. GCC-8.2.0 LIST+="mpc " # MPC-1.1.0
LIST+="bzip2 " # 6.22. Bzip2-1.0.6 LIST+="attr " # Attr-2.4.48
LIST+="pkg-config " # 6.23. Pkg-config-0.29.2 LIST+="acl " # Acl-2.2.53
LIST+="ncurses " # 6.24. Ncurses-6.1 LIST+="shadow " # Shadow-4.8.1
LIST+="attr " # 6.25. Attr-2.4.48 LIST+="gcc " # GCC-9.2.0
LIST+="acl " # 6.26. Acl-2.2.53 LIST+="pkg-config " # Pkg-config-0.29.2
LIST+="libcap " # 6.27. Libcap-2.26 LIST+="ncurses " # Ncurses-6.2
LIST+="sed " # 6.28. Sed-4.7 LIST+="libcap " # Libcap-2.31
LIST+="psmisc " # 6.29. Psmisc-23.2 LIST+="sed " # Sed-4.8
LIST+="iana-etc " # 6.30. Iana-Etc-2.30 LIST+="psmisc " # Psmisc-23.2
LIST+="bison " # 6.31. Bison-3.3.2 LIST+="iana-etc " # Iana-Etc-2.30
LIST+="flex " # 6.32. Flex-2.6.4 LIST+="bison " # Bison-3.5.2
LIST+="grep " # 6.33. Grep-3.3 LIST+="flex " # Flex-2.6.4
LIST+="bash " # 6.34. Bash-5.0 LIST+="grep " # Grep-3.4
LIST+="libtool " # 6.35. Libtool-2.4.6 LIST+="bash " # Bash-5.0
LIST+="gdbm " # 6.36. GDBM-1.18.1 LIST+="libtool " # Libtool-2.4.6
LIST+="gperf " # 6.37. Gperf-3.1 LIST+="gdbm " # GDBM-1.18.1
LIST+="expat " # 6.38. Expat-2.2.6 LIST+="gperf " # Gperf-3.1
LIST+="inetutils " # 6.39. Inetutils-1.9.4 LIST+="expat " # Expat-2.2.9
LIST+="perl " # 6.40. Perl-5.28.1 LIST+="inetutils " # Inetutils-1.9.4
LIST+="XML-Parser " # 6.41. XML::Parser-2.44 LIST+="perl " # Perl-5.30.1
LIST+="intltool " # 6.42. Intltool-0.51.0 LIST+="XML-Parser " # XML::Parser-2.46
LIST+="autoconf " # 6.43. Autoconf-2.69 LIST+="intltool " # Intltool-0.51.0
LIST+="automake " # 6.44. Automake-1.16.1 LIST+="autoconf " # Autoconf-2.69
LIST+="xz " # 6.45. Xz-5.2.4 LIST+="automake " # Automake-1.16.1
LIST+="kmod " # 6.46. Kmod-26 LIST+="kmod " # Kmod-26
LIST+="gettext " # 6.47. Gettext-0.19.8.1 LIST+="gettext " # Gettext-0.20.1
LIST+="libelf " # 6.48. Libelf from Elfutils-0.176 LIST+="libelf " # Libelf from Elfutils-0.178
LIST+="libffi " # 6.49. Libffi-3.2.1 LIST+="libffi " # Libffi-3.3
LIST+="openssl " # 6.50. OpenSSL-1.1.1a LIST+="openssl " # OpenSSL-1.1.1d
LIST+="python3 " # 6.51. Python-3.7.2 LIST+="python3 " # Python-3.8.1
LIST+="ninja " # 6.52. Ninja-1.9.0 LIST+="ninja " # Ninja-1.10.0
LIST+="meson " # 6.53. Meson-0.49.2 LIST+="meson " # Meson-0.53.1
LIST+="coreutils " # 6.54. Coreutils-8.30 LIST+="coreutils " # Coreutils-8.31
LIST+="check " # 6.55. Check-0.12.0 LIST+="check " # Check-0.14.0
LIST+="diffutils " # 6.56. Diffutils-3.7 LIST+="diffutils " # Diffutils-3.7
LIST+="gawk " # 6.57. Gawk-4.2.1 LIST+="gawk " # Gawk-5.0.1
LIST+="findutils " # 6.58. Findutils-4.6.0 LIST+="findutils " # Findutils-4.7.0
LIST+="groff " # 6.59. Groff-1.22.4 LIST+="groff " # Groff-1.22.4
LIST+="grub " # 6.60. GRUB-2.02 LIST+="grub " # GRUB-2.04
LIST+="less " # 6.61. Less-530 LIST+="less " # Less-551
LIST+="gzip " # 6.62. Gzip-1.10 LIST+="gzip " # Gzip-1.10
LIST+="iproute2 " # 6.63. IPRoute2-4.20.0 LIST+="zstd " # Zstd-1.4.4
LIST+="kbd " # 6.64. Kbd-2.0.4 LIST+="iproute2 " # IPRoute2-5.5.0
LIST+="libpipeline " # 6.65. Libpipeline-1.5.1 LIST+="kbd " # Kbd-2.2.0
LIST+="make " # 6.66. Make-4.2.1 LIST+="libpipeline " # Libpipeline-1.5.2
LIST+="patch " # 6.67. Patch-2.7.6 LIST+="make " # Make-4.3
LIST+="man-db " # 6.68. Man-DB-2.8.5 LIST+="patch " # Patch-2.7.6
LIST+="tar " # 6.69. Tar-1.31 LIST+="man-db " # Man-DB-2.9.0
LIST+="texinfo " # 6.70. Texinfo-6.5 LIST+="tar " # Tar-1.32
LIST+="vim " # 6.71. Vim-8.1 LIST+="texinfo " # Texinfo-6.7
LIST+="procps-ng " # 6.72. Procps-ng-3.3.15 LIST+="vim " # Vim-8.2.0190
LIST+="util-linux " # 6.73. Util-linux-2.33.1 LIST+="procps-ng " # Procps-ng-3.3.15
LIST+="e2fsprogs " # 6.74. E2fsprogs-1.44.5 LIST+="util-linux " # Util-linux-2.35.1
LIST+="sysklogd " # 6.75. Sysklogd-1.5.1 LIST+="e2fsprogs " # E2fsprogs-1.45.5
LIST+="sysvinit " # 6.76. Sysvinit-2.93 LIST+="sysklogd " # Sysklogd-1.5.1
LIST+="eudev " # 6.77. Eudev-3.2.7 LIST+="sysvinit " # Sysvinit-2.96
LIST+="eudev " # Eudev-3.2.9
# Chapter 7 # Chapter 7
LIST+="lfs-bootscripts " # lfs-bootscripts LIST+="lfs-bootscripts " # lfs-bootscripts
LIST+="cpio " # cpio LIST+="cpio " # cpio
LIST+="mkinitramfs " # mkinitramfs LIST+="mkinitramfs " # mkinitramfs
LIST+="linux " # 8.3. Linux-4.20.12 LIST+="linux " # Linux-5.5.3
# ADDONS # ADDONS
LIST+="popt " # popt LIST+="popt " # popt
LIST+="rpm " # rpm LIST+="rpm " # rpm
LIST+="wget " # wget LIST+="wget " # wget
LIST+="linux-firmware " # linux-firmware LIST+="linux-firmware " # linux-firmware
LIST+="python2 " # python2 LIST+="python2 " # python2
LIST+="base " # lfs base packages meta package LIST+="base " # lfs base packages meta package
for i in ${LIST};do for i in ${LIST};do
case ${i} in case ${i} in
symlinks) _log="${LOGS}/symlinks" symlinks) _log="${LOGS}/symlinks"
@ -430,13 +419,6 @@ for i in ${LIST};do
_adjust _adjust
fi fi
;; ;;
bc) _params "${SPECS}/${i}.spec"
if [ "T" = "${RPM_EXISTS}" ]; then
msg "Skipping: ${i}"
else
_bc
fi
;;
gcc) _params "${SPECS}/${i}.spec" gcc) _params "${SPECS}/${i}.spec"
if [ "T" = "${RPM_EXISTS}" ]; then if [ "T" = "${RPM_EXISTS}" ]; then
msg "Skipping: ${i}" msg "Skipping: ${i}"
@ -444,17 +426,6 @@ for i in ${LIST};do
_gcc _gcc
fi fi
;; ;;
util-linux) _params "${SPECS}/${i}.spec"
if [ "T" = "${RPM_EXISTS}" ]; then
msg "Skipping: ${i}"
else
[ -e /usr/include/blkid ] && rm -rf /usr/include/blkid
[ -e /usr/include/libmount ] && rm -rf /usr/include/libmount
[ -e /usr/include/uuid ] && rm -rf /usr/include/uuid
_build
_install
fi
;;
*) _params "${SPECS}/${i}.spec" *) _params "${SPECS}/${i}.spec"
if [ "T" = "${RPM_EXISTS}" ]; then if [ "T" = "${RPM_EXISTS}" ]; then
msg "Skipping: ${i}" msg "Skipping: ${i}"

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Title: cleanup.sh # Title: cleanup.sh
# Date: 2019-05-22 # Date: 2020-05-31
# Version: 1.0 # Version: 2.0
# Author: baho-utot@columbus.rr.com # Author: chris@cromer.cl
# Options: # Options:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Copyright 2020 Chris Cromer
# Copyright 2019 Baho Utot # Copyright 2019 Baho Utot
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -21,8 +22,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dedicated to Elizabeth my cat of 20 years, Euthanasia on 2019-05-16
#-----------------------------------------------------------------------------
# This script removes changes made to the host system and # This script removes changes made to the host system and
# also removes the build tool chain chapter 5 packages as they are no # also removes the build tool chain chapter 5 packages as they are no
# longer needed. It will also unmount the /mnt/lfs filesystem # longer needed. It will also unmount the /mnt/lfs filesystem
@ -31,11 +30,11 @@ set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized set -o nounset # exit if variable not initalized
set +h # disable hashall set +h # disable hashall
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
PRGNAME=${0##*/} # script name minus the path PRGNAME=${0##*/} # script name minus the path
LFS=/mnt/lfs # build area LFS=/mnt/lfs # build area
TOOLCHAIN="${LFS}/tools" # tool chain directory TOOLCHAIN="${LFS}/tools" # tool chain directory
LINK=/tools # tool chain symlink LINK=/tools # tool chain symlink
USER=lfs # build user USER=lfs # build user
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
function die() { function die() {
local _red="\\033[1;31m" local _red="\\033[1;31m"

2
cromer-todo Normal file
View File

@ -0,0 +1,2 @@
add zstd spec
add missing perl home dir package needed for groff package dependency

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Title: installer.sh # Title: installer.sh
# Date: 2019-05-22 # Date: 2020-05-31
# Version: 1.0 # Version: 2.0
# Author: baho-utot@columbus.rr.com # Author: chris@cromer.cl
# Options: # Options:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Copyright 2020 Chris Cromer
# Copyright 2019 Baho Utot # Copyright 2019 Baho Utot
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -24,18 +25,16 @@
# This script installs LFS base rpms to a partition mounted at /mnt # This script installs LFS base rpms to a partition mounted at /mnt
# the partition should be a new/clean partition as it will be overwritten # the partition should be a new/clean partition as it will be overwritten
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dedicated to Elizabeth my cat of 20 years, Euthanasia on 2019-05-16
#-----------------------------------------------------------------------------
set -o errexit # exit if error...insurance ;) set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized set -o nounset # exit if variable not initalized
set +h # disable hashall set +h # disable hashall
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
PRGNAME=${0##*/} # script name minus the path PRGNAME=${0##*/} # script name minus the path
REPOPATH="RPMS/x86_64" # path to the binary rpms REPOPATH="RPMS/x86_64" # path to the binary rpms
ROOTPATH="/mnt" # path to install filesystem ROOTPATH="/mnt" # path to install filesystem
BASE="SPECS/base.spec" # filespec SPECS/base.spec BASE="SPECS/base.spec" # filespec SPECS/base.spec
DBPATH="/var/lib/rpm" # path to the rpm database rel to ROOTPATH DBPATH="/var/lib/rpm" # path to the rpm database rel to ROOTPATH
LIST="" # list of packages to install LIST="" # list of packages to install
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
function _die() { function _die() {
local _red="\\033[1;31m" local _red="\\033[1;31m"
@ -120,9 +119,9 @@ cat > ${ROOTPATH}/tmp/script.sh <<- EOF
done done
popd popd
pushd /boot pushd /boot
/usr/bin/touch initrd.img-4.20.12 /usr/bin/touch initrd.img-5.5.3
/bin/rm initrd.img-4.20.12 /bin/rm initrd.img-5.5.3
/sbin/mkinitramfs 4.20.12 /sbin/mkinitramfs 5.5.3
/usr/bin/vim /etc/sysconfig/clock /usr/bin/vim /etc/sysconfig/clock
/usr/bin/vim /etc/passwd /usr/bin/vim /etc/passwd
/usr/bin/vim /etc/hosts /usr/bin/vim /etc/hosts

11
lfs.sh
View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Title: lfs.sh # Title: lfs.sh
# Date: 2019-05-22 # Date: 2020-05-31
# Version: 1.0 # Version: 2.0
# Author: baho-utot@columbus.rr.com # Author: chris@cromer.cl
# Options: # Options:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Copyright 2020 Chris Cromer
# Copyright 2019 Baho Utot # Copyright 2019 Baho Utot
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -21,8 +22,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dedicated to Elizabeth my cat of 20 years, Euthanasia on 2019-05-16
#-----------------------------------------------------------------------------
set -o errexit # exit if error...insurance ;) set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized set -o nounset # exit if variable not initalized
set +h # disable hashall set +h # disable hashall
@ -31,7 +30,7 @@ set +h # disable hashall
PRGNAME=${0##*/} # script name minus the path PRGNAME=${0##*/} # script name minus the path
TOPDIR=${PWD} # parent directory TOPDIR=${PWD} # parent directory
PARENT=/usr/src/LFS-RPM # rpm build directory PARENT=/usr/src/LFS-RPM # rpm build directory
USER=lfs # build user USER=lfs # build user
LFS=/mnt/lfs # build area LFS=/mnt/lfs # build area
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Common support functions # Common support functions

View File

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Title: setup.sh # Title: setup.sh
# Date: 2020-05-30 # Date: 2020-05-31
# Version: 1.2 # Version: 2.0
# Author: chris@cromer.cl # Author: chris@cromer.cl
# Options: # Options:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
@ -22,8 +22,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dedicated to Elizabeth my cat of 20 years, Euthanasia on 2019-05-16
#-----------------------------------------------------------------------------
set -o errexit # exit if error...insurance ;) set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized set -o nounset # exit if variable not initalized
set +h # disable hashall set +h # disable hashall
@ -114,7 +112,7 @@ function _chapter_3 {
cp -ar ${TOPDIR}/SOURCES ${LFS}${PARENT} cp -ar ${TOPDIR}/SOURCES ${LFS}${PARENT}
cp -ar ${TOPDIR}/SPECS ${LFS}${PARENT} cp -ar ${TOPDIR}/SPECS ${LFS}${PARENT}
cp -a ${TOPDIR}/README ${LFS}${PARENT} cp -a ${TOPDIR}/README ${LFS}${PARENT}
cp -a ${TOPDIR}/*.sh ${LFS}${PARENT} cp -a ${TOPDIR}/*.sh ${LFS}${PARENT}
chmod +x ${LFS}${PARENT}/*.sh chmod +x ${LFS}${PARENT}/*.sh
msg_success msg_success
fi fi
@ -123,10 +121,10 @@ function _chapter_3 {
list+="${i} " list+="${i} "
done < "${TOPDIR}/BOOK/wget-list" done < "${TOPDIR}/BOOK/wget-list"
list+="ftp://anduin.linuxfromscratch.org/BLFS/popt/popt-1.16.tar.gz " list+="ftp://anduin.linuxfromscratch.org/BLFS/popt/popt-1.16.tar.gz "
list+="http://ftp.rpm.org/releases/rpm-4.14.x/rpm-4.14.2.1.tar.bz2 " list+="http://ftp.rpm.org/releases/rpm-4.15.x/rpm-4.15.1.tar.bz2 "
list+="https://ftp.osuosl.org/pub/blfs/conglomeration/db/db-6.0.20.tar.gz " list+="https://download.oracle.com/berkeley-db/db-5.3.28.tar.gz "
list+="https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2 " list+="https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2 "
list+="https://ftp.gnu.org/gnu/wget/wget-1.20.1.tar.gz " list+="https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz "
for i in ${list}; do for i in ${list}; do
msg_line " Fetching: ${i}: " msg_line " Fetching: ${i}: "
wget --quiet --no-clobber --no-check-certificate --continue --directory-prefix=${LFS}${PARENT}/SOURCES ${i} || die "${PRGNAME}: Error: ${i}: Fetching tarball" wget --quiet --no-clobber --no-check-certificate --continue --directory-prefix=${LFS}${PARENT}/SOURCES ${i} || die "${PRGNAME}: Error: ${i}: Fetching tarball"

View File

@ -1,11 +1,12 @@
#!/bin/bash #!/bin/bash
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Title: tools.sh # Title: tools.sh
# Date: 2019-02-16 # Date: 2020-05-31
# Version: 1.1 # Version: 2.0
# Author: baho-utot@columbus.rr.com # Author: chris@cromer.cl
# Options: # Options:
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Copyright 2020 Chris Cromer
# Copyright 2019 Baho Utot # Copyright 2019 Baho Utot
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# This program is free software: you can redistribute it and/or modify # This program is free software: you can redistribute it and/or modify
@ -21,8 +22,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>. # along with this program. If not, see <https://www.gnu.org/licenses/>.
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Dedicated to Elizabeth my cat of 20 years, Euthanasia on 2019-05-16
#-----------------------------------------------------------------------------
set -o errexit # exit if error...insurance ;) set -o errexit # exit if error...insurance ;)
set -o nounset # exit if variable not initalized set -o nounset # exit if variable not initalized
set +h # disable hashall set +h # disable hashall
@ -31,7 +30,7 @@ set +h # disable hashall
PRGNAME=${0##*/} # script name minus the path PRGNAME=${0##*/} # script name minus the path
TOPDIR=${PWD} # this directory TOPDIR=${PWD} # this directory
PARENT=/usr/src/LFS-RPM # build system master directory PARENT=/usr/src/LFS-RPM # build system master directory
MKFLAGS="-j 1" # Number of cpu to use in building pkgs default = 1 MKFLAGS="-j 1" # Number of cpu to use in building pkgs default = 1
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Common support functions # Common support functions
function die { function die {