1.29. tmp util-linux-2.38.1
This package is added to temporary system at later stage in original LFS. That stage would correlate with tools-inner.src list.
The package provides mount and umount commands, which are used by any build engine: they prepare kernel virtual filesystems inside chrooted environment.
#!/bin/sh # Copyright © 1999-2022 Gerard Beekmans # Copyright © 2017-2022 Random Crew # Distributed under the terms of MIT License. # this undoes empty lfs_postinstall from the main build loadlib lfs
Configuration
--disable-makeinstall-chown is added to prevent operations during install, requiring root privileges. They will be performed later during execution of postinstall script.
We need to get rid off libtinfo in LDFLAGS, pushed by host environment. In order to do this, --without-tinfo is added. -ltinfo ships in NCURSES_LIBS as well, but overriding it via cmd in configure does not work for some reason. Have to cut it out with sed.
src_config() { ./configure \ ADJTIME_PATH=/var/lib/hwclock/adjtime \ --libdir=${PREFIX}/lib \ --docdir=${PREFIX}/share/doc/${P} \ --disable-chfn-chsh \ --disable-login \ --disable-nologin \ --disable-su \ --disable-setpriv \ --disable-runuser \ --disable-pylibmount \ --disable-static \ --without-python \ runstatedir=/run \ --host=${LFS_TGT} \ --build=$(config/config.guess) \ --without-tinfo \ --disable-makeinstall-chown # NCURSES_LIBS in cmd for config does not work sed -i -e '/NCURSES_LIBS/s/ -ltinfo//' ./config.status }
Compilation
src_compile() { make ${MAKEOPTS} }
Installation
src_install() { mkdir -p ${D}/var/lib/hwclock make install ${MAKEOPTS} DESTDIR=${D} }
Unit testing
src_check() { make -k check }
lfs_postinstall
Function lfs_postinstall is not called during pass1, it derives from main build.
lfs_postinstall() { return }
Links
- url.lfs: https://linuxfromscratch.org/lfs/view/11.2/chapter08/util-linux.html
- url.lfs.stage1: https://linuxfromscratch.org/lfs/view/11.2/chapter07/util-linux.html