Skip to content

Commit

Permalink
Merge branch 'c-ares:main' into DoT
Browse files Browse the repository at this point in the history
  • Loading branch information
bradh352 authored Dec 29, 2024
2 parents 17abfcb + d10a714 commit faa9721
Show file tree
Hide file tree
Showing 55 changed files with 1,233 additions and 461 deletions.
35 changes: 35 additions & 0 deletions .github/scripts/qnx_tests.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/sh
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
set -e

echo " * Extracting tests..."
tar -C /system/lib/ -xvf gtest.tar
tar -xvf cares-bin.tar
tar -xvf cares-lib.tar

echo " * Running Tests"

echo " * adig test"
./adig www.google.com

echo ""
echo " * ahost test"
./ahost www.google.com

echo ""
echo " * arestest suite"
./arestest www.google.com --gtest_filter="-*LiveSearchTXT*:*LiveSearchANY*:*ServiceName*"
echo ""

nsip=`grep ^nameserver /etc/resolv.conf | head -n 1 | cut -d ' ' -f 2`
echo " * Changing DNS Configuration to use confstr(resolve, ${nsip}) and rerunning adig and ahost"
setconf resolve nameserver_${nsip}
rm -f /etc/resolv.conf

echo ""
echo " * adig test"
./adig www.google.com

echo " * ahost test"
./ahost www.google.com
2 changes: 1 addition & 1 deletion .github/workflows/alpine-latest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
steps:
- name: Install packages
run: |
apk add bash cmake samurai gtest-dev autoconf autoconf-archive automake libtool pkgconf make clang17 clang17-analyzer compiler-rt lldb gcc g++ valgrind gdb sudo
apk add bash cmake samurai gtest-dev autoconf autoconf-archive automake libtool pkgconf make clang clang-analyzer compiler-rt lldb gcc g++ valgrind gdb sudo
- name: Checkout c-ares
uses: actions/checkout@v4
- name: "Make sure TCP FastOpen is enabled"
Expand Down
3 changes: 0 additions & 3 deletions .github/workflows/msys2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,6 @@ jobs:
include:
- { msystem: CLANG64, env: clang-x86_64, extra_packages: "mingw-w64-clang-x86_64-clang mingw-w64-clang-x86_64-clang-analyzer" }
- { msystem: MINGW64, env: x86_64, extra_packages: "mingw-w64-x86_64-gcc" }
- { msystem: MINGW32, env: i686, extra_packages: "mingw-w64-i686-gcc" }
# No need to test UCRT64 since clang64 uses UCRT
# - { msystem: UCRT64, env: ucrt-x86_64 }
defaults:
run:
shell: msys2 {0}
Expand Down
111 changes: 111 additions & 0 deletions .github/workflows/qnx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
name: QNX
on:
push:

concurrency:
group: ${{ github.ref }}-qnx
cancel-in-progress: true

env:
CC: qcc
CXX: q++
CFLAGS: "-V gcc_ntox86_64"
CXXFLAGS: "-V gcc_ntox86_64"
CPUVARDIR: "x86_64"

