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-fs/e2fsprogs
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-fs/e2fsprogs')
-rw-r--r--sys-fs/e2fsprogs/Manifest4
-rw-r--r--sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild138
-rw-r--r--sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild126
-rw-r--r--sys-fs/e2fsprogs/e2fsprogs-1.42.13.ebuild126
-rw-r--r--sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch45
-rw-r--r--sys-fs/e2fsprogs/files/e2fsck.conf6
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.38-tests-locale.patch26
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch11
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.41.5-makefile.patch91
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.41.8-makefile.patch10
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-e2fsck-fix-makefile-dependency.patch28
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-fix-build-cflags.patch13
-rw-r--r--sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch13
-rw-r--r--sys-fs/e2fsprogs/files/fsck_ext2fs.896
-rw-r--r--sys-fs/e2fsprogs/files/fsck_ext2fs.c147
-rw-r--r--sys-fs/e2fsprogs/metadata.xml9
16 files changed, 889 insertions, 0 deletions
diff --git a/sys-fs/e2fsprogs/Manifest b/sys-fs/e2fsprogs/Manifest
new file mode 100644
index 000000000000..ed319e26019b
--- /dev/null
+++ b/sys-fs/e2fsprogs/Manifest
@@ -0,0 +1,4 @@
+DIST e2fsprogs-1.41.7.tar.gz 4425159 SHA256 2e2eeb5201e952dd02b77f609a0e630acdbce5d2b823ec11668e34f6bfde2f2c SHA512 c17c5f23feb7747941e7f019f197cca1cd4a84c067ad27d1a578ae213c7d7274aa79f3a64c7d69515f3f94db80df01ca71d4af83e9ea84c578a7257205395f7c WHIRLPOOL f760d7e658a1c78835ca470d077c7076a21f727f7d0a2411f5428363d12b7cd1676e2f221be9d9d1f5843c25320f7ef2f896ea47c9d4dc91190e0bc7df89ef36
+DIST e2fsprogs-1.42.12.tar.gz 6381695 SHA256 e17846d91a0edd89fa59b064bde8f8e5cec5851e35f587bcccb4014dbd63186c SHA512 a4b03470ed8f3e6c353250d80807070b8d5529ce219f7ec3076af89bd7cd674fbd443aab4d07dccff74606c9f620e349da32b451e3896a0635f6c700419f7cbf WHIRLPOOL 15f85fe969b174a99f06d875afafc83cc3e85cde0d8f1d833cb045c30259b3bfa9293ee84eeb793d9c60ece2cba4ca6bacbb8c861f11f3b56bd863ca1a2296f2
+DIST e2fsprogs-1.42.13.tar.gz 6511931 SHA256 59993ff3a44f82e504561e0ebf95e8c8fa9f9f5746eb6a7182239605d2a4e2d4 SHA512 d341790f55c3bff34425369063757280b9ba6ac08f405e14f94f299345ae76c0dc6e90871b746cc98c73467448d888fe5bc029688b5eed5fd22c3c37bf285cd0 WHIRLPOOL 2b26e355ad8e378cc7402be5fd5f5abe0af2aa6a1214b357dca682b922aa07c97af427b369ef21ddb3ee731768234a5f5faf488b92a68b0175d07845dbe7783f
+DIST e2fsprogs-1.42.9-mint-r1.patch.xz 9012 SHA256 3904654080b7f7776e97b703d17e1b59ae1d6f5e0cf32193b86e986bc0a9b396 SHA512 591a7c80d65082eebcdc455028be6ade05c9aae96c94f654106be0facef330a8875dae82891e6e3ad2b48dece2b4e1c1940dbc47cd3eba3e6eea3b5ddba9a8fc WHIRLPOOL ae6fc015fa77bfbde7a4ba2205c014b655e736c4ed5cb63a913245c6c40fa0637b65fa3eec6399dd1793c494892b76e0bbc12ffa6ac9c39d4da27333d8bbf6c7
diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild
new file mode 100644
index 000000000000..6fdc1ddfc9c5
--- /dev/null
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.41.7-r1.ebuild
@@ -0,0 +1,138 @@
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+inherit eutils flag-o-matic toolchain-funcs multilib
+
+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"
+IUSE="nls elibc_FreeBSD"
+
+RDEPEND="~sys-libs/${PN}-libs-${PV}
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+ sys-apps/texinfo"
+
+pkg_setup() {
+ if [[ ! -e ${ROOT}/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" > "${ROOT}"/etc/mtab
+ fi
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}"/${PN}-1.38-tests-locale.patch #99766
+ epatch "${FILESDIR}"/${PN}-1.41.5-makefile.patch
+ epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
+ epatch "${FILESDIR}"/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch #276352
+ # 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"
+ # stupid configure script clobbers CC for us
+ sed -i \
+ -e '/if test -z "$CC" ; then CC=cc; fi/d' \
+ configure || die "touching configure"
+
+ # we want to build the blkid/findfs binaries, but not the libs
+ sed -i \
+ -e '/BLKID_CMT=/s:BLKID_CMT:LIBBLKID_CMT:g' \
+ configure || die "touching configure for blkid"
+ sed -i \
+ -e '/BLKID_LIB_SUBDIR/s:@BLKID_CMT@:@LIBBLKID_CMT@:g' \
+ Makefile.in || die "remove blkid subdir better"
+ append-cppflags -DCONFIG_BUILD_FINDFS #275923
+
+ # Avoid rebuild
+ touch lib/ss/ss_err.h
+}
+
+src_compile() {
+ # 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=bsd;;
+ *) libtype=elf;;
+ esac
+
+ ac_cv_path_LDCONFIG=: \
+ econf \
+ --with-root-prefix=/ \
+ --enable-${libtype}-shlibs \
+ --with-ldopts="${LDFLAGS}" \
+ $(tc-has-tls || echo --disable-tls) \
+ --without-included-gettext \
+ $(use_enable nls) \
+ $(use_enable userland_GNU fsck) \
+ --disable-libblkid \
+ --disable-libuuid \
+ || die
+ 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
+ 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 ${ROOT}/etc/mtab ]] ; then
+ if [[ $(<"${ROOT}"/etc/mtab) == "${PN} crap for src_test" ]] ; then
+ rm -f "${ROOT}"/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="/$(get_libdir)" \
+ DESTDIR="${D}" \
+ install install-libs || die
+ dodoc README RELEASE-NOTES
+
+ if use elibc_FreeBSD ; then
+ # Install helpers for us
+ into /
+ dosbin "${S}"/fsck_ext2fs || die
+ doman "${FILESDIR}"/fsck_ext2fs.8
+
+ # these manpages are already provided by FreeBSD libc
+ # and filefrag is linux only
+ rm -f \
+ "${D}"/usr/sbin/filefrag \
+ "${D}"/usr/share/man/man8/filefrag.8 \
+ "${D}"/usr/bin/uuidgen \
+ "${D}"/usr/share/man/man3/{uuid,uuid_compare}.3 \
+ "${D}"/usr/share/man/man1/uuidgen.1 || die
+ fi
+}
diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild
new file mode 100644
index 000000000000..3eb862835d44
--- /dev/null
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.42.12.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+case ${PV} in
+*_pre*) UP_PV="${PV%_pre*}-WIP-${PV#*_pre}" ;;
+*) UP_PV=${PV} ;;
+esac
+
+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/${PN}-${UP_PV}.tar.gz
+ elibc_mintlib? ( mirror://gentoo/${PN}-1.42.9-mint-r1.patch.xz )"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~m68k-mint"
+IUSE="nls static-libs elibc_FreeBSD"
+
+RDEPEND="~sys-libs/${PN}-libs-${PV}
+ >=sys-apps/util-linux-2.16
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+ sys-apps/texinfo"
+
+S=${WORKDIR}/${P%_pre*}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
+ epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
+ if [[ ${CHOST} == *-mint* ]] ; then
+ epatch "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch
+ fi
+ epatch "${FILESDIR}"/${PN}-1.42.10-fix-build-cflags.patch #516854
+
+ # blargh ... trick e2fsprogs into using e2fsprogs-libs
+ rm -rf doc
+ sed -i -r \
+ -e 's:@LIBINTL@:@LTLIBINTL@:' \
+ -e '/^(STATIC_)?LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@(STATIC_)?LIB_EXT@:-l\1:' \
+ -e '/^DEP(STATIC_)?LIB(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"
+ ln -s $(which mk_cmds) lib/ss/ || die
+
+ # Avoid rebuild
+ echo '#include_next <ss/ss_err.h>' > lib/ss/ss_err.h
+}
+
+src_configure() {
+ # Keep the package from doing silly things #261411
+ export VARTEXFONTS=${T}/fonts
+
+ # needs open64() prototypes and friends
+ append-cppflags -D_GNU_SOURCE
+
+ ac_cv_path_LDCONFIG=: \
+ econf \
+ --with-root-prefix="${EPREFIX}/" \
+ --enable-symlink-install \
+ $(tc-is-static-only || echo --enable-elf-shlibs) \
+ $(tc-has-tls || echo --disable-tls) \
+ --without-included-gettext \
+ $(use_enable nls) \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-quota \
+ --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 V=1 COMPILE_ET=compile_et MK_CMDS=mk_cmds
+
+ # Build the FreeBSD helper
+ if use elibc_FreeBSD ; then
+ cp "${FILESDIR}"/fsck_ext2fs.c .
+ emake V=1 fsck_ext2fs
+ 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
+ dodoc README RELEASE-NOTES
+
+ insinto /etc
+ doins "${FILESDIR}"/e2fsck.conf
+
+ # Move shared libraries to /lib/, install static libraries to
+ # /usr/lib/, and install linker scripts to /usr/lib/.
+ gen_usr_ldscript -a e2p ext2fs
+ # configure doesn't have an option to disable static libs :/
+ use static-libs || find "${D}" -name '*.a' -delete
+
+ if use elibc_FreeBSD ; then
+ # Install helpers for us
+ into /
+ dosbin "${S}"/fsck_ext2fs
+ doman "${FILESDIR}"/fsck_ext2fs.8
+
+ # filefrag is linux only
+ rm \
+ "${ED}"/usr/sbin/filefrag \
+ "${ED}"/usr/share/man/man8/filefrag.8 || die
+ fi
+}
diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.42.13.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.42.13.ebuild
new file mode 100644
index 000000000000..03e558ff6e4e
--- /dev/null
+++ b/sys-fs/e2fsprogs/e2fsprogs-1.42.13.ebuild
@@ -0,0 +1,126 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=4
+
+case ${PV} in
+*_pre*) UP_PV="${PV%_pre*}-WIP-${PV#*_pre}" ;;
+*) UP_PV=${PV} ;;
+esac
+
+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/${PN}-${UP_PV}.tar.gz
+ elibc_mintlib? ( mirror://gentoo/${PN}-1.42.9-mint-r1.patch.xz )"
+
+LICENSE="GPL-2 BSD"
+SLOT="0"
+KEYWORDS="alpha amd64 arm ~arm64 hppa ia64 ~m68k ~mips ppc ppc64 ~s390 ~sh sparc x86 -x86-fbsd ~amd64-linux ~arm-linux ~x86-linux ~m68k-mint"
+IUSE="nls static-libs elibc_FreeBSD"
+
+RDEPEND="~sys-libs/${PN}-libs-${PV}
+ >=sys-apps/util-linux-2.16
+ nls? ( virtual/libintl )"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )
+ virtual/pkgconfig
+ sys-apps/texinfo"
+
+S=${WORKDIR}/${P%_pre*}
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-1.41.8-makefile.patch
+ epatch "${FILESDIR}"/${PN}-1.40-fbsd.patch
+ if [[ ${CHOST} == *-mint* ]] ; then
+ epatch "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch
+ fi
+ epatch "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854
+
+ # blargh ... trick e2fsprogs into using e2fsprogs-libs
+ rm -rf doc
+ sed -i -r \
+ -e 's:@LIBINTL@:@LTLIBINTL@:' \
+ -e '/^(STATIC_)?LIB(COM_ERR|SS)/s:[$][(]LIB[)]/lib([^@]*)@(STATIC_)?LIB_EXT@:-l\1:' \
+ -e '/^DEP(STATIC_)?LIB(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"
+ ln -s $(which mk_cmds) lib/ss/ || die
+
+ # Avoid rebuild
+ echo '#include_next <ss/ss_err.h>' > lib/ss/ss_err.h
+}
+
+src_configure() {
+ # Keep the package from doing silly things #261411
+ export VARTEXFONTS=${T}/fonts
+
+ # needs open64() prototypes and friends
+ append-cppflags -D_GNU_SOURCE
+
+ ac_cv_path_LDCONFIG=: \
+ econf \
+ --with-root-prefix="${EPREFIX}/" \
+ --enable-symlink-install \
+ $(tc-is-static-only || echo --enable-elf-shlibs) \
+ $(tc-has-tls || echo --disable-tls) \
+ --without-included-gettext \
+ $(use_enable nls) \
+ --disable-libblkid \
+ --disable-libuuid \
+ --disable-quota \
+ --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 V=1 COMPILE_ET=compile_et MK_CMDS=mk_cmds
+
+ # Build the FreeBSD helper
+ if use elibc_FreeBSD ; then
+ cp "${FILESDIR}"/fsck_ext2fs.c .
+ emake V=1 fsck_ext2fs
+ 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
+ dodoc README RELEASE-NOTES
+
+ insinto /etc
+ doins "${FILESDIR}"/e2fsck.conf
+
+ # Move shared libraries to /lib/, install static libraries to
+ # /usr/lib/, and install linker scripts to /usr/lib/.
+ gen_usr_ldscript -a e2p ext2fs
+ # configure doesn't have an option to disable static libs :/
+ use static-libs || find "${D}" -name '*.a' -delete
+
+ if use elibc_FreeBSD ; then
+ # Install helpers for us
+ into /
+ dosbin "${S}"/fsck_ext2fs
+ doman "${FILESDIR}"/fsck_ext2fs.8
+
+ # filefrag is linux only
+ rm \
+ "${ED}"/usr/sbin/filefrag \
+ "${ED}"/usr/share/man/man8/filefrag.8 || die
+ fi
+}
diff --git a/sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch b/sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch
new file mode 100644
index 000000000000..979bf74a0ea8
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/0001-resize2fs-Fix-error-message-so-the-mountpoint-is-pri.patch
@@ -0,0 +1,45 @@
+https://bugs.gentoo.org/276352
+
+From 3a4d9869d47c462c84688b0f8b15df5ab6f93381 Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Thu, 2 Jul 2009 13:54:22 -0400
+Subject: [PATCH] resize2fs: Fix error message so the mountpoint is printed correctly
+
+The resize2fs program was freeing the mountpoint information too
+early, so garbage was getting printed instead of the correct
+information in an error message.
+
+Addresses-Debian-Bug: #535452
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+---
+ resize/main.c | 5 ++---
+ 1 files changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/resize/main.c b/resize/main.c
+index 9b03ba9..2dae161 100644
+--- a/resize/main.c
++++ b/resize/main.c
+@@ -250,10 +250,8 @@ int main (int argc, char ** argv)
+ device_name);
+ exit(1);
+ }
+- if (!(mount_flags & EXT2_MF_MOUNTED) || (mtpt[len-1] == 0)) {
+- free(mtpt);
++ if (!(mount_flags & EXT2_MF_MOUNTED) || (mtpt[len-1] == 0))
+ break;
+- }
+ free(mtpt);
+ len = 2 * len;
+ }
+@@ -453,6 +451,7 @@ int main (int argc, char ** argv)
+ ((flags & RESIZE_PERCENT_COMPLETE) ?
+ resize_progress_func : 0));
+ }
++ free(mtpt);
+ if (retval) {
+ com_err(program_name, retval, _("while trying to resize %s"),
+ device_name);
+--
+1.6.3.3
+
diff --git a/sys-fs/e2fsprogs/files/e2fsck.conf b/sys-fs/e2fsprogs/files/e2fsck.conf
new file mode 100644
index 000000000000..401cec45eec1
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsck.conf
@@ -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
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.38-tests-locale.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.38-tests-locale.patch
new file mode 100644
index 000000000000..6c316ac2a38b
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.38-tests-locale.patch
@@ -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
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch
new file mode 100644
index 000000000000..7d0919600d05
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch
@@ -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
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.41.5-makefile.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.41.5-makefile.patch
new file mode 100644
index 000000000000..010a09aafabe
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.41.5-makefile.patch
@@ -0,0 +1,91 @@
+--- e2fsprogs-1.41.5/e2fsck/Makefile.in
++++ e2fsprogs-1.41.5/e2fsck/Makefile.in
+@@ -195,12 +195,12 @@
+ @echo " LINK $(root_sbindir)/fsck.ext2"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
++ @$(LN_S) -f e2fsck \
+ $(DESTDIR)$(root_sbindir)/fsck.ext2
+ @echo " LINK $(root_sbindir)/fsck.ext3"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
++ @$(LN_S) -f e2fsck \
+ $(DESTDIR)$(root_sbindir)/fsck.ext3
+ @echo " LINK $(root_sbindir)/fsck.ext4"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
++ @$(LN_S) -f e2fsck \
+ $(DESTDIR)$(root_sbindir)/fsck.ext4
+ @echo " LINK $(root_sbindir)/fsck.ext4dev"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/e2fsck \
++ @$(LN_S) -f e2fsck \
+ $(DESTDIR)$(root_sbindir)/fsck.ext4dev
+@@ -221,12 +221,12 @@
+ @echo " LINK $(man8dir)/fsck.ext2.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \
++ @$(LN_S) -f e2fsck.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext2.8
+ @echo " LINK $(man8dir)/fsck.ext3.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \
++ @$(LN_S) -f e2fsck.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext3.8
+ @echo " LINK $(man8dir)/fsck.ext4.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \
++ @$(LN_S) -f e2fsck.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext4.8
+ @echo " LINK $(man8dir)/fsck.ext4.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/e2fsck.8 \
++ @$(LN_S) -f e2fsck.8 \
+ $(DESTDIR)$(man8dir)/fsck.ext4dev.8
+--- e2fsprogs-1.41.5/misc/Makefile.in
++++ e2fsprogs-1.41.5/misc/Makefile.in
+@@ -394,19 +394,19 @@
+ @echo " LINK $(root_sbindir)/mkfs.ext2"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
++ @$(LN_S) -f mke2fs \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext2
+ @echo " LINK $(root_sbindir)/mkfs.ext3"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
++ @$(LN_S) -f mke2fs \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext3
+ @echo " LINK $(root_sbindir)/mkfs.ext4"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
++ @$(LN_S) -f mke2fs \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext4
+ @echo " LINK $(root_sbindir)/mkfs.ext4dev"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/mke2fs \
++ @$(LN_S) -f mke2fs \
+ $(DESTDIR)$(root_sbindir)/mkfs.ext4dev
+ @echo " LINK $(root_sbindir)/e2label"
+- @$(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
++ @$(LN_S) -f tune2fs \
+ $(DESTDIR)$(root_sbindir)/e2label
+ @if test -n "$(FINDFS_LINK)"; then \
+ echo " LINK $(root_sbindir)/findfs"; \
+- $(LN) -f $(DESTDIR)$(root_sbindir)/tune2fs \
++ $(LN_S) -f tune2fs \
+ $(DESTDIR)$(root_sbindir)/$(FINDFS_LINK); \
+@@ -431,12 +431,12 @@
+ @echo " LINK mkfs.ext2.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
++ @$(LN_S) -f mke2fs.8 \
+ $(DESTDIR)$(man8dir)/mkfs.ext2.8
+ @echo " LINK mkfs.ext3.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
++ @$(LN_S) -f mke2fs.8 \
+ $(DESTDIR)$(man8dir)/mkfs.ext3.8
+ @echo " LINK mkfs.ext4.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
++ @$(LN_S) -f mke2fs.8 \
+ $(DESTDIR)$(man8dir)/mkfs.ext4.8
+ @echo " LINK mkfs.ext4dev.8"
+- @$(LN) -f $(DESTDIR)$(man8dir)/mke2fs.8 \
++ @$(LN_S) -f mke2fs.8 \
+ $(DESTDIR)$(man8dir)/mkfs.ext4dev.8
+--- 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
+
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.41.8-makefile.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.41.8-makefile.patch
new file mode 100644
index 000000000000..b7d3d96856b5
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.41.8-makefile.patch
@@ -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
+
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-e2fsck-fix-makefile-dependency.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-e2fsck-fix-makefile-dependency.patch
new file mode 100644
index 000000000000..033084706f42
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-e2fsck-fix-makefile-dependency.patch
@@ -0,0 +1,28 @@
+From 5c15bf5f978bae01f1ca3cbe6414ab1d355a6adf Mon Sep 17 00:00:00 2001
+From: Theodore Ts'o <tytso@mit.edu>
+Date: Thu, 22 May 2014 18:52:27 -0400
+Subject: e2fsck: fix Makefile dependency for quota.o
+
+Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
+
+diff --git a/e2fsck/Makefile.in b/e2fsck/Makefile.in
+index 4b10f6f..f773fea 100644
+--- a/e2fsck/Makefile.in
++++ b/e2fsck/Makefile.in
+@@ -552,3 +552,13 @@ logfile.o: $(srcdir)/logfile.c $(top_builddir)/lib/config.h \
+ $(top_srcdir)/lib/quota/dqblk_v2.h $(top_srcdir)/lib/quota/quotaio_tree.h \
+ $(top_srcdir)/lib/../e2fsck/dict.h
+ prof_err.o: prof_err.c
++quota.o: $(srcdir)/quota.c $(top_builddir)/lib/config.h \
++ $(top_builddir)/lib/dirpaths.h $(srcdir)/e2fsck.h \
++ $(top_srcdir)/lib/ext2fs/ext2_fs.h $(top_builddir)/lib/ext2fs/ext2_types.h \
++ $(top_srcdir)/lib/ext2fs/ext2fs.h $(top_srcdir)/lib/ext2fs/ext3_extents.h \
++ $(top_srcdir)/lib/et/com_err.h $(top_srcdir)/lib/ext2fs/ext2_io.h \
++ $(top_builddir)/lib/ext2fs/ext2_err.h \
++ $(top_srcdir)/lib/ext2fs/ext2_ext_attr.h $(top_srcdir)/lib/ext2fs/bitops.h \
++ $(srcdir)/profile.h prof_err.h $(top_srcdir)/lib/quota/quotaio.h \
++ $(top_srcdir)/lib/quota/dqblk_v2.h $(top_srcdir)/lib/quota/quotaio_tree.h \
++ $(top_srcdir)/lib/../e2fsck/dict.h $(srcdir)/problem.h
+--
+cgit v0.10.1
+
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-fix-build-cflags.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-fix-build-cflags.patch
new file mode 100644
index 000000000000..69e6f358d9e1
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.10-fix-build-cflags.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/516854
+
+--- a/e2fsprogs-libs-1.42.10/configure
++++ b/e2fsprogs-libs-1.42.10/configure
+@@ -1328,7 +1328,7 @@
+ BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
+ BUILD_LDFLAGS="$LDFLAGS"
+ else
+- BUILD_CFLAGS=
++ BUILD_CFLAGS="$INCLUDES"
+ BUILD_LDFLAGS=
+ fi
+
diff --git a/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch
new file mode 100644
index 000000000000..dcab9a34de09
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch
@@ -0,0 +1,13 @@
+https://bugs.gentoo.org/516854
+
+--- e2fsprogs-1.42.13/configure
++++ e2fsprogs-1.42.13/configure
+@@ -1315,6 +1315,8 @@
+ if test $cross_compiling = no; then
+ BUILD_CFLAGS="$CFLAGS $CPPFLAGS $INCLUDES -DHAVE_CONFIG_H"
+ BUILD_LDFLAGS="$LDFLAGS"
++else
++ BUILD_CFLAGS="$INCLUDES"
+ fi
+
+
diff --git a/sys-fs/e2fsprogs/files/fsck_ext2fs.8 b/sys-fs/e2fsprogs/files/fsck_ext2fs.8
new file mode 100644
index 000000000000..54d269b81b96
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/fsck_ext2fs.8
@@ -0,0 +1,96 @@
+.TH fsck_ext2fs 8 2006-07-02 "Matthias Andree" "FreeBSD Ports"
+.\"
+.\" fsck_ext2fs.8 - manual page for fsck_ext2fs wrapper
+.\"
+.\" (C) Copyright 2006 by Matthias Andree <matthias.andree@gmx.de>
+.\"
+.\" License: This file may be redistributed in accordance with the terms
+.\" of the GNU General Public License v2.
+.\"
+.\" Upstream $Id$
+.\" $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.8,v 1.1 2006/07/04 15:47:51 leeym Exp $
+.\"
+.SH NAME
+.B fsck_ext2fs
+\- compatibility wrapper for e2fsck
+.SH SYNOPSIS
+.P
+.B fsck_ext2fs
+[\fB\-Fpfnyv\fR] [\fB\-b\fR \fIblock\fR]
+.SH DESCRIPTION
+.P
+\fBfsck_ext2fs\fR maps the traditional FreeBSD \fBfsck_ffs\fR options to
+options with the same functionality for \fBe2fsck,\fR runs \fBe2fsck\fR
+and then maps its exit status to values that FreeBSD understands.
+\fBe2fsck\fR is a utility to check and repair ext2 and ext3 file
+systems.
+
+.SH OPTIONS
+.IP \fB\-F\fR
+(check foreground mode required) Immediately exits with status 1 to tell
+\fBfsck\fR that ext2fs cannot be checked in the background. \fBfsck\fR
+usually runs \fBfsck_*\fR programs twice, first with \fB\-F\fR to find
+out if they can do background checking, then either immediately without
+\fB\-F\fR for foreground checking or deferred in the background with
+\fB\-B\fR.
+.IP \fB\-p\fR
+(preen mode) This option suppresses adding the \fB\-f\fR option (unless
+\fB\-f\fR is also given) and adds the \fB\-p\fR option to the
+\fBe2fsck\fR command line. This causes \fBe2fsck\fR to automatically fix
+any filesystem problems that can safely be fixed without operator
+intervention. Without this option given, \fBe2fsck\fR will be run with
+the \fB\-f\fR option to force a check, since interactive scan and repair
+mode is the default on FreeBSD, but not on Linux where \fBe2fsck\fR
+comes from.
+.IP \fB\-f\fR
+(force check) This option forces the check of a clean file system while
+preening and is passed to \fBe2fsck\fR verbatim.
+.IP \fB\-n\fR
+("no" mode) This option causes the file system to be opened in read-only
+mode and assume "no" as answer to all questions. This is the only way to
+safely run \fBfsck\fR on a mounted ext2 or ext3 file system. This option
+is passed to \fBe2fsck\fR verbatim.
+.IP \fB\-y\fR
+("yes" mode) This option is passed verbatim to \fBe2fsck\fR and causes
+it to assume "yes" as answer to all questions. This allows the
+non-interactive use of e2fsck but is rather aggressive. Use with care.
+.IP \fB\-v\fR
+(verbose output) This option is passed verbatim to \fBe2fsck\fR and
+causes it to verbosely report its progress.
+.IP "\fB\-b\fR \fIblock\fR"
+(use alternate super block) This option is passed verbatim to
+\fBe2fsck\fR and selects an alternate super block, for use when the
+primary super block has been damaged. Please see the \fBe2fsck\fR(8)
+manual page for details.
+
+.SH EXIT STATUS
+If errors remain after \fBe2fsck\fR, an invalid option or too many
+options have been specified, \fBe2fsck\fR was killed with a signal or
+the \fIfork\fB system call failed, \fBfsck_ext2fs\fR exits with status
+EXIT_FAILURE (usually 1). If \fBe2fsck\fR cannot be started, exits with
+status 127. If the file system is clean after \fBe2fsck\fR operation,
+exits with status EXIT_SUCCESS (0).
+
+.SH NOTES
+.P
+This utility is merely meant as an adaptor so that \fBe2fsck\fR can be
+run during the boot process, it does not support all options that
+\fBe2fsck\fR offers. If you need one of its advanced options, please run
+\fBe2fsck\fR directly.
+
+.SH FILES
+.TP
+.I /sbin/e2fsck
+is the location of the \fBe2fsck\fR program to run.
+
+.SH AUTHOR
+.P
+Matthias Andree <matthias.andree@gmx.de> wrote the program and this
+manual page.
+.SH CONFORMING TO
+The FreeBSD 6.1 command line interface for \fBfsck_ufs\fR(8).
+.SH SEE ALSO
+.BR fsck (8),
+.BR e2fsck (8)
+and
+.BR fsck_ufs (8).
diff --git a/sys-fs/e2fsprogs/files/fsck_ext2fs.c b/sys-fs/e2fsprogs/files/fsck_ext2fs.c
new file mode 100644
index 000000000000..c0a35de6792e
--- /dev/null
+++ b/sys-fs/e2fsprogs/files/fsck_ext2fs.c
@@ -0,0 +1,147 @@
+/*
+ * fsck_ext2fs - wrapper for e2fsck on FreeBSD
+ * Copyright (C) 2004,2006 Matthias Andree <matthias.andree@gmx.de>
+ * redistributable in accordance with the
+ * GNU General Public License v2
+ *
+ * $FreeBSD: ports/sysutils/e2fsprogs/files/fsck_ext2fs.c,v 1.5 2006/07/04 15:47:51 leeym Exp $
+ *
+ * Upstream: $Id$
+ *
+ * format: gindent -kr
+ */
+
+#include <sys/types.h>
+#include <unistd.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/wait.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+
+__attribute__ ((noreturn))
+static int die(const char *tag)
+{
+ perror(tag);
+ exit(EXIT_FAILURE);
+}
+
+int main(int argc, char **argv)
+{
+ int ch, i = 1, force = 0, status, verbose = 0, t;
+ long block = 0;
+ enum { normal, preen, yes, no } mode = normal;
+ char *cmd[256];
+ pid_t pid;
+
+ cmd[0] = "/sbin/e2fsck";
+ while ((ch = getopt(argc, argv, "BFpfnyb:v")) != -1) {
+ switch (ch) {
+ case 'p':
+ mode = preen;
+ break;
+ case 'f':
+ force = 1;
+ break;
+ case 'n':
+ mode = no;
+ break;
+ case 'y':
+ mode = yes;
+ break;
+ case 'b':
+ block = atol(optarg);
+ break;
+ case 'v':
+ verbose++;
+ break;
+ case 'F':
+ /* e2fsck does not support background checking,
+ * hence exit with nonzero status to force
+ * the foreground check. */
+ exit(1);
+ case 'B':
+ default:
+ fprintf(stderr, "%s: unknown option -%c\n",
+ argv[0], optopt);
+ exit(EXIT_FAILURE);
+ }
+ }
+
+ if (force)
+ cmd[i++] = "-f";
+
+ switch (mode) {
+ case normal:
+ /* FreeBSD needs -f to force a check only in context
+ * with -p -- so map normal to force to match
+ * expectations */
+ if (!force)
+ cmd[i++] = "-f";
+ break;
+ case yes:
+ cmd[i++] = "-y";
+ break;
+ case no:
+ cmd[i++] = "-n";
+ break;
+ case preen:
+ cmd[i++] = "-p";
+ break;
+ }
+
+ if (block) {
+ static char b[30];
+
+ sprintf(b, "-b %ld", block);
+ cmd[i++] = b;
+ }
+
+ /* silently limit verbose to 15 so we don't overflow the cmd array */
+ if (verbose > 15)
+ verbose = 15;
+
+ for (t = verbose; t > 1; t--)
+ cmd[i++] = "-v";
+
+ while (optind < argc) {
+ cmd[i++] = argv[optind++];
+ /* sanity check so we don't overflow the cmd buffer */
+ if (i+1 == sizeof(cmd)/sizeof(cmd[0])) {
+ errno = E2BIG;
+ die(argv[0]);
+ }
+ }
+
+ cmd[i++] = 0;
+
+ if (verbose) {
+ for (i=0; cmd[i]; i++)
+ fputs(cmd[i], stderr),
+ fputc(' ', stderr);
+ fputc('\n', stderr);
+ }
+
+ pid = fork();
+ switch (pid) {
+ case -1:
+ /* error */
+ die("fork");
+ break;
+ case 0:
+ /* child */
+ (void) execv(cmd[0], cmd);
+ perror("execve");
+ _exit(127);
+ default:
+ /* parent */
+ if (pid != waitpid(pid, &status, 0))
+ die("waitpid");
+ if (WIFSIGNALED(status)
+ || (WIFEXITED(status) && WEXITSTATUS(status) >= 4))
+ exit(EXIT_FAILURE);
+ }
+ exit(EXIT_SUCCESS);
+}
diff --git a/sys-fs/e2fsprogs/metadata.xml b/sys-fs/e2fsprogs/metadata.xml
new file mode 100644
index 000000000000..14bdacde2617
--- /dev/null
+++ b/sys-fs/e2fsprogs/metadata.xml
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>base-system</herd>
+ <upstream>
+ <remote-id type="cpe">cpe:/a:ext2_filesystems_utilities:e2fsprogs</remote-id>
+ <remote-id type="sourceforge">e2fsprogs</remote-id>
+ </upstream>
+</pkgmetadata>