diff options
Diffstat (limited to 'meta-networking/recipes-support/unbound')
-rw-r--r-- | meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch | 44 | ||||
-rw-r--r-- | meta-networking/recipes-support/unbound/unbound/run-ptest | 17 | ||||
-rw-r--r-- | meta-networking/recipes-support/unbound/unbound_1.22.0.bb (renamed from meta-networking/recipes-support/unbound/unbound_1.19.3.bb) | 35 |
3 files changed, 91 insertions, 5 deletions
diff --git a/meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch b/meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch new file mode 100644 index 0000000000..70a41f7e37 --- /dev/null +++ b/meta-networking/recipes-support/unbound/unbound/0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch | |||
@@ -0,0 +1,44 @@ | |||
1 | From 1c58ce07919c36e6a11eead67bd6d14cc22acaec Mon Sep 17 00:00:00 2001 | ||
2 | From: "mark.yang" <mark.yang@lge.com> | ||
3 | Date: Wed, 2 Apr 2025 15:25:42 +0900 | ||
4 | Subject: [PATCH] fix build with gcc-15 -Wbuiltin-declaration-mismatch error | ||
5 | |||
6 | See more details: http://errors.yoctoproject.org/Errors/Details/850313 | ||
7 | ../git/compat/malloc.c:9:7: warning: conflicting types for built-in function 'malloc'; expected 'void *(long unsigned int)' [-Wbuiltin-declaration-mismatch] | ||
8 | 9 | void *malloc (); | ||
9 | | ^~~~~~ | ||
10 | ../git/compat/malloc.c:5:1: note: 'malloc' is declared in header '<stdlib.h>' | ||
11 | 4 | #include "config.h" | ||
12 | +++ |+#include <stdlib.h> | ||
13 | 5 | #undef malloc | ||
14 | ../git/compat/malloc.c: In function 'rpl_malloc_unbound': | ||
15 | ../git/compat/malloc.c:23:10: error: too many arguments to function 'malloc'; expected 0, have 1 | ||
16 | 23 | return malloc (n); | ||
17 | | ^~~~~~ ~ | ||
18 | ../git/compat/malloc.c:9:7: note: declared here | ||
19 | 9 | void *malloc (); | ||
20 | | ^~~~~~ | ||
21 | |||
22 | * Seeing that there is '#undef malloc', it appears they don't want to | ||
23 | use the malloc from stdlib.h. | ||
24 | Therefore, we need to correctly define the parameters for malloc. | ||
25 | |||
26 | Upstream-Status: Submitted [https://github.com/NLnetLabs/unbound/pull/1262] | ||
27 | Signed-off-by: mark.yang <mark.yang@lge.com> | ||
28 | --- | ||
29 | compat/malloc.c | 2 +- | ||
30 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
31 | |||
32 | diff --git a/compat/malloc.c b/compat/malloc.c | ||
33 | index d8097b13e..af9dcf134 100644 | ||
34 | --- a/compat/malloc.c | ||
35 | +++ b/compat/malloc.c | ||
36 | @@ -6,7 +6,7 @@ | ||
37 | #include <sys/types.h> | ||
38 | |||
39 | #ifndef USE_WINSOCK | ||
40 | -void *malloc (); | ||
41 | +void *malloc (size_t n); | ||
42 | #else | ||
43 | /* provide a prototype */ | ||
44 | void *malloc (size_t n); | ||
diff --git a/meta-networking/recipes-support/unbound/unbound/run-ptest b/meta-networking/recipes-support/unbound/unbound/run-ptest new file mode 100644 index 0000000000..433a687c65 --- /dev/null +++ b/meta-networking/recipes-support/unbound/unbound/run-ptest | |||
@@ -0,0 +1,17 @@ | |||
1 | #!/bin/sh | ||
2 | |||
3 | cd tests || exit 1 | ||
4 | retVal=0 | ||
5 | ./unittest | ||
6 | ./testbound -s | ||
7 | for x in ./testdata/*.rpl; do | ||
8 | output="$(./testbound -p $x -o -vvvvv 2>&1)" | ||
9 | if test $? -eq 0; then | ||
10 | echo "$x :Pass" | ||
11 | else | ||
12 | echo "$output" | ||
13 | echo "$x :Fail" | ||
14 | retVal=1 | ||
15 | fi | ||
16 | done | ||
17 | exit $retVal | ||
diff --git a/meta-networking/recipes-support/unbound/unbound_1.19.3.bb b/meta-networking/recipes-support/unbound/unbound_1.22.0.bb index ffdc78e9d6..c35148b77e 100644 --- a/meta-networking/recipes-support/unbound/unbound_1.19.3.bb +++ b/meta-networking/recipes-support/unbound/unbound_1.22.0.bb | |||
@@ -9,18 +9,26 @@ SECTION = "net" | |||
9 | LICENSE = "BSD-3-Clause" | 9 | LICENSE = "BSD-3-Clause" |
10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" | 10 | LIC_FILES_CHKSUM = "file://LICENSE;md5=5308494bc0590c0cb036afd781d78f06" |
11 | 11 | ||
12 | SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=branch-1.19.3" | 12 | SRC_URI = "git://github.com/NLnetLabs/unbound.git;protocol=https;branch=master \ |
13 | SRCREV = "48b6c60a24e9a5d6d369a7a37c9fe2a767f26abd" | 13 | file://run-ptest \ |
14 | file://0001-fix-build-with-gcc-15-Wbuiltin-declaration-mismatch-.patch \ | ||
15 | " | ||
14 | 16 | ||
15 | inherit autotools pkgconfig systemd update-rc.d | 17 | # 17 commits after 1.22.0 tag: |
18 | # https://github.com/NLnetLabs/unbound/compare/release-1.22.0...7985d17b57d25be262de56c29a43ae4b61c1b896 | ||
19 | # to include fix for occasional build failure: | ||
20 | # https://github.com/NLnetLabs/unbound/commit/46cfbf313d812a6e50614a691e162b171dc91d7b | ||
21 | PV .= "+git" | ||
22 | SRCREV = "7985d17b57d25be262de56c29a43ae4b61c1b896" | ||
23 | |||
24 | inherit autotools pkgconfig systemd update-rc.d ptest | ||
16 | 25 | ||
17 | DEPENDS = "openssl libtool-native bison-native expat" | 26 | DEPENDS = "openssl libtool-native bison-native expat" |
18 | RDEPENDS:${PN} = "bash openssl-bin daemonize" | 27 | RDEPENDS:${PN} = "bash openssl-bin daemonize" |
19 | 28 | ||
20 | S = "${WORKDIR}/git" | ||
21 | 29 | ||
22 | EXTRA_OECONF = "--with-libexpat=${STAGING_EXECPREFIXDIR} \ | 30 | EXTRA_OECONF = "--with-libexpat=${STAGING_EXECPREFIXDIR} \ |
23 | --with-ssl=${STAGING_EXECPREFIXDIR} \ | 31 | --disable-rpath --with-ssl=${STAGING_EXECPREFIXDIR} \ |
24 | --enable-largefile" | 32 | --enable-largefile" |
25 | 33 | ||
26 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" | 34 | PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'systemd', d)}" |
@@ -32,6 +40,10 @@ do_configure:append() { | |||
32 | sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h | 40 | sed -i -e 's#${RECIPE_SYSROOT}##g' ${B}/config.h |
33 | } | 41 | } |
34 | 42 | ||
43 | do_compile:append() { | ||
44 | oe_runmake tests | ||
45 | } | ||
46 | |||
35 | do_install:append() { | 47 | do_install:append() { |
36 | install -d ${D}${systemd_unitdir}/system | 48 | install -d ${D}${systemd_unitdir}/system |
37 | install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system | 49 | install -m 0644 ${B}/contrib/unbound.service ${D}${systemd_unitdir}/system |
@@ -40,6 +52,19 @@ do_install:append() { | |||
40 | install -m 0755 ${S}/contrib/unbound.init_yocto ${D}${sysconfdir}/init.d/unbound | 52 | install -m 0755 ${S}/contrib/unbound.init_yocto ${D}${sysconfdir}/init.d/unbound |
41 | } | 53 | } |
42 | 54 | ||
55 | do_install_ptest() { | ||
56 | install -d ${D}${PTEST_PATH}/tests | ||
57 | install -d ${D}${PTEST_PATH}/tests/testdata | ||
58 | |||
59 | install -m 0544 ${B}/unittest ${D}${PTEST_PATH}/tests/ | ||
60 | install -m 0544 ${B}/testbound ${D}${PTEST_PATH}/tests/ | ||
61 | install -m 0664 ${S}/testdata/test_signatures* ${D}${PTEST_PATH}/tests/ | ||
62 | install -m 0664 ${S}/testdata/test_sigs* ${D}${PTEST_PATH}/tests/ | ||
63 | install -m 0664 ${S}/testdata/test_ds* ${D}${PTEST_PATH}/tests/ | ||
64 | install -m 0664 ${S}/testdata/test_nsec3_hash* ${D}${PTEST_PATH}/tests/ | ||
65 | install -m 0644 ${S}/testdata/*.rpl ${D}/${PTEST_PATH}/tests/testdata/ | ||
66 | } | ||
67 | |||
43 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" | 68 | SYSTEMD_SERVICE:${PN} = "${BPN}.service" |
44 | 69 | ||
45 | INITSCRIPT_NAME = "unbound" | 70 | INITSCRIPT_NAME = "unbound" |