rpms/autofs/F-7 autofs-5.0.2-dont-fail-on-empty-master.patch, 1.1, 1.2 autofs.spec, 1.215, 1.216

Ian Kent (iankent) fedora-extras-commits at redhat.com
Tue Aug 28 06:42:14 UTC 2007


Author: iankent

Update of /cvs/pkgs/rpms/autofs/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv7809

Modified Files:
	autofs-5.0.2-dont-fail-on-empty-master.patch autofs.spec 
Log Message:
* Tue Aug 28 2007 Ian Kent <ikent at redhat.com> - 5.0.1-26
- fix "nosymlink" option handling and add desription to man page.
- update patch to prevent failure on empty master map.
- if there's no "automount" entry in nsswitch.conf use "files" source.
- add LDAP schema discovery if no schema is configured.


autofs-5.0.2-dont-fail-on-empty-master.patch:

Index: autofs-5.0.2-dont-fail-on-empty-master.patch
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/F-7/autofs-5.0.2-dont-fail-on-empty-master.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- autofs-5.0.2-dont-fail-on-empty-master.patch	21 Aug 2007 04:07:07 -0000	1.1
+++ autofs-5.0.2-dont-fail-on-empty-master.patch	28 Aug 2007 06:42:11 -0000	1.2
@@ -1,13 +1,109 @@
-diff --git a/lib/master.c b/lib/master.c
-index 4d31959..9f24f7e 100644
---- a/lib/master.c
+diff -u b/lib/master.c b/lib/master.c
+--- b/lib/master.c
 +++ b/lib/master.c
-@@ -803,7 +803,7 @@ int master_read_master(struct master *master, time_t age, int readall)
+@@ -802,8 +802,8 @@
+ 
  	if (list_empty(&master->mounts)) {
  		master_mutex_unlock();
- 		error(LOGOPT_ANY, "no mounts in table");
+-		error(LOGOPT_ANY, "no mounts in table");
 -		return 0;
++		warn(LOGOPT_ANY, "no mounts in table");
 +		return 1;
  	}
  
  	master_mutex_unlock();
