2019-09-30 10:54:03 -04:00
|
|
|
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
%global so_ver 5
|
2023-08-18 09:00:35 +08:00
|
|
|
%global reldate 20230812
|
2019-09-30 10:54:03 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: json-c
|
2023-08-18 09:00:35 +08:00
|
|
|
Version: 0.17
|
2024-12-06 16:11:48 +08:00
|
|
|
Release: 6
|
2019-09-30 10:54:03 -04:00
|
|
|
Summary: JSON implementation in C
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/%{name}/%{name}
|
|
|
|
|
Source0: %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz
|
|
|
|
|
|
2022-03-25 11:34:15 +08:00
|
|
|
BuildRequires: cmake gcc ninja-build
|
2019-09-30 10:54:03 -04:00
|
|
|
|
2024-12-06 16:11:48 +08:00
|
|
|
Patch6001: backport-fix-issue-854-Set-error-json_tokener_error_memory-in.patch
|
|
|
|
|
Patch6002: backport-Handle-yet-another-out-of-memory-condition.patch
|
|
|
|
|
Patch6003: backport-Issue-857-fix-a-few-places-where-json_tokener-should.patch
|
|
|
|
|
Patch6004: backport-Take-2-fixing-the-placement-of-json_tokener_error_memory.patch
|
|
|
|
|
Patch6005: backport-Issue-867-disallow-control-characters-in-strict-mode.patch
|
|
|
|
|
Patch6006: backport-Fix-the-expected-output-for-test_parse.patch
|
|
|
|
|
Patch6007: backport-Fix-issue-875-cast-to-unsigned-char-so-bytes-above-0.patch
|
|
|
|
|
Patch6008: backport-Fix-the-apps-json_parse-s-strict-option-so-it-actual.patch
|
2024-05-16 15:46:50 +08:00
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
%description
|
|
|
|
|
JSON-C implements a reference counting object model that allows you
|
|
|
|
|
to easily construct JSON objects in C, output them as JSON formatted
|
|
|
|
|
strings and parse JSON formatted strings back into the C representation
|
|
|
|
|
of JSON objects. It aims to conform to RFC 7159.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
|
|
|
|
|
Requires: %{name}%{?_isa} == %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains libraries and header files for
|
|
|
|
|
developing applications that use %{name}.
|
|
|
|
|
|
|
|
|
|
%package help
|
|
|
|
|
Summary: Reference manual for json-c
|
|
|
|
|
|
|
|
|
|
BuildArch: noarch
|
|
|
|
|
|
|
|
|
|
BuildRequires: doxygen hardlink
|
|
|
|
|
Provides: %{name}-doc = %{version}-%{release}
|
|
|
|
|
Obsoletes: %{name}-doc = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description help
|
|
|
|
|
This package contains the reference manual for %{name}.
|
|
|
|
|
|
|
|
|
|
%prep
|
2021-09-14 11:34:28 +08:00
|
|
|
%autosetup -n %{name}-%{name}-%{version}-%{reldate} -p 1
|
|
|
|
|
|
|
|
|
|
# Remove pre-built html documentation.
|
|
|
|
|
rm -fr doc/html
|
|
|
|
|
|
|
|
|
|
# Update Doxyfile.
|
|
|
|
|
doxygen -s -u doc/Doxyfile.in
|
|
|
|
|
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
%build
|
2021-09-14 11:34:28 +08:00
|
|
|
%cmake \
|
|
|
|
|
-DBUILD_STATIC_LIBS:BOOL=OFF \
|
|
|
|
|
-DCMAKE_BUILD_TYPE:STRING=RELEASE \
|
|
|
|
|
-DCMAKE_C_FLAGS_RELEASE:STRING="" \
|
|
|
|
|
-DDISABLE_BSYMBOLIC:BOOL=OFF \
|
|
|
|
|
-DDISABLE_WERROR:BOOL=ON \
|
|
|
|
|
-DENABLE_RDRAND:BOOL=ON \
|
|
|
|
|
-DENABLE_THREADING:BOOL=ON \
|
|
|
|
|
-G Ninja\
|
|
|
|
|
%{!?__cmake_in_source_build:-S "%{_vpath_srcdir}"} \
|
|
|
|
|
%{!?__cmake_in_source_build:-B "%{_vpath_builddir}"} \
|
|
|
|
|
|
|
|
|
|
%__cmake --build "%{_vpath_builddir}" %{?_smp_mflags} --verbose --target all doc
|
2022-04-07 10:48:23 +08:00
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
%ninja_test -C %{_vpath_builddir}
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
%install
|
2021-09-14 11:34:28 +08:00
|
|
|
DESTDIR="%{buildroot}" %__cmake --install "%{_vpath_builddir}"
|
2019-09-30 10:54:03 -04:00
|
|
|
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
|
|
|
hardlink -cfv %{buildroot}%{_pkgdocdir}
|
2019-09-30 10:54:03 -04:00
|
|
|
|
2022-05-24 20:30:55 +08:00
|
|
|
%pretrans devel -p <lua>
|
|
|
|
|
path = "%{_includedir}/%{name}"
|
|
|
|
|
st = posix.stat(path)
|
|
|
|
|
if st and st.type == "link" then
|
|
|
|
|
os.remove(path)
|
|
|
|
|
end
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
%ldconfig_scriptlets
|
|
|
|
|
|
|
|
|
|
%files
|
|
|
|
|
%license AUTHORS COPYING
|
|
|
|
|
%{_libdir}/lib%{name}.so.%{so_ver}*
|
|
|
|
|
|
|
|
|
|
%files devel
|
2022-05-24 20:30:55 +08:00
|
|
|
%{_includedir}/%{name}
|
2021-09-14 11:34:28 +08:00
|
|
|
%{_libdir}/cmake/%{name}
|
2019-09-30 10:54:03 -04:00
|
|
|
%{_libdir}/lib%{name}.so
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
|
%files help
|
|
|
|
|
%doc %{_pkgdocdir}
|
|
|
|
|
|
|
|
|
|
%changelog
|
2024-12-06 16:11:48 +08:00
|
|
|
* Fri Dec 06 2024 sunhai <sunhai10@huawei.com> - 0.17-6
|
|
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC: Fix the apps/json_parse "-s" (strict) option so it actually does something, and default to non-strict.
|
|
|
|
|
|
2024-12-04 11:18:55 +08:00
|
|
|
* Wed Dec 04 2024 yueyuankun <yueyuankun@kylinos.cn> - 0.17-5
|
2024-12-06 16:11:48 +08:00
|
|
|
- Type:bugfix
|
|
|
|
|
- ID:NA
|
|
|
|
|
- SUG:NA
|
|
|
|
|
- DESC: Disallow control characters in strict mode
|
|
|
|
|
Fix the expected output for test_parse
|
|
|
|
|
Fix causing the strict-mode control characters check to incorrectly trigger
|
2024-12-04 11:18:55 +08:00
|
|
|
|
2024-09-24 11:05:49 +08:00
|
|
|
* Tue Sep 24 2024 sunhai <sunhai10@huawei.com> - 0.17-4
|
|
|
|
|
- Take 2 fixing the placement of json_tokener_error_memory in the enum.
|
|
|
|
|
|
2024-06-24 13:44:56 +08:00
|
|
|
* Mon Jun 24 2024 liweigang <liweiganga@uniontech.com> - 0.17-3
|
|
|
|
|
- add backport-Handle-yet-another-out-of-memory-condition.patch
|
|
|
|
|
- add backport-Issue-857-fix-a-few-places-where-json_tokener-should.patch
|
|
|
|
|
|
2024-05-16 15:46:50 +08:00
|
|
|
* Thu May 16 2024 xiaozai <xiaozai@kylinos.cn> - 0.17-2
|
|
|
|
|
- add backport-fix-issue-854-Set-error-json_tokener_error_memory-in.patch
|
|
|
|
|
|
2023-08-18 09:00:35 +08:00
|
|
|
* Wed Aug 16 2023 dillon chen <dillon.chen@gmail.com> - 0.17-1
|
|
|
|
|
- Update to 0.17
|
|
|
|
|
|
2023-04-21 11:17:29 +08:00
|
|
|
* Fri Apr 21 2023 zhangrui <zhangrui182@huawei.com> - 0.16-3
|
|
|
|
|
- backport patch to fix integer overflow
|
|
|
|
|
|
2022-11-14 19:30:16 +08:00
|
|
|
* Mon Nov 14 2022 mengkanglai <mengkanglai2@huawei.com> - 0.16-2
|
|
|
|
|
- add backport-Add-test-to-check-for-the-memory-leak-mentioned-in-issue-781.patch
|
|
|
|
|
- add backport-Fix-memory-leak-with-emtpy-strings-in-json_object_set_string.patch
|
|
|
|
|
- add backport-json_object_from_fd_ex-fail-if-file-is-too-large.patch
|
|
|
|
|
|
2022-11-05 14:57:34 +08:00
|
|
|
* Sat Nov 5 2022 zhangrui <zhangrui182@huawei.com> - 0.16-1
|
|
|
|
|
- Update to 0.16
|
|
|
|
|
|
2022-05-24 20:30:55 +08:00
|
|
|
* Tue May 24 2022 fengtao <fengtao40@huawei.com> - 0.15-5
|
|
|
|
|
- we got upgrade error when upgrade json-c from very low version,
|
|
|
|
|
for example json-c-0.11-5. because old version has a softlink:
|
|
|
|
|
/usr/include/json-c --> /usr/include/json
|
|
|
|
|
and now, softlink has been removed. so, we fix this in pretrans
|
|
|
|
|
|
2022-05-06 16:59:08 +08:00
|
|
|
* Fri May 6 2022 wuchaochao <cyanrose@yeah.net> - 0.15-4
|
|
|
|
|
- add backport-json-escape-str-avoid-harmless-unsigned-integer-overflow.patch
|
|
|
|
|
|
2022-04-07 10:48:23 +08:00
|
|
|
* Thu Apr 7 2022 wuchaochao <cyanrose@yeah.net> - 0.15-3
|
|
|
|
|
- add check
|
|
|
|
|
|
2022-03-25 11:34:15 +08:00
|
|
|
* Fri Mar 25 2022 wuchaochao <cyanrose@yeah.net> - 0.15-2
|
|
|
|
|
- move json-c
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
* Tue Sep 14 2021 hanhui <hanhui15@huawei.com> - 0.15-1
|
|
|
|
|
- update to 0.15
|
|
|
|
|
|
2021-09-09 11:43:17 +08:00
|
|
|
* Thu Sep 9 2021 liuyumeng <liuyumeng5@huawei.com> - 0.13.1-9
|
|
|
|
|
- fix broken RDRAND causes infinite looping
|
|
|
|
|
|
|
|
|
|
* Tue Jul 21 2020 wangye <wangye70@huawei.com> - 0.13.1-8
|
2020-07-21 09:14:54 +08:00
|
|
|
- fix hardlink path
|
|
|
|
|
|
2021-09-14 11:34:28 +08:00
|
|
|
* Fri May 22 2020 ruanweidong <ruanweidong1@huawei.com> -0.13.1-7
|
2020-05-22 11:48:59 +08:00
|
|
|
- fix CVE-2020-12762
|
|
|
|
|
|
2020-03-21 20:19:49 +08:00
|
|
|
* Sat Mar 21 2020 songnannan <songnannan2@huawei.com> - 0.13.1-6
|
|
|
|
|
- delete the check
|
|
|
|
|
|
2020-03-03 17:22:14 +08:00
|
|
|
* Tue Mar 3 2020 songnannan<songnannan2@huawei.com> - 0.13.1-5
|
|
|
|
|
- bugfix in oss-fuzz
|
|
|
|
|
|
2019-09-30 10:54:03 -04:00
|
|
|
* Thu Sep 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 0.13.1-4
|
|
|
|
|
- Package init
|