aboutsummaryrefslogtreecommitdiffstats
path: root/package/libs/libjson-c
Commit message (Collapse)AuthorAgeFilesLines
* libjson-c: import patch to fix compilation on macosNick Hainke2023-05-192-1/+185
| | | | | | | | | | | | | | Fixes errors in the form of: /Users/user/src/openwrt/openwrt/build_dir/hostpkg/json-c-0.16/json_util.c:63:35: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] const char *json_util_get_last_err() ^ void 1 error generated. ninja: build stopped: subcommand failed. Reported-by: Paul Spooren <mail@aparcar.org> Suggested-by: Paul Spooren <mail@aparcar.org> Signed-off-by: Nick Hainke <vincent@systemli.org>
* libjson-c: disable libbsdRosen Penev2022-07-041-1/+5
| | | | | | | | | | | | | | | libjson-c is happy to pick up libbsd both on the host and target. Reproducible with make package/libbsd/compile;make package/libjson-c/compile Also fixes host compilation on Arch Linux for a similar reason. Undefined reference to arc4random. Fixes: f3a198697f60 ("libjson-c: update to 0.16") Acked-by: Thomas Huehn thomas.huehn@hs-nordhausen.de Acked-by: Nick Hainke vincent@systemli.org Signed-off-by: Rosen Penev <rosenp@gmail.com>
* libjson-c: update to 0.16Nick Hainke2022-07-033-18/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix: - 001-dont-build-docs.patch Remove upstreamed patch: - 010-clang.patch Changelog: Deprecated and removed features: -------------------------------- * JSON_C_OBJECT_KEY_IS_CONSTANT is deprecated in favor of JSON_C_OBJECT_ADD_CONSTANT_KEY * Direct access to lh_table and lh_entry structure members is deprecated. Use access functions instead, lh_table_head(), lh_entry_next(), etc... * Drop REFCOUNT_DEBUG code. New features ------------ * The 0.16 release introduces no new features Build changes ------------- * Add a DISABLE_EXTRA_LIBS option to skip using libbsd * Add a DISABLE_JSON_POINTER option to skip compiling in json_pointer support. Significant changes and bug fixes --------------------------------- * Cap string length at INT_MAX to avoid various issues with very long strings. * json_object_deep_copy: fix deep copy of strings containing '\0' * Fix read past end of buffer in the "json_parse" command * Avoid out of memory accesses in the locally provided vasprintf() function (for those platforms that use it) * Handle allocation failure in json_tokener_new_ex * Fix use-after-free in json_tokener_new_ex() in the event of printbuf_new() returning NULL * printbuf_memset(): set gaps to zero - areas within the print buffer which have not been initialized by using printbuf_memset * printbuf: return -1 on invalid arguments (len < 0 or total buffer > INT_MAX) * sprintbuf(): propagate printbuf_memappend errors back to the caller Optimizations -------------- * Speed up parsing by replacing ctype functions with simplified, faster non-locale-sensitive ones in json_tokener and json_object_to_json_string. * Neither vertical tab nor formfeed are considered whitespace per the JSON spec * json_object: speed up creation of objects, calloc() -> malloc() + set fields * Avoid needless extra strlen() call in json_c_shallow_copy_default() and json_object_equal() when the object is known to be a json_type_string. Other changes ------------- * Validate size arguments in arraylist functions. * Use getrandom() if available; with GRND_NONBLOCK to allow use of json-c very early during boot, such as part of cryptsetup. * Use arc4random() if it's available. * random_seed: on error, continue to next method instead of exiting the process * Close file when unable to read from /dev/urandom in get_dev_random_seed() Signed-off-by: Nick Hainke <vincent@systemli.org>
* libjson-c: don't build shared host librariesRosen Penev2021-11-201-3/+1
| | | | | | Avoids having to deal with various rpath hacks. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* libjson-c: remove old math patchRosen Penev2021-08-302-45/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove old math patch meant for old GCC versions. It's not needed for GCC and causes issues with clang. Add CMake patch to identify clang properly and apply the proper flags. Fixes the following warnings/errors: json_pointer.c:230:7: warning: implicit declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration] rc = vasprintf(&path_copy, path_fmt, args); ^ json_pointer.c:317:7: warning: implicit declaration of function 'vasprintf' is invalid in C99 [-Wimplicit-function-declaration] rc = vasprintf(&path_copy, path_fmt, args); ^ /usr/include/bits/mathcalls.h:177:23: error: cannot redeclare builtin function '__builtin_isinf' __MATHDECL_ALIAS (int,isinf,, (_Mdouble_ __value), isinf) ^ /usr/include/bits/mathcalls.h:177:23: note: '__builtin_isinf' is a builtin with type 'int ()' /usr/include/bits/mathcalls.h:213:23: error: cannot redeclare builtin function '__builtin_isnan' __MATHDECL_ALIAS (int,isnan,, (_Mdouble_ __value), isnan) The clang patch is an upstream backport. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: unmark selected packages nonsharedPetr Štetiar2021-07-021-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This partially reverts changes done in commit 72cc44958ef4 ("treewide: mark selected packages nonshared") as it removes the nonshared flag, but keeps the PKG_RELEASE as the PKG_RELEASE bump while adding nonshared flag was incorrect. Unmark uci, ubus, libubox, lua, libnl-tiny and libjson-c as nonshared packages as this fix attempt didn't worked out. Currently the imagebuilder is broken again: openwrt-imagebuilder-21.02.0-rc3-ipq40xx-generic.Linux-x86_64$ make image PROFILE=avm_fritzbox-7530 PACKAGES=luci-ssl-openssl ... Collected errors: * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for luci-mod-status * pkg_hash_fetch_best_installation_candidate: Packages for luci-mod-status found, but incompatible with the architectures configured * pkg_hash_check_unresolved: cannot find dependency libiwinfo20210430 for rpcd-mod-iwinfo * pkg_hash_fetch_best_installation_candidate: Packages for rpcd-mod-iwinfo found, but incompatible with the architectures configured * satisfy_dependencies_for: Cannot satisfy the following dependencies for luci-ssl-openssl: * libiwinfo20210430 * opkg_install_cmd: Cannot install package luci-ssl-openssl. Everything because iwinfo's ABI was changed two times since rc3 release: +IWINFO_ABI_VERSION:=20210430 +IWINFO_ABI_VERSION:=20210420 Since iwinfo is marked as nonshared, it wasn't built by phase2 builders, but luci-mod-status was already updated 2 times since rc3 and was thus rebuilt by phase2 builders: d1d452ed2fb3 luci-mod-status: don't set '-' hostname when creating static lease 95b3633055c1 luci-mod-status: switch to html table for wlan channel analysis So now luci-mod-status depends on libiwinfo20210430 but only libiwinfo20210106 can be downloaded. This is first part of the fix, in the upcoming commit Jo is going to remove nonshared flag from iwinfo package as well. References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035736.html References: https://lists.infradead.org/pipermail/openwrt-devel/2021-July/035741.html Acked-by: Jo-Philipp Wich <jo@mein.io> Reported-by: Nick Hainke <vincent@systemli.org> Signed-off-by: Petr Štetiar <ynezz@true.cz>
* treewide: remove BUILD_PARALLEL from CMake packagesRosen Penev2021-06-191-1/+0
| | | | | | | | | | | | | It's already default. The only exception is mt76 which has Ninja disabled. Found with: git grep BUILD_PARALLEL | cut -d ':' -f 1 | sort -u > par git grep cmake.mk | cut -d ':' -f 1 > cmake comm -1 -2 par cmake Signed-off-by: Rosen Penev <rosenp@gmail.com>
* treewide: mark selected packages nonsharedHannu Nyman2021-06-131-1/+2
| | | | | | | | | | | | | | | | | | | | Mark uci, ubus, libubox, lua, libnl-tiny and libjson-c as nonshared packages. This helps to keep coherent dependencies if these ABI versioned packages are later updated. Before this commit it is possible to get missing dependencies in target-specific nonshared packages (like iwinfo) that depend on these shared ABI versioned packages. If these are later updated and rebuilt, only the new ABI version will be available for download, while the target-specific packages in releases continue to depend on the old ABI version. After this commit the packages are built along the other nonshared packages by the phase1 images buildbot and will be available at the target/ download directories instead of packages/base dir. That will help to keep a coherent set available. Signed-off-by: Hannu Nyman <hannu.nyman@iki.fi>
* libjson-c: enable rpath for host builds to fix errors on recent macOSFelix Fietkau2020-11-141-0/+5
| | | | | | Same approach as on libubox Signed-off-by: Felix Fietkau <nbd@nbd.name>
* libjson-c: update to 0.15David Bauer2020-09-174-184/+22
| | | | | | | | | | | | Drop patches as they've been upstreamed: * 001-Fix-CVE-2020-12762.patch Refresh patches: * 000-libm.patch Add patch to avoid build failure due to missing docs in tarball. Signed-off-by: David Bauer <mail@david-bauer.net>
* libjson-c: fix pkgconfig fileRosen Penev2020-08-111-9/+10
| | | | | | | | | | | | | | The pkgconfig file references the host directories, not the openwrt ones. Used SED to fix as is done elsewhere. Removed CMAKE_INSTALL as a result. Removed now pointless CFLAGS. Added PKG_BUILD_PARALLEL for faster compilation. Various rearrangements for consistency between packages. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* libjson-c: update to 0.14DENG Qingfang2020-07-047-210/+191
| | | | | | | | | | | Update libjson-c to 0.14 Changelog: https://github.com/json-c/json-c/wiki/Notes-for-v0.14-release Switch to CMake because the upstream build system was changed ipk size increased by 2KB Signed-off-by: DENG Qingfang <dengqf6@mail2.sysu.edu.cn>
* libjson-c: backport security fixesRobert Marko2020-05-135-1/+175
| | | | | | | | | | | | This backports upstream fixes for the out of bounds write vulnerability in json-c. It was reported and patches in this upstream PR: https://github.com/json-c/json-c/pull/592 Addresses CVE-2020-12762 Signed-off-by: Robert Marko <robert.marko@sartura.hr> Signed-off-by: Luka Perkov <luka.perkov@sartura.hr> [bump PKG_RELEASE] Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* libjson-c: update to 0.13.1Deng Qingfang2019-06-192-18/+21
| | | | Signed-off-by: Deng Qingfang <dengqf6@mail2.sysu.edu.cn>
* treewide: revise library packagingJo-Philipp Wich2019-01-241-1/+2
| | | | | | | | | | | - Annotate versionless libraries (such as libubox, libuci etc.) with a fixed ABI_VERSION resembling the source date of the last incompatible change - Annotate packages shipping versioned library objects with ABI_VERSION - Stop shipping unversioned library symlinks for packages with ABI_VERSION Ref: https://openwrt.org/docs/guide-developer/package-policies#shared_libraries Ref: https://github.com/KanjiMonster/maintainer-tools/blob/master/check-abi-versions.pl Signed-off-by: Jo-Philipp Wich <jo@mein.io>
* libjson-c: set HOST_BUILD_PREFIXDaniel Golle2018-08-071-1/+2
| | | | | | | Install into STAGING_DIR_HOST rather than STAGING_DIR_HOSTPKG to make bundle-libraries.sh happy. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* libjson-c: Update package URLRosen Penev2018-07-291-1/+1
| | | | | | Found through UScan. Signed-off-by: Rosen Penev <rosenp@gmail.com>
* libjson-c: fix host-buildDaniel Golle2018-06-141-0/+1
| | | | | | Add -Wno-implicit-fallthrough to HOST_CFLAGS. Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* libjson-c: add host build (for libblobmsg-json)Daniel Golle2018-06-141-0/+2
| | | | Signed-off-by: Daniel Golle <daniel@makrotopia.org>
* add PKG_CPE_ID ids to package and toolsAlexander Couzens2017-11-171-0/+1
| | | | | | | | | | | CPE ids helps to tracks CVE in packages. https://cpe.mitre.org/specification/ Thanks to swalker for CPE to package mapping and keep tracking CVEs. Acked-by: Jo-Philipp Wich <jo@mein.io> Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
* json-c: disable implicit fallthrough warning (gcc 7)Felix Fietkau2017-05-251-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* treewide: clean up download hashesFelix Fietkau2016-12-161-1/+1
| | | | | | Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256 Signed-off-by: Felix Fietkau <nbd@nbd.name>
* libjson-c: Update to 0.12.1Daniel Engberg2016-09-272-26/+5
| | | | | | Updates libjson-c and removes backport patch. Signed-off-by: Daniel Engberg <daniel.engberg.lists@pyret.net>
* treewide: replace nbd@openwrt.org with nbd@nbd.nameFelix Fietkau2016-06-071-1/+1
| | | | Signed-off-by: Felix Fietkau <nbd@nbd.name>
* json-c: merge an upstream fix for a compiler warning (fixes #19187)Felix Fietkau2015-03-161-0/+23
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 44826
* json-c: update to 0.12 and bump all depending servicesJohn Crispin2015-03-112-26/+53
| | | | | | | | Version 0.12 deprecates json_object_object_get and moves the header files around Signed-off-by: John Crispin <blogic@openwrt.org> SVN-Revision: 44657
* libjson-c: also install .pc file for compatibility libjsonJohn Crispin2014-01-121-1/+2
| | | | | | | | | Older packages, which did not follow the renaming yet, do not find the library otherwise via pkgconfig. Signed-off-by: Michael Heimpold <mhei@heimpold.de> SVN-Revision: 39228
* libjson-c: rename the libjson binary package to libjson-c, add a new libjson ↵Felix Fietkau2013-07-011-3/+24
| | | | | | package with the compatibility library (to deal with the rename) SVN-Revision: 37119
* json-c: drop compatibility librariesFelix Fietkau2013-05-291-3/+0
| | | | | | Signed-off-by: Felix Fietkau <nbd@openwrt.org> SVN-Revision: 36758
* libjson-c: Update to 0.11Felix Fietkau2013-05-291-3/+7
| | | | | | Signed-off-by: Helmut Schaa <helmut.schaa@googlemail.com> SVN-Revision: 36757
* licensing: Add licensing metadata to many packages Two new variables are ↵Hamish Guthrie2012-10-191-0/+3
| | | | | | | | | introduces to many packages, namely PKG_LICENSE and PKG_LICENSE_FILES - there may be more than one license applied to packages, and these are listed in the PKG_LICENSE variable and separated by spaces. All relevant license files are also added to the PKG_LICENSE_FILES variable, also space separated. The licensing metadata is put into the bin/<platform>/packages/Packages file for later parsing. A script for that is on it's way! SVN-Revision: 33861
* add myself as a maintainer for various packagesFelix Fietkau2012-10-081-0/+2
| | | | SVN-Revision: 33660
* move library packages to package/libs/Felix Fietkau2012-10-081-0/+50
SVN-Revision: 33657