1.39. tmp util-linux-2.35.1

This package is not added to temporary system in original LFS.

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.



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.

src_config()
{
    ./configure \
        --disable-silent-rules \
        --prefix=${PREFIX} \
        --without-python               \
        --disable-makeinstall-chown    \
        --without-systemdsystemunitdir \
        --without-tinfo
}

Compilation

src_compile()
{
    make ${MAKEOPTS}
}

Installation

src_install()
{
    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/9.1/chapter06/util-linux.html