summaryrefslogtreecommitdiff
path: root/sys-fs
diff options
context:
space:
mode:
authorJustin Lecher <jlec@gentoo.org>2013-10-22 10:53:32 +0000
committerJustin Lecher <jlec@gentoo.org>2013-10-22 10:53:32 +0000
commit76c0aa7c91a9112597d7b883ee24171e11012e7c (patch)
tree7b31dfc7f96dde19a6e8787d6e3ccb9ad8896c6e /sys-fs
parentAdd ~arm keyword, wrt bug #488696 (diff)
downloadgentoo-2-76c0aa7c91a9112597d7b883ee24171e11012e7c.tar.gz
gentoo-2-76c0aa7c91a9112597d7b883ee24171e11012e7c.tar.bz2
gentoo-2-76c0aa7c91a9112597d7b883ee24171e11012e7c.zip
sys-fs/aufs3: Fix pax patches, #466582 & #488560; thanks Zorzo Luca and Sergey Anufrienko
(Portage version: 2.2.7/cvs/Linux x86_64, signed Manifest commit with key B9D4F231BD1558AB!)
Diffstat (limited to 'sys-fs')
-rw-r--r--sys-fs/aufs3/ChangeLog6
-rw-r--r--sys-fs/aufs3/aufs3-3_p20131007.ebuild12
-rw-r--r--sys-fs/aufs3/aufs3-3_p20131014.ebuild12
-rw-r--r--sys-fs/aufs3/files/pax-3.11.patch89
-rw-r--r--sys-fs/aufs3/files/pax-3.8.patch89
5 files changed, 203 insertions, 5 deletions
diff --git a/sys-fs/aufs3/ChangeLog b/sys-fs/aufs3/ChangeLog
index aa00cb8189f3..cb53c187bde0 100644
--- a/sys-fs/aufs3/ChangeLog
+++ b/sys-fs/aufs3/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for sys-fs/aufs3
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs3/ChangeLog,v 1.72 2013/10/14 06:29:16 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs3/ChangeLog,v 1.73 2013/10/22 10:53:32 jlec Exp $
+
+ 22 Oct 2013; Justin Lecher <jlec@gentoo.org> aufs3-3_p20131007.ebuild,
+ aufs3-3_p20131014.ebuild, +files/pax-3.8.patch, +files/pax-3.11.patch:
+ Fix pax patches, #466582 & #488560; thanks Zorzo Luca and Sergey Anufrienko
*aufs3-3_p20131014 (14 Oct 2013)
diff --git a/sys-fs/aufs3/aufs3-3_p20131007.ebuild b/sys-fs/aufs3/aufs3-3_p20131007.ebuild
index 5e5bbbe46b1d..7e3dc4c3c454 100644
--- a/sys-fs/aufs3/aufs3-3_p20131007.ebuild
+++ b/sys-fs/aufs3/aufs3-3_p20131007.ebuild
@@ -1,6 +1,6 @@
# 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_p20131007.ebuild,v 1.3 2013/10/13 15:18:51 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs3/aufs3-3_p20131007.ebuild,v 1.4 2013/10/22 10:53:32 jlec Exp $
EAPI=5
@@ -121,7 +121,15 @@ src_prepare() {
use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
use ramfs && set_config BR_RAMFS
- use pax_kernel && epatch "${FILESDIR}"/pax-3.patch
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ elif kernel_is 3 8; then
+ epatch "${FILESDIR}"/pax-3.8.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
}
diff --git a/sys-fs/aufs3/aufs3-3_p20131014.ebuild b/sys-fs/aufs3/aufs3-3_p20131014.ebuild
index afe29b4d230d..1f38ac97d36b 100644
--- a/sys-fs/aufs3/aufs3-3_p20131014.ebuild
+++ b/sys-fs/aufs3/aufs3-3_p20131014.ebuild
@@ -1,6 +1,6 @@
# 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_p20131014.ebuild,v 1.1 2013/10/14 06:29:16 jlec Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/aufs3/aufs3-3_p20131014.ebuild,v 1.2 2013/10/22 10:53:32 jlec Exp $
EAPI=5
@@ -121,7 +121,15 @@ src_prepare() {
use nfs && ( use amd64 || use ppc64 ) && set_config INO_T_64
use ramfs && set_config BR_RAMFS
- use pax_kernel && epatch "${FILESDIR}"/pax-3.patch
+ if use pax_kernel; then
+ if kernel_is ge 3 11; then
+ epatch "${FILESDIR}"/pax-3.11.patch
+ elif kernel_is 3 8; then
+ epatch "${FILESDIR}"/pax-3.8.patch
+ else
+ epatch "${FILESDIR}"/pax-3.patch
+ fi
+ fi
sed -i "s:aufs.ko usr/include/linux/aufs_type.h:aufs.ko:g" Makefile || die
}
diff --git a/sys-fs/aufs3/files/pax-3.11.patch b/sys-fs/aufs3/files/pax-3.11.patch
new file mode 100644
index 000000000000..cf216a5708ca
--- /dev/null
+++ b/sys-fs/aufs3/files/pax-3.11.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/aufs3/files/pax-3.8.patch b/sys-fs/aufs3/files/pax-3.8.patch
new file mode 100644
index 000000000000..bdf8692a980a
--- /dev/null
+++ b/sys-fs/aufs3/files/pax-3.8.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-21 14:25:10.170305511 +0400
++++ b/fs/aufs/sysfs.c 2013-10-22 10:44:22.114513095 +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->br_name;
++ *(void **)&attr->mode = S_IRUGO;
++ pax_close_kernel();
+ br_sysfs++;
+ }
+ }