c-ares/c-ares.spec

142 lines
3.9 KiB
RPMSpec
Raw Normal View History

#
# spec file for package c-ares
#
- 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 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=57
2024-01-02 13:11:58 +01:00
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define sonum 2
%define libname libcares%{sonum}
%define pkg_suffix %nil
%if "@BUILD_FLAVOR@"%nil == "testsuite"%nil
%define pkg_suffix -testsuite
%endif
Name: c-ares%pkg_suffix
- c-ares 1.30.0 Features: * Basic support for SIG RR record (RFC 2931 / RFC 2535) [PR #773] Changes: * Validation that DNS strings can only consist of printable ascii characters otherwise will trigger a parse failure. [75de16c] and [40fb125] Bugfixes: * QueryCache: Fix issue where purging on server changes wasn't working. [a6c8fe6] - changes in 1.29.0 Features: * When using `ARES_OPT_EVENT_THREAD`, automatically reload system configuration when network conditions change. [PR #759] * Add observability into DNS server health via a server state callback, invoked whenever a query finishes. [PR #744] * Add server failover retry behavior, where failed servers are retried with small probability after a minimum delay. [PR #731] Changes: * Mark `ares_channel_t *` as const in more places in the public API. [PR #758] Bugfixes: * Due to a logic flaw dns name compression writing was not properly implemented which would result in the name prefix not being written for a partial match. This could cause issues in various record types such as MX records when using the deprecated API. Regression introduced in 1.28.0. [Issue #757] * Revert OpenBSD `SOCK_DNS` flag, it doesn't do what the docs say it does and causes c-ares to become non-functional. [PR #754] * `ares_getnameinfo()`: loosen validation on `salen` parameter. [Issue #752] * cmake: Android requires C99. [PR #748] * `ares_queue_wait_empty()` does not honor timeout_ms >= 0. [Issue #742] - updated dowload URLs to point to github - updated keyring to include Brad House DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=69
2024-06-10 14:06:32 +02:00
Version: 1.30.0
Release: 0
Summary: Library for asynchronous name resolves
License: MIT
URL: https://c-ares.org/
- c-ares 1.30.0 Features: * Basic support for SIG RR record (RFC 2931 / RFC 2535) [PR #773] Changes: * Validation that DNS strings can only consist of printable ascii characters otherwise will trigger a parse failure. [75de16c] and [40fb125] Bugfixes: * QueryCache: Fix issue where purging on server changes wasn't working. [a6c8fe6] - changes in 1.29.0 Features: * When using `ARES_OPT_EVENT_THREAD`, automatically reload system configuration when network conditions change. [PR #759] * Add observability into DNS server health via a server state callback, invoked whenever a query finishes. [PR #744] * Add server failover retry behavior, where failed servers are retried with small probability after a minimum delay. [PR #731] Changes: * Mark `ares_channel_t *` as const in more places in the public API. [PR #758] Bugfixes: * Due to a logic flaw dns name compression writing was not properly implemented which would result in the name prefix not being written for a partial match. This could cause issues in various record types such as MX records when using the deprecated API. Regression introduced in 1.28.0. [Issue #757] * Revert OpenBSD `SOCK_DNS` flag, it doesn't do what the docs say it does and causes c-ares to become non-functional. [PR #754] * `ares_getnameinfo()`: loosen validation on `salen` parameter. [Issue #752] * cmake: Android requires C99. [PR #748] * `ares_queue_wait_empty()` does not honor timeout_ms >= 0. [Issue #742] - updated dowload URLs to point to github - updated keyring to include Brad House DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=69
2024-06-10 14:06:32 +02:00
Source0: https://github.com/c-ares/c-ares/releases/download/v%{version}/c-ares-%{version}.tar.gz
Source1: https://github.com/c-ares/c-ares/releases/download/v%{version}/c-ares-%{version}.tar.gz.asc
Source3: c-ares.keyring
Source4: baselibs.conf
BuildRequires: c++_compiler
BuildRequires: cmake
# Needed for getservbyport_r function to work properly.
BuildRequires: netcfg
BuildRequires: pkgconfig
%if ("@BUILD_FLAVOR@" == "testsuite")
- 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 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=57
2024-01-02 13:11:58 +01:00
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
%description utils
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.
This package provides some tools that make use of c-ares.
%package -n %{libname}
Summary: Library for asynchronous name resolves
# Needed for getservbyport_r function to work properly.
Requires: netcfg
%description -n %{libname}
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.
This package provides the shared libraries for c-ares.
%package devel
Summary: Development files for c-ares
Requires: %{libname} = %{version}
Requires: glibc-devel
Provides: libcares-devel = %{version}
Obsoletes: libcares-devel < %{version}
%description devel
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.
This package provides the development libraries and headers needed
to build packages that depend on c-ares.
%endif
%prep
%autosetup -n c-ares-%{version}
%build
%cmake \
%if ("@BUILD_FLAVOR@" == "testsuite")
-DCARES_BUILD_TESTS:BOOL=ON \
%endif
%{nil}
%cmake_build
%install
%if ("@BUILD_FLAVOR@" != "testsuite")
%cmake_install
%endif
%if ("@BUILD_FLAVOR@" != "testsuite")
%ldconfig_scriptlets -n %{libname}
%endif
%check
%if ("@BUILD_FLAVOR@" == "testsuite")
pushd build
%cmake_build -C test
- 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 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=57
2024-01-02 13:11:58 +01:00
LD_LIBRARY_PATH=.%{_libdir}:./%{_lib} ./bin/arestest --gtest_filter=-*.Live*
%endif
%if ("@BUILD_FLAVOR@" != "testsuite")
%files utils
%license LICENSE.md
%{_bindir}/adig
%{_bindir}/ahost
Accepting request 819608 from home:elimat:branches:devel:libraries:c_c++ - Version update to 1.16.1 Security: * Prevent possible use-after-free and double-free in ares_getaddrinfo() if ares_destroy() is called prior to ares_getaddrinfo() completing. Reported by Jann Horn at Google Project Zero. Changes: * Allow TXT records on CHAOS qclass. Used for retriving things like version.bind, version.server, authoris.bind, hostname.bind, and id.server. [3] Bug fixes: * Fix Windows Unicode incompatibilities with ares_getaddrinfo() [1] * Silence false cast-align compiler warnings due to valid casts of struct sockaddr to struct sockaddr_in and struct sockaddr_in6. * MacOS should use libresolv for retrieving DNS servers, like iOS * CMake build system should populate the INCLUDE_DIRECTORIES property of installed targets [2] * Correct macros in use for the ares_getaddrinfo.3 man page - Changes in version 1.16.0 Changes: * Introduction of ares_getaddrinfo() API which provides similar output (including proper sorting as per RFC 6724) to the system native API, but utilizes different data structures in order to provide additional information such as TTLs and all aliases. Please reference the respective man pages for usage details. * Parse SOA records from ns_t_any response * CMake: Provide c-ares version in package export file * CMake: Add CPACK functionality for DEB and RPM * CMake: Generate PDB files during build * CMake: Support manpage installation Bug fixes: * Fix bad expectation in IPv6 localhost test. * AutoTools: use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS to prevent complaints about CPPFLAGS in CFLAGS. * Fix .onion handling * Command line usage was out of date for adig and ahost. * Typos in manpages * If ares_getenv is defined, it must return a value on all platforms * If /etc/resolv.conf has invalid lookup values, use the defaults. * Tests: Separate live tests from SetServers* tests as only live tests should require internet access. * ares_gethostbyname() should return ENODATA if no valid A or AAAA record is found, but a CNAME was found. * CMake: Rework library function checking to prevent unintended linking with system libraries that aren't needed. * Due to use of inet_addr() it was not possible to return 255.255.255.255 from ares_gethostbyname(). * CMake: Fix building of tests on Windows - Drop regression.patch which have been fixed upstream - Refresh disable-live-tests.patch - Remove static lib since its required when doing tests and we dont want it included in package - Run spec-cleaner OBS-URL: https://build.opensuse.org/request/show/819608 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=18
2020-07-09 08:43:45 +02:00
%{_mandir}/man1/adig.1%{?ext_man}
%{_mandir}/man1/ahost.1%{?ext_man}
%files -n %{libname}
%license LICENSE.md
%{_libdir}/libcares.so.%{sonum}*
%files devel
%license LICENSE.md
%{_libdir}/libcares.so
%{_includedir}/*.h
Accepting request 819608 from home:elimat:branches:devel:libraries:c_c++ - Version update to 1.16.1 Security: * Prevent possible use-after-free and double-free in ares_getaddrinfo() if ares_destroy() is called prior to ares_getaddrinfo() completing. Reported by Jann Horn at Google Project Zero. Changes: * Allow TXT records on CHAOS qclass. Used for retriving things like version.bind, version.server, authoris.bind, hostname.bind, and id.server. [3] Bug fixes: * Fix Windows Unicode incompatibilities with ares_getaddrinfo() [1] * Silence false cast-align compiler warnings due to valid casts of struct sockaddr to struct sockaddr_in and struct sockaddr_in6. * MacOS should use libresolv for retrieving DNS servers, like iOS * CMake build system should populate the INCLUDE_DIRECTORIES property of installed targets [2] * Correct macros in use for the ares_getaddrinfo.3 man page - Changes in version 1.16.0 Changes: * Introduction of ares_getaddrinfo() API which provides similar output (including proper sorting as per RFC 6724) to the system native API, but utilizes different data structures in order to provide additional information such as TTLs and all aliases. Please reference the respective man pages for usage details. * Parse SOA records from ns_t_any response * CMake: Provide c-ares version in package export file * CMake: Add CPACK functionality for DEB and RPM * CMake: Generate PDB files during build * CMake: Support manpage installation Bug fixes: * Fix bad expectation in IPv6 localhost test. * AutoTools: use XC_CHECK_BUILD_FLAGS instead of XC_CHECK_USER_FLAGS to prevent complaints about CPPFLAGS in CFLAGS. * Fix .onion handling * Command line usage was out of date for adig and ahost. * Typos in manpages * If ares_getenv is defined, it must return a value on all platforms * If /etc/resolv.conf has invalid lookup values, use the defaults. * Tests: Separate live tests from SetServers* tests as only live tests should require internet access. * ares_gethostbyname() should return ENODATA if no valid A or AAAA record is found, but a CNAME was found. * CMake: Rework library function checking to prevent unintended linking with system libraries that aren't needed. * Due to use of inet_addr() it was not possible to return 255.255.255.255 from ares_gethostbyname(). * CMake: Fix building of tests on Windows - Drop regression.patch which have been fixed upstream - Refresh disable-live-tests.patch - Remove static lib since its required when doing tests and we dont want it included in package - Run spec-cleaner OBS-URL: https://build.opensuse.org/request/show/819608 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=18
2020-07-09 08:43:45 +02:00
%{_mandir}/man3/ares_*.3%{?ext_man}
%{_libdir}/pkgconfig/libcares.pc
%{_libdir}/cmake/c-ares/
%endif
%changelog