Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 9 Oct 2005 13:28:31 -0400
From:      "Anish Mistry" <amistry@am-productions.biz>
To:        "FreeBSD gnats submit" <FreeBSD-gnats-submit@FreeBSD.org>
Subject:   ports/87168: New port: sysutils/sshfs
Message-ID:  <1128878911.0@bigguy.am-productions.biz>
Resent-Message-ID: <200510091730.j99HULm3090847@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         87168
>Category:       ports
>Synopsis:       New port: sysutils/sshfs
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Sun Oct 09 17:30:21 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     Anish Mistry
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
AM Productions 
>Environment:


System: FreeBSD 5.4-STABLE #3: Wed Aug 17 14:50:43 EDT 2005
    amistry@bigguy.am-productions.biz:/usr/obj/usr/src/sys/BIGGUY



>Description:


Allows the mounting of any ssh accessible device.  Depends on New port: sysutils/fusefs


>How-To-Repeat:





>Fix:


--- sshfs.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	sshfs
#	sshfs/files
#	sshfs/files/patch-aa
#	sshfs/distinfo
#	sshfs/pkg-descr
#	sshfs/Makefile
#	sshfs/pkg-plist
#
echo c - sshfs
mkdir -p sshfs > /dev/null 2>&1
echo c - sshfs/files
mkdir -p sshfs/files > /dev/null 2>&1
echo x - sshfs/files/patch-aa
sed 's/^X//' >sshfs/files/patch-aa << 'END-of-sshfs/files/patch-aa'
X--- sshfs.c.orig	Mon Aug 15 05:07:08 2005
X+++ sshfs.c	Sun Oct  9 13:12:45 2005
X@@ -14,7 +14,11 @@
X #include <unistd.h>
X #include <fcntl.h>
X #include <string.h>
X-#include <stdint.h>
X+#ifdef HAVE_STDINT_H
X+	#include <stdint.h>
X+#elif defined(HAVE_INTTYPES_H)
X+	#include <inttypes.h>
X+#endif
X #include <errno.h>
X #include <semaphore.h>
X #include <pthread.h>
X@@ -24,6 +28,13 @@
X #include <sys/wait.h>
X #include <netinet/in.h>
X #include <glib.h>
X+#ifdef __FreeBSD__
X+	#include <sys/socket.h>
X+	#include <sys/param.h>
X+	#if (__FreeBSD_version < 600034)
X+		#define	EPROTONOSUPPORT	43
X+	#endif
X+#endif
X 
X #include "cache.h"
X #include "opts.h"
X@@ -970,7 +981,11 @@
X         err = req->error;
X         goto out;
X     }
X+#ifdef EPROTO
X     err = -EPROTO;
X+#else
X+    err = -EPROTONOSUPPORT;
X+#endif
X     if (req->reply_type != expect_type && req->reply_type != SSH_FXP_STATUS) {
X         fprintf(stderr, "protocol error\n");
X         goto out;
X@@ -985,21 +1000,35 @@
X             if (expect_type == SSH_FXP_STATUS)
X                 err = 0;
X             else
X+#ifdef EPROTO
X                 err = -EPROTO;
X+#else
X+                err = -EPROTONOSUPPORT;
X+#endif
X             break;
X 
X         case SSH_FX_EOF:
X             if (type == SSH_FXP_READ || type == SSH_FXP_READDIR)
X                 err = MY_EOF;
X             else
X+#ifdef EPROTO
X                 err = -EPROTO;
X+#else
X+                err = -EPROTONOSUPPORT;
X+#endif
X             break;
X 
X         case SSH_FX_NO_SUCH_FILE:      err = -ENOENT; break;
X         case SSH_FX_PERMISSION_DENIED: err = -EACCES; break;
X         case SSH_FX_FAILURE:           err = -EPERM;  break;
X         case SSH_FX_BAD_MESSAGE:
X-        default:                       err = -EPROTO; break;
X+        default:
X+#ifdef EPROTO
X+                err = -EPROTO;
X+#else
X+                err = -EPROTONOSUPPORT;
X+#endif
X+                break;
X         }
X     } else {
X         buf_init(outbuf, req->reply.size - req->reply.len);
X@@ -1039,7 +1068,11 @@
X     err = sftp_request(SSH_FXP_LSTAT, &buf, SSH_FXP_ATTRS, &outbuf);
X     if (!err) {
X         if (buf_get_attrs(&outbuf, stbuf) == -1)
X+#ifdef EPROTO
X             err = -EPROTO;
X+#else
X+            err = -EPROTONOSUPPORT;
X+#endif
X         buf_free(&outbuf);
X     }
X     buf_free(&buf);
X@@ -1061,7 +1094,11 @@
X     if (!err) {
X         uint32_t count;
X         char *link;
X+#ifdef EPROTO
X         err = -EPROTO;
X+#else
X+        err = -EPROTONOSUPPORT;
X+#endif
X         if(buf_get_uint32(&name, &count) != -1 && count == 1 &&
X            buf_get_string(&name, &link) != -1) {
X             strncpy(linkbuf, link, size-1);
X@@ -1092,7 +1129,11 @@
X             err = sftp_request(SSH_FXP_READDIR, &handle, SSH_FXP_NAME, &name);
X             if (!err) {
X                 if (buf_get_entries(&name, h, filler) == -1)
X+#ifdef EPROTO
X                     err = -EPROTO;
X+#else
X+                    err = -EPROTONOSUPPORT;
X+#endif
X                 buf_free(&name);
X             }
X         } while (!err);
X@@ -1377,7 +1418,11 @@
X     err = sftp_request(SSH_FXP_READ, &buf, SSH_FXP_DATA, &data);
X     if (!err) {
X         uint32_t retsize;
X+#ifdef EPROTO
X         err = -EPROTO;
X+#else
X+        err = -EPROTONOSUPPORT;
X+#endif
X         if (buf_get_uint32(&data, &retsize) != -1) {
X             if (retsize > size)
X                 fprintf(stderr, "long read\n");
X@@ -1399,7 +1444,11 @@
X     if (req->error)
X         chunk->res = req->error;
X     else if (req->replied) {
X+#ifdef EPROTO
X         chunk->res = -EPROTO;
X+#else
X+        chunk->res = -EPROTONOSUPPORT;
X+#endif
X 
X         if (req->reply_type == SSH_FXP_STATUS) {
X             uint32_t serr;
END-of-sshfs/files/patch-aa
echo x - sshfs/distinfo
sed 's/^X//' >sshfs/distinfo << 'END-of-sshfs/distinfo'
XMD5 (sshfs-fuse-1.2.tar.gz) = 685dc6611e20242602105fe4960a6ab9
XSIZE (sshfs-fuse-1.2.tar.gz) = 86239
END-of-sshfs/distinfo
echo x - sshfs/pkg-descr
sed 's/^X//' >sshfs/pkg-descr << 'END-of-sshfs/pkg-descr'
XSSHFS allows you to mount a remote directory over a normal ssh connection.
X
XWWW: http://sourceforge.net/projects/fuse/
X
X- Anish Mistry
Xamistry@am-productions.biz
XAM Productions http://am-productions.biz
END-of-sshfs/pkg-descr
echo x - sshfs/Makefile
sed 's/^X//' >sshfs/Makefile << 'END-of-sshfs/Makefile'
X# New ports collection makefile for:    sshfs
X# Date created:         01 October 2005
X# Whom:                 Anish Mistry
X# $FreeBSD$
X#
X
XPORTNAME=	sshfs
XPORTVERSION=	1.2
XCATEGORIES=	sysutils
XMASTER_SITES=	${MASTER_SITE_SOURCEFORGE}
XMASTER_SITE_SUBDIR=	fuse
XDISTNAME=	${PORTNAME}-fuse-${PORTVERSION}
X
XMAINTAINER=	amistry@am-productions.biz
XCOMMENT=	Mount remote directories over ssh
X
XLIB_DEPENDS=	fuse.2:${PORTSDIR}/sysutils/fusefs \
X		glib-2.0.600:${PORTSDIR}/devel/glib20
X
XHAS_CONFIGURE=	yes
X
X.include <bsd.port.pre.mk>
X
X.if ${OSVERSION} < 500000
XBROKEN=		"does not compile"
X.endif
X
X.include <bsd.port.post.mk>
END-of-sshfs/Makefile
echo x - sshfs/pkg-plist
sed 's/^X//' >sshfs/pkg-plist << 'END-of-sshfs/pkg-plist'
Xbin/sshfs
END-of-sshfs/pkg-plist
exit

--- sshfs.shar ends here ---



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1128878911.0>