Skip to content

Commit

Permalink
deps: update c-ares to v1.30.0
Browse files Browse the repository at this point in the history
PR-URL: #53416
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
  • Loading branch information
nodejs-github-bot authored and targos committed Jun 20, 2024
1 parent fe85e05 commit bf891bf
Show file tree
Hide file tree
Showing 55 changed files with 2,709 additions and 25,185 deletions.
6,487 changes: 5 additions & 6,482 deletions deps/cares/CHANGES

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions deps/cares/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)

PROJECT (c-ares LANGUAGES C VERSION "1.29.0" )
PROJECT (c-ares LANGUAGES C VERSION "1.30.0" )

# Set this version before release
SET (CARES_VERSION "1.29.0")
SET (CARES_VERSION "${PROJECT_VERSION}")

INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are wrong.

Expand All @@ -30,7 +30,7 @@ INCLUDE (GNUInstallDirs) # include this *AFTER* PROJECT(), otherwise paths are w
# For example, a version of 4:0:2 would generate output such as:
# libname.so -> libname.so.2
# libname.so.2 -> libname.so.2.2.0
SET (CARES_LIB_VERSIONINFO "16:0:14")
SET (CARES_LIB_VERSIONINFO "17:0:15")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand Down
10 changes: 2 additions & 8 deletions deps/cares/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ Contributing to c-ares
To contribute patches to c-ares, please generate a GitHub pull request
and follow these guidelines:

- Check that the Travis builds are green for your pull request.
- Check that the CI/CD builds are green for your pull request.
- Please update the test suite to add a test case for any new functionality.
- Build the library with `./configure --enable-debug --enable-maintainer-mode` and
ensure there are no new warnings.

To improve the chances of the c-ares maintainers responding to your request:

