diff --git a/Making-remove_tags-function-more-efficient-from-quad.patch b/Making-remove_tags-function-more-efficient-from-quad.patch deleted file mode 100644 index abf8822..0000000 --- a/Making-remove_tags-function-more-efficient-from-quad.patch +++ /dev/null @@ -1,73 +0,0 @@ -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 deleted file mode 100644 index 33fb405..0000000 --- a/fixed-sorting-of-FileSet-when-some-files-begin-with-.patch +++ /dev/null @@ -1,56 +0,0 @@ -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.8.4.tar.xz b/lftp-4.8.4.tar.xz deleted file mode 100644 index ebb0eb2..0000000 Binary files a/lftp-4.8.4.tar.xz and /dev/null differ diff --git a/lftp-4.9.1.tar.xz b/lftp-4.9.1.tar.xz new file mode 100644 index 0000000..c42fcf9 Binary files /dev/null and b/lftp-4.9.1.tar.xz differ diff --git a/lftp.spec b/lftp.spec index 1c73dd9..fa9a184 100644 --- a/lftp.spec +++ b/lftp.spec @@ -1,16 +1,15 @@ Summary: A sophisticated file transfer program Name: lftp -Version: 4.8.4 -Release: 2 +Version: 4.9.1 +Release: 1 License: GPLv3+ URL: http://lftp.yar.ru/ Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz BuildRequires: ncurses-devel, gnutls-devel, perl-generators, pkgconfig, gettext BuildRequires: gettext readline-devel, zlib-devel, gcc-c++ desktop-file-utils +BuildRequires: chrpath Patch1: lftp-4.0.9-date_fmt.patch -Patch6000: fixed-sorting-of-FileSet-when-some-files-begin-with-.patch -Patch6001: Making-remove_tags-function-more-efficient-from-quad.patch %description LFTP is a sophisticated file transfer program supporting a number of @@ -52,6 +51,11 @@ desktop-file-install \ --dir=%{buildroot}%{_datadir}/applications \ %{buildroot}/%{_datadir}/applications/lftp.desktop +chrpath -d %{buildroot}/%{_libdir}/%{name}/%{version}/*.so* + +mkdir -p %{buildroot}/etc/ld.so.conf.d +echo "%{_libdir}/lftp/%{version}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arch}.conf + %ldconfig_scriptlets %files @@ -65,6 +69,7 @@ desktop-file-install \ %{_datadir}/applications/*.* %{_datadir}/icons/hicolor/*/apps/* %exclude %{_libdir}/*.so +%config(noreplace) /etc/ld.so.conf.d/* %files scripts %{_datadir}/lftp @@ -78,5 +83,17 @@ desktop-file-install \ %changelog +* Sat Jul 25 2020 gaihuiying - 4.9.1-1 +- Type:requirement +- ID:NA +- SUG:NA +- DESC: upgrade lftp version to 4.9.1 + +* Fri Feb 28 2020 zhuchengliang - 4.8.4-3 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: remove rpath and runpath of exec files and libraries + * Wed Aug 28 2019 openEuler Buildteam - 4.8.4-2 - Package init