c-ares/c-ares.spec

129 lines
3.6 KiB
RPMSpec
Raw Normal View History

#
# spec file for package c-ares
#
# Copyright (c) 2023 SUSE LLC
#
# 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}
%if 0%{!?cmake_build:1}
%define cmake_build make -O VERBOSE=1 %{?_smp_mflags}
%endif
Name: c-ares
- 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: OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=56
2023-12-01 14:45:16 +01:00
Version: 1.23.0
Release: 0
Summary: Library for asynchronous name resolves
License: MIT
URL: https://c-ares.org/
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: cmake
BuildRequires: gcc-c++
# Needed for getservbyport_r function to work properly.
BuildRequires: netcfg
BuildRequires: pkgconfig
%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.
%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.
%prep
%autosetup -p1 -n c-ares-%{version}
%build
%cmake \
%if 0%{?suse_version} >= 1500
-DCARES_BUILD_TESTS:BOOL=ON \
%endif
%{nil}
%cmake_build
%install
%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
%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/
%changelog