c-ares/c-ares.spec
Adam Majer 9871bab11a Accepting request 1061853 from home:mnhauke
- Update to version 1.19.0
  Security:
  * Low. Stack overflow in ares_set_sortlist() which is used
    during c-ares initialization and typically provided by an
    administrator and not an end user.
  Changes:
  * Add ARES_OPT_HOSTS_FILE similar to ARES_OPT_RESOLVCONF for
    specifying a custom hosts file location.
  Bug fixes:
  * Fix memory leak in reading /etc/hosts when using localhost
    fallback.
  * Fix chain building c-ares when libresolv is already included by
    another project.
  * File lookup should not immediately abort as there may be other
    tries due to search criteria.
  * Asterisks should be allowed in host validation as CNAMEs may
    reference wildcard domains.
  * AutoTools build system referenced bad STDC_HEADERS macro.
  * Even if one address class returns a failure for
    ares_getaddrinfo() we should still return the results we have.
  * Fix ares_getaddrinfo() numerical address resolution with
    AF_UNSPEC
  * Fix tools and help information.
  * Various documentation fixes and cleanups.
  * Add include guards to ares_data.h
  * c-ares could try to exceed maximum number of iovec entries
    supported by system.
  * The RFC6761 6.3 states localhost subdomains must be offline too

OBS-URL: https://build.opensuse.org/request/show/1061853
OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/c-ares?expand=0&rev=46
2023-01-30 13:37:09 +00:00

131 lines
3.6 KiB
RPMSpec

#
# 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
Version: 1.19.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 %{name}
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}/acountry
%{_bindir}/adig
%{_bindir}/ahost
%{_mandir}/man1/acountry.1%{?ext_man}
%{_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
%{_mandir}/man3/ares_*.3%{?ext_man}
%{_libdir}/pkgconfig/libcares.pc
%{_libdir}/cmake/c-ares/
%changelog