summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2015-08-08 13:49:04 -0700
committerRobin H. Johnson <robbat2@gentoo.org>2015-08-08 17:38:18 -0700
commit56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch)
tree3f91093cdb475e565ae857f1c5a7fd339e2d781e /sys-apps/util-linux
downloadgentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2
gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip
proj/gentoo: Initial commit
This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'sys-apps/util-linux')
-rw-r--r--sys-apps/util-linux/Manifest7
-rw-r--r--sys-apps/util-linux/files/crypto-loop.confd9
-rwxr-xr-xsys-apps/util-linux/files/crypto-loop.initd70
-rw-r--r--sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch13
-rw-r--r--sys-apps/util-linux/files/util-linux-2.24-last-tests.patch86
-rw-r--r--sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch41
-rw-r--r--sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch33
-rw-r--r--sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch43
-rw-r--r--sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch33
-rw-r--r--sys-apps/util-linux/metadata.xml20
-rw-r--r--sys-apps/util-linux/util-linux-2.24.1-r2.ebuild147
-rw-r--r--sys-apps/util-linux/util-linux-2.24.1-r3.ebuild174
-rw-r--r--sys-apps/util-linux/util-linux-2.24.2.ebuild177
-rw-r--r--sys-apps/util-linux/util-linux-2.25.1-r1.ebuild174
-rw-r--r--sys-apps/util-linux/util-linux-2.25.1.ebuild173
-rw-r--r--sys-apps/util-linux/util-linux-2.25.2-r1.ebuild177
-rw-r--r--sys-apps/util-linux/util-linux-2.25.2-r2.ebuild183
-rw-r--r--sys-apps/util-linux/util-linux-2.25.2.ebuild174
-rw-r--r--sys-apps/util-linux/util-linux-2.26.1-r1.ebuild178
-rw-r--r--sys-apps/util-linux/util-linux-2.26.1.ebuild177
-rw-r--r--sys-apps/util-linux/util-linux-2.26.2.ebuild182
-rw-r--r--sys-apps/util-linux/util-linux-2.26.ebuild177
-rw-r--r--sys-apps/util-linux/util-linux-9999.ebuild182
23 files changed, 2630 insertions, 0 deletions
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
new file mode 100644
index 000000000000..2fa166266b13
--- /dev/null
+++ b/sys-apps/util-linux/Manifest
@@ -0,0 +1,7 @@
+DIST util-linux-2.24.1.tar.xz 3543692 SHA256 835eb6232cfab0118ef2e4fd649de0ba9f5bd1b8cbf9a7d4d84594541dec8410 SHA512 5636e1c57bd57954518e90ff0f079810cc2927f52bb925dde556ce2744a088577f8adbc19c19b2bd079efd253406767faa44d1de5f557e024762522e647f044b WHIRLPOOL 25862a85788eb1c275c7e06f3d2be8e6a9605811665e06a4b21d1e274fc4a5e19dd03e5c52061ee5d98ce8c86ba757a7f8076683edb603ad0c43c05ab5e52a51
+DIST util-linux-2.24.2.tar.xz 3586580 SHA256 1243d6c07f1c5b38aa4c3814c81a71c24cba7dafe08942916bf216a90a460ff0 SHA512 a0c03876ef19fa09e434e3e5362fb3f3e0a254b3b39a623ac7a9a207d06afce00366792244ed0fac86931f8340c046620660f33c3444a07a12037182fc191240 WHIRLPOOL 4b8185e1832145c050a8aa0761ae017d846ed58cd7e07710e4c32bf92a8f6e530bddb56dab70c8025eddb4cafafed79e658b0aced3a190b61b508078a438a9ed
+DIST util-linux-2.25.1.tar.xz 3695172 SHA256 4701305ae22790c3a92ce48e50794fa05b7ee01f4227f419a171c100d08986e8 SHA512 a670cb4318beed0a455efb339ebea6ec7c5d672e15877e7e25cae2ec9c0795fbe4275b6c85a590467c3de92ab2f64cdcd0427c9a2a6e4c6b76f563592fb7be8d WHIRLPOOL 44c17bd3ad0b05c47bb955b934011b460c3992ea5d5b43977d2001b245820b775e16bedbaa10ff9c223d59b0809674884c76f0dc34d707864d17b49b4deaab9d
+DIST util-linux-2.25.2.tar.xz 3703644 SHA256 e0457f715b73f4a349e1acb08cb410bf0edc9a74a3f75c357070f31f70e33cd6 SHA512 cf8c5bde78f844425150c2a81bdecb87aa57bcd5cebd177a78160835627f58037fa2cfe4db26fd8f35eedb3beb499a91492a297a27d065465e2ea0c6218dc387 WHIRLPOOL dd1685f2e694bf3de95acc3ba3170d231426c18c3395a867c815bbd3ab5ee0f07567b49d0ae083ce669c89db711e39fd2b990bc7321985ec2279d78816ec5258
+DIST util-linux-2.26.1.tar.xz 3859740 SHA256 22dc1c957262e2cbdfb4d524a63d5cd4f219d3ac9b5eab570fc771076799bb6e SHA512 9321793b3fa219ffc46e10639b9e45094c3cae6c48be4b80e652d9768f40dcedbd49342e17345b61c85f46540a7bd93d118a8e226c315e112bb2e959e2855ad9 WHIRLPOOL 1bcd5c3c14c278ec3b10535546706b6830a283fd72e7d1933101bf1ab6ec5b03d9ff7a53745d34a97cbb4d7d1b0e35852bb841be4b53a55c2aca07624bf06fbd
+DIST util-linux-2.26.2.tar.xz 3863868 SHA256 0e29bda142528a48a0a953c39ff63093651a4809042e1790fbd6aa8663fd9666 SHA512 1cb8e2f32882b3f496d31c250a45cfb61bedb79f7a2802b358c23134d4257fa9bc9cde8888cfa1aaba12109f82b93345c6dc0bec2d11629ffa084f2a4476a91b WHIRLPOOL 699ff057f9930fe53f44090817c64ffe089345e7aba4c836e18cd3d2088881add805640b0e41b8d60bc08e3632be919025417feb9c2ddda454c87821a59122ed
+DIST util-linux-2.26.tar.xz 3847960 SHA256 a23c6f39dea0ed215ccd589509ffc7bb6f706f6e1a04760f493fb0fd7e93c489 SHA512 af07d49a433fce683da7bdf9aea5693ad108aa16166e0147716175bd779fe5090029617dd7db153bc0f5efcf7bdd377761a616efd4cca90a87bf317132ede88c WHIRLPOOL 4f7c9463bfe1523819671824de26e051c496c86884ca34b25208762179345c799fe61e566228ebfcbca2f2b63163539e37b06e438a58f562cf7b53f954564150
diff --git a/sys-apps/util-linux/files/crypto-loop.confd b/sys-apps/util-linux/files/crypto-loop.confd
new file mode 100644
index 000000000000..6a8843462082
--- /dev/null
+++ b/sys-apps/util-linux/files/crypto-loop.confd
@@ -0,0 +1,9 @@
+# /etc/conf.d/crypto-loop: Configuration file for /etc/init.d/crypto-loop
+
+# More info can be found in the init.d script
+
+# Specify loopback configurations here. The format of this file is
+# shown in the following commented-out example. One line per loopback
+# configuration. For possible hash values, see `man hashalot`.
+
+# loop=/dev/loop0 hash='' cipher=serpent keysize=256 device=/dev/system/test other=''
diff --git a/sys-apps/util-linux/files/crypto-loop.initd b/sys-apps/util-linux/files/crypto-loop.initd
new file mode 100755
index 000000000000..2f6470d6b7bf
--- /dev/null
+++ b/sys-apps/util-linux/files/crypto-loop.initd
@@ -0,0 +1,70 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ if [ -x /etc/init.d/root ]; then
+ need root
+ else
+ need checkroot
+ fi
+ need modules
+ before localmount
+}
+
+start() {
+ local status="0"
+
+ ebegin "Starting crypto loop devices"
+
+ if [ -e /etc/conf.d/crypto-loop ] ; then
+ egrep "^loop" /etc/conf.d/crypto-loop | \
+ while read loopline ; do
+ eval ${loopline}
+
+ local configured=$(awk -v MOUNT="${device}" \
+ '($2 == MOUNT) { print "yes" }' /proc/mounts)
+
+ if [ "${configured}" != "yes" ] ; then
+ einfo " Loop ${loop} on device ${device} (cipher ${cipher}, key size ${keysize}): "
+
+ if [ -n "${hash}" ] ; then
+ /usr/sbin/hashalot -n ${keysize} ${hash} </dev/tty|\
+ /sbin/losetup -p 0 -e ${cipher}-${keysize} ${loop} ${device} ${other}
+ else
+ /sbin/losetup -e ${cipher}-${keysize} ${loop} ${device} ${other}
+ fi
+
+ if [ $? -ne 0 ] ; then
+ ewarn "Failure configuring ${loop}. Skipping."
+ status=1
+ fi
+ else
+ ewarn " Loop ${loop} on device ${device} are already configured"
+ fi
+ done
+ fi
+ ewend ${status} "Failed to start some loop devices."
+
+ # We do not fail if some loop devices did not start ...
+ return 0
+}
+
+stop() {
+ local status="0"
+ for loop in $(ls /dev/loop[0-9] 2>/dev/null) ; do
+ losetup ${loop} > /dev/null 2>&1
+ if [ $? -eq 0 ] ; then
+ ( umount ${loop} || swapoff "${loop}" ) >/dev/null 2>&1
+ if ! /sbin/losetup -d ${loop} > /dev/null 2>&1; then
+ ewarn "Failure deconfiguring ${loop}."
+ status=1
+ fi
+ fi
+ done
+ ewend ${status}
+}
+
+
+# vim:ts=4
diff --git a/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch b/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch
new file mode 100644
index 000000000000..f01a55d6e662
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.24-fix-fdisk-on-alpha.patch
@@ -0,0 +1,13 @@
+--- libfdisk/src/bsd.c.orig 2014-06-11 10:15:47.000000000 +0200
++++ libfdisk/src/bsd.c 2014-06-11 10:16:18.000000000 +0200
+@@ -787,8 +787,10 @@
+ case 0x06: /* DOS 16-bit >=32M */
+ case 0xe1: /* DOS access */
+ case 0xe3: /* DOS R/O */
++#if !defined (__alpha__)
+ case 0xf2: /* DOS secondary */
+ return BSD_FS_MSDOS;
++#endif
+ case 0x07: /* OS/2 HPFS */
+ return BSD_FS_HPFS;
+ default:
diff --git a/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch b/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch
new file mode 100644
index 000000000000..77cf478e398a
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.24-last-tests.patch
@@ -0,0 +1,86 @@
+https://bugs.gentoo.org/501408
+
+From 3c76515abd2e80dc1da03041eb868b8c1e596fb1 Mon Sep 17 00:00:00 2001
+From: Sami Kerola <kerolasa@iki.fi>
+Date: Sun, 16 Feb 2014 23:54:18 +0000
+Subject: [PATCH] tests: align last.1 with recent phantom detection
+
+None existing account is not still-logged-in but gone mysteriously,
+assuming wtmp logout markup is missing.
+
+Signed-off-by: Sami Kerola <kerolasa@iki.fi>
+---
+ tests/expected/last/last | 16 ++++++++--------
+ 1 file changed, 8 insertions(+), 8 deletions(-)
+
+diff --git a/tests/expected/last/last b/tests/expected/last/last
+index 2ff5cc1..dfb140b 100644
+--- a/tests/expected/last/last
++++ b/tests/expected/last/last
+@@ -1,6 +1,6 @@
+ ~~~ basic output ~~~
+ rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14)
+-torvalds linux hobby Mon Aug 26 00:57 still logged in
++torvalds linux hobby Mon Aug 26 00:57 gone - no logout
+ reboot system boot system-name Wed Aug 28 18:00 still running
+ reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00)
+ IPv4 root dns-server Wed Aug 28 13:00 - 14:00 (01:00)
+@@ -17,7 +17,7 @@ accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00)
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ include system ~~~
+ rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14)
+-torvalds linux hobby Mon Aug 26 00:57 still logged in
++torvalds linux hobby Mon Aug 26 00:57 gone - no logout
+ reboot system boot system-name Wed Aug 28 18:00 still running
+ shutdown system down system-name Wed Aug 28 17:00 - 18:00 (01:00)
+ reboot system boot system-name Wed Aug 28 16:00 - 17:00 (01:00)
+@@ -47,16 +47,16 @@ IPv4 root Wed Aug 28 13:00 - 14:00 (01:00) a.root-servers.net
+
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ show ip ~~~
+-torvalds linux 128.214.205.14 Mon Aug 26 00:57 still logged in
++torvalds linux 128.214.205.14 Mon Aug 26 00:57 gone - no logout
+
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ no host ~~~
+-torvalds linux Mon Aug 26 00:57 still logged in
++torvalds linux Mon Aug 26 00:57 gone - no logout
+
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ full times ~~~
+ rick long never-gonna-logo Thu Jan 1 00:00:00 1970 - Tue Jan 19 03:14:07 2038 (24855+03:14)
+-torvalds linux hobby Mon Aug 26 00:57:08 1991 still logged in
++torvalds linux hobby Mon Aug 26 00:57:08 1991 gone - no logout
+ reboot system boot system-name Wed Aug 28 18:00:00 2013 still running
+ reboot system boot system-name Wed Aug 28 16:00:00 2013 - Wed Aug 28 17:00:00 2013 (01:00)
+ IPv4 root dns-server Wed Aug 28 13:00:00 2013 - Wed Aug 28 14:00:00 2013 (01:00)
+@@ -73,7 +73,7 @@ accounti foo nine Wed Aug 28 03:00:00 2013 - Wed Aug 28 04:
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ no time ~~~
+ rick long never-gonna-logo (24855+03:14)
+-torvalds linux hobby logged in
++torvalds linux hobby - no logout
+ reboot system boot system-name running
+ reboot system boot system-name (01:00)
+ IPv4 root dns-server (01:00)
+@@ -90,7 +90,7 @@ accounti foo nine (01:00)
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ iso-8601 time ~~~
+ rick long never-gonna-logout 1970-01-01T00:00:00+0000 - 2038-01-19T03:14:07+0000 (24855+03:14)
+-torvalds linux hobby 1991-08-26T00:57:08+0000 still logged in
++torvalds linux hobby 1991-08-26T00:57:08+0000 gone - no logout
+ reboot system boot system-name 2013-08-28T18:00:00+0000 still running
+ reboot system boot system-name 2013-08-28T16:00:00+0000 - 2013-08-28T17:00:00+0000 (01:00)
+ IPv4 root dns-server 2013-08-28T13:00:00+0000 - 2013-08-28T14:00:00+0000 (01:00)
+@@ -115,7 +115,7 @@ accounti foo nine Wed Aug 28 03:00 - 04:00 (01:00)
+ wtmp begins Wed Aug 28 03:00:00 2013
+ ~~~ present ~~~
+ rick long never-gonna-logo Thu Jan 1 00:00 - 03:14 (24855+03:14)
+-torvalds linux hobby Mon Aug 26 00:57 still logged in
++torvalds linux hobby Mon Aug 26 00:57 gone - no logout
+ runlevel foo one Wed Aug 28 11:00 - 12:00 (01:00)
+
+ wtmp begins Wed Aug 28 03:00:00 2013
+--
+1.8.5.5
+
diff --git a/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch b/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch
new file mode 100644
index 000000000000..5148053d27e3
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.24-skip-last-tests.patch
@@ -0,0 +1,41 @@
+From 6b55612b9ad1193a042f3c3a1d9216e63b0d2907 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 22 Dec 2013 18:17:15 -0500
+Subject: [PATCH] tests: last: skip when last is not enabled
+
+References: https://bugs.gentoo.org/489794
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ tests/ts/last/ipv6 | 2 ++
+ tests/ts/last/last | 2 ++
+ 2 files changed, 4 insertions(+)
+
+diff --git a/tests/ts/last/ipv6 b/tests/ts/last/ipv6
+index 8e2b01e..60b72bd 100755
+--- a/tests/ts/last/ipv6
++++ b/tests/ts/last/ipv6
+@@ -18,6 +18,8 @@ TS_DESC="last ipv6"
+ . $TS_TOPDIR/functions.sh
+ ts_init "$*"
+
++[ -x $TS_CMD_LAST ] || ts_skip "last not enabled"
++
+ export LANG=C
+ export TZ=GMT
+
+diff --git a/tests/ts/last/last b/tests/ts/last/last
+index 4ad38cb..83b7f8d 100755
+--- a/tests/ts/last/last
++++ b/tests/ts/last/last
+@@ -18,6 +18,8 @@ TS_DESC="last"
+ . $TS_TOPDIR/functions.sh
+ ts_init "$*"
+
++[ -x $TS_CMD_LAST ] || ts_skip "last not enabled"
++
+ export LANG=C
+ export TZ=GMT
+
+--
+1.8.4.3
+
diff --git a/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch b/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch
new file mode 100644
index 000000000000..e694af548575
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.25-parallel-setarch.patch
@@ -0,0 +1,33 @@
+From 762b4d8691c46964dfc0d40dab772191538c807a Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@chromium.org>
+Date: Sun, 3 May 2015 23:37:04 -0400
+Subject: [PATCH] build-sys: fix parallel builds w/setarch links
+
+The symlink generation tries to write to the sys-utils/ subdir but does
+not make sure that dir exists. This can sometimes lead to parallel build
+failures when building out-of-tree like:
+...
+echo ".so man8/setarch.8" > sys-utils/linux64.8
+/bin/bash: sys-utils/linux64.8: No such file or directory
+Makefile:11503: recipe for target 'sys-utils/linux64.8' failed
+make: *** [sys-utils/linux64.8] Error 1
+
+URL: https://bugs.gentoo.org/511812
+Signed-off-by: Mike Frysinger <vapier@chromium.org>
+---
+ sys-utils/Makemodule.am | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -10806,6 +10806,7 @@ install-exec-hook:
+ @BUILD_VIPW_TRUE@ cd $(DESTDIR)$(usrsbin_execdir) && ln -sf vipw vigr
+
+ @BUILD_SETARCH_TRUE@$(SETARCH_MAN_LINKS):
++@BUILD_SETARCH_TRUE@ $(AM_V_at) test -d $(dir $@) || mkdir -p $(dir $@)
+ @BUILD_SETARCH_TRUE@ $(AM_V_GEN)echo ".so man8/setarch.8" > $@
+
+ @BUILD_SETARCH_TRUE@install-exec-hook-setarch:
+--
+2.4.0
+
diff --git a/sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch b/sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch
new file mode 100644
index 000000000000..f994a74a6696
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.25.1-blkid-probe-fix.patch
@@ -0,0 +1,43 @@
+From 00749bc366fe6106df918660a92a388cfff4f35f Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Tue, 7 Oct 2014 12:44:34 +0200
+Subject: [PATCH] libblkid: zeroize errno on blkid_probe_get_buffer() success
+
+Since 37f4060225df0591ab8e1dd676dbc8115d900d4f prober functions are
+sensitive to errno, it seems more robust to set errno=0 with in
+blkid_probe_get_buffer() on success than set the zero on all places
+where we call blkid_probe_get_buffer().
+
+Addresses: https://github.com/karelzak/util-linux/issues/119
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ libblkid/src/probe.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+diff --git a/libblkid/src/probe.c b/libblkid/src/probe.c
+index 4fea3cc..3f7e43b 100644
+--- a/libblkid/src/probe.c
++++ b/libblkid/src/probe.c
+@@ -539,8 +539,10 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr,
+ struct list_head *p;
+ struct blkid_bufinfo *bf = NULL;
+
+- if (pr->size <= 0)
++ if (pr->size <= 0) {
++ errno = EINVAL;
+ return NULL;
++ }
+
+ if (pr->parent &&
+ pr->parent->devno == pr->devno &&
+@@ -602,6 +604,7 @@ unsigned char *blkid_probe_get_buffer(blkid_probe pr,
+ list_add_tail(&bf->bufs, &pr->buffers);
+ }
+
++ errno = 0;
+ return off ? bf->data + (off - bf->off) : bf->data;
+ }
+
+--
+2.1.2
+
diff --git a/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch b/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch
new file mode 100644
index 000000000000..85c48114dbd2
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.25.2-runuser-bash-completion.patch
@@ -0,0 +1,33 @@
+https://bugs.gentoo.org/522288
+
+From a95987423c4d7781a14ffda34f082086cd51f4f7 Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Fri, 24 Oct 2014 12:08:22 -0400
+Subject: [PATCH] bash-completion: fix runuser install
+
+The runuser symlink used to depend on su being enabled, but a refactoring
+broke that. So if you build with runuser enabled but not su, you end up
+with a broken symlink. Rework the logic so it works in both cases.
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+---
+ bash-completion/Makemodule.am | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+diff --git a/bash-completion/Makemodule.am b/bash-completion/Makemodule.am
+index 271a6db..045c2d5 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -11071,7 +10823,8 @@
+ @BUILD_MOUNT_TRUE@@MAKEINSTALL_DO_SETUID_TRUE@ chmod 4755 $(DESTDIR)$(bindir)/umount
+
+ @BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@install-data-hook-bashcomp-runuser::
+-@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@ ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
++@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@@BUILD_SU_TRUE@ ln -sf su $(DESTDIR)$(bashcompletiondir)/runuser
++@BUILD_BASH_COMPLETION_TRUE@@BUILD_RUNUSER_TRUE@@BUILD_SU_FALSE@ cp $(top_srcdir)/bash-completion/su $(DESTDIR)$(bashcompletiondir)/runuser
+
+ clean-local-tests:
+ rm -rf $(top_builddir)/tests/output $(top_builddir)/tests/diff
+--
+2.1.2
+
diff --git a/sys-apps/util-linux/metadata.xml b/sys-apps/util-linux/metadata.xml
new file mode 100644
index 000000000000..8caf3fdd5a1d
--- /dev/null
+++ b/sys-apps/util-linux/metadata.xml
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+<use>
+ <flag name='caps'>build setpriv helper (run programs with diff capabilities)</flag>
+ <flag name='cramfs'>build mkfs/fsck helpers for cramfs filesystems</flag>
+ <flag name='cytune'>build cytune for Cyclades-Z multiport serial cards</flag>
+ <flag name='fdformat'>build fdformat (floppy disk format)</flag>
+ <flag name='pam'>build runuser helper</flag>
+ <flag name='suid'>
+ install mount/umount as setuid so non-root users may mount/umount devices,
+ and wall/write as setgid so non-root users can notify other users
+ </flag>
+ <flag name='tty-helpers'>install the mesg/wall/write tools for talking to local users</flag>
+</use>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:andries_brouwer:util-linux</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/sys-apps/util-linux/util-linux-2.24.1-r2.ebuild b/sys-apps/util-linux/util-linux-2.24.1-r2.ebuild
new file mode 100644
index 000000000000..7a4d58759964
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.24.1-r2.ebuild
@@ -0,0 +1,147 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 python-single-r1
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 m68k ~mips ~ppc ~ppc64 s390 sh ~sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="bash-completion caps +cramfs cytune fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( sys-libs/libselinux )
+ slang? ( sys-libs/slang )
+ udev? ( virtual/udev )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ epatch "${FILESDIR}"/${PN}-2.24-skip-last-tests.patch #491742
+ epatch "${FILESDIR}"/${PN}-2.24-last-tests.patch #501408
+ # http://marc.info/?l=util-linux-ng&m=140223032032288&w=2
+ epatch "${FILESDIR}"/${PN}-2.24-fix-fdisk-on-alpha.patch
+ find tests/ -name bigyear -delete #489794
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.c
+}
+
+src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(usex pam) #485486
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ --enable-fs-paths-extra=/usr/sbin:/bin:/usr/bin \
+ $(use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ $(use_enable bash-completion) \
+ $(use_enable caps setpriv) \
+ $(use_enable cramfs) \
+ $(use_enable cytune) \
+ $(use_enable fdformat) \
+ --with-ncurses=$(usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(use_enable tty-helpers wall) \
+ $(use_enable tty-helpers write) \
+ $(use_enable suid makeinstall-chown) \
+ $(use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(use_with slang) \
+ $(use_enable static-libs static) \
+ $(use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+src_test() {
+ emake check
+}
+
+src_install() {
+ default
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ use python && python_optimize
+
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount uuid
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.24.1-r3.ebuild b/sys-apps/util-linux/util-linux-2.24.1-r3.ebuild
new file mode 100644
index 000000000000..802a83849364
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.24.1-r3.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="bash-completion caps +cramfs cytune fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ udev? ( virtual/udev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ epatch "${FILESDIR}"/${PN}-2.24-skip-last-tests.patch #491742
+ epatch "${FILESDIR}"/${PN}-2.24-last-tests.patch #501408
+ # http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/9237
+ epatch "${FILESDIR}"/${PN}-2.24-fix-fdisk-on-alpha.patch
+ find tests/ -name bigyear -delete #489794
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ ECONF_SOURCE=${S} \
+ econf \
+ --docdir="/usr/share/doc/${PF}" \
+ --enable-fs-paths-extra=/usr/sbin:/bin:/usr/bin \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ $(multilib_native_use_enable bash-completion) \
+ $(multilib_native_use_enable caps setpriv) \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable cytune) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.24.2.ebuild b/sys-apps/util-linux/util-linux-2.24.2.ebuild
new file mode 100644
index 000000000000..8611c22e0efe
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.24.2.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs cytune fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ udev? ( virtual/udev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ epatch "${FILESDIR}"/${PN}-2.24-last-tests.patch #501408
+ # http://thread.gmane.org/gmane.linux.utilities.util-linux-ng/9237
+ epatch "${FILESDIR}"/${PN}-2.24-fix-fdisk-on-alpha.patch
+ find tests/ -name bigyear -delete #489794
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}" \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable cytune) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.25.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.25.1-r1.ebuild
new file mode 100644
index 000000000000..86dd9a675b02
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.25.1-r1.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ udev? ( virtual/udev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-blkid-probe-fix.patch
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.25.1.ebuild b/sys-apps/util-linux/util-linux-2.25.1.ebuild
new file mode 100644
index 000000000000..e2be221570df
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.25.1.ebuild
@@ -0,0 +1,173 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ udev? ( virtual/udev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.25.2-r1.ebuild b/sys-apps/util-linux/util-linux-2.25.2-r1.ebuild
new file mode 100644
index 000000000000..851ea3c3baed
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.25.2-r1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/udev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-runuser-bash-completion.patch #522288
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.25.2-r2.ebuild b/sys-apps/util-linux/util-linux-2.25.2-r2.ebuild
new file mode 100644
index 000000000000..a2f2aa3d0f03
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.25.2-r2.ebuild
@@ -0,0 +1,183 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/libudev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-runuser-bash-completion.patch #522288
+ epatch "${FILESDIR}"/${PN}-2.25-parallel-setarch.patch #511812
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.25.2.ebuild b/sys-apps/util-linux/util-linux-2.25.2.ebuild
new file mode 100644
index 000000000000..ee8c3e41cffc
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.25.2.ebuild
@@ -0,0 +1,174 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ udev? ( virtual/udev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-runuser-bash-completion.patch #522288
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.26.1-r1.ebuild b/sys-apps/util-linux/util-linux-2.26.1-r1.ebuild
new file mode 100644
index 000000000000..f16b9789a710
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.26.1-r1.ebuild
@@ -0,0 +1,178 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/libudev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.26.1.ebuild b/sys-apps/util-linux/util-linux-2.26.1.ebuild
new file mode 100644
index 000000000000..f9b8df0a11b1
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.26.1.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/libudev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.26.2.ebuild b/sys-apps/util-linux/util-linux-2.26.2.ebuild
new file mode 100644
index 000000000000..cd8859751d81
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.26.2.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/libudev:= )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-2.26.ebuild b/sys-apps/util-linux/util-linux-2.26.ebuild
new file mode 100644
index 000000000000..f9b8df0a11b1
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.26.ebuild
@@ -0,0 +1,177 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="4"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2 )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/libudev )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}
diff --git a/sys-apps/util-linux/util-linux-9999.ebuild b/sys-apps/util-linux/util-linux-9999.ebuild
new file mode 100644
index 000000000000..cd8859751d81
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-9999.ebuild
@@ -0,0 +1,182 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="5"
+
+PYTHON_COMPAT=( python2_7 python3_{3,4} )
+
+inherit eutils toolchain-funcs libtool flag-o-matic bash-completion-r1 \
+ python-single-r1 multilib-minimal systemd
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-${MY_PV}
+
+if [[ ${PV} == 9999 ]] ; then
+ inherit git-2 autotools
+ EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux/util-linux.git"
+else
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~amd64-linux ~arm-linux ~x86-linux"
+ SRC_URI="mirror://kernel/linux/utils/util-linux/v${PV:0:4}/${MY_P}.tar.xz"
+fi
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux/"
+
+LICENSE="GPL-2 LGPL-2.1 BSD-4 MIT public-domain"
+SLOT="0"
+IUSE="caps +cramfs fdformat ncurses nls pam python selinux slang static-libs +suid systemd test tty-helpers udev unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ !<sys-apps/sysvinit-2.88-r7
+ !sys-block/eject
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ !<app-shells/bash-completion-1.3-r2
+ caps? ( sys-libs/libcap-ng )
+ cramfs? ( sys-libs/zlib )
+ ncurses? ( >=sys-libs/ncurses-5.2-r2:=[unicode?] )
+ pam? ( sys-libs/pam )
+ python? ( ${PYTHON_DEPS} )
+ selinux? ( >=sys-libs/libselinux-2.2.2-r4[${MULTILIB_USEDEP}] )
+ slang? ( sys-libs/slang )
+ systemd? ( sys-apps/systemd )
+ udev? ( virtual/libudev:= )
+ abi_x86_32? (
+ !<=app-emulation/emul-linux-x86-baselibs-20140406-r2
+ !app-emulation/emul-linux-x86-baselibs[-abi_x86_32]
+ )"
+DEPEND="${RDEPEND}
+ virtual/pkgconfig
+ nls? ( sys-devel/gettext )
+ test? ( sys-devel/bc )
+ virtual/os-headers"
+
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+S=${WORKDIR}/${MY_P}
+
+pkg_setup() {
+ use python && python-single-r1_pkg_setup
+}
+
+src_prepare() {
+ if [[ ${PV} == 9999 ]] ; then
+ po/update-potfiles
+ eautoreconf
+ fi
+ elibtoolize
+}
+
+lfs_fallocate_test() {
+ # Make sure we can use fallocate with LFS #300307
+ cat <<-EOF > "${T}"/fallocate.${ABI}.c
+ #define _GNU_SOURCE
+ #include <fcntl.h>
+ main() { return fallocate(0, 0, 0, 0); }
+ EOF
+ append-lfs-flags
+ $(tc-getCC) ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} "${T}"/fallocate.${ABI}.c -o /dev/null >/dev/null 2>&1 \
+ || export ac_cv_func_fallocate=no
+ rm -f "${T}"/fallocate.${ABI}.c
+}
+
+multilib_src_configure() {
+ lfs_fallocate_test
+ # The scanf test in a run-time test which fails while cross-compiling.
+ # Blindly assume a POSIX setup since we require libmount, and libmount
+ # itself fails when the scanf test fails. #531856
+ tc-is-cross-compiler && export scanf_cv_alloc_modifier=ms
+ export ac_cv_header_security_pam_misc_h=$(multilib_native_usex pam) #485486
+ export ac_cv_header_security_pam_appl_h=$(multilib_native_usex pam) #545042
+ # We manually set --libdir to the default since on prefix, econf will set it to
+ # a value which the configure script does not recognize. This makes it set the
+ # usrlib_execdir to a bad value. bug #518898#c2, fixed upstream for >2.25
+ ECONF_SOURCE=${S} \
+ econf \
+ --enable-fs-paths-extra="${EPREFIX}/usr/sbin:${EPREFIX}/bin:${EPREFIX}/usr/bin" \
+ --libdir='${prefix}/'"$(get_libdir)" \
+ --docdir='${datarootdir}'/doc/${PF} \
+ $(multilib_native_use_enable nls) \
+ --enable-agetty \
+ --with-bashcompletiondir="$(get_bashcompdir)" \
+ --enable-bash-completion \
+ $(multilib_native_use_enable caps setpriv) \
+ --disable-chfn-chsh \
+ $(multilib_native_use_enable cramfs) \
+ $(multilib_native_use_enable fdformat) \
+ --with-ncurses=$(multilib_native_usex ncurses $(usex unicode auto yes) no) \
+ --disable-kill \
+ --disable-login \
+ $(multilib_native_use_enable tty-helpers mesg) \
+ --disable-nologin \
+ --enable-partx \
+ $(multilib_native_use_with python) \
+ --enable-raw \
+ --enable-rename \
+ --disable-reset \
+ --enable-schedutils \
+ --disable-su \
+ $(multilib_native_use_enable tty-helpers wall) \
+ $(multilib_native_use_enable tty-helpers write) \
+ $(multilib_native_use_enable suid makeinstall-chown) \
+ $(multilib_native_use_enable suid makeinstall-setuid) \
+ $(use_with selinux) \
+ $(multilib_native_use_with slang) \
+ $(use_enable static-libs static) \
+ $(multilib_native_use_with systemd) \
+ --with-systemdsystemunitdir=$(multilib_native_usex systemd "$(systemd_get_unitdir)" "no") \
+ $(multilib_native_use_with udev) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+multilib_src_compile() {
+ if multilib_is_native_abi; then
+ default
+ else
+ # build libraries only
+ emake -f Makefile -f - mylibs \
+ <<< 'mylibs: $(usrlib_exec_LTLIBRARIES) $(pkgconfig_DATA)'
+ fi
+}
+
+multilib_src_test() {
+ multilib_is_native_abi && emake check
+}
+
+multilib_src_install() {
+ if multilib_is_native_abi; then
+ default
+ else
+ emake DESTDIR="${D}" install-usrlib_execLTLIBRARIES \
+ install-pkgconfigDATA install-uuidincHEADERS \
+ install-nodist_blkidincHEADERS install-nodist_mountincHEADERS \
+ install-nodist_smartcolsincHEADERS install-nodist_fdiskincHEADERS
+ fi
+
+ if multilib_is_native_abi; then
+ # need the libs in /
+ gen_usr_ldscript -a blkid mount smartcols uuid
+
+ use python && python_optimize
+ fi
+}
+
+multilib_src_install_all() {
+ dodoc AUTHORS NEWS README* Documentation/{TODO,*.txt,releases/*}
+
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ prune_libtool_files
+}
+
+pkg_postinst() {
+ if ! use tty-helpers; then
+ elog "The mesg/wall/write tools have been disabled due to USE=-tty-helpers."
+ fi
+
+ if [[ -z ${REPLACING_VERSIONS} ]]; then
+ elog "The agetty util now clears the terminal by default. You"
+ elog "might want to add --noclear to your /etc/inittab lines."
+ fi
+}