diff options
author | Justin Lecher <jlec@gentoo.org> | 2015-04-20 07:24:22 +0000 |
---|---|---|
committer | Justin Lecher <jlec@gentoo.org> | 2015-04-20 07:24:22 +0000 |
commit | cb04985a4b6ac97087d029d76f7d43ff0e60ebcf (patch) | |
tree | 020a1b99144d64565523c12c7ed494005ea1d6ef /sys-fs | |
parent | Fix Versions (diff) | |
download | historical-cb04985a4b6ac97087d029d76f7d43ff0e60ebcf.tar.gz historical-cb04985a4b6ac97087d029d76f7d43ff0e60ebcf.tar.bz2 historical-cb04985a4b6ac97087d029d76f7d43ff0e60ebcf.zip |
New version
Package-Manager: portage-2.2.18/cvs/Linux x86_64
Manifest-Sign-Key: 0xB9D4F231BD1558AB!
Diffstat (limited to 'sys-fs')
-rw-r--r-- | sys-fs/aufs4/ChangeLog | 9 | ||||
-rw-r--r-- | sys-fs/aufs4/Manifest | 28 | ||||
-rw-r--r-- | sys-fs/aufs4/aufs4-0_pre20150420.ebuild | 164 | ||||
-rw-r--r-- | sys-fs/aufs4/files/README.gentoo | 20 | ||||
-rw-r--r-- | sys-fs/aufs4/files/pax-4.patch | 89 | ||||
-rw-r--r-- | sys-fs/aufs4/metadata.xml | 17 |
6 files changed, 327 insertions, 0 deletions
diff --git a/sys-fs/aufs4/ChangeLog b/sys-fs/aufs4/ChangeLog new file mode 100644 index 000000000000..92422eead3b5 --- /dev/null +++ b/sys-fs/aufs4/ChangeLog @@ -0,0 +1,9 @@ +# ChangeLog for sys-fs/aufs4 +# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs4/ChangeLog,v 1.1 2015/04/20 07:24:21 jlec Exp $ + +*aufs4-0_pre20150420 (20 Apr 2015) + + 20 Apr 2015; Justin Lecher <jlec@gentoo.org> +aufs4-0_pre20150420.ebuild, + +files/README.gentoo, +files/pax-4.patch, +metadata.xml: + New version diff --git a/sys-fs/aufs4/Manifest b/sys-fs/aufs4/Manifest new file mode 100644 index 000000000000..a4b42337b0ce --- /dev/null +++ b/sys-fs/aufs4/Manifest @@ -0,0 +1,28 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA512 + +AUX README.gentoo 911 SHA256 9b9eb681f692f052105bf3d3d15e689685a5fcfba1d90a88b3351158d4cebd97 SHA512 f22f1e1fae62c7a03230194c05701dc03502b84a52cfc8aacb5fbfab2c1f8bed9d4f3f97d0095578d497b09f818a3a45a04ef8527983e0cbfa9db10baeb1b691 WHIRLPOOL 73c88b3df5e691659e2e2044bda00119e742178868fa74ca7990c3d0204eaca495bc625353c22804c7420db807774941cdddd2e901c2cbceb36aa220ee3d4d95 +AUX pax-4.patch 2722 SHA256 133d80384de031c73d989a36b4e88571a5b1084c51366cfec3f5234e7e1ef446 SHA512 dc7e8eba4aa01552ec0d44636db99aa7c3d9af11f1182165ad7da383f9ed4cd92e4b9aef779b3d2bcb62797fd7d673ae35294ee1b9b768320be5bb5a03893de8 WHIRLPOOL e329ea70448d30510b5dc64ba9eca54c969c6781dc75ed326714ad0de90d10f43844e62e840cf1bfaed0ebb166b9f8a3cdef295ff06f5b38b4e5d75857e3fb46 +DIST aufs4-standalone-0_pre20150420.tar.xz 424400 SHA256 7d96ee8bb16a4b72d60bfbab2955f5e68aec5a01d61a0a4870bb90f69099ad0f SHA512 71e460c582591861a1042fe628b186f081581f61fef61ccdc1ddb98ae7ee289ae58922c9df1549109f4351c8de3858fb3b2eb040f7e1da488f05f5b954468311 WHIRLPOOL f6b324404a62b465cd8a2d677000c4b4c7f951fa502f7ed6e5634d4a39dc90bb87e245a7f7036379a02d8e7f8a9fc64801c33e86ceb747b63912b8509d68a925 +EBUILD aufs4-0_pre20150420.ebuild 5020 SHA256 180081d27d54d72526787fdb6257ead687c825735514582382655bc9ebb2766b SHA512 466bc2fd3c5627757625256d5413b68472f3c7ff16a914fd3b4843353d8a02bf2246988a0b0e6a215a0e60897303eb7d45547c6e4355bc9873dddfef0369fa29 WHIRLPOOL b507506ee4227d5feeb5554954422e4661958076062d3753a6a666075eaef90814687a687a5f93beb9bfdfdf1d7e1d24e52e05815f288d5cd644a0ec569ba303 +MISC ChangeLog 380 SHA256 dca6bb23130a8e725f0fa40d6dd4ff2ca4e53ef3d7fa941fca0442931466a85b SHA512 b611cef430976e66f73cd6d4c1511472b63dc1e71b351fa47c0bd21dee40b487556ef84c5d938dfec96dbe4d9fc330c7f1038f129fc87f3dc1ca950a4e8d3f21 WHIRLPOOL c254bea71747c7720e85928c1419c22366ad3587e9712dce96264ede81f04b53da3e9935cc2c18c1aaa31d7ac0c1125d8c826c69f5941fad8e47e2a340bb80da +MISC metadata.xml 717 SHA256 3c55d0a76fa9856c7079674c14f0bfa18c454848aa652f26669b207905ee09aa SHA512 28a8b5b0e55ea607135f34da28025698b578bd6db14f48865ed4996745fccda6a05b0882a5fd13185005517b577231f6c1e01b192add81fddfd0e66b86fc8d4c WHIRLPOOL cd4f9b75f8b5aa5dad559af879445a86740c7cdfab6bd7d97d3ddba5596c139ed2c52b5447b66698078f476a65c3b4355d9f6377e70a54d9cd063e060a0ce2ce +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.1 + +iQJ8BAEBCgBmBQJVNKmjXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w +ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQyQ0JDQjFGMzBDQ0UxMjFGNENDNDgxMDdC +OUQ0RjIzMUJEMTU1OEFCAAoJELnU8jG9FVirbLEP/R0S60dybs8KXCzN4/6cbwPB +cMvjy6Bh+I3XeqhJ1qAyPU/510jF3brFZGPtXCUChuO8V9VUmyZ6oYPg8eQQC+Ai +aKlbyMrQTmdeTa3IUh48sEGg7A2DIOTj9/ncxPh3EHbMq1lhooqPHEpUeFVmEzrn +JkB3xxGWPFbsyTJ84VokcWkQADpvmd6lXdsLNzN5BNYxvFCHa3cqloi8jGSVV3iW +E15lqlTHFb81T84/J1D4oZcqkywknFoF7gzrAldbRq/1/OrXiOFQQjddHYcq+V0X +0/auyVGxmeFytodCroY6Kx67KNBmK31z7tM2BQoWu025igJt8j/O+1pO3NoQ4rUb +r50KVI7cPnCZjDNkaBq24v+7lykTqwyKFpU1+N0dLfpvZMDltBXPrbyI5C2XZpqj +6UySzR2aC2U3+0aRkeDX7oB/bkS45iDj0xlwTqApcVhcqvaE7bwdHnlxYggAveSj +uMwvXo3f+UnHsVK1W8yCrdMMWniXY8pSBkUqc8x8IqXKadKCkOWnBq9n/8bhf/SF +rHsfeUudg2TDrZxiRxVTmKfqaxqs3dHp2Cte1jKln64rZa6B2XHB4JP3pWAhZlcU +nhAcgbfnAImwq+gCgdu3ELhJsHhF0wvKtb5uYB/qy5mZtkSvFV9z3eZM31wlIbd4 +D5ePdyZbmMEE8cDser56 +=FUcb +-----END PGP SIGNATURE----- diff --git a/sys-fs/aufs4/aufs4-0_pre20150420.ebuild b/sys-fs/aufs4/aufs4-0_pre20150420.ebuild new file mode 100644 index 000000000000..dd80616d8901 --- /dev/null +++ b/sys-fs/aufs4/aufs4-0_pre20150420.ebuild @@ -0,0 +1,164 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs4/aufs4-0_pre20150420.ebuild,v 1.1 2015/04/20 07:24:21 jlec Exp $ + +EAPI=5 + +inherit eutils flag-o-matic linux-info linux-mod multilib readme.gentoo toolchain-funcs + +AUFS_VERSION="${PV%%_p*}" +# highest branch version +PATCH_MAX_VER=0 +# highest supported version +KERN_MAX_VER=1 +# lowest supported version +KERN_MIN_VER=0 + +DESCRIPTION="An entirely re-designed and re-implemented Unionfs" +HOMEPAGE="http://aufs.sourceforge.net/" +SRC_URI="http://dev.gentoo.org/~jlec/distfiles/aufs4-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 + !sys-fs/aufs3" + +S="${WORKDIR}"/${PN}-standalone + +MODULE_NAMES="aufs(misc:${S})" + +pkg_setup() { + CONFIG_CHECK+=" !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 4 ${KERN_MIN_VER} 0 && die "the kernel version isn't supported by upstream anymore. Please upgrade." + kernel_is gt 4 ${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 + + case ${KV_EXTRA} in + "") + elog "It seems you are using vanilla-sources with aufs4" + elog "Please use sys-kernel/aufs-sources with USE=vanilla" + elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade" + ;; + "-gentoo") + elog "It seems you are using gentoo-sources with aufs4" + elog "Please use sys-kernel/aufs-sources" + elog "This will save you the nasty reemerge of sys-fs/aufs4 on every kernel upgrade" + ;; + esac + + pushd "${T}" &> /dev/null + unpack ${A} + cd ${PN}-standalone || die + local module_branch=origin/${PN}.${PATCH_BRANCH} + einfo "Using ${module_branch} as patch source" + git checkout -q -b local-${PN}.${PATCH_BRANCH} ${module_branch} || die + combinediff ${PN}-base.patch ${PN}-standalone.patch > "${T}"/combined-1.patch + combinediff "${T}"/combined-1.patch ${PN}-mmap.patch > ${PN}-standalone-base-mmap-combined.patch + if ! ( patch -p1 --dry-run --force -R -d ${KV_DIR} < ${PN}-standalone-base-mmap-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}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch >/dev/null + epatch "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-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 "${T}"/${PN}-standalone/${PN}-standalone-base-mmap-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} + + 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 + + if use pax_kernel; then + epatch "${FILESDIR}"/pax-4.patch + fi + + 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}"/${PN}-standalone/${PN}-standalone-base-mmap-combined.patch + + dodoc Documentation/filesystems/aufs/README "${T}"/${PN}-standalone/{aufs4-loopback,vfs-ino,tmpfs-idr}.patch + + readme.gentoo_create_doc +} + +pkg_postinst() { + readme.gentoo_pkg_postinst + linux-mod_pkg_postinst +} diff --git a/sys-fs/aufs4/files/README.gentoo b/sys-fs/aufs4/files/README.gentoo new file mode 100644 index 000000000000..64dfe94b4bda --- /dev/null +++ b/sys-fs/aufs4/files/README.gentoo @@ -0,0 +1,20 @@ +There several other patches in aufs3. They are all +optional. When you meet some problems, they will help you. You can find them +in the documentation directory. + + - aufs3-loopback.patch + Supports a nested loopback mount in a branch-fs. This patch is + unnecessary until aufs produces a message such like "you may want to try + another patch for loopback file". + + - vfs-ino.patch + Modifies a system global kernel internal function get_next_ino() in + order to stop assigning 0 for an inode-number. Not directly related to + aufs, but recommended generally. + + - tmpfs-idr.patch + Keeps the tmpfs inode number as the lowest value. Effective to reduce + the size of aufs XINO files for tmpfs branch. Also it prevents the + duplication of inode number, which is important for backup + tools, aubrsync or other utilities. When you find aufs XINO files for + tmpfs branch growing too much, try this patch. diff --git a/sys-fs/aufs4/files/pax-4.patch b/sys-fs/aufs4/files/pax-4.patch new file mode 100644 index 000000000000..cf216a5708ca --- /dev/null +++ b/sys-fs/aufs4/files/pax-4.patch @@ -0,0 +1,89 @@ +--- a/fs/aufs/dynop.c 2012-10-09 15:41:32.652989534 -0400 ++++ b/fs/aufs/dynop.c 2012-10-09 15:41:58.562989820 -0400 +@@ -149,9 +149,11 @@ + #define DySet(func, dst, src, h_op, h_sb) do { \ + DyDbgInc(cnt); \ + if (h_op->func) { \ +- if (src.func) \ +- dst.func = src.func; \ +- else \ ++ if (src.func) { \ ++ pax_open_kernel(); \ ++ *(void **)&dst.func = src.func; \ ++ pax_close_kernel(); \ ++ } else \ + AuDbg("%s %s\n", au_sbtype(h_sb), #func); \ + } \ + } while (0) +@@ -159,7 +161,9 @@ + #define DySetForce(func, dst, src) do { \ + AuDebugOn(!src.func); \ + DyDbgInc(cnt); \ +- dst.func = src.func; \ ++ pax_open_kernel(); \ ++ *(void **)&dst.func = src.func; \ ++ pax_close_kernel(); \ + } while (0) + + #define DySetAop(func) \ +@@ -266,15 +270,17 @@ + */ + static void dy_adx(struct au_dyaop *dyaop, int do_dx) + { ++ pax_open_kernel(); + if (!do_dx) { +- dyaop->da_op.direct_IO = NULL; +- dyaop->da_op.get_xip_mem = NULL; ++ *(void **)&dyaop->da_op.direct_IO = NULL; ++ *(void **)&dyaop->da_op.get_xip_mem = NULL; + } else { +- dyaop->da_op.direct_IO = aufs_aop.direct_IO; +- dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem; ++ *(void **)&dyaop->da_op.direct_IO = aufs_aop.direct_IO; ++ *(void **)&dyaop->da_op.get_xip_mem = aufs_aop.get_xip_mem; + if (!dyaop->da_get_xip_mem) +- dyaop->da_op.get_xip_mem = NULL; ++ *(void **)&dyaop->da_op.get_xip_mem = NULL; + } ++ pax_close_kernel(); + } + + static struct au_dyaop *dy_aget(struct au_branch *br, +--- a/fs/aufs/f_op_sp.c 2012-10-09 15:41:32.652989534 -0400 ++++ b/fs/aufs/f_op_sp.c 2012-10-09 15:41:58.562989820 -0400 +@@ -104,7 +104,7 @@ + static int aufs_open_sp(struct inode *inode, struct file *file); + static struct au_sp_fop { + int done; +- struct file_operations fop; /* not 'const' */ ++ file_operations_no_const fop; /* not 'const' */ + spinlock_t spin; + } au_sp_fop[AuSp_Last] = { + [AuSp_FIFO] = { +@@ -157,8 +157,10 @@ + h_file = au_hf_top(file); + spin_lock(&p->spin); + if (!p->done) { +- p->fop = *h_file->f_op; ++ pax_open_kernel(); ++ memcpy((void *)&p->fop, h_file->f_op, sizeof(p->fop)); + p->fop.owner = THIS_MODULE; ++ pax_close_kernel(); + if (p->fop.aio_read) + p->fop.aio_read = aufs_aio_read_sp; + if (p->fop.aio_write) +--- a/fs/aufs/sysfs.c 2013-10-20 17:08:37.000000000 -0400 ++++ b/fs/aufs/sysfs.c 2013-10-19 17:08:29.000000000 -0400 +@@ -233,8 +233,10 @@ + for (i = 0; i < ARRAY_SIZE(br->br_sysfs); i++) { + attr = &br_sysfs->attr; + sysfs_attr_init(attr); +- attr->name = br_sysfs->name; +- attr->mode = S_IRUGO; ++ pax_open_kernel(); ++ *(void **)&attr->name = br_sysfs->name; ++ *(void **)&attr->mode = S_IRUGO; ++ pax_close_kernel(); + br_sysfs++; + } + } diff --git a/sys-fs/aufs4/metadata.xml b/sys-fs/aufs4/metadata.xml new file mode 100644 index 000000000000..078f0414d465 --- /dev/null +++ b/sys-fs/aufs4/metadata.xml @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>jlec@gentoo.org</email> + </maintainer> + <use> + <flag name="debug">Enable additional debugging support</flag> + <flag name="hfs">Enable hfs support</flag> + <flag name="fuse">Enable fuse support</flag> + <flag name="inotify">Enable inotify support</flag> + <flag name="kernel-patch">Patch the current kernel for aufs3 support</flag> + <flag name="nfs">Enable support for nfs export</flag> + <flag name="pax_kernel">Apply patch needed for pax enabled kernels</flag> + <flag name="ramfs">Enable initramfs/rootfs support</flag> + </use> +</pkgmetadata> |