aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Abela <chris.abela@maltats.com>2010-05-13 01:00:45 +0200
committerRobby Workman <rworkman@slackbuilds.org>2010-05-13 01:00:45 +0200
commite9baf9a07c6c94a987120475b0538fc7cd3410d6 (patch)
tree22fb80fcc59fbbfbc10d377e9eb503010dc9b88a
parentcfe2a8ee319567c40577aa65538fec3bfe50e51d (diff)
system/davfs2: Added to 13.0 repository
-rw-r--r--system/davfs2/MINI_HOWTO101
-rw-r--r--system/davfs2/README11
-rw-r--r--system/davfs2/davfs2.SlackBuild115
-rw-r--r--system/davfs2/davfs2.info10
-rw-r--r--system/davfs2/doinst.sh16
-rw-r--r--system/davfs2/slack-desc19
6 files changed, 272 insertions, 0 deletions
diff --git a/system/davfs2/MINI_HOWTO b/system/davfs2/MINI_HOWTO
new file mode 100644
index 0000000000000..bb14fc03877ca
--- /dev/null
+++ b/system/davfs2/MINI_HOWTO
@@ -0,0 +1,101 @@
+HOW TO CONNECT WITH A WEBDAV SERVER
+on SLACKWARE LINUX 13.0
+
+In this HOWTO, the user is named "user"
+Amend as required for your choice of username.
+
+1. Login as root
+
+2. Define a davfs2 group and user:
+
+ # groupadd -g 230 davfs2
+ # useradd -u 230 -d /var/cache/davfs2 -g davfs2 davfs2
+
+3. If (and only if) you have a Slack64 install;
+ # export ARCH=x86_64
+
+4. You may want to set the Package type that you will build:
+ # export PKGTYPE=txz
+
+5. Build and install your package:
+ # tar xvf davfs2.tar.gz
+ # cd davfs2
+ # wget http://ftp.cc.uoc.gr/mirrors/nongnu.org/davfs2/davfs2-1.4.5.tar.gz
+ # ./davfs.SlackBuild
+ # installpkg /tmp/davfs2-1.4.5-x86_64-1_SBo.txz
+
+6. Add the user if not already defined. My user shall be called user, so:
+
+ # adduser user
+
+ Read the Slackbook for more details on adduser, choose default settings BUT:
+ with the default group list add also davfs2:
+
+ Press ENTER to continue without adding any additional groups
+ Or press the UP arrow to add/select/edit additional groups
+ : audio cdrom floppy plugdev video power netdev davfs2
+
+7. Edit /etc/fstab with the following line:
+ WEBDAV_SERVER_URL mount_point davfs noauto,user 0 0
+
+ For example:
+ https://example.org/user /home/user/mnt/dav davfs noauto,user 0 0
+
+8. logout
+
+9. Login again as your davfs user ("user" in my case).
+
+10. $ mkdir -p $HOME/.davfs2/certs/private/ $HOME/mnt/dav
+
+11. Move the certificate to $HOME/davfs2/certs/private and restrict the permission to rw-------:
+ For example:
+
+ $ mv CERTIFICATE.pfx $HOME/.davfs2/certs/private/
+ $ chmod 600 $HOME/.davfs2/certs/private/CERIFICATE.pfx
+
+12. Optionally: Switch user to root and copy the system configuration file.
+ Then change ownership to the davfs user and exit back to the davfs user. There
+ are a lot of interesting comments in these files that might be helpful.
+
+ $ su -
+ # cp /etc/davfs2/davfs2.conf ~user/.davfs2/
+ # cp /etc/davfs2/secrets ~user/.davfs2/
+ # chown -R user:users ~user/.davfs2/
+ # exit
+
+13. Edit $HOME/.davfs2/davfs2.conf with the following line:
+
+ clientcert ~/.davfs2/certs/private/CERTIFICATE.pfx
+
+ Read:
+
+ $ man davfs2.conf
+
+ for all the details and options. Tests have shown that you do not need more
+ than the line above, but you may want to set many other interesting
+ parameters.
+
+14. Edit $HOME/.davfs2/secrets with the following 2 lines:
+
+ https://example.org/user username password
+ CERTIFICATE.pfx passphrase
+
+ passphrase is the password for the PFX certificate
+
+15. Restrict permssion for $HOME/.davfs2/secrets to rw-------:
+
+ $ chmod 600 $HOME/.davfs2/secrets
+
+16. Mount the davfs service on $HOME/mnt/dav
+
+ $ mount https://example.org/user
+
+ You should be able to see your WEBDAV server on $HOME/mnt/user
+
+17. When you would like to disconnect:
+
+ $ umount $HOME/mnt/dav
+
+ You should get a similar response (the pid number is random):
+
+ /sbin/umount.davfs: waiting while mount.davfs (pid 5700) synchronizes the cache .. OK
diff --git a/system/davfs2/README b/system/davfs2/README
new file mode 100644
index 0000000000000..d5611f7cdafe5
--- /dev/null
+++ b/system/davfs2/README
@@ -0,0 +1,11 @@
+Web Distributed Authoring and Versioning (WebDAV), an extension to the HTTP-
+protocol, allows authoring of resources on a remote web server. davfs2
+provides the ability to access such resources like a typical filesystem,
+allowing for use by standard applications with no built-in support for WebDAV.
+
+Before running this SlackBuild, define a davfs2 group and a davfs2 user. The
+davfs2 user shall have davfs2 as its initial group, shall not have a shell and
+the home directory shall be /var/cache/davfs. Examples:
+
+# groupadd -g 230 davfs2
+# useradd -u 230 -d /var/cache/davfs2 -g davfs2 davfs2
diff --git a/system/davfs2/davfs2.SlackBuild b/system/davfs2/davfs2.SlackBuild
new file mode 100644
index 0000000000000..f5e3c98c4cd67
--- /dev/null
+++ b/system/davfs2/davfs2.SlackBuild
@@ -0,0 +1,115 @@
+#!/bin/sh
+
+# Slackware build script for davfs2
+
+# Copyright (c) 2008, Justin H Haynes <justin@justinhaynes.com>
+#
+# Permission to use, copy, modify, and/or distribute this software for any
+# purpose with or without fee is hereby granted, provided that the above
+# copyright notice and this permission notice appear in all copies.
+#
+# THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+# WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+# MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+# ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+# WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+
+# Modified by Robby Workman <rworkman@slackbuilds.org>
+
+PRGNAM=davfs2
+VERSION=${VERSION:-1.4.5}
+ARCH=${ARCH:-i486}
+BUILD=${BUILD:-1}
+TAG=${TAG:-_SBo}
+
+DAVFS2_USER=${DAVFS2_USER:-davfs2}
+DAVFS2_GROUP=${DAVFS2_GROUP:-davfs2}
+
+CWD=$(pwd)
+TMP=${TMP:-/tmp/SBo}
+PKG=$TMP/package-$PRGNAM
+OUTPUT=${OUTPUT:-/tmp}
+
+# davfs2 user & group *MUST* exist before package creation
+# See http://slackbuilds.org/uid_gid.txt for current recomendations.
+
+if ! grep ^$DAVFS2_GROUP: /etc/group > /dev/null 2>&1; then
+ echo "$0: Error: DAVFS2 group ($DAVFS2_GROUP) doesn't exist."
+ echo "$0: Try creating one with: \
+ # groupadd -g 230 $DAVFS2_GROUP"
+ exit 1
+fi
+
+if ! grep ^$DAVFS2_USER: /etc/passwd > /dev/null 2>&1; then
+ echo "$0: Error: DAVFS2 user ($DAVFS2_USER) doesn't exist."
+ echo "$0: Try creating one with: \
+ # useradd -u 230 -d /var/cache/davfs2 -g $DAVFS2_GROUP $DAVFS2_USER"
+ exit 1
+fi
+
+if [ "$ARCH" = "i486" ]; then
+ SLKCFLAGS="-O2 -march=i486 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "i686" ]; then
+ SLKCFLAGS="-O2 -march=i686 -mtune=i686"
+ LIBDIRSUFFIX=""
+elif [ "$ARCH" = "x86_64" ]; then
+ SLKCFLAGS="-O2 -fPIC"
+ LIBDIRSUFFIX="64"
+fi
+
+set -e
+
+rm -rf $PKG
+mkdir -p $TMP $PKG $OUTPUT
+cd $TMP
+rm -rf $PRGNAM-$VERSION
+tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
+cd $PRGNAM-$VERSION
+chown -R root:root .
+find . \
+ \( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
+ -exec chmod 755 {} \; -o \
+ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
+ -exec chmod 644 {} \;
+
+dav_user=$DAVFS2_USER \
+dav_group=$DAVFS2_GROUP \
+CFLAGS="$SLKCFLAGS" \
+CXXFLAGS="$SLKCFLAGS" \
+./configure \
+ --prefix=/usr \
+ --libdir=/usr/lib${LIBDIRSUFFIX} \
+ --sysconfdir=/etc \
+ --mandir=/usr/man \
+ --docdir=/usr/doc/$PRGNAM-$VERSION \
+ --build=$ARCH-slackware-linux
+
+make
+make install DESTDIR=$PKG
+
+( cd $PKG
+ find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+ find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | \
+ xargs strip --strip-unneeded 2> /dev/null || true
+)
+
+# Manpages go to the wrong place regardless of configure, so we'll move them:
+mv $PKG/usr/share/man $PKG/usr
+
+# Let's not clobber config files
+mv $PKG/etc/davfs2/davfs2.conf $PKG/etc/davfs2/davfs2.conf.new
+mv $PKG/etc/davfs2/secrets $PKG/etc/davfs2/secrets.new
+
+# --docdir is respected, but we'll add the build script
+cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
+
+mkdir -p $PKG/install
+cat $CWD/slack-desc > $PKG/install/slack-desc
+cat $CWD/doinst.sh > $PKG/install/doinst.sh
+
+cd $PKG
+/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
diff --git a/system/davfs2/davfs2.info b/system/davfs2/davfs2.info
new file mode 100644
index 0000000000000..61a2c1f7f9a96
--- /dev/null
+++ b/system/davfs2/davfs2.info
@@ -0,0 +1,10 @@
+PRGNAM="davfs2"
+VERSION="1.4.5"
+HOMEPAGE="http://savannah.nongnu.org/projects/davfs2"
+DOWNLOAD="http://ftp.cc.uoc.gr/mirrors/nongnu.org/davfs2/davfs2-1.4.5.tar.gz"
+MD5SUM="e209a7e663c20671afea309178eae734"
+DOWNLOAD_x86_64=""
+MD5SUM_x86_64=""
+MAINTAINER="Chris Abela"
+EMAIL="chris.abela@maltats.com"
+APPROVED="rworkman"
diff --git a/system/davfs2/doinst.sh b/system/davfs2/doinst.sh
new file mode 100644
index 0000000000000..73ce3793dea5b
--- /dev/null
+++ b/system/davfs2/doinst.sh
@@ -0,0 +1,16 @@
+config() {
+ NEW="$1"
+ OLD="$(dirname $NEW)/$(basename $NEW .new)"
+ # If there's no config file by that name, mv it over:
+ if [ ! -r $OLD ]; then
+ mv $NEW $OLD
+ elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then
+ # toss the redundant copy
+ rm $NEW
+ fi
+ # Otherwise, we leave the .new copy for the admin to consider...
+}
+
+config etc/davfs2/davfs2.conf.new
+config etc/davfs2/secrets.new
+
diff --git a/system/davfs2/slack-desc b/system/davfs2/slack-desc
new file mode 100644
index 0000000000000..a96710ab6357b
--- /dev/null
+++ b/system/davfs2/slack-desc
@@ -0,0 +1,19 @@
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
+
+ |-----handy-ruler-------------------------------------------------------|
+davfs2: davfs2 (virtual filesystem driver for WebDAV)
+davfs2:
+davfs2: Web Distributed Authoring and Versioning (WebDAV), an extension to the
+davfs2: HTTP-protocol, allows authoring of resources on a remote web server.
+davfs2: davfs2 provides the ability to access such resources like a typical
+davfs2: filesystem, allowing for use by standard applications with no built-in
+davfs2: support for WebDAV.
+davfs2:
+davfs2: Homepage: http://savannah.nongnu.org/projects/davfs2
+davfs2:
+davfs2: