From 57abc4eecdd0905178185e11d782a26114d0fe50 Mon Sep 17 00:00:00 2001 From: Martin Nagy Date: Wed, 23 Jan 2008 09:44:21 +0000 Subject: [PATCH] - upgrade to upstream version 3.6.1 - remove rpath and make some spec file changes for review (#225984) - remove old patches --- .cvsignore | 2 +- lftp-3.0.13-fix-cxxlink.patch | 11 -- lftp-3.2.1.tar.bz2.asc | 7 - lftp-3.3.5-bz173276.patch | 174 ------------------------- lftp-3.4.1-dont_core.patch | 31 ----- lftp-3.4.2-fix-redirect-coredump.patch | 11 -- lftp-3.5.14-progress_overflow.patch | 2 +- lftp.spec | 32 ++++- sources | 2 +- 9 files changed, 28 insertions(+), 244 deletions(-) delete mode 100644 lftp-3.0.13-fix-cxxlink.patch delete mode 100644 lftp-3.2.1.tar.bz2.asc delete mode 100644 lftp-3.3.5-bz173276.patch delete mode 100644 lftp-3.4.1-dont_core.patch delete mode 100644 lftp-3.4.2-fix-redirect-coredump.patch diff --git a/.cvsignore b/.cvsignore index 217c35a..fb99625 100644 --- a/.cvsignore +++ b/.cvsignore @@ -1 +1 @@ -lftp-3.5.14.tar.gz +lftp-3.6.1.tar.gz diff --git a/lftp-3.0.13-fix-cxxlink.patch b/lftp-3.0.13-fix-cxxlink.patch deleted file mode 100644 index 565d8a7..0000000 --- a/lftp-3.0.13-fix-cxxlink.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- lftp-3.0.13/src/Makefile.in.fix-cxxlink 2004-12-20 05:19:47.000000000 -0500 -+++ lftp-3.0.13/src/Makefile.in 2005-01-21 18:20:32.167502000 -0500 -@@ -149,7 +149,7 @@ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CXXFLAGS) $(CXXFLAGS) - CXXLD = $(CXX) --CXXLINK = $(LIBTOOL) --tag=CXX --mode=link $(CXXLD) $(AM_CXXFLAGS) \ -+CXXLINK = $(LIBTOOL) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ - YACCCOMPILE = $(YACC) $(YFLAGS) $(AM_YFLAGS) - LTYACCCOMPILE = $(LIBTOOL) --mode=compile $(YACC) $(YFLAGS) \ diff --git a/lftp-3.2.1.tar.bz2.asc b/lftp-3.2.1.tar.bz2.asc deleted file mode 100644 index df0a75b..0000000 --- a/lftp-3.2.1.tar.bz2.asc +++ /dev/null @@ -1,7 +0,0 @@ ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.2.1 (SunOS) - -iD8DBQBClIDqqCS7afKpmhgRAqQyAKCQh4ZWeloADkMAky9dZ6Bd+FZpnQCdHCDE -y51i6QfH9SGijIJqDkQtk8s= -=/LR9 ------END PGP SIGNATURE----- diff --git a/lftp-3.3.5-bz173276.patch b/lftp-3.3.5-bz173276.patch deleted file mode 100644 index ebacfc5..0000000 --- a/lftp-3.3.5-bz173276.patch +++ /dev/null @@ -1,174 +0,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_n_attempts ("dns:max-retries", "1000", ResMgr::UNumberValidate,0); - - static ResDecl - fish_shell ("fish:shell", "/bin/sh", 0,0), ---- 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=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 +706,8 @@ - } - - ParseOrder(order,af_order); -+ -+ memset(af_tries, 0, sizeof(af_tries)); - - for(;;) - { -@@ -778,8 +788,24 @@ - #else // !HAVE_GETADDRINFO - - int af=af_order[af_index]; -+ - if(af==-1) -- break; -+ { -+ if((timeout == 0) && (af_tried == 0)) -+ break; -+ else -+ { -+ af_index = 0; -+ af_tried = 0; -+ af = af_order[af_index]; -+ } -+ } -+ -+ if ( af_tries [ af_index ] != -1 ) -+ { -+ 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 +827,19 @@ - } - # endif - -- if(ha) -+ af_tried = 1; -+ -+ if ( ha ) - { - const char * const *a; - for(a=ha->h_addr_list; *a; a++) -- AddAddress(ha->h_addrtype, *a, ha->h_length); -- af_index++; -+ { -+ AddAddress(ha->h_addrtype, *a, ha->h_length); -+ af_tries[ af_index ] = -1; -+ } -+ if( (af_tries[ af_index ] == -1) && dns_use_first ) -+ return; -+ af_index++; - # if defined(HAVE_GETIPNODEBYNAME) - freehostent(ha); - # endif -@@ -825,14 +858,30 @@ - error=_("Host name lookup failure"); - # endif - } -- af_index++; -- continue; // try other address families -+ af_tries[ af_index ] = -1; - } -+ } /* af_tries[ af_index ] != -1 */ -+ - #endif /* HAVE_GETADDRINFO */ - -- time_t t; -- if((t=time(0))-try_time<5) -- sleep(5-(t-try_time)); -+ time_t t = time(0); -+ if( timeout && (( t - start_time ) >= (timeout - 1)) ) -+ { -+ return; -+ }else -+ { -+ af_try = (af_order[af_index+1] == -1) ? 0 : ((af_index + 1) & 0xf); -+ if( (af_tries[ af_try ] != 0) || (af_tried == 0)) -+ { -+ if( timeout == 0 ) -+ { -+ if((t-try_time)<5) -+ sleep(5-(t-try_time)); -+ }else -+ sleep(1); -+ } -+ af_index++; -+ } - } - } - -@@ -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 -+.BR dns:use-first-address \ (boolean) -+If true (the default), lftp will use the first address returned by a host name lookup; -+if false, lftp will continue trying to find addresses of each address family -+in dns:order until an address of each family is found, is authoritatively -+known not to exist (as opposed to servers not being contactable), or the -+dns:fatal-timeout (if any) expires. -+Setting this to true will make lftp use the first available address for a name. -+.TP -+.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 > 0, lftp will try only this number of times to look up an address of each -+address family in dns:order . -+.TP - .BR file:charset \ (string) - local character set. It is set from current locale initially. - .TP diff --git a/lftp-3.4.1-dont_core.patch b/lftp-3.4.1-dont_core.patch deleted file mode 100644 index abf1ca3..0000000 --- a/lftp-3.4.1-dont_core.patch +++ /dev/null @@ -1,31 +0,0 @@ ---- lftp-3.4.1/src/commands.cc.dont_core 2006-02-06 05:57:29.000000000 -0500 -+++ lftp-3.4.1/src/commands.cc 2006-02-07 17:53:14.000000000 -0500 -@@ -1508,15 +1508,19 @@ - if(time_style && time_style[0]) { - if(time_style[0]=='+') - time_fmt=xstrdup(time_style+1); -- else if(!strcmp(optarg,"full-iso")) --// time_fmt=xstrdup("%Y-%m-%d %H:%M:%S.%N %z"); // %N and %z are GNU extensions -- time_fmt=xstrdup("%Y-%m-%d %H:%M:%S"); -- else if(!strcmp(optarg,"long-iso")) -- time_fmt=xstrdup("%Y-%m-%d %H:%M"); -- else if(!strcmp(optarg,"iso")) -- time_fmt=xstrdup("%Y-%m-%d \n%m-%d %H:%M"); -- else -- time_fmt=xstrdup(time_style); -+ if( optarg ) -+ { -+ if(!strcmp(optarg,"full-iso")) -+ // time_fmt=xstrdup("%Y-%m-%d %H:%M:%S.%N %z"); // %N and %z are GNU extensions -+ time_fmt=xstrdup("%Y-%m-%d %H:%M:%S"); -+ else if(!strcmp(optarg,"long-iso")) -+ time_fmt=xstrdup("%Y-%m-%d %H:%M"); -+ else if(!strcmp(optarg,"iso")) -+ time_fmt=xstrdup("%Y-%m-%d \n%m-%d %H:%M"); -+ else -+ time_fmt=xstrdup(time_style); -+ }else -+ time_fmt=xstrdup(time_style); - need_exact_time=false; - if(time_fmt) { - static const char exact_fmts[][3]={"%H","%M","%S","%N",""}; diff --git a/lftp-3.4.2-fix-redirect-coredump.patch b/lftp-3.4.2-fix-redirect-coredump.patch deleted file mode 100644 index 23bf8be..0000000 --- a/lftp-3.4.2-fix-redirect-coredump.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- lftp-3.4.2/src/FileAccess.cc.bz181694 2006-02-06 06:03:58.000000000 -0500 -+++ lftp-3.4.2/src/FileAccess.cc 2006-02-16 11:34:44.000000000 -0500 -@@ -690,7 +690,7 @@ - - void FileAccess::PathVerify(const Path &p) - { -- delete new_cwd; -+ Close(); - new_cwd=new Path(p); - Open(new_cwd->path,CHANGE_DIR); - } diff --git a/lftp-3.5.14-progress_overflow.patch b/lftp-3.5.14-progress_overflow.patch index c924ed8..2d8a6ca 100644 --- a/lftp-3.5.14-progress_overflow.patch +++ b/lftp-3.5.14-progress_overflow.patch @@ -1,7 +1,7 @@ diff -up lftp-3.5.14/src/FileCopy.cc.test lftp-3.5.14/src/FileCopy.cc --- lftp-3.5.14/src/FileCopy.cc.test 2007-12-11 09:48:03.000000000 +0100 +++ lftp-3.5.14/src/FileCopy.cc 2007-12-11 09:48:36.000000000 +0100 -@@ -530,6 +530,6 @@ const char *FileCopy::GetPercentDoneStr( +@@ -514,6 +514,6 @@ const char *FileCopy::GetPercentDoneStr( return ""; - static char buf[6]; + static char buf[8]; diff --git a/lftp.spec b/lftp.spec index ac9b0ba..c7a2fa2 100644 --- a/lftp.spec +++ b/lftp.spec @@ -1,13 +1,13 @@ Summary: A sophisticated file transfer program Name: lftp -Version: 3.5.14 -Release: 3%{?dist} -License: GPL +Version: 3.6.1 +Release: 1%{?dist} +License: GPLv2+ Group: Applications/Internet Source0: ftp://ftp.yar.ru/lftp/lftp-%{version}.tar.gz URL: http://lftp.yar.ru/ BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -BuildRequires: ncurses-devel, openssl-devel, pkgconfig, readline-devel, libtool, gettext +BuildRequires: ncurses-devel, openssl-devel, pkgconfig, readline-devel, libtool, gettext, chrpath Patch1: lftp-3.5.14-progress_overflow.patch @@ -39,15 +39,26 @@ make LIBTOOL=%{_bindir}/libtool %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT export tagname=CC -make LIBTOOL=%{_bindir}/libtool DESTDIR=$RPM_BUILD_ROOT install +make LIBTOOL=%{_bindir}/libtool DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install rm -f $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.la chmod 0755 $RPM_BUILD_ROOT%{_libdir}/lftp/* chmod 0755 $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.so +iconv -f ISO88591 -t UTF8 NEWS -o NEWS.tmp +mv -f NEWS.tmp NEWS # Remove files from $RPM_BUILD_ROOT that we aren't shipping. rm -f $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/*.a rm -f $RPM_BUILD_ROOT%{_libdir}/liblftp-jobs.*a rm -f $RPM_BUILD_ROOT%{_libdir}/liblftp-tasks.*a rm -f $RPM_BUILD_ROOT%{_libdir}/liblftp-*.so +# Remove rpath +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/proto-http.so +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/liblftp-network.so +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/proto-sftp.so +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/proto-ftp.so +chrpath --delete $RPM_BUILD_ROOT%{_libdir}/lftp/%{version}/proto-fish.so +mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d +echo "%{_libdir}/lftp/%{version}" > $RPM_BUILD_ROOT/etc/ld.so.conf.d/%{name}-%{_arch}.conf + %find_lang %{name} %if %{DEBUG} %{_libdir}/rpm/brp-compress @@ -70,6 +81,8 @@ exit 0 %defattr(-,root,root,-) %doc BUGS COPYING ChangeLog FAQ FEATURES README* NEWS THANKS TODO %config(noreplace) %{_sysconfdir}/lftp.conf +%config /etc/ld.so.conf.d/* + %{_bindir}/* %{_mandir}/*/* %{_datadir}/lftp @@ -89,6 +102,11 @@ exit 0 %{_libdir}/liblftp-tasks* %changelog +* Tue Jan 23 2008 Martin Nagy - 3.6.1-1 +- upgrade to upstream version 3.6.1 +- remove rpath and make some spec file changes for review (#225984) +- remove old patches + * Tue Dec 13 2007 Martin Nagy - 3.5.14-3 - Fixed coredumping when downloading (#414051) @@ -187,8 +205,8 @@ exit 0 bug 171096 : 'mget files in lftp causes abort' (core dump actually) resulted from not doing so . See http://lftp.yar.ru : - Recent events:2005-10-17: - lftp-3.3.2 released. Fixed a coredump caused by double-free. + Recent events:2005-10-17: + lftp-3.3.2 released. Fixed a coredump caused by double-free. * Sat Oct 15 2005 Florian La Roche - 3.3.1-1 - 3.3.1 diff --git a/sources b/sources index 1cbd48f..ef4e9fc 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -dfb019355ad7f7ed347e64b39e4d1d3c lftp-3.5.14.tar.gz +cb074387f2516efe6abe5664af5504f9 lftp-3.6.1.tar.gz