update lftp version to 4.9.1
This commit is contained in:
parent
2bf8f4d6d5
commit
57f262bc90
@ -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<less))
|
|
||||||
- {
|
|
||||||
- amp[0]=' ';
|
|
||||||
- memmove(amp+1,amp+6,len-(amp+6-buf)+1);
|
|
||||||
- len-=amp+6-buf;
|
|
||||||
- buf=amp+1;
|
|
||||||
- continue;
|
|
||||||
+ if(strcmp(buf + i, " ") == 0){
|
|
||||||
+ for(int j = 0; j < 6; j++)buf[i + j] = 0;
|
|
||||||
+ buf[i] = ' ';
|
|
||||||
+ i += 6;
|
|
||||||
+ i--;
|
|
||||||
+ continue;
|
|
||||||
}
|
|
||||||
- char *more=strchr(less+1,'>');
|
|
||||||
- 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
|
|
||||||
|
|
||||||
@ -1,56 +0,0 @@
|
|||||||
From b70425a3af79f387295acfa5246d6d0d8ba4e49c Mon Sep 17 00:00:00 2001
|
|
||||||
From: "Alexander V. Lukyanov" <lavv17f@gmail.com>
|
|
||||||
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
|
|
||||||
|
|
||||||
Binary file not shown.
BIN
lftp-4.9.1.tar.xz
Normal file
BIN
lftp-4.9.1.tar.xz
Normal file
Binary file not shown.
25
lftp.spec
25
lftp.spec
@ -1,16 +1,15 @@
|
|||||||
Summary: A sophisticated file transfer program
|
Summary: A sophisticated file transfer program
|
||||||
Name: lftp
|
Name: lftp
|
||||||
Version: 4.8.4
|
Version: 4.9.1
|
||||||
Release: 2
|
Release: 1
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://lftp.yar.ru/
|
URL: http://lftp.yar.ru/
|
||||||
Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz
|
Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz
|
||||||
BuildRequires: ncurses-devel, gnutls-devel, perl-generators, pkgconfig, gettext
|
BuildRequires: ncurses-devel, gnutls-devel, perl-generators, pkgconfig, gettext
|
||||||
BuildRequires: gettext readline-devel, zlib-devel, gcc-c++ desktop-file-utils
|
BuildRequires: gettext readline-devel, zlib-devel, gcc-c++ desktop-file-utils
|
||||||
|
BuildRequires: chrpath
|
||||||
|
|
||||||
Patch1: lftp-4.0.9-date_fmt.patch
|
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
|
%description
|
||||||
LFTP is a sophisticated file transfer program supporting a number of
|
LFTP is a sophisticated file transfer program supporting a number of
|
||||||
@ -52,6 +51,11 @@ desktop-file-install \
|
|||||||
--dir=%{buildroot}%{_datadir}/applications \
|
--dir=%{buildroot}%{_datadir}/applications \
|
||||||
%{buildroot}/%{_datadir}/applications/lftp.desktop
|
%{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
|
%ldconfig_scriptlets
|
||||||
|
|
||||||
%files
|
%files
|
||||||
@ -65,6 +69,7 @@ desktop-file-install \
|
|||||||
%{_datadir}/applications/*.*
|
%{_datadir}/applications/*.*
|
||||||
%{_datadir}/icons/hicolor/*/apps/*
|
%{_datadir}/icons/hicolor/*/apps/*
|
||||||
%exclude %{_libdir}/*.so
|
%exclude %{_libdir}/*.so
|
||||||
|
%config(noreplace) /etc/ld.so.conf.d/*
|
||||||
|
|
||||||
%files scripts
|
%files scripts
|
||||||
%{_datadir}/lftp
|
%{_datadir}/lftp
|
||||||
@ -78,5 +83,17 @@ desktop-file-install \
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Sat Jul 25 2020 gaihuiying <gaihuiying1@huawei.com> - 4.9.1-1
|
||||||
|
- Type:requirement
|
||||||
|
- ID:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC: upgrade lftp version to 4.9.1
|
||||||
|
|
||||||
|
* Fri Feb 28 2020 zhuchengliang <zhuchengliang4@huawei.com> - 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 <buildteam@openeuler.org> - 4.8.4-2
|
* Wed Aug 28 2019 openEuler Buildteam <buildteam@openeuler.org> - 4.8.4-2
|
||||||
- Package init
|
- Package init
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user