diff options
author | barner <barner@FreeBSD.org> | 2005-10-19 16:21:28 +0800 |
---|---|---|
committer | barner <barner@FreeBSD.org> | 2005-10-19 16:21:28 +0800 |
commit | 18a11b2b0d1473d69e5b828deda638adc43a050b (patch) | |
tree | d85e484b89dc4ea52950acf8727f80c03ad2d62f /sysutils/fusefs-sshfs | |
parent | e8d88be01ea96c0201643301ae7373a9640608e7 (diff) | |
download | freebsd-ports-gnome-18a11b2b0d1473d69e5b828deda638adc43a050b.tar.gz freebsd-ports-gnome-18a11b2b0d1473d69e5b828deda638adc43a050b.tar.zst freebsd-ports-gnome-18a11b2b0d1473d69e5b828deda638adc43a050b.zip |
Add new port for fusefs-sshfs:
SSHFS allows you to mount a remote directory over a normal ssh connection.
WWW: http://sourceforge.net/projects/fuse/
PR: ports/87168
Submitted by: Anish Mistry <amistry@am-productions.biz>
Reviewed by: Csaba Henk <csaba.henk@creo.hu> (fuse SoC participant)
Diffstat (limited to 'sysutils/fusefs-sshfs')
-rw-r--r-- | sysutils/fusefs-sshfs/Makefile | 35 | ||||
-rw-r--r-- | sysutils/fusefs-sshfs/distinfo | 2 | ||||
-rw-r--r-- | sysutils/fusefs-sshfs/files/patch-sshfs.c | 138 | ||||
-rw-r--r-- | sysutils/fusefs-sshfs/pkg-descr | 3 | ||||
-rw-r--r-- | sysutils/fusefs-sshfs/pkg-message | 19 | ||||
-rw-r--r-- | sysutils/fusefs-sshfs/pkg-plist | 1 |
6 files changed, 198 insertions, 0 deletions
diff --git a/sysutils/fusefs-sshfs/Makefile b/sysutils/fusefs-sshfs/Makefile new file mode 100644 index 000000000000..232d3a15e637 --- /dev/null +++ b/sysutils/fusefs-sshfs/Makefile @@ -0,0 +1,35 @@ +# New ports collection makefile for: fusefs-sshfs +# Date created: 01 October 2005 +# Whom: Anish Mistry +# $FreeBSD$ +# + +PORTNAME= sshfs +PORTVERSION= 1.2 +CATEGORIES= sysutils +MASTER_SITES= ${MASTER_SITE_SOURCEFORGE} +MASTER_SITE_SUBDIR= fuse +PKGNAMEPREFIX= fusefs- +DISTNAME= ${PORTNAME}-fuse-${PORTVERSION} + +MAINTAINER= amistry@am-productions.biz +COMMENT= Mount remote directories over ssh + +LIB_DEPENDS= fuse.2:${PORTSDIR}/sysutils/fusefs-libs \ + glib-2.0.600:${PORTSDIR}/devel/glib20 +RUN_DEPENDS= ${LOCALBASE}/modules/fuse.ko:${PORTSDIR}/sysutils/fusefs-kmod + +GNU_CONFIGURE= yes +CONFIGURE_ENV+= CFLAGS="${CFLAGS} ${PTHREAD_CFLAGS}" +USE_REINPLACE= yes + +.include <bsd.port.pre.mk> + +.if ${OSVERSION} < 600000 +IGNORE= Depends on kernel module that requires FreeBSD 6 or later +.endif + +post-install: + @${SED} -e "s|%%PREFIX%%|${PREFIX}|" ${PKGMESSAGE} + +.include <bsd.port.post.mk> diff --git a/sysutils/fusefs-sshfs/distinfo b/sysutils/fusefs-sshfs/distinfo new file mode 100644 index 000000000000..772f595da15e --- /dev/null +++ b/sysutils/fusefs-sshfs/distinfo @@ -0,0 +1,2 @@ +MD5 (sshfs-fuse-1.2.tar.gz) = 685dc6611e20242602105fe4960a6ab9 +SIZE (sshfs-fuse-1.2.tar.gz) = 86239 diff --git a/sysutils/fusefs-sshfs/files/patch-sshfs.c b/sysutils/fusefs-sshfs/files/patch-sshfs.c new file mode 100644 index 000000000000..81e22c2e5041 --- /dev/null +++ b/sysutils/fusefs-sshfs/files/patch-sshfs.c @@ -0,0 +1,138 @@ +--- sshfs.c.orig Mon Aug 15 05:07:08 2005 ++++ sshfs.c Sun Oct 9 13:12:45 2005 +@@ -14,7 +14,11 @@ + #include <unistd.h> + #include <fcntl.h> + #include <string.h> +-#include <stdint.h> ++#ifdef HAVE_STDINT_H ++ #include <stdint.h> ++#elif defined(HAVE_INTTYPES_H) ++ #include <inttypes.h> ++#endif + #include <errno.h> + #include <semaphore.h> + #include <pthread.h> +@@ -24,6 +28,13 @@ + #include <sys/wait.h> + #include <netinet/in.h> + #include <glib.h> ++#ifdef __FreeBSD__ ++ #include <sys/socket.h> ++ #include <sys/param.h> ++ #if (__FreeBSD_version < 600034) ++ #define EPROTONOSUPPORT 43 ++ #endif ++#endif + + #include "cache.h" + #include "opts.h" +@@ -970,7 +981,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; +@@ -985,21 +1000,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); +@@ -1039,7 +1068,11 @@ + err = sftp_request(SSH_FXP_LSTAT, &buf, SSH_FXP_ATTRS, &outbuf); + if (!err) { + if (buf_get_attrs(&outbuf, stbuf) == -1) ++#ifdef EPROTO + err = -EPROTO; ++#else ++ err = -EPROTONOSUPPORT; ++#endif + buf_free(&outbuf); + } + buf_free(&buf); +@@ -1061,7 +1094,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); +@@ -1092,7 +1129,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); +@@ -1377,7 +1418,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"); +@@ -1399,7 +1444,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; diff --git a/sysutils/fusefs-sshfs/pkg-descr b/sysutils/fusefs-sshfs/pkg-descr new file mode 100644 index 000000000000..ff843d07be97 --- /dev/null +++ b/sysutils/fusefs-sshfs/pkg-descr @@ -0,0 +1,3 @@ +SSHFS allows you to mount a remote directory over a normal ssh connection. + +WWW: http://sourceforge.net/projects/fuse/ diff --git a/sysutils/fusefs-sshfs/pkg-message b/sysutils/fusefs-sshfs/pkg-message new file mode 100644 index 000000000000..648b854e7af7 --- /dev/null +++ b/sysutils/fusefs-sshfs/pkg-message @@ -0,0 +1,19 @@ +Basic Instructions: +Load the fuse kernel module (as root): +# %%PREFIX%%/etc/rc.d/fuse.sh start + +Then mount something via sshfs (as an ordinary user if you set +vfs.usermount=1). + +There are two ways to do this: + +1) +% env FUSE_DEV_NAME=/dev/fuse0 sshfs -o uid=<local uid> -o gid=<local gid> \ + username@example.org: +% mount_fusefs /dev/fuse0 /path/to/mount/point + +or + +2) +% mount_fusefs auto /path/to/mount/point sshfs -o uid=<local uid> \ + -o gid=<local gid> username@example.org: diff --git a/sysutils/fusefs-sshfs/pkg-plist b/sysutils/fusefs-sshfs/pkg-plist new file mode 100644 index 000000000000..e346bf9d7238 --- /dev/null +++ b/sysutils/fusefs-sshfs/pkg-plist @@ -0,0 +1 @@ +bin/sshfs |