summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Lohrke <carlo@gentoo.org>2009-02-22 13:19:56 +0000
committerCarsten Lohrke <carlo@gentoo.org>2009-02-22 13:19:56 +0000
commit4d1658782702d2763a06a4d95a7511428d8cc637 (patch)
treed812aacf9ca80820083f3352a79f8c1dea0f657c /sys-fs/dazuko
parentProvide fontconfig override (diff)
downloadgentoo-2-4d1658782702d2763a06a4d95a7511428d8cc637.tar.gz
gentoo-2-4d1658782702d2763a06a4d95a7511428d8cc637.tar.bz2
gentoo-2-4d1658782702d2763a06a4d95a7511428d8cc637.zip
Version bump.
(Portage version: 2.2_rc23/cvs/Linux i686)
Diffstat (limited to 'sys-fs/dazuko')
-rw-r--r--sys-fs/dazuko/ChangeLog10
-rw-r--r--sys-fs/dazuko/dazuko-2.3.6_pre2.ebuild103
-rw-r--r--sys-fs/dazuko/files/dazuko-2.3.6-pre2_redirfs-0.6.patch209
3 files changed, 320 insertions, 2 deletions
diff --git a/sys-fs/dazuko/ChangeLog b/sys-fs/dazuko/ChangeLog
index 7dcb3235b4a5..85baebf757c9 100644
--- a/sys-fs/dazuko/ChangeLog
+++ b/sys-fs/dazuko/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for sys-fs/dazuko
-# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/ChangeLog,v 1.28 2008/05/28 18:23:31 phreak Exp $
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/ChangeLog,v 1.29 2009/02/22 13:19:56 carlo Exp $
+
+*dazuko-2.3.6_pre2 (22 Feb 2009)
+
+ 22 Feb 2009; Carsten Lohrke <carlo@gentoo.org>
+ +files/dazuko-2.3.6-pre2_redirfs-0.6.patch, +dazuko-2.3.6_pre2.ebuild:
+ Version bump.
28 May 2008; Christian Heim <phreak@gentoo.org> metadata.xml:
Removing Alon Bar-Lev (alonbl) from metadata.xml (as per #147110). Assigning
diff --git a/sys-fs/dazuko/dazuko-2.3.6_pre2.ebuild b/sys-fs/dazuko/dazuko-2.3.6_pre2.ebuild
new file mode 100644
index 000000000000..fe510ed56d93
--- /dev/null
+++ b/sys-fs/dazuko/dazuko-2.3.6_pre2.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/dazuko/dazuko-2.3.6_pre2.ebuild,v 1.1 2009/02/22 13:19:56 carlo Exp $
+
+inherit linux-mod toolchain-funcs flag-o-matic
+
+MY_P="${P/_/-}" # for -preN versions
+S="${WORKDIR}/${MY_P}"
+
+REDIRFS_P="redirfs-0.6"
+
+DESCRIPTION="Linux kernel module and interface providing file access control"
+HOMEPAGE="http://www.dazuko.org"
+SRC_URI="http://dazuko.dnsalias.org/files/${MY_P}.tar.gz
+ http://www.redirfs.org/packages/${REDIRFS_P}.tar.gz"
+
+SLOT="0"
+LICENSE="GPL-2 BSD"
+KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd"
+IUSE=""
+
+DEPEND="kernel_linux? ( >=virtual/linux-sources-2.6.27 )
+ ~sys-fs/redirfs-0.6"
+RDEPEND="${DEPEND}"
+
+pkg_setup() {
+ [ "${KERNEL}" = "linux" ] && linux-mod_pkg_setup
+ # kernel settings
+ if [ "${KERNEL}" = "linux" ] && kernel_is le 2 4; then
+ BUILD_TARGETS="all"
+ else
+ EXTRA_CONFIG="--enable-redirfs --redirfsdir=${WORKDIR}/${REDIRFS_P}"
+ BUILD_TARGETS="dummy_rule"
+ fi
+ MODULE_NAMES="dazuko(misc:)"
+
+ ewarn "Please notice that Dazuko 2.x is not maintained any longer."
+ ewarn "Work continues on DazukoFS. For more information see:"
+ ewarn "http://lists.gnu.org/archive/html/dazuko-devel/2009-02/msg00001.html"
+}
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+ epatch "${FILESDIR}/dazuko-2.3.6-pre2_redirfs-0.6.patch"
+}
+
+src_compile() {
+ if [ "${KERNEL}" = "FreeBSD" ]; then
+ KERNEL_DIR=/usr/src/sys
+ KBUILD_OUTPUT=/boot/modules
+ MAKE=make
+ fi
+ ./configure \
+ --without-dep \
+ --kernelsrcdir="${KERNEL_DIR}" \
+ --kernelobjdir="${KBUILD_OUTPUT}" \
+ ${EXTRA_CONFIG} \
+ || die "configure failed"
+
+ if [ "${KERNEL}" = "linux" ]; then
+ convert_to_m Makefile
+ linux-mod_src_compile
+ else
+ emake CC="$(tc-getCC)" LD="$(tc-getLD)" LDFLAGS="$(raw-ldflags)" || die
+ fi
+
+ emake -C library CC="$(tc-getCC)" || die
+}
+
+src_install() {
+ if [ "${KERNEL}" = "linux" ]; then
+ linux-mod_src_install
+ else
+ insinto /boot/modules
+ doins "${S}"/dazuko.kld
+ exeinto /boot/modules
+ doexe "${S}"/dazuko.ko
+ fi
+
+ dolib.a library/libdazuko.a
+ insinto /usr/include
+ doins dazukoio.h
+ doins dazuko_events.h
+
+ dodoc README*
+}
+
+src_test() {
+ if [ "${EUID}" != 0 ]; then
+ ewarn "Cannot test while not root"
+ else
+ emake test || die "Test failed"
+ fi
+}
+
+pkg_postinst() {
+ [ "${KERNEL}" = "linux" ] && linux-mod_pkg_postinst
+}
+
+pkg_postrm() {
+ [ "${KERNEL}" = "linux" ] && linux-mod_pkg_postrm
+}
diff --git a/sys-fs/dazuko/files/dazuko-2.3.6-pre2_redirfs-0.6.patch b/sys-fs/dazuko/files/dazuko-2.3.6-pre2_redirfs-0.6.patch
new file mode 100644
index 000000000000..7a5b762180ac
--- /dev/null
+++ b/sys-fs/dazuko/files/dazuko-2.3.6-pre2_redirfs-0.6.patch
@@ -0,0 +1,209 @@
+diff -Nru dazuko-2.3.6-pre2a/dazuko_linux26.h dazuko-2.3.6-pre2b/dazuko_linux26.h
+--- dazuko-2.3.6-pre2a/dazuko_linux26.h 2008-02-20 22:05:34.000000000 +0100
++++ dazuko-2.3.6-pre2b/dazuko_linux26.h 2009-02-11 20:56:07.000000000 +0100
+@@ -24,7 +24,13 @@
+ #define DAZUKO_LINUX26_H
+
+ #include <linux/module.h>
++#include <linux/version.h>
++
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ #include <asm/semaphore.h>
++#else
++#include <linux/semaphore.h>
++#endif
+
+ #define DEVICE_NAME "dazuko"
+
+diff -Nru dazuko-2.3.6-pre2a/dazuko_redirfs.c dazuko-2.3.6-pre2b/dazuko_redirfs.c
+--- dazuko-2.3.6-pre2a/dazuko_redirfs.c 2008-07-17 20:00:02.000000000 +0200
++++ dazuko-2.3.6-pre2b/dazuko_redirfs.c 2009-02-11 21:21:12.000000000 +0100
+@@ -66,19 +66,19 @@
+ static int dev_major = -1;
+ static int module_disabled = 0;
+
+-enum redirfs_rv dazukoflt_permission(redirfs_context context, struct redirfs_args *args);
++enum redirfs_rv dazukoflt_open(redirfs_context context, struct redirfs_args *args);
+
+ static redirfs_filter dazukoflt;
+
+ static struct redirfs_filter_info dazukoflt_info = {
+ .owner = THIS_MODULE,
+ .name = "dazukoflt",
+- .priority = 1,
++ .priority = 860000000,
+ .active = 1,
+ };
+
+ static struct redirfs_op_info dazukoflt_op_info[] = {
+- { REDIRFS_REG_IOP_PERMISSION, dazukoflt_permission, NULL },
++ { REDIRFS_REG_FOP_OPEN, dazukoflt_open, NULL },
+ { REDIRFS_OP_END, NULL, NULL }
+ };
+
+@@ -593,16 +593,17 @@
+ {
+ int err = 0;
+ struct redirfs_path_info path_info;
++ redirfs_path rfs_path;
+ struct nameidata nd;
+
+ switch (type)
+ {
+ case ADD_INCLUDE_PATH:
+- path_info.flags = REDIRFS_PATH_INCLUDE | REDIRFS_PATH_ADD;
++ path_info.flags = REDIRFS_PATH_INCLUDE;
+ break;
+
+ case ADD_EXCLUDE_PATH:
+- path_info.flags = REDIRFS_PATH_EXCLUDE | REDIRFS_PATH_ADD;
++ path_info.flags = REDIRFS_PATH_EXCLUDE;
+ break;
+
+ default:
+@@ -614,14 +615,14 @@
+
+ path_info.dentry = nd.path.dentry;
+ path_info.mnt = nd.path.mnt;
+- err = redirfs_set_path(dazukoflt, &path_info);
+- if (err)
+- {
++ rfs_path = redirfs_add_path(dazukoflt, &path_info);
++ if (IS_ERR(rfs_path)) {
+ xp_print("dazuko: failed to set RedirFS path, err=%d\n", err);
+ err = -1;
+ }
+
+ path_put(&nd.path);
++ redirfs_put_path(rfs_path);
+
+ return err;
+ }
+@@ -629,7 +630,7 @@
+
+ /* system hooks */
+
+-int dazuko_sys_generic(struct inode *inode, int mask, struct nameidata *nd)
++int dazuko_sys_generic(struct inode *inode, struct nameidata *nd)
+ {
+ struct dazuko_file_struct *dfs = NULL;
+ int error = 0;
+@@ -645,34 +646,6 @@
+
+ dazuko_bzero(&event_p, sizeof(event_p));
+
+- if ((mask & MAY_EXEC) != 0)
+- {
+- event = DAZUKO_ON_EXEC;
+- daemon_is_allowed = 0;
+- }
+- else
+- {
+- /* mask == 0 is passed in when a file is created */
+- if (mask == 0 || (mask & (MAY_WRITE|MAY_APPEND)) != 0)
+- {
+- if ((mask & MAY_READ) != 0)
+- {
+- event_p.flags = O_RDWR;
+- }
+- else
+- {
+- event_p.flags = O_WRONLY;
+- }
+-
+- event_p.set_flags = 1;
+- }
+- else if ((mask & MAY_READ) != 0)
+- {
+- event_p.flags = O_RDONLY;
+- event_p.set_flags = 1;
+- }
+- }
+-
+ xp_id.pid = current->pid;
+ xp_id.tgid = current->tgid;
+ xp_id.file = NULL;
+@@ -721,18 +694,14 @@
+ return 0;
+ }
+
+-enum redirfs_rv dazukoflt_permission(redirfs_context context, struct redirfs_args *args)
++enum redirfs_rv dazukoflt_open(redirfs_context context, struct redirfs_args *args)
+ {
+- if (!args->args.i_permission.nd)
+- return REDIRFS_CONTINUE;
+-
+- if (!args->args.i_permission.mask)
+- return REDIRFS_CONTINUE;
++ struct nameidata nd;
+
+- if (!args->args.i_permission.nd)
+- return REDIRFS_CONTINUE;
++ nd.path.dentry = args->args.f_open.file->f_dentry;
++ nd.path.mnt = args->args.f_open.file->f_vfsmnt;
+
+- if (dazuko_sys_generic(args->args.i_permission.inode, args->args.i_permission.mask, args->args.i_permission.nd) != 0)
++ if (dazuko_sys_generic(args->args.f_open.file->f_dentry->d_inode, &nd) != 0)
+ {
+ args->rv.rv_int = -EACCES;
+ return REDIRFS_STOP;
+@@ -759,10 +728,10 @@
+ {
+ int err;
+
+- err = redirfs_register_filter(&dazukoflt, &dazukoflt_info);
+- if (err)
++ dazukoflt = redirfs_register_filter(&dazukoflt_info);
++ if (IS_ERR(dazukoflt))
+ {
+- xp_print("dazuko: unable to register with RedirFS, err=%d\n", err);
++ xp_print("dazuko: unable to register with RedirFS, err=%d\n", PTR_ERR(dazukoflt));
+ return -1;
+ }
+
+@@ -804,20 +773,11 @@
+ return dev_major;
+ }
+
+-#ifndef WITHOUT_UDEV
+-#ifdef USE_CLASS
+ dazuko_class = class_create(THIS_MODULE, DEVICE_NAME);
+-#if defined (CLASS_class_device_create_2_6_15)
+- class_device_create(dazuko_class, NULL, MKDEV(dev_major, 0), NULL, DEVICE_NAME);
+-#elif defined (CLASS_device_create_2_6_26)
++#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,27)
+ device_create(dazuko_class, NULL, MKDEV(dev_major, 0), DEVICE_NAME);
+ #else
+- class_device_create(dazuko_class, MKDEV(dev_major, 0), NULL, DEVICE_NAME);
+-#endif
+-#else
+- dazuko_class = class_simple_create(THIS_MODULE, DEVICE_NAME);
+- class_simple_device_add(dazuko_class, MKDEV(dev_major, 0), NULL, DEVICE_NAME);
+-#endif
++ device_create(dazuko_class, NULL, MKDEV(dev_major, 0), NULL, DEVICE_NAME);
+ #endif
+
+ return 0;
+@@ -826,21 +786,9 @@
+ inline int xp_sys_unhook()
+ {
+ if (!module_disabled) {
+- unregister_chrdev(dev_major, DEVICE_NAME);
+-
+-#ifndef WITHOUT_UDEV
+-#ifdef USE_CLASS
+-#if defined (CLASS_device_create_2_6_26)
+ device_destroy(dazuko_class, MKDEV(dev_major, 0));
+-#else
+- class_device_destroy(dazuko_class, MKDEV(dev_major, 0));
+-#endif
+ class_destroy(dazuko_class);
+-#else
+- class_simple_device_remove(MKDEV(dev_major, 0));
+- class_simple_destroy(dazuko_class);
+-#endif
+-#endif
++ unregister_chrdev(dev_major, DEVICE_NAME);
+ }
+
+ redirfs_delete_filter(dazukoflt);