diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1814416 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/libevent-2.1.12-stable.tar.gz diff --git a/.libevent.metadata b/.libevent.metadata new file mode 100644 index 0000000..4016b3b --- /dev/null +++ b/.libevent.metadata @@ -0,0 +1 @@ +cd55656a9b5bed630b08f05495230affb7996b21 SOURCES/libevent-2.1.12-stable.tar.gz diff --git a/SOURCES/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch b/SOURCES/0001-Revert-Fix-checking-return-value-of-the-evdns_base_r.patch new file mode 100644 index 0000000..a9517fc --- /dev/null +++ b/SOURCES/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/SOURCES/0001-build-add-doxygen-to-all.patch b/SOURCES/0001-build-add-doxygen-to-all.patch new file mode 100644 index 0000000..46b7285 --- /dev/null +++ b/SOURCES/0001-build-add-doxygen-to-all.patch @@ -0,0 +1,26 @@ +From e3e7bb212ea17aa8a9d5a30163487342e6ebb350 Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin +Date: Tue, 11 Aug 2020 02:12:23 +0300 +Subject: [PATCH] build: add doxygen to all + +Fixes: 7e6c5fb4 ("build: do not try install doxygen man pages if they were not requested") +Fixes: #1075 +Fixes: #886 +--- + doxygen.am | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/doxygen.am b/doxygen.am +index 53da8d24..1377aacd 100644 +--- a/doxygen.am ++++ b/doxygen.am +@@ -53,5 +53,6 @@ uninstall-local: + rmdir "$(DESTDIR)$(htmldir)/" || true + + doxygen: doxygen-doc ++all: doxygen + + endif ENABLE_DOXYGEN +-- +2.25.4 + diff --git a/SOURCES/0001-build-do-not-try-install-doxygen-man-pages-if-they-w.patch b/SOURCES/0001-build-do-not-try-install-doxygen-man-pages-if-they-w.patch new file mode 100644 index 0000000..602899d --- /dev/null +++ b/SOURCES/0001-build-do-not-try-install-doxygen-man-pages-if-they-w.patch @@ -0,0 +1,43 @@ +From 7e6c5fb46ae9d0f135cdcdb4f8d0376cf25320fd Mon Sep 17 00:00:00 2001 +From: Azat Khuzhin +Date: Thu, 6 Aug 2020 10:24:55 +0300 +Subject: [PATCH] build: do not try install doxygen man pages if they were not + requested + +Fixes: #1075 +--- + doxygen.am | 2 ++ + m4/ax_prog_doxygen.m4 | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/doxygen.am b/doxygen.am +index 916d7c40..53da8d24 100644 +--- a/doxygen.am ++++ b/doxygen.am +@@ -17,9 +17,11 @@ if ENABLE_DOXYGEN + clean-local: + -rm -rf $(DX_CLEANFILES) + ++if ENABLE_DOXYGEN_MAN + # integrate doxygen with automake targets + man3_MANS = @DX_DOCDIR@/man/man3/* + $(man3_MANS): doxygen-doc ++endif ENABLE_DOXYGEN_MAN + + # Docs will be installed. It may be one or more docs supported + # by doxygen, but does not include 'man'. +diff --git a/m4/ax_prog_doxygen.m4 b/m4/ax_prog_doxygen.m4 +index e5bdeb59..338e4646 100644 +--- a/m4/ax_prog_doxygen.m4 ++++ b/m4/ax_prog_doxygen.m4 +@@ -574,6 +574,7 @@ DX_INSTALL_DOCS = \\ + \$(DX_CLEAN_HTML) \\ + \$(DX_CLEAN_CHM) \\ + \$(DX_CLEAN_CHI) \\ ++ \$(DX_CLEAN_MAN) \\ + \$(DX_CLEAN_RTF) \\ + \$(DX_CLEAN_XML) \\ + \$(DX_CLEAN_PS) \\ +-- +2.25.4 + diff --git a/SOURCES/libevent-nonettests.patch b/SOURCES/libevent-nonettests.patch new file mode 100644 index 0000000..f62df5b --- /dev/null +++ b/SOURCES/libevent-nonettests.patch @@ -0,0 +1,11 @@ +diff -up libevent-2.0.21-stable/test/regress_main.c.orig libevent-2.0.21-stable/test/regress_main.c +--- libevent-2.0.21-stable/test/regress_main.c.orig 2012-11-02 11:57:00.000000000 -0400 ++++ libevent-2.0.21-stable/test/regress_main.c 2013-08-21 10:16:26.714288000 -0400 +@@ -370,7 +370,6 @@ struct testgroup_t testgroups[] = { + { "util/", util_testcases }, + { "bufferevent/", bufferevent_testcases }, + { "http/", http_testcases }, +- { "dns/", dns_testcases }, + { "evtag/", evtag_testcases }, + { "rpc/", rpc_testcases }, + { "thread/", thread_testcases }, diff --git a/SPECS/libevent.spec b/SPECS/libevent.spec new file mode 100644 index 0000000..fd6810c --- /dev/null +++ b/SPECS/libevent.spec @@ -0,0 +1,373 @@ +%global develdocdir %{_docdir}/%{name}-devel + +Name: libevent +Version: 2.1.12 +Release: 6%{?dist} +Summary: Abstract asynchronous event notification library + +# arc4random.c, which is used in build, is ISC. The rest is BSD. +License: BSD and ISC +URL: http://libevent.org/ +Source0: https://github.com/libevent/libevent/releases/download/release-%{version}-stable/libevent-%{version}-stable.tar.gz + +BuildRequires: make +BuildRequires: gcc +# Needed for ./autogen.sh: +BuildRequires: automake libtool +%if ! 0%{?_module_build} +BuildRequires: doxygen +%endif +BuildRequires: openssl-devel +BuildRequires: python3-devel + +# Disable network tests +Patch01: libevent-nonettests.patch +# Upstream 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 +when a specific event occurs on a file descriptor or after a timeout +has been reached. libevent is meant to replace the asynchronous event +loop found in event driven network servers. An application just needs +to call event_dispatch() and can then add or remove events dynamically +without having to change the event loop. + +%package devel +Summary: Development files for %{name} +License: BSD +Requires: %{name}%{?_isa} = %{version}-%{release} + +%description devel +This package contains the header files and libraries for developing +with %{name}. + +%package doc +Summary: Development documentation for %{name} +# The files sample/openssl_hostname_validation.{c,h} and sample/hostcheck.{c,h} +# are MIT. The rest is BSD. +License: BSD and MIT +BuildArch: noarch + +%description doc +This package contains the development documentation for %{name}. + +%prep +%setup -q -n libevent-%{version}-stable +%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 + +%build +# We're patching doxygen.am, so regenerate the autotools stuff to be +# safe +./autogen.sh +%configure \ +%if ! 0%{?_module_build} + --enable-doxygen-doc \ +%endif + --disable-dependency-tracking --disable-static +%make_build all + +%install +%make_install +rm -f $RPM_BUILD_ROOT%{_libdir}/*.la + +# Maintain the Fedora-specific location of libevent documentation, at +# least for now +mv $RPM_BUILD_ROOT/%{_docdir}/%{name} $RPM_BUILD_ROOT/%{develdocdir} + +# Fix multilib install of devel (bug #477685) +mv $RPM_BUILD_ROOT%{_includedir}/event2/event-config.h \ + $RPM_BUILD_ROOT%{_includedir}/event2/event-config-%{__isa_bits}.h +cat > $RPM_BUILD_ROOT%{_includedir}/event2/event-config.h << EOF +#include + +#if __WORDSIZE == 32 +#include +#elif __WORDSIZE == 64 +#include +#else +#error "Unknown word size" +#endif +EOF + +mkdir -p $RPM_BUILD_ROOT/%{develdocdir}/sample +(cd sample; \ + install -p -m 644 *.c *.am $RPM_BUILD_ROOT/%{develdocdir}/sample) + +%check +# Tests fail due to nameserver not running locally +# [msg] Nameserver 127.0.0.1:38762 has failed: request timed out. +# On some architects this error is ignored on others it is not. +#make check + +%ldconfig_scriptlets + +%files +%license LICENSE +%doc ChangeLog +%{_libdir}/libevent-2.1.so.* +%{_libdir}/libevent_core-2.1.so.* +%{_libdir}/libevent_extra-2.1.so.* +%{_libdir}/libevent_openssl-2.1.so.* +%{_libdir}/libevent_pthreads-2.1.so.* + +%files devel +%{_includedir}/event.h +%{_includedir}/evdns.h +%{_includedir}/evhttp.h +%{_includedir}/evrpc.h +%{_includedir}/evutil.h +%dir %{_includedir}/event2 +%{_includedir}/event2/*.h +%{_libdir}/libevent.so +%{_libdir}/libevent_core.so +%{_libdir}/libevent_extra.so +%{_libdir}/libevent_openssl.so +%{_libdir}/libevent_pthreads.so +%{_libdir}/pkgconfig/libevent.pc +%{_libdir}/pkgconfig/libevent_core.pc +%{_libdir}/pkgconfig/libevent_extra.pc +%{_libdir}/pkgconfig/libevent_openssl.pc +%{_libdir}/pkgconfig/libevent_pthreads.pc +%{_bindir}/event_rpcgen.* + +%files doc +%doc %{develdocdir}/ + +%changelog +* Mon Aug 09 2021 Mohan Boddu - 2.1.12-6 +- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags + Related: rhbz#1991688 + +* Wed Jun 16 2021 Mohan Boddu - 2.1.12-5 +- Rebuilt for RHEL 9 BETA for openssl 3.0 + Related: rhbz#1971065 + +* Fri Apr 16 2021 Mohan Boddu - 2.1.12-4 +- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937 + +* Tue Jan 26 2021 Fedora Release Engineering - 2.1.12-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* 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 + +* Tue Jul 28 2020 Fedora Release Engineering - 2.1.8-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Mon Jul 13 2020 Tom Stellard - 2.1.8-9 +- Use make macros +- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro + +* Wed Jan 29 2020 Fedora Release Engineering - 2.1.8-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Thu Aug 15 2019 Ondřej Lysoněk - 2.1.8-7 +- Port python scripts to Python 3 +- Resolves: rhbz#1738022 +- Resolves: rhbz#1655232 + +* Thu Jul 25 2019 Fedora Release Engineering - 2.1.8-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Fri Feb 01 2019 Fedora Release Engineering - 2.1.8-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Mon Sep 03 2018 Ondřej Lysoněk - 2.1.8-4 +- Corrected the License tag +- Resolves: rhbz#1624851 + +* Fri Jul 13 2018 Fedora Release Engineering - 2.1.8-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 15 2018 Steve Dickson - 2.1.8-2 +- Explicitly express SONAME in the %%file section + +* Thu Feb 15 2018 Igor Gnatenko - 2.1.8-1 +- Fix ownership of pkg-config files +- Remove unneeded Group tag + +* Wed Feb 14 2018 Steve Dickson - 2.1.8-0 +- Updated to the latest upstream release 2.1.8 (bz 1418488) + +* Wed Feb 07 2018 Fedora Release Engineering - 2.0.22-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Sat Feb 03 2018 Igor Gnatenko - 2.0.22-7 +- Switch to %%ldconfig_scriptlets + +* Thu Aug 03 2017 Fedora Release Engineering - 2.0.22-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0.22-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Apr 12 2017 Nils Philippsen - 2.0.22-4 +- don't build doxygen documentation during modular build + +* Mon Mar 27 2017 Tomáš Mráz - 2.0.22-3 +- Make it build with OpenSSL-1.1.0, cherry-picked from upstream git + +* Fri Feb 10 2017 Fedora Release Engineering - 2.0.22-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Fri Jun 24 2016 Orion Poplawski - 2.0.22-1 +- Update to 2.0.22 +- Spec cleanup, new URL +- Support multilib devel (bug #477685) + +* Thu Feb 04 2016 Fedora Release Engineering - 2.0.21-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Jun 17 2015 Fedora Release Engineering - 2.0.21-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Sun Aug 17 2014 Fedora Release Engineering - 2.0.21-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Sat Jun 07 2014 Fedora Release Engineering - 2.0.21-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Sat Dec 21 2013 Michael Schwendt - 2.0.21-4 +- Fix -doc package for F20 UnversionedDocDirs (#993956) +- Add missing directory /usr/include/event2 +- Fix directory ownership in -doc package +- Correct summary and description of -devel and -doc packages +- Set -doc package Group tag to "Documentation" +- Add %%?_isa to -devel package base dependency +- Remove %%defattr + +* Wed Aug 21 2013 Steve Dickson 2.0.21-3 +- Removed rpmlint warnings + +* Sat Aug 03 2013 Fedora Release Engineering - 2.0.21-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild + +* Thu May 2 2013 Orion Poplawski - 2.0.21-1 +- Update to 2.0.21 +- Add %%check + +* Thu Feb 14 2013 Fedora Release Engineering - 2.0.18-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Thu Jul 19 2012 Fedora Release Engineering - 2.0.18-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Wed Apr 4 2012 Steve Dickson 2.0.18-1 +- Updated to latest stable upstream version: 2.0.18-stable +- Moved documentation into its own rpm (bz 810138) + +* Mon Mar 12 2012 Steve Dickson 2.0.17-1 +- Updated to latest stable upstream version: 2.0.17-stable + +* Fri Jan 13 2012 Fedora Release Engineering - 2.0.14-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Aug 10 2011 Steve Dickson 2.0.14-1 +- Updated to latest stable upstream version: 2.0.14-stable (bz 727129) +- Removed the installion of the outdate man pages and the latex raw docs. +- Corrected where the other doc are installed. + +* Wed Aug 10 2011 Steve Dickson 2.0.13-1 +- Updated to latest stable upstream version: 2.0.13-stable (bz 727129) + +* Tue Aug 2 2011 Steve Dickson 2.0.12-1 +- Updated to latest stable upstream version: 2.0.12-stable + +* Wed Feb 09 2011 Rahul Sundaram - 2.0.10-2 +- Fix build +- Update spec to match current guidelines +- drop no longer needed patch + +* Tue Feb 8 2011 Steve Dickson 2.0.10-1 +- Updated to latest stable upstream version: 2.0.10-stable + +* Mon Feb 07 2011 Fedora Release Engineering - 1.4.14b-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jun 22 2010 Steve Dickson 1.4.14b-1 +- Updated to latest stable upstream version: 1.4.14b + +* Fri May 21 2010 Tom "spot" Callaway 1.4.13-2 +- disable static libs (bz 556067) + +* Tue Dec 15 2009 Steve Dickson 1.4.13-1 +- Updated to latest stable upstream version: 1.4.13 + +* Tue Aug 18 2009 Steve Dickson 1.4.12-1 +- Updated to latest stable upstream version: 1.4.12 +- API documentation is now installed (bz 487977) +- libevent-devel multilib conflict (bz 477685) +- epoll backend allocates too much memory (bz 517918) + +* Fri Jul 24 2009 Fedora Release Engineering - 1.4.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Mon Apr 20 2009 Steve Dickson 1.4.10-1 +- Updated to latest stable upstream version: 1.4.10 + +* Wed Feb 25 2009 Fedora Release Engineering - 1.4.5-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Tue Jul 1 2008 Steve Dickson 1.4.5-1 +- Updated to latest stable upstream version 1.4.5-stable + +* Mon Jun 2 2008 Steve Dickson 1.4.4-1 +- Updated to latest stable upstream version 1.4.4-stable + +* Tue Feb 19 2008 Fedora Release Engineering - 1.3e-2 +- Autorebuild for GCC 4.3 + +* Tue Jan 22 2008 Steve Dickson 1.3e-1 +- Updated to latest stable upstream version 1.3e + +* Fri Mar 9 2007 Steve Dickson 1.3b-1 +- Updated to latest upstream version 1.3b +- Incorporated Merge Review comments (bz 226002) +- Increased the polling timeout (bz 204990) + +* Tue Feb 20 2007 Steve Dickson 1.2a-1 +- Updated to latest upstream version 1.2a + +* Wed Jul 12 2006 Jesse Keating +- rebuild + +* Fri Feb 10 2006 Jesse Keating - 1.1a-3.2 +- bump again for double-long bug on ppc(64) + +* Tue Feb 07 2006 Jesse Keating - 1.1a-3.1 +- rebuilt for new gcc4.1 snapshot and glibc changes + +* Tue Jan 24 2006 Warren Togami - 1.1a-3 +- rebuild (#177697) + +* Mon Jul 04 2005 Ralf Ertzinger - 1.1a-2 +- Removed unnecessary -r from rm + +* Fri Jun 17 2005 Ralf Ertzinger - 1.1a-1 +- Upstream update + +* Wed Jun 08 2005 Ralf Ertzinger - 1.1-2 +- Added some docs +- Moved "make verify" into %%check + +* Mon Jun 06 2005 Ralf Ertzinger - 1.1-1 +- Initial build for Fedora Extras, based on the package + by Dag Wieers