From 3f7a594e5ed077eadf16cad40d023c4835c68501 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 6 May 2011 20:17:18 +0000 Subject: Fri May 6 20:17:18 UTC 2011 --- community-staging/autofs/PKGBUILD | 51 +++++++++++++++++++++++++++++++++ community-staging/autofs/auto.master | 6 ++++ community-staging/autofs/auto.misc | 7 +++++ community-staging/autofs/autofs | 50 ++++++++++++++++++++++++++++++++ community-staging/autofs/autofs.conf.d | 4 +++ community-staging/autofs/autofs.install | 4 +++ community-staging/autofs/heimdal.patch | 44 ++++++++++++++++++++++++++++ 7 files changed, 166 insertions(+) create mode 100644 community-staging/autofs/PKGBUILD create mode 100644 community-staging/autofs/auto.master create mode 100644 community-staging/autofs/auto.misc create mode 100644 community-staging/autofs/autofs create mode 100644 community-staging/autofs/autofs.conf.d create mode 100644 community-staging/autofs/autofs.install create mode 100644 community-staging/autofs/heimdal.patch (limited to 'community-staging/autofs') diff --git a/community-staging/autofs/PKGBUILD b/community-staging/autofs/PKGBUILD new file mode 100644 index 000000000..11ac57ec1 --- /dev/null +++ b/community-staging/autofs/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 46345 2011-05-05 11:57:37Z spupykin $ +# Maintainer: Lukas Fleischer +# Contributor: Andrea Scarpino +# Contributor: Dale Blount +# Contributor: Manolis Tzanidakis + +pkgname=autofs +pkgver=5.0.5 +pkgrel=6 +pkgdesc='A kernel-based automounter for Linux.' +arch=('i686' 'x86_64') +url='http://freshmeat.net/projects/autofs' +license=('GPL2') +depends=('libldap' 'libxml2' 'krb5') +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') +md5sums=('a1d262cb6ebef0c2dd0fe22232fb3d5a' + 'e307bf6d2638e46eeb916cf42fe029b2' + '47f597c870410055e0fdb66103daf928' + 'a6cefb591e77b31b79dbb7243646c96b' + 'd8a15ec9186c5c0b36e5cea1e2739e8a') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + + sed -i "s:SUBDIRS = lib daemon modules man samples:SUBDIRS = lib daemon modules man:" \ + Makefile.rules + + ./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-staging/autofs/auto.master b/community-staging/autofs/auto.master new file mode 100644 index 000000000..be4ea73ae --- /dev/null +++ b/community-staging/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-staging/autofs/auto.misc b/community-staging/autofs/auto.misc new file mode 100644 index 000000000..569156626 --- /dev/null +++ b/community-staging/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-staging/autofs/autofs b/community-staging/autofs/autofs new file mode 100644 index 000000000..08bd3e133 --- /dev/null +++ b/community-staging/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-staging/autofs/autofs.conf.d b/community-staging/autofs/autofs.conf.d new file mode 100644 index 000000000..bc82491e7 --- /dev/null +++ b/community-staging/autofs/autofs.conf.d @@ -0,0 +1,4 @@ +#localoptions='rsize=8192,wsize=8192' + +# e.g. --timeout=60 +daemonoptions='' diff --git a/community-staging/autofs/autofs.install b/community-staging/autofs/autofs.install new file mode 100644 index 000000000..34ae75f1e --- /dev/null +++ b/community-staging/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-staging/autofs/heimdal.patch b/community-staging/autofs/heimdal.patch new file mode 100644 index 000000000..4aa321834 --- /dev/null +++ b/community-staging/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 -- cgit v1.2.3-54-g00ecf