SHA256
1
0
forked from pool/c-ares

Accepting request 1145395 from devel:libraries:c_c++

- Ensure multibuild flavors result in different src names.

- c-ares 1.26.0:
  * Event Thread support. Integrators are no longer required to
    monitor the file descriptors registered by c-ares for events
    and call ares_process() when enabling the event thread feature
    via ARES_OPT_EVENT_THREAD passed to ares_init_options().
  * Added flags to are_dns_parse() to force RAW packet parsing
  * Mark ares_fds() as deprecated
  * Bug fixes
- move tests into a build flavor to avoid gtest/gmock build loop

- Update to version 1.25
Changes:
 o Rewrite ares_strsplit() as a wrapper for ares__buf_split() for memory
   safety reasons.
 o The ahost utility now uses ares_getaddrinfo() and returns both IPv4 and
   IPv6 addresses by default.
Bug Fixes:
 o Tests: Live reverse lookups for Google's public DNS servers no longer
   return results, replace with CloudFlare pubic DNS servers.
 o Connection failures should increment the server failure count first or a
   retry might be enqueued to the same server
 o On systems that don't implement the ability to enumerate network interfaces
   the stubs used the wrong prototype.
 o Fix minor warnings and documentation typos
 o Fix support for older GoogleTest versions
 o getrandom() may require sys/random.h on some systems.
 o Fix building tests with symbol hiding enabled.
- 0001-Use-RPM-compiler-options.patch: dropped, obsolete

OBS-URL: https://build.opensuse.org/request/show/1145395
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/c-ares?expand=0&rev=20
This commit is contained in:
Ana Guerrero 2024-02-09 22:51:58 +00:00 committed by Git OBS Bridge
commit 5cef7a7fed
9 changed files with 179 additions and 88 deletions

View File

