2.51. coreutils-8.31
#!/bin/sh # Copyright © 1999-2020 Gerard Beekmans # Copyright © 2017-2020 Random Crew # Distributed under the terms of MIT License.
Configuration
src_config() { sed -i '/test.lock/s/^/#/' gnulib-tests/gnulib.mk autoreconf -fiv FORCE_UNSAFE_CONFIGURE=1 \ ./configure \ --prefix=${PREFIX} \ --enable-no-install-program=kill,uptime }
Compilation
src_compile() { make ${MAKEOPTS} }
Installation
src_install() { make install ${MAKEOPTS} DESTDIR=${D} mkdir -p ${D}/bin/ ${D}${PREFIX}/sbin/ for command in \ cat chgrp chmod chown cp date dd df 'echo' false ln ls mkdir mknod mv pwd rm \ rmdir stty sync true uname head sleep nice touch test [ \ ; do mv ${D}${PREFIX}/bin/${command} ${D}/bin/ done mv ${D}${PREFIX}/bin/chroot ${D}${PREFIX}/sbin mkdir -p ${D}${PREFIX}/share/man/man8/ mv ${D}${PREFIX}/share/man/man1/chroot.1 ${D}${PREFIX}/share/man/man8/chroot.8 sed -i s/\"1\"/\"8\"/1 ${D}${PREFIX}/share/man/man8/chroot.8 }
Unit testing
The actions for tests differs from original LFS. As we are building from our own user, which is autocreated inside chroot, we do not need to switch to that user manually. On the opposite, we need to switch to root user.
src_check() { su root -s /bin/bash \ -c "PATH=$PATH make NON_ROOT_USERNAME=$(id -un) check-root" make RUN_EXPENSIVE_TESTS=yes check }
Patches
Build code
Other files
Links
- url.lfs: https://linuxfromscratch.org/lfs/view/9.1/chapter06/coreutils.html
- url.lfs.stage1: https://linuxfromscratch.org/lfs/view/9.1/chapter05/coreutils.html