summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2009-05-23 21:14:31 +0000
committerMike Frysinger <vapier@gentoo.org>2009-05-23 21:14:31 +0000
commit9c43c5d2a99fd30be8bf7b4d0d841ba79e332390 (patch)
treeff89e77f8c2d481847e7c08e5c0ce90f957e4f18 /sys-apps
parentold (diff)
downloadgentoo-2-9c43c5d2a99fd30be8bf7b4d0d841ba79e332390.tar.gz
gentoo-2-9c43c5d2a99fd30be8bf7b4d0d841ba79e332390.tar.bz2
gentoo-2-9c43c5d2a99fd30be8bf7b4d0d841ba79e332390.zip
Grab fixes from upstream for #270168 by Tadas and #269264 by Mario Bachmann.
(Portage version: 2.2_rc33/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/util-linux/ChangeLog14
-rw-r--r--sys-apps/util-linux/files/util-linux-2.15-losetup-symlinks.patch48
-rw-r--r--sys-apps/util-linux/files/util-linux-2.15-old-libselinux.patch54
-rw-r--r--sys-apps/util-linux/util-linux-2.14.2.ebuild10
-rw-r--r--sys-apps/util-linux/util-linux-2.15-r1.ebuild96
5 files changed, 217 insertions, 5 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog
index b9cb55f1a49b..6928fd6e3444 100644
--- a/sys-apps/util-linux/ChangeLog
+++ b/sys-apps/util-linux/ChangeLog
@@ -1,6 +1,18 @@
# ChangeLog for sys-apps/util-linux
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.265 2009/05/18 17:41:13 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.266 2009/05/23 21:14:31 vapier Exp $
+
+ 23 May 2009; Mike Frysinger <vapier@gentoo.org> util-linux-2.14.2.ebuild,
+ files/util-linux-2.15-old-libselinux.patch:
+ Apply selinux fix from upstream for #270168 by Tadas.
+
+*util-linux-2.15-r1 (23 May 2009)
+
+ 23 May 2009; Mike Frysinger <vapier@gentoo.org> +util-linux-2.15-r1.ebuild,
+ +files/util-linux-2.15-losetup-symlinks.patch,
+ +files/util-linux-2.15-old-libselinux.patch:
+ Grab fixes from upstream for #270168 by Tadas and #269264 by Mario
+ Bachmann.
18 May 2009; Raúl Porcel <armin76@gentoo.org> util-linux-2.14.2.ebuild:
ia64/sparc stable wrt #268765
diff --git a/sys-apps/util-linux/files/util-linux-2.15-losetup-symlinks.patch b/sys-apps/util-linux/files/util-linux-2.15-losetup-symlinks.patch
new file mode 100644
index 000000000000..8dbd3288a42f
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.15-losetup-symlinks.patch
@@ -0,0 +1,48 @@
+http://bugs.gentoo.org/269264
+
+From 72f6902e435612f848cbe9993ce6298da8af996c Mon Sep 17 00:00:00 2001
+From: Mike Frysinger <vapier@gentoo.org>
+Date: Sun, 10 May 2009 16:57:31 -0400
+Subject: [PATCH] losetup: handle symlinks in /dev/loop/
+
+The loop_scandir() expects all the files in /dev/loop/ to be actual
+devices and not symlinks to devices. However, udev by default sets up
+symlinks in /dev/loop/ thereby breaking the fallback scan logic when
+looking for devices more than the default number of 8.
+
+Simple way to reproduce is:
+ - <detach all devices>
+ - cd /dev/loop
+ - rm -f [2-7]
+ - losetup 0 autogen.sh
+ - mv 1 8
+ - for n in {1..7} ; do ln -s 0 $n ; done
+ - losetup -f
+ <error but should have found /dev/loop/8>
+
+[kay.sievers@vrfy.org:
+ just a note, udev does not do that by default. It is
+ devfs-nonsense, which the "default" never did.]
+
+Signed-off-by: Mike Frysinger <vapier@gentoo.org>
+Reported-by: Mario Bachmann <grafgrimm77@gmx.de>
+---
+ mount/lomount.c | 2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+diff --git a/mount/lomount.c b/mount/lomount.c
+index d62198e..c173409 100644
+--- a/mount/lomount.c
++++ b/mount/lomount.c
+@@ -256,7 +256,7 @@ loop_scandir(const char *dirname, int **ary, int hasprefix)
+ *ary = NULL;
+
+ while((d = readdir(dir))) {
+- if (d->d_type != DT_BLK && d->d_type != DT_UNKNOWN)
++ if (d->d_type != DT_BLK && d->d_type != DT_UNKNOWN && d->d_type != DT_LNK)
+ continue;
+ n = name2minor(hasprefix, d->d_name);
+ if (n == -1 || n < NLOOPS_DEFAULT)
+--
+1.6.3
+
diff --git a/sys-apps/util-linux/files/util-linux-2.15-old-libselinux.patch b/sys-apps/util-linux/files/util-linux-2.15-old-libselinux.patch
new file mode 100644
index 000000000000..337e54327ae8
--- /dev/null
+++ b/sys-apps/util-linux/files/util-linux-2.15-old-libselinux.patch
@@ -0,0 +1,54 @@
+http://bugs.gentoo.org/270168
+
+From 28d39b6dd71e6a054aa06c66f683a1e15439e56b Mon Sep 17 00:00:00 2001
+From: Karel Zak <kzak@redhat.com>
+Date: Thu, 21 May 2009 13:20:10 +0200
+Subject: [PATCH] mount: fix undefined reference to `security_get_initial_context'
+MIME-Version: 1.0
+Content-Type: text/plain; charset=utf-8
+Content-Transfer-Encoding: 8bit
+
+> Gentoo-hardened stable have: sys-libs/libselinux-1.34.14
+> I have:
+> mount.c:(.text+0x12ce): undefined reference to `security_get_initial_context'
+
+Reported-by: Максим Бритов <maxim.britov@gmail.com>
+Addresses-Gentoo-Bug: #270168
+Signed-off-by: Karel Zak <kzak@redhat.com>
+---
+ configure.ac | 5 +++++
+ mount/mount.c | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index af946a1..b174bce 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -656,6 +656,11 @@ fi
+ if test "x$have_selinux" = xyes; then
+ SELINUX_LIBS="-lselinux -lsepol"
+ SELINUX_LIBS_STATIC="-lselinux -lsepol"
++ old_LDFLAGS="$LDFLAGS"
++ LDFLAGS="$LDFLAGS $SELINUX_LIBS"
++ # This function is missing in old libselinux 1.xx versions
++ AC_CHECK_FUNCS([security_get_initial_context])
++ LDFLAGS="$old_LDFLAGS"
+ fi
+ AC_SUBST([SELINUX_LIBS])
+ AC_SUBST([SELINUX_LIBS_STATIC])
+diff --git a/mount/mount.c b/mount/mount.c
+index f48f9d4..cc5b88a 100644
+--- a/mount/mount.c
++++ b/mount/mount.c
+@@ -1561,7 +1561,7 @@ mount_retry:
+
+ out:
+
+-#ifdef HAVE_LIBSELINUX
++#if defined(HAVE_LIBSELINUX) && defined(HAVE_SECURITY_GET_INITIAL_CONTEXT)
+ if (res != EX_FAIL && verbose && is_selinux_enabled() > 0) {
+ security_context_t raw = NULL, def = NULL;
+
+--
+1.6.3
+
diff --git a/sys-apps/util-linux/util-linux-2.14.2.ebuild b/sys-apps/util-linux/util-linux-2.14.2.ebuild
index 567a4b2c4515..5a1b9b69962c 100644
--- a/sys-apps/util-linux/util-linux-2.14.2.ebuild
+++ b/sys-apps/util-linux/util-linux-2.14.2.ebuild
@@ -1,10 +1,10 @@
# 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.14.2.ebuild,v 1.9 2009/05/18 17:41:13 armin76 Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/util-linux-2.14.2.ebuild,v 1.10 2009/05/23 21:14:31 vapier Exp $
EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git"
-inherit eutils
-[[ ${PV} == "9999" ]] && inherit git
+inherit eutils autotools
+[[ ${PV} == "9999" ]] && inherit git autotools
MY_PV=${PV/_/-}
MY_P=${PN}-ng-${MY_PV}
@@ -38,12 +38,14 @@ src_unpack() {
if [[ ${PV} == "9999" ]] ; then
git_src_unpack
cd "${S}"
- ./autogen.sh || die
+ eautoreconf
else
unpack ${A}
cd "${S}"
#epatch "${FILESDIR}"/${PN}-2.13-uclibc.patch #203711
+ epatch "${FILESDIR}"/${PN}-2.15-old-libselinux.patch #270168
use loop-aes && epatch "${WORKDIR}"/util-linux-ng-*.diff
+ eautoreconf
fi
use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
}
diff --git a/sys-apps/util-linux/util-linux-2.15-r1.ebuild b/sys-apps/util-linux/util-linux-2.15-r1.ebuild
new file mode 100644
index 000000000000..5d70a76c09d6
--- /dev/null
+++ b/sys-apps/util-linux/util-linux-2.15-r1.ebuild
@@ -0,0 +1,96 @@
+# 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.15-r1.ebuild,v 1.1 2009/05/23 21:14:31 vapier Exp $
+
+EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git"
+inherit eutils autotools
+[[ ${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=""
+else
+ SRC_URI="mirror://kernel/linux/utils/util-linux-ng/v${PV:0:4}/${MY_P}.tar.bz2
+ loop-aes? ( http://loop-aes.sourceforge.net/updates/util-linux-ng-2.15-20090511.diff.bz2 )"
+fi
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86"
+IUSE="crypt loop-aes nls old-linux selinux slang uclibc unicode"
+
+RDEPEND="!sys-process/schedutils
+ !sys-apps/setarch
+ >=sys-libs/ncurses-5.2-r2
+ >=sys-libs/e2fsprogs-libs-1.41
+ selinux? ( sys-libs/libselinux )
+ slang? ( sys-libs/slang )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/os-headers"
+
+src_unpack() {
+ if [[ ${PV} == "9999" ]] ; then
+ git_src_unpack
+ cd "${S}"
+ eautoreconf
+ else
+ unpack ${A}
+ cd "${S}"
+ #epatch "${FILESDIR}"/${PN}-2.13-uclibc.patch #203711
+ epatch "${FILESDIR}"/${P}-cpuid-pic.patch #269001
+ epatch "${FILESDIR}"/${P}-losetup-symlinks.patch #269264
+ epatch "${FILESDIR}"/${P}-old-libselinux.patch #270168
+ use loop-aes && epatch "${WORKDIR}"/util-linux-ng-*.diff
+ eautoreconf
+ fi
+ use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c
+}
+
+src_compile() {
+ econf \
+ --with-fsprobe=blkid \
+ $(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) \
+ || die "configure failed"
+ emake || die "emake failed"
+}
+
+src_install() {
+ emake install DESTDIR="${D}" || die "install failed"
+ dodoc AUTHORS NEWS README* TODO docs/*
+
+ if use crypt ; then
+ newinitd "${FILESDIR}"/crypto-loop.initd crypto-loop || die
+ newconfd "${FILESDIR}"/crypto-loop.confd crypto-loop || die
+ fi
+}
+
+pkg_postinst() {
+ ewarn "The loop-aes code has been split out of USE=crypt and into USE=loop-aes."
+ ewarn "If you need support for it, make sure to update your USE accordingly."
+}