9.1 #1
@ -16,7 +16,7 @@
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
#-----------------------------------------------------------------------------
|
||||
OVERVIEW:
|
||||
This build tracks linux from scratch version 8.4
|
||||
This build tracks linux from scratch version 9.1
|
||||
#-----------------------------------------------------------------------------
|
||||
REQUIREMENTS:
|
||||
1. git installed on the host
|
||||
@ -38,8 +38,7 @@ WARNING:
|
||||
#-----------------------------------------------------------------------------
|
||||
GENERAL NOTES:
|
||||
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
|
||||
use such systems.
|
||||
and does not support i686.
|
||||
|
||||
The build system installs/work directory:
|
||||
/mnt/lfs/usr/src/LFS-RPM
|
||||
@ -48,8 +47,8 @@ GENERAL NOTES:
|
||||
creates an initrd so cpu updates and firmware is loaded.
|
||||
Your lfs kernel should be configured to use this.
|
||||
|
||||
This build has Microcode updates for AMD CPUs.
|
||||
To use it make a link to the proper cpu family.
|
||||
This build has linux-firmware to provide firmware for various
|
||||
hardware.
|
||||
See BLFS book for more information.
|
||||
|
||||
I have installed rpm macro files in:
|
||||
@ -62,11 +61,9 @@ ADDITIONS:
|
||||
mkinitramfs # to create initrd
|
||||
popt # needed for rpm
|
||||
python2 # needed for rpm
|
||||
rpm # package manager
|
||||
rpm # package manager
|
||||
wget # needed to fetch packages
|
||||
firmware-radeon # firmware for radeon graphics
|
||||
firmware-realtek # firmware for realtek network
|
||||
firmware-amd-ucode # microcode updates for AMD CPUs
|
||||
linux-firmware # firmware for various hardware
|
||||
#-----------------------------------------------------------------------------
|
||||
BUILD PROCEDURE:
|
||||
login as root user
|
||||
@ -79,7 +76,7 @@ BUILD PROCEDURE:
|
||||
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
|
||||
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
|
||||
./setup.sh setup environment and fetches source tarballs
|
||||
@ -94,21 +91,21 @@ This completes the build.
|
||||
GRUB:
|
||||
|
||||
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 ext2
|
||||
set root='hdx,gptx'
|
||||
linux /boot/vmlinuz-4.20.12 root=/dev/sdxx
|
||||
initrd /boot/initrd.img-4.20.12
|
||||
linux /boot/vmlinuz-5.5.3 root=/dev/sdxx
|
||||
initrd /boot/initrd.img-5.5.3
|
||||
}
|
||||
|
||||
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 ext2
|
||||
set root='hdx,msdosx'
|
||||
linux /boot/vmlinuz-4.20.12 root=/dev/sdxx
|
||||
initrd /boot/initrd.img-4.20.12
|
||||
linux /boot/vmlinuz-5.5.3 root=/dev/sdxx
|
||||
initrd /boot/initrd.img-5.5.3
|
||||
}
|
||||
Change the x's to the proper drives and partition
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -119,10 +116,10 @@ INSTALLER SCRIPT:
|
||||
partition mounted by YOU.
|
||||
#-----------------------------------------------------------------------------
|
||||
SCRIPTS:
|
||||
base.sh* builds chapter 6
|
||||
cleanup.sh* cleanup host system after build
|
||||
base.sh* builds chapter 6
|
||||
cleanup.sh* cleanup host system after build
|
||||
installer.sh* install rpm binaries to mounted partition
|
||||
lfs.sh* builds the whole thing
|
||||
setup.sh* configure for build
|
||||
tools.sh* builds chapter 5
|
||||
lfs.sh* builds the whole thing
|
||||
setup.sh* configure for build
|
||||
tools.sh* builds chapter 5
|
||||
version-check.sh* checks host system for requirements
|
@ -8,18 +8,18 @@
|
||||
|
||||
# filesystem
|
||||
%_sysconfdir /etc
|
||||
%_prefix /usr
|
||||
%_lib /lib
|
||||
%_lib64 /lib64
|
||||
%_libdir %{_prefix}/lib
|
||||
%_libdir64 %{_prefix}/lib64
|
||||
%_docdir %{_prefix}/share/doc
|
||||
%_var /var
|
||||
%_localstatedir %{_var}
|
||||
%_sharedstatedir %{_var}/lib
|
||||
%_prefix /usr
|
||||
%_lib /lib
|
||||
%_lib64 /lib64
|
||||
%_libdir %{_prefix}/lib
|
||||
%_libdir64 %{_prefix}/lib64
|
||||
%_docdir %{_prefix}/share/doc
|
||||
%_var /var
|
||||
%_localstatedir %{_var}
|
||||
%_sharedstatedir %{_var}/lib
|
||||
# rpm
|
||||
%_topdir /usr/src/LFS-RPM
|
||||
%_tmppath %{_var}/tmp
|
||||
%_dbpath %{_var}/lib/rpm
|
||||
%_topdir /usr/src/LFS-RPM
|
||||
%_tmppath %{_var}/tmp
|
||||
%_dbpath %{_var}/lib/rpm
|
||||
%_unique_build_ids 0
|
||||
%_build_id_links none
|
||||
|
219
base.sh
219
base.sh
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------
|
||||
# Title: ch6.sh
|
||||
# Date: 2020-05-30
|
||||
# Version: 1.0
|
||||
# Date: 2020-05-31
|
||||
# Version: 2.0
|
||||
# Author: chris@cromer.cl
|
||||
# Options:
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -22,23 +22,21 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# 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 nounset # exit if variable not initalized
|
||||
set +h # disable hashall
|
||||
#-----------------------------------------------------------------------------
|
||||
# Master variables
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
TOPDIR=${PWD} # parent directory
|
||||
PARENT=/usr/src/LFS-RPM # rpm build directory
|
||||
LOGS=LOGS # build logs directory
|
||||
INFOS=INFO # rpm info log directory
|
||||
SPECS=SPECS # rpm spec file directory
|
||||
PROVIDES=PROVIDES # rpm provides log directory
|
||||
REQUIRES=REQUIRES # rpm requires log directory
|
||||
RPMS=RPMS # rpm binary package directory
|
||||
LOGPATH=${TOPDIR}/LOGS # path to log directory
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
TOPDIR=${PWD} # parent directory
|
||||
PARENT=/usr/src/LFS-RPM # rpm build directory
|
||||
LOGS=LOGS # build logs directory
|
||||
INFOS=INFO # rpm info log directory
|
||||
SPECS=SPECS # rpm spec file directory
|
||||
PROVIDES=PROVIDES # rpm provides log directory
|
||||
REQUIRES=REQUIRES # rpm requires log directory
|
||||
RPMS=RPMS # rpm binary package directory
|
||||
LOGPATH=${TOPDIR}/LOGS # path to log directory
|
||||
LC_ALL=POSIX
|
||||
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin
|
||||
export LC_ALL PATH
|
||||
@ -109,7 +107,7 @@ function _build {
|
||||
rpmbuild -ba ${RPM_SPEC} >> ${_log} 2>&1 && msg_success || msg_failure
|
||||
_status
|
||||
[ "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 --requires ${RPMS}/${RPM_ARCH}/${RPM_BINARY} > ${REQUIRES}/${RPM_NAME} 2>&1 || true
|
||||
return
|
||||
@ -197,16 +195,13 @@ function _symlinks {
|
||||
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/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
|
||||
msg_success
|
||||
return
|
||||
}
|
||||
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/ld-lsb-x86-64.so.3
|
||||
rm -f /usr/include/limits.h
|
||||
_build
|
||||
_install
|
||||
/sbin/locale-gen
|
||||
@ -255,13 +250,6 @@ function _adjust {
|
||||
touch ${_log}
|
||||
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 {
|
||||
_build
|
||||
_install
|
||||
@ -321,92 +309,93 @@ function _gcc {
|
||||
[ -e "${PROVIDES}" ] || install -vdm 755 "${PROVIDES}"
|
||||
[ -e "${REQUIRES}" ] || install -vdm 755 "${REQUIRES}"
|
||||
[ -e "${RPMS}" ] || install -vdm 755 "${RPMS}"
|
||||
LIST+="filesystem " # 6.5. Creating Directories
|
||||
LIST+="symlinks " # 6.6. Creating Essential Files and Symlinks
|
||||
LIST+="linux-api-headers " # 6.7. Linux-4.20.12 API Headers
|
||||
LIST+="man-pages " # 6.8. Man-pages-4.16
|
||||
LIST+="glibc " # 6.9. Glibc-2.29
|
||||
LIST+="tzdata " # 6.9.2.2. Adding time zone data
|
||||
LIST+="adjust " # 6.10. Adjusting the Toolchain
|
||||
LIST+="zlib " # 6.11. Zlib-1.2.11
|
||||
LIST+="file " # 6.12. File-5.36
|
||||
LIST+="readline " # 6.13. Readline-8.0
|
||||
LIST+="m4 " # 6.14. M4-1.4.18
|
||||
LIST+="bc " # 6.15. Bc-1.07.1
|
||||
LIST+="binutils " # 6.16. Binutils-2.32
|
||||
LIST+="gmp " # 6.17. GMP-6.1.2
|
||||
LIST+="mpfr " # 6.18. MPFR-4.0.2
|
||||
LIST+="mpc " # 6.19. MPC-1.1.0
|
||||
LIST+="shadow " # 6.20. Shadow-4.6
|
||||
LIST+="gcc " # 6.21. GCC-8.2.0
|
||||
LIST+="bzip2 " # 6.22. Bzip2-1.0.6
|
||||
LIST+="pkg-config " # 6.23. Pkg-config-0.29.2
|
||||
LIST+="ncurses " # 6.24. Ncurses-6.1
|
||||
LIST+="attr " # 6.25. Attr-2.4.48
|
||||
LIST+="acl " # 6.26. Acl-2.2.53
|
||||
LIST+="libcap " # 6.27. Libcap-2.26
|
||||
LIST+="sed " # 6.28. Sed-4.7
|
||||
LIST+="psmisc " # 6.29. Psmisc-23.2
|
||||
LIST+="iana-etc " # 6.30. Iana-Etc-2.30
|
||||
LIST+="bison " # 6.31. Bison-3.3.2
|
||||
LIST+="flex " # 6.32. Flex-2.6.4
|
||||
LIST+="grep " # 6.33. Grep-3.3
|
||||
LIST+="bash " # 6.34. Bash-5.0
|
||||
LIST+="libtool " # 6.35. Libtool-2.4.6
|
||||
LIST+="gdbm " # 6.36. GDBM-1.18.1
|
||||
LIST+="gperf " # 6.37. Gperf-3.1
|
||||
LIST+="expat " # 6.38. Expat-2.2.6
|
||||
LIST+="inetutils " # 6.39. Inetutils-1.9.4
|
||||
LIST+="perl " # 6.40. Perl-5.28.1
|
||||
LIST+="XML-Parser " # 6.41. XML::Parser-2.44
|
||||
LIST+="intltool " # 6.42. Intltool-0.51.0
|
||||
LIST+="autoconf " # 6.43. Autoconf-2.69
|
||||
LIST+="automake " # 6.44. Automake-1.16.1
|
||||
LIST+="xz " # 6.45. Xz-5.2.4
|
||||
LIST+="kmod " # 6.46. Kmod-26
|
||||
LIST+="gettext " # 6.47. Gettext-0.19.8.1
|
||||
LIST+="libelf " # 6.48. Libelf from Elfutils-0.176
|
||||
LIST+="libffi " # 6.49. Libffi-3.2.1
|
||||
LIST+="openssl " # 6.50. OpenSSL-1.1.1a
|
||||
LIST+="python3 " # 6.51. Python-3.7.2
|
||||
LIST+="ninja " # 6.52. Ninja-1.9.0
|
||||
LIST+="meson " # 6.53. Meson-0.49.2
|
||||
LIST+="coreutils " # 6.54. Coreutils-8.30
|
||||
LIST+="check " # 6.55. Check-0.12.0
|
||||
LIST+="diffutils " # 6.56. Diffutils-3.7
|
||||
LIST+="gawk " # 6.57. Gawk-4.2.1
|
||||
LIST+="findutils " # 6.58. Findutils-4.6.0
|
||||
LIST+="groff " # 6.59. Groff-1.22.4
|
||||
LIST+="grub " # 6.60. GRUB-2.02
|
||||
LIST+="less " # 6.61. Less-530
|
||||
LIST+="gzip " # 6.62. Gzip-1.10
|
||||
LIST+="iproute2 " # 6.63. IPRoute2-4.20.0
|
||||
LIST+="kbd " # 6.64. Kbd-2.0.4
|
||||
LIST+="libpipeline " # 6.65. Libpipeline-1.5.1
|
||||
LIST+="make " # 6.66. Make-4.2.1
|
||||
LIST+="patch " # 6.67. Patch-2.7.6
|
||||
LIST+="man-db " # 6.68. Man-DB-2.8.5
|
||||
LIST+="tar " # 6.69. Tar-1.31
|
||||
LIST+="texinfo " # 6.70. Texinfo-6.5
|
||||
LIST+="vim " # 6.71. Vim-8.1
|
||||
LIST+="procps-ng " # 6.72. Procps-ng-3.3.15
|
||||
LIST+="util-linux " # 6.73. Util-linux-2.33.1
|
||||
LIST+="e2fsprogs " # 6.74. E2fsprogs-1.44.5
|
||||
LIST+="sysklogd " # 6.75. Sysklogd-1.5.1
|
||||
LIST+="sysvinit " # 6.76. Sysvinit-2.93
|
||||
LIST+="eudev " # 6.77. Eudev-3.2.7
|
||||
LIST+="filesystem " # Creating Directories
|
||||
LIST+="symlinks " # Creating Essential Files and Symlinks
|
||||
LIST+="linux-api-headers " # Linux-5.5.3 API Headers
|
||||
LIST+="man-pages " # Man-pages-5.05
|
||||
LIST+="glibc " # Glibc-2.31
|
||||
LIST+="tzdata " # Adding time zone data
|
||||
LIST+="adjust " # Adjusting the Toolchain
|
||||
LIST+="zlib " # Zlib-1.2.11
|
||||
LIST+="bzip2 " # Bzip2-1.0.8
|
||||
LIST+="xz " # Xz-5.2.4
|
||||
LIST+="file " # File-5.38
|
||||
LIST+="readline " # Readline-8.0
|
||||
LIST+="m4 " # M4-1.4.18
|
||||
LIST+="bc " # Bc-2.5.3
|
||||
LIST+="binutils " # Binutils-2.34
|
||||
LIST+="gmp " # GMP-6.2.0
|
||||
LIST+="mpfr " # MPFR-4.0.2
|
||||
LIST+="mpc " # MPC-1.1.0
|
||||
LIST+="attr " # Attr-2.4.48
|
||||
LIST+="acl " # Acl-2.2.53
|
||||
LIST+="shadow " # Shadow-4.8.1
|
||||
LIST+="gcc " # GCC-9.2.0
|
||||
LIST+="pkg-config " # Pkg-config-0.29.2
|
||||
LIST+="ncurses " # Ncurses-6.2
|
||||
LIST+="libcap " # Libcap-2.31
|
||||
LIST+="sed " # Sed-4.8
|
||||
LIST+="psmisc " # Psmisc-23.2
|
||||
LIST+="iana-etc " # Iana-Etc-2.30
|
||||
LIST+="bison " # Bison-3.5.2
|
||||
LIST+="flex " # Flex-2.6.4
|
||||
LIST+="grep " # Grep-3.4
|
||||
LIST+="bash " # Bash-5.0
|
||||
LIST+="libtool " # Libtool-2.4.6
|
||||
LIST+="gdbm " # GDBM-1.18.1
|
||||
LIST+="gperf " # Gperf-3.1
|
||||
LIST+="expat " # Expat-2.2.9
|
||||
LIST+="inetutils " # Inetutils-1.9.4
|
||||
LIST+="perl " # Perl-5.30.1
|
||||
LIST+="XML-Parser " # XML::Parser-2.46
|
||||
LIST+="intltool " # Intltool-0.51.0
|
||||
LIST+="autoconf " # Autoconf-2.69
|
||||
LIST+="automake " # Automake-1.16.1
|
||||
LIST+="kmod " # Kmod-26
|
||||
LIST+="gettext " # Gettext-0.20.1
|
||||
LIST+="libelf " # Libelf from Elfutils-0.178
|
||||
LIST+="libffi " # Libffi-3.3
|
||||
LIST+="openssl " # OpenSSL-1.1.1d
|
||||
LIST+="python3 " # Python-3.8.1
|
||||
LIST+="ninja " # Ninja-1.10.0
|
||||
LIST+="meson " # Meson-0.53.1
|
||||
LIST+="coreutils " # Coreutils-8.31
|
||||
LIST+="check " # Check-0.14.0
|
||||
LIST+="diffutils " # Diffutils-3.7
|
||||
LIST+="gawk " # Gawk-5.0.1
|
||||
LIST+="findutils " # Findutils-4.7.0
|
||||
LIST+="groff " # Groff-1.22.4
|
||||
LIST+="grub " # GRUB-2.04
|
||||
LIST+="less " # Less-551
|
||||
LIST+="gzip " # Gzip-1.10
|
||||
LIST+="zstd " # Zstd-1.4.4
|
||||
LIST+="iproute2 " # IPRoute2-5.5.0
|
||||
LIST+="kbd " # Kbd-2.2.0
|
||||
LIST+="libpipeline " # Libpipeline-1.5.2
|
||||
LIST+="make " # Make-4.3
|
||||
LIST+="patch " # Patch-2.7.6
|
||||
LIST+="man-db " # Man-DB-2.9.0
|
||||
LIST+="tar " # Tar-1.32
|
||||
LIST+="texinfo " # Texinfo-6.7
|
||||
LIST+="vim " # Vim-8.2.0190
|
||||
LIST+="procps-ng " # Procps-ng-3.3.15
|
||||
LIST+="util-linux " # Util-linux-2.35.1
|
||||
LIST+="e2fsprogs " # E2fsprogs-1.45.5
|
||||
LIST+="sysklogd " # Sysklogd-1.5.1
|
||||
LIST+="sysvinit " # Sysvinit-2.96
|
||||
LIST+="eudev " # Eudev-3.2.9
|
||||
# Chapter 7
|
||||
LIST+="lfs-bootscripts " # lfs-bootscripts
|
||||
LIST+="cpio " # cpio
|
||||
LIST+="cpio " # cpio
|
||||
LIST+="mkinitramfs " # mkinitramfs
|
||||
LIST+="linux " # 8.3. Linux-4.20.12
|
||||
LIST+="linux " # Linux-5.5.3
|
||||
# ADDONS
|
||||
LIST+="popt " # popt
|
||||
LIST+="rpm " # rpm
|
||||
LIST+="wget " # wget
|
||||
LIST+="popt " # popt
|
||||
LIST+="rpm " # rpm
|
||||
LIST+="wget " # wget
|
||||
LIST+="linux-firmware " # linux-firmware
|
||||
LIST+="python2 " # python2
|
||||
LIST+="base " # lfs base packages meta package
|
||||
LIST+="python2 " # python2
|
||||
LIST+="base " # lfs base packages meta package
|
||||
for i in ${LIST};do
|
||||
case ${i} in
|
||||
symlinks) _log="${LOGS}/symlinks"
|
||||
@ -430,13 +419,6 @@ for i in ${LIST};do
|
||||
_adjust
|
||||
fi
|
||||
;;
|
||||
bc) _params "${SPECS}/${i}.spec"
|
||||
if [ "T" = "${RPM_EXISTS}" ]; then
|
||||
msg "Skipping: ${i}"
|
||||
else
|
||||
_bc
|
||||
fi
|
||||
;;
|
||||
gcc) _params "${SPECS}/${i}.spec"
|
||||
if [ "T" = "${RPM_EXISTS}" ]; then
|
||||
msg "Skipping: ${i}"
|
||||
@ -444,17 +426,6 @@ for i in ${LIST};do
|
||||
_gcc
|
||||
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"
|
||||
if [ "T" = "${RPM_EXISTS}" ]; then
|
||||
msg "Skipping: ${i}"
|
||||
|
17
cleanup.sh
17
cleanup.sh
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------
|
||||
# Title: cleanup.sh
|
||||
# Date: 2019-05-22
|
||||
# Version: 1.0
|
||||
# Author: baho-utot@columbus.rr.com
|
||||
# Date: 2020-05-31
|
||||
# Version: 2.0
|
||||
# Author: chris@cromer.cl
|
||||
# Options:
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright 2020 Chris Cromer
|
||||
# Copyright 2019 Baho Utot
|
||||
#-----------------------------------------------------------------------------
|
||||
# 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
|
||||
# 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
|
||||
# also removes the build tool chain chapter 5 packages as they are no
|
||||
# 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 +h # disable hashall
|
||||
#-----------------------------------------------------------------------------
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
LFS=/mnt/lfs # build area
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
LFS=/mnt/lfs # build area
|
||||
TOOLCHAIN="${LFS}/tools" # tool chain directory
|
||||
LINK=/tools # tool chain symlink
|
||||
USER=lfs # build user
|
||||
LINK=/tools # tool chain symlink
|
||||
USER=lfs # build user
|
||||
#-----------------------------------------------------------------------------
|
||||
function die() {
|
||||
local _red="\\033[1;31m"
|
||||
|
2
cromer-todo
Normal file
2
cromer-todo
Normal file
@ -0,0 +1,2 @@
|
||||
add zstd spec
|
||||
add missing perl home dir package needed for groff package dependency
|
19
installer.sh
19
installer.sh
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------
|
||||
# Title: installer.sh
|
||||
# Date: 2019-05-22
|
||||
# Version: 1.0
|
||||
# Author: baho-utot@columbus.rr.com
|
||||
# Date: 2020-05-31
|
||||
# Version: 2.0
|
||||
# Author: chris@cromer.cl
|
||||
# Options:
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright 2020 Chris Cromer
|
||||
# Copyright 2019 Baho Utot
|
||||
#-----------------------------------------------------------------------------
|
||||
# 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
|
||||
# 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 nounset # exit if variable not initalized
|
||||
set +h # disable hashall
|
||||
#-----------------------------------------------------------------------------
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
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
|
||||
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() {
|
||||
local _red="\\033[1;31m"
|
||||
@ -120,9 +119,9 @@ cat > ${ROOTPATH}/tmp/script.sh <<- EOF
|
||||
done
|
||||
popd
|
||||
pushd /boot
|
||||
/usr/bin/touch initrd.img-4.20.12
|
||||
/bin/rm initrd.img-4.20.12
|
||||
/sbin/mkinitramfs 4.20.12
|
||||
/usr/bin/touch initrd.img-5.5.3
|
||||
/bin/rm initrd.img-5.5.3
|
||||
/sbin/mkinitramfs 5.5.3
|
||||
/usr/bin/vim /etc/sysconfig/clock
|
||||
/usr/bin/vim /etc/passwd
|
||||
/usr/bin/vim /etc/hosts
|
||||
|
11
lfs.sh
11
lfs.sh
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------
|
||||
# Title: lfs.sh
|
||||
# Date: 2019-05-22
|
||||
# Version: 1.0
|
||||
# Author: baho-utot@columbus.rr.com
|
||||
# Date: 2020-05-31
|
||||
# Version: 2.0
|
||||
# Author: chris@cromer.cl
|
||||
# Options:
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright 2020 Chris Cromer
|
||||
# Copyright 2019 Baho Utot
|
||||
#-----------------------------------------------------------------------------
|
||||
# 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
|
||||
# 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 nounset # exit if variable not initalized
|
||||
set +h # disable hashall
|
||||
@ -31,7 +30,7 @@ set +h # disable hashall
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
TOPDIR=${PWD} # parent directory
|
||||
PARENT=/usr/src/LFS-RPM # rpm build directory
|
||||
USER=lfs # build user
|
||||
USER=lfs # build user
|
||||
LFS=/mnt/lfs # build area
|
||||
#-----------------------------------------------------------------------------
|
||||
# Common support functions
|
||||
|
14
setup.sh
14
setup.sh
@ -1,8 +1,8 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------
|
||||
# Title: setup.sh
|
||||
# Date: 2020-05-30
|
||||
# Version: 1.2
|
||||
# Date: 2020-05-31
|
||||
# Version: 2.0
|
||||
# Author: chris@cromer.cl
|
||||
# Options:
|
||||
#-----------------------------------------------------------------------------
|
||||
@ -22,8 +22,6 @@
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# 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 nounset # exit if variable not initalized
|
||||
set +h # disable hashall
|
||||
@ -123,10 +121,10 @@ function _chapter_3 {
|
||||
list+="${i} "
|
||||
done < "${TOPDIR}/BOOK/wget-list"
|
||||
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+="https://ftp.osuosl.org/pub/blfs/conglomeration/db/db-6.0.20.tar.gz "
|
||||
list+="https://ftp.gnu.org/gnu/cpio/cpio-2.12.tar.bz2 "
|
||||
list+="https://ftp.gnu.org/gnu/wget/wget-1.20.1.tar.gz "
|
||||
list+="http://ftp.rpm.org/releases/rpm-4.15.x/rpm-4.15.1.tar.bz2 "
|
||||
list+="https://download.oracle.com/berkeley-db/db-5.3.28.tar.gz "
|
||||
list+="https://ftp.gnu.org/gnu/cpio/cpio-2.13.tar.bz2 "
|
||||
list+="https://ftp.gnu.org/gnu/wget/wget-1.20.3.tar.gz "
|
||||
for i in ${list}; do
|
||||
msg_line " Fetching: ${i}: "
|
||||
wget --quiet --no-clobber --no-check-certificate --continue --directory-prefix=${LFS}${PARENT}/SOURCES ${i} || die "${PRGNAME}: Error: ${i}: Fetching tarball"
|
||||
|
11
tools.sh
11
tools.sh
@ -1,11 +1,12 @@
|
||||
#!/bin/bash
|
||||
#-----------------------------------------------------------------------------
|
||||
# Title: tools.sh
|
||||
# Date: 2019-02-16
|
||||
# Version: 1.1
|
||||
# Author: baho-utot@columbus.rr.com
|
||||
# Date: 2020-05-31
|
||||
# Version: 2.0
|
||||
# Author: chris@cromer.cl
|
||||
# Options:
|
||||
#-----------------------------------------------------------------------------
|
||||
# Copyright 2020 Chris Cromer
|
||||
# Copyright 2019 Baho Utot
|
||||
#-----------------------------------------------------------------------------
|
||||
# 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
|
||||
# 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 nounset # exit if variable not initalized
|
||||
set +h # disable hashall
|
||||
@ -31,7 +30,7 @@ set +h # disable hashall
|
||||
PRGNAME=${0##*/} # script name minus the path
|
||||
TOPDIR=${PWD} # this 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
|
||||
function die {
|
||||
|
Loading…
Reference in New Issue
Block a user