rpms/autodir/devel autodir-0.96.0-cflags.patch, NONE, 1.1 autodir-0.99.8-auto_fs4.patch, NONE, 1.1 autodir.spec, NONE, 1.1 autogroup.init, NONE, 1.1 autogroup.sysconfig, NONE, 1.1 autohome.init, NONE, 1.1 autohome.sysconfig, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Matthias Saou (thias) fedora-extras-commits at redhat.com
Sun May 13 17:47:40 UTC 2007


Author: thias

Update of /cvs/extras/rpms/autodir/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv14896

Modified Files:
	.cvsignore sources 
Added Files:
	autodir-0.96.0-cflags.patch autodir-0.99.8-auto_fs4.patch 
	autodir.spec autogroup.init autogroup.sysconfig autohome.init 
	autohome.sysconfig 
Log Message:
Initial import of autodir.


autodir-0.96.0-cflags.patch:

--- NEW FILE autodir-0.96.0-cflags.patch ---
diff -Naupr autodir-0.96.0.orig/configure autodir-0.96.0/configure
--- autodir-0.96.0.orig/configure	2005-08-24 06:31:51.000000000 +0200
+++ autodir-0.96.0/configure	2005-08-24 14:36:04.000000000 +0200
@@ -19138,15 +19138,6 @@ LIBTOOL='$(SHELL) $(top_builddir)/libtoo
 
 
 
-if test "$GCC" = yes
-then
-
-	CFLAGS="-O2 -Wall -Wwrite-strings \
-		-Wpointer-arith -Wcast-qual -Wcast-align \
-		-Wstrict-prototypes -Wmissing-prototypes \
-		-Wnested-externs -Winline -Wshadow"
-fi
-
 # Checks for libraries.
 
 LIBS_SAVE=$LIBS
diff -Naupr autodir-0.96.0.orig/configure.in autodir-0.96.0/configure.in
--- autodir-0.96.0.orig/configure.in	2005-08-24 06:30:56.000000000 +0200
+++ autodir-0.96.0/configure.in	2005-08-24 14:34:23.000000000 +0200
@@ -21,15 +21,6 @@ AC_PROG_CC
 AC_LIBTOOL_DLOPEN
 AC_PROG_LIBTOOL
 
-if test "$GCC" = yes
-then
-
-	CFLAGS="-O2 -Wall -Wwrite-strings \
-		-Wpointer-arith -Wcast-qual -Wcast-align \
-		-Wstrict-prototypes -Wmissing-prototypes \
-		-Wnested-externs -Winline -Wshadow"
-fi
-
 # Checks for libraries.
 
 LIBS_SAVE=$LIBS

autodir-0.99.8-auto_fs4.patch:

--- NEW FILE autodir-0.99.8-auto_fs4.patch ---
diff -Naupr autodir-0.99.8.orig/src/autodir.c autodir-0.99.8/src/autodir.c
--- autodir-0.99.8.orig/src/autodir.c	2006-11-24 05:03:22.000000000 +0100
+++ autodir-0.99.8/src/autodir.c	2007-03-19 13:53:04.000000000 +0100
@@ -43,7 +43,7 @@ I acknowledge autofs people for any
 #include <sys/stat.h>
 #include <sys/poll.h>
 #include <linux/types.h>
-#include <linux/auto_fs4.h>
+#include "auto_fs4.h"
 
 #include "miscfuncs.h"
 #include "msg.h"
diff -Naupr autodir-0.99.8.orig/src/auto_fs4.h autodir-0.99.8/src/auto_fs4.h
--- autodir-0.99.8.orig/src/auto_fs4.h	1970-01-01 01:00:00.000000000 +0100
+++ autodir-0.99.8/src/auto_fs4.h	2007-03-19 13:53:04.000000000 +0100
@@ -0,0 +1,45 @@
+/* -*- c-mode -*-
+ * linux/include/linux/auto_fs4.h
+ *
+ * Copyright 1999-2000 Jeremy Fitzhardinge <jeremy at goop.org>
+ *
+ * This file is part of the Linux kernel and is made available under
+ * the terms of the GNU General Public License, version 2, or at your
+ * option, any later version, incorporated herein by reference.
+ */
+
+#ifndef _LINUX_AUTO_FS4_H
+#define _LINUX_AUTO_FS4_H
+
+/* Include common v3 definitions */
+#include <linux/auto_fs.h>
+
+/* autofs v4 definitions */
+#undef AUTOFS_PROTO_VERSION
+#define AUTOFS_PROTO_VERSION 4
+
+#undef AUTOFS_MAX_PROTO_VERSION
+#define AUTOFS_MAX_PROTO_VERSION	AUTOFS_PROTO_VERSION
+
+/* New message type */
+#define autofs_ptype_expire_multi	2	/* Expire entry (umount request) */
+
+/* v4 multi expire (via pipe) */
+struct autofs_packet_expire_multi {
+	struct autofs_packet_hdr hdr;
+        autofs_wqt_t wait_queue_token;
+	int len;
+	char name[NAME_MAX+1];
+};
+
+union autofs_packet_union {
+	struct autofs_packet_hdr hdr;
+	struct autofs_packet_missing missing;
+	struct autofs_packet_expire expire;
+	struct autofs_packet_expire_multi expire_multi;
+};
+
+#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int)
+
+
+#endif /* _LINUX_AUTO_FS4_H */
diff -Naupr autodir-0.99.8.orig/src/expire.c autodir-0.99.8/src/expire.c
--- autodir-0.99.8.orig/src/expire.c	2006-11-12 03:22:14.000000000 +0100
+++ autodir-0.99.8/src/expire.c	2007-03-19 13:53:04.000000000 +0100
@@ -27,7 +27,7 @@ Foundation, Inc., 675 Mass Ave, Cambridg
 #include <unistd.h>
 #include <sys/ioctl.h>
 #include <linux/types.h>
