pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/filesystems/fuse-loggedfs Initial import of loggedfs-0...
details: https://anonhg.NetBSD.org/pkgsrc/rev/e2484baa5ac6
branches: trunk
changeset: 529874:e2484baa5ac6
user: agc <agc%pkgsrc.org@localhost>
date: Mon Jun 11 20:13:27 2007 +0000
description:
Initial import of loggedfs-0.4, a FUSE-based file system which logs all
operations.
Loggedfs is a filesystem which logs (via rlog and syslog) exactly what
is happening on every vnode operation.
diffstat:
filesystems/fuse-loggedfs/DESCR | 2 +
filesystems/fuse-loggedfs/Makefile | 33 +++++++++++
filesystems/fuse-loggedfs/PLIST | 3 +
filesystems/fuse-loggedfs/distinfo | 7 ++
filesystems/fuse-loggedfs/patches/patch-aa | 84 ++++++++++++++++++++++++++++++
filesystems/fuse-loggedfs/patches/patch-ab | 11 +++
6 files changed, 140 insertions(+), 0 deletions(-)
diffs (164 lines):
diff -r 520864cbd125 -r e2484baa5ac6 filesystems/fuse-loggedfs/DESCR
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-loggedfs/DESCR Mon Jun 11 20:13:27 2007 +0000
@@ -0,0 +1,2 @@
+Loggedfs is a filesystem which logs (via rlog and syslog) exactly what
+is happening on every vnode operation.
diff -r 520864cbd125 -r e2484baa5ac6 filesystems/fuse-loggedfs/Makefile
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-loggedfs/Makefile Mon Jun 11 20:13:27 2007 +0000
@@ -0,0 +1,33 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/06/11 20:13:27 agc Exp $
+#
+
+DISTNAME= loggedfs-0.4
+PKGNAME= fuse-${DISTNAME}
+CATEGORIES= filesystems
+MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=loggedfs/}
+EXTRACT_SUFX= .tar.bz2
+
+MAINTAINER= pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE= ${MASTER_SITE_SOURCEFORGE:=loggedfs/}
+COMMENT= FUSE file system which logs all operations
+
+.if exists(/usr/include/sys/statvfs.h)
+CPPFLAGS+= -DHAVE_SYS_STATVFS_H
+.endif
+
+.if exists(/usr/include/sys/xattr.h)
+CPPFLAGS+= -DHAVE_SETXATTR
+.endif
+
+USE_LANGUAGES+= c++
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/loggedfs ${PREFIX}/bin/loggedfs
+ ${INSTALL_MAN} ${WRKSRC}/loggedfs.1 ${PREFIX}/${PKGMANDIR}/man1/loggedfs.1
+
+.include "../../devel/librlog/buildlink3.mk"
+.include "../../devel/pcre/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+
+.include "../../mk/fuse.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r 520864cbd125 -r e2484baa5ac6 filesystems/fuse-loggedfs/PLIST
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-loggedfs/PLIST Mon Jun 11 20:13:27 2007 +0000
@@ -0,0 +1,3 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/06/11 20:13:27 agc Exp $
+bin/loggedfs
+${PKGMANDIR}/man1/loggedfs.1
diff -r 520864cbd125 -r e2484baa5ac6 filesystems/fuse-loggedfs/distinfo
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-loggedfs/distinfo Mon Jun 11 20:13:27 2007 +0000
@@ -0,0 +1,7 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/06/11 20:13:27 agc Exp $
+
+SHA1 (loggedfs-0.4.tar.bz2) = a20eae4c035e5eeaec066d5b5d14b42dac2b2189
+RMD160 (loggedfs-0.4.tar.bz2) = e2ad904e70fec7c9a188f2bc5d6528adfcb104f2
+Size (loggedfs-0.4.tar.bz2) = 14851 bytes
+SHA1 (patch-aa) = 58eeb1ac9db64605e96fa8bc63de2f1f5c398b0c
+SHA1 (patch-ab) = 864bf2488034a3217f530ed6a8171633424b9928
diff -r 520864cbd125 -r e2484baa5ac6 filesystems/fuse-loggedfs/patches/patch-aa
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-loggedfs/patches/patch-aa Mon Jun 11 20:13:27 2007 +0000
@@ -0,0 +1,84 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/06/11 20:13:27 agc Exp $
+
+--- src/loggedfs.cpp 2007/02/21 21:49:53 1.1
++++ src/loggedfs.cpp 2007/02/21 21:51:15
+@@ -30,7 +30,11 @@
+ #include <fcntl.h>
+ #include <dirent.h>
+ #include <errno.h>
++#ifdef HAVE_SYS_STATVFS_H
++#include <sys/statvfs.h>
++#else
+ #include <sys/statfs.h>
++#endif
+ #ifdef HAVE_SETXATTR
+ #include <sys/xattr.h>
+ #endif
+@@ -85,12 +89,14 @@
+
+ static char* getAbsolutePath(const char *path)
+ {
+- char *realPath=new char[strlen(path)+strlen(loggedfsArgs->mountPoint)+1];
++ char *realPath=new char[strlen(path)+strlen(loggedfsArgs->mountPoint)+2];
++
++ (void) snprintf(realPath, strlen(path)+strlen(loggedfsArgs->mountPoint)+2,
++ "%s%s%s",
++ loggedfsArgs->mountPoint,
++ (path[0] == '/') ? "" : "/",
++ path);
+
+- strcpy(realPath,loggedfsArgs->mountPoint);
+- if (realPath[strlen(realPath)-1]=='/')
+- realPath[strlen(realPath)-1]='\0';
+- strcat(realPath,path);
+ return realPath;
+
+ }
+@@ -156,7 +162,7 @@
+
+ char *aPath=getAbsolutePath(path);
+ path=getRelativePath(path);
+- res = lstat(path, stbuf);
++ res = lstat(aPath, stbuf);
+ loggedfs_log(aPath,"getattr",res,"getattr %s",aPath);
+ if(res == -1)
+ return -errno;
+@@ -210,7 +216,7 @@
+ path=getRelativePath(path);
+
+
+- dp = opendir(path);
++ dp = opendir(aPath);
+ if(dp == NULL) {
+ res = -errno;
+ loggedfs_log(aPath,"readdir",-1,"readdir %s",aPath);
+@@ -427,7 +433,7 @@
+ return 0;
+ }
+
+-#if (FUSE_USE_VERSION==25)
++#if (FUSE_USE_VERSION >= 25)
+ static int loggedFS_utime(const char *path, struct utimbuf *buf)
+ {
+ int res;
+@@ -650,7 +656,11 @@
+ // logging the ~/.kde/share/config directory, in which hard links for lock
+ // files are verified by their inode equivalency.
+
++#ifdef __NetBSD__
++#define COMMON_OPTS ""
++#else
+ #define COMMON_OPTS "nonempty,use_ino"
++#endif
+
+ while ((res = getopt (argc, argv, "hpfec:l:")) != -1)
+ {
+@@ -770,7 +780,7 @@
+ loggedFS_oper.chmod = loggedFS_chmod;
+ loggedFS_oper.chown = loggedFS_chown;
+ loggedFS_oper.truncate = loggedFS_truncate;
+-#if (FUSE_USE_VERSION==25)
++#if (FUSE_USE_VERSION >= 25)
+ loggedFS_oper.utime = loggedFS_utime;
+ #else
+ loggedFS_oper.utimens = loggedFS_utimens;
diff -r 520864cbd125 -r e2484baa5ac6 filesystems/fuse-loggedfs/patches/patch-ab
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-loggedfs/patches/patch-ab Mon Jun 11 20:13:27 2007 +0000
@@ -0,0 +1,11 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/06/11 20:13:27 agc Exp $
+
+--- Makefile 2007/06/08 15:32:49 1.1
++++ Makefile 2007/06/08 15:34:17
+@@ -1,5 +1,5 @@
+ CC=g++
+-CFLAGS=-Wall -ansi -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -DRLOG_COMPONENT="loggedfs" `xml2-config --cflags`
++CFLAGS=-Wall -ansi -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -DRLOG_COMPONENT="loggedfs" `xml2-config --cflags` ${CPPFLAGS}
+ LDFLAGS=-Wall -ansi -lpcre -lfuse -lrlog `xml2-config --libs`
+ srcdir=src
+ builddir=build
Home |
Main Index |
Thread Index |
Old Index