jobs:
build:
runs-on: ubuntu-latest
name: "QNX"
steps:
- name: Install packages
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: cmake ninja-build autoconf automake libtool qemu-user qemu-system-x86 qemu-utils bridge-utils net-tools libvirt-clients libvirt-daemon-system
version: 1.0
# Logic for intalling SDP taken right out of https://github.com/qnx-ports/build-files/blob/main/.github/workflows/c-ares.yml
- name: Download SDP 8.0
env:
QNX_LICENSE_KEY: ${{ secrets.QNX_LICENSE_KEY }}
QNX_USER: ${{ secrets.QNX_USER }}
QNX_PASSWORD: ${{ secrets.QNX_PASSWORD }}
run: |
[ -z "${QNX_USER}" -o -z "${QNX_PASSWORD}" -o -z "${QNX_LICENSE_KEY}" ] && echo "Must set QNX_USER, QNX_PASSWORD, and QNX_LICENSE_KEY" && /bin/false
echo "Downloading QNX Software Center ..."
mkdir ${{ github.workspace }}/.qnx
curl --cookie-jar ${{ github.workspace }}/.qnx/myqnxcookies.auth --form "userlogin=$QNX_USER" --form "password=$QNX_PASSWORD" -X POST https://www.qnx.com/account/login.html > login_response.html
curl -L --cookie ${{ github.workspace }}/.qnx/myqnxcookies.auth https://www.qnx.com/download/download/77351/qnx-setup-2.0.3-202408131717-linux.run > qnx-setup-lin.run
chmod a+x qnx-setup-lin.run
./qnx-setup-lin.run force-override disable-auto-start agree-to-license-terms ${{ github.workspace }}/qnxinstall
echo "Installing License ..."
${{ github.workspace }}/qnxinstall/qnxsoftwarecenter/qnxsoftwarecenter_clt -syncLicenseKeys -myqnx.user="$QNX_USER" -myqnx.password="$QNX_PASSWORD" -addLicenseKey $QNX_LICENSE_KEY
cp -r ~/.qnx/license ${{ github.workspace }}/.qnx
echo "Downloading QNX SDP ..."
${{ github.workspace }}/qnxinstall/qnxsoftwarecenter/qnxsoftwarecenter_clt -mirror -cleanInstall -destination ${{ github.workspace }}/qnx800 -installBaseline com.qnx.qnx800 -myqnx.user="$QNX_USER" -myqnx.password="$QNX_PASSWORD"
- name: Checkout qnx-ports build-files
uses: actions/checkout@v4
with:
repository: qnx-ports/build-files
path: build-files
- name: Checkout qnx-ports googletest
uses: actions/checkout@v4
with:
repository: qnx-ports/googletest
path: googletest
- name: Build googletest
run: |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh"
PREFIX="/usr" BUILD_TESTING="OFF" QNX_PROJECT_ROOT="$(pwd)/googletest" make -C build-files/ports/googletest install -j$(nproc)
- name: Checkout c-ares
uses: actions/checkout@v4
with:
path: c-ares
- name: Set CMAKE_FIND_ROOT_PATH
run: |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh"
echo "QNX_TARGET=${QNX_TARGET}" >> $GITHUB_ENV
echo "CMAKE_FIND_ROOT_PATH=${QNX_TARGET};${QNX_TARGET}/${CPUVARDIR}" >> $GITHUB_ENV
- name: "CMake: build c-ares"
env:
BUILD_TYPE: CMAKE
CMAKE_FLAGS: "-DCMAKE_BUILD_TYPE=DEBUG -DCARES_STATIC=ON -DCARES_STATIC_PIC=ON -DCARES_BUILD_TESTS=ON -G Ninja -DCMAKE_SYSTEM_NAME=QNX -DCMAKE_FIND_ROOT_PATH=${{ env.CMAKE_FIND_ROOT_PATH }} -DCMAKE_FIND_ROOT_PATH_MODE_PROGRAM=NEVER -DCMAKE_FIND_ROOT_PATH_MODE_LIBRARY=ONLY -DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY"
run: |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh"
cd c-ares
./ci/build.sh
- name: "Autotools: build c-ares"
env:
BUILD_TYPE: autotools
PKG_CONFIG_PATH: "${{ env.QNX_TARGET }}/${{ env.CPUVARDIR }}/usr/lib/pkgconfig"
CONFIG_OPTS: "--host=x86_64-unknown-nto-qnx8.0.0 --enable-tests-crossbuild"
run: |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh"
cd c-ares
./ci/build.sh
- name: "QNX: Run test cases"
run: |
source "${{ github.workspace }}/qnx800/qnxsdp-env.sh"
echo " * Create QNX Image"
mkdir qnximage
cd qnximage
ssh-keygen -q -t ed25519 -N '' -f ${HOME}/.ssh/id_ed25519
mkqnximage --ssh-ident=${HOME}/.ssh/id_ed25519.pub --ip=dhcp --build --type=qemu --hostname=qnx8 --data-size=1000 --sys-size=1000
echo " * Prestart QNX Image to set up networking as non-root"
mkqnximage --run=-h
mkqnximage --stop
echo " * Start QNX Image"
sudo -E env PATH=${PATH} mkqnximage --run=-h
QNX_IP=`sudo -E env PATH=${PATH} mkqnximage --getip`
echo "QNX_IP=${QNX_IP}" >> $GITHUB_ENV
echo " * Running on ${QNX_IP}"
cd ..
echo " * Creating archives to send to QNX..."
( cd ${QNX_TARGET}/x86_64/usr/lib && tar -cvf "${{ github.workspace }}/gtest.tar" libgmock*.so* libgtest*.so* )
tar -C c-ares/cmakebld/bin/ -cvf cares-bin.tar .
tar -C c-ares/cmakebld/lib/ -cvf cares-lib.tar .
echo " * Copying tests to QNX"
scp -o StrictHostKeyChecking=no *.tar c-ares/.github/scripts/qnx_tests.sh root@${QNX_IP}:
echo " * Executing ..."
ssh root@${QNX_IP} sh ./qnx_tests.sh
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Copyright (C) The c-ares project and its contributors
# SPDX-License-Identifier: MIT
CMAKE_MINIMUM_REQUIRED (VERSION 3.5.0)
CMAKE_MINIMUM_REQUIRED (VERSION 3.5.0...3.10.0)

