mirror of
https://github.com/YellowJacketLinux/lfs-buildscripts.git
synced 2025-02-09 13:07:18 +08:00
Chapter 8 work
This commit is contained in:
parent
0511189b6b
commit
edd7bd4301
@ -8,7 +8,9 @@ LFS=/mnt/newlfs
|
|||||||
#LFS=/home/mpeters/newlfs
|
#LFS=/home/mpeters/newlfs
|
||||||
|
|
||||||
cp -ar chrootscripts ${LFS}/sources/
|
cp -ar chrootscripts ${LFS}/sources/
|
||||||
|
cp -ar CH8Build ${LFS}/sources/
|
||||||
cp versions.sh ${LFS}/sources/chrootscripts/
|
cp versions.sh ${LFS}/sources/chrootscripts/
|
||||||
|
cp versions.sh ${LFS}/sources/CH8Build/
|
||||||
|
|
||||||
chown --from lfs -R root:root ${LFS}/{usr,lib,var,etc,bin,sbin,tools}
|
chown --from lfs -R root:root ${LFS}/{usr,lib,var,etc,bin,sbin,tools}
|
||||||
|
|
||||||
|
21
CH8Build/CH08.01-man-pages.sh
Normal file
21
CH8Build/CH08.01-man-pages.sh
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="/sources"
|
||||||
|
|
||||||
|
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||||
|
|
||||||
|
[ -d man-pages-${man_pages_version} ] && rm -rf man-pages-${man_pages_version}
|
||||||
|
|
||||||
|
tar -Jxf ${man_pages_tarball}
|
||||||
|
|
||||||
|
cd man-pages-${man_pages_version}
|
||||||
|
|
||||||
|
rm -f man3/crypt*
|
||||||
|
|
||||||
|
make prefix=/usr install
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed installing man-pages"
|
||||||
|
fi
|
17
CH8Build/CH08.02-iana-etc.sh
Normal file
17
CH8Build/CH08.02-iana-etc.sh
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="/sources"
|
||||||
|
|
||||||
|
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||||
|
|
||||||
|
[ -d iana-etc-${man_pages_version} ] && rm -rf iana-etc-${man_pages_version}
|
||||||
|
|
||||||
|
tar -zxf ${iana_etc_tarball}
|
||||||
|
|
||||||
|
cd iana-etc-${man_pages_version}
|
||||||
|
|
||||||
|
cp services protocols /etc
|
||||||
|
|
||||||
|
|
95
CH8Build/CH08.03-glibc.sh
Normal file
95
CH8Build/CH08.03-glibc.sh
Normal file
@ -0,0 +1,95 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="/sources"
|
||||||
|
|
||||||
|
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||||
|
|
||||||
|
[ -d glibc-${glibc_version} ] && rm -rf glibc-${glibc_version}
|
||||||
|
|
||||||
|
tar -Jxf ${glibc_tarball}
|
||||||
|
|
||||||
|
cd glibc-${glibc_version}
|
||||||
|
|
||||||
|
patch -Np1 -i ../${glibc_patch_file}
|
||||||
|
|
||||||
|
mkdir build && cd build
|
||||||
|
echo "rootsbindir=/usr/sbin" > configparms
|
||||||
|
|
||||||
|
../configure --prefix=/usr \
|
||||||
|
--disable-werror \
|
||||||
|
--enable-kernel=4.19 \
|
||||||
|
--enable-stack-protector=strong \
|
||||||
|
--disable-nscd \
|
||||||
|
libc_cv_slibdir=/usr/lib
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed building glibc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "running glibc make check, could take awhile..."
|
||||||
|
make check > ${GLSOURCES}/glibc.check.log 2>&1
|
||||||
|
|
||||||
|
touch /etc/ld.so.conf
|
||||||
|
|
||||||
|
sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile
|
||||||
|
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed installing glibc"
|
||||||
|
fi
|
||||||
|
|
||||||
|
sed '/RTLDLIST=/s@/usr@@g' -i /usr/bin/ldd
|
||||||
|
|
||||||
|
make localedata/install-locales
|
||||||
|
|
||||||
|
localedef -i C -f UTF-8 C.UTF-8
|
||||||
|
localedef -i ja_JP -f SHIFT_JIS ja_JP.SJIS 2> /dev/null || true
|
||||||
|
|
||||||
|
cat > /etc/nsswitch.conf << "EOF"
|
||||||
|
# Begin /etc/nsswitch.conf
|
||||||
|
|
||||||
|
passwd: files systemd
|
||||||
|
group: files systemd
|
||||||
|
shadow: files systemd
|
||||||
|
|
||||||
|
hosts: mymachines resolve [!UNAVAIL=return] files myhostname dns
|
||||||
|
networks: files
|
||||||
|
|
||||||
|
protocols: files
|
||||||
|
services: files
|
||||||
|
ethers: files
|
||||||
|
rpc: files
|
||||||
|
|
||||||
|
# End /etc/nsswitch.conf
|
||||||
|
EOF
|
||||||
|
|
||||||
|
tar -zxf ../../${tzdata_tarball}
|
||||||
|
|
||||||
|
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
|
||||||
|
unset ZONEINFO
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
# end glibc
|
32
CH8Build/CH08.04-zlib.sh
Normal file
32
CH8Build/CH08.04-zlib.sh
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="/sources"
|
||||||
|
|
||||||
|
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||||
|
|
||||||
|
[ -d zlib-${zlib_version} ] && rm -rf zlib-${zlib_version}
|
||||||
|
|
||||||
|
tar -zxf ${zlib_tarball}
|
||||||
|
|
||||||
|
cd zlib-${zlib_version}
|
||||||
|
|
||||||
|
./configure --prefix=/usr
|
||||||
|
|
||||||
|
make
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed building zlib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "Running zlib make check."
|
||||||
|
make check > ${GLSOURCES}/zlib.check 2>&1
|
||||||
|
|
||||||
|
make install
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed installing zlib"
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f /usr/lib/libz.a
|
47
CH8Build/CH08.05-bzip2.sh
Normal file
47
CH8Build/CH08.05-bzip2.sh
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
source versions.sh
|
||||||
|
|
||||||
|
GLSOURCES="/sources"
|
||||||
|
|
||||||
|
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||||
|
|
||||||
|
[ -d bzip2-${bzip2_version} ] && rm -rf bzip2-${bzip2_version}
|
||||||
|
|
||||||
|
tar -zxf ${bzip2_tarball}
|
||||||
|
|
||||||
|
cd bzip2-${bzip2_version}
|
||||||
|
|
||||||
|
patch -Np1 -i ../${bzip2_patch_file}
|
||||||
|
|
||||||
|
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
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed building libbz2.so"
|
||||||
|
fi
|
||||||
|
|
||||||
|
make clean
|
||||||
|
|
||||||
|
make
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed building bzip2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
make PREFIX=/usr install
|
||||||
|
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
myfail "Failed installing bzip2"
|
||||||
|
fi
|
||||||
|
|
||||||
|
cp -av libbz2.so.* /usr/lib
|
||||||
|
ln -sv libbz2.so.${bzip2_version} /usr/lib/libbz2.so
|
||||||
|
|
||||||
|
cp -v bzip2-shared /usr/bin/bzip2
|
||||||
|
|
||||||
|
for i in /usr/bin/{bzcat,bunzip2}; do
|
||||||
|
ln -sfv bzip2 $i
|
||||||
|
done
|
||||||
|
|
||||||
|
rm -fv /usr/lib/libbz2.a
|
Loading…
Reference in New Issue
Block a user