summaryrefslogtreecommitdiff
path: root/community/autofs
diff options
context:
space:
mode:
authorParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
committerParabola <dev@list.parabolagnulinux.org>2011-04-05 14:26:38 +0000
commit415856bdd4f48ab4f2732996f0bae58595092bbe (patch)
treeede2018b591f6dfb477fe9341ba17b9bc000fab9 /community/autofs
Tue Apr 5 14:26:38 UTC 2011
Diffstat (limited to 'community/autofs')
-rw-r--r--community/autofs/PKGBUILD54
-rw-r--r--community/autofs/auto.master6
-rw-r--r--community/autofs/auto.misc7
-rw-r--r--community/autofs/autofs50
-rw-r--r--community/autofs/autofs.conf.d4
-rw-r--r--community/autofs/autofs.install4
-rw-r--r--community/autofs/heimdal.patch44
7 files changed, 169 insertions, 0 deletions
diff --git a/community/autofs/PKGBUILD b/community/autofs/PKGBUILD
new file mode 100644
index 000000000..6f03f7db5
--- /dev/null
+++ b/community/autofs/PKGBUILD
@@ -0,0 +1,54 @@
+# $Id: PKGBUILD 41838 2011-03-09 17:53:24Z lfleischer $
+# Maintainer: Lukas Fleischer <archlinux at cryptocrack dot de>
+# Contributor: Andrea Scarpino <andrea@archlinux.org>
+# Contributor: Dale Blount <dale@archlinux.org>
+# Contributor: Manolis Tzanidakis
+
+pkgname=autofs
+pkgver=5.0.5
+pkgrel=5
+pkgdesc='A kernel-based automounter for Linux.'
+arch=('i686' 'x86_64')
+url='http://freshmeat.net/projects/autofs'
+license=('GPL2')
+depends=('libldap' 'libxml2' 'heimdal')
+backup=('etc/autofs/auto.master'
+ 'etc/autofs/auto.misc'
+ 'etc/conf.d/autofs')
+options=(!makeflags)
+install='autofs.install'
+source=("http://www.kernel.org/pub/linux/daemons/${pkgname}/v5/${pkgname}-${pkgver}.tar.bz2"
+ 'autofs'
+ 'autofs.conf.d'
+ 'auto.master'
+ 'auto.misc'
+ 'heimdal.patch')
+md5sums=('a1d262cb6ebef0c2dd0fe22232fb3d5a'
+ 'e307bf6d2638e46eeb916cf42fe029b2'
+ '47f597c870410055e0fdb66103daf928'
+ 'a6cefb591e77b31b79dbb7243646c96b'
+ 'd8a15ec9186c5c0b36e5cea1e2739e8a'
+ 'efd46b6406b940cb48f7c6197790fb8e')
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ sed -i "s:SUBDIRS = lib daemon modules man samples:SUBDIRS = lib daemon modules man:" \
+ Makefile.rules
+ patch -Np1 -i "${srcdir}/heimdal.patch"
+
+ ./configure --prefix=/usr --sysconfdir=/etc/autofs --with-mapdir=/etc/autofs --without-hesiod \
+ --enable-ignore-busy
+ make
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make INSTALLROOT="${pkgdir}" install
+
+ install -Dm0644 "${srcdir}/auto.master" "${pkgdir}/etc/autofs/auto.master"
+ install -Dm0644 "${srcdir}/auto.misc" "${pkgdir}/etc/autofs/auto.misc"
+ install -Dm0755 "${srcdir}/autofs" "${pkgdir}/etc/rc.d/autofs"
+ install -Dm0644 "${srcdir}/autofs.conf.d" "${pkgdir}/etc/conf.d/autofs"
+}
diff --git a/community/autofs/auto.master b/community/autofs/auto.master
new file mode 100644
index 000000000..be4ea73ae
--- /dev/null
+++ b/community/autofs/auto.master
@@ -0,0 +1,6 @@
+# Sample auto.master file
+# Format of this file:
+# mountpoint map options
+# For details of the format look at autofs(5).
+
+#/media /etc/autofs/auto.media
diff --git a/community/autofs/auto.misc b/community/autofs/auto.misc
new file mode 100644
index 000000000..569156626
--- /dev/null
+++ b/community/autofs/auto.misc
@@ -0,0 +1,7 @@
+# This is an automounter map and it has the following format
+# key [ -mount-options-separated-by-comma ] location
+# Details may be found in the autofs(5) manpage
+
+cdrom -fstype=iso9660,ro,nodev,nosuid :/dev/cdrom
+floppy -fstype=auto,async,nodev,nosuid,umask=000 :/dev/fl
+usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sda1
diff --git a/community/autofs/autofs b/community/autofs/autofs
new file mode 100644
index 000000000..08bd3e133
--- /dev/null
+++ b/community/autofs/autofs
@@ -0,0 +1,50 @@
+#!/bin/bash
+
+daemon_name=autofs
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+# source application-specific settings
+[ -f /etc/conf.d/autofs ] && . /etc/conf.d/autofs
+
+if [ ! -z "$TIMEOUT" ]; then
+ daemonoptions="--timeout=$TIMEOUT $daemonoptions"
+fi
+
+PID=`cat /var/run/autofs-running 2> /dev/null`
+case "$1" in
+ start)
+ stat_busy "Starting $daemon_name daemon"
+ [ -z "$PID" ] && /usr/sbin/automount $daemonoptions &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping $daemon_name daemon"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon $daemon_name
+ stat_done
+ fi
+ ;;
+ restart)
+ stat_busy "Restarting $daemon_name daemon"
+ $0 stop
+ sleep 1
+ $0 start
+ ;;
+ status)
+ stat_busy "Checking $daemon_name status";
+ ck_status $daemon_name
+ ;;
+ *)
+ echo "usage: $0 {start|stop|restart|status}"
+esac
+exit 0
diff --git a/community/autofs/autofs.conf.d b/community/autofs/autofs.conf.d
new file mode 100644
index 000000000..bc82491e7
--- /dev/null
+++ b/community/autofs/autofs.conf.d
@@ -0,0 +1,4 @@
+#localoptions='rsize=8192,wsize=8192'
+
+# e.g. --timeout=60
+daemonoptions=''
diff --git a/community/autofs/autofs.install b/community/autofs/autofs.install
new file mode 100644
index 000000000..34ae75f1e
--- /dev/null
+++ b/community/autofs/autofs.install
@@ -0,0 +1,4 @@
+post_install(){
+ echo "> In autofs5 --ghost option isn't valid. In order to start autofs you"
+ echo "> must remove that option from your /etc/conf.d/autofs."
+}
diff --git a/community/autofs/heimdal.patch b/community/autofs/heimdal.patch
new file mode 100644
index 000000000..4aa321834
--- /dev/null
+++ b/community/autofs/heimdal.patch
@@ -0,0 +1,44 @@
+--- autofs-5.0.5/modules/cyrus-sasl.c~ 2010-03-03 01:38:41.582901786 +0100
++++ autofs-5.0.5/modules/cyrus-sasl.c 2010-03-03 01:41:32.313704755 +0100
+@@ -66,6 +66,15 @@
+ #endif
+ #endif
+
++/**
++ * The type of a principal is different for MIT Krb5 and Heimdal.
++ * These macros are provided by Heimdal, and introduced here for MIT.
++ */
++#ifndef krb5_realm_length
++#define krb5_realm_length(r) ((r).length)
++#define krb5_realm_data(r) ((r).data)
++#endif
++
+ /*
+ * Once a krb5 credentials cache is setup, we need to set the KRB5CCNAME
+ * environment variable so that the library knows where to find it.
+@@ -452,11 +452,11 @@
+
+ /* setup a principal for the ticket granting service */
+ ret = krb5_build_principal_ext(ctxt->krb5ctxt, &tgs_princ,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ strlen(KRB5_TGS_NAME), KRB5_TGS_NAME,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->length,
+- krb5_princ_realm(ctxt->krb5ctxt, krb5_client_princ)->data,
++ krb5_realm_length(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
++ krb5_realm_data(*krb5_principal_get_realm(ctxt->krb5ctxt, krb5_client_princ)),
+ 0);
+ if (ret) {
+ error(logopt,
+--- autofs-5.0.5/modules/Makefile~ 2010-03-03 01:42:18.532868539 +0100
++++ autofs-5.0.5/modules/Makefile 2010-03-03 01:42:35.360367371 +0100
+@@ -43,7 +43,7 @@
+ ifeq ($(SASL), 1)
+ SASL_OBJ = cyrus-sasl.o
+ LDAP_FLAGS += $(SASL_FLAGS) $(XML_FLAGS) -DLDAP_THREAD_SAFE
+- LIBLDAP += $(LIBSASL) $(XML_LIBS)
++ LIBLDAP += $(LIBSASL) $(XML_LIBS) -lkrb5
+ endif
+ endif \ No newline at end of file