Import from AlmaLinux stable repository

This commit is contained in:
eabdullin 2024-05-15 07:47:41 +00:00
parent ca668bd5dc
commit 5da52c1155
2 changed files with 153 additions and 2 deletions

View File

@ -0,0 +1,143 @@
From 6c764e123c86ccce03d4ffaee11085b9badd6765 Mon Sep 17 00:00:00 2001
From: "Thomas E. Dickey" <dickey@invisible-island.net>
Date: Thu, 29 Jul 2021 21:15:21 +0000
Subject: [PATCH] snapshot of project "lynx", label v2-9-0dev_7b
Upstream-commit: 6c764e123c86ccce03d4ffaee11085b9badd6765
Cherry-picked-by: Lukáš Zaoral <lzaoral@redhat.com>
---
src/LYDownload.c | 6 +++---
src/LYLocal.c | 2 +-
src/LYMainLoop.c | 2 +-
src/LYPrint.c | 16 ++++++++--------
src/LYUpload.c | 8 ++++----
5 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/LYDownload.c b/src/LYDownload.c
index fcaba027..afd6638e 100644
--- a/src/LYDownload.c
+++ b/src/LYDownload.c
@ -63,7 +63,7 @@ void LYDownload(char *line)
/*
* Parse out the File, sug_file, and the Method.
*/
- if ((file = strstr(Line, "/File=")) == NULL)
+ if ((file = LYstrstr(Line, "/File=")) == NULL)
goto failed;
*file = '\0';
/*
@@ -71,7 +71,7 @@ void LYDownload(char *line)
*/
file += 6;
- if ((sug_file = strstr(file + 1, "/SugFile=")) != NULL) {
+ if ((sug_file = LYstrstr(file + 1, "/SugFile=")) != NULL) {
*sug_file = '\0';
/*
* Go past "SugFile=".
@@ -113,7 +113,7 @@ void LYDownload(char *line)
#endif /* _WINDOWS */
#endif /* DIRED_SUPPORT */
- if ((method = strstr(Line, "Method=")) == NULL)
+ if ((method = LYstrstr(Line, "Method=")) == NULL)
goto failed;
/*
* Go past "Method=".
diff --git a/src/LYLocal.c b/src/LYLocal.c
index 2e14a526..bb9ba29f 100644
--- a/src/LYLocal.c
+++ b/src/LYLocal.c
@@ -1700,7 +1700,7 @@ static char *match_op(const char *prefix,
size_t len = strlen(prefix);
if (!StrNCmp("LYNXDIRED://", data, 12)
- && !StrNCmp(prefix, data + 12, len)) {
+ && !strncasecomp(prefix, data + 12, len)) {
len += 12;
#if defined(USE_DOS_DRIVES)
if (data[len] == '/') { /* this is normal */
diff --git a/src/LYMainLoop.c b/src/LYMainLoop.c
index 6f96d63c..7a3df1c4 100644
--- a/src/LYMainLoop.c
+++ b/src/LYMainLoop.c
@@ -2207,7 +2207,7 @@ static int handle_LYK_DOWNLOAD(int *cmd,
}
} else if (lynx_edit_mode && !no_dired_support &&
- !strstr(links[curdoc.link].lname, "/SugFile=")) {
+ !LYstrstr(links[curdoc.link].lname, "/SugFile=")) {
/*
* Don't bother making a /tmp copy of the local file.
*/
diff --git a/src/LYPrint.c b/src/LYPrint.c
index 6ac1f4b2..58b81a6f 100644
--- a/src/LYPrint.c
+++ b/src/LYPrint.c
@@ -1111,7 +1111,7 @@ int printfile(DocInfo *newdoc)
/*
* Get the number of lines in the file.
*/
- if ((cp = strstr(link_info, "lines=")) != NULL) {
+ if ((cp = LYstrstr(link_info, "lines=")) != NULL) {
/*
* Terminate prev string here.
*/
@@ -1127,24 +1127,24 @@ int printfile(DocInfo *newdoc)
/*
* Determine the type.
*/
- if (strstr(link_info, "LOCAL_FILE")) {
+ if (LYstrstr(link_info, "LOCAL_FILE")) {
type = TO_FILE;
- } else if (strstr(link_info, "TO_SCREEN")) {
+ } else if (LYstrstr(link_info, "TO_SCREEN")) {
type = TO_SCREEN;
- } else if (strstr(link_info, "LPANSI")) {
+ } else if (LYstrstr(link_info, "LPANSI")) {
Lpansi = TRUE;
type = TO_SCREEN;
- } else if (strstr(link_info, "MAIL_FILE")) {
+ } else if (LYstrstr(link_info, "MAIL_FILE")) {
type = MAIL;
- } else if (strstr(link_info, "PRINTER")) {
+ } else if (LYstrstr(link_info, "PRINTER")) {
type = PRINTER;
- if ((cp = strstr(link_info, "number=")) != NULL) {
+ if ((cp = LYstrstr(link_info, "number=")) != NULL) {
/* number of characters in "number=" */
cp += 7;
printer_number = atoi(cp);
}
- if ((cp = strstr(link_info, "pagelen=")) != NULL) {
+ if ((cp = LYstrstr(link_info, "pagelen=")) != NULL) {
/* number of characters in "pagelen=" */
cp += 8;
pagelen = atoi(cp);
diff --git a/src/LYUpload.c b/src/LYUpload.c
index 20cfd5a3..a83a1037 100644
--- a/src/LYUpload.c
+++ b/src/LYUpload.c
@@ -53,16 +53,16 @@ int LYUpload(char *line)
/*
* Use configured upload commands.
*/
- if ((directory = strstr(line, "TO=")) == NULL)
+ if ((directory = LYstrstr(line, "TO=")) == NULL)
goto failed;
*(directory - 1) = '\0';
- /* go past "Directory=" */
+ /* go past "TO=" */
directory += 3;
- if ((method = strstr(line, "UPLOAD=")) == NULL)
+ if ((method = LYstrstr(line, "UPLOAD=")) == NULL)
goto failed;
/*
- * Go past "Method=".
+ * Go past "UPLOAD=".
*/
method += 7;
method_number = atoi(method);

View File

@ -3,7 +3,7 @@
Summary: A text-based Web browser Summary: A text-based Web browser
Name: lynx Name: lynx
Version: 2.8.9 Version: 2.8.9
Release: 19%{?dist} Release: 20%{?dist}
License: GPLv2 License: GPLv2
Source: https://invisible-mirror.net/archives/lynx/tarballs/lynx%{version}rel.%{devrel}.tar.bz2 Source: https://invisible-mirror.net/archives/lynx/tarballs/lynx%{version}rel.%{devrel}.tar.bz2
URL: http://lynx.browser.org/ URL: http://lynx.browser.org/
@ -32,6 +32,10 @@ Patch5: lynx-2.8.9-CVE-2021-38165.patch
# backport IDN2 support from upstream (#2040124) # backport IDN2 support from upstream (#2040124)
Patch6: lynx-2.8.9-idn2-backport.patch Patch6: lynx-2.8.9-idn2-backport.patch
# backport fix for page downloading from upstream (RHEL-16809)
# upstream commit: https://github.com/ThomasDickey/lynx-snapshots/commit/6c764e123c86ccce03d4ffaee11085b9badd6765
Patch7: lynx-2.8.9-fix-page-download.patch
Provides: webclient Provides: webclient
Provides: text-www-browser Provides: text-www-browser
BuildRequires: autoconf BuildRequires: autoconf
@ -67,8 +71,9 @@ exits quickly and swiftly displays web pages.
%patch3 -p1 %patch3 -p1
%patch4 -p1 %patch4 -p1
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1
autoconf autoconf
%{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}} %{!?_pkgdocdir: %global _pkgdocdir %{_docdir}/%{name}-%{version}}
@ -147,6 +152,9 @@ EOF
%config(noreplace,missingok) %{_sysconfdir}/lynx-site.cfg %config(noreplace,missingok) %{_sysconfdir}/lynx-site.cfg
%changelog %changelog
* Tue Nov 21 2023 Lukáš Zaoral <lzaoral@redhat.com> - 2.8.9-20
- fix page downloading (RHEL-16809)
* Mon Mar 21 2022 Kamil Dudka <kdudka@redhat.com> - 2.8.9-19 * Mon Mar 21 2022 Kamil Dudka <kdudka@redhat.com> - 2.8.9-19
- backport IDN2 support from upstream (#2040124) - backport IDN2 support from upstream (#2040124)