aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authoreugen <eugen@FreeBSD.org>2018-03-10 18:14:17 +0800
committereugen <eugen@FreeBSD.org>2018-03-10 18:14:17 +0800
commit2ab40ae1cceccd815221aa3d690878772524129f (patch)
treee8580e8ba6975a38504b2e4fa36473e4c06171ca /sysutils
parent0cff3a43a8cbd39644501565b987a72325f27e7c (diff)
downloadfreebsd-ports-gnome-2ab40ae1cceccd815221aa3d690878772524129f.tar.gz
freebsd-ports-gnome-2ab40ae1cceccd815221aa3d690878772524129f.tar.zst
freebsd-ports-gnome-2ab40ae1cceccd815221aa3d690878772524129f.zip
New port: sysutils/fusefs-webdavfs. It presents FUSE webdav filesystem.
This filesystem behaves like a real network filesystem - no unnecessary copying of entire files. Currently, it claims read-write support for Apache's mod_dav and PHP's SabreDav (used by e.g. NextCloud) only. It forces read-only mode for other DAV servers.
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/fusefs-webdavfs/Makefile51
-rw-r--r--sysutils/fusefs-webdavfs/distinfo7
-rw-r--r--sysutils/fusefs-webdavfs/files/mount_webdavfs.in33
-rw-r--r--sysutils/fusefs-webdavfs/files/pkg-message.in8
-rw-r--r--sysutils/fusefs-webdavfs/pkg-descr8
6 files changed, 108 insertions, 0 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 6ff46a18a808..a9ac9cc08556 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -384,6 +384,7 @@
SUBDIR += fusefs-sshfs
SUBDIR += fusefs-unionfs
SUBDIR += fusefs-wdfs
+ SUBDIR += fusefs-webdavfs
SUBDIR += fusefs-wikipediafs
SUBDIR += fusefs-zip
SUBDIR += fvcool
diff --git a/sysutils/fusefs-webdavfs/Makefile b/sysutils/fusefs-webdavfs/Makefile
new file mode 100644
index 000000000000..b9ba8587cfb0
--- /dev/null
+++ b/sysutils/fusefs-webdavfs/Makefile
@@ -0,0 +1,51 @@
+# Created by: Eugene Grosbein <eugen@FreeBSD.org>
+# $FreeBSD$
+
+PORTNAME= fusefs-webdavfs
+DISTVERSION= g20170810
+CATEGORIES= sysutils
+
+MAINTAINER= eugen@FreeBSD.org
+COMMENT= FUSE filesystem for WEBDAV shares
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKDIR}/fuse-${FUSE_GH_TAGNAME}/LICENSE
+
+USE_GITHUB= yes
+GH_ACCOUNT= miquels
+GH_PROJECT= webdavfs
+GH_TAGNAME= 0eec7b6
+
+GETOPT_GH_ACCOUNT= pborman
+GETOPT_GH_PROJECT= getopt
+GETOPT_GH_TAGNAME= 7148bc3
+GETOPT_WRKSRCDIR= ${GO_WRKSRC}/../src/github.com/${GETOPT_GH_ACCOUNT}/${GETOPT_GH_PROJECT}
+
+FUSE_GH_ACCOUNT= bazil
+FUSE_GH_PROJECT= fuse
+FUSE_GH_TAGNAME= 371fbbd
+FUSE_WRKSRCDIR= ${GO_WRKSRC}/../src/bazil.org
+
+GH_ACCOUNT+= ${GETOPT_GH_ACCOUNT}:getopt ${FUSE_GH_ACCOUNT}:fuse
+GH_PROJECT+= ${GETOPT_GH_PROJECT}:getopt ${FUSE_GH_PROJECT}:fuse
+GH_TAGNAME+= ${GETOPT_GH_TAGNAME}:getopt ${FUSE_GH_TAGNAME}:fuse
+
+PLIST_FILES= sbin/mount.webdavfs sbin/mount_webdavfs
+
+SUB_FILES= pkg-message mount_webdavfs
+
+# This needs to be Go 1.7 or newer.
+USES= go
+
+post-patch:
+ ${GREP} -Flr '"golang.org/x/net/context"' ${WRKDIR} |\
+ ${XARGS} ${REINPLACE_CMD} -i '' 's,golang.org/x/net/context,context,'
+ ${MKDIR} ${GETOPT_WRKSRCDIR} ${FUSE_WRKSRCDIR}
+ ${LN} -s ${WRKDIR}/getopt-${GETOPT_GH_TAGNAME}/v2 ${GETOPT_WRKSRCDIR}
+ ${LN} -s ${WRKDIR}/fuse-${FUSE_GH_TAGNAME} ${FUSE_WRKSRCDIR}/fuse
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/sbin/mount.webdavfs
+ ${INSTALL_SCRIPT} ${WRKDIR}/mount_webdavfs ${STAGEDIR}${PREFIX}/sbin
+
+.include <bsd.port.mk>
diff --git a/sysutils/fusefs-webdavfs/distinfo b/sysutils/fusefs-webdavfs/distinfo
new file mode 100644
index 000000000000..59f7acda5193
--- /dev/null
+++ b/sysutils/fusefs-webdavfs/distinfo
@@ -0,0 +1,7 @@
+TIMESTAMP = 1520664992
+SHA256 (miquels-webdavfs-g20170810-0eec7b6_GH0.tar.gz) = c1bf96f05f4f97fea9a192b3dca43fe67e6989ac2ee024f6ed08e84d037bde04
+SIZE (miquels-webdavfs-g20170810-0eec7b6_GH0.tar.gz) = 19275
+SHA256 (pborman-getopt-7148bc3_GH0.tar.gz) = 5828aab17ad7c149535cb87b5db6ca2b0bb1a9209e051bef00a3ac73809a4528
+SIZE (pborman-getopt-7148bc3_GH0.tar.gz) = 37914
+SHA256 (bazil-fuse-371fbbd_GH0.tar.gz) = 799b6ef7f8458941ea4cfdc210764f3b3e7e90cdd19d7709889397f5fdc04864
+SIZE (bazil-fuse-371fbbd_GH0.tar.gz) = 187723
diff --git a/sysutils/fusefs-webdavfs/files/mount_webdavfs.in b/sysutils/fusefs-webdavfs/files/mount_webdavfs.in
new file mode 100644
index 000000000000..a8600c2c88ef
--- /dev/null
+++ b/sysutils/fusefs-webdavfs/files/mount_webdavfs.in
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+mountprog=%%PREFIX%%/sbin/mount.webdavfs
+
+while getopts "fo:DF:T:" opt
+do
+ case "$opt" in
+ o) case "$OPTARG" in
+ username=*) username=${OPTARG#username=} ;;
+ password=*) password=${OPTARG#password=} ;;
+ rw) ;;
+ *) options="$options,$OPTARG" ;;
+ esac ;;
+ T) traceopts="$traceopts,$OPTARG" ;;
+ *) flags="$flags -$opt $OPTARG" ;;
+ esac
+done
+shift $((OPTIND - 1))
+
+[ -n "$username" ] && options="$options,username=$username"
+[ -n "$password" ] && options="$options,password=$password"
+options=${options#,}
+
+traceopts=${traceopts#,}
+[ -n "$traceopts" ] && flags="$flags -T $traceopts"
+
+if [ -z "$options" ]; then
+ exec $mountprog $flags "$@"
+else
+ exec $mountprog $flags -o "$options" "$@"
+fi
+
+
diff --git a/sysutils/fusefs-webdavfs/files/pkg-message.in b/sysutils/fusefs-webdavfs/files/pkg-message.in
new file mode 100644
index 000000000000..9ac1287a1145
--- /dev/null
+++ b/sysutils/fusefs-webdavfs/files/pkg-message.in
@@ -0,0 +1,8 @@
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+Make sure you have fuse.ko loaded then use mount.webdavfs command
+or add an entry to the /etc/fstab such as:
+
+https://webdav.server.net/path /mnt/path fusefs rw,late,mountprog=%%PREFIX%%/sbin/mount_webdavfs,username=login,password=pass,-F=/var/tmp/trace.log,-T=webdav,-T=httpreq,-T=httphdr 0 0
+
+!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
diff --git a/sysutils/fusefs-webdavfs/pkg-descr b/sysutils/fusefs-webdavfs/pkg-descr
new file mode 100644
index 000000000000..2d5413800898
--- /dev/null
+++ b/sysutils/fusefs-webdavfs/pkg-descr
@@ -0,0 +1,8 @@
+FUSE webdav filesystem.
+
+This filesystem behaves like a real network filesystem - no unnecessary
+copying of entire files. Currently, it claims read-write support for
+Apache's mod_dav and PHP's SabreDav (used by e.g. NextCloud) only.
+It forces read-only mode for other DAV servers.
+
+WWW: https://github.com/miquels/webdavfs