+--- a/daemon/automount.c
++++ b/daemon/automount.c
+@@ -61,6 +61,8 @@ static size_t kpkt_len;
+ 
+ /* Attribute to create detached thread */
+ pthread_attr_t thread_attr;
++/* Attribute to create normal thread */
++pthread_attr_t thread_attr_nodetach;
+ 
+ struct master_readmap_cond mrc = {
+ 	PTHREAD_MUTEX_INITIALIZER, PTHREAD_COND_INITIALIZER, 0, NULL, 0, 0, 0, 0};
+@@ -914,7 +916,7 @@ static void *do_notify_state(void *arg)
+ 	return NULL;
+ }
+ 
+-static int do_signals(struct master *master, int sig)
++static pthread_t do_signals(struct master *master, int sig)
+ {
+ 	pthread_t thid;
+ 	int r_sig = sig;
+@@ -924,7 +926,7 @@ static int do_signals(struct master *master, int sig)
+ 	if (status)
+ 		fatal(status);
+ 
+-	status = pthread_create(&thid, &thread_attr, do_notify_state, &r_sig);
++	status = pthread_create(&thid, &thread_attr_nodetach, do_notify_state, &r_sig);
+ 	if (status) {
+ 		error(master->default_logging,
+ 		      "mount state notify thread create failed");
+@@ -948,7 +950,7 @@ static int do_signals(struct master *master, int sig)
+ 
+ 	pthread_cleanup_pop(1);
+ 
+-	return 1;
++	return thid;
+ }
+ 
+ static void *do_read_master(void *arg)
+@@ -1038,6 +1040,7 @@ static int do_hup_signal(struct master *master, time_t age)
+ /* Deal with all the signal-driven events in the state machine */
+ static void *statemachine(void *arg)
+ {
++	pthread_t thid = 0;
+ 	sigset_t signalset;
+ 	int sig;
+ 
+@@ -1048,15 +1051,17 @@ static void *statemachine(void *arg)
+ 	while (1) {
+ 		sigwait(&signalset, &sig);
+ 
+-
+-		if (master_list_empty(master_list))
+-			return NULL;
+-
+ 		switch (sig) {
+ 		case SIGTERM:
+ 		case SIGUSR2:
+ 		case SIGUSR1:
+-			do_signals(master_list, sig);
++			thid = do_signals(master_list, sig);
++			if (thid) {
++				pthread_join(thid, NULL);
++				if (master_list_empty(master_list))
++					return NULL;
++				thid = 0;
++			}
+ 			break;
+ 
+ 		case SIGHUP:
+@@ -1171,10 +1176,6 @@ static void handle_mounts_cleanup(void *arg)
+ 
+ 	msg("shut down path %s", path);
+ 
+-	/* If we are the last tell the state machine to shutdown */
+-	if (!submount && master_list_empty(master_list))
+-		kill(getpid(), SIGTERM);
+-
+ 	return;
+ }
+ 
+@@ -1644,6 +1645,14 @@ int main(int argc, char *argv[])
+ 	}
+ #endif
+ 
++	if (pthread_attr_init(&thread_attr_nodetach)) {
++		crit(LOGOPT_ANY,
++		     "%s: failed to init thread attribute struct!",
++		     program);
++		close(start_pipefd[1]);
++		exit(1);
++	}
++
+ 	msg("Starting automounter version %s, master map %s",
+ 		version, master_list->name);
+ 	msg("using kernel protocol version %d.%02d",


Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/F-7/autofs.spec,v
retrieving revision 1.215
retrieving revision 1.216
diff -u -r1.215 -r1.216
--- autofs.spec	21 Aug 2007 04:49:42 -0000	1.215
+++ autofs.spec	28 Aug 2007 06:42:11 -0000	1.216
@@ -4,7 +4,7 @@
 Summary: A tool for automatically mounting and unmounting filesystems
 Name: autofs
 Version: 5.0.1
-Release: 25
+Release: 26
 Epoch: 1
 License: GPL
 Group: System Environment/Daemons
@@ -42,10 +42,13 @@
 Patch30: autofs-5.0.1-allow-ldap-star-wild.patch
 Patch31: autofs-5.0.2-ldap-percent-hack.patch
 Patch32: autofs-5.0.1-consistent-random-selection-option-name.patch
+Patch33: autofs-5.0.2-fix-mount-nfs-nosymlink.patch
+Patch34: autofs-5.0.2-default-nsswitch.patch
+Patch35: autofs-5.0.1-add-ldap-schema-discovery.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
-BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel
+BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs
 Conflicts: kernel < 2.6.17
-Requires: bash mktemp sed gawk textutils sh-utils grep /bin/ps
+Requires: bash mktemp sed gawk textutils sh-utils grep module-init-tools /bin/ps
 Requires(post): /sbin/chkconfig
 Requires(preun): /sbin/service
 Requires(postun): /sbin/service
@@ -115,6 +118,9 @@
 %patch30 -p1
 %patch31 -p1
 %patch32 -p1
+%patch33 -p1
+%patch34 -p1
+%patch35 -p1
 
 %build
 #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -167,6 +173,12 @@
 %{_libdir}/autofs/
 
 %changelog
+* Tue Aug 28 2007 Ian Kent <ikent at redhat.com> - 5.0.1-26
+- fix "nosymlink" option handling and add desription to man page.
+- update patch to prevent failure on empty master map. 
+- if there's no "automount" entry in nsswitch.conf use "files" source.
+- add LDAP schema discovery if no schema is configured.
+
 * Tue Aug 21 2007 Ian Kent <ikent at redhat.com> - 5.0.1-25
 - change random multiple server selection option name to be consistent
   with upstream naming.




More information about the fedora-extras-commits mailing list