list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/")

Expand All @@ -12,7 +12,7 @@ INCLUDE (CheckCSourceCompiles)
INCLUDE (CheckStructHasMember)
INCLUDE (CheckLibraryExists)

PROJECT (c-ares LANGUAGES C VERSION "1.34.3" )
PROJECT (c-ares LANGUAGES C VERSION "1.34.4" )

# Set this version before release
SET (CARES_VERSION "${PROJECT_VERSION}")
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 "21:2:19")
SET (CARES_LIB_VERSIONINFO "21:3:19")


OPTION (CARES_STATIC "Build as a static library" OFF)
Expand Down Expand Up @@ -272,6 +272,8 @@ ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "AIX")
LIST (APPEND SYSFLAGS -D_ALL_SOURCE -D_XOPEN_SOURCE=700 -D_USE_IRS)
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD")
# Don't define _XOPEN_SOURCE on FreeBSD, it actually reduces visibility instead of increasing it
ELSEIF (CMAKE_SYSTEM_NAME STREQUAL "QNX")
LIST (APPEND SYSFLAGS -D_QNX_SOURCE)
ELSEIF (WIN32)
LIST (APPEND SYSFLAGS -DWIN32_LEAN_AND_MEAN -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE -D_WIN32_WINNT=0x0602)
ENDIF ()
Expand Down Expand Up @@ -407,6 +409,7 @@ ENDIF ()

