2014-02-19 15:13:54 +00:00
|
|
|
SUMMARY = "A suite of basic system administration utilities"
|
2010-09-27 14:44:05 +00:00
|
|
|
DESCRIPTION = "Util-linux includes a suite of basic system administration utilities \
|
|
|
|
commonly found on most Linux systems. Some of the more important utilities include \
|
|
|
|
disk partitioning, kernel message management, filesystem creation, and system login."
|
|
|
|
|
2007-04-11 11:08:20 +00:00
|
|
|
SECTION = "base"
|
2010-07-21 07:12:29 +00:00
|
|
|
|
|
|
|
LICENSE = "GPLv2+ & LGPLv2.1+ & BSD"
|
|
|
|
|
2014-03-04 22:06:05 +00:00
|
|
|
LIC_FILES_CHKSUM = "file://README.licensing;md5=1715f5ee3e01203ca1e1e0b9ee65918c \
|
2012-11-16 19:51:34 +00:00
|
|
|
file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
|
|
file://Documentation/licenses/COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
|
|
|
|
file://Documentation/licenses/COPYING.LGPLv2.1;md5=4fbd65380cdd255951079008b364516c \
|
2012-02-27 08:45:48 +00:00
|
|
|
file://Documentation/licenses/COPYING.BSD-3;md5=58dcd8452651fc8b07d1f65ce07ca8af \
|
|
|
|
file://Documentation/licenses/COPYING.UCB;md5=263860f8968d8bafa5392cab74285262 \
|
2014-03-04 22:06:05 +00:00
|
|
|
file://libuuid/COPYING;md5=b442ffb762cf8d3e9df1b99e0bb4af70 \
|
|
|
|
file://libmount/COPYING;md5=fb93f01d4361069c5616327705373b16 \
|
|
|
|
file://libblkid/COPYING;md5=fb93f01d4361069c5616327705373b16"
|
2010-07-21 07:12:29 +00:00
|
|
|
|
2016-08-25 15:09:50 +00:00
|
|
|
#gtk-doc is not enabled as it requires xmlto which requires util-linux
|
2016-06-15 06:25:16 +00:00
|
|
|
inherit autotools gettext pkgconfig systemd update-alternatives python3-dir bash-completion ptest
|
2011-04-01 03:38:55 +00:00
|
|
|
DEPENDS = "zlib ncurses"
|
2012-10-27 08:48:17 +00:00
|
|
|
DEPENDS_append_class-native = " lzo-native"
|
2013-05-29 15:09:48 +00:00
|
|
|
DEPENDS_append_class-nativesdk = " lzo-native"
|
2011-04-01 03:38:55 +00:00
|
|
|
|
2014-03-04 22:06:05 +00:00
|
|
|
SRC_URI = "${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-linux-${PV}.tar.xz \
|
2010-06-02 13:47:53 +00:00
|
|
|
"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2011-06-06 08:39:44 +00:00
|
|
|
PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk util-linux-sfdisk \
|
2011-03-15 20:18:04 +00:00
|
|
|
util-linux-swaponoff util-linux-losetup util-linux-umount \
|
2015-03-11 13:40:05 +00:00
|
|
|
util-linux-mount util-linux-readprofile util-linux-uuidd \
|
2017-01-19 07:52:44 +00:00
|
|
|
util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs util-linux-fsck \
|
|
|
|
util-linux-blkid util-linux-mkfs util-linux-mcookie util-linux-reset \
|
|
|
|
util-linux-lsblk util-linux-mkfs.cramfs util-linux-fstrim \
|
2016-03-22 14:49:01 +00:00
|
|
|
util-linux-partx util-linux-hwclock util-linux-mountpoint \
|
2016-08-04 13:28:46 +00:00
|
|
|
util-linux-findfs util-linux-getopt util-linux-sulogin util-linux-prlimit"
|
2014-12-30 07:39:06 +00:00
|
|
|
PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 'util-linux-pylibmount', '', d)}"
|
2016-01-12 09:23:25 +00:00
|
|
|
PACKAGES =+ "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2015-03-11 13:40:05 +00:00
|
|
|
PACKAGES_DYNAMIC = "^util-linux-lib.*"
|
|
|
|
|
2013-11-14 02:47:58 +00:00
|
|
|
SHARED_EXTRA_OECONF = "--disable-use-tty-group \
|
2014-03-04 22:06:05 +00:00
|
|
|
--disable-makeinstall-chown \
|
2013-11-14 02:47:58 +00:00
|
|
|
--enable-kill --enable-last --enable-mesg --enable-partx \
|
2013-11-29 14:35:38 +00:00
|
|
|
--enable-raw --enable-reset --disable-login \
|
2013-11-14 02:47:58 +00:00
|
|
|
--disable-vipw --disable-newgrp --disable-chfn-chsh \
|
2013-11-29 14:35:38 +00:00
|
|
|
--enable-write --enable-mount \
|
2016-09-15 21:11:16 +00:00
|
|
|
--enable-libuuid --enable-libblkid --enable-fsck \
|
2016-09-15 21:11:17 +00:00
|
|
|
--disable-minix --disable-bfs --without-udev \
|
2013-11-14 02:47:58 +00:00
|
|
|
usrsbin_execdir='${sbindir}' \
|
2012-09-24 06:24:51 +00:00
|
|
|
"
|
2013-11-14 02:47:58 +00:00
|
|
|
|
|
|
|
EXTRA_OECONF = "${SHARED_EXTRA_OECONF} --libdir=${base_libdir}"
|
|
|
|
|
2017-02-27 13:02:50 +00:00
|
|
|
PACKAGECONFIG_class-target ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
|
2013-07-25 14:51:28 +00:00
|
|
|
PACKAGECONFIG[pam] = "--enable-su --enable-runuser,--disable-su --disable-runuser, libpam,"
|
2009-05-18 11:36:34 +00:00
|
|
|
|
2013-03-04 16:56:34 +00:00
|
|
|
# Respect the systemd feature for uuidd
|
2014-12-30 07:39:06 +00:00
|
|
|
PACKAGECONFIG[systemd] = "--with-systemd --with-systemdsystemunitdir=${systemd_unitdir}/system/, --without-systemd --without-systemdsystemunitdir,systemd"
|
2012-11-16 19:51:34 +00:00
|
|
|
|
2014-03-24 09:24:17 +00:00
|
|
|
# Build setpriv requires libcap-ng
|
|
|
|
PACKAGECONFIG[libcap-ng] = "--enable-setpriv,--disable-setpriv,libcap-ng,"
|
|
|
|
|
2014-12-30 07:39:06 +00:00
|
|
|
# Build python bindings for libmount
|
2016-06-02 09:25:51 +00:00
|
|
|
PACKAGECONFIG[pylibmount] = "--with-python=3 --enable-pylibmount,--without-python --disable-pylibmount,python3"
|
2014-12-30 07:39:06 +00:00
|
|
|
|
2015-12-18 16:47:44 +00:00
|
|
|
# Readline support
|
|
|
|
PACKAGECONFIG[readline] = "--with-readline,--without-readline,readline"
|
|
|
|
|
2011-01-25 12:41:51 +00:00
|
|
|
FILES_${PN}-doc += "${datadir}/getopt/getopt-*.*"
|
|
|
|
|
2016-06-02 09:25:51 +00:00
|
|
|
FILES_${PN}-dev += "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.la"
|
2014-12-30 07:39:06 +00:00
|
|
|
|
2011-06-06 08:39:44 +00:00
|
|
|
FILES_util-linux-agetty = "${base_sbindir}/agetty"
|
2012-05-21 17:42:34 +00:00
|
|
|
FILES_util-linux-fdisk = "${base_sbindir}/fdisk.${BPN}"
|
2014-01-10 17:56:00 +00:00
|
|
|
FILES_util-linux-fstrim = "${base_sbindir}/fstrim"
|
2011-01-25 12:41:51 +00:00
|
|
|
FILES_util-linux-cfdisk = "${base_sbindir}/cfdisk"
|
|
|
|
FILES_util-linux-sfdisk = "${sbindir}/sfdisk"
|
2012-09-17 10:49:58 +00:00
|
|
|
FILES_util-linux-swaponoff = "${base_sbindir}/swapon.${BPN} ${base_sbindir}/swapoff.${BPN}"
|
2012-05-21 17:42:34 +00:00
|
|
|
FILES_util-linux-losetup = "${base_sbindir}/losetup.${BPN}"
|
|
|
|
FILES_util-linux-mount = "${base_bindir}/mount.${BPN}"
|
2011-11-10 21:00:54 +00:00
|
|
|
FILES_util-linux-mcookie = "${bindir}/mcookie"
|
2012-05-21 17:42:34 +00:00
|
|
|
FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
|
2015-01-26 17:49:30 +00:00
|
|
|
FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
|
2011-03-01 18:33:05 +00:00
|
|
|
FILES_util-linux-uuidgen = "${bindir}/uuidgen"
|
2013-03-04 16:56:34 +00:00
|
|
|
FILES_util-linux-uuidd = "${sbindir}/uuidd"
|
2017-01-24 12:50:25 +00:00
|
|
|
FILES_util-linux-reset = "${base_bindir}/reset*"
|
2013-05-18 02:34:40 +00:00
|
|
|
FILES_util-linux-partx = "${sbindir}/partx"
|
2014-07-24 14:32:25 +00:00
|
|
|
FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
|
2014-07-24 14:32:26 +00:00
|
|
|
FILES_util-linux-findfs = "${sbindir}/findfs"
|
2015-03-03 07:40:47 +00:00
|
|
|
FILES_util-linux-getopt = "${base_bindir}/getopt.${BPN}"
|
2015-12-23 10:21:06 +00:00
|
|
|
FILES_util-linux-runuser = "${sbindir}/runuser"
|
2016-08-04 13:28:46 +00:00
|
|
|
FILES_util-linux-prlimit = "${bindir}/prlimit"
|
2011-01-25 12:41:51 +00:00
|
|
|
|
2016-06-02 09:25:51 +00:00
|
|
|
FILES_util-linux-pylibmount = "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
|
|
|
|
${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
|
|
|
|
${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
|
2016-11-30 18:50:27 +00:00
|
|
|
FILES_util-linux-lsblk = "${bindir}/lsblk"
|
2011-03-15 20:18:04 +00:00
|
|
|
FILES_util-linux-lscpu = "${bindir}/lscpu"
|
2011-01-19 01:44:51 +00:00
|
|
|
|
2011-10-06 14:59:45 +00:00
|
|
|
FILES_util-linux-fsck = "${base_sbindir}/fsck*"
|
2011-10-21 13:49:39 +00:00
|
|
|
FILES_util-linux-mkfs = "${sbindir}/mkfs"
|
2011-10-06 14:59:45 +00:00
|
|
|
|
2013-08-29 23:23:19 +00:00
|
|
|
FILES_util-linux-fsck.cramfs = "${sbindir}/fsck.cramfs"
|
|
|
|
FILES_util-linux-mkfs.cramfs = "${sbindir}/mkfs.cramfs"
|
|
|
|
|
2015-04-09 05:49:28 +00:00
|
|
|
FILES_util-linux-sulogin = "${base_sbindir}/sulogin*"
|
2016-03-22 14:49:01 +00:00
|
|
|
FILES_util-linux-mountpoint = "${base_bindir}/mountpoint.${BPN}"
|
2015-04-09 05:49:28 +00:00
|
|
|
|
2011-10-10 10:10:54 +00:00
|
|
|
# Util-linux' blkid replaces the e2fsprogs one
|
|
|
|
FILES_util-linux-blkid = "${base_sbindir}/blkid*"
|
|
|
|
RCONFLICTS_util-linux-blkid = "e2fsprogs-blkid"
|
|
|
|
RREPLACES_util-linux-blkid = "e2fsprogs-blkid"
|
|
|
|
|
2013-01-07 13:00:30 +00:00
|
|
|
# reset calls 'tput'
|
|
|
|
RDEPENDS_util-linux-reset += "ncurses"
|
|
|
|
|
2015-12-23 10:21:06 +00:00
|
|
|
RDEPENDS_util-linux-runuser += "libpam"
|
|
|
|
|
2016-11-30 18:50:27 +00:00
|
|
|
RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup util-linux-sulogin util-linux-lsblk"
|
2015-12-23 10:21:06 +00:00
|
|
|
RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'util-linux-runuser', '', d)}"
|
|
|
|
|
2016-08-04 13:28:46 +00:00
|
|
|
RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint util-linux-prlimit"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2012-10-27 08:48:17 +00:00
|
|
|
RRECOMMENDS_${PN}_class-native = ""
|
2013-05-29 15:09:48 +00:00
|
|
|
RRECOMMENDS_${PN}_class-nativesdk = ""
|
2012-10-27 08:48:17 +00:00
|
|
|
RDEPENDS_${PN}_class-native = ""
|
2013-05-29 15:09:48 +00:00
|
|
|
RDEPENDS_${PN}_class-nativesdk = ""
|
2010-06-02 13:47:53 +00:00
|
|
|
|
2013-12-20 01:43:57 +00:00
|
|
|
RPROVIDES_${PN}-dev = "util-linux-libblkid-dev util-linux-libmount-dev util-linux-libuuid-dev"
|
|
|
|
|
2015-02-24 18:07:25 +00:00
|
|
|
#SYSTEMD_PACKAGES = "${PN}-uuidd ${PN}-fstrim"
|
2014-12-30 07:39:06 +00:00
|
|
|
SYSTEMD_SERVICE_${PN}-uuidd = "uuidd.socket uuidd.service"
|
|
|
|
SYSTEMD_AUTO_ENABLE_${PN}-uuidd = "disable"
|
|
|
|
SYSTEMD_SERVICE_${PN}-fstrim = "fstrim.timer fstrim.service"
|
|
|
|
SYSTEMD_AUTO_ENABLE_${PN}-fstrim = "disable"
|
2013-01-07 13:00:30 +00:00
|
|
|
|
2007-04-11 11:08:20 +00:00
|
|
|
do_compile () {
|
|
|
|
set -e
|
2016-04-11 20:43:34 +00:00
|
|
|
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= 'OPT=${CFLAGS}'
|
2007-04-11 11:08:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
do_install () {
|
|
|
|
# with ccache the timestamps on compiled files may
|
|
|
|
# end up earlier than on their inputs, this allows
|
|
|
|
# for the resultant compilation in the install step.
|
|
|
|
oe_runmake ARCH=${TARGET_ARCH} CPU= CPUOPT= \
|
|
|
|
'OPT=${CFLAGS}' 'CC=${CC}' 'LD=${LD}' \
|
|
|
|
'LDFLAGS=${LDFLAGS}' 'DESTDIR=${D}' install
|
|
|
|
|
2010-06-02 13:47:53 +00:00
|
|
|
mkdir -p ${D}${base_bindir}
|
|
|
|
|
2011-11-10 14:59:51 +00:00
|
|
|
sbinprogs="agetty ctrlaltdel cfdisk vipw vigr"
|
2017-01-24 14:07:20 +00:00
|
|
|
sbinprogs_a="pivot_root hwclock mkswap mkfs.minix fsck.minix losetup swapon swapoff fdisk fsck blkid blockdev fstrim sulogin switch_root nologin"
|
2016-03-22 14:49:01 +00:00
|
|
|
binprogs_a="dmesg getopt kill more umount mount login reset su mountpoint"
|
2010-06-02 13:47:53 +00:00
|
|
|
|
|
|
|
if [ "${base_sbindir}" != "${sbindir}" ]; then
|
|
|
|
mkdir -p ${D}${base_sbindir}
|
|
|
|
for p in $sbinprogs $sbinprogs_a; do
|
|
|
|
if [ -f "${D}${sbindir}/$p" ]; then
|
|
|
|
mv "${D}${sbindir}/$p" "${D}${base_sbindir}/$p"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "${base_bindir}" != "${bindir}" ]; then
|
|
|
|
mkdir -p ${D}${base_bindir}
|
|
|
|
for p in $binprogs_a; do
|
|
|
|
if [ -f "${D}${bindir}/$p" ]; then
|
|
|
|
mv "${D}${bindir}/$p" "${D}${base_bindir}/$p"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2009-05-18 11:36:34 +00:00
|
|
|
install -d ${D}${sysconfdir}/default/
|
|
|
|
echo 'MOUNTALL="-t nonfs,nosmbfs,noncpfs"' > ${D}${sysconfdir}/default/mountall
|
|
|
|
|
2012-09-25 13:04:02 +00:00
|
|
|
rm -f ${D}${bindir}/chkdupexe
|
2015-09-29 09:59:02 +00:00
|
|
|
|
2017-02-27 13:02:50 +00:00
|
|
|
if [ "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" ]; then
|
2015-09-29 09:59:02 +00:00
|
|
|
install -d ${D}${sysconfdir}/pam.d
|
|
|
|
install -m 0644 ${WORKDIR}/runuser.pamd ${D}${sysconfdir}/pam.d/runuser
|
|
|
|
install -m 0644 ${WORKDIR}/runuser-l.pamd ${D}${sysconfdir}/pam.d/runuser-l
|
|
|
|
fi
|
2007-04-11 11:08:20 +00:00
|
|
|
}
|
|
|
|
|
2015-03-20 14:16:36 +00:00
|
|
|
# reset and nologin causes a conflict with ncurses-native and shadow-native
|
|
|
|
do_install_append_class-native () {
|
|
|
|
rm -f ${D}${base_bindir}/reset
|
|
|
|
rm -f ${D}${base_sbindir}/nologin
|
|
|
|
}
|
|
|
|
|
2016-02-04 11:29:05 +00:00
|
|
|
ALTERNATIVE_PRIORITY = "80"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2014-12-02 09:40:38 +00:00
|
|
|
ALTERNATIVE_${PN} = "dmesg kill more mkswap blockdev pivot_root switch_root"
|
2016-09-15 21:11:16 +00:00
|
|
|
ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall"
|
2017-01-24 14:07:20 +00:00
|
|
|
ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
|
|
|
|
ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
|
|
|
|
ALTERNATIVE_LINK_NAME[more] = "${base_bindir}/more"
|
|
|
|
ALTERNATIVE_LINK_NAME[mkswap] = "${base_sbindir}/mkswap"
|
|
|
|
ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
|
|
|
|
ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
|
2014-12-02 09:40:38 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
|
2012-12-04 01:31:13 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
|
2017-01-24 14:07:20 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2017-03-16 14:20:54 +00:00
|
|
|
ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3 eject.1 logger.1"
|
2013-03-01 02:19:09 +00:00
|
|
|
|
|
|
|
ALTERNATIVE_LINK_NAME[last.1] = "${mandir}/man1/last.1"
|
2015-03-31 12:23:29 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[lastb.1] = "${mandir}/man1/lastb.1"
|
2013-03-01 02:19:09 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[mesg.1] = "${mandir}/man1/mesg.1"
|
|
|
|
ALTERNATIVE_LINK_NAME[mountpoint.1] = "${mandir}/man1/mountpoint.1"
|
2015-03-31 12:23:29 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[nologin.8] = "${mandir}/man8/nologin.8"
|
2014-01-14 15:09:45 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[reset.1] = "${mandir}/man1/reset.1"
|
2013-03-01 02:19:09 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[sulogin.8] = "${mandir}/man8/sulogin.8"
|
|
|
|
ALTERNATIVE_LINK_NAME[utmpdump.1] = "${mandir}/man1/utmpdump.1"
|
|
|
|
ALTERNATIVE_LINK_NAME[wall.1] = "${mandir}/man1/wall.1"
|
2015-07-03 07:23:49 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[kill.1] = "${mandir}/man1/kill.1"
|
|
|
|
ALTERNATIVE_LINK_NAME[libblkid.3] = "${mandir}/man3/libblkid.3"
|
|
|
|
ALTERNATIVE_LINK_NAME[blkid.8] = "${mandir}/man8/blkid.8"
|
|
|
|
ALTERNATIVE_LINK_NAME[findfs.8] = "${mandir}/man8/findfs.8"
|
|
|
|
ALTERNATIVE_LINK_NAME[fsck.8] = "${mandir}/man8/fsck.8"
|
|
|
|
ALTERNATIVE_LINK_NAME[uuid.3] = "${mandir}/man3/uuid.3"
|
2017-03-16 14:20:54 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[eject.1] = "${mandir}/man1/eject.1"
|
|
|
|
ALTERNATIVE_LINK_NAME[logger.1] = "${mandir}/man1/logger.1"
|
2013-03-01 02:19:09 +00:00
|
|
|
|
2014-07-24 14:32:25 +00:00
|
|
|
ALTERNATIVE_util-linux-hwclock = "hwclock"
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[hwclock] = "${base_sbindir}/hwclock"
|
2011-11-16 22:01:50 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-fdisk = "fdisk"
|
|
|
|
ALTERNATIVE_LINK_NAME[fdisk] = "${base_sbindir}/fdisk"
|
2011-11-16 22:01:50 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-agetty = "getty"
|
|
|
|
ALTERNATIVE_LINK_NAME[getty] = "${base_sbindir}/getty"
|
|
|
|
ALTERNATIVE_TARGET[getty] = "${base_sbindir}/agetty"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-mount = "mount"
|
|
|
|
ALTERNATIVE_LINK_NAME[mount] = "${base_bindir}/mount"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-umount = "umount"
|
|
|
|
ALTERNATIVE_LINK_NAME[umount] = "${base_bindir}/umount"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2013-11-21 17:47:43 +00:00
|
|
|
ALTERNATIVE_util-linux-readprofile = "readprofile"
|
2015-01-26 17:49:30 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[readprofile] = "${sbindir}/readprofile"
|
2013-11-21 17:47:43 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-losetup = "losetup"
|
|
|
|
ALTERNATIVE_LINK_NAME[losetup] = "${base_sbindir}/losetup"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-swaponoff = "swapoff swapon"
|
|
|
|
ALTERNATIVE_LINK_NAME[swapoff] = "${base_sbindir}/swapoff"
|
|
|
|
ALTERNATIVE_LINK_NAME[swapon] = "${base_sbindir}/swapon"
|
2007-04-11 11:08:20 +00:00
|
|
|
|
2016-09-15 21:11:16 +00:00
|
|
|
ALTERNATIVE_util-linux-fsck = "fsck"
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
|
2011-10-06 14:59:45 +00:00
|
|
|
|
2012-05-21 17:42:34 +00:00
|
|
|
ALTERNATIVE_util-linux-blkid = "blkid"
|
|
|
|
ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
|
2011-10-10 10:10:54 +00:00
|
|
|
|
2013-01-07 13:00:30 +00:00
|
|
|
ALTERNATIVE_util-linux-reset = "reset"
|
|
|
|
ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
|
|
|
|
ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
|
|
|
|
|
2014-11-05 21:26:15 +00:00
|
|
|
ALTERNATIVE_util-linux-getopt = "getopt"
|
2015-03-03 07:40:47 +00:00
|
|
|
ALTERNATIVE_LINK_NAME[getopt] = "${base_bindir}/getopt"
|
2014-11-05 21:26:15 +00:00
|
|
|
|
2015-04-09 05:49:28 +00:00
|
|
|
ALTERNATIVE_util-linux-sulogin = "sulogin"
|
|
|
|
ALTERNATIVE_LINK_NAME[sulogin] = "${base_sbindir}/sulogin"
|
|
|
|
|
2016-03-22 14:49:01 +00:00
|
|
|
ALTERNATIVE_util-linux-mountpoint = "mountpoint"
|
|
|
|
ALTERNATIVE_LINK_NAME[mountpoint] = "${base_bindir}/mountpoint"
|
|
|
|
|
2013-05-29 15:09:48 +00:00
|
|
|
BBCLASSEXTEND = "native nativesdk"
|
2013-07-26 12:09:08 +00:00
|
|
|
|
|
|
|
python do_package_prepend () {
|
2016-12-14 21:13:04 +00:00
|
|
|
if '--enable-su' in d.getVar('EXTRA_OECONF').split():
|
2016-11-01 14:50:35 +00:00
|
|
|
d.appendVar(d.expand('ALTERNATIVE_${PN}'), ' su')
|
|
|
|
d.appendVar(d.expand('ALTERNATIVE_${PN}-doc'), ' su.1')
|
|
|
|
|
|
|
|
d.setVarFlag('ALTERNATIVE_LINK_NAME', "su", d.expand('${base_bindir}/su'))
|
|
|
|
d.setVarFlag('ALTERNATIVE_LINK_NAME', "su.1", d.expand('${mandir}/man1/su.1'))
|
2013-07-26 12:09:08 +00:00
|
|
|
}
|
2015-03-11 13:40:05 +00:00
|
|
|
|
|
|
|
python populate_packages_prepend() {
|
|
|
|
do_split_packages(d, '${base_libdir}', '^lib(.*)\.so\..*$',
|
|
|
|
output_pattern='util-linux-lib%s',
|
|
|
|
description='util-linux lib%s',
|
|
|
|
extra_depends='', prepend=True, allow_links=True)
|
|
|
|
}
|
2015-12-03 03:08:00 +00:00
|
|
|
|
2016-11-30 18:50:27 +00:00
|
|
|
RDEPENDS_${PN}-bash-completion += "util-linux-lsblk"
|
2016-06-15 06:25:16 +00:00
|
|
|
RDEPENDS_${PN}-ptest = "bash grep coreutils"
|
2015-12-03 03:08:00 +00:00
|
|
|
|
|
|
|
do_compile_ptest() {
|
|
|
|
oe_runmake buildtest-TESTS
|
|
|
|
}
|
|
|
|
|
|
|
|
do_install_ptest() {
|
|
|
|
mkdir -p ${D}${PTEST_PATH}/tests/ts
|
|
|
|
find . -maxdepth 1 -type f -perm -111 -exec cp {} ${D}${PTEST_PATH} \;
|
|
|
|
cp ${S}/tests/functions.sh ${D}${PTEST_PATH}/tests/
|
|
|
|
cp ${S}/tests/commands.sh ${D}${PTEST_PATH}/tests/
|
|
|
|
cp ${S}/tests/run.sh ${D}${PTEST_PATH}/tests/
|
|
|
|
cp -pR ${S}/tests/expected ${D}${PTEST_PATH}/tests/expected
|
|
|
|
|
|
|
|
list="bitops build-sys cal col colrm column dmesg fsck hexdump hwclock ipcs isosize login look md5 misc more namei paths schedutils script swapon tailf"
|
|
|
|
# The following tests are not installed yet:
|
|
|
|
# blkid scsi_debug module dependent
|
|
|
|
# cramfs gcc dependent
|
|
|
|
# eject gcc dependent
|
|
|
|
# fdisk scsi_debug module and gcc dependent
|
|
|
|
# lscpu gcc dependant
|
|
|
|
# libmount uuidgen dependent
|
|
|
|
# mount gcc dependant
|
|
|
|
# partx blkid dependant
|
|
|
|
for d in $list; do
|
|
|
|
cp -pR ${S}/tests/ts/$d ${D}${PTEST_PATH}/tests/ts/
|
|
|
|
done
|
|
|
|
}
|