-#include <linux/auto_fs4.h>
+#include "auto_fs4.h"
 
 #include "msg.h"
 #include "thread.h"


--- NEW FILE autodir.spec ---
Summary: Creates user directories on demand
Name: autodir
Version: 0.99.9
Release: 2%{?dist}
License: GPL
Group: System Environment/Daemons
URL: http://www.intraperson.com/autodir/
Source0: http://downloads.sf.net/intraperson/autodir-%{version}.tar.gz
Source1: autogroup.init
Source2: autohome.init
Source3: autogroup.sysconfig
Source4: autohome.sysconfig
Patch0: autodir-0.96.0-cflags.patch
Patch1: autodir-0.99.8-auto_fs4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/service, /sbin/chkconfig
Requires(postun): /sbin/service
BuildRequires: libcap-devel, libtool, libtool-ltdl-devel

%description
Autodir offers a simple and effective means to create directories like home
directories in a transparent manner. It relies on the autofs protocol for its
operation.


%prep
%setup -q
%patch0 -p1 -b .cflags
%patch1 -p1 -b .auto_fs4


%build
%configure
%{__make} %{?_smp_mflags}


%install
%{__rm} -rf %{buildroot}
%{__make} install DESTDIR=%{buildroot}

%{__install} -D -m 0755 %{SOURCE1} \
    %{buildroot}%{_sysconfdir}/rc.d/init.d/autogroup
%{__install} -D -m 0755 %{SOURCE2} \
    %{buildroot}%{_sysconfdir}/rc.d/init.d/autohome

%{__install} -D -m 0644 %{SOURCE3} \
    %{buildroot}%{_sysconfdir}/sysconfig/autogroup
%{__install} -D -m 0644 %{SOURCE4} \
    %{buildroot}%{_sysconfdir}/sysconfig/autohome
