2.71. util-linux-2.35.1

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

Configuration

Operations chgrp and chown are commented out in Makefile, as they require root privileges. The command will be performed later during execution of postinstall script.

src_config()
{
    ./configure \
        ADJTIME_PATH=/var/lib/hwclock/adjtime   \
        --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

    sed -i \
        -e '/[^a-z]chgrp /s/^/#/' \
        -e '/[^a-z]chown /s/^/#/' \
        Makefile
}

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