Upgraded the e2fsprogs, e2fsprogs-libs Portage packages

Upgraded sys-libs/e2fsprogs-libs to version 1.41.14 on amd64
Upgraded sys-fs/e2fsprogs to version 1.41.14 on amd64

BUG=chromium-os:21256
TEST=ran build_image for alex and kaen, ran update engine unit tests

Change-Id: I35a4554afe7a2aecf01323e96f8c4f4c55059749
Reviewed-on: http://gerrit.chromium.org/gerrit/9875
Reviewed-by: Mike Frysinger <vapier@chromium.org>
Tested-by: Paul Taysom <taysom@google.com>
This commit is contained in:
Paul Taysom 2011-10-11 08:31:47 -07:00
parent f0ce64d092
commit ae8939fba8
8 changed files with 407 additions and 0 deletions

View File

@ -0,0 +1,146 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-fs/e2fsprogs/e2fsprogs-1.41.14.ebuild,v 1.4 2011/08/29 06:13:48 jer Exp $
EAPI="3"
inherit eutils flag-o-matic multilib toolchain-funcs
DESCRIPTION="Standard EXT2/EXT3/EXT4 filesystem utilities"
HOMEPAGE="http://e2fsprogs.sourceforge.net/"
SRC_URI="mirror://sourceforge/e2fsprogs/${P}.tar.gz"
LICENSE="GPL-2 BSD"
SLOT="0"
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 -x86-fbsd ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~m68k-mint"
IUSE="nls elibc_FreeBSD"
RDEPEND="~sys-libs/${PN}-libs-${PV}
>=sys-apps/util-linux-2.16
nls? ( virtual/libintl )"
DEPEND="${RDEPEND}
nls? ( sys-devel/gettext )
dev-util/pkgconfig
sys-apps/texinfo"
pkg_setup() {
if [[ ! -e ${EROOT}/etc/mtab ]] ; then
# add some crap to deal with missing /etc/mtab #217719
ewarn "No /etc/mtab file, creating one temporarily"
echo "${PN} crap for src_test" > "${EROOT}"/etc/mtab
fi
}
src_prepare() {
epatch "${FILESDIR}"/${PN}-1.38-tests-locale.patch #99766
epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
epatch "${FILESDIR}"/${PN}-1.41.12-getpagesize.patch
epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
# use symlinks rather than hardlinks
sed -i \
-e 's:$(LN) -f $(DESTDIR).*/:$(LN_S) -f :' \
{e2fsck,misc}/Makefile.in || die
epatch "${FILESDIR}"/${PN}-1.41.12-darwin-makefile.patch
if [[ ${CHOST} == *-mint* ]] ; then
epatch "${FILESDIR}"/${PN}-1.41-mint.patch
epatch "${FILESDIR}"/${PN}-1.41.12-mint-blkid.patch
fi
# blargh ... trick e2fsprogs into using e2fsprogs-libs
rm -rf doc
sed -i -r \
-e 's:@LIBINTL@:@LTLIBINTL@:' \
-e '/^LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@LIB_EXT@:-l\1:' \
-e '/^DEPLIB(COM_ERR|SS)/s:=.*:=:' \
MCONFIG.in || die "muck libs" #122368
sed -i -r \
-e '/^LIB_SUBDIRS/s:lib/(et|ss)::g' \
Makefile.in || die "remove subdirs"
sed -i \
-e '/^#define _XOPEN/i#define _GNU_SOURCE' \
misc/mke2fs.c || die # needs open64() prototype
# Avoid rebuild
touch lib/ss/ss_err.h
}
src_configure() {
# Keep the package from doing silly things #261411
export VARTEXFONTS=${T}/fonts
# We want to use the "bsd" libraries while building on Darwin, but while
# building on other Gentoo/*BSD we prefer elf-naming scheme.
local libtype
case ${CHOST} in
*-darwin*) libtype=--enable-bsd-shlibs ;;
*-mint*) libtype= ;;
*) libtype=--enable-elf-shlibs ;;
esac
ac_cv_path_LDCONFIG=: \
econf \
--with-root-prefix="${EPREFIX}/" \
${libtype} \
$(tc-has-tls || echo --disable-tls) \
--without-included-gettext \
$(use_enable nls) \
--disable-libblkid \
--disable-libuuid \
--disable-fsck \
--disable-uuidd
if [[ ${CHOST} != *-uclibc ]] && grep -qs 'USE_INCLUDED_LIBINTL.*yes' config.{log,status} ; then
eerror "INTL sanity check failed, aborting build."
eerror "Please post your ${S}/config.log file as an"
eerror "attachment to http://bugs.gentoo.org/show_bug.cgi?id=81096"
die "Preventing included intl cruft from building"
fi
}
src_compile() {
emake COMPILE_ET=compile_et MK_CMDS=mk_cmds || die
# Build the FreeBSD helper
if use elibc_FreeBSD ; then
cp "${FILESDIR}"/fsck_ext2fs.c .
emake fsck_ext2fs || die
fi
}
pkg_preinst() {
if [[ -r ${EROOT}/etc/mtab ]] ; then
if [[ $(<"${EROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
rm -f "${EROOT}"/etc/mtab
fi
fi
}
src_install() {
# need to set root_libdir= manually as any --libdir options in the
# econf above (i.e. multilib) will screw up the default #276465
emake \
STRIP=: \
root_libdir="${EPREFIX}/usr/$(get_libdir)" \
DESTDIR="${D}" \
install install-libs || die
dodoc README RELEASE-NOTES
insinto /etc
doins "${FILESDIR}"/e2fsck.conf || die
# Move shared libraries to /lib/, install static libraries to
# /usr/lib/, and install linker scripts to /usr/lib/.
set -- "${ED}"/usr/$(get_libdir)/*.a
set -- ${@/*\/lib}
gen_usr_ldscript -a "${@/.a}"
if use elibc_FreeBSD ; then
# Install helpers for us
into /
dosbin "${S}"/fsck_ext2fs || die
doman "${FILESDIR}"/fsck_ext2fs.8 || die
# filefrag is linux only
rm \
"${ED}"/usr/sbin/filefrag \
"${ED}"/usr/share/man/man8/filefrag.8 || die
fi
}

View File

@ -0,0 +1,6 @@
# See the e2fsck.conf man page for more info
[options]
# allow fsck to run sanely at any point in time #142850
buggy_init_scripts = yes

View File

@ -0,0 +1,26 @@
Since the tests analyze the output messages, force the default locale.
http://bugs.gentoo.org/99766
--- tests/test_script.in
+++ tests/test_script.in
@@ -3,6 +3,19 @@
# Test script for e2fsck
#
+# NLS nuisances.
+for as_var in \
+ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
+ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
+ LC_TELEPHONE LC_TIME
+do
+ if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
+ eval $as_var=C; export $as_var
+ else
+ unset $as_var
+ fi
+done
+
if test "$1"x = x ; then
TESTS=`ls -d $SRCDIR/[a-zA-Z]_* | $EGREP -v "\.failed|\.new"`
else

View File

@ -0,0 +1,11 @@
--- a/lib/ext2fs/ext2_fs.h
+++ b/lib/ext2fs/ext2_fs.h
@@ -414,7 +414,7 @@
#define i_size_high i_dir_acl
-#if defined(__KERNEL__) || defined(__linux__)
+#if defined(__KERNEL__) || defined(__linux__) || defined(__FreeBSD__)
#define i_reserved1 osd1.linux1.l_i_reserved1
#define i_frag osd2.linux2.l_i_frag
#define i_fsize osd2.linux2.l_i_fsize

View File

@ -0,0 +1,113 @@
On Darwin, create dylibs with a versioning scheme like Linux/ELF, not
like BSD/ELF.
This patch uses intentionally ELF_* vars to make it easier to diff
against the ELF Makefile.
http://sourceforge.net/tracker/index.php?func=detail&aid=2555389&group_id=2406&atid=302406
--- lib/Makefile.darwin-lib
+++ lib/Makefile.darwin-lib
@@ -1,14 +1,15 @@
#
-# This is a Makefile stub which handles the creation of Darwin BSD shared
-# libraries.
+# This is a Makefile stub which handles the creation of Darwin shared
+# libraries based on the ELF scheme.
#
# In order to use this stub, the following makefile variables must be defined.
-#
-# BSDLIB_VERSION = 1.0
-# BSDLIB_IMAGE = libce
-# BSDLIB_MYDIR = et
-# BSDLIB_INSTALL_DIR = $(SHLIBDIR)
-#
+#
+# ELF_VERSION = 1.0
+# ELF_SO_VERSION = 1
+# ELF_IMAGE = libce
+# ELF_MYDIR = et
+# ELF_INSTALL_DIR = $(SHLIBDIR)
+# ELF_OTHER_LIBS = -lc
all:: image
@@ -16,36 +17,58 @@
$(E) " MKDIR pic"
$(Q) mkdir -p pic
-BSD_LIB = $(BSDLIB_IMAGE).$(BSDLIB_VERSION).dylib
-BSDLIB_PIC_FLAG = -fPIC
+ELF_LIB = $(ELF_IMAGE).$(ELF_VERSION).dylib
+ELF_SONAME = $(ELF_IMAGE).$(ELF_SO_VERSION).dylib
-image: $(BSD_LIB)
+image: $(ELF_LIB)
-$(BSD_LIB): $(OBJS)
- $(E) " GEN_BSD_SOLIB $(BSD_LIB)"
- $(Q) (cd pic; $(CC) -dynamiclib -compatibility_version 1.0 -current_version $(BSDLIB_VERSION) \
- -flat_namespace -undefined warning -o $(BSD_LIB) $(OBJS))
- $(Q) $(MV) pic/$(BSD_LIB) .
- $(Q) $(RM) -f ../$(BSD_LIB)
+$(ELF_LIB): $(OBJS)
+ $(E) " GEN_ELF_SOLIB $(ELF_LIB)"
+ $(Q) (cd pic; $(CC) -dynamiclib -o $(ELF_LIB) $(LDFLAGS) \
+ -Wl,-install_name,$(libdir)/$(ELF_SONAME) $(OBJS) $(ELF_OTHER_LIBS))
+ $(Q) $(MV) pic/$(ELF_LIB) .
+ $(Q) $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).dylib ../$(ELF_SONAME)
$(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) \
- `echo $(my_dir) | sed -e 's;lib/;;'`/$(BSD_LIB) $(BSD_LIB))
- $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(BSD_LIB) $(BSDLIB_IMAGE).dylib)
-
-install-shlibs install:: $(BSD_LIB)
- $(E) " INSTALL_PROGRAM $(BSDLIB_INSTALL_DIR)/$(BSD_LIB)"
- $(Q) $(INSTALL_PROGRAM) $(BSD_LIB) \
- $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
- -$(Q) $(LDCONFIG)
+ `echo $(my_dir) | sed -e 's;lib/;;'`/$(ELF_LIB) $(ELF_LIB))
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_IMAGE).dylib)
+ $(Q) (cd ..; $(LN) $(LINK_BUILD_FLAGS) $(ELF_LIB) $(ELF_SONAME))
+
+installdirs-elf-lib::
+ $(E) " MKINSTALLDIRS $(ELF_INSTALL_DIR) $(libdir)"
+ $(Q) $(MKINSTALLDIRS) $(DESTDIR)$(ELF_INSTALL_DIR) \
+ $(DESTDIR)$(libdir)
+
+installdirs:: installdirs-elf-lib
+
+install-shlibs install:: $(ELF_LIB) installdirs-elf-lib
+ $(E) " INSTALL-ELF-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+ $(Q) $(INSTALL_PROGRAM) $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
+ $(E) " SYMLINK $(ELF_INSTALL_DIR)/$(ELF_SONAME)"
+ $(Q) $(LN_S) -f $(ELF_LIB) $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME)
+ $(E) " SYMLINK $(libdir)/$(ELF_IMAGE).dylib"
+ $(Q) if test "$(ELF_INSTALL_DIR)" = "$(libdir)"; then \
+ $(LN_S) -f $(ELF_SONAME) $(DESTDIR)$(libdir)/$(ELF_IMAGE).dylib ; \
+ else \
+ $(LN_S) -f $(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(DESTDIR)$(libdir)/$(ELF_IMAGE).dylib; \
+ fi
install-strip: install
+ $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+ $(Q) $(STRIP) --strip-unneeded --remove-section=.comment \
+ --remove-section=.note $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
install-shlibs-strip: install-shlibs
+ $(E) " STRIP-LIB $(ELF_INSTALL_DIR)/$(ELF_LIB)"
+ $(Q) $(STRIP) --strip-unneeded --remove-section=.comment \
+ --remove-section=.note $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB)
uninstall-shlibs uninstall::
- $(RM) -f $(DESTDIR)$(BSDLIB_INSTALL_DIR)/$(BSD_LIB)
+ $(RM) -f $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_LIB) \
+ $(DESTDIR)$(ELF_INSTALL_DIR)/$(ELF_SONAME) \
+ $(DESTDIR)$(libdir)/$(ELF_IMAGE).dylib
clean::
$(RM) -rf pic
- $(RM) -f $(BSD_LIB)
- $(RM) -f ../$(BSD_LIB)
- $(RM) -f ../$(BSDLIB_IMAGE).dylib
+ $(RM) -f $(ELF_LIB)
+ $(RM) -f ../$(ELF_LIB) ../$(ELF_IMAGE).dylib ../$(ELF_SONAME)

View File

@ -0,0 +1,42 @@
From 81c81f5421cb9b85e793c591595a0a4d6ee04e99 Mon Sep 17 00:00:00 2001
From: Mike Frysinger <vapier@gentoo.org>
Date: Sat, 4 Dec 2010 17:10:53 -0500
Subject: [PATCH] libext2fs: change getpagesize to sysconf
Newer versions of glibc no longer export the getpagesize() prototype when
using recent versions of POSIX (_XOPEN_SOURCE). So building tdb.c gives
use implicit function declaration warnings. Fix the issue by using the
portable sysconf() function which returns the same answer.
Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
lib/ext2fs/tdb.c | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/lib/ext2fs/tdb.c b/lib/ext2fs/tdb.c
index 0c82a24..43c5d44 100644
--- a/lib/ext2fs/tdb.c
+++ b/lib/ext2fs/tdb.c
@@ -111,10 +111,6 @@ typedef int bool;
#define u32 unsigned
#endif
-#ifndef HAVE_GETPAGESIZE
-#define getpagesize() 0x2000
-#endif
-
typedef u32 tdb_len_t;
typedef u32 tdb_off_t;
@@ -3838,7 +3834,7 @@ struct tdb_context *tdb_open_ex(const char *name, int hash_size, int tdb_flags,
tdb->hash_fn = hash_fn ? hash_fn : default_tdb_hash;
/* cache the page size */
- tdb->page_size = getpagesize();
+ tdb->page_size = sysconf(_SC_PAGESIZE);
if (tdb->page_size <= 0) {
tdb->page_size = 0x2000;
}
--
1.7.3.1

View File

@ -0,0 +1,10 @@
--- e2fsprogs-1.41.5/Makefile.in
+++ e2fsprogs-1.41.5/Makefile.in
@@ -281,6 +66,7 @@
uninstall: uninstall-progs-recursive uninstall-shlibs-libs-recursive uninstall-doc-libs
install-libs: install-libs-recursive
+install-libs-recursive: | install-shlibs-libs-recursive
uninstall-libs: uninstall-libs-recursive

View File

@ -0,0 +1,53 @@
# Copyright 1999-2011 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: /var/cvsroot/gentoo-x86/sys-libs/e2fsprogs-libs/e2fsprogs-libs-1.41.14.ebuild,v 1.4 2011/08/29 06:12:49 jer Exp $
EAPI="2"
inherit toolchain-funcs
DESCRIPTION="e2fsprogs libraries (common error and subsystem)"
HOMEPAGE="http://e2fsprogs.sourceforge.net/"
SRC_URI="mirror://sourceforge/e2fsprogs/${P}.tar.gz"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS="~alpha amd64 arm hppa ~ia64 ~m68k ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc x86 ~x86-fbsd"
IUSE="nls elibc_glibc"
RDEPEND="elibc_glibc? ( >=sys-libs/glibc-2.6 )
!sys-libs/com_err
!sys-libs/ss
!<sys-fs/e2fsprogs-1.41.8"
DEPEND="nls? ( sys-devel/gettext )
dev-util/pkgconfig"
src_prepare() {
printf 'all:\n%%:;@:\n' > doc/Makefile.in # don't bother with docs #305613
}
src_configure() {
# We want to use the "bsd" libraries while building on Darwin, but while
# building on other Gentoo/*BSD we prefer elf-naming scheme.
local libtype
case ${CHOST} in
*-darwin*) libtype=bsd;;
*) libtype=elf;;
esac
# we use blkid/uuid from util-linux now
ac_cv_lib_uuid_uuid_generate=yes \
ac_cv_lib_blkid_blkid_get_cache=yes \
ac_cv_path_LDCONFIG=: \
econf \
--disable-libblkid \
--disable-libuuid \
--enable-${libtype}-shlibs \
$(tc-has-tls || echo --disable-tls) \
$(use_enable nls)
}
src_install() {
emake STRIP=: DESTDIR="${D}" install || die
gen_usr_ldscript -a com_err ss
}