diff --git a/sys-fs/aufs3/Manifest b/sys-fs/aufs3/Manifest index a63e3e9a..753514f8 100644 --- a/sys-fs/aufs3/Manifest +++ b/sys-fs/aufs3/Manifest @@ -56,6 +56,8 @@ AUX pax-2_kernel-3.7.patch 2278 SHA256 b0e36e7ae28750a7bac6bea991c61b5069de2ef08 AUX pax.patch 4821 SHA256 c82946d79fd3826803aacf5533aa398c8c7e7516a0c8c88a56aa75e27af3c7ad SHA512 96c9f131da09fb138d60ff8d4c2a0ccb2518f8477b3dd04f81db4b53be006dfa21a487b9ba524ea479a4621b8678ed073467932b6c9ca10c8abb0af5ec9e9330 WHIRLPOOL 99bc6cae56608b8fbc0ff81b1822a76dfa9307b6c18a7ba2708dc5e6771cfad136906821b1cabf584012afe1683f5b74ff6da3d85a08c83226a070b4d192b333 DIST aufs3-3_p20130207.tar.xz 2440192 SHA256 69b23941605adc9dd7eb03c789b6368acf1cb498df29dc917e9cc56df2dbfdce SHA512 88048c2419b459a169b7a114d242476cf52770121428d7de2fbcee1869e87ead7a6a1a9f9a6fa3b9be6b19459544f0d8bba014d3c2cd8a1b1bc4a2015e25c02e WHIRLPOOL 0f9ee7664d61856d35b99d475ebf872ee9c8a197909b9ab4f4bc51e0be1a26f182cc69588f801e3dbcee9e1d46de172aea9dea6e275787e2275b9659dafb8bd8 DIST aufs3-3_p20130306.tar.xz 2569220 SHA256 0511c77a337d33d958fd684dec0d3fdd9f1c307850dad68acc11e6d9c0433bab SHA512 087a2b2972962f9214c4fba0ac1ddec74c1786f9a5573a297aa5985dfd8d2924d37b877e4835e5cbd39eaff4f776ed0001edac17e64988a95bea3bbcd32bbc87 WHIRLPOOL bd62325388f66ac608064b1f87779ae530539ba5267700b1d3511eca8f26a853b949007011e38e42ab95a69b4e1efd10a52647d3703abcd72788a592d2256256 +DIST aufs3-standalone-3_p20130318.tar.xz 2396080 SHA256 1c2e473581e64597c8ba3937c65242cf79fa7a842a35830a852ed4b29bc7e78e SHA512 67ab11d69249fdf2e83eb4945823f2e3bd35bc1e4c673870e9496284969f0b123f823ef73f43913d4e6cc1fcea8f230b8d64e18f47b3e1816d422702d926008c WHIRLPOOL 024fc2526192e98441c112667c513980dff475d5922ac4b0be5e832fb457e633b38ae2cee0e305065fbc9636cc78d0a1ef11222277333d1c135f0bb2fe7aaada EBUILD aufs3-3_p20130207-r1.ebuild 5173 SHA256 2f775791e1d199409b8388546d0ca632a06c87b613c251254eac9f11b888d559 SHA512 f537c17d174b1e31825b87cd1edd555e79eb2f317f4f4d70c436e6125f41c76856bb12169705e3143220697195f1706c4de26a086e24398ea003b1d91aee48ac WHIRLPOOL acd443f5a9ca45a0f76fc4c6d944ffe5a8b5dce8736e641a13f686c4ca62f303e26c0cbb0c68b0a4e8ad189af19d82dc69aa0406b633432bcedb22e0c1ce300a EBUILD aufs3-3_p20130306-r1.ebuild 5173 SHA256 227f35b09a7e85832bc15461c7eb06e81d2f483b72ad9335b5eedb1a64def2b6 SHA512 1c1905e9de91da7a797285efd486ed64e547dc086653596449d47d6987d0b65b88d597ac7154a4b28ed43c1ee1ccad31c365477163d360b763001b9207d55e07 WHIRLPOOL e51a6d823015e660c27c94a6db31a14b1223b66e79a63ce4dbd93386bdc4a51b532624081b57d10d7a27f95410367f315843984f09f27675ef09aa36eb87d813 +EBUILD aufs3-3_p20130318-r1.ebuild 4402 SHA256 90e52b1dce90e10b8154a9f627e17ca409b4a76a33fe20fc24cbdd9cedea3915 SHA512 830431887d4fc5c2862c003b0bffdf6d2ce67b120cedf495af72d3895e2dab53a86879042bd55302afa8ccb9ff07d441b531ed14f2dbd3dccbf73c50ea0514d0 WHIRLPOOL e87e0c0d82365d1f357409bda43d824e7687d4214f9e79569361555a14c9779bc4aae80d6e405cb3e6b103ff42fd05e7089360ec6a9a490ca74a8c80a7df9f5b MISC metadata.xml 717 SHA256 3c55d0a76fa9856c7079674c14f0bfa18c454848aa652f26669b207905ee09aa SHA512 28a8b5b0e55ea607135f34da28025698b578bd6db14f48865ed4996745fccda6a05b0882a5fd13185005517b577231f6c1e01b192add81fddfd0e66b86fc8d4c WHIRLPOOL cd4f9b75f8b5aa5dad559af879445a86740c7cdfab6bd7d97d3ddba5596c139ed2c52b5447b66698078f476a65c3b4355d9f6377e70a54d9cd063e060a0ce2ce diff --git a/sys-fs/aufs3/aufs3-3_p20130318-r1.ebuild b/sys-fs/aufs3/aufs3-3_p20130318-r1.ebuild new file mode 100644 index 00000000..bc8b2913 --- /dev/null +++ b/sys-fs/aufs3/aufs3-3_p20130318-r1.ebuild @@ -0,0 +1,148 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs3/aufs3-3_p20130318.ebuild,v 1.1 2013/03/15 09:36:59 jlec Exp $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib toolchain-funcs + +AUFS_VERSION="${PV%%_p*}" +# highest branch version +PATCH_MAX_VER=8 +# highest supported version +KERN_MAX_VER=9 +# highest util branch version +UTIL_MAX_VER=0 + +DESCRIPTION="An entirely re-designed and re-implemented Unionfs" +HOMEPAGE="http://aufs.sourceforge.net/" +SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs3-standalone-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~x86" +IUSE="debug doc fuse hfs inotify kernel-patch nfs pax_kernel ramfs" + +DEPEND=" + dev-util/patchutils + dev-vcs/git" +RDEPEND=" + !sys-fs/aufs-util + !sys-fs/aufs + !sys-fs/aufs2" + +S="${WORKDIR}"/${PN}-standalone + +MODULE_NAMES="aufs(misc:${S})" + +pkg_setup() { + CONFIG_CHECK+=" ~EXPERIMENTAL !AUFS_FS" + use inotify && CONFIG_CHECK+=" ~FSNOTIFY" + use nfs && CONFIG_CHECK+=" EXPORTFS" + use fuse && CONFIG_CHECK+=" ~FUSE_FS" + use hfs && CONFIG_CHECK+=" ~HFSPLUS_FS" + use pax_kernel && CONFIG_CHECK+=" PAX" && ERROR_PAX="Please use hardened sources" + + # this is needed so merging a binpkg ${PN} is possible w/out a kernel unpacked on the system + [ -n "$PKG_SETUP_HAS_BEEN_RAN" ] && return + + get_version + kernel_is lt 3 0 0 && die "kernel too old, Please use sys-fs/aufs2" + kernel_is gt 3 ${KERN_MAX_VER} 99 && die "kernel too new" + + linux-mod_pkg_setup + + if [[ "${KV_MINOR}" -gt "${PATCH_MAX_VER}" ]]; then + PATCH_BRANCH="x-rcN" + else + PATCH_BRANCH="${KV_MINOR}" + fi + + if [[ "${PATCH_BRANCH}" == "x-rcN" ]]; then + UTIL_BRANCH="x-rcN" + elif [[ "${KV_MINOR}" -gt "${UTIL_MAX_VER}" ]]; then + UTIL_BRANCH="${UTIL_MAX_VER}" + else + UTIL_BRANCH="${KV_MINOR}" + fi + + pushd "${T}" &> /dev/null + unpack ${A} + cd ${PN}-standalone || die + local module_branch=origin/${PN}.${PATCH_BRANCH} + git checkout -q -b local-gentoo ${module_branch} || die + combinediff ${PN}-base.patch ${PN}-standalone.patch > ${PN}-standalone-base-combined.patch + if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-combined.patch > /dev/null ); then + if use kernel-patch; then + cd ${KV_DIR} + ewarn "Patching your kernel..." + patch --no-backup-if-mismatch --force -p1 -R -d ${KV_DIR} < "${T}"/${P}/${PN}-standalone/${PN}-standalone-base-combined.patch >/dev/null + epatch "${T}"/${P}/${PN}-standalone/${PN}-standalone-base-combined.patch + ewarn "You need to compile your kernel with the applied patch" + ewarn "to be able to load and use the aufs kernel module" + else + eerror "You need to apply a patch to your kernel to compile and run the ${PN} module" + eerror "Either enable the kernel-patch useflag to do it with this ebuild" + eerror "or apply ${EPRFIX}/usr/share/doc/${PF}/${PN}-standalone-base-combined.patch by hand" + die "missing kernel patch, please apply it first" + fi + fi + popd &> /dev/null + export PKG_SETUP_HAS_BEEN_RAN=1 +} + +set_config() { + for option in $*; do + grep -q "^CONFIG_AUFS_${option} =" config.mk || die "${option} is not a valid config option" + sed "/^CONFIG_AUFS_${option}/s:=:= y:g" -i config.mk || die + done +} + +src_prepare() { + local module_branch=origin/${PN}.${PATCH_BRANCH} + local util_branch=origin/${PN}.${UTIL_BRANCH} + + einfo "Using for module creation branch ${module_branch}" + git checkout -q -b local-gentoo ${module_branch} || die + + # All config options to off + sed "s:= y:=:g" -i config.mk || die + + set_config RDU BRANCH_MAX_127 SBILIST + + use debug && set_config DEBUG + use fuse && set_config BR_FUSE POLL + use hfs && set_config BR_HFSPLUS + use inotify && set_config HNOTIFY HFSNOTIFY + use nfs && set_config EXPORT + use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64 + use ramfs && set_config BR_RAMFS + + use pax_kernel && epatch "${FILESDIR}"/pax-2.patch + + sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die +} + +src_compile() { + local ARCH=x86 + + emake \ + CC=$(tc-getCC) \ + LD=$(tc-getLD) \ + LDFLAGS="$(raw-ldflags)" \ + ARCH=$(tc-arch-kernel) \ + CONFIG_AUFS_FS=m \ + KDIR="${KV_OUT_DIR}" +} + +src_install() { + linux-mod_src_install + + insinto /usr/share/doc/${PF} + + use doc && doins -r Documentation + + use kernel-patch || doins "${T}"/${P}/${PN}-standalone/${PN}-standalone-base-combined.patch + + dodoc Documentation/filesystems/aufs/README +}