From 3f82cd3fffb23de07e18a8a8d6749330c99fcc3f Mon Sep 17 00:00:00 2001 From: Troy Dawson Date: Wed, 18 Nov 2020 09:48:04 -0800 Subject: [PATCH] RHEL 9.0.0 Alpha bootstrap The content of this branch was automatically imported from Fedora ELN with the following as its source: https://src.fedoraproject.org/rpms/c-ares#bf057fcd816fec4515d6183a6048fc7fd7ad56d6 --- .gitignore | 1 + c-ares-1.17.0-cmake-ares_dns_h.patch | 11 +++++++++++ c-ares-config.cmake.in | 21 +++++++++++++++++++++ c-ares.spec | 20 +++++++++++++------- libcares.pc.cmake | 20 ++++++++++++++++++++ sources | 2 +- 6 files changed, 67 insertions(+), 8 deletions(-) create mode 100644 c-ares-1.17.0-cmake-ares_dns_h.patch create mode 100644 c-ares-config.cmake.in create mode 100644 libcares.pc.cmake diff --git a/.gitignore b/.gitignore index d64c688..08bcc2a 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,4 @@ c-ares-1.7.3.tar.gz /c-ares-1.15.0.tar.gz /c-ares-1.16.0.tar.gz /c-ares-1.16.1.tar.gz +/c-ares-1.17.0.tar.gz diff --git a/c-ares-1.17.0-cmake-ares_dns_h.patch b/c-ares-1.17.0-cmake-ares_dns_h.patch new file mode 100644 index 0000000..bee561f --- /dev/null +++ b/c-ares-1.17.0-cmake-ares_dns_h.patch @@ -0,0 +1,11 @@ +diff -up c-ares-1.17.0/include/CMakeLists.txt.ares_dns c-ares-1.17.0/include/CMakeLists.txt +--- c-ares-1.17.0/include/CMakeLists.txt.ares_dns 2020-11-17 10:52:31.669935103 -0500 ++++ c-ares-1.17.0/include/CMakeLists.txt 2020-11-17 10:52:42.507979110 -0500 +@@ -3,6 +3,6 @@ CONFIGURE_FILE (ares_build.h.cmake ${PRO + + # Headers installation target + IF (CARES_INSTALL) +- SET (CARES_HEADERS ares.h ares_version.h "${PROJECT_BINARY_DIR}/ares_build.h" ares_rules.h) ++ SET (CARES_HEADERS ares.h ares_version.h "${PROJECT_BINARY_DIR}/ares_build.h" ares_rules.h ../src/lib/ares_dns.h) + INSTALL (FILES ${CARES_HEADERS} COMPONENT Devel DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + ENDIF () diff --git a/c-ares-config.cmake.in b/c-ares-config.cmake.in new file mode 100644 index 0000000..464837b --- /dev/null +++ b/c-ares-config.cmake.in @@ -0,0 +1,21 @@ +@PACKAGE_INIT@ + +set_and_check(c-ares_INCLUDE_DIR "@PACKAGE_CMAKE_INSTALL_INCLUDEDIR@") + +include("${CMAKE_CURRENT_LIST_DIR}/c-ares-config-version.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/c-ares-targets.cmake") + +set(c-ares_LIBRARY c-ares::cares) + +if(@CARES_SHARED@) + add_library(c-ares::cares_shared INTERFACE IMPORTED) + set_target_properties(c-ares::cares_shared PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") + set(c-ares_SHARED_LIBRARY c-ares::cares_shared) +elseif(@CARES_STATIC@) + add_library(c-ares::cares_static INTERFACE IMPORTED) + set_target_properties(c-ares::cares_static PROPERTIES INTERFACE_LINK_LIBRARIES "c-ares::cares") +endif() + +if(@CARES_STATIC@) + set(c-ares_STATIC_LIBRARY c-ares::cares_static) +endif() diff --git a/c-ares.spec b/c-ares.spec index 89c23a5..0f567fc 100644 --- a/c-ares.spec +++ b/c-ares.spec @@ -2,14 +2,20 @@ Summary: A library that performs asynchronous DNS operations Name: c-ares -Version: 1.16.1 -Release: 3%{?dist} +Version: 1.17.0 +Release: 1%{?dist} License: MIT URL: http://c-ares.haxx.se/ Source0: http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz # The license can be obtained at http://c-ares.haxx.se/license.html Source1: LICENSE +# Missing from 1.17.0 tarball +# Should be fixed in 1.17.1 +# https://github.com/c-ares/c-ares/issues/373 +Source2: https://raw.githubusercontent.com/c-ares/c-ares/master/c-ares-config.cmake.in +Source3: https://raw.githubusercontent.com/c-ares/c-ares/master/libcares.pc.cmake Patch0: 0001-Use-RPM-compiler-options.patch +Patch1: c-ares-1.17.0-cmake-ares_dns_h.patch BuildRequires: gcc %if %{use_cmake} BuildRequires: cmake @@ -36,6 +42,8 @@ compile applications or shared objects that use c-ares. %autosetup -p1 cp %{SOURCE1} . +cp %{SOURCE2} . +cp %{SOURCE3} . f=CHANGES ; iconv -f iso-8859-1 -t utf-8 $f -o $f.utf8 ; mv $f.utf8 $f %build @@ -55,11 +63,6 @@ autoreconf -if %install %if %{use_cmake} %cmake_install -# When we used autotooling, we got man pages installed automagically -# but no cmake helpers were generated. -# Now, we use cmake, so we have to copy the man pages manually. -mkdir -p %{buildroot}%{_mandir}/man3 -cp -a ares_*.3 %{buildroot}%{_mandir}/man3/ %else %make_install rm -f $RPM_BUILD_ROOT/%{_libdir}/libcares.la @@ -86,6 +89,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libcares.la %{_mandir}/man3/ares_* %changelog +* Tue Nov 17 2020 Tom Callaway - 1.17.0-1 +- update to 1.17.0 + * Mon Jul 27 2020 Fedora Release Engineering - 1.16.1-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild diff --git a/libcares.pc.cmake b/libcares.pc.cmake new file mode 100644 index 0000000..d5532d5 --- /dev/null +++ b/libcares.pc.cmake @@ -0,0 +1,20 @@ +#*************************************************************************** +# Project ___ __ _ _ __ ___ ___ +# / __|____ / _` | '__/ _ \/ __| +# | (_|_____| (_| | | | __/\__ \ +# \___| \__,_|_| \___||___/ +# +prefix=@CMAKE_INSTALL_PREFIX@ +exec_prefix=${prefix}/@CMAKE_INSTALL_BINDIR@ +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ + +Name: c-ares +URL: https://c-ares.haxx.se/ +Description: asynchronous DNS lookup library +Version: @CARES_VERSION@ +Requires: +Requires.private: +Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@ +Libs: -L${libdir} -lcares +Libs.private: @CARES_PRIVATE_LIBS@ diff --git a/sources b/sources index ed252b7..f822dfe 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (c-ares-1.16.1.tar.gz) = 4ac2a5d5c6da74eb1d6155c4eadc7127ab1b53a8d13caec41bd6172db5417a79f3ab022e77ba37d8b13da6893d7ced5fd8baf5cc3950a4154b4de8743ad31471 +SHA512 (c-ares-1.17.0.tar.gz) = 366a668c2c8bc089155e473a0197bc74c7ef785caa4a9eb3c2cf14e99be6d2640f4d0e3310917ad571b5f7562866671b2aa4a27adb739fb59f7e5c5e0007b5ea