pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/net/libcares



Module Name:    pkgsrc
Committed By:   wiz
Date:           Mon Nov  6 13:54:49 UTC 2023

Modified Files:
        pkgsrc/net/libcares: Makefile PLIST distinfo

Log Message:
libcares: update to 1.21.0.

Version 1.21.0 (26 Oct 2023)

Brad House (26 Oct 2023)
- SonarCloud: reduce reported complexity that exists for no reason.

- SonarCloud: fix some #undef codesmells

- formatting

- document ARES_RR_* records

- no reason to limit on truncation

- linguist fixes

- don't use test cases to determine language of c-ares

- fix grammar

- fix count

GitHub (25 Oct 2023)
- [Brad House brought this change]

  1.21.0 release prep (#585)

Brad House (25 Oct 2023)
- fix build warning

GitHub (25 Oct 2023)
- [Brad House brought this change]

  SonarCloud: clean up more codesmells (#584)

Brad House (25 Oct 2023)
- resolve reported memory leaks

- add test vector said to cause a memory leak

GitHub (25 Oct 2023)
- [Brad House brought this change]

  sonarcloud: fix more codesmells (#583)

- [Brad House brought this change]

  sonarcloud easy codesmells (#582)

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  Modernization: replace multiple hand-parsers with new memory-safe parser (#581)

  New DNS record parsing code. The old code was basically just some helper macros and functions for parsing an entire DNS message. The caller had to know the RFCs to use the parsers, except for some 
pre-made exceptions. The new parsing code parses the entire DNS message into an opaque data structure in a memory safe manner with various accessors for reading and manipulating the data.

  The existing parser helpers for the various record types were reimplemented as wrappers around the new parser.

  The accessors allow easy iteration across the DNS record datastructure, and can be used to easily create dig-like output without needing to know anything about the various record types and formats 
as dynamic helpers are provided for enumeration of values and data types of those values.

  At some point in the future, this new DNS record structure, accessors, and parser will be exposed publicly. This is not done at this point as we don't want to do that until the API is completely 
stable. Likely a write() function to output the DNS record back into an actual message buffer will be introduced with the stable API as well.

  Some subtle bugs in the existing code were uncovered, some which had test cases which turned out to be bogus. Validation with third-party implementations (e.g. BIND9) were performed to validate 
such cases were indeed bugs.

  Adding additional RR parsers such as for TLSA (#470) or SVCB/HTTPS (#566) are trivial now since focus can be put on only parsing the data within the RR, not the entire message. That said, as the 
new parser is not yet public, it isn't clear the best way to expose any new RRs (probably best to wait for the new parser to be public rather than hacking in another legacy function).

  Some additional RRs that are part of DNS RFC1035 or EDNS RFC6891 that didn't have previously implemented parsers are now also implemented (e.g. HINFO, OPT). Any unrecognized RRs are encapsulated 
into a "RAW_RR" as binary data which can be inserted or extracted, but are otherwise not interpreted in any way.

  Fix By: Brad House (@bradh352)

- [Gregor Jasny brought this change]

  feat: use CMake to control symbol visibility (#574)

  In contrast to #572 this solution does not need any extra headers. But it is also limited to GCC-like compilers.

  Fix By: Gregor Jasny (@gjasny)

- [Brad House brought this change]

  remove ares_nowarn helpers #580

  Now that the code internally is using proper datatypes, there is no longer a need for ares_nowarn helpers. Remove them.

  Fix By: Brad House (@bradh352)

Brad House (16 Oct 2023)
- clang-format: fix structure alignment

  It appears the structure alignment chosen just doesn't work right.
  Switch to 'left', it appears to be mostly correct.

  Fix By: Brad House (@bradh352)

GitHub (15 Oct 2023)
- [Brad House brought this change]

  Reformat code using clang-format (#579)

  c-ares uses multiple code styles, standardize on one. Talking with @bagder he feels strongly about maintaining an 80 column limit, but feels less strongly about things I feel strongly about (like 
alignment).

  Can re-run the formatter on the codebase via:
  ```
  clang-format -i */*.c */*.h */*/*.c */*/*.h
  ```

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- inet_ntop requires ares_private.h

- SonarCloud: Fix additional code smells

  Fix By: Brad House (@bradh352)

- SonarCloud: Ignore codesmells c89 doesn't support

  C89 doesn't support iterator declaration in for loop, kill warning.

  Fix By: Brad House (@bradh352)

GitHub (15 Oct 2023)
- [Brad House brought this change]

  set compiler standard to ISO C90/ANSI C89 (#577)

  SonarCloud is outputting some code smells for things that aren't possible for C89. Hopefully setting the code standard to C89/C90 properly will fix those bogus warnings.

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- fix new ares_strcpy to ensure null termination

- build fix

GitHub (15 Oct 2023)
- [Brad House brought this change]

  SonarCloud: Fix up codesmells due to strlen(), strcpy(), and strncpy() (#576)

  Create ares_strlen() and ares_strcpy() in order to resolve SonarCloud codesmells related to their use.

  ares_strlen() just becomes null-safe.

  ares_strcpy() is equivalent to strlcpy(), so unlike strncpy() it guarantees NULL termination.

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- SonarCloud: try to appease it better

- SonarCloud: Fix reported bugs

  SonarCloud reported a few bugs, this commit should fix those reports.

  Fix By: Brad House (@bradh352)

GitHub (15 Oct 2023)
- [Brad House brought this change]

  Fix internal datatype usage and warnings (#573)

  PR #568 increased the warning levels and c-ares code emitted a bunch of warnings. This PR fixes those warnings and starts transitioning internal data types into more proper forms (e.g. data lengths 
should be size_t not int). It does, however, have to manually cast back to what the public API needs due to API and ABI compliance (we aren't looking to break integrations, just clean up internals).

  Fix By: Brad House (@bradh352)

Brad House (15 Oct 2023)
- SonarCloud: exclude tests

- fix source directories

GitHub (15 Oct 2023)
- [Brad House brought this change]

  Sonarcloud (#575)

- [Brad House brought this change]

  Increase compiler warnings by default (#568)

  c-ares was missing a couple of common compiler warnings during building that are widely recognized as a best practice. This PR makes no code changes, only build system changes to increase warning 
levels.

  This PR does cause some new warnings to be emitted, a follow-up PR will address those.

  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  introduce ares_bool_t datatype (#570)

  c-ares currently uses int for boolean, which can be confusing as there are some functions which return int but use '0' as the success condition. Some internal variable usage is similar. Lets try to 
identify the boolean use cases and split them out into their own data type of ares_bool_t. Since we're trying to keep C89 compatibility, we can't rely on stdbool.h or the _Bool C99 data type, so 
we'll define our own.

  Also, chose using an enum rather than say unsigned char or int because of the type safety benefits it provides. Compilers should warn if you try to pass, ARES_TRUE on to a ares_status_t enum (or 
similar) since they are different enums.

  Fix By: Brad House (@bradh352)

Brad House (12 Oct 2023)
- Socket callbacks were passed SOCK_STREAM instead of SOCK_DGRAM on udp

  A regression was introduced in 1.20.0 that would pass SOCK_STREAM on udp
  connections due to code refactoring.  If a client application validated this
  data, it could cause issues as seen in gRPC.

  Fixes Issue: #571
  Fix By: Brad House (@bradh352)

- Enhance test of ares_getsock()

  In an attempt to see if ares_getsock() was broken as per #571, do
  further sanity checks of the results of ares_getsock().  It seems
  as though ares_getsock() is fine.

  Fix By: Brad House (@bradh352)

GitHub (10 Oct 2023)
- [Brad House brought this change]

  Tool: STAYOPEN flag could make tools not terminate (#569)

  If a flag is set to keep the connections to the DNS servers open even if there are no queries, the tools would not exit until the remote server closed the connection due to the user of ares_fds() 
to determine if there are any active queries. Instead, rely on ares_timeout() returning NULL if there are no active queries (technically this returns the value passed to max_tv in ares_timeout(), but 
in our use case, that is always NULL).

  Fixes Issue: #452
  Fix By: Brad House (@bradh352)

- [Brad House brought this change]

  ares_status_t enum for status codes (#567)

  The list of possible error codes in c-ares was a #define list. This not only doesn't provide for any sort of type safety but it also lacks clarification on what a function may return or what it 
takes, as an int could be an ares status, a boolean, or possibly even a length in the current code.

  We are not changing any public APIs as though the C standard states the underlying size and type of an enum is int, there are compiler attributes to override this as well as compiler flags like 
-fshort-enums. GCC in particular is known to expand an enum's width based on the data values (e.g., it can emit a 64bit integer enum).

  All internal usages should be changed by this PR, but of course, there may be some I missed.

  Fix By: Brad House (@bradh352)

Daniel Stenberg (9 Oct 2023)
- docs: provide better man page references

  When referring to another c-ares function use \fI function(3) \fP to let
  the webpage rendering find and cross-link them appropriately.

  SEE ALSO references should be ".BR name (3),", with a space before the
  open parenthesis. This helps the manpage to HTML renderer.

  Closes #565


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 pkgsrc/net/libcares/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/net/libcares/PLIST
cvs rdiff -u -r1.29 -r1.30 pkgsrc/net/libcares/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/net/libcares/Makefile
diff -u pkgsrc/net/libcares/Makefile:1.35 pkgsrc/net/libcares/Makefile:1.36
--- pkgsrc/net/libcares/Makefile:1.35   Thu Oct 19 14:49:23 2023
+++ pkgsrc/net/libcares/Makefile        Mon Nov  6 13:54:49 2023
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.35 2023/10/19 14:49:23 wiz Exp $
+# $NetBSD: Makefile,v 1.36 2023/11/06 13:54:49 wiz Exp $
 
-DISTNAME=      c-ares-1.20.1
+DISTNAME=      c-ares-1.21.0
 PKGNAME=       ${DISTNAME:S/c-/libc/1}
 CATEGORIES=    net
 MASTER_SITES=  https://c-ares.haxx.se/download/

Index: pkgsrc/net/libcares/PLIST
diff -u pkgsrc/net/libcares/PLIST:1.19 pkgsrc/net/libcares/PLIST:1.20
--- pkgsrc/net/libcares/PLIST:1.19      Thu Oct 19 14:49:23 2023
+++ pkgsrc/net/libcares/PLIST   Mon Nov  6 13:54:49 2023
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.19 2023/10/19 14:49:23 wiz Exp $
+@comment $NetBSD: PLIST,v 1.20 2023/11/06 13:54:49 wiz Exp $
 bin/adig
 bin/ahost
 include/ares.h
@@ -13,7 +13,7 @@ lib/cmake/c-ares/c-ares-targets-noconfig
 lib/cmake/c-ares/c-ares-targets.cmake
 lib/libcares.so
 lib/libcares.so.2
-lib/libcares.so.2.7.1
+lib/libcares.so.2.7.2
 lib/libcares_static.a
 lib/pkgconfig/libcares.pc
 man/man1/adig.1

Index: pkgsrc/net/libcares/distinfo
diff -u pkgsrc/net/libcares/distinfo:1.29 pkgsrc/net/libcares/distinfo:1.30
--- pkgsrc/net/libcares/distinfo:1.29   Thu Oct 19 14:49:23 2023
+++ pkgsrc/net/libcares/distinfo        Mon Nov  6 13:54:49 2023
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.29 2023/10/19 14:49:23 wiz Exp $
+$NetBSD: distinfo,v 1.30 2023/11/06 13:54:49 wiz Exp $
 
-BLAKE2s (c-ares-1.20.1.tar.gz) = 00de5b55ed137c62298fda011032a9ab4ef7ac4bca54c22778fc427191c99b0a
-SHA512 (c-ares-1.20.1.tar.gz) = 83400fb276ebcf16dfe6f43d56ca87839d132b5a0544420eda9fa148eb85468b3f215593fcefc2a7a3a8ed8b0d4ef093ed99616a4e466b01f6913934240539e4
-Size (c-ares-1.20.1.tar.gz) = 1599175 bytes
+BLAKE2s (c-ares-1.21.0.tar.gz) = 0a790a34ee1ea35fd628e992f65604844e5523e3b220fbaae5f5ab846a279e40
+SHA512 (c-ares-1.21.0.tar.gz) = c526b0a28d8ea1c6a53215dfd52e8250c968513a667c5414459d97d46288da7e7a2193d757fc78225e56c6684b3d30e756dd3e5a31917e996c871773a34892ea
+Size (c-ares-1.21.0.tar.gz) = 1623742 bytes



Home | Main Index | Thread Index | Old Index