# Fix for lib64
%{__perl} -pi -e 's|/usr/lib/autodir|%{_libdir}/autodir|g' \
    %{buildroot}%{_sysconfdir}/sysconfig/*


%clean
%{__rm} -rf %{buildroot}


%post
if [ $1 -eq 1 ]; then
    /sbin/chkconfig --add autogroup
    /sbin/chkconfig --add autohome
fi

%preun
if [ $1 -eq 0 ]; then
    /sbin/service autogroup stop &>/dev/null || :
    /sbin/service autohome stop &>/dev/null || :
    /sbin/chkconfig --del autogroup
    /sbin/chkconfig --del autohome
fi

%postun
if [ $1 -ge 1 ]; then
    /sbin/service autogroup condrestart &>/dev/null || :
    /sbin/service autohome condrestart &>/dev/null || :
fi


%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING NEWS README
%config(noreplace) %{_sysconfdir}/sysconfig/autogroup
%config(noreplace) %{_sysconfdir}/sysconfig/autohome
%{_sysconfdir}/rc.d/init.d/autogroup
%{_sysconfdir}/rc.d/init.d/autohome
%{_sbindir}/autodir
%{_libdir}/autodir/
%exclude %{_libdir}/autodir/*.a
%exclude %{_libdir}/autodir/*.la


%changelog
* Mon May  7 2007 Matthias Saou <http://freshrpms.net/> 0.99.9-2
- Add missing scriplets requirements.
- Update sf.net source URL.
- Switch away from %%makeinstall.

* Wed Apr 18 2007 Matthias Saou <http://freshrpms.net/> 0.99.9-1
- Update to 0.99.9.

* Mon Mar 19 2007 Matthias Saou <http://freshrpms.net/> 0.99.8-2
- Minor spec file and init scripts cleanups.
- Add missing default options to the sysconfig files to silence services.
- Include patch from Debian to get "old" autofs headers and actually work.

* Thu Feb  1 2007 Matthias Saou <http://freshrpms.net/> 0.99.8-1
- Update to 0.99.8.

* Tue Mar 21 2006 Matthias Saou <http://freshrpms.net/> 0.99.3-1
- Update to 0.99.3.

* Mon Feb  6 2006 Matthias Saou <http://freshrpms.net/> 0.99.1-1
- Update to 0.99.1.

* Fri Dec 16 2005 Matthias Saou <http://freshrpms.net/> 0.99.0-1
- Update to 0.99.0.

* Wed Nov  2 2005 Matthias Saou <http://freshrpms.net/> 0.96.2-1
- Update to 0.96.2.

* Fri Oct 28 2005 Matthias Saou <http://freshrpms.net/> 0.96.1-1
- Update to 0.96.1.
- Add newly required libtool-ltdl-devel build dependency.

* Wed Aug 24 2005 Matthias Saou <http://freshrpms.net/> 0.96.0-1
- Initial RPM release.



--- NEW FILE autogroup.init ---
#!/bin/sh
# chkconfig: - 29 71
# description: Creates user group directories on demand


# Source function library.
. /etc/init.d/functions

# Source configuration
. /etc/sysconfig/autogroup

prog=autogroup
RETVAL=0

start() {

	# If autofs old module is loaded unload it now
	grep -q -w autofs /proc/modules || \
		/sbin/rmmod autofs &>/dev/null

	# If module is not loaded load it now
	grep -q autofs4 /proc/modules || \
		/sbin/modprobe -k autofs4 &>/dev/null

	# See if autofs module actually loaded
	if ! grep -q -w autofs4 /proc/modules
	then
		exit 1
	fi

	echo -n $"Starting $prog: "

	daemon /usr/sbin/autodir -d $AUTOGROUP_HOME -m $AUTOGROUP_MODULE \
		${AUTOGROUP_OPTIONS+"-o $AUTOGROUP_OPTIONS"} \
		${AUTOGROUP_TIMEOUT+"-t $AUTOGROUP_TIMEOUT"} \
		${AUTOGROUP_BACKUP+"-b $AUTOGROUP_BACKUP"} \
		${AUTOGROUP_BACKWAIT+"-w $AUTOGROUP_BACKWAIT"} \
		${AUTOGROUP_BACKPRI+"-p $AUTOGROUP_BACKPRI"} \
		${AUTOGROUP_MAXBACK+"-c $AUTOGROUP_MAXBACK"} \
		-l /var/run/$prog.pid

	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
	echo
}

stop() {
	echo -n $"Stopping $prog: "
	killproc $prog
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
	echo
}

restart() {
	stop
	start
}

dostatus() {
	pid=`pidfileofproc $prog`

	if [ -n "$pid" -a -d "/proc/$pid" ]
	then
		echo "$prog (pid $pid) running..."
		RETVAL=0
	else
		echo "$prog stopped"
		RETVAL=1
	fi
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	restart
	;;
  condrestart)
	[ -f /var/lock/subsys/$prog ] && restart
	;;
  status)
	dostatus
	;;
  *)
	echo $"Usage: $prog {start|stop|restart|reload|condrestart|status}"
	exit 1
esac

exit $RETVAL



--- NEW FILE autogroup.sysconfig ---
# Where group directories are supposed to be?
# Visible to applications
AUTOGROUP_HOME=/group

# How long to wait in seconds
# before it is assumed home directory
# is inactive and unmounted.
AUTOGROUP_TIMEOUT=300

# Authome module path
AUTOGROUP_MODULE="/usr/lib/autodir/autogroup.so"

# realpath => path where real group directories should reside.
# level    => Default value is ok for almost all sites. See Autodir-HOWTO.
# nosetgid => Default is to setgid the group directory created.
# nopriv   => Default is to create group directory for every kind of group. 
#	      If your site has user private groups and you dont want 
#	      group directories created for these, use this option.
# mode     => Default mode for newly created group directories
AUTOGROUP_OPTIONS="realpath=/autogroup,level=2,nopriv=false,mode=02070"

# If you desire backup feature and you know what this feature is, then uncomment it!
# Full path to program as well as arguments.
# %x characters are replaced with appropriate values.
# Following is just example. Do not use it as is!
# See Autodir-HOWTO for further info.

#AUTOGROUP_BACKUP="'/bin/tar cf /tmp/%N.tar.gz %L'"

# How long to wait after a home directory is unmounted 
# to start backup. Value expected in seconds and can not exceed one day.

#AUTOGROUP_BACKWAIT=600

# Backup priority. 1 to 40 inclusive. Smaller value means higher priority.

#AUTOGROUP_BACKPRI=30

# Max backup program execusions not to exceed at any givne time.

#AUTOGROUP_MAXBACK=150


--- NEW FILE autohome.init ---
#!/bin/sh
# chkconfig: - 28 72
# description: Creates user home directories on demand


# Source function library.
. /etc/init.d/functions

# Source configuration
. /etc/sysconfig/autohome

prog=autohome
RETVAL=0

start() {

	# If autofs old module is loaded unload it now
	grep -q -w autofs /proc/modules || \
		/sbin/rmmod autofs &>/dev/null

	# If module is not loaded load it now
	grep -q autofs4 /proc/modules || \
		/sbin/modprobe -k autofs4 &>/dev/null

	# See if autofs module actually loaded
	if ! grep -q -w autofs4 /proc/modules
	then
		exit 1
	fi

	echo -n $"Starting $prog: "

	daemon /usr/sbin/autodir -d $AUTOHOME_HOME -m $AUTOHOME_MODULE \
		${AUTOHOME_OPTIONS+"-o $AUTOHOME_OPTIONS"} \
		${AUTOHOME_TIMEOUT+"-t $AUTOHOME_TIMEOUT"} \
		${AUTOHOME_BACKUP+"-b $AUTOHOME_BACKUP"} \
		${AUTOHOME_BACKWAIT+"-w $AUTOHOME_BACKWAIT"} \
		${AUTOHOME_BACKPRI+"-p $AUTOHOME_BACKPRI"} \
		${AUTOHOME_MAXBACK+"-c $AUTOHOME_MAXBACK"} \
		-l /var/run/$prog.pid

	RETVAL=$?
	[ $RETVAL -eq 0 ] && touch /var/lock/subsys/$prog
	echo
}

stop() {
	echo -n $"Stopping $prog: "
	killproc $prog
	RETVAL=$?
	[ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/$prog
	echo
}

restart() {
	stop
	start
}

dostatus() {
	pid=`pidfileofproc $prog`

	if [ -n "$pid" -a -d "/proc/$pid" ]
	then
		echo "$prog (pid $pid) running..."
		RETVAL=0
	else
		echo "$prog stopped"
		RETVAL=1
	fi
}

# See how we were called.
case "$1" in
  start)
	start
	;;
  stop)
	stop
	;;
  restart|reload)
	restart
	;;
  condrestart)
	[ -f /var/lock/subsys/$prog ] && restart
	;;
  status)
	dostatus
	;;
  *)
	echo $"Usage: $prog {start|stop|restart|reload|condrestart|status}"
	exit 1
esac

exit $RETVAL



--- NEW FILE autohome.sysconfig ---
# Where home directories are supposed to be?
# Usually it is /home on most systems.
AUTOHOME_HOME=/home

# How long to wait in seconds
# before it is assumed home directory
# is inactive and unmounted.
#
# Servers like IMAP/POP access home directories every 10min 
# in most configurations -- client side default mail check duraion.
# Therefore it is beter to make it 11min in this situation.
#
# If your site has different requirements, change according to that.
AUTOHOME_TIMEOUT=660

# Authome module path
AUTOHOME_MODULE="/usr/lib/autodir/autohome.so"

# realpath => path where real home directories should reside
# level    => Default value is ok for almost all sites. See Autodir-HOWTO
# skel     => Location of skel files. absolute path is expected
# noskel   => Don not copy skel files to home directories
# mode     => Default mode for newly created home directories
AUTOHOME_OPTIONS="realpath=/autohome,level=2,skel=/etc/skel,mode=0700"

# If you desire backup feature and you know what this feature is, then uncomment it!
# Full path to program as well as arguments.
# %x characters are replaced with appropriate values.
# Following is just example. Do not use it as is!
# See Autodir-HOWTO for further info.

#AUTOHOME_BACKUP="'/bin/tar cf /tmp/%N.tar.gz %L'"

# How long to wait after a home directory is unmounted 
# to start backup. Value expected in seconds and can not exceed one day.

#AUTOHOME_BACKWAIT=600

# Backup priority. 1 to 40 inclusive. Smaller value means higher priority.

#AUTOHOME_BACKPRI=30

# Max backup program execusions not to exceed at any givne time.

#AUTOHOME_MAXBACK=150


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/autodir/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	11 May 2007 20:53:19 -0000	1.1
+++ .cvsignore	13 May 2007 17:47:06 -0000	1.2
@@ -0,0 +1 @@
+autodir-0.99.9.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/autodir/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	11 May 2007 20:53:19 -0000	1.1
+++ sources	13 May 2007 17:47:06 -0000	1.2
@@ -0,0 +1 @@
+8cc947aa7507b65bb6b8e3ee95707e29  autodir-0.99.9.tar.gz




More information about the fedora-extras-commits mailing list