aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-12-21 21:37:45 +0000
committerSven 'sleipnir' Rebhan <odinshorse@googlemail.com>2009-12-21 21:37:45 +0000
commite5006e38428e8a6a57dd056393788d6314a74721 (patch)
treeb0ec8508dbb7fa1f5ad069eaea89255a6d5de84c /sys-apps
parentBump version of udev and apply fix for pkgconfig file. Additional, removing t... (diff)
downloadembedded-cross-e5006e38428e8a6a57dd056393788d6314a74721.tar.gz
embedded-cross-e5006e38428e8a6a57dd056393788d6314a74721.tar.bz2
embedded-cross-e5006e38428e8a6a57dd056393788d6314a74721.zip
We need to call elibtoolize in util-linux to make it cross-compile. This is required to pull in a cross-compile-fixed libtool.
If elibtoolized is omitted, the packages libtool is used and the compilation fails during the relink phase.
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/util-linux/Manifest5
-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/util-linux-2.16.2.ebuild100
4 files changed, 184 insertions, 0 deletions
diff --git a/sys-apps/util-linux/Manifest b/sys-apps/util-linux/Manifest
new file mode 100644
index 0000000..a35118b
--- /dev/null
+++ b/sys-apps/util-linux/Manifest
@@ -0,0 +1,5 @@
+AUX crypto-loop.confd 412 RMD160 5e65febe9641a8362078fdae39b4ac955fb2e63b SHA1 2f881a24ff67115e74de7a11c66a34a745060864 SHA256 188c945e5e6c54cb14874057c625ff30b72fb33d3d5648e53de2f231a3375600
+AUX crypto-loop.initd 1729 RMD160 fa53920677d793cf98cad994e4dabd53e53d8d04 SHA1 19d3b7c4aa95cdadde2f6fb81a391081eae04f42 SHA256 b8329250c865e79a1e761d713c2270c99d5fe96e0d5a7ca646946fab65c4b810
+DIST util-linux-2.16.1-loop-aes.patch.bz2 58371 RMD160 d759cff55d8e45a007c1a08e57fc2fc71a01b403 SHA1 5d26a6bccb301cde31358a8caae30c4729347836 SHA256 e5e4e53d1d486b8ed1fbc68f44843e67a893e810c1d8074ba8ee7ffc47382966
+DIST util-linux-ng-2.16.2.tar.bz2 3521956 RMD160 8c27748d804ad00efb153bf62f8c74756413888b SHA1 ace7a87ea61154210d9a11dd66b1b49d8130a828 SHA256 b1c3f5986b97753f3f83338b36aa25fc1370d96734313047da257df489f9a3eb
+EBUILD util-linux-2.16.2.ebuild 2752 RMD160 80584aba5a8db96730bc05b60fa97da28a25ab3a SHA1 15197e91028cc1d5a0fc209538abc64cb6197e9d SHA256 ad27faee320d0aebb1804b591a37241ce92af04ecb59d6db8921f59161c8ebe1
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 0000000..6a88434
--- /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 0000000..853bae2
--- /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
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/files/crypto-loop.initd,v 1.4 2008/10/26 03:16:48 vapier Exp $
+
+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/util-linux-2.16.2.ebuild b/sys-apps/util-linux/util-linux-2.16.2.ebuild
new file mode 100644
index 0000000..9115376
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.16.2.ebuild
@@ -0,0 +1,100 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.16.2.ebuild,v 1.2 2009/12/01 04:52:17 vapier Exp $
+
+EAPI="2"
+
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git"
+inherit eutils libtool toolchain-funcs
+[[ ${PV} == "9999" ]] && inherit git autotools
+
+MY_PV=${PV/_/-}
+MY_P=${PN}-ng-${MY_PV}
+S=${WORKDIR}/${MY_P}
+
+DESCRIPTION="Various useful Linux utilities"
+HOMEPAGE="http://www.kernel.org/pub/linux/utils/util-linux-ng/"
+if [[ ${PV} == "9999" ]] ; then
+ SRC_URI=""
+ #KEYWORDS=""
+else
+ SRC_URI="mirror://kernel/linux/utils/util-linux-ng/v${PV:0:4}/${MY_P}.tar.bz2
+ loop-aes? ( http://dev.gentoo.org/~ssuominen/${PN}-2.16.1-loop-aes.patch.bz2 )"
+ KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+IUSE="crypt loop-aes nls old-linux perl selinux slang uclibc unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ >=sys-libs/ncurses-5.2-r2
+ !<sys-libs/e2fsprogs-libs-1.41.8
+ !<sys-fs/e2fsprogs-1.41.8
+ perl? ( dev-lang/perl )
+ selinux? ( sys-libs/libselinux )
+ slang? ( sys-libs/slang )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/os-headers"
+
+src_prepare() {
+ if [[ ${PV} == "9999" ]] ; then
+ autopoint --force
+ eautoreconf
+ else
+ use loop-aes && epatch "${WORKDIR}"/${PN}-2.16.1-loop-aes.patch
+
+ # We need this for a working cross-compilation to pull in fixed
+ # versions of libtool. Else the relink phase will fail...
+ elibtoolize
+ fi
+ use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
+}
+
+src_configure() {
+ econf \
+ $(use_enable nls) \
+ --enable-agetty \
+ --enable-cramfs \
+ $(use_enable old-linux elvtune) \
+ --disable-init \
+ --disable-kill \
+ --disable-last \
+ --disable-mesg \
+ --enable-partx \
+ --enable-raw \
+ --enable-rdev \
+ --enable-rename \
+ --disable-reset \
+ --disable-login-utils \
+ --enable-schedutils \
+ --disable-wall \
+ --enable-write \
+ --without-pam \
+ $(use unicode || echo --with-ncurses) \
+ $(use_with selinux) \
+ $(use_with slang) \
+ $(tc-has-tls || echo --disable-tls)
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "install failed"
+ dodoc AUTHORS NEWS README* TODO docs/*
+
+ if ! use perl ; then #284093
+ rm "${D}"/usr/bin/chkdupexe || die
+ rm "${D}"/usr/share/man/man1/chkdupexe.1 || die
+ fi
+
+ # need the libs in /
+ gen_usr_ldscript -a blkid uuid
+ # e2fsprogs-libs didnt install .la files, and .pc work fine
+ rm -f "${D}"/usr/$(get_libdir)/*.la
+
+ if use crypt ; then
+ newinitd "${FILESDIR}"/crypto-loop.initd crypto-loop || die
+ newconfd "${FILESDIR}"/crypto-loop.confd crypto-loop || die
+ fi
+}