commit 6e71dab0248e1a8c48cd22d712ef565e6da6ed9a Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 10:54:45 2019 -0400 Package init diff --git a/Making-remove_tags-function-more-efficient-from-quad.patch b/Making-remove_tags-function-more-efficient-from-quad.patch new file mode 100644 index 0000000..abf8822 --- /dev/null +++ b/Making-remove_tags-function-more-efficient-from-quad.patch @@ -0,0 +1,73 @@ +From e3a366a103ca699aaf57595c396ea205a50d2b16 Mon Sep 17 00:00:00 2001 +From: gilcu3 <828241+gilcu3@users.noreply.github.com> +Date: Fri, 14 Sep 2018 10:19:24 -0400 +Subject: [PATCH 07/23] Making remove_tags function more efficient (from + quadratic to linear time worst case) + +--- + src/misc.cc | 47 +++++++++++++++++++++++++++++------------------ + 1 file changed, 29 insertions(+), 18 deletions(-) + +diff --git a/src/misc.cc b/src/misc.cc +index db088c2..bc3fdb9 100644 +--- a/src/misc.cc ++++ b/src/misc.cc +@@ -961,26 +961,37 @@ const xstring& shell_encode(const char *string,int len) + void remove_tags(char *buf) + { + int len=strlen(buf); +- for(;;) ++ int less = -1; ++ for(int i = 0; i < len;i++) + { +- char *less=strchr(buf,'<'); +- char *amp=strstr(buf," "); +- if(!less && !amp) +- break; +- if(amp && (!less || amp'); +- if(!more) +- break; +- memmove(less,more+1,len-(more+1-buf)+1); +- len-=more+1-buf; +- buf=less; ++ if(buf[i] == '<'){ ++ less = i; ++ continue; ++ ++ } ++ if(buf[i] == '>'){ ++ if(less != -1){ ++ for(int j = less; j <= i; j++)buf[j] = 0; ++ less = -1; ++ } ++ ++ } ++ } ++ int zero = 0; ++ for(int i = 0; i < len;i++) ++ { ++ while(zero < i && buf[zero] != 0)zero++; ++ if(buf[i] != 0 and zero != i){ ++ buf[zero] = buf[i]; ++ buf[i] = 0; ++ } + } + } + void rtrim(char *s) +-- +1.7.12.4 + diff --git a/fixed-sorting-of-FileSet-when-some-files-begin-with-.patch b/fixed-sorting-of-FileSet-when-some-files-begin-with-.patch new file mode 100644 index 0000000..33fb405 --- /dev/null +++ b/fixed-sorting-of-FileSet-when-some-files-begin-with-.patch @@ -0,0 +1,56 @@ +From b70425a3af79f387295acfa5246d6d0d8ba4e49c Mon Sep 17 00:00:00 2001 +From: "Alexander V. Lukyanov" +Date: Sat, 13 Oct 2018 00:10:27 +0300 +Subject: [PATCH 06/23] fixed sorting of FileSet when some files begin with a + tilde (fixes #476) + +reason: FileSet::Merge no longer sorts the files. +--- + src/FileSet.h | 1 + + src/NetAccess.cc | 9 +++++---- + 2 files changed, 6 insertions(+), 4 deletions(-) + +diff --git a/src/FileSet.h b/src/FileSet.h +index 88c9563..e686e1a 100644 +--- a/src/FileSet.h ++++ b/src/FileSet.h +@@ -204,6 +204,7 @@ public: + void rewind() { ind=0; } + FileInfo *curr(); + FileInfo *next(); ++ FileInfo *borrow_curr() { return Borrow(ind--); } + + void LocalRemove(const char *dir); + void LocalUtime(const char *dir,bool only_dirs=false,bool flat=false); +diff --git a/src/NetAccess.cc b/src/NetAccess.cc +index 62dd8ab..98a8329 100644 +--- a/src/NetAccess.cc ++++ b/src/NetAccess.cc +@@ -541,19 +541,20 @@ do_again: + got_fileset: + if(set) + { +- bool need_resort=false; + set->rewind(); + for(file=set->curr(); file!=0; file=set->next()) + { + // tilde is special. + if(file->name[0]=='~') + { ++ // can't just update the name - it will break sorting ++ file=set->borrow_curr(); + file->name.set_substr(0,0,"./"); +- need_resort=true; ++ if(!result) ++ result=new FileSet(); ++ result->Add(file); + } + } +- if(need_resort && !result) +- result=new FileSet; // Merge will sort the names + if(result) + { + result->Merge(set); +-- +1.7.12.4 + diff --git a/lftp-4.0.9-date_fmt.patch b/lftp-4.0.9-date_fmt.patch new file mode 100644 index 0000000..199969f --- /dev/null +++ b/lftp-4.0.9-date_fmt.patch @@ -0,0 +1,30 @@ +diff --git a/src/Http.cc b/src/Http.cc +index 5364c94..0018670 100644 +--- a/src/Http.cc ++++ b/src/Http.cc +@@ -26,6 +26,7 @@ + #include + #include + #include ++#include + #include + #include + #include +diff --git a/src/Http.cc b/src/Http.cc +index b84a729..faf0cc5 100644 +--- a/src/Http.cc ++++ b/src/Http.cc +@@ -786,9 +786,11 @@ void Http::SendRequest(const char *connection,const char *f) + (long long)((limit==FILE_END || limit>entity_size ? entity_size : limit)-1), + (long long)entity_size); + } +- if(entity_date!=NO_DATE) ++ if((entity_date!=NO_DATE) && (entity_date>0L && entity_date= %{version}-%{release} +BuildArch: noarch + +%description scripts +Utility scripts for use with lftp. + +%package_help + +%prep +%autosetup -n %{name}-%{version} -p1 + +sed -i.norpath -e \ + '/sys_lib_dlsearch_path_spec/s|/usr/lib |/usr/lib /usr/lib64 /lib64 |' \ + configure + +%build +%configure --with-modules --with-gnutls --without-openssl --with-debug +%make_build + +%install +export tagname=CC +make DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' install +%delete_la +iconv -f ISO88591 -t UTF8 NEWS -o NEWS.tmp +touch -c -r NEWS NEWS.tmp +mv NEWS.tmp NEWS +desktop-file-install \ +--dir=%{buildroot}%{_datadir}/applications \ +%{buildroot}/%{_datadir}/applications/lftp.desktop + +%ldconfig_scriptlets + +%files +%defattr(-,root,root) +%doc COPYING +%{_datadir}/locale/* +%config(noreplace) %{_sysconfdir}/lftp.conf +%{_bindir}/* +%{_libdir}/lftp/%{version}/*.so +%{_libdir}/liblftp-*.so.* +%{_datadir}/applications/*.* +%{_datadir}/icons/hicolor/*/apps/* +%exclude %{_libdir}/*.so + +%files scripts +%{_datadir}/lftp + + + +%files help +%defattr(-,root,root) +%doc BUGS ChangeLog FAQ FEATURES NEWS THANKS TODO README* +%{_mandir}/*/* + + +%changelog +* Wed Aug 28 2019 openEuler Buildteam - 4.8.4-2 +- Package init