pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/filesystems/fuse-chironfs ChironFS, replicating file s...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/63cada5eedc0
branches:  trunk
changeset: 535741:63cada5eedc0
user:      pooka <pooka%pkgsrc.org@localhost>
date:      Tue Nov 27 18:55:40 2007 +0000

description:
ChironFS, replicating file system which operates like RAID1 on a
file system level, i.e. is configured by collecting several
mountpoints into one virtual replicated file system.

diffstat:

 filesystems/fuse-chironfs/DESCR            |   3 +
 filesystems/fuse-chironfs/Makefile         |  16 +++++
 filesystems/fuse-chironfs/PLIST            |  12 ++++
 filesystems/fuse-chironfs/distinfo         |   9 +++
 filesystems/fuse-chironfs/patches/patch-aa |  13 ++++
 filesystems/fuse-chironfs/patches/patch-ab |  82 ++++++++++++++++++++++++++++++
 filesystems/fuse-chironfs/patches/patch-ac |  75 +++++++++++++++++++++++++++
 filesystems/fuse-chironfs/patches/patch-ad |  12 ++++
 8 files changed, 222 insertions(+), 0 deletions(-)

diffs (254 lines):

diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/DESCR
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/DESCR   Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,3 @@
+ChironFS implements RAID1-like replication on the file system level.
+In case of a unit failure, other replicas on the mount will be
+used.
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/Makefile
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/Makefile        Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,16 @@
+# $NetBSD: Makefile,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+#
+
+DISTNAME=      chironfs-1.0-RC9
+PKGNAME=       fuse-chironfs-1.0RC9
+CATEGORIES=    filesystems
+MASTER_SITES=  http://chironfs.googlecode.com/files/
+
+MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
+HOMEPAGE=      http://code.google.com/p/chironfs/
+COMMENT=       Replicating file system
+
+GNU_CONFIGURE= yes
+
+.include "../../mk/fuse.buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/PLIST
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/PLIST   Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,12 @@
+@comment $NetBSD: PLIST,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+bin/chironfs
+man/man8/chironfs.8
+share/doc/chironfs/README
+share/doc/chironfs/AUTHORS
+share/doc/chironfs/changelog.Debian
+share/doc/chironfs/HOWTO.html
+share/doc/chironfs/NEWS
+share/doc/chironfs/TODO
+share/doc/chironfs/ChangeLog
+share/doc/chironfs/copyright
+@dirrm share/doc/chironfs
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/distinfo
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/distinfo        Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,9 @@
+$NetBSD: distinfo,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+
+SHA1 (chironfs-1.0-RC9.tar.gz) = a7f703afb8bc9d2a1dcdd833fa17c6358b4225f9
+RMD160 (chironfs-1.0-RC9.tar.gz) = d6962e5af8b530080ec04191e33aaee433154c01
+Size (chironfs-1.0-RC9.tar.gz) = 398831 bytes
+SHA1 (patch-aa) = bcabe1a6b4841ad93b53c031c2f75c1bd4968270
+SHA1 (patch-ab) = 30dface656c86e5e883a2b99fa7fb570fb932611
+SHA1 (patch-ac) = 316d880066d9a3dc482edcd034dd754073011d21
+SHA1 (patch-ad) = 681867b573d4a5e60fe283be8170294112695994
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/patches/patch-aa
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/patches/patch-aa        Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,13 @@
+$NetBSD: patch-aa,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+
+--- src/Makefile.in.orig       2007-10-23 06:25:06.000000000 +0200
++++ src/Makefile.in    2007-11-27 19:04:11.000000000 +0100
+@@ -146,7 +146,7 @@
+ top_srcdir = @top_srcdir@
+ AM_CFLAGS = $(all_includes) -Wall -W -Wmissing-prototypes -g -O2 -DFUSE_USE_VERSION=25 -D_FILE_OFFSET_BITS=64
+ chironfs_SOURCES = chironfs.c chiron-conf.c chironfs.h
+-chironfs_LDFLAGS = -L/usr/local/lib -lfuse -ldl -lm
++chironfs_LDFLAGS = -L/usr/local/lib -lfuse -lm
+ chironfs_OBJS = chironfs.o chiron-conf.o
+ all: all-am
+ 
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/patches/patch-ab
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/patches/patch-ab        Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,82 @@
+$NetBSD: patch-ab,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+
+--- src/chiron-conf.c.orig     2007-10-23 04:54:53.000000000 +0200
++++ src/chiron-conf.c  2007-11-27 18:05:11.000000000 +0100
+@@ -34,7 +34,11 @@
+ #include <dlfcn.h>
+ 
+ #include <libgen.h>
++#ifdef __linux__
+ #include <linux/limits.h>
++#else
++#include <limits.h>
++#endif
+ #include <string.h>
+ #include <stdint.h>
+ #include <sys/resource.h>
+@@ -232,7 +236,8 @@
+ int do_mount(char *filesystems, char *mountpoint)
+ {
+    char   buf[100];
+-   int    i, start, fd, res, errno, rep_on_mount=0, err;
++   int    fd, res;
++   int    i, start, errno, rep_on_mount=0, err;
+    int    *tmp_high, *tmp_low;
+    unsigned long tmpfd;
+    struct rlimit rlp;
+@@ -249,21 +254,21 @@
+    }
+ 
+    fd = open("/proc/sys/fs/file-max",O_RDONLY);
+-   if (fd<0) {
+-      print_err(errno,"opening /proc/sys/fs/file-max");
+-      exit(errno);
+-   }
+-   res = read(fd,buf,99);
+-   if (res<0) {
+-      print_err(errno,"reading /proc/sys/fs/file-max");
+-      exit(errno);
++   if (fd != -1) {
++      res = read(fd,buf,99);
++      if (res<0) {
++         print_err(errno,"reading /proc/sys/fs/file-max");
++         exit(errno);
++      }
++      sscanf(buf,"%qu",&FD_BUF_SIZE);
++      close(fd);
++   } else {
++      FD_BUF_SIZE = 4096;
+    }
+-   sscanf(buf,"%qu",&FD_BUF_SIZE);
+-   close(fd);
+    
+    tmpfd = (FD_BUF_SIZE >>= 1);
+ 
+-   if (getrlimit(RLIMIT_OFILE,&rlp)) {
++   if (getrlimit(RLIMIT_NOFILE,&rlp)) {
+       print_err(errno,"reading nofile resource limit");
+       exit(errno);
+    }
+@@ -356,11 +361,11 @@
+    }
+ 
+    if (mountpoint[0]==':') {
+-      mount_point = realpath(mountpoint+1,NULL);
++      mount_point = do_realpath(mountpoint+1,NULL);
+       rep_on_mount = i = 1;
+       tmp_high[max_replica_high++] = 0;
+    } else {
+-      mount_point = realpath(mountpoint,NULL);
++      mount_point = do_realpath(mountpoint,NULL);
+       i = 0;
+    }
+    if (mount_point==NULL) {
+@@ -380,7 +385,7 @@
+          tmp_high[max_replica_high++] = i;
+       }
+ 
+-      paths[i].path = realpath(filesystems+start, NULL);
++      paths[i].path = do_realpath(filesystems+start, NULL);
+       if (paths[i].path==NULL) {
+          free_paths();
+          free_tab_fd();
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/patches/patch-ac
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/patches/patch-ac        Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,75 @@
+$NetBSD: patch-ac,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+
+--- src/chironfs.c.orig        2007-11-27 17:00:15.000000000 +0100
++++ src/chironfs.c     2007-11-27 19:08:07.000000000 +0100
+@@ -27,8 +27,7 @@
+ #define FUSE_USE_VERSION 25
+ 
+ #include <fuse.h>
+-#include <fuse/fuse.h>
+-#include <fuse/fuse_opt.h>
++#include <fuse_opt.h>
+ #include <stdlib.h>
+ #include <stdio.h>
+ #include <string.h>
+@@ -43,13 +42,17 @@
+ #ifdef HAVE_SETXATTR
+ #include <sys/xattr.h>
+ #endif
++#ifdef __linux__
+ #include <linux/limits.h>
+ #include <mntent.h>
+-#include <stdint.h>
+ #include <bits/wordsize.h>
++#endif
++#include <stdint.h>
+ #include <pwd.h>
+ #include <grp.h>
+ 
++#include "config.h"
++
+ #define _CHIRON_H_
+ #include "chironfs.h"
+ 
+@@ -186,6 +189,16 @@
+    }
+ }
+ 
++char *do_realpath(const char *path, char *resolvedpath)
++{
++
++#ifndef __linux__
++   if (resolvedpath == NULL)
++      resolvedpath = malloc(PATH_MAX);
++#endif
++   return realpath(path, resolvedpath);
++}
++
+ ////////////////////////////////////////////////////////////////////////////
+ ////////////////////////////////////////////////////////////////////////////
+ //
+@@ -2234,7 +2247,7 @@
+          return(NULL);
+       }
+    } else {
+-      realbasedir = realpath(basedir,NULL);
++      realbasedir = do_realpath(basedir,NULL);
+       if (realbasedir==NULL) {
+          free(basedir);
+          return(NULL);
+@@ -2383,6 +2396,7 @@
+          dbg(("\nfuse_argv: %s %s %s", fuse_argv[0], fuse_argv[1], fuse_argv[2]));
+          dbg(("\n-------------------------------------------------------------------------------"));
+ 
++#ifdef HAVE_GETMNTENT
+          FILE *mtab;
+          struct mntent *mntentry;
+          mtab = setmntent("/etc/mtab", "r");
+@@ -2393,6 +2407,7 @@
+             }
+          } while(mntentry!=NULL);
+          endmntent (mtab);
++#endif
+          dbg(("\n-------------------------------------------------------------------------------"));
+ 
+          res = fuse_main(3, fuse_argv, &chiron_oper);
diff -r aa65d0bb9e2f -r 63cada5eedc0 filesystems/fuse-chironfs/patches/patch-ad
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/filesystems/fuse-chironfs/patches/patch-ad        Tue Nov 27 18:55:40 2007 +0000
@@ -0,0 +1,12 @@
+$NetBSD: patch-ad,v 1.1.1.1 2007/11/27 18:55:40 pooka Exp $
+
+--- src/chironfs.h.orig        2007-10-23 05:09:39.000000000 +0200
++++ src/chironfs.h     2007-11-27 19:10:43.000000000 +0100
+@@ -157,6 +157,7 @@
+ int fd_hashseek(int fd_main);
+ void print_err(int err, char *specifier);
+ void call_log(char *fnname, char *resource, int err);
++char *do_realpath(const char *pathname, char *resolvedname);
+ int choose_replica(int try);
+ void disable_replica(int n);
+ void opt_parse(char *fo, char**log, char**argvbuf);



Home | Main Index | Thread Index | Old Index