diff options
author | Mike Frysinger <vapier@gentoo.org> | 2010-07-19 21:50:36 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2010-07-19 21:50:36 +0000 |
commit | f46e8de586e7f41bfde08370244ef9314ed8badc (patch) | |
tree | 3b6efc4649f44eb4df4fa87d040f7c732f6d67d9 /sys-apps/util-linux | |
parent | add ~arm, bug #301084 (diff) | |
download | gentoo-2-f46e8de586e7f41bfde08370244ef9314ed8badc.tar.gz gentoo-2-f46e8de586e7f41bfde08370244ef9314ed8badc.tar.bz2 gentoo-2-f46e8de586e7f41bfde08370244ef9314ed8badc.zip |
Pull in updates from live git ebuild. Apply upstream fix for cfdisk input issue #328959 by James L. Hammons. Update loop-aes patch #326363.
(Portage version: 2.2_rc67/cvs/Linux x86_64)
Diffstat (limited to 'sys-apps/util-linux')
-rw-r--r-- | sys-apps/util-linux/ChangeLog | 10 | ||||
-rw-r--r-- | sys-apps/util-linux/files/util-linux-2.18-cfdisk-string-len.patch | 59 | ||||
-rw-r--r-- | sys-apps/util-linux/util-linux-2.18-r1.ebuild | 114 |
3 files changed, 182 insertions, 1 deletions
diff --git a/sys-apps/util-linux/ChangeLog b/sys-apps/util-linux/ChangeLog index 0abfc80da76e..e18352a64f18 100644 --- a/sys-apps/util-linux/ChangeLog +++ b/sys-apps/util-linux/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for sys-apps/util-linux # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.314 2010/07/10 15:59:11 jer Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-apps/util-linux/ChangeLog,v 1.315 2010/07/19 21:50:36 vapier Exp $ + +*util-linux-2.18-r1 (19 Jul 2010) + + 19 Jul 2010; Mike Frysinger <vapier@gentoo.org> + +util-linux-2.18-r1.ebuild, + +files/util-linux-2.18-cfdisk-string-len.patch: + Pull in updates from live git ebuild. Apply upstream fix for cfdisk input + issue #328959 by James L. Hammons. Update loop-aes patch #326363. 10 Jul 2010; Jeroen Roovers <jer@gentoo.org> util-linux-2.17.2.ebuild: Stable for HPPA (bug #326339). diff --git a/sys-apps/util-linux/files/util-linux-2.18-cfdisk-string-len.patch b/sys-apps/util-linux/files/util-linux-2.18-cfdisk-string-len.patch new file mode 100644 index 000000000000..5b2d5f198ed7 --- /dev/null +++ b/sys-apps/util-linux/files/util-linux-2.18-cfdisk-string-len.patch @@ -0,0 +1,59 @@ +http://bugs.gentoo.org/328959 + +From 54a0fe298b4d6d948cffbd6fbbbe7dbabc9a6bb1 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Mon, 19 Jul 2010 22:52:58 +0200 +Subject: [PATCH] cfdisk: get_string not calculating correct limits + +Reported-by: James L. Hammons <jlhamm@acm.org> +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + fdisk/cfdisk.c | 11 ++++++++--- + 1 files changed, 8 insertions(+), 3 deletions(-) + +diff --git a/fdisk/cfdisk.c b/fdisk/cfdisk.c +index 7fa0b19..e7955fe 100644 +--- a/fdisk/cfdisk.c ++++ b/fdisk/cfdisk.c +@@ -421,6 +421,11 @@ fdexit(int ret) { + exit(ret); + } + ++/* ++ * Note that @len is size of @str buffer. ++ * ++ * Returns number of read bytes (without \0). ++ */ + static int + get_string(char *str, int len, char *def) { + size_t cells = 0, i = 0; +@@ -472,7 +477,7 @@ get_string(char *str, int len, char *def) { + break; + default: + #if defined(HAVE_LIBNCURSESW) && defined(HAVE_WIDECHAR) +- if (i < len && iswprint(c)) { ++ if (i + 1 < len && iswprint(c)) { + wchar_t wc = (wchar_t) c; + char s[MB_CUR_MAX + 1]; + int sz = wctomb(s, wc); +@@ -492,7 +497,7 @@ get_string(char *str, int len, char *def) { + putchar(BELL); + } + #else +- if (i < len && isprint(c)) { ++ if (i + 1 < len && isprint(c)) { + mvaddch(y, x + cells, c); + if (use_def) { + clrtoeol(); +@@ -2405,7 +2410,7 @@ change_id(int i) { + + sprintf(def, "%02X", new_id); + mvaddstr(COMMAND_LINE_Y, COMMAND_LINE_X, _("Enter filesystem type: ")); +- if ((len = get_string(id, 2, def)) <= 0 && len != GS_DEFAULT) ++ if ((len = get_string(id, 3, def)) <= 0 && len != GS_DEFAULT) + return; + + if (len != GS_DEFAULT) { +-- +1.7.1.1 + diff --git a/sys-apps/util-linux/util-linux-2.18-r1.ebuild b/sys-apps/util-linux/util-linux-2.18-r1.ebuild new file mode 100644 index 000000000000..f478eaf37ca0 --- /dev/null +++ b/sys-apps/util-linux/util-linux-2.18-r1.ebuild @@ -0,0 +1,114 @@ +# Copyright 1999-2010 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.18-r1.ebuild,v 1.1 2010/07/19 21:50:36 vapier Exp $ + +EAPI="2" + +EGIT_REPO_URI="git://git.kernel.org/pub/scm/utils/util-linux-ng/util-linux-ng.git" +inherit eutils toolchain-funcs libtool flag-o-matic +[[ ${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://loop-aes.sourceforge.net/updates/util-linux-ng-2.18-20100706.diff.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}"/util-linux-ng-*.diff + fi + use uclibc && sed -i -e s/versionsort/alphasort/g -e s/strverscmp.h/dirent.h/g mount/lomount.c + epatch "${FILESDIR}"/${P}-ncursesw.patch + epatch "${FILESDIR}"/${P}-slang.patch #326373 + epatch "${FILESDIR}"/${P}-cfdisk-string-len.patch #328959 + 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 + econf \ + --enable-fs-paths-extra=/usr/sbin \ + $(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-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 +} |