backport some patches

This commit is contained in:
chengyechun 2025-03-24 16:51:10 +08:00
parent 71bb53bd7a
commit 41d613ca1f
3 changed files with 67 additions and 1 deletions

View File

@ -0,0 +1,29 @@
From 9697856be9af5f3d51a85ef29b02d956b94b0b55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B=E4=B8=9A=E6=98=A5?=
<57088250+chengyechun@users.noreply.github.com>
Date: Thu, 10 Oct 2024 14:48:39 +0800
Subject: [PATCH] Update FileCopy.cc
File growth can be calculated only if it is strictly greater than
Conflict:NA
Reference:https://github.com/lavv17/lftp/commit/9697856be9af5f3d51a85ef29b02d956b94b0b55
---
src/FileCopy.cc | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/FileCopy.cc b/src/FileCopy.cc
index 31d4e066..0d71d29b 100644
--- a/src/FileCopy.cc
+++ b/src/FileCopy.cc
@@ -1137,7 +1137,8 @@ void FileCopyPeerFA::OpenSession()
debug((10,"copy dst: seek past eof (seek_pos=%lld, size=%lld)\n",
(long long)seek_pos,(long long)e_size));
eof=true;
- fileincreased=true;
+ if(seek_pos>e_size)
+ fileincreased=true;
if(date==NO_DATE || date==NO_DATE_YET)
return;
}

View File

@ -0,0 +1,28 @@
From e71135d7523bcb992764e37d3238db477a8b1842 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=A8=8B=E4=B8=9A=E6=98=A5?=
<57088250+chengyechun@users.noreply.github.com>
Date: Thu, 10 Oct 2024 14:51:31 +0800
Subject: [PATCH] Update FileAccess.h
The first transmission is not counted as retransmission. Therefore, the number of retransmission attempts must be greater than the configured number of retransmissions.
Conflict:NA
Reference:https://github.com/lavv17/lft/commit/e71135d7523bcb992764e37d3238db477a8b1842
---
src/FileAccess.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/FileAccess.h b/src/FileAccess.h
index 1bd081151..4d8e252f7 100644
--- a/src/FileAccess.h
+++ b/src/FileAccess.h
@@ -565,7 +565,7 @@ class UploadState
retries=session->GetRetries();
off_t pos=session->GetRealPos();
int max_retries=session->GetMaxRetries();
- if(max_retries>0 && retries>=max_retries)
+ if(max_retries>0 && retries>max_retries)
pos=0;
if(pos_watermark<pos) {
pos_watermark=pos;

View File

@ -1,7 +1,7 @@
Summary: A sophisticated file transfer program
Name: lftp
Version: 4.9.2
Release: 6
Release: 7
License: GPLv3+
URL: http://lftp.yar.ru/
Source0: http://lftp.yar.ru/ftp/%{name}-%{version}.tar.xz
@ -17,6 +17,8 @@ Patch6002: backport-Quit-while-source-file-increased.patch
Patch6003: backport-Ensure-that-PollVec-enum-matches-poll-values.patch
Patch6004: backport-fix-second-find_cmd-Segmentation-fault.patch
Patch6005: backport-fix-sftp-too-many-out-of-order-packets.patch
Patch6006: backport-fix-file-growth-when-strictly-greater-than.patch
Patch6007: backport-fix-the-error-of-retransmission.patch
%description
LFTP is a sophisticated file transfer program supporting a number of
@ -90,6 +92,13 @@ echo "%{_libdir}/lftp/%{version}" > %{buildroot}/etc/ld.so.conf.d/%{name}-%{_arc
%changelog
* Mon Mar 24 2025 chengyechun <chengyechun1@huawei.com> - 4.9.2-7
- Type:bugfix
- CVE:NA
- SUG:NA
- DESC:File growth can be calculated only if it is strictly greater than
fix the error of retransmission
* Mon Nov 11 2024 chengyechun <chengyechun1@huawei.com> - 4.9.2-6
- Type:bugfix
- CVE:NA