Hello community, here is the log from the commit of package c-ares for openSUSE:Leap:15.2 checked in at 2020-03-02 17:21:32 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Leap:15.2/c-ares (Old) and /work/SRC/openSUSE:Leap:15.2/.c-ares.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "c-ares" Mon Mar 2 17:21:32 2020 rev:10 rq:780218 version:1.15.0+20200117 Changes: -------- --- /work/SRC/openSUSE:Leap:15.2/c-ares/c-ares.changes 2020-01-15 14:49:11.541370309 +0100 +++ /work/SRC/openSUSE:Leap:15.2/.c-ares.new.26092/c-ares.changes 2020-03-02 17:21:36.594093731 +0100 @@ -1,0 +2,89 @@ +Mon Feb 3 15:17:24 UTC 2020 - Adam Majer <[email protected]> + +- Upgrade to latest snapshot from 2020-01-17 +- disable-live-tests.patch: refreshed +- regression.patch: fix a regression in DNS results that contain + both A and AAAA answers. + +------------------------------------------------------------------- +Tue Jan 28 15:52:23 UTC 2020 - Michał Rostecki <[email protected]> + +- Add netcfg as the build requirement and runtime requirement. + ares_getaddrinfo function uses the getservbyport_r function which + requires the /etc/services file to function properly. That config + file is provided by the netcfg package. Unit tests rely on it + too, hence it has to be a build dependency as well. + +------------------------------------------------------------------- +Mon Jan 6 17:54:05 UTC 2020 - Todd R <[email protected]> + +- Switch to cmake-based build. + Some packages need the cmake build files. + +------------------------------------------------------------------- +Fri Nov 15 07:59:27 UTC 2019 - Tomáš Chvátal <[email protected]> + +- Fix version number of the snapshot to not be downgrade: + bsc#1156601 + +------------------------------------------------------------------- +Fri Nov 8 11:16:29 UTC 2019 - Adam Majer <[email protected]> + +- Update to upstream snapshot 20191108 + * getaddrinfo - avoid infinite loop in case of NXDOMAIN + * ares_getenv - return NULL in all cases + * implement ares_getaddrinfo + +- onion-crash.patch: removed, upstreamed. +- removed upstream patches that are part of the snapshot: + 0001-Add-initial-implementation-for-ares_getaddrinfo-112.patch + 0002-Remaining-queries-counter-fix-additional-unit-tests-.patch + 0003-Bugfix-for-ares_getaddrinfo-and-additional-unit-test.patch + 0004-Add-ares__sortaddrinfo-to-support-getaddrinfo-sorted.patch + 0005-getaddrinfo-avoid-infinite-loop-in-case-of-NXDOMAIN-.patch + 0006-getaddrinfo-callback-must-be-called-on-bad-domain-24.patch + 0007-getaddrinfo-enhancements-257.patch + 0008-Add-missing-limits.h-include-from-ares_getaddrinfo.c.patch + 0009-Increase-portability-of-ares-test-mock-ai.cc-235.patch + 0010-Disable-failing-test.patch +- disable-live-tests.patch - updated + +------------------------------------------------------------------- +Wed Oct 23 15:11:27 UTC 2019 - Michał Rostecki <[email protected]> + +- Add upstream patches with the ares_getaddrinfo function: + * 0001-Add-initial-implementation-for-ares_getaddrinfo-112.patch + * 0002-Remaining-queries-counter-fix-additional-unit-tests-.patch + * 0003-Bugfix-for-ares_getaddrinfo-and-additional-unit-test.patch + * 0004-Add-ares__sortaddrinfo-to-support-getaddrinfo-sorted.patch + * 0005-getaddrinfo-avoid-infinite-loop-in-case-of-NXDOMAIN-.patch + * 0006-getaddrinfo-callback-must-be-called-on-bad-domain-24.patch + * 0007-getaddrinfo-enhancements-257.patch + * 0008-Add-missing-limits.h-include-from-ares_getaddrinfo.c.patch + * 0009-Increase-portability-of-ares-test-mock-ai.cc-235.patch +- Add a patch which disables test failing on OBS (but passing in + local environment): + * 0010-Disable-failing-test.patch + +------------------------------------------------------------------- +Wed Feb 13 15:44:18 UTC 2019 - [email protected] + +- Version update to 1.15.0: + * Add ares_init_options() configurability for path to resolv.conf file + * Ability to exclude building of tools (adig, ahost, acountry) in CMake + * Report ARES_ENOTFOUND for .onion domain names as per RFC7686 + (bsc#1125306) + * Apply the IPv6 server blacklist to all nameserver sources + * Prevent changing name servers while queries are outstanding + * ares_set_servers_csv() on failure should not leave channel in a + bad state +- enable unit tests +- disable-live-tests.patch: disable tests to live servers +- onion-crash.patch: backport fix for a crash affecting .onion TLD + +------------------------------------------------------------------- +Tue Feb 20 13:34:46 UTC 2018 - [email protected] + +- Remove ineffective --with-pic. + +------------------------------------------------------------------- Old: ---- c-ares-1.14.0.tar.gz c-ares-1.14.0.tar.gz.asc New: ---- c-ares-1.15.0-20200117.tar.gz disable-live-tests.patch regression.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ c-ares.spec ++++++ --- /var/tmp/diff_new_pack.vg2PWa/_old 2020-03-02 17:21:37.562095596 +0100 +++ /var/tmp/diff_new_pack.vg2PWa/_new 2020-03-02 17:21:37.566095604 +0100 @@ -1,7 +1,7 @@ # # spec file for package c-ares # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,27 +12,33 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # -%define libname libcares2 +%define sonum 2 +%define libname libcares%{sonum} +%define realver 1.15.0-20200117 Name: c-ares -Version: 1.14.0 +Version: 1.15.0+20200117 Release: 0 Summary: Library for asynchronous name resolves License: MIT -Group: Development/Libraries/C and C++ -URL: http://c-ares.haxx.se/ -Source0: http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz -Source1: http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz.asc +URL: https://c-ares.haxx.se/ +#Source0: https://c-ares.haxx.se/daily-snapshot/c-ares-%{realver}.tar.gz +Source0: c-ares-%{realver}.tar.gz +#Source0: http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz +#Source1: http://c-ares.haxx.se/download/%{name}-%{version}.tar.gz.asc Source3: %{name}.keyring Source4: baselibs.conf Patch0: 0001-Use-RPM-compiler-options.patch -BuildRequires: autoconf -BuildRequires: automake +Patch1: disable-live-tests.patch +Patch2: regression.patch +BuildRequires: cmake BuildRequires: gcc-c++ BuildRequires: libtool +# Needed for getservbyport_r function to work properly. +BuildRequires: netcfg BuildRequires: pkgconfig %description @@ -40,18 +46,32 @@ 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 -Group: System/Libraries +# 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: Library for asynchronous name resolves -Group: Development/Libraries/C and C++ +Summary: Development files for %{name} Requires: %{libname} = %{version} Requires: glibc-devel Provides: libcares-devel = %{version} @@ -62,40 +82,60 @@ 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 -%setup -q -%patch0 -p1 +%autosetup -p1 -n %{name}-%{realver} # Remove bogus cflags checking sed -i -e '/XC_CHECK_BUILD_FLAGS/d' configure.ac sed -i -e '/XC_CHECK_USER_FLAGS/d' m4/xc-cc-check.m4 %build -autoreconf -fiv -%configure \ - --disable-silent-rules \ - --enable-symbol-hiding \ - --enable-nonblocking \ - --enable-shared \ - --disable-static \ - --with-pic +%cmake \ + -DCARES_STATIC:BOOL=OFF \ + -DCARES_SHARED:BOOL=ON \ + -DCARES_INSTALL:BOOL=ON \ + -DCARES_BUILD_TESTS:BOOL=ON \ + -DCARES_BUILD_TOOLS:BOOL=ON make %{?_smp_mflags} %install -%make_install +%cmake_install +install -m 644 -Dt %{buildroot}%{_mandir}/man1/ *.1 +install -m 644 -Dt %{buildroot}%{_mandir}/man3/ *.3 find %{buildroot} -type f -name "*.la" -delete -print +%check +pushd build +make -C test %{?_smp_mflags} +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:./lib +./bin/arestest + %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.2* %files devel +%license LICENSE.md %{_libdir}/libcares.so %{_includedir}/*.h -%{_mandir}/man3/ares_* +%{_mandir}/man3/ares_*.3%{ext_man} %{_libdir}/pkgconfig/libcares.pc +%{_libdir}/cmake/c-ares/ %changelog ++++++ disable-live-tests.patch ++++++ Index: c-ares-1.15.0-20200117/test/Makefile.inc =================================================================== --- c-ares-1.15.0-20200117.orig/test/Makefile.inc +++ c-ares-1.15.0-20200117/test/Makefile.inc @@ -13,7 +13,6 @@ TESTSOURCES = ares-test-main.cc \ ares-test-parse-srv.cc \ ares-test-parse-txt.cc \ ares-test-misc.cc \ - ares-test-live.cc \ ares-test-mock.cc \ ares-test-mock-ai.cc \ ares-test-internal.cc \ Index: c-ares-1.15.0-20200117/test/ares-test-misc.cc =================================================================== --- c-ares-1.15.0-20200117.orig/test/ares-test-misc.cc +++ c-ares-1.15.0-20200117/test/ares-test-misc.cc @@ -47,10 +47,12 @@ TEST_F(DefaultChannelTest, SetServers) { EXPECT_EQ(expected, GetNameServers(channel_)); // Change not allowed while request is pending + /* HostResult result; ares_gethostbyname(channel_, "www.google.com.", AF_INET, HostCallback, &result); EXPECT_EQ(ARES_ENOTIMP, ares_set_servers(channel_, &server1)); ares_cancel(channel_); + */ } TEST_F(DefaultChannelTest, SetServersPorts) { @@ -77,10 +79,12 @@ TEST_F(DefaultChannelTest, SetServersPor EXPECT_EQ(expected, GetNameServers(channel_)); // Change not allowed while request is pending + /* HostResult result; ares_gethostbyname(channel_, "www.google.com.", AF_INET, HostCallback, &result); EXPECT_EQ(ARES_ENOTIMP, ares_set_servers_ports(channel_, &server1)); ares_cancel(channel_); + */ } TEST_F(DefaultChannelTest, SetServersCSV) { @@ -109,11 +113,13 @@ TEST_F(DefaultChannelTest, SetServersCSV EXPECT_EQ(expected2, GetNameServers(channel_)); // Change not allowed while request is pending + /* HostResult result; ares_gethostbyname(channel_, "www.google.com.", AF_INET, HostCallback, &result); EXPECT_EQ(ARES_ENOTIMP, ares_set_servers_csv(channel_, "1.2.3.4,2.3.4.5")); EXPECT_EQ(ARES_ENOTIMP, ares_set_servers_ports_csv(channel_, "1.2.3.4:56,2.3.4.5:67")); ares_cancel(channel_); + */ // Should survive duplication ares_channel channel2; ++++++ regression.patch ++++++ commit 9413d54ff43d18cedf0d4531408aabc7c2c102a2 Author: Adam Majer <[email protected]> Date: Mon Feb 3 15:19:08 2020 +0100 Only count valid addresses when response parsing When ares_parse_a_reply or ares_parse_aaaa_reply is called in case where another AAAA and A responses exist, the resulting ares_addrttl count is invalid and the structure points to gibberish. This is a regression since 1.15. PR: https://github.com/c-ares/c-ares/pull/302 diff --git a/ares_parse_a_reply.c b/ares_parse_a_reply.c index b506f72..920ba24 100644 --- a/ares_parse_a_reply.c +++ b/ares_parse_a_reply.c @@ -86,7 +86,10 @@ int ares_parse_a_reply(const unsigned char *abuf, int alen, next = ai.nodes; while (next) { - ++naddrs; + if (next->ai_family == AF_INET) + { + ++naddrs; + } next = next->ai_next; } diff --git a/ares_parse_aaaa_reply.c b/ares_parse_aaaa_reply.c index aca3f00..d39e138 100644 --- a/ares_parse_aaaa_reply.c +++ b/ares_parse_aaaa_reply.c @@ -88,7 +88,10 @@ int ares_parse_aaaa_reply(const unsigned char *abuf, int alen, next = ai.nodes; while (next) { - ++naddrs; + if(next->ai_family == AF_INET6) + { + ++naddrs; + } next = next->ai_next; } diff --git a/test/ares-test-parse-a.cc b/test/ares-test-parse-a.cc index 77d9591..0741c0d 100644 --- a/test/ares-test-parse-a.cc +++ b/test/ares-test-parse-a.cc @@ -11,13 +11,14 @@ TEST_F(LibraryTest, ParseAReplyOK) { DNSPacket pkt; pkt.set_qid(0x1234).set_response().set_aa() .add_question(new DNSQuestion("example.com", ns_t_a)) - .add_answer(new DNSARR("example.com", 0x01020304, {2,3,4,5})); + .add_answer(new DNSARR("example.com", 0x01020304, {2,3,4,5})) + .add_answer(new DNSAaaaRR("example.com", 0x01020304, {0,0,0,0,0,0,0,0,0,0,0,0,2,3,4,5})); std::vector<byte> data = { 0x12, 0x34, // qid 0x84, // response + query + AA + not-TC + not-RD 0x00, // not-RA + not-Z + not-AD + not-CD + rc=NoError 0x00, 0x01, // num questions - 0x00, 0x01, // num answer RRs + 0x00, 0x02, // num answer RRs 0x00, 0x00, // num authority RRs 0x00, 0x00, // num additional RRs // Question @@ -35,6 +36,15 @@ TEST_F(LibraryTest, ParseAReplyOK) { 0x01, 0x02, 0x03, 0x04, // TTL 0x00, 0x04, // rdata length 0x02, 0x03, 0x04, 0x05, + // Answer 2 + 0x07, 'e', 'x', 'a', 'm', 'p', 'l', 'e', + 0x03, 'c', 'o', 'm', + 0x00, + 0x00, 0x1c, // RR type + 0x00, 0x01, // class IN + 0x01, 0x02, 0x03, 0x04, // TTL + 0x00, 0x10, // rdata length + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x04, 0x05, }; EXPECT_EQ(data, pkt.data()); struct hostent *host = nullptr; @@ -68,7 +78,7 @@ TEST_F(LibraryTest, ParseMalformedAReply) { 0x84, // [2] response + query + AA + not-TC + not-RD 0x00, // [3] not-RA + not-Z + not-AD + not-CD + rc=NoError 0x00, 0x01, // [4:6) num questions - 0x00, 0x01, // [6:8) num answer RRs + 0x00, 0x02, // [6:8) num answer RRs 0x00, 0x00, // [8:10) num authority RRs 0x00, 0x00, // [10:12) num additional RRs // Question diff --git a/test/ares-test-parse-aaaa.cc b/test/ares-test-parse-aaaa.cc index 9d0457e..1314c83 100644 --- a/test/ares-test-parse-aaaa.cc +++ b/test/ares-test-parse-aaaa.cc @@ -13,7 +13,8 @@ TEST_F(LibraryTest, ParseAaaaReplyOK) { .add_question(new DNSQuestion("example.com", ns_t_aaaa)) .add_answer(new DNSAaaaRR("example.com", 100, {0x01, 0x01, 0x01, 0x01, 0x02, 0x02, 0x02, 0x02, - 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04})); + 0x03, 0x03, 0x03, 0x03, 0x04, 0x04, 0x04, 0x04})) + .add_answer(new DNSARR("example.com", 0x01020304, {2,3,4,5})); std::vector<byte> data = pkt.data(); struct hostent *host = nullptr; struct ares_addr6ttl info[5];