CHECK_STRUCT_HAS_MEMBER("struct sockaddr_in6" sin6_scope_id "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRUCT_SOCKADDR_IN6_SIN6_SCOPE_ID LANGUAGE C)

CHECK_SYMBOL_EXISTS (strnlen "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_STRNLEN)
CHECK_SYMBOL_EXISTS (memmem "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_MEMMEM)
CHECK_SYMBOL_EXISTS (closesocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET)
CHECK_SYMBOL_EXISTS (CloseSocket "${CMAKE_EXTRA_INCLUDE_FILES}" HAVE_CLOSESOCKET_CAMEL)
Expand Down
29 changes: 18 additions & 11 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,24 @@
# Copyright (C) the Massachusetts Institute of Technology.
# Copyright (C) Daniel Stenberg
#
# Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without
# fee is hereby granted, provided that the above copyright
# notice appear in all copies and that both that copyright
# notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in
# advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.
# M.I.T. makes no representations about the suitability of
# this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT
#
Expand Down
29 changes: 18 additions & 11 deletions Makefile.msvc
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@

# Copyright (C) 2009-2013 by Daniel Stenberg
#
# Permission to use, copy, modify, and distribute this
# software and its documentation for any purpose and without
# fee is hereby granted, provided that the above copyright
# notice appear in all copies and that both that copyright
# notice and this permission notice appear in supporting
# documentation, and that the name of M.I.T. not be used in
# advertising or publicity pertaining to distribution of the
# software without specific, written prior permission.
# M.I.T. makes no representations about the suitability of
# this software for any purpose. It is provided "as is"
# without express or implied warranty.
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice (including the next
# paragraph) shall be included in all copies or substantial portions of the
# Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.
#
# SPDX-License-Identifier: MIT

Expand Down
100 changes: 14 additions & 86 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
@@ -1,97 +1,25 @@
## c-ares version 1.34.3 - November 9 2024
## c-ares version 1.34.4 - December 14 2024

This is a bugfix release.

Changes:
* Build the release package in an automated way so we can provide
provenance as per [SLSA3](https://slsa.dev/).
[PR #906](https://github.com/c-ares/c-ares/pull/906)
* QNX Port: Port to QNX 8, add primary config reading support, add CI build. [PR #934](https://github.com/c-ares/c-ares/pull/934), [PR #937](https://github.com/c-ares/c-ares/pull/937), [PR #938](https://github.com/c-ares/c-ares/pull/938)

Bugfixes:
* Some upstream servers are non-compliant with EDNS options, resend queries
without EDNS. [Issue #911](https://github.com/c-ares/c-ares/issues/911)
* Android: <=7 needs sys/system_properties.h
[a70637c](https://github.com/c-ares/c-ares/commit/a70637c)
* Android: CMake needs `-D_GNU_SOURCE` and others.
[PR #915](https://github.com/c-ares/c-ares/pull/914)
* TSAN warns on missing lock, but lock isn't actually necessary.
[PR #915](https://github.com/c-ares/c-ares/pull/915)
* `ares_getaddrinfo()` for `AF_UNSPEC` should retry IPv4 if only IPv6 is
received. [765d558](https://github.com/c-ares/c-ares/commit/765d558)
* `ares_send()` shouldn't return `ARES_EBADRESP`, its `ARES_EBADQUERY`.
[91519e7](https://github.com/c-ares/c-ares/commit/91519e7)
* Fix typos in man pages. [PR #905](https://github.com/c-ares/c-ares/pull/905)
* Empty TXT records were not being preserved. [PR #922](https://github.com/c-ares/c-ares/pull/922)
* docs: update deprecation notices for `ares_create_query()` and `ares_mkquery()`. [PR #910](https://github.com/c-ares/c-ares/pull/910)
* license: some files weren't properly updated. [PR #920](https://github.com/c-ares/c-ares/pull/920)
* Fix bind local device regression from 1.34.0. [PR #929](https://github.com/c-ares/c-ares/pull/929), [PR #931](https://github.com/c-ares/c-ares/pull/931), [PR #935](https://github.com/c-ares/c-ares/pull/935)
* CMake: set policy version to prevent deprecation warnings. [PR #932](https://github.com/c-ares/c-ares/pull/932)
* CMake: shared and static library names should be the same on unix platforms like autotools uses. [PR #933](https://github.com/c-ares/c-ares/pull/933)
* Update to latest autoconf archive macros for enhanced system compatibility. [PR #936](https://github.com/c-ares/c-ares/pull/936)

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

* Brad House (@bradh352)
* Jiwoo Park (@jimmy-park)


## c-ares version 1.34.2 - October 15 2024

This release contains a fix for downstream packages detecting the c-ares
version based on the contents of the header file rather than the
distributed pkgconf or cmake files.

## c-ares version 1.34.1 - October 9 2024

This release fixes a packaging issue.


## c-ares version 1.34.0 - October 9 2024

This is a feature and bugfix release.

Features:
* adig: read arguments from adigrc.
[PR #856](https://github.com/c-ares/c-ares/pull/856)
* Add new pending write callback optimization via `ares_set_pending_write_cb`.
[PR #857](https://github.com/c-ares/c-ares/pull/857)
* New function `ares_process_fds()`.
[PR #875](https://github.com/c-ares/c-ares/pull/875)
* Failed servers should be probed rather than redirecting queries which could
cause unexpected latency.
[PR #877](https://github.com/c-ares/c-ares/pull/877)
* adig: rework command line arguments to mimic dig from bind.
[PR #890](https://github.com/c-ares/c-ares/pull/890)
* Add new method for overriding network functions
`ares_set_socket_function_ex()` to properly support all new functionality.
[PR #894](https://github.com/c-ares/c-ares/pull/894)
* Fix regression with custom socket callbacks due to DNS cookie support.
[PR #895](https://github.com/c-ares/c-ares/pull/895)
* ares_socket: set IP_BIND_ADDRESS_NO_PORT on ares_set_local_ip* tcp sockets
[PR #887](https://github.com/c-ares/c-ares/pull/887)
* URI parser/writer for ares_set_servers_csv()/ares_get_servers_csv().
[PR #882](https://github.com/c-ares/c-ares/pull/882)

Changes:
* Connection handling modularization.
[PR #857](https://github.com/c-ares/c-ares/pull/857),
[PR #876](https://github.com/c-ares/c-ares/pull/876)
* Expose library/utility functions to tools.
[PR #860](https://github.com/c-ares/c-ares/pull/860)
* Remove `ares__` prefix, just use `ares_` for internal functions.
[PR #872](https://github.com/c-ares/c-ares/pull/872)


Bugfixes:
* fix: potential WIN32_LEAN_AND_MEAN redefinition.
[PR #869](https://github.com/c-ares/c-ares/pull/869)
* Fix googletest v1.15 compatibility.
[PR #874](https://github.com/c-ares/c-ares/pull/874)
* Fix pkgconfig thread dependencies.
[PR #884](https://github.com/c-ares/c-ares/pull/884)


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

* Brad House (@bradh352)
* Cristian Rodríguez (@crrodriguez)
* Georg (@tacerus)
* @lifenjoiner
* Shelley Vohr (@codebytere)
* 前进,前进,进 (@leleliu008)

* Daniel Stenberg (@bagder)
* Gregor Jasny (@gjasny)
* @marcovsz
* Nikolaos Chatzikonstantinou (@createyourpersonalaccount)
* @vlasovsoft1979
Loading

0 comments on commit faa9721

Please sign in to comment.