diff --git a/sys-fs/aufs3/Manifest b/sys-fs/aufs3/Manifest index fbbf019e..a63e3e9a 100644 --- a/sys-fs/aufs3/Manifest +++ b/sys-fs/aufs3/Manifest @@ -55,5 +55,7 @@ AUX pax-2.patch 2589 SHA256 893f8eed7f9e504215ef7336bf2c9e86a0724b4b1943ea1d40c2 AUX pax-2_kernel-3.7.patch 2278 SHA256 b0e36e7ae28750a7bac6bea991c61b5069de2ef087d179a79bd1858e42ef2866 SHA512 e5b991f054c6fae0934d5c5f015876934c47116c29cc6531e1b3de5a2e68d198858759eac436092a749e5bfb396921a9780aaef90b45fa8c3863cea8ad169c21 WHIRLPOOL 882e38c036d6919acb49a26a21d2b36c186ecc7193dcc8dad7a3aaeb9b6cc159ec54ae010f7fef3896cc0c5db6ce53d9024c2a24207d56af5f11bf2b99e4ef25 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 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 MISC metadata.xml 717 SHA256 3c55d0a76fa9856c7079674c14f0bfa18c454848aa652f26669b207905ee09aa SHA512 28a8b5b0e55ea607135f34da28025698b578bd6db14f48865ed4996745fccda6a05b0882a5fd13185005517b577231f6c1e01b192add81fddfd0e66b86fc8d4c WHIRLPOOL cd4f9b75f8b5aa5dad559af879445a86740c7cdfab6bd7d97d3ddba5596c139ed2c52b5447b66698078f476a65c3b4355d9f6377e70a54d9cd063e060a0ce2ce diff --git a/sys-fs/aufs3/aufs3-3_p20130306-r1.ebuild b/sys-fs/aufs3/aufs3-3_p20130306-r1.ebuild new file mode 100644 index 00000000..2edaa745 --- /dev/null +++ b/sys-fs/aufs3/aufs3-3_p20130306-r1.ebuild @@ -0,0 +1,163 @@ +# 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_p20130306.ebuild,v 1.1 2013/03/07 11:58:09 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/${P}.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 + !sys-fs/aufs-util + !sys-fs/aufs2" + +S="${WORKDIR}"/${P}/${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 ${P}/${PN}-standalone + 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 && kernel_is lt 3 7 0 && epatch "${FILESDIR}"/pax-2.patch + use pax_kernel && kernel_is ge 3 7 0 && epatch "${FILESDIR}"/pax-2_kernel-3.7.patch + + sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die + if [[ ${KV_MINOR} -lt 7 ]]; then + sed -i "s:__user::g" include/linux/aufs_type.h || die + else + sed -i "s:__user::g" include/uapi/linux/aufs_type.h || die + fi + + cd "${WORKDIR}"/${P}/${PN/3}-util || die + + einfo "Using for utils building branch ${util_branch}" + git checkout -b local-gentoo ${util_branch} || die + sed -i "/LDFLAGS += -static -s/d" Makefile || die + sed -i -e "s:m 644 -s:m 644:g" -e "s:/usr/lib:/usr/$(get_libdir):g" libau/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} + + cd "${WORKDIR}"/${P}/${PN/3}-util || die + emake CC=$(tc-getCC) AR=$(tc-getAR) KDIR=${KV_OUT_DIR} C_INCLUDE_PATH="${S}"/include +} + +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 + + cd "${WORKDIR}"/${P}/${PN/3}-util || die + emake DESTDIR="${D}" KDIR=${KV_OUT_DIR} install + + newdoc README README-utils +} diff --git a/sys-fs/aufs3/metadata.xml b/sys-fs/aufs3/metadata.xml new file mode 100644 index 00000000..078f0414 --- /dev/null +++ b/sys-fs/aufs3/metadata.xml @@ -0,0 +1,17 @@ + + + + + jlec@gentoo.org + + + Enable additional debugging support + Enable hfs support + Enable fuse support + Enable inotify support + Patch the current kernel for aufs3 support + Enable support for nfs export + Apply patch needed for pax enabled kernels + Enable initramfs/rootfs support + +