From owner-freebsd-ports-bugs@FreeBSD.ORG Mon Jan 16 16:30:08 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E47F916A41F for ; Mon, 16 Jan 2006 16:30:07 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 408F143D55 for ; Mon, 16 Jan 2006 16:30:06 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k0GGU5R7011478 for ; Mon, 16 Jan 2006 16:30:05 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k0GGU5bL011477; Mon, 16 Jan 2006 16:30:05 GMT (envelope-from gnats) Resent-Date: Mon, 16 Jan 2006 16:30:05 GMT Resent-Message-Id: <200601161630.k0GGU5bL011477@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Anish Mistry" Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3D5B216A41F for ; Mon, 16 Jan 2006 16:27:08 +0000 (GMT) (envelope-from amistry@am-productions.biz) Received: from smtp2.fuse.net (mail-out2.fuse.net [216.68.8.175]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6FA5143D55 for ; Mon, 16 Jan 2006 16:27:07 +0000 (GMT) (envelope-from amistry@am-productions.biz) Received: from gx4.fuse.net ([69.61.164.22]) by smtp2.fuse.net (InterMail vM.6.01.04.04 201-2131-118-104-20050224) with ESMTP id <20060116162706.UNHM1908.smtp2.fuse.net@gx4.fuse.net> for ; Mon, 16 Jan 2006 11:27:06 -0500 Received: from bigguy.am-productions.biz ([69.61.164.22]) by gx4.fuse.net (InterMail vG.1.02.00.02 201-2136-104-102-20041210) with ESMTP id <20060116162705.OROS29854.gx4.fuse.net@bigguy.am-productions.biz> for ; Mon, 16 Jan 2006 11:27:05 -0500 Message-Id: <1137428989.59714@bigguy.am-productions.biz> Date: Mon, 16 Jan 2006 11:29:49 -0500 From: "Anish Mistry" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.7 Cc: Subject: ports/91873: Update fusefs ports X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Jan 2006 16:30:08 -0000 >Number: 91873 >Category: ports >Synopsis: Update fusefs ports >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Mon Jan 16 16:30:05 GMT 2006 >Closed-Date: >Last-Modified: >Originator: Anish Mistry >Release: FreeBSD 6.0-STABLE i386 >Organization: AM Productions >Environment: System: FreeBSD 6.0-STABLE #10: Fri Jan 6 17:53:21 EST 2006 amistry@bigguy.am-productions.biz:/usr/obj/usr/src/sys/BIGGUY >Description: I've attached all 3 updates (fusefs-libs, fusefs-kmod, fusefs-sshfs) since they need to be applied at the same time to keep everything working. >How-To-Repeat: >Fix: --- fusefs-kmod-0.2.99.1.patch begins here --- diff -ruN fusefs-kmod.orig/Makefile fusefs-kmod/Makefile --- fusefs-kmod.orig/Makefile Wed Oct 19 04:18:57 2005 +++ fusefs-kmod/Makefile Sun Jan 15 22:51:42 2006 @@ -6,21 +6,22 @@ # PORTNAME= fusefs -PORTVERSION= 0.2.19.6 +PORTVERSION= 0.2.99.1 CATEGORIES= sysutils MASTER_SITES= http://fuse4bsd.creo.hu/downloads/ \ http://am-productions.biz/docs/ PKGNAMESUFFIX= -kmod -DISTNAME= fuse4bsd-0.2.20pre6 -EXTRACT_SUFX= .tar.bz2 +DISTNAME= fuse4bsd-0.3.0-pre1 MAINTAINER= amistry@am-productions.biz COMMENT= Kernel module for fuse BUILD_DEPENDS= ${LOCALBASE}/include/fuse/fuse_kernel.h:${PORTSDIR}/sysutils/fusefs-libs +CONFLICTS= fusefs-libs-2.4* + OPTIONS= AUTOSETUP "Automatic global config file setup" off -MAKE_ENV+= BINDIR=${PREFIX}/sbin MANDIR=${PREFIX}/man/man +MAKE_ENV+= BINDIR="${PREFIX}/sbin" MANDIR="${PREFIX}/man/man" MAN8= mount_fusefs.8 KMODDIR= ${PREFIX}/modules MAKE_ARGS= KMODDIR=${KMODDIR} @@ -28,13 +29,25 @@ STARTUP= fuse.sh SETUP= setup.sh MODULE_PATH= `sysctl -n kern.module_path`;${KMODDIR} +TXT_DOCS= doc.txt +HTML_DOCS= Faq.html \ + Implementation.html \ + Quickstart.html \ + article.css \ + deplate-mini.png \ + deplate.css \ + doc.html \ + heading-navbar.css \ + home-grey.png \ + mailto.png \ + next-grey.png \ + prev-grey.png \ + remote.png \ + serif.css \ + tabbar-right.css .include -.if ( ${OSVERSION} >= 600000 && ${OSVERSION} < 600034 ) || ( ${OSVERSION} >= 700000 && ${OSVERSION} < 700002 ) -MAKE_ARGS+= -DUSE_OLD_CLONEHANDLER_API -.endif - .if ${OSVERSION} < 600000 IGNORE= requires FreeBSD 6 or above. Please consider porting it to 5.x or even 4.x .endif @@ -43,6 +56,10 @@ IGNORE= requires the Kernel source to be installed. Set SRC_BASE if it is not in /usr/src .endif +post-configure: + ${CP} ${LOCALBASE}/include/fuse/fuse_kernel.h \ + ${WRKSRC}/fuse_module + pre-install: ${MKDIR} ${KMODDIR} @@ -57,6 +74,18 @@ .else @${SED} -e "s|%%PREFIX%%|${PREFIX}|g" \ -e "s|%%MODULE_PATH%%|${MODULE_PATH}|g" ${PKGMESSAGE} +.endif + +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${MKDIR} ${DOCSDIR}/kmod + @${MKDIR} ${DOCSDIR}/kmod/html +.for i in ${TXT_DOCS} + @${INSTALL_DATA} ${WRKSRC}/doc/plaintext_out/$i ${DOCSDIR}/kmod +.endfor +.for i in ${HTML_DOCS} + @${INSTALL_DATA} ${WRKSRC}/doc/html_chunked_out/$i ${DOCSDIR}/kmod/html +.endfor .endif .include diff -ruN fusefs-kmod.orig/distinfo fusefs-kmod/distinfo --- fusefs-kmod.orig/distinfo Wed Oct 19 04:18:57 2005 +++ fusefs-kmod/distinfo Sun Jan 15 22:43:57 2006 @@ -1,2 +1,3 @@ -MD5 (fuse4bsd-0.2.20pre6.tar.bz2) = e2c48e940b1fdcb669add847e42011c0 -SIZE (fuse4bsd-0.2.20pre6.tar.bz2) = 71336 +MD5 (fuse4bsd-0.3.0-pre1.tar.gz) = 9ac79caade41a0c0579f8247f89bac54 +SHA256 (fuse4bsd-0.3.0-pre1.tar.gz) = 1dbfa704787fbd60b6d880cb75af8d79c4c8d1e4cac16895da417814f1885790 +SIZE (fuse4bsd-0.3.0-pre1.tar.gz) = 165743 diff -ruN fusefs-kmod.orig/files/patch-fuse_module_Makefile fusefs-kmod/files/patch-fuse_module_Makefile --- fusefs-kmod.orig/files/patch-fuse_module_Makefile Wed Oct 19 04:18:57 2005 +++ fusefs-kmod/files/patch-fuse_module_Makefile Wed Dec 31 19:00:00 1969 @@ -1,18 +0,0 @@ ---- fuse_module/Makefile.orig Sun Oct 16 09:01:26 2005 -+++ fuse_module/Makefile Tue Oct 18 11:58:20 2005 -@@ -35,12 +35,11 @@ - - fuse.ko: fuse_kernel.h vnode_if.h vnode_if_typedef.h vnode_if_newproto.h - --fuse_kernel.h: fuse_kernel.h.orig -- cp fuse_kernel.h.orig fuse_kernel.h -- patch fuse_kernel.h < kernel-header.diff -+fuse_kernel.h: -+ cp ${LOCALBASE}/include/fuse/fuse_kernel.h fuse_kernel.h - - fuse_opnames.c: -- awk -f ../tools/genopnames.awk fuse_kernel.h.orig > fuse_opnames.c -+ awk -f ../tools/genopnames.awk fuse_kernel.h > fuse_opnames.c - - vnode_if.h: - awk -f /sys/tools/vnode_if.awk /sys/kern/vnode_if.src -h diff -ruN fusefs-kmod.orig/pkg-message fusefs-kmod/pkg-message --- fusefs-kmod.orig/pkg-message Wed Oct 19 04:18:57 2005 +++ fusefs-kmod/pkg-message Sun Jan 15 22:43:57 2006 @@ -7,4 +7,5 @@ - Add fusefs_enable="YES" to your /etc/rc.conf %%PREFIX%%/etc/rc.d/fuse.sh start will load the module for the first time -after the installation. +after the installation. Set "sysctl vfs.usermount=1" if you want to be able +to mount fuse devices as an ordinary user. diff -ruN fusefs-kmod.orig/pkg-plist fusefs-kmod/pkg-plist --- fusefs-kmod.orig/pkg-plist Wed Oct 19 04:18:57 2005 +++ fusefs-kmod/pkg-plist Sun Jan 15 22:43:57 2006 @@ -1,6 +1,24 @@ etc/rc.d/fuse.sh modules/fuse.ko sbin/mount_fusefs -sbin/mount_fusefs_safe @unexec kldxref %D/modules @unexec rmdir %D/modules 2>/dev/null || true +%%PORTDOCS%%%%DOCSDIR%%/kmod/doc.txt +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Faq.html +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Implementation.html +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/Quickstart.html +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/article.css +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/deplate-mini.png +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/deplate.css +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/doc.html +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/heading-navbar.css +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/home-grey.png +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/mailto.png +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/next-grey.png +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/prev-grey.png +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/remote.png +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/serif.css +%%PORTDOCS%%%%DOCSDIR%%/kmod/html/tabbar-right.css +%%PORTDOCS%%@dirrm %%DOCSDIR%%/kmod/html +%%PORTDOCS%%@dirrm %%DOCSDIR%%/kmod +@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true \ No newline at end of file --- fusefs-kmod-0.2.99.1.patch ends here --- --- fusefs-libs-2.5.0.patch begins here --- diff -ruN fusefs-libs.orig/Makefile fusefs-libs/Makefile --- fusefs-libs.orig/Makefile Tue Nov 15 01:51:07 2005 +++ fusefs-libs/Makefile Sun Jan 15 22:43:10 2006 @@ -5,7 +5,7 @@ # PORTNAME= fusefs -PORTVERSION= 2.4.1 +PORTVERSION= 2.5.0 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= fuse @@ -17,12 +17,14 @@ USE_AUTOTOOLS= libtool:15 CONFIGURE_ENV= MOUNT_FUSE_PATH=${PREFIX}/sbin \ - PKG_CONFIG_PATH=${PREFIX}/libdata/pkgconfig \ CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" GNU_CONFIGURE= yes INSTALLS_SHLIB= yes -CONFIGURE_ARGS= --disable-kernel-module --prefix=${PREFIX} +CONFIGURE_ARGS= --disable-kernel-module --prefix=${PREFIX} \ + --with-pkgconfigdir=${PREFIX}/libdata/pkgconfig USE_REINPLACE= yes +TXT_DOCS= how-fuse-works \ + kernel.txt .include @@ -40,5 +42,13 @@ post-install: ${INSTALL_DATA} ${WRKSRC}/include/fuse_kernel.h ${PREFIX}/include/fuse + +.if !defined(NOPORTDOCS) + @${MKDIR} ${DOCSDIR} + @${MKDIR} ${DOCSDIR}/libs +.for i in ${TXT_DOCS} + @${INSTALL_DATA} ${WRKSRC}/doc/$i ${DOCSDIR}/libs +.endfor +.endif .include diff -ruN fusefs-libs.orig/distinfo fusefs-libs/distinfo --- fusefs-libs.orig/distinfo Mon Oct 31 07:43:46 2005 +++ fusefs-libs/distinfo Sun Jan 15 22:43:10 2006 @@ -1,2 +1,3 @@ -MD5 (fuse-2.4.1.tar.gz) = 553bd9c5a4f3cd27f3e2b93844711e4c -SIZE (fuse-2.4.1.tar.gz) = 384631 +MD5 (fuse-2.5.0.tar.gz) = 9d20ae16211475d81c7c5235867e085f +SHA256 (fuse-2.5.0.tar.gz) = 6d2a38a02e0ec740a339be7efe656341a81e5426aed612bf3fb1ea0da5c49b5d +SIZE (fuse-2.5.0.tar.gz) = 408472 diff -ruN fusefs-libs.orig/files/patch-Makefile.in fusefs-libs/files/patch-Makefile.in --- fusefs-libs.orig/files/patch-Makefile.in Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-Makefile.in Wed Dec 31 19:00:00 1969 @@ -1,11 +0,0 @@ ---- Makefile.in.orig Mon Oct 3 16:43:22 2005 -+++ Makefile.in Sun Oct 9 22:05:09 2005 -@@ -184,7 +184,7 @@ - doc/how-fuse-works \ - doc/kernel.txt - --pkgconfigdir = $(libdir)/pkgconfig -+pkgconfigdir = $(prefix)/libdata/pkgconfig - pkgconfig_DATA = fuse.pc - all: all-recursive - diff -ruN fusefs-libs.orig/files/patch-example_fusexmp.c fusefs-libs/files/patch-example_fusexmp.c --- fusefs-libs.orig/files/patch-example_fusexmp.c Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-example_fusexmp.c Wed Dec 31 19:00:00 1969 @@ -1,36 +0,0 @@ ---- example/fusexmp.c.orig Tue Sep 13 21:26:12 2005 -+++ example/fusexmp.c Sun Oct 9 22:05:09 2005 -@@ -20,7 +20,12 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#else - #include -+#endif - #ifdef HAVE_SETXATTR - #include - #endif -@@ -79,7 +84,20 @@ - { - int res; - -+#ifndef __FreeBSD__ - res = mknod(path, mode, rdev); -+#else -+ if (rdev) -+ res = mknod(path, mode, rdev); -+ else if (mode & S_IFIFO) -+ res = mkfifo(path, mode); -+ else { -+ res = open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); -+ if (res >= 0) -+ res = close(res); -+ } -+#endif -+ - if(res == -1) - return -errno; - diff -ruN fusefs-libs.orig/files/patch-example_fusexmp_fh.c fusefs-libs/files/patch-example_fusexmp_fh.c --- fusefs-libs.orig/files/patch-example_fusexmp_fh.c Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-example_fusexmp_fh.c Wed Dec 31 19:00:00 1969 @@ -1,62 +0,0 @@ ---- example/fusexmp_fh.c.orig Tue Sep 13 21:26:12 2005 -+++ example/fusexmp_fh.c Sun Oct 9 22:05:09 2005 -@@ -17,7 +17,12 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#else - #include -+#endif - #ifdef HAVE_SETXATTR - #include - #endif -@@ -68,7 +73,11 @@ - memset(&st, 0, sizeof(st)); - st.st_ino = de->d_ino; - st.st_mode = de->d_type << 12; -+#ifdef __FreeBSD__ -+ if (filler(buf, de->d_name, &st, telldir(dp))) -+#else - if (filler(buf, de->d_name, &st, de->d_off)) -+#endif - break; - } - -@@ -87,7 +96,20 @@ - { - int res; - -+#ifndef __FreeBSD__ - res = mknod(path, mode, rdev); -+#else -+ if (rdev) -+ res = mknod(path, mode, rdev); -+ else if (mode & S_IFIFO) -+ res = mkfifo(path, mode); -+ else { -+ res = open(path, O_CREAT | O_TRUNC | O_WRONLY, mode); -+ if (res >= 0) -+ res = close(res); -+ } -+#endif -+ - if(res == -1) - return -errno; - -@@ -268,9 +290,13 @@ - int res; - (void) path; - -+#ifdef __FreeBSD__ -+ (void) isdatasync; -+#else - if (isdatasync) - res = fdatasync(fi->fh); - else -+#endif - res = fsync(fi->fh); - if(res == -1) - return -errno; diff -ruN fusefs-libs.orig/files/patch-include_fuse.h fusefs-libs/files/patch-include_fuse.h --- fusefs-libs.orig/files/patch-include_fuse.h Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-include_fuse.h Wed Dec 31 19:00:00 1969 @@ -1,15 +0,0 @@ ---- include/fuse.h.orig Mon Oct 3 16:12:50 2005 -+++ include/fuse.h Sun Oct 9 22:05:09 2005 -@@ -20,7 +20,12 @@ - - #include - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#else - #include -+#endif - #include - - #ifdef __cplusplus diff -ruN fusefs-libs.orig/files/patch-include_fuse_kernel.h fusefs-libs/files/patch-include_fuse_kernel.h --- fusefs-libs.orig/files/patch-include_fuse_kernel.h Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-include_fuse_kernel.h Wed Dec 31 19:00:00 1969 @@ -1,14 +0,0 @@ ---- include/fuse_kernel.h.orig Mon Oct 3 17:02:36 2005 -+++ include/fuse_kernel.h Sun Oct 9 22:05:09 2005 -@@ -36,7 +36,11 @@ - - /* This file defines the kernel interface of FUSE */ - -+#ifdef __FreeBSD__ -+#include "linux_compat.h" -+#else - #include -+#endif - - /** Version number of this interface */ - #define FUSE_KERNEL_VERSION 7 diff -ruN fusefs-libs.orig/files/patch-include_fuse_lowlevel.h fusefs-libs/files/patch-include_fuse_lowlevel.h --- fusefs-libs.orig/files/patch-include_fuse_lowlevel.h Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-include_fuse_lowlevel.h Wed Dec 31 19:00:00 1969 @@ -1,15 +0,0 @@ ---- include/fuse_lowlevel.h.orig Mon Oct 3 16:12:50 2005 -+++ include/fuse_lowlevel.h Sun Oct 9 22:05:09 2005 -@@ -18,7 +18,12 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+#include -+#include -+#else - #include -+#endif - #include - - #ifdef __cplusplus diff -ruN fusefs-libs.orig/files/patch-include_linux_compat.h fusefs-libs/files/patch-include_linux_compat.h --- fusefs-libs.orig/files/patch-include_linux_compat.h Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-include_linux_compat.h Wed Dec 31 19:00:00 1969 @@ -1,9 +0,0 @@ ---- include/linux_compat.h.orig Sun Oct 9 22:05:09 2005 -+++ include/linux_compat.h Sun Oct 9 22:05:09 2005 -@@ -0,0 +1,6 @@ -+#include /* XXX Or should it be sys/stdint.h ? */ -+ -+#define __u64 uint64_t -+#define __u32 uint32_t -+#define __s32 int32_t -+ diff -ruN fusefs-libs.orig/files/patch-lib_fuse.c fusefs-libs/files/patch-lib_fuse.c --- fusefs-libs.orig/files/patch-lib_fuse.c Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-lib_fuse.c Wed Dec 31 19:00:00 1969 @@ -1,52 +0,0 @@ ---- lib/fuse.c.orig Mon Oct 3 17:02:37 2005 -+++ lib/fuse.c Sun Oct 9 22:05:09 2005 -@@ -1414,7 +1414,12 @@ - - static int default_statfs(struct statfs *buf) - { -+#ifdef __FreeBSD__ -+ buf->f_namemax = 255; -+#else - buf->f_namelen = 255; -+#endif -+ - buf->f_bsize = 512; - return 0; - } -@@ -1428,7 +1433,11 @@ - stbuf->f_bavail = compatbuf->blocks_free; - stbuf->f_files = compatbuf->files; - stbuf->f_ffree = compatbuf->files_free; -+#ifdef __FreeBSD__ -+ stbuf->f_namemax = compatbuf->namelen; -+#else - stbuf->f_namelen = compatbuf->namelen; -+#endif - } - - static void fuse_statfs(fuse_req_t req) -@@ -1761,8 +1770,10 @@ - f->flags |= FUSE_HARD_REMOVE; - else if (strcmp(opt, "use_ino") == 0) - f->flags |= FUSE_USE_INO; -+#ifndef FreeBSD - else if (strcmp(opt, "readdir_ino") == 0) - f->flags |= FUSE_READDIR_INO; -+#endif - else if (strcmp(opt, "direct_io") == 0) - f->flags |= FUSE_DIRECT_IO; - else if (strcmp(opt, "kernel_cache") == 0) -@@ -1787,6 +1798,13 @@ - else - free(xopts); - } -+#ifdef __FreeBSD__ -+ /* -+ * In FreeBSD, we always use these settings as inode numbers are needed to -+ * make getcwd(3) work. -+ */ -+ f->flags |= FUSE_READDIR_INO; -+#endif - return 0; - } - diff -ruN fusefs-libs.orig/files/patch-lib_fuse_lowlevel.c fusefs-libs/files/patch-lib_fuse_lowlevel.c --- fusefs-libs.orig/files/patch-lib_fuse_lowlevel.c Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-lib_fuse_lowlevel.c Wed Dec 31 19:00:00 1969 @@ -1,26 +0,0 @@ ---- lib/fuse_lowlevel.c.orig Mon Oct 3 17:15:05 2005 -+++ lib/fuse_lowlevel.c Sun Oct 9 22:05:09 2005 -@@ -194,7 +194,11 @@ - kstatfs->bavail = stbuf->f_bavail; - kstatfs->files = stbuf->f_files; - kstatfs->ffree = stbuf->f_ffree; -+#ifdef __FreeBSD__ -+ kstatfs->namelen = stbuf->f_namemax; -+#else - kstatfs->namelen = stbuf->f_namelen; -+#endif - } - - static int send_reply_ok(fuse_req_t req, const void *arg, size_t argsize) -@@ -690,7 +694,11 @@ - req->ch = ch; - - if (!f->got_init && in->opcode != FUSE_INIT) -+#ifdef EPROTO - fuse_reply_err(req, EPROTO); -+#else -+ fuse_reply_err(req, EPROTONOSUPPORT); -+#endif - else if (f->allow_root && in->uid != f->owner && in->uid != 0 && - in->opcode != FUSE_INIT && in->opcode != FUSE_READ && - in->opcode != FUSE_WRITE && in->opcode != FUSE_FSYNC && diff -ruN fusefs-libs.orig/files/patch-lib_helper.c fusefs-libs/files/patch-lib_helper.c --- fusefs-libs.orig/files/patch-lib_helper.c Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-lib_helper.c Wed Dec 31 19:00:00 1969 @@ -1,62 +0,0 @@ ---- lib/helper.c.orig Mon Aug 15 16:03:59 2005 -+++ lib/helper.c Sun Oct 9 22:05:09 2005 -@@ -22,7 +22,11 @@ - { - if (progname) - fprintf(stderr, -+#ifdef __FreeBSD__ -+ "usage: %s [FUSE options]\n\n", progname); -+#else - "usage: %s mountpoint [FUSE options]\n\n", progname); -+#endif - - fprintf(stderr, - "FUSE options:\n" -@@ -45,11 +49,19 @@ - " debug enable debug output\n" - " fsname=NAME set filesystem name in mtab\n" - " use_ino let filesystem set inode numbers\n" -+#ifndef __FreeBSD__ - " readdir_ino try to fill in d_ino in readdir\n" -+#endif - " nonempty allow mounts over non-empty file/dir\n" - " umask=M set file permissions (octal)\n" - " uid=N set file owner\n" - " gid=N set file group\n" -+#ifdef __FreeBSD__ -+ "\n" -+ "(Note that the above description regards to Linux. Hence these\n" -+ "options might work differently or might not work at all.\n" -+ "For more information, see mount_fusefs(8).)\n" -+#endif - ); - } - -@@ -275,11 +287,13 @@ - } - } - -+#ifndef __FreeBSD__ - if (*mountpoint == NULL) { - fprintf(stderr, "missing mountpoint\n"); - fprintf(stderr, "see `%s -h' for usage\n", argv[0]); - goto err; - } -+#endif - return 0; - - err: -@@ -377,8 +391,13 @@ - fuse_instance = NULL; - - fuse_destroy(fuse); -+#ifndef __FreeBSD__ - close(fd); - fuse_unmount(mountpoint); -+#else -+ fuse_unmount(mountpoint); -+ close(fd); -+#endif - free(mountpoint); - } - diff -ruN fusefs-libs.orig/files/patch-lib_mount.c fusefs-libs/files/patch-lib_mount.c --- fusefs-libs.orig/files/patch-lib_mount.c Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-lib_mount.c Wed Dec 31 19:00:00 1969 @@ -1,118 +0,0 @@ ---- lib/mount.c.orig Sun Oct 2 11:16:12 2005 -+++ lib/mount.c Sun Oct 9 22:05:09 2005 -@@ -21,7 +21,7 @@ - #define FUSERMOUNT_PROG "fusermount" - #define FUSE_COMMFD_ENV "_FUSE_COMMFD" - -- -+#ifndef __FreeBSD__ - /* return value: - * >= 0 => fd - * -1 => error -@@ -66,9 +66,11 @@ - } - return *(int*)CMSG_DATA(cmsg); - } -+#endif - - void fuse_unmount(const char *mountpoint) - { -+#ifndef __FreeBSD__ - const char *mountprog = FUSERMOUNT_PROG; - char umount_cmd[1024]; - -@@ -77,10 +79,53 @@ - - umount_cmd[sizeof(umount_cmd) - 1] = '\0'; - system(umount_cmd); -+#else -+ /* -+ * This is how we could do unmount-by-the-daemon in FreeBSD. -+ * Alas, by the time we get here, fuse_kern_chan_destroy -+ * has closed up the device, so this will fail. -+ * Maybe fuse_kern_chan_destroy should be castrated for FreeBSD? -+ * Well, let's stay on the safe side for now. -+ */ -+#if 0 -+ /* -+ * We keep on not wanting to rely on the mountpoint argument -+ * so let's just look up our device as in mount_fusefs(8)... -+ * we don't trust the environment here though. -+ */ -+ char dev[128]; -+ char *ssc, *umount_cmd; -+ FILE *sf; -+ int rv; -+ char *seekscript = -+ "/usr/bin/fstat /dev/fuse* |\n" -+ "/usr/bin/awk '{if ($3 == %d) print $10}' |\n" -+ "/usr/bin/sort |\n" -+ "/usr/bin/uniq |\n" -+ "/usr/bin/awk '{ i+=1; if(i > 1){ exit (1); }; printf; }; END{if (i==0) exit (1)}'"; -+ -+ asprintf(&ssc, seekscript, getpid()); -+ -+ errno = 0; -+ sf = popen(ssc, "r"); -+ if (! sf) -+ return; -+ -+ fgets(dev, sizeof(dev), sf); -+ rv = pclose(sf); -+ if (rv) -+ return; -+ -+ asprintf(&umount_cmd, "/sbin/umount %s", dev); -+ system(umount_cmd); -+#endif -+ (void)mountpoint; -+#endif - } - - int fuse_mount(const char *mountpoint, const char *opts) - { -+#ifndef __FreeBSD__ - const char *mountprog = FUSERMOUNT_PROG; - int fds[2], pid; - int res; -@@ -133,6 +178,40 @@ - waitpid(pid, NULL, 0); /* bury zombie */ - - return rv; -+#else -+ int fd; -+ char *dev; -+ -+ (void)mountpoint; -+ (void)opts; -+ -+ dev = getenv("FUSE_DEV_FD"); -+ -+ if (dev) { -+ errno = 0; -+ fd = strtol(dev, NULL, 10); -+ -+ if (errno) { -+ perror("bad value given in FUSE_DEV_FD"); -+ return -1; -+ } -+ -+ if (fd < 0) -+ return -1; -+ -+ return fd; -+ } -+ -+ dev = getenv("FUSE_DEV_NAME"); -+ -+ if (! dev) -+ dev = "/dev/fuse"; -+ -+ if ((fd = open(dev, O_RDWR)) < 0) -+ perror("failed to open fuse device"); -+ -+ return fd; -+#endif - } - - int fuse_mount_compat1(const char *mountpoint, const char *args[]) diff -ruN fusefs-libs.orig/files/patch-util_Makefile.in fusefs-libs/files/patch-util_Makefile.in --- fusefs-libs.orig/files/patch-util_Makefile.in Wed Oct 19 04:14:55 2005 +++ fusefs-libs/files/patch-util_Makefile.in Wed Dec 31 19:00:00 1969 @@ -1,68 +0,0 @@ ---- util/Makefile.in.orig Mon Oct 3 16:43:22 2005 -+++ util/Makefile.in Sun Oct 9 22:05:09 2005 -@@ -38,7 +38,7 @@ - POST_UNINSTALL = : - build_triplet = @build@ - host_triplet = @host@ --bin_PROGRAMS = fusermount$(EXEEXT) -+bin_PROGRAMS = - subdir = util - DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in - ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -@@ -164,7 +164,7 @@ - sysconfdir = @sysconfdir@ - target_alias = @target_alias@ - fusermount_SOURCES = fusermount.c --EXTRA_DIST = mount.fuse udev.rules -+EXTRA_DIST = - all: all-am - - .SUFFIXES: -@@ -361,10 +361,6 @@ - - installcheck: installcheck-am - install-strip: -- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ -- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ -- `test -z '$(STRIP)' || \ -- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install - mostlyclean-generic: - - clean-generic: -@@ -434,34 +430,21 @@ - install-binPROGRAMS install-data install-data-am \ - install-data-local install-exec install-exec-am \ - install-exec-hook install-exec-local install-info \ -- install-info-am install-man install-strip installcheck \ -+ install-info-am install-man installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-binPROGRAMS \ - uninstall-info-am uninstall-local - -- - install-exec-hook: -- -chown root $(DESTDIR)$(bindir)/fusermount -- -chmod u+s $(DESTDIR)$(bindir)/fusermount -- @if test ! -e $(DESTDIR)/dev/fuse; then \ -- $(mkdir_p) $(DESTDIR)/dev; \ -- echo "mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229"; \ -- mknod $(DESTDIR)/dev/fuse -m 0666 c 10 229; \ -- fi - - install-exec-local: -- $(mkdir_p) $(DESTDIR)$(MOUNT_FUSE_PATH) -- $(INSTALL_PROGRAM) $(srcdir)/mount.fuse $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse - - install-data-local: -- $(mkdir_p) $(DESTDIR)$(UDEV_RULES_PATH) -- $(INSTALL_DATA) $(srcdir)/udev.rules $(DESTDIR)$(UDEV_RULES_PATH)/40-fuse.rules - - uninstall-local: -- rm -f $(DESTDIR)$(MOUNT_FUSE_PATH)/mount.fuse -- rm -f $(DESTDIR)$(UDEV_RULES_PATH)/40-fuse.rules -+ - # Tell versions [3.59,3.63) of GNU make to not export all variables. - # Otherwise a system limit (for SysV at least) may be exceeded. - .NOEXPORT: diff -ruN fusefs-libs.orig/pkg-plist fusefs-libs/pkg-plist --- fusefs-libs.orig/pkg-plist Wed Oct 19 04:14:55 2005 +++ fusefs-libs/pkg-plist Sun Jan 15 22:43:10 2006 @@ -2,6 +2,8 @@ include/fuse/fuse_compat.h include/fuse/fuse_common.h include/fuse/fuse_lowlevel.h +include/fuse/fuse_lowlevel_compat.h +include/fuse/fuse_opt.h include/fuse/fuse_kernel.h include/fuse.h lib/libfuse.so.2 @@ -9,3 +11,7 @@ lib/libfuse.a libdata/pkgconfig/fuse.pc @dirrm include/fuse +%%PORTDOCS%%%%DOCSDIR%%/libs/how-fuse-works +%%PORTDOCS%%%%DOCSDIR%%/libs/kernel.txt +%%PORTDOCS%%@dirrm %%DOCSDIR%%/libs +@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true --- fusefs-libs-2.5.0.patch ends here --- --- fusefs-sshfs-1.4.patch begins here --- diff -ruN fusefs-sshfs.orig/Makefile fusefs-sshfs/Makefile --- fusefs-sshfs.orig/Makefile Sun Nov 6 15:15:42 2005 +++ fusefs-sshfs/Makefile Sun Jan 15 22:56:16 2006 @@ -5,8 +5,7 @@ # PORTNAME= sshfs -PORTVERSION= 1.3 -PORTREVISION= 1 +PORTVERSION= 1.4 CATEGORIES= sysutils MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} MASTER_SITE_SUBDIR= fuse @@ -18,6 +17,8 @@ LIB_DEPENDS= fuse.2:${PORTSDIR}/sysutils/fusefs-libs RUN_DEPENDS= ${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod + +CONFLICTS= fusefs-kmod-0.2.19* GNU_CONFIGURE= yes CONFIGURE_ENV+= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" diff -ruN fusefs-sshfs.orig/distinfo fusefs-sshfs/distinfo --- fusefs-sshfs.orig/distinfo Mon Oct 31 07:49:43 2005 +++ fusefs-sshfs/distinfo Sun Jan 15 22:29:49 2006 @@ -1,2 +1,3 @@ -MD5 (sshfs-fuse-1.3.tar.gz) = 40fe4a353d03b80f8b37e4b0cc6159d3 -SIZE (sshfs-fuse-1.3.tar.gz) = 88738 +MD5 (sshfs-fuse-1.4.tar.gz) = 3777dd6f232d33c9110abfa5ecd5518e +SHA256 (sshfs-fuse-1.4.tar.gz) = 5f1837f97a755d1ca11dcd79881f9e1598218259868959d4805bb578822a0d47 +SIZE (sshfs-fuse-1.4.tar.gz) = 93059 diff -ruN fusefs-sshfs.orig/files/patch-sshfs.c fusefs-sshfs/files/patch-sshfs.c --- fusefs-sshfs.orig/files/patch-sshfs.c Mon Oct 31 07:49:43 2005 +++ fusefs-sshfs/files/patch-sshfs.c Wed Dec 31 19:00:00 1969 @@ -1,147 +0,0 @@ ---- sshfs.c.orig Fri Oct 28 08:15:35 2005 -+++ sshfs.c Mon Oct 31 02:59:33 2005 -@@ -14,7 +14,11 @@ - #include - #include - #include --#include -+#ifdef HAVE_STDINT_H -+ #include -+#elif defined(HAVE_INTTYPES_H) -+ #include -+#endif - #include - #include - #include -@@ -24,6 +28,13 @@ - #include - #include - #include -+#ifdef __FreeBSD__ -+ #include -+ #include -+ #if (__FreeBSD_version < 600034) -+ #define EPROTONOSUPPORT 43 -+ #endif -+#endif - - #include "cache.h" - #include "opts.h" -@@ -1070,7 +1081,11 @@ - err = req->error; - goto out; - } -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - if (req->reply_type != expect_type && req->reply_type != SSH_FXP_STATUS) { - fprintf(stderr, "protocol error\n"); - goto out; -@@ -1085,21 +1100,35 @@ - if (expect_type == SSH_FXP_STATUS) - err = 0; - else -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - break; - - case SSH_FX_EOF: - if (type == SSH_FXP_READ || type == SSH_FXP_READDIR) - err = MY_EOF; - else -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - break; - - case SSH_FX_NO_SUCH_FILE: err = -ENOENT; break; - case SSH_FX_PERMISSION_DENIED: err = -EACCES; break; - case SSH_FX_FAILURE: err = -EPERM; break; - case SSH_FX_BAD_MESSAGE: -- default: err = -EPROTO; break; -+ default: -+#ifdef EPROTO -+ err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif -+ break; - } - } else { - buf_init(outbuf, req->reply.size - req->reply.len); -@@ -1142,7 +1171,11 @@ - err = sftp_request(SSH_FXP_LSTAT, &buf, SSH_FXP_ATTRS, &outbuf); - if (!err) { - if (buf_get_attrs(&outbuf, stbuf, NULL) == -1) -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - buf_free(&outbuf); - } - buf_free(&buf); -@@ -1164,7 +1197,11 @@ - if (!err) { - uint32_t count; - char *link; -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - if(buf_get_uint32(&name, &count) != -1 && count == 1 && - buf_get_string(&name, &link) != -1) { - strncpy(linkbuf, link, size-1); -@@ -1195,7 +1232,11 @@ - err = sftp_request(SSH_FXP_READDIR, &handle, SSH_FXP_NAME, &name); - if (!err) { - if (buf_get_entries(&name, h, filler) == -1) -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - buf_free(&name); - } - } while (!err); -@@ -1528,7 +1569,11 @@ - err = sftp_request(SSH_FXP_READ, &buf, SSH_FXP_DATA, &data); - if (!err) { - uint32_t retsize; -+#ifdef EPROTO - err = -EPROTO; -+#else -+ err = -EPROTONOSUPPORT; -+#endif - if (buf_get_uint32(&data, &retsize) != -1) { - if (retsize > size) - fprintf(stderr, "long read\n"); -@@ -1550,7 +1595,11 @@ - if (req->error) - chunk->res = req->error; - else if (req->replied) { -+#ifdef EPROTO - chunk->res = -EPROTO; -+#else -+ chunk->res = -EPROTONOSUPPORT; -+#endif - - if (req->reply_type == SSH_FXP_STATUS) { - uint32_t serr; -@@ -1771,7 +1820,7 @@ - { - (void) path; - -- buf->f_namelen = 255; -+ buf->f_namemax = 255; - buf->f_bsize = 512; - buf->f_blocks = 999999999 * 2; - buf->f_bfree = 999999999 * 2; diff -ruN fusefs-sshfs.orig/pkg-message fusefs-sshfs/pkg-message --- fusefs-sshfs.orig/pkg-message Mon Oct 31 07:49:43 2005 +++ fusefs-sshfs/pkg-message Sun Jan 15 22:32:48 2006 @@ -1,21 +1,22 @@ Basic Instructions: -Load the fuse kernel module (as root): -# %%PREFIX%%/etc/rc.d/fuse.sh start +There are three ways to do this: -Then mount something via sshfs (as an ordinary user if you set -vfs.usermount=1). - -There are two ways to do this: +Daemon initiated 1) -% env FUSE_DEV_NAME=/dev/fuse0 sshfs -o uid= -o gid= \ - username@example.org: -% mount_fusefs /dev/fuse0 /path/to/mount/point +% sshfs -o idmap=user username@example.org: /path/to/mount/point or 2) -% mount_fusefs auto /path/to/mount/point sshfs -o uid= \ - -o gid= username@example.org: +% mount_fusefs auto /path/to/mount/point sshfs -o idmap=user \ + username@example.org: + +or + +3) +% env FUSE_DEV_NAME=/dev/fuse0 sshfs -o idmap=user \ + username@example.org: +% mount_fusefs /dev/fuse0 /path/to/mount/point For further options see ``sshfs -h''. --- fusefs-sshfs-1.4.patch ends here --- >Release-Note: >Audit-Trail: >Unformatted: