rpms/lftp/FC-4 lftp-3.2.1-bz173276.patch, 1.1, 1.2 lftp.spec, 1.25, 1.26

fedora-cvs-commits at redhat.com fedora-cvs-commits at redhat.com
Wed Dec 21 20:37:52 UTC 2005


Author: jvdias

Update of /cvs/dist/rpms/lftp/FC-4
In directory cvs.devel.redhat.com:/tmp/cvs-serv30726

Modified Files:
	lftp-3.2.1-bz173276.patch lftp.spec 
Log Message:
improved after upstream feedback lftp-3.2.1-bz173276.patch

lftp-3.2.1-bz173276.patch:
 doc/lftp.1      |   14 +++++++++++
 src/Resolver.cc |   69 +++++++++++++++++++++++++++++++++++++++++++++++---------
 src/resource.cc |    6 +++-
 3 files changed, 77 insertions(+), 12 deletions(-)

Index: lftp-3.2.1-bz173276.patch
===================================================================
RCS file: /cvs/dist/rpms/lftp/FC-4/lftp-3.2.1-bz173276.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- lftp-3.2.1-bz173276.patch	17 Dec 2005 01:57:07 -0000	1.1
+++ lftp-3.2.1-bz173276.patch	21 Dec 2005 20:37:48 -0000	1.2
@@ -1,32 +1,52 @@
---- lftp-3.2.1/src/resource.cc.bz173276	2005-05-18 01:57:10.000000000 -0400
-+++ lftp-3.2.1/src/resource.cc	2005-12-16 20:42:44.000000000 -0500
-@@ -338,7 +338,10 @@
-    res_timeout	   ("dns:fatal-timeout","0",   ResMgr::UNumberValidate,0),
+--- lftp-3.3.5/src/resource.cc.bz173276	2005-11-08 02:21:19.000000000 -0500
++++ lftp-3.3.5/src/resource.cc	2005-12-21 13:44:59.000000000 -0500
+@@ -338,10 +338,12 @@
+    res_cache_enable("dns:cache-enable", "yes", ResMgr::BoolValidate,0),
+    res_cache_expire("dns:cache-expire", "1h",  ResMgr::TimeIntervalValidate,0),
+    res_cache_size  ("dns:cache-size",   "256", ResMgr::UNumberValidate,ResMgr::NoClosure),
+-   res_timeout	   ("dns:fatal-timeout","0",   ResMgr::UNumberValidate,0),
++   res_timeout	   ("dns:fatal-timeout","0",   ResMgr::TimeIntervalValidate,0),
     res_order	   ("dns:order",	DEFAULT_ORDER, OrderValidate,0),
     res_query_srv   ("dns:SRV-query",    "no",  ResMgr::BoolValidate,0),
 -   res_use_fork	   ("dns:use-fork",     "yes", ResMgr::BoolValidate,ResMgr::NoClosure);
 +   res_use_fork	   ("dns:use-fork",     "yes", ResMgr::BoolValidate,ResMgr::NoClosure),
 +   res_use_first   ("dns:use-first-address", "yes", ResMgr::BoolValidate,ResMgr::NoClosure),
-+   res_try_again   ("dns:try-again",    "yes", ResMgr::BoolValidate,ResMgr::NoClosure),
-+   res_n_attempts  ("dns:n-attempts",   "0",   ResMgr::UNumberValidate,ResMgr::NoClosure);
++   res_n_attempts  ("dns:max-retries",   "1000",   ResMgr::UNumberValidate,0);
  
  static ResDecl
     fish_shell  ("fish:shell", "/bin/sh",  0,0),
---- lftp-3.2.1/src/Resolver.cc.bz173276	2005-01-21 05:33:16.000000000 -0500
-+++ lftp-3.2.1/src/Resolver.cc	2005-12-16 20:42:44.000000000 -0500
-@@ -682,6 +682,11 @@
+--- lftp-3.3.5/src/Resolver.cc.bz173276	2005-11-08 01:17:11.000000000 -0500
++++ lftp-3.3.5/src/Resolver.cc	2005-12-21 13:54:41.000000000 -0500
+@@ -505,6 +505,8 @@
+    time_t try_time;
+    unsigned char answer[0x1000];
+    char *srv_name=string_alloca(strlen(service)+1+strlen(tproto)+1+strlen(hostname)+1);
++   int retries=0;
++   int max_retries=ResMgr::Query("dns:max-retries",hostname);
+    sprintf(srv_name,"_%s._%s.%s",service,tproto,hostname);
+ 
+    int len;
+@@ -523,6 +525,8 @@
+ #ifdef HAVE_H_ERRNO
+       if(h_errno!=TRY_AGAIN)
+ 	 return;
++      if(++retries>=max_retries && max_retries)
++	 return;
+       time_t t=time(0);
+       if(t-try_time<5)
+ 	 sleep(5-(t-try_time));
+@@ -682,6 +686,10 @@
     time_t try_time;
     int af_index=0;
     int af_order[16];
 +   int af_tries[16];
-+   int af_try=0, af_tried=-1, try_afs_again=0;
-+   int dns_use_first =ResMgr::QueryBool("dns:use-first-address",0),
-+       dns_n_attempts=ResMgr::Query("dns:n-attempts",0),
-+       dns_try_again =ResMgr::QueryBool("dns:try-again",0);
++   int af_try=0, af_tried=0;
++   int dns_use_first =ResMgr::QueryBool("dns:use-first-address",name),
++       dns_n_attempts=ResMgr::Query("dns:max-retries",name);
  
     const char *order=ResMgr::Query("dns:order",name);
  
-@@ -698,6 +703,8 @@
+@@ -698,6 +706,8 @@
     }
  
     ParseOrder(order,af_order);
@@ -35,7 +55,7 @@
  
     for(;;)
     {
-@@ -778,8 +785,32 @@
+@@ -778,8 +788,24 @@
  #else // !HAVE_GETADDRINFO
  
        int af=af_order[af_index];
@@ -43,33 +63,25 @@
        if(af==-1)
 -	 break;
 +      {
-+	  if(   (timeout == 0) 
-+	     && (dns_try_again == 0) 
-+	     && ((dns_n_attempts == 0) || (af_tried == 0))
-+            )
++	  if((timeout == 0) && (af_tried == 0))
 +	      break;
 +	  else
-+	  { /* tried all afs at least once */	      
-+	      if( ( dns_try_again == 0 ) || (try_afs_again == 0))
-+		  break;
-+
++	  {  
 +	      af_index = 0;
-+	      af = af_order[af_index];
 +	      af_tried = 0;
-+	      try_afs_again = 0;
++	      af = af_order[af_index];
 +	  }
 +      }
 +      
 +      if ( af_tries [ af_index ] != -1 )
 +      {
-+	  af_tries[ af_index  ]++;
-+      
 +	  if( (dns_n_attempts > 0) && ( af_tries [ af_index ] > dns_n_attempts) )
 +	      break;
++	  ++af_tries[ af_index  ];      
  
        struct hostent *ha;
  # if defined(HAVE_GETIPNODEBYNAME)
-@@ -801,12 +832,19 @@
+@@ -801,12 +827,19 @@
        }
  # endif
  
@@ -85,14 +97,14 @@
 +	 {
 +	     AddAddress(ha->h_addrtype, *a, ha->h_length);
 +	     af_tries[ af_index ] = -1;
-+	     if ( dns_use_first )
-+		 return;
 +	 }
++	 if( (af_tries[ af_index ] == -1) && dns_use_first )
++	     return;
 +	 af_index++;	 
  # if defined(HAVE_GETIPNODEBYNAME)
  	 freehostent(ha);
  # endif
-@@ -825,14 +863,33 @@
+@@ -825,14 +858,30 @@
  	    error=_("Host name lookup failure");
  # endif
  	 }
@@ -102,9 +114,6 @@
        }
 +      } /* af_tries[ af_index ] != -1 */
 +
-+      if( af_tries[ af_index ] != -1 )
-+	  try_afs_again = 1;
-+
  #endif /* HAVE_GETADDRINFO */
  
 -      time_t t;
@@ -131,9 +140,18 @@
     }
  }
  
---- lftp-3.2.1/doc/lftp.1.bz173276	2005-05-23 06:11:18.000000000 -0400
-+++ lftp-3.2.1/doc/lftp.1	2005-12-16 20:42:44.000000000 -0500
-@@ -912,6 +912,27 @@
+@@ -896,7 +945,7 @@
+ 
+ void Resolver::Reconfig(const char *name)
+ {
+-   timeout = ResMgr::Query("dns:fatal-timeout",hostname);
++   timeout = TimeInterval(ResMgr::Query("dns:fatal-timeout",hostname));
+    if(!name || strncmp(name,"dns:",4))
+       return;
+    if(cache)
+--- lftp-3.3.5/doc/lftp.1.bz173276	2005-12-02 02:23:31.000000000 -0500
++++ lftp-3.3.5/doc/lftp.1	2005-12-21 13:20:24.000000000 -0500
+@@ -919,6 +919,20 @@
  .BR dns:use-fork \ (boolean)
  if true, lftp will fork before resolving host address. Default is true.
  .TP
@@ -145,18 +163,11 @@
 +dns:fatal-timeout (if any) expires. 
 +Setting this to true will make lftp use the first available address for a name.
 +.TP
-+.BR dns:try-again \ (boolean)
-+If true (the default), lftp will continue to try to lookup a dns name while 
-+no servers are contactable, until the dns-fatal-timeout expires or an address
-+is found (of each family in dns:order if dns:use-first-address is false).
-+If false, lftp will not retry dns name lookups .
-+.TP
-+.BR dns:n-attempts \ (number)
++.BR dns:max-retries \ (number)
 +If zero, (the default), there is no limit on the number of times lftp will try
-+to lookup an address if dns:try-again is true.
++to lookup an address .
 +If > 0, lftp will try only this number of times to look up an address of each 
 +address family in dns:order .
-+If dns:try-again is not true, this variable has no effect.
 +.TP
  .BR file:charset \ (string)
  local character set. It is set from current locale initially.


Index: lftp.spec
===================================================================
RCS file: /cvs/dist/rpms/lftp/FC-4/lftp.spec,v
retrieving revision 1.25
retrieving revision 1.26
diff -u -r1.25 -r1.26
--- lftp.spec	17 Dec 2005 02:03:47 -0000	1.25
+++ lftp.spec	21 Dec 2005 20:37:48 -0000	1.26
@@ -1,7 +1,7 @@
 Summary: A sophisticated file transfer program
 Name: lftp 
 Version: 3.2.1
-Release: 8_FC4
+Release: 10_FC4
 License: GPL
 Group: Applications/Internet
 Source0: http://ftp.yars.free.net/pub/software/unix/net/ftp/client/lftp/lftp-%{version}.tar.bz2
@@ -27,7 +27,7 @@
 	LDFLAGS=`pkg-config --libs-only-L openssl`; export LDFLAGS
 fi
 LDFLAGS="-L`pwd`/src/.libs $LDFLAGS"; export LDFLAGS
-%configure --with-modules --disable-static --with-ssl --with-debug
+%configure --with-modules --disable-static --with-openssl=/usr --with-debug
 export tagname=CC
 make LIBTOOL=%{_bindir}/libtool
 
@@ -67,7 +67,11 @@
 %{_libdir}/lftp/%{version}/proto-sftp.so
 
 %changelog
-* Fri Dec 16 2005 Jason Vas Dias <jvdias at redhat.com> 3.2.1-2
+* Wed Dec 21 2005 Jason Vas Dias <jvdias at redhat.com> 3.2.1-10
+- fix bug 176315: openssl libraries not being picked up - gnutls was instead
+- improvements to bug 172376 fix
+
+* Fri Dec 16 2005 Jason Vas Dias <jvdias at redhat.com> 3.2.1-8
 - fix bug 173276: handle unresponsive DNS servers better
 
 * Tue Oct 11 2005 Jason Vas Dias <jvdias at redhat.com> 3.2.1-1




More information about the fedora-cvs-commits mailing list