diff options
author | Alexey Firago <alexey_firago@mentor.com> | 2017-07-27 00:08:32 +0300 |
---|---|---|
committer | Joe MacDonald <joe_macdonald@mentor.com> | 2017-09-08 16:38:56 -0400 |
commit | 12f2fed08311359d703446ed6c4271733a505645 (patch) | |
tree | f2f79da09ec3247e59d47911032eb1e226955bea /meta-networking/recipes-support/c-ares | |
parent | 7a13a2e45b26c22476f6b08a3008c6fc287acc62 (diff) | |
download | meta-openembedded-12f2fed08311359d703446ed6c4271733a505645.tar.gz |
c-ares: update 1.12.0 -> 1.13.0
Update to c-ares version 1.13.0 from June 20 2017
Recipe updates:
* Change SRC_URI to github, because tarball at
https://c-ares.haxx.se/download/c-ares-1.13.0.tar.gz
does not include all required files (cmake related).
* Change build method to cmake. Library now supports cmake
build system and installs *.cmake config files. These files can
be used by several libraries/packages, such as gRPC, curl.
* Add patch to generate and install libcares.pc during cmake build.
* Add -utils package for the utilities installed during cmake build
(acountry, adig, ahost).
Highlights of library changes and bug fixes:
* cmake build system support added
* Add virtual function set for socket IO: ares_set_socket_functions
* CVE-2017-1000381: c-ares NAPTR parser out of bounds access
Full changelog - https://c-ares.haxx.se/changelog.html
Signed-off-by: Alexey Firago <alexey_firago@mentor.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
Diffstat (limited to 'meta-networking/recipes-support/c-ares')
4 files changed, 127 insertions, 41 deletions
diff --git a/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch b/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch deleted file mode 100644 index 10fad4e941..0000000000 --- a/meta-networking/recipes-support/c-ares/c-ares/0001-configure.ac-don-t-override-passed-cflags.patch +++ /dev/null | |||
@@ -1,26 +0,0 @@ | |||
1 | From 2a7236d2a7bb9c3d3c3f44ebf59404bf7134fcb3 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> | ||
3 | Date: Tue, 12 Apr 2016 11:37:28 +0100 | ||
4 | Subject: [PATCH] configure.ac: don't override passed cflags | ||
5 | |||
6 | We are controlling debug and optimiser flags from OE | ||
7 | --- | ||
8 | configure.ac | 2 -- | ||
9 | 1 file changed, 2 deletions(-) | ||
10 | |||
11 | diff --git a/configure.ac b/configure.ac | ||
12 | index 5c02450..3cf9fcd 100644 | ||
13 | --- a/configure.ac | ||
14 | +++ b/configure.ac | ||
15 | @@ -147,8 +147,6 @@ dnl ********************************************************************** | ||
16 | |||
17 | CARES_CHECK_COMPILER | ||
18 | CARES_SET_COMPILER_BASIC_OPTS | ||
19 | -CARES_SET_COMPILER_DEBUG_OPTS | ||
20 | -CARES_SET_COMPILER_OPTIMIZE_OPTS | ||
21 | CARES_SET_COMPILER_WARNING_OPTS | ||
22 | |||
23 | if test "$compiler_id" = "INTEL_UNIX_C"; then | ||
24 | -- | ||
25 | 2.8.0.rc3 | ||
26 | |||
diff --git a/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch b/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch new file mode 100644 index 0000000000..5dd4c7d772 --- /dev/null +++ b/meta-networking/recipes-support/c-ares/c-ares/cmake-install-libcares.pc.patch | |||
@@ -0,0 +1,105 @@ | |||
1 | From 7e1ae687916fd5878ee755afbdea6b10494e0b92 Mon Sep 17 00:00:00 2001 | ||
2 | From: Alexey Firago <alexey_firago@mentor.com> | ||
3 | Date: Wed, 26 Jul 2017 23:21:25 +0300 | ||
4 | Subject: [PATCH] cmake: Install libcares.pc | ||
5 | |||
6 | Prepare and install libcares.pc file during cmake build, so libraries | ||
7 | using pkg-config to find libcares will not fail. | ||
8 | |||
9 | Signed-off-by: Alexey Firago <alexey_firago@mentor.com> | ||
10 | --- | ||
11 | CMakeLists.txt | 21 +++++++++++++++++++++ | ||
12 | libcares.pc.cmakein | 20 ++++++++++++++++++++ | ||
13 | 2 files changed, 41 insertions(+) | ||
14 | create mode 100644 libcares.pc.cmakein | ||
15 | |||
16 | diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
17 | index 364b6c7..0016b67 100644 | ||
18 | --- a/CMakeLists.txt | ||
19 | +++ b/CMakeLists.txt | ||
20 | @@ -173,21 +173,29 @@ ADD_DEFINITIONS(${SYSFLAGS}) | ||
21 | |||
22 | |||
23 | # Tell C-Ares about libraries to depend on | ||
24 | +# Also pass these libraries to pkg-config file | ||
25 | +SET(CARES_PRIVATE_LIBS_LIST) | ||
26 | IF (HAVE_LIBRESOLV) | ||
27 | LIST (APPEND CARES_DEPENDENT_LIBS resolv) | ||
28 | + LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lresolv") | ||
29 | ENDIF () | ||
30 | IF (HAVE_LIBNSL) | ||
31 | LIST (APPEND CARES_DEPENDENT_LIBS nsl) | ||
32 | + LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lnsl") | ||
33 | ENDIF () | ||
34 | IF (HAVE_LIBSOCKET) | ||
35 | LIST (APPEND CARES_DEPENDENT_LIBS socket) | ||
36 | + LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lsocket") | ||
37 | ENDIF () | ||
38 | IF (HAVE_LIBRT) | ||
39 | LIST (APPEND CARES_DEPENDENT_LIBS rt) | ||
40 | + LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lrt") | ||
41 | ENDIF () | ||
42 | IF (WIN32) | ||
43 | LIST (APPEND CARES_DEPENDENT_LIBS ws2_32) | ||
44 | + LIST (APPEND CARES_PRIVATE_LIBS_LIST "-lws2_32") | ||
45 | ENDIF () | ||
46 | +string (REPLACE ";" " " CARES_PRIVATE_LIBS "${CARES_PRIVATE_LIBS_LIST}") | ||
47 | |||
48 | |||
49 | # When checking for symbols, we need to make sure we set the proper | ||
50 | @@ -489,6 +497,13 @@ CONFIGURE_FILE (ares_build.h.cmake ${PROJECT_BINARY_DIR}/ares_build.h) | ||
51 | # Write ares_config.h configuration file. This is used only for the build. | ||
52 | CONFIGURE_FILE (ares_config.h.cmake ${PROJECT_BINARY_DIR}/ares_config.h) | ||
53 | |||
54 | +# Pass required CFLAGS to pkg-config in case of static library | ||
55 | +IF (CARES_STATIC) | ||
56 | + SET (CPPFLAG_CARES_STATICLIB "-DCARES_STATICLIB") | ||
57 | +ENDIF() | ||
58 | + | ||
59 | +# Write ares_config.h configuration file. This is used only for the build. | ||
60 | +CONFIGURE_FILE (libcares.pc.cmakein ${PROJECT_BINARY_DIR}/libcares.pc @ONLY) | ||
61 | |||
62 | # TRANSFORM_MAKEFILE_INC | ||
63 | # | ||
64 | @@ -625,6 +640,12 @@ IF (CARES_INSTALL) | ||
65 | INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}-config.cmake" DESTINATION ${CMAKECONFIG_INSTALL_DIR}) | ||
66 | ENDIF () | ||
67 | |||
68 | +# pkg-config file | ||
69 | +IF (CARES_INSTALL) | ||
70 | + SET (PKGCONFIG_INSTALL_DIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig") | ||
71 | + INSTALL (FILES "${CMAKE_CURRENT_BINARY_DIR}/libcares.pc" DESTINATION ${PKGCONFIG_INSTALL_DIR}) | ||
72 | +ENDIF () | ||
73 | + | ||
74 | # Legacy chain-building variables (provided for compatibility with old code). | ||
75 | # Don't use these, external code should be updated to refer to the aliases directly (e.g., Cares::cares). | ||
76 | SET (CARES_FOUND 1 CACHE INTERNAL "CARES LIBRARY FOUND") | ||
77 | diff --git a/libcares.pc.cmakein b/libcares.pc.cmakein | ||
78 | new file mode 100644 | ||
79 | index 0000000..f29fede | ||
80 | --- /dev/null | ||
81 | +++ b/libcares.pc.cmakein | ||
82 | @@ -0,0 +1,20 @@ | ||
83 | +#*************************************************************************** | ||
84 | +# Project ___ __ _ _ __ ___ ___ | ||
85 | +# / __|____ / _` | '__/ _ \/ __| | ||
86 | +# | (_|_____| (_| | | | __/\__ \ | ||
87 | +# \___| \__,_|_| \___||___/ | ||
88 | +# | ||
89 | +prefix=@CMAKE_INSTALL_PREFIX@ | ||
90 | +exec_prefix=@CMAKE_INSTALL_PREFIX@ | ||
91 | +libdir=@CMAKE_INSTALL_FULL_LIBDIR@ | ||
92 | +includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@ | ||
93 | + | ||
94 | +Name: c-ares | ||
95 | +URL: http://daniel.haxx.se/projects/c-ares/ | ||
96 | +Description: asynchronous DNS lookup library | ||
97 | +Version: @VERSION@ | ||
98 | +Requires: | ||
99 | +Requires.private: | ||
100 | +Cflags: -I${includedir} @CPPFLAG_CARES_STATICLIB@ | ||
101 | +Libs: -L${libdir} -lcares | ||
102 | +Libs.private: @CARES_PRIVATE_LIBS@ | ||
103 | -- | ||
104 | 2.7.4 | ||
105 | |||
diff --git a/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb b/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb deleted file mode 100644 index 4e28d6abc6..0000000000 --- a/meta-networking/recipes-support/c-ares/c-ares_1.12.0.bb +++ /dev/null | |||
@@ -1,15 +0,0 @@ | |||
1 | # Copyright (c) 2012-2014 LG Electronics, Inc. | ||
2 | |||
3 | SUMMARY = "c-ares is a C library that resolves names asynchronously." | ||
4 | HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/" | ||
5 | SECTION = "libs" | ||
6 | LICENSE = "MIT" | ||
7 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac" | ||
8 | |||
9 | SRC_URI = "http://c-ares.haxx.se/download/${BP}.tar.gz \ | ||
10 | file://0001-configure.ac-don-t-override-passed-cflags.patch \ | ||
11 | " | ||
12 | SRC_URI[md5sum] = "2ca44be1715cd2c5666a165d35788424" | ||
13 | SRC_URI[sha256sum] = "8692f9403cdcdf936130e045c84021665118ee9bfea905d1a76f04d4e6f365fb" | ||
14 | |||
15 | inherit autotools pkgconfig | ||
diff --git a/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb b/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb new file mode 100644 index 0000000000..8d297aa4a7 --- /dev/null +++ b/meta-networking/recipes-support/c-ares/c-ares_1.13.0.bb | |||
@@ -0,0 +1,22 @@ | |||
1 | # Copyright (c) 2012-2014 LG Electronics, Inc. | ||
2 | SUMMARY = "c-ares is a C library that resolves names asynchronously." | ||
3 | HOMEPAGE = "http://daniel.haxx.se/projects/c-ares/" | ||
4 | SECTION = "libs" | ||
5 | LICENSE = "MIT" | ||
6 | LIC_FILES_CHKSUM = "file://LICENSE.md;md5=f4b026880834eb01c035c5e5cb47ccac" | ||
7 | SRCREV = "3be1924221e1326df520f8498d704a5c4c8d0cce" | ||
8 | PV = "1.13.0+gitr${SRCPV}" | ||
9 | |||
10 | SRC_URI = "\ | ||
11 | git://github.com/c-ares/c-ares.git \ | ||
12 | file://cmake-install-libcares.pc.patch \ | ||
13 | " | ||
14 | |||
15 | S = "${WORKDIR}/git" | ||
16 | |||
17 | inherit cmake pkgconfig | ||
18 | |||
19 | PACKAGES =+ "${PN}-utils" | ||
20 | |||
21 | FILES_${PN}-dev += "${libdir}/cmake" | ||
22 | FILES_${PN}-utils = "${bindir}" | ||