From 415856bdd4f48ab4f2732996f0bae58595092bbe Mon Sep 17 00:00:00 2001 From: Parabola Date: Tue, 5 Apr 2011 14:26:38 +0000 Subject: Tue Apr 5 14:26:38 UTC 2011 --- extra/fuse/PKGBUILD | 55 +++++++++++++++++++++++++++++++++++++++++++++++++ extra/fuse/fuse.conf | 9 ++++++++ extra/fuse/fuse.install | 14 +++++++++++++ extra/fuse/fuse.rc.d | 49 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 127 insertions(+) create mode 100644 extra/fuse/PKGBUILD create mode 100644 extra/fuse/fuse.conf create mode 100644 extra/fuse/fuse.install create mode 100755 extra/fuse/fuse.rc.d (limited to 'extra/fuse') diff --git a/extra/fuse/PKGBUILD b/extra/fuse/PKGBUILD new file mode 100644 index 000000000..f3863969e --- /dev/null +++ b/extra/fuse/PKGBUILD @@ -0,0 +1,55 @@ +# $Id: PKGBUILD 94450 2010-10-07 10:30:45Z ronald $ +# Maintainer: Ronald van Haren +# Contributor: Mark Rosenstand + +pkgname=fuse +pkgver=2.8.5 +pkgrel=1 +pkgdesc="A library that makes it possible to implement a filesystem in a userspace program." +arch=('i686' 'x86_64') +url="http://fuse.sourceforge.net/" +license="GPL2" +depends=('glibc') +makedepends=('pkg-config') +backup=(etc/fuse.conf) +install=fuse.install +source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz + 'fuse.conf') +options=(!libtool) +sha1sums=('862320b56d6bc4ad5e7be2b1e0b5029166aae09b' + '3b42e37a741d4651099225987dc40e7f02a716ad') + +build() { + cd ${srcdir}/${pkgname}-${pkgver} + ./configure --prefix=/usr --enable-lib \ + --enable-util --bindir=/bin + make || return 1 +} + +package() { + cd ${srcdir}/${pkgname}-${pkgver} + + make DESTDIR=${pkgdir} install || return 1 + + # static device nodes will cause collision. + rm -rf ${pkgdir}/dev + + # Remove init script in wrong path + # Don't add our own for now, as fusectl fs oopses on 2.6.18 + rm -rf ${pkgdir}/etc/init.d + #install -D -m755 ${srcdir}/fuse.rc.d ${pkgdir}/etc/rc.d/fuse + + install -d ${pkgdir}/lib + mv ${pkgdir}/usr/lib/libfuse.so.${pkgver} ${pkgdir}/lib/ || return 1 + ln -s ../../lib/libfuse.so.${pkgver} ${pkgdir}/usr/lib/libfuse.so.${pkgver} || return 1 + ln -s libfuse.so.${pkgver} ${pkgdir}/lib/libfuse.so.2 || return 1 + mv ${pkgdir}/usr/lib/libulockmgr.so.1.0.1 ${pkgdir}/lib/ || return 1 + ln -s ../../lib/libulockmgr.so.1.0.1 ${pkgdir}/usr/lib/libulockmgr.so.1.0.1 || return 1 + ln -s libulockmgr.so.1.0.1 ${pkgdir}/lib/libulockmgr.so.1 || return 1 + + # install sample config file + install -Dm644 ${srcdir}/fuse.conf ${pkgdir}/etc/fuse.conf || return 1 + # Fix udev rule location + install -d -m755 "${pkgdir}/lib" + mv "${pkgdir}/etc/udev" "${pkgdir}/lib/" +} diff --git a/extra/fuse/fuse.conf b/extra/fuse/fuse.conf new file mode 100644 index 000000000..cb6c631e0 --- /dev/null +++ b/extra/fuse/fuse.conf @@ -0,0 +1,9 @@ +# Set the maximum number of FUSE mounts allowed to non-root users. +# The default is 1000. +# +#mount_max = 1000 + +# Allow non-root users to specify the 'allow_other' or 'allow_root' +# mount options. +# +#user_allow_other diff --git a/extra/fuse/fuse.install b/extra/fuse/fuse.install new file mode 100644 index 000000000..595ac7c12 --- /dev/null +++ b/extra/fuse/fuse.install @@ -0,0 +1,14 @@ +post_install() { + cat << 'EOM' +==> You must load the fuse kernel module to use FUSE. + -> Run 'modprobe fuse' to load the module now. + -> Add fuse to $MODULES in /etc/rc.conf to load on every boot. +==> You will need a /dev/fuse device node to use FUSE. + -> If you use udev, nothing needs to be done + -> For a static /dev, run: mknod /dev/fuse -m 0666 c 10 229 +EOM +} + +op=$1 +shift +$op $* diff --git a/extra/fuse/fuse.rc.d b/extra/fuse/fuse.rc.d new file mode 100755 index 000000000..768da5b02 --- /dev/null +++ b/extra/fuse/fuse.rc.d @@ -0,0 +1,49 @@ +#!/bin/bash +# +# fuse Init script for Filesystem in Userspace +# Based on the script by Miklos Szeredi + +. /etc/rc.conf +. /etc/rc.d/functions +FUSECTL=/sys/fs/fuse/connections + +case "$1" in + start) + stat_busy "Starting fuse" + if ! grep -qw fuse /proc/filesystems; then + modprobe fuse >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + exit 1 + fi + fi + if grep -qw fusectl /proc/filesystems && ! grep -qw $FUSECTL /proc/mounts; then + mount -t fusectl none $FUSECTL >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + exit 1 + fi + fi + add_daemon fuse + stat_done + ;; + stop) + stat_busy "Stopping fuse" + umount $FUSECTL >/dev/null 2>&1 + rmmod fuse >/dev/null 2>&1 + if [ $? -gt 0 ]; then + stat_fail + else + rm_daemon fuse + stat_done + fi + ;; + restart) + $0 stop + sleep 1 + $0 start + ;; + *) + echo "usage: $0 {start|stop|restart}" +esac +exit 0 -- cgit v1.2.3-54-g00ecf