summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/json-c/json-c_0.15.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/json-c/json-c_0.15.bb')
-rw-r--r--meta/recipes-devtools/json-c/json-c_0.15.bb20
1 files changed, 18 insertions, 2 deletions
diff --git a/meta/recipes-devtools/json-c/json-c_0.15.bb b/meta/recipes-devtools/json-c/json-c_0.15.bb
index a4673a2f0e..b3679e0135 100644
--- a/meta/recipes-devtools/json-c/json-c_0.15.bb
+++ b/meta/recipes-devtools/json-c/json-c_0.15.bb
@@ -4,15 +4,31 @@ HOMEPAGE = "https://github.com/json-c/json-c/wiki"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://COPYING;md5=de54b60fbbc35123ba193fea8ee216f2"
-SRC_URI = "https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz"
+SRC_URI = " \
+ https://s3.amazonaws.com/json-c_releases/releases/${BP}.tar.gz \
+ file://run-ptest \
+ file://CVE-2021-32292.patch \
+"
SRC_URI[sha256sum] = "b8d80a1ddb718b3ba7492916237bbf86609e9709fb007e7f7d4322f02341a4c6"
+# NVD uses full tag name including date
+CVE_VERSION = "0.15-20200726"
+
UPSTREAM_CHECK_URI = "https://github.com/${BPN}/${BPN}/tags"
UPSTREAM_CHECK_REGEX = "json-c-(?P<pver>\d+(\.\d+)+)-\d+"
RPROVIDES:${PN} = "libjson"
-inherit cmake
+inherit cmake ptest
+
+do_install_ptest() {
+ install -d ${D}/${PTEST_PATH}/tests
+ install ${B}/tests/test* ${D}/${PTEST_PATH}/tests
+ install ${S}/tests/*.test ${D}/${PTEST_PATH}/tests
+ install ${S}/tests/*.expected ${D}/${PTEST_PATH}/tests
+ install ${S}/tests/test-defs.sh ${D}/${PTEST_PATH}/tests
+ install ${S}/tests/valid*json ${D}/${PTEST_PATH}/tests
+}
BBCLASSEXTEND = "native nativesdk"