@ -1,41 +0,0 @@
From 7dada62a77e061c752123e672e844386ff3b01ea Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <sgallagh@redhat.com>
Date: Wed, 10 Apr 2013 12:32:44 -0400
Subject: [PATCH] Use RPM compiler options
---
m4/cares-compilers.m4 | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/m4/cares-compilers.m4 b/m4/cares-compilers.m4
index 7ee8e0dbe741c1a64149a0d20b826f507b3ec620..d7708230fb5628ae80fbf1052da0d2c78ebbc160 100644
--- a/m4/cares-compilers.m4
+++ b/m4/cares-compilers.m4
@@ -143,19 +143,12 @@ AC_DEFUN([CARES_CHECK_COMPILER_GNU_C], [
gccvhi=`echo $gccver | cut -d . -f1`
gccvlo=`echo $gccver | cut -d . -f2`
compiler_num=`(expr $gccvhi "*" 100 + $gccvlo) 2>/dev/null`
- flags_dbg_all="-g -g0 -g1 -g2 -g3"
- flags_dbg_all="$flags_dbg_all -ggdb"
- flags_dbg_all="$flags_dbg_all -gstabs"
- flags_dbg_all="$flags_dbg_all -gstabs+"
- flags_dbg_all="$flags_dbg_all -gcoff"
- flags_dbg_all="$flags_dbg_all -gxcoff"
- flags_dbg_all="$flags_dbg_all -gdwarf-2"
- flags_dbg_all="$flags_dbg_all -gvms"
- flags_dbg_yes="-g"
- flags_dbg_off="-g0"
- flags_opt_all="-O -O0 -O1 -O2 -O3 -Os"
- flags_opt_yes="-O2"
- flags_opt_off="-O0"
+ flags_dbg_all=""
+ flags_dbg_yes=""
+ flags_dbg_off=""
+ flags_opt_all=""
+ flags_opt_yes=""
+ flags_opt_off=""
CURL_CHECK_DEF([_WIN32], [], [silent])
else
AC_MSG_RESULT([no])
--
1.8.1.4

3
_multibuild Normal file
View File

@ -0,0 +1,3 @@
<multibuild>
<flavor>testsuite</flavor>
</multibuild>

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:de24a314844cb157909730828560628704f4f896d167dd7da0fa2fb93ea18b10
size 1599175

View File

@ -1,11 +0,0 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAmUjHhkACgkQXMkI/bce
EsIQxwf/VjQpVZwt18Lux5nt7g7MvMVCJLPmSK7I7PFdV+5RtHxtC9od/kef6qb/
TCCcA2wL4CXu1rQFo2kcBRIk5Irs5vgZoUuKsDuTUzz69dntBjGTVONDgUhR//UQ
siJS6qtKOhMqxzXhuuTDEXd5VFyx/w7E4SbJDwZJL50BvMo0YGZ58t3wXb4PfPxs
En4QCS/+TtNOlS4ZqAhT5Da/ReeD1eLUhPMZRIkriuR0ggUP8nhEft12DFMQH9dQ
1/BiupilP0R0u6Am3BIUOaDweIxVA6d8/hc5hpiXel3zNcaQqGZQHHk6bOiJqOcp
be+3+9VBEoyF5KTT4pBP7a4Kxvxvbw==
=23cF
-----END PGP SIGNATURE-----

3
c-ares-1.26.0.tar.gz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bed58c4f02b009080ebda6c2467ba469722ac6aebbf4497dc44a83d8c6194e50
size 1298394

11
c-ares-1.26.0.tar.gz.asc Normal file
View File

@ -0,0 +1,11 @@
-----BEGIN PGP SIGNATURE-----
iQEzBAABCgAdFiEEJ+3q8i86vOtQ25oSXMkI/bceEsIFAmWz2vAACgkQXMkI/bce
EsIrrAgAtMIrhaPGkLiy74s3dITsCyExcgl3BjISFPDM9ghTfMqNH4oB0CW38uaS
EcoE/l8GSLnnXwwISx4R8173RMwvCY1ADpHwYY7qlx1IX8M+M9OAgMUf9YAJo2Ui
y2tIi77Hk6QELH0K+4D3uTqZ1de6cCTkNrVS7s80YayujD0xbInXwjEz6s5yVquM
zb4P6wRZb+mzHCmp2w+dmajs5ePam8RhuqLzsr+7aj2GJE7mqpfA9dOdLYheYXXZ
KcCmunHA6tDAZAdRpRiqfLxl9OK3p6j8DnwU/uQ7l1u67rk7erbhgilOFuvXYDsh
hldY+esR0Ps0fDijLoi0AwDhre9O1A==
=yPrc
-----END PGP SIGNATURE-----

View File

@ -1,3 +1,131 @@
-------------------------------------------------------------------
Fri Feb 9 07:35:39 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Ensure multibuild flavors result in different src names.
-------------------------------------------------------------------
Sat Feb 3 09:40:16 UTC 2024 - Andreas Stieger <andreas.stieger@gmx.de>
- c-ares 1.26.0:
* Event Thread support. Integrators are no longer required to
monitor the file descriptors registered by c-ares for events
and call ares_process() when enabling the event thread feature
via ARES_OPT_EVENT_THREAD passed to ares_init_options().
* Added flags to are_dns_parse() to force RAW packet parsing
* Mark ares_fds() as deprecated
* Bug fixes
- move tests into a build flavor to avoid gtest/gmock build loop
-------------------------------------------------------------------
Mon Jan 8 10:16:54 UTC 2024 - Adam Majer <adam.majer@suse.de> - 1.25
- Update to version 1.25
Changes:
o Rewrite ares_strsplit() as a wrapper for ares__buf_split() for memory
safety reasons.
o The ahost utility now uses ares_getaddrinfo() and returns both IPv4 and
IPv6 addresses by default.
Bug Fixes:
o Tests: Live reverse lookups for Google's public DNS servers no longer
return results, replace with CloudFlare pubic DNS servers.
o Connection failures should increment the server failure count first or a
retry might be enqueued to the same server
o On systems that don't implement the ability to enumerate network interfaces
the stubs used the wrong prototype.
o Fix minor warnings and documentation typos
o Fix support for older GoogleTest versions
o getrandom() may require sys/random.h on some systems.
o Fix building tests with symbol hiding enabled.
- 0001-Use-RPM-compiler-options.patch: dropped, obsolete
-------------------------------------------------------------------
Tue Jan 2 11:35:57 UTC 2024 - Adam Majer <adam.majer@suse.de> - 1.24
- Update to version 1.24
Features:
* Add support for IPv6 link-local DNS servers. Nameserver formats
can now accept the 0face suffix, and a new ares_get_servers_csv()
function was added to return servers that can contain the link-local
interface name.
Changes:
* Unbundle GoogleTest for test cases. Package maintainers will now
need torequire GoogleTest (GMock) as a build dependency if
building tests. New GoogleTest versions require C++14 or later.
* Replace nameserver parsing code to use new memory-safe functions.
* Replace the sortlist parser with new memory-safe functions.
* Various warning fixes and dead code removal.
Bugfixes:
* Old Linux versions require POSIX_C_SOURCE or _GNU_SOURCE to
compile with thread safety support
* A non-responsive DNS server that caused timeouts wouldn't
increment thefailure count, this would lead to other servers
not being tried. Regression introduced in 1.22.0
* Some projects that depend on c-ares expect invalid parameter
option valuespassed into ares_init_options() to simply be
ignored. This behavior has been restored
* getrandom() can fail if the kernel doesn't support
the syscall, fall back to another random source
* ares_cancel() when performing ares_gethostbyname() or
ares_getaddrinfo()with AF_UNSPEC, if called after one address
class was returned but before the other address class, it
would return ARES_SUCCESS rather than ARES_ECANCELLED
- disable-live-tests.patch: dropped, not needed
-------------------------------------------------------------------
Fri Dec 1 13:04:38 UTC 2023 - Adam Majer <adam.majer@suse.de> - 1.23
- Update to version 1.23
Features:
Introduce optional (but on by default) thread-safety for the c-ares library. This has no API nor ABI implications.
resolv.conf in modern systems uses attempts and timeouts options instead of the old retrans and retry options.
Query caching support based on TTL of responses. Can be enabled via ares_init_options() with ARES_OPT_QUERY_CACHE.
Bugfixes:
ares_init_options() for ARES_OPT_UDP_PORT and ARES_OPT_TCP_PORT accept theport in host byte order, but it was reading it as network byte order. Regression introduced in 1.20.0.
ares_init_options() for ARES_FLAG_NOSEARCH was not being honored forares_getaddrinfo() or ares_gethostbyname(). Regression introduced in 1.16.0.
Autotools MacOS and iOS version check was failing
Environment variables passed to c-ares are meant to be an override for system configuration. Regression introduced in 1.22.0.
Spelling fixes as detected by codespell.
The timeout returned by ares_timeout() was truncated to milliseconds butvalidated to microseconds which could cause a user to attempt to process timeouts prior to the timeout actually expiring.
CMake was not honoring CXXFLAGS passed in via the environment which couldcause compile and link errors with distribution hardening flags during packaging.
Fix Windows UWP and Cygwin compilation.
ares_set_servers_*() for legacy reasons needs to accept an empty server listand zero out all servers. This results in an inoperable channel and thus is only used in simulation testing, but we don't want to break users. Regression introduced in 1.21.0.
Changes in version 1.22.1
Bugfixes:
Fix /etc/hosts processing performance with all entries using same IPaddress. Large hosts files using the same IP address for all entries could use exponential time.
Fix typos in manpages
Fix OpenWatcom building
Changes in version 1.22.0
Features:
ares_reinit() is now implemented to re-read any system configuration and immediately apply to an existing ares channel
The adig command line program has been rewritten and its format now more closely matches that of BIND's dig utility
The new DNS message parser and writer functions have now been made public
RFC9460 HTTPS and SVCB records are now supported
RFC6698 TLSA records are now supported
The server list is now internally dynamic and can be changed without impacting existing queries
Hosts file processing is now cached until the file is detected to be changed to speed up repetitive lookups of large hosts files
Changes:
Internally all DNS messages are now written using the new DNS writing functions
EDNS is now enabled by default
Internal cleanups in function prototypes
Bugfixes:
Randomize retry penalties to prevent thundering herd issues when dns servers throttle requests
Fix Windows build error for missing if_indextoname()
-------------------------------------------------------------------
Sat Oct 28 16:45:26 UTC 2023 - Andreas Stieger <andreas.stieger@gmx.de>
- update to 1.21.0:
* Replace multiple DNS hand-made parsers with new memory-safe DNS
message parser
* developer visible changes and bug fixes
-------------------------------------------------------------------
Tue Oct 10 09:31:38 UTC 2023 - Adam Majer <adam.majer@suse.de> - 1.20.1

View File

@ -1,7 +1,8 @@
#
# spec file for package c-ares
# spec file
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2024 Andreas Stieger <Andreas.Stieger@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -18,11 +19,14 @@
%define sonum 2
%define libname libcares%{sonum}
%if 0%{!?cmake_build:1}
%define cmake_build make -O VERBOSE=1 %{?_smp_mflags}
%define pkg_suffix %nil
%if "@BUILD_FLAVOR@"%nil == "testsuite"%nil
%define pkg_suffix -testsuite
%endif
Name: c-ares
Version: 1.20.1
Name: c-ares%pkg_suffix
Version: 1.26.0
Release: 0
Summary: Library for asynchronous name resolves
License: MIT
@ -31,19 +35,22 @@ Source0: https://c-ares.org/download/c-ares-%{version}.tar.gz
Source1: https://c-ares.org/download/c-ares-%{version}.tar.gz.asc
Source3: c-ares.keyring
Source4: baselibs.conf
Patch0: 0001-Use-RPM-compiler-options.patch
Patch1: disable-live-tests.patch
BuildRequires: c++_compiler
BuildRequires: cmake
BuildRequires: gcc-c++
# Needed for getservbyport_r function to work properly.
BuildRequires: netcfg
BuildRequires: pkgconfig
%if ("@BUILD_FLAVOR@" == "testsuite")
BuildRequires: gmock
BuildRequires: gtest
%endif
%description
c-ares is a C library that performs DNS requests and name resolves
asynchronously. c-ares is a fork of the library named 'ares', written
by Greg Hudson at MIT.
%if ("@BUILD_FLAVOR@" != "testsuite")
%package utils
Summary: Tools for asynchronous name resolves
@ -81,31 +88,36 @@ by Greg Hudson at MIT.
This package provides the development libraries and headers needed
to build packages that depend on c-ares.
%endif
%prep
%autosetup -p1 -n c-ares-%{version}
%build
%cmake \
%if 0%{?suse_version} >= 1500
-DCARES_BUILD_TESTS:BOOL=ON \
%if ("@BUILD_FLAVOR@" == "testsuite")
-DCARES_BUILD_TESTS:BOOL=ON \
%endif
%nil
%{nil}
%cmake_build
%install
%if ("@BUILD_FLAVOR@" != "testsuite")
%cmake_install
%check
%if 0%{?suse_version} >= 1500
pushd build
%cmake_build -C test
LD_LIBRARY_PATH=.%_libdir:./%_lib ./bin/arestest
%endif
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%if ("@BUILD_FLAVOR@" != "testsuite")
%ldconfig_scriptlets -n %{libname}
%endif
%check
%if ("@BUILD_FLAVOR@" == "testsuite")
pushd build
%cmake_build -C test
LD_LIBRARY_PATH=.%{_libdir}:./%{_lib} ./bin/arestest --gtest_filter=-*.Live*
%endif
%if ("@BUILD_FLAVOR@" != "testsuite")
%files utils
%license LICENSE.md
%{_bindir}/adig
@ -124,5 +136,6 @@ LD_LIBRARY_PATH=.%_libdir:./%_lib ./bin/arestest
%{_mandir}/man3/ares_*.3%{?ext_man}
%{_libdir}/pkgconfig/libcares.pc
%{_libdir}/cmake/c-ares/
%endif
%changelog

View File

@ -1,12 +0,0 @@
Index: c-ares-1.18.1/test/Makefile.inc
===================================================================
--- c-ares-1.18.1.orig/test/Makefile.inc
+++ c-ares-1.18.1/test/Makefile.inc
@@ -16,7 +16,6 @@ TESTSOURCES = ares-test-main.cc \
ares-test-parse-txt.cc \
ares-test-parse-uri.cc \
ares-test-misc.cc \
- ares-test-live.cc \
ares-test-mock.cc \
ares-test-mock-ai.cc \
ares-test-internal.cc \