From 4ab7742daa048ca9df284814e36361a06028d1ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= Date: Tue, 29 Sep 2020 17:41:42 +0200 Subject: [PATCH] Temporarily revert a problematic upstream change --- ...ing-return-value-of-the-evdns_base_r.patch | 43 +++++++++++++++++++ libevent.spec | 11 ++++- 2 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch diff --git a/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch b/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch new file mode 100644 index 0000000..a9517fc --- /dev/null +++ b/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch @@ -0,0 +1,43 @@ +From 7905dba8cf136574b87c972cf1f91a8f95b9df8c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Ond=C5=99ej=20Lyson=C4=9Bk?= +Date: Tue, 29 Sep 2020 17:37:18 +0200 +Subject: [PATCH] Revert "Fix checking return value of the + evdns_base_resolv_conf_parse()" + +This reverts commit fc51bf2c5b686f623c9a2906ddad4042d5c3b39a. +--- + evdns.c | 2 +- + sample/dns-example.c | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/evdns.c b/evdns.c +index a5b31a3c..4aef28ec 100644 +--- a/evdns.c ++++ b/evdns.c +@@ -4035,7 +4035,7 @@ evdns_base_new(struct event_base *event_base, int flags) + #else + r = evdns_base_resolv_conf_parse(base, opts, "/etc/resolv.conf"); + #endif +- if (r) { ++ if (r == -1) { + evdns_base_free_and_unlock(base, 0); + return NULL; + } +diff --git a/sample/dns-example.c b/sample/dns-example.c +index 2d07c387..21a75de8 100644 +--- a/sample/dns-example.c ++++ b/sample/dns-example.c +@@ -225,8 +225,8 @@ main(int c, char **v) { + res = evdns_base_resolv_conf_parse(evdns_base, + DNS_OPTION_NAMESERVERS, o.resolv_conf); + +- if (res) { +- fprintf(stderr, "Couldn't configure nameservers\n"); ++ if (res < 0) { ++ fprintf(stderr, "Couldn't configure nameservers"); + return 1; + } + } +-- +2.25.4 + diff --git a/libevent.spec b/libevent.spec index 79e3249..540d5f4 100644 --- a/libevent.spec +++ b/libevent.spec @@ -2,7 +2,7 @@ Name: libevent Version: 2.1.12 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Abstract asynchronous event notification library # arc4random.c, which is used in build, is ISC. The rest is BSD. @@ -25,6 +25,11 @@ Patch01: libevent-nonettests.patch Patch02: 0001-build-do-not-try-install-doxygen-man-pages-if-they-w.patch # Upstream patch: Patch03: 0001-build-add-doxygen-to-all.patch +# Temporary downstream change: revert a problematic upstream change +# until Transmission is fixed. Please drop the patch when the Transmission +# issue is fixed. +# https://github.com/transmission/transmission/issues/1437 +Patch04: 0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch %description The libevent API provides a mechanism to execute a callback function @@ -58,6 +63,7 @@ This package contains the development documentation for %{name}. %patch01 -p1 -b .nonettests %patch02 -p1 -b .fix-install %patch03 -p1 -b .fix-install-2 +%patch04 -p1 -b .revert-problematic-change pathfix.py -i %{__python3} -pn test/check-dumpevents.py \ event_rpcgen.py @@ -141,6 +147,9 @@ mkdir -p $RPM_BUILD_ROOT/%{develdocdir}/sample %doc %{develdocdir}/ %changelog +* Tue Sep 29 2020 Ondřej Lysoněk - 2.1.12-2 +- Temporarily revert a problematic upstream change + * Mon Sep 14 2020 Ondřej Lysoněk - 2.1.12-1 - new version - Resolves: rhbz#1713942