diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2017-10-09 18:53:29 +0100 |
commit | 4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch) | |
tree | ba5f07bf3f9d22d82e54a462313f5d244036c768 /sys-fs/e2fsprogs |
reinit the tree, so we can have metadata
Diffstat (limited to 'sys-fs/e2fsprogs')
-rw-r--r-- | sys-fs/e2fsprogs/Manifest | 18 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/e2fsprogs-1.43.3-r1.ebuild | 139 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/e2fsprogs-1.43.5.ebuild | 135 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/e2fsprogs-1.43.6.ebuild | 135 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsck.conf | 6 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.40-fbsd.patch | 11 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.41.8-makefile.patch | 10 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.42.13-fix-build-cflags.patch | 13 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/e2fsprogs-1.43-sysmacros.patch | 125 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/fsck_ext2fs.8 | 96 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/files/fsck_ext2fs.c | 147 | ||||
-rw-r--r-- | sys-fs/e2fsprogs/metadata.xml | 15 |
12 files changed, 850 insertions, 0 deletions
diff --git a/sys-fs/e2fsprogs/Manifest b/sys-fs/e2fsprogs/Manifest new file mode 100644 index 000000000000..e936b908fa6c --- /dev/null +++ b/sys-fs/e2fsprogs/Manifest @@ -0,0 +1,18 @@ +AUX e2fsck.conf 138 SHA256 c2864aa7c5c5bf27227909bdb9af395fc07294d1f93d372ef10c79309d7aec08 SHA512 d10a8ef566a60815b6f65414d84d23f3ec535c2a93cd780d4425488465f4eff6910c20d0163d1b7d334e9f4c707beab35bf63078b9ec3a5602763ea219bddbef WHIRLPOOL b05c69b375411efe850a993a244e26513d6e4a8c1cfb3ea91617a283c819a47f2200a459849285a0e60288e86869d624aeee0589f4a6b9243572c500671f3b31 +AUX e2fsprogs-1.40-fbsd.patch 352 SHA256 52865c6600fa0f601a89e4396797ae2d23a1ed895e64b098c36e8bcab1ac8505 SHA512 86374e641f958d7c4b53eb44abf7933af064b55a38fef6ca26f848bb63f0c6bf2966852c7cf0770337aef95ff965de95ef282205771e86be36e7ad74e8f81146 WHIRLPOOL b8889db0ced2312a06cbf2ca135340a9cb6c88aa0e3fc467f4cb4dc3c40c90f4be57d1678a735ef42a1d4b8313bcd1a3130d899cf5e9af39bfd13a37d1b1d449 +AUX e2fsprogs-1.41.8-makefile.patch 317 SHA256 f8a4e2180f557c3bb9a50c38300e406420b3df296f50d6eab59d0b28cb65904d SHA512 dbd738affe910d3812ca4d969a6d4295b09abc413cab23f29dcbd0c1e82eefa095a61a377c494dd9b7e1d189d4edadc469dbf2d1a1068c11dd5fc8311bd83f8f WHIRLPOOL f81ecb87217bb312bbbb08357f76b2d5d7c2dc9cdee69d37e67e7b34632f4a3f3d2bab66aa600fa98776808b30cada735de05135ac60a5c2f9b59daf88b7eb53 +AUX e2fsprogs-1.42.13-fix-build-cflags.patch 290 SHA256 3dc8246ee1d00d1ff4652aad0c4768d8a94317a5e8580507da33d23d8dbcf622 SHA512 fed2a8502fafb56a21c88d680a42848bdc8921b228f74842ce3f702279917b6e6c0d1204ee060ea0d2d5ebb02465fc1f3d1a4304068a59b45bf1ddfbdfd46507 WHIRLPOOL d68c4944734a67320a75f8e951b714b3fda08b220680797412ce946bb3c4f531074e4e8417ae92afec5b3d997ac20322f6e87c328b9269ef497a9a33da2c48e7 +AUX e2fsprogs-1.43-sysmacros.patch 3301 SHA256 63ca9a2808ddfa62832447b9c1b4cab939849a34648d3445e09eac72810e0035 SHA512 181d1f71eb6776357521115ccd85227ee5c83bb798f198624722dc71e96f44f301ea79034182000f123fb9fc05db67de51206ff398c1a95f59b0f4dda8ba9ac6 WHIRLPOOL 5114aaa517e64831c24763470698d2913f042aa4424ef905aa32cf518e0889fcc5b9944e8e4dc78301594827bbfe4364314d76421e5de4b40043edb3db507f97 +AUX fsck_ext2fs.8 3802 SHA256 e7f4778d173c031a1cc2dd222816a89ce42207ac96353d089f037650f28f1d1a SHA512 639af16c7881bdfca55a9cd39623d3eeb9ae0ca93f8e65321c69ab1b2591cb17cdd0cfc21d27c20b8cc65bd295cccf23e47f740fffb91f4cf17e32959bb166d0 WHIRLPOOL fc6892a98f5b40e32c252f74450fd4659fd873b9029f78429d03422daa920c4cb8d4fc2527259b7834b41d3d30c9dac50f70c05949edff11a1f539dcd275c62f +AUX fsck_ext2fs.c 2793 SHA256 7ec106ba31bf93dc334f946a88301d7eb26c2c35a65a7b8938b73c811e0d010c SHA512 1cac2963c0e85dd6a111bfe2a00f2b4f65c17a05bf0039cec073d4109ad4b0efee8905cff1a25098e0693f367db300054d92598a85dfbe8e5db7ff6419534af6 WHIRLPOOL 7290cf636ab232b8479b18acc97c2911109b1cf564df3352e1ccf87ef7693ad459face01436bb9a50edcc816a3adcb362cd8abf21ae3c839930d3d203cdb7f53 +DIST e2fsprogs-1.42.9-mint-r1.patch.xz 9012 SHA256 3904654080b7f7776e97b703d17e1b59ae1d6f5e0cf32193b86e986bc0a9b396 SHA512 591a7c80d65082eebcdc455028be6ade05c9aae96c94f654106be0facef330a8875dae82891e6e3ad2b48dece2b4e1c1940dbc47cd3eba3e6eea3b5ddba9a8fc WHIRLPOOL ae6fc015fa77bfbde7a4ba2205c014b655e736c4ed5cb63a913245c6c40fa0637b65fa3eec6399dd1793c494892b76e0bbc12ffa6ac9c39d4da27333d8bbf6c7 +DIST e2fsprogs-1.43.3-missing_uninit_bg.patch 1317 SHA256 4a4a59215efde3b0b398a19c9e74f73ae9bbbca954cf3e2aaaaa5f0a9f836313 SHA512 bd80dd679245c4d26837fa5a0f7dc6a05560973d912a3fe8f5c3c8c352675496f21c9b775d37fb190a7fbb3fb61882b6d4d6a20b34918cda0bfe65e7d0cce8e8 WHIRLPOOL a03a7461183b08ac178dc7d0c6a230df93d75902b0abc33ec0c7a19d018fdc4264910e688db4708bd16b23d175a3a9928e38c31f8377f7d28352bac83a8cd90f +DIST e2fsprogs-1.43.3.tar.gz 7405892 SHA256 ce8ef1bbb0d4730f170167284fda156ac9d6bf18db2750eb94af619a81b19927 SHA512 77e753f77222a0a7a334d7d93c900ea6cb339ed40af29952e414fc4e45d8c5c01d67771978a941195effe666df965746c2b31977c5f05ff307429b978dac8dea WHIRLPOOL c90dea3d01a103b7d11d0611b1b005748065ae90f15a02f3bde4c4baf9403931b40d2024297a2e02a92d11841d35decf8a4715d682212d4641ff34bb2f80d5db +DIST e2fsprogs-1.43.5.tar.gz 7596581 SHA256 466db1da11e227143fbdf6a401833e0ab17cf43d927f5baa4a7042b3ce8a3932 SHA512 c174a5110d59110cbc5e9982825993e18241a831b26bb5927447ad238172a51b5870b7431b38ce27f26761abf6af0249ddf1229f32be1c2ed58a67a9704991ed WHIRLPOOL 8aec75bd8e103226fb8d92da00cc52cdd86726336a34fd0cc54c0d85d816d190cb0f133aa2f271a637aaccab165a9c5b5feb0ad348d73685f1debd1d9ba91b03 +DIST e2fsprogs-1.43.6.tar.gz 7466907 SHA256 233d70ac434cdfba792dc0f83944c0ec854468d604fb22325ae65c4adfc90239 SHA512 95e3e7def177de921d3204aeace4cb8243d79872468d3289cace0547798c84e92af253022deb803cd8c045411283b01431728a86b14b9e8b45cdd5dca739db66 WHIRLPOOL 862769b1775d87297c30a242a2578971435115ebf381156f0c16078a2ad0e19f03e8af41c93d00d6324a11af6d4cf333b0a1a8fe3eee76fcbb47fc825f3481c5 +EBUILD e2fsprogs-1.43.3-r1.ebuild 4040 SHA256 8eda4767977a467c700bd79f9b4b1b70ccabf76b007db75498101fc6edfe977e SHA512 5053ec14ad968d6f4f8bb0cf0a227c0f56af71eaf0201fe7d53448c962f6f097aeb92b561381194aea58f5d3d99421d455ad50f280413d83ada6b281e1361c9c WHIRLPOOL 278072ab829a9e9ea8810b98d70f43211ab71b187b3500b0c9297ca337a308f1eecc6978ffe685da06988debe2059301b49cb7b67b035b977a200a5fe35d1c7b +EBUILD e2fsprogs-1.43.5.ebuild 3803 SHA256 25d55af84a2f9710128989a2d3882bac946bd1bef23e4027494f0fc6af5b91da SHA512 5ede2280b2d42c18e14315654f6dc092b02b757927ba1a4973417f514b6dc66f506dec85e69f1a0c00e177a3950b74bb42fe0994d15a50c2c83455cb7baeb7d9 WHIRLPOOL afd8d04b1ccef5a2b532b18992bf609844fb4fb52b74e1c3b5f67677d217d095f20389d089e447af4dd2f9f06a97a390123d1633b17e3dea23533dd985cc714f +EBUILD e2fsprogs-1.43.6.ebuild 3803 SHA256 25d55af84a2f9710128989a2d3882bac946bd1bef23e4027494f0fc6af5b91da SHA512 5ede2280b2d42c18e14315654f6dc092b02b757927ba1a4973417f514b6dc66f506dec85e69f1a0c00e177a3950b74bb42fe0994d15a50c2c83455cb7baeb7d9 WHIRLPOOL afd8d04b1ccef5a2b532b18992bf609844fb4fb52b74e1c3b5f67677d217d095f20389d089e447af4dd2f9f06a97a390123d1633b17e3dea23533dd985cc714f +MISC ChangeLog 7643 SHA256 c0cf2dd26e491ad39b3f867c0bd9296e10749d0f1838cb7cec65ba1d15e5956f SHA512 f46d87e5a695385f4642bb03316ceb7b622461d938c3af2c5e15836a07384cae7a573c86750217c3d49bf00b870187c248aaefa2bac1e819a6b21ae9e7f4b2cd WHIRLPOOL 0fe755f687bedb25e32f4d6050f77e6dcc4179e24211589fb6c10ceef98ad12e3bc2733a86db9de11bdaf618cf290901705fe947b30c87bab719f0182e44a036 +MISC ChangeLog-2015 48117 SHA256 fd49ccd4dc8e7a53c8cba64fb936f960ee7c58fcf4150485321b23475a193f84 SHA512 82134fcce2aaa6bf15f3339b79b657b4e0827a132cca8c89a6521f7c6bc1246d3d55cd46d6c9adbd5b3e6f458e9f4e5e267d10f4c9929f15c9cd985949f5ee85 WHIRLPOOL ed9f1377d27424101d492f92a515cdf60f723cd6f519ea8a82b16d46ec86c7f297b8224b6d2833c83a6ca5e4c6f2140e7155beb1ce0d45f503debc51d71b9db2 +MISC metadata.xml 520 SHA256 d7e8aff0886fa1a93bdd7f347cd5850753bc1cf1cf6eefde71e98a8aa6ac5eb4 SHA512 a5ff91610ed175147f1a9c2c725a30380908c02fc04c6b7df2792cb4fd805f9137374d2a910e456128a7bf2fec9e83af3063bcb5f2ad51394bed8bed648e3905 WHIRLPOOL 2f2712617962a77cc37b8761ec4965fd61654a084de695f72cb1c2a4a678a76dbb9cd4e1b5aed67ac6649f7222cb75f86bc36e24fce96a68f8448d33a733f69a diff --git a/sys-fs/e2fsprogs/e2fsprogs-1.43.3-r1.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.43.3-r1.ebuild new file mode 100644 index 000000000000..b2af3e041a6a --- /dev/null +++ b/sys-fs/e2fsprogs/e2fsprogs-1.43.3-r1.ebuild @@ -0,0 +1,139 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +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 + mirror://kernel/linux/kernel/people/tytso/e2fsprogs/v${UP_PV}/${PN}-${UP_PV}.tar.gz + elibc_mintlib? ( mirror://gentoo/${PN}-1.42.9-mint-r1.patch.xz )" + +# Fix for bug #598100 +SRC_URI+=" http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/patch/?id=d33e690fe7a6cbeb51349d9f2c7fb16a6ebec9c2 -> ${PN}-1.43.3-missing_uninit_bg.patch" + +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="fuse nls static-libs elibc_FreeBSD" + +RDEPEND="~sys-libs/${PN}-libs-${PV} + >=sys-apps/util-linux-2.16 + fuse? ( sys-fs/fuse ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + virtual/pkgconfig + sys-apps/texinfo" + +S=${WORKDIR}/${P%_pre*} + +PATCHES=( + "${FILESDIR}"/${PN}-1.41.8-makefile.patch + "${FILESDIR}"/${PN}-1.40-fbsd.patch + "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854 + "${FILESDIR}"/${PN}-1.43-sysmacros.patch + + # Upstream patches (can usually removed with next version bump) + "${DISTDIR}"/${P}-missing_uninit_bg.patch +) + +src_prepare() { + if [[ ${CHOST} == *-mint* ]] ; then + PATCHES+=( "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch ) + fi + + epatch "${PATCHES[@]}" + + # 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 fuse fuse2fs) \ + $(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 https://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.43.5.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.43.5.ebuild new file mode 100644 index 000000000000..e3cc852d20ef --- /dev/null +++ b/sys-fs/e2fsprogs/e2fsprogs-1.43.5.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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 + mirror://kernel/linux/kernel/people/tytso/e2fsprogs/v${UP_PV}/${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="fuse nls static-libs elibc_FreeBSD" + +RDEPEND="~sys-libs/${PN}-libs-${PV} + >=sys-apps/util-linux-2.16 + fuse? ( sys-fs/fuse ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + virtual/pkgconfig + sys-apps/texinfo" + +S="${WORKDIR}/${P%_pre*}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.41.8-makefile.patch + "${FILESDIR}"/${PN}-1.40-fbsd.patch + "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854 + + # Upstream patches (can usually removed with next version bump) +) + +src_prepare() { + if [[ ${CHOST} == *-mint* ]] ; then + PATCHES+=( "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch ) + fi + + default + + # 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 + + local myeconfargs=( + --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 fuse fuse2fs) + $(use_enable nls) + --disable-libblkid + --disable-libuuid + --disable-fsck + --disable-uuidd + ) + ac_cv_path_LDCONFIG=: econf "${myeconfargs[@]}" + 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 https://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.43.6.ebuild b/sys-fs/e2fsprogs/e2fsprogs-1.43.6.ebuild new file mode 100644 index 000000000000..e3cc852d20ef --- /dev/null +++ b/sys-fs/e2fsprogs/e2fsprogs-1.43.6.ebuild @@ -0,0 +1,135 @@ +# Copyright 1999-2017 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +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 + mirror://kernel/linux/kernel/people/tytso/e2fsprogs/v${UP_PV}/${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="fuse nls static-libs elibc_FreeBSD" + +RDEPEND="~sys-libs/${PN}-libs-${PV} + >=sys-apps/util-linux-2.16 + fuse? ( sys-fs/fuse ) + nls? ( virtual/libintl )" +DEPEND="${RDEPEND} + nls? ( sys-devel/gettext ) + virtual/pkgconfig + sys-apps/texinfo" + +S="${WORKDIR}/${P%_pre*}" + +PATCHES=( + "${FILESDIR}"/${PN}-1.41.8-makefile.patch + "${FILESDIR}"/${PN}-1.40-fbsd.patch + "${FILESDIR}"/${PN}-1.42.13-fix-build-cflags.patch #516854 + + # Upstream patches (can usually removed with next version bump) +) + +src_prepare() { + if [[ ${CHOST} == *-mint* ]] ; then + PATCHES+=( "${WORKDIR}"/${PN}-1.42.9-mint-r1.patch ) + fi + + default + + # 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 + + local myeconfargs=( + --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 fuse fuse2fs) + $(use_enable nls) + --disable-libblkid + --disable-libuuid + --disable-fsck + --disable-uuidd + ) + ac_cv_path_LDCONFIG=: econf "${myeconfargs[@]}" + 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 https://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/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.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.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.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/e2fsprogs-1.43-sysmacros.patch b/sys-fs/e2fsprogs/files/e2fsprogs-1.43-sysmacros.patch new file mode 100644 index 000000000000..2dbb40c1bd6e --- /dev/null +++ b/sys-fs/e2fsprogs/files/e2fsprogs-1.43-sysmacros.patch @@ -0,0 +1,125 @@ +From 30ef41f68703b6a16027cc8787118b87f1462dff Mon Sep 17 00:00:00 2001 +From: Mike Frysinger <vapier@gentoo.org> +Date: Mon, 28 Mar 2016 20:31:33 -0400 +Subject: [PATCH e2fsprogs] include sys/sysmacros.h as needed + +The minor/major/makedev macros are not entirely standard. glibc has had +the definitions in sys/sysmacros.h since the start, and wants to move away +from always defining them implicitly via sys/types.h (as this pollutes the +namespace in violation of POSIX). Other C libraries have already dropped +them. Since the configure script already checks for this header, use that +to pull in the header in files that use these macros. + +Signed-off-by: Mike Frysinger <vapier@gentoo.org> +--- + debugfs/debugfs.c | 3 +++ + lib/blkid/devname.c | 3 +++ + lib/blkid/devno.c | 3 +++ + lib/ext2fs/finddev.c | 3 +++ + lib/ext2fs/ismounted.c | 3 +++ + misc/create_inode.c | 4 ++++ + misc/mk_hugefiles.c | 3 +++ + 7 files changed, 22 insertions(+) + +diff --git a/debugfs/debugfs.c b/debugfs/debugfs.c +index ba8be40..7d481bc 100644 +--- a/debugfs/debugfs.c ++++ b/debugfs/debugfs.c +@@ -26,6 +26,9 @@ extern char *optarg; + #include <errno.h> + #endif + #include <fcntl.h> ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + + #include "debugfs.h" + #include "uuid/uuid.h" +diff --git a/lib/blkid/devname.c b/lib/blkid/devname.c +index 3e2efa9..671e781 100644 +--- a/lib/blkid/devname.c ++++ b/lib/blkid/devname.c +@@ -36,6 +36,9 @@ + #if HAVE_SYS_MKDEV_H + #include <sys/mkdev.h> + #endif ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + #include <time.h> + + #include "blkidP.h" +diff --git a/lib/blkid/devno.c b/lib/blkid/devno.c +index 479d977..61e6fc7 100644 +--- a/lib/blkid/devno.c ++++ b/lib/blkid/devno.c +@@ -31,6 +31,9 @@ + #if HAVE_SYS_MKDEV_H + #include <sys/mkdev.h> + #endif ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + + #include "blkidP.h" + +diff --git a/lib/ext2fs/finddev.c b/lib/ext2fs/finddev.c +index 311608d..62fa0db 100644 +--- a/lib/ext2fs/finddev.c ++++ b/lib/ext2fs/finddev.c +@@ -31,6 +31,9 @@ + #if HAVE_SYS_MKDEV_H + #include <sys/mkdev.h> + #endif ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + + #include "ext2_fs.h" + #include "ext2fs.h" +diff --git a/lib/ext2fs/ismounted.c b/lib/ext2fs/ismounted.c +index e0f69dd..7404996 100644 +--- a/lib/ext2fs/ismounted.c ++++ b/lib/ext2fs/ismounted.c +@@ -49,6 +49,9 @@ + #if HAVE_SYS_TYPES_H + #include <sys/types.h> + #endif ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + + #include "ext2_fs.h" + #include "ext2fs.h" +diff --git a/misc/create_inode.c b/misc/create_inode.c +index 4dbd8e5..98aeb41 100644 +--- a/misc/create_inode.c ++++ b/misc/create_inode.c +@@ -22,6 +22,10 @@ + #include <attr/xattr.h> + #endif + #include <sys/ioctl.h> ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif ++ + #include <ext2fs/ext2fs.h> + #include <ext2fs/ext2_types.h> + #include <ext2fs/fiemap.h> +diff --git a/misc/mk_hugefiles.c b/misc/mk_hugefiles.c +index 71a15c5..00e95cd 100644 +--- a/misc/mk_hugefiles.c ++++ b/misc/mk_hugefiles.c +@@ -35,6 +35,9 @@ extern int optind; + #include <sys/ioctl.h> + #include <sys/types.h> + #include <sys/stat.h> ++#ifdef HAVE_SYS_SYSMACROS_H ++#include <sys/sysmacros.h> ++#endif + #include <libgen.h> + #include <limits.h> + #include <blkid/blkid.h> +-- +2.8.2 + diff --git a/sys-fs/e2fsprogs/files/fsck_ext2fs.8 b/sys-fs/e2fsprogs/files/fsck_ext2fs.8 new file mode 100644 index 000000000000..aa31cf1db172 --- /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: fsck_ext2fs.8,v 1.3 2006/07/02 11:45:21 emma Exp $ +.\" $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..f5e3e5e9a8c9 --- /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: fsck_ext2fs.c,v 1.6 2006/07/02 11:37:49 emma Exp $ + * + * 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..ba8429b814c1 --- /dev/null +++ b/sys-fs/e2fsprogs/metadata.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="project"> + <email>base-system@gentoo.org</email> + <name>Gentoo Base System</name> +</maintainer> +<use> + <flag name='fuse'>Build fuse2fs, a FUSE file system client for ext2/ext3/ext4 file systems</flag> +</use> +<upstream> + <remote-id type="cpe">cpe:/a:ext2_filesystems_utilities:e2fsprogs</remote-id> + <remote-id type="sourceforge">e2fsprogs</remote-id> +</upstream> +</pkgmetadata> |