mirror of
https://git.adityakumar.xyz/lfs-scripts.git
synced 2024-11-22 03:52:52 +00:00
Add 8.54 - Build coreutls
This commit is contained in:
parent
9034bfc3ec
commit
691d94a482
2 changed files with 50 additions and 0 deletions
38
scripts/chapter8/8.54-coreutils.sh
Normal file
38
scripts/chapter8/8.54-coreutils.sh
Normal file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd /sources
|
||||
tar xf coreutils-9.1.tar.xz
|
||||
cd coreutils-9.1
|
||||
|
||||
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 -j5
|
||||
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
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"
|
||||
|
||||
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 /sources
|
||||
rm -rf coreutils-9.1
|
|
@ -1186,3 +1186,15 @@ then
|
|||
stop_script "chapter8/8.53-meson.sh"
|
||||
fi
|
||||
|
||||
# Chapter 8.54
|
||||
# ============
|
||||
echo "Building coreutils"
|
||||
su -c "bash $SCRIPT/chapter8/8.54-coreutils.sh"
|
||||
|
||||
# Exit on error
|
||||
check_exit_code
|
||||
if [ $exit_status -ne 0 ]
|
||||
then
|
||||
stop_script "bash $SCRIPT/chapter8/8.54-coreutils.sh"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue