From 1c3ff2984857fc6972bb85cd29612ccd49bfcf06 Mon Sep 17 00:00:00 2001 From: Neal Gompa Date: Sun, 14 Jan 2024 11:32:51 -0500 Subject: [PATCH] Backport fix for wget to stdin Resolves: rhbz#2257700 --- ...it-Redirect-INFO-logs-to-stderr-with.patch | 25 +++++++++++++++++++ wget2.spec | 10 +++++++- 2 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 0001-src-log.c-log_init-Redirect-INFO-logs-to-stderr-with.patch diff --git a/0001-src-log.c-log_init-Redirect-INFO-logs-to-stderr-with.patch b/0001-src-log.c-log_init-Redirect-INFO-logs-to-stderr-with.patch new file mode 100644 index 0000000..c34f426 --- /dev/null +++ b/0001-src-log.c-log_init-Redirect-INFO-logs-to-stderr-with.patch @@ -0,0 +1,25 @@ +From 7da90c7ea755fffbfbe9006d29524c7c8a86a925 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Tim=20R=C3=BChsen?= +Date: Sun, 14 Jan 2024 16:43:15 +0100 +Subject: [PATCH] * src/log.c (log_init): Redirect INFO logs to stderr with -O- + +--- + src/log.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/log.c b/src/log.c +index 8b6796e9..61adde4b 100644 +--- a/src/log.c ++++ b/src/log.c +@@ -226,7 +226,7 @@ void log_init(void) + + // set info logging + wget_logger_set_func(wget_get_logger(WGET_LOGGER_INFO), +- config.verbose && !config.quiet ? (fileno(stdout) == fileno(stderr) ? write_info_stderr : write_info_stdout) : NULL); ++ config.verbose && !config.quiet ? ((fileno(stdout) == fileno(stderr) || !wget_strcmp(config.output_document, "-")) ? write_info_stderr : write_info_stdout) : NULL); + // wget_logger_set_stream(wget_get_logger(WGET_LOGGER_INFO), config.verbose && !config.quiet ? stdout : NULL); + #endif + } +-- +2.43.0 + diff --git a/wget2.spec b/wget2.spec index 004afd6..0210828 100644 --- a/wget2.spec +++ b/wget2.spec @@ -8,7 +8,7 @@ Name: wget2 Version: 2.1.0 -Release: 5%{?dist} +Release: 6%{?dist} Summary: An advanced file and recursive website downloader # Documentation is GFDL @@ -19,6 +19,10 @@ Source1: https://ftp.gnu.org/gnu/wget/%{name}-%{version}.tar.gz.sig # key 08302DB6A2670428 Source2: tim.ruehsen-keyring.asc +# Backports from upstream +## Fix behavior for downloading to stdin (rhbz#2257700, gl#gnuwget/wget2#651) +Patch0001: 0001-src-log.c-log_init-Redirect-INFO-logs-to-stderr-with.patch + # Buildsystem build requirements BuildRequires: autoconf BuildRequires: automake @@ -180,6 +184,10 @@ echo ".so man1/%{name}.1" > %{buildroot}%{_mandir}/man1/wget.1 %changelog +* Sun Jan 14 2024 Neal Gompa - 2.1.0-6 +- Backport fix for wget to stdin + Resolves: rhbz#2257700 + * Thu Jan 04 2024 Yaakov Selkowitz - 2.1.0-5 - Drop unused autogen build dependency