- Also send an email to the mailing list at `c-ares@lists.haxx.se` describing your change.
- To follow any associated discussion, please subscribe to the [mailing list](http://lists.haxx.se/listinfo/c-ares).
- Build the library on your own machine and ensure there are no new warnings.
47 changes: 47 additions & 0 deletions deps/cares/DEVELOPER-NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Developer Notes
===============

* The distributed `ares_build.h` in the official release tarballs is only
intended to be used on systems which can also not run the also distributed
`configure` or `CMake` scripts. It is generated as a copy of
`ares_build.h.dist` as can be seen in the code repository.

* If you check out from git on a non-`configure` or `CMake` platform, you must run
the appropriate `buildconf*` script to set up `ares_build.h` and other local
files before being able to compile the library. There are pre-made makefiles
for a subset of such systems such as Watcom, NMake, and MinGW Makefiles.

* On systems capable of running the `configure` or `CMake` scripts, the process
will overwrite the distributed `ares_build.h` file with one that is suitable
and specific to the library being configured and built, this new file is
generated from the `ares_build.h.in` and `ares_build.h.cmake` template files.

* If you intend to distribute an already compiled c-ares library you **MUST**
also distribute along with it the generated `ares_build.h` which has been
used to compile it. Otherwise, the library will be of no use for the users of
the library that you have built. It is **your** responsibility to provide this
file. No one at the c-ares project can know how you have built the library.
The generated file includes platform and configuration dependent info,
and must not be modified by anyone.

* We support both the AutoTools `configure` based build system as well as the
`CMake` build system. Any new code changes must work with both.

* The files that get compiled and are present in the distribution are referenced
in the `Makefile.inc` in the current directory. This file gets included in
every build system supported by c-ares so that the list of files doesn't need
to be maintained per build system. Don't forget to reference new header files
otherwise they won't be included in the official release tarballs.

* We cannot assume anything else but very basic C89 compiler features being
present. The lone exception is the requirement for 64bit integers which is
not a requirement for C89 compilers to support. Please do not use any extended
features released by later standards.

* Newlines must remain unix-style for older compilers' sake.

* Comments must be written in the old-style `/* unnested C-fashion */`

* Try to keep line lengths below 80 columns and formatted as the existing code.
There is a `.clang-format` in the repository that can be used to run the
automated code formatter as such: `clang-format -i */*.c */*.h */*/*.c */*/*.h`
3 changes: 1 addition & 2 deletions deps/cares/LICENSE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

MIT License


Copyright (c) 1998 Massachusetts Institute of Technology
Copyright (c) 1998 Massachusetts Institute of Technology
Copyright (c) 2007 - 2023 Daniel Stenberg with many contributors, see AUTHORS
file.

Expand Down
2 changes: 1 addition & 1 deletion deps/cares/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES.md \
c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \
maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \
CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md DEVELOPER-NOTES.md TODO \
cmake/EnableWarnings.cmake

CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
Expand Down
8 changes: 3 additions & 5 deletions deps/cares/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -231,10 +231,8 @@ am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/libcares.pc.in \
$(top_srcdir)/config/config.sub \
$(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \
$(top_srcdir)/config/missing AUTHORS INSTALL.md NEWS README.md \
TODO compile config.guess config.sub config/compile \
config/config.guess config/config.sub config/install-sh \
config/ltmain.sh config/missing depcomp install-sh ltmain.sh \
missing
TODO config/compile config/config.guess config/config.sub \
config/install-sh config/ltmain.sh config/missing
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
Expand Down Expand Up @@ -445,7 +443,7 @@ EXTRA_DIST = AUTHORS CHANGES README.cares $(man_MANS) RELEASE-NOTES.md \
c-ares-config.cmake.in libcares.pc.cmake libcares.pc.in buildconf get_ver.awk \
maketgz TODO README.msvc $(MSVCFILES) INSTALL.md README.md LICENSE.md \
CMakeLists.txt Makefile.dj Makefile.m32 Makefile.netware Makefile.msvc \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md TODO \
Makefile.Watcom AUTHORS CONTRIBUTING.md SECURITY.md DEVELOPER-NOTES.md TODO \
cmake/EnableWarnings.cmake

CLEANFILES = $(PDFPAGES) $(HTMLPAGES)
Expand Down
112 changes: 74 additions & 38 deletions deps/cares/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,58 +8,94 @@
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=c-ares_c-ares&metric=bugs)](https://sonarcloud.io/summary/new_code?id=c-ares_c-ares)
[![Coverity Scan Status](https://scan.coverity.com/projects/c-ares/badge.svg)](https://scan.coverity.com/projects/c-ares)

This is c-ares, an asynchronous resolver library. It is intended for
## Overview
[c-ares](https://c-ares.org) is a modern DNS (stub) resolver library, written in
C. It provides interfaces for asynchronous queries while trying to abstract the
intricacies of the underlying DNS protocol. It was originally intended for
applications which need to perform DNS queries without blocking, or need to
perform multiple DNS queries in parallel. The primary examples of such
applications are servers which communicate with multiple clients and programs
with graphical user interfaces.
perform multiple DNS queries in parallel.

The full source code is available in the ['c-ares' release archives](https://c-ares.org/download/),
and in a git repository: https://github.com/c-ares/c-ares. See the
[INSTALL.md](INSTALL.md) file for build information.
One of the goals of c-ares is to be a better DNS resolver than is provided by
your system, regardless of which system you use. We recommend using
the c-ares library in all network applications even if the initial goal of
asynchronous resolution is not necessary to your application.

If you find bugs, correct flaws, have questions or have comments in general in
regard to c-ares (or by all means the original ares too), get in touch with us
on the c-ares mailing list: https://lists.haxx.se/listinfo/c-ares
c-ares will build with any C89 compiler and is [MIT licensed](LICENSE.md),
which makes it suitable for both free and commercial software. c-ares runs on
Linux, FreeBSD, OpenBSD, MacOS, Solaris, AIX, Windows, Android, iOS and many
more operating systems.

c-ares is distributed under the MIT license.
c-ares has a strong focus on security, implementing safe parsers and data
builders used throughout the code, thus avoiding many of the common pitfalls
of other C libraries. Through automated testing with our extensive testing
framework, c-ares is constantly validated with a range of static and dynamic
analyzers, as well as being constantly fuzzed by [OSS Fuzz](https://github.com/google/oss-fuzz).

You'll find all c-ares details and news here:
https://c-ares.org/
While c-ares has been around for over 20 years, it has been actively maintained
both in regards to the latest DNS RFCs as well as updated to follow the latest
best practices in regards to C coding standards.

## Code

## Notes for c-ares hackers
The full source code and revision history is available in our
[GitHub repository](https://github.com/c-ares/c-ares). Our signed releases
are available in the ['c-ares' release archives](https://c-ares.org/download/).

* The distributed `ares_build.h` file is only intended to be used on systems
which can not run the also distributed configure script.

* The distributed `ares_build.h` file is generated as a copy of `ares_build.h.dist`
when the c-ares source code distribution archive file is originally created.
See the [INSTALL.md](INSTALL.md) file for build information.

* If you check out from git on a non-configure platform, you must run the
appropriate `buildconf*` script to set up `ares_build.h` and other local files
before being able to compile the library.
## Communication

* On systems capable of running the `configure` script, the `configure` process
will overwrite the distributed `ares_build.h` file with one that is suitable
and specific to the library being configured and built, this new file is
generated from the `ares_build.h.in` template file.
**Issues** and **Feature Requests** should be reported to our
[GitHub Issues](https://github.com/c-ares/c-ares/issues) page.

* If you intend to distribute an already compiled c-ares library you **MUST**
also distribute along with it the generated `ares_build.h` which has been
used to compile it. Otherwise, the library will be of no use for the users of
the library that you have built. It is **your** responsibility to provide this
file. No one at the c-ares project can know how you have built the library.
**Discussions** around c-ares and its use, are held on
[GitHub Discussions](https://github.com/c-ares/c-ares/discussions/categories/q-a)
or the [Mailing List](https://lists.haxx.se/mailman/listinfo/c-ares). Mailing
List archive [here](https://lists.haxx.se/pipermail/c-ares/).
Please, do not mail volunteers privately about c-ares.

* File `ares_build.h` includes platform and configuration dependent info,
and must not be modified by anyone. Configure script generates it for you.
**Security vulnerabilities** are treated according to our
[Security Procedure](SECURITY.md), please email c-ares-security at
haxx.se if you suspect one.

* We cannot assume anything else but very basic compiler features being
present. While c-ares requires an ANSI C compiler to build, some of the
earlier ANSI compilers clearly can't deal with some preprocessor operators.

* Newlines must remain unix-style for older compilers' sake.
## Release keys

* Comments must be written in the old-style /* unnested C-fashion */
Primary GPG keys for c-ares Releasers (some Releasers sign with subkeys):

* Try to keep line lengths below 80 columns.
* **Daniel Stenberg** <<daniel@haxx.se>>
`27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2`
* **Brad House** <<brad@brad-house.com>>
`DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA`

To import the full set of trusted release keys (including subkeys possibly used
to sign releases):

```bash
gpg --keyserver hkps://keyserver.ubuntu.com --recv-keys 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2 # Daniel Stenberg
gpg --keyserver hkps://keys.openpgp.org --recv-keys DA7D64E4C82C6294CB73A20E22E3D13B5411B7CA # Brad House
```

### Verifying signatures

For each release `c-ares-X.Y.Z.tar.gz` there is a corresponding
`c-ares-X.Y.Z.tar.gz.asc` file which contains the detached signature for the
release.

After fetching all of the possible valid signing keys and loading into your
keychain as per the prior section, you can simply run the command below on
the downloaded package and detached signature:

```bash
% gpg -v --verify c-ares-1.29.0.tar.gz.asc c-ares-1.29.0.tar.gz
gpg: enabled compatibility flags:
gpg: Signature made Fri May 24 02:50:38 2024 EDT
gpg: using RSA key 27EDEAF22F3ABCEB50DB9A125CC908FDB71E12C2
gpg: using pgp trust model
gpg: Good signature from "Daniel Stenberg <daniel@haxx.se>" [unknown]
gpg: WARNING: This key is not certified with a trusted signature!
gpg: There is no indication that the signature belongs to the owner.
Primary key fingerprint: 27ED EAF2 2F3A BCEB 50DB 9A12 5CC9 08FD B71E 12C2
gpg: binary signature, digest algorithm SHA512, key algorithm rsa2048
```
39 changes: 15 additions & 24 deletions deps/cares/RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,42 +1,33 @@
## c-ares version 1.29.0 - May 24 2024
## c-ares version 1.30.0 - June 7 2024

This is a feature and bugfix release.
This is a maintenance and bugfix release.

Features:

* When using `ARES_OPT_EVENT_THREAD`, automatically reload system configuration
when network conditions change. [PR #759](https://github.com/c-ares/c-ares/pull/759)
* Apple: reimplement DNS configuration reading to more accurately pull DNS
settings. [PR #750](https://github.com/c-ares/c-ares/pull/750)
* Add observability into DNS server health via a server state callback, invoked
whenever a query finishes. [PR #744](https://github.com/c-ares/c-ares/pull/744)
* Add server failover retry behavior, where failed servers are retried with
small probability after a minimum delay. [PR #731](https://github.com/c-ares/c-ares/pull/731)
* Basic support for SIG RR record (RFC 2931 / RFC 2535) [PR #773](https://github.com/c-ares/c-ares/pull/773)

Changes:

* Mark `ares_channel_t *` as const in more places in the public API. [PR #758](https://github.com/c-ares/c-ares/pull/758)
* Validation that DNS strings can only consist of printable ascii characters
otherwise will trigger a parse failure.
[75de16c](https://github.com/c-ares/c-ares/commit/75de16c) and
[40fb125](https://github.com/c-ares/c-ares/commit/40fb125)
* Windows: use `GetTickCount64()` for a monotonic timer that does not wrap. [1dff8f6](https://github.com/c-ares/c-ares/commit/1dff8f6)

Bugfixes:

* Due to a logic flaw dns name compression writing was not properly implemented
which would result in the name prefix not being written for a partial match.
This could cause issues in various record types such as MX records when using
the deprecated API. Regression introduced in 1.28.0. [Issue #757](https://github.com/c-ares/c-ares/issues/757)
* Revert OpenBSD `SOCK_DNS` flag, it doesn't do what the docs say it does and
causes c-ares to become non-functional. [PR #754](https://github.com/c-ares/c-ares/pull/754)
* `ares_getnameinfo()`: loosen validation on `salen` parameter. [Issue #752](https://github.com/c-ares/c-ares/issues/752)
* cmake: Android requires C99. [PR #748](https://github.com/c-ares/c-ares/pull/748)
* `ares_queue_wait_empty()` does not honor timeout_ms >= 0. [Issue #742](https://github.com/c-ares/c-ares/pull/742)
* QueryCache: Fix issue where purging on server changes wasn't working. [a6c8fe6](https://github.com/c-ares/c-ares/commit/a6c8fe6)
* Windows: Fix Y2K38 issue by creating our own `ares_timeval_t` datatype. [PR #772](https://github.com/c-ares/c-ares/pull/772)
* Fix packaging issue affecting MacOS due to a missing header. [55afad6](https://github.com/c-ares/c-ares/commit/55afad6)
* MacOS: Fix UBSAN warnings that are likely meaningless due to alignment issues
in new MacOS config reader.
* Android: arm 32bit build failure due to missing symbol. [d1722e6](https://github.com/c-ares/c-ares/commit/d1722e6)

Thanks go to these friendly people for their efforts and contributions for this
release:

* Brad House (@bradh352)
* Daniel Stenberg (@bagder)
* David Hotham (@dimbleby)
* Jiwoo Park (@jimmy-park)
* Oliver Welsh (@oliverwelsh)
* Volker Schlecht (@VlkrS)



4 changes: 2 additions & 2 deletions deps/cares/aclocal.m4
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.71],,
[m4_warning([this file was generated for autoconf 2.71.
m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.72],,
[m4_warning([this file was generated for autoconf 2.72.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically 'autoreconf'.])])
Expand Down
2 changes: 1 addition & 1 deletion deps/cares/aminclude_static.am
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

# aminclude_static.am generated automatically by Autoconf
# from AX_AM_MACROS_STATIC on Fri May 24 08:50:03 CEST 2024
# from AX_AM_MACROS_STATIC on Fri Jun 7 06:50:45 EDT 2024


# Code coverage
Expand Down
Loading

0 comments on commit bf891bf

Please sign in to comment.