3.72. util-linux-2.37.4

#!/bin/sh
# Copyright © 1999-2022 Gerard Beekmans
# Copyright © 2017-2022 Random Crew
# Distributed under the terms of MIT License.

Configuration

--disable-makeinstall-chown is added to prevent operations during install, requiring root privileges. They will be performed later during execution of postinstall script.

src_config()
{
    ./configure \
        ADJTIME_PATH=/var/lib/hwclock/adjtime   \
        --bindir=${PREFIX}/bin    \
        --libdir=${PREFIX}/lib    \
        --sbindir=${PREFIX}/sbin  \
        --docdir=${PREFIX}/share/doc/${P} \
        --disable-chfn-chsh  \
        --disable-login      \
        --disable-nologin    \
        --disable-su         \
        --disable-setpriv    \
        --disable-runuser    \
        --disable-pylibmount \
        --disable-static     \
        --without-python     \
        --without-systemd    \
        --without-systemdsystemunitdir \
        --disable-makeinstall-chown
}

Compilation

src_compile()
{
    make ${MAKEOPTS}
}

Installation

Configuration files clock and shells are handled here instead of manual installation.

src_install()
{
    mkdir -p ${D}/var/lib/hwclock/
    make install ${MAKEOPTS} DESTDIR=${D}

    mkdir -p ${D}/etc/sysconfig/
    install -m644 ${PATCHDIR}/files/clock ${D}/etc/sysconfig/
    install -m644 ${PATCHDIR}/files/shells ${D}/etc/
}

Unit testing

src_check()
{
    rm tests/ts/lsns/ioctl_ns || nonfail
    make -k check
}

lfs_postinstall

lfs_postinstall method is empty here.

That means postinstall script will not be executed after unpacking the package. Postinstall of this package requires root privileges, which we do not have.

lfs_postinstall()
{
    return
}

Run time scripts

postinst

Build code

pass1.sh
util-linux.build

Other files

files/clock
files/shells
meta.txt
text

Links

url.lfs: https://linuxfromscratch.org/lfs/view/11.1/chapter08/util-linux.html
url.lfs.stage1: https://linuxfromscratch.org/lfs/view/11.1/chapter07/util-linux.html