|
|
|
@ -1,56 +1,38 @@
|
|
|
|
|
%{!?_pkgdocdir:%global _pkgdocdir %{_docdir}/%{name}-%{version}}
|
|
|
|
|
|
|
|
|
|
# We don't want accidental SONAME bumps.
|
|
|
|
|
# When there is a SONAME bump in json-c, we need to request
|
|
|
|
|
# a side-tag for bootstrap purposes:
|
|
|
|
|
#
|
|
|
|
|
# 1. Build a bootstrap build of the systemd package, and wait
|
|
|
|
|
# for it to be available inside the side-tag.
|
|
|
|
|
# 2. Re-build the following build-chain for bootstrap:
|
|
|
|
|
# json-c : cryptsetup
|
|
|
|
|
# 3. Untag the systemd bootstrap build from the side-tag, and
|
|
|
|
|
# disable bootstrapping in the systemd package. Re-build
|
|
|
|
|
# the systemd package into Rawhide.
|
|
|
|
|
# 4. Wait for the changes to populate and re-build the following
|
|
|
|
|
# chain into the side-tag:
|
|
|
|
|
# satyr : libdnf libreport
|
|
|
|
|
# 5. Merge the side-tag using Bodhi.
|
|
|
|
|
#
|
|
|
|
|
# After that procedure any other cosumers can be re-build
|
|
|
|
|
# in Rawhide as usual.
|
|
|
|
|
%global so_ver 5
|
|
|
|
|
|
|
|
|
|
# Releases are tagged with a date stamp.
|
|
|
|
|
%global reldate 20200419
|
|
|
|
|
%global so_ver 4
|
|
|
|
|
%global reldate 20180305
|
|
|
|
|
|
|
|
|
|
# Uncomment when building a bootstrap for a bumped so-name.
|
|
|
|
|
# You also need to adjust the parameters below.
|
|
|
|
|
%global bootstrap 0
|
|
|
|
|
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
%global reldate_old 20171207
|
|
|
|
|
%global version_old 0.13
|
|
|
|
|
%global so_ver_old 3
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Name: json-c
|
|
|
|
|
Version: 0.14
|
|
|
|
|
Release: 11%{?dist}
|
|
|
|
|
Version: 0.13.1
|
|
|
|
|
Release: 3%{?dist}
|
|
|
|
|
Summary: JSON implementation in C
|
|
|
|
|
|
|
|
|
|
License: MIT
|
|
|
|
|
URL: https://github.com/%{name}/%{name}
|
|
|
|
|
Source0: %{url}/archive/%{name}-%{version}-%{reldate}.tar.gz
|
|
|
|
|
|
|
|
|
|
# Cherry-picked from upstream.
|
|
|
|
|
Patch0001: %{url}/commit/228881c8fc287182f284a58d8279a32fbeae0b7f.patch#/%{name}-0.14-dont_install_config_h.patch
|
|
|
|
|
Patch0002: %{url}/pull/603.patch#/%{name}-0.14-backport_fixes_from_master.patch
|
|
|
|
|
Patch0003: %{url}/commit/003b58782b12798da3da8b952152988a88dfb532.patch#/%{name}-0.14-fix_usage_of_errno_in_json_parse_uint64.patch
|
|
|
|
|
Patch0004: %{url}/pull/618.patch#/%{name}-0.14-test_deep_copy_fix_assertion_value.patch
|
|
|
|
|
Patch0005: %{url}/pull/619.patch#/%{name}-0.14-cmake_fix_out_of_tree_build_for_Doxygen_documentation.patch
|
|
|
|
|
Patch0006: %{url}/pull/622.patch#/%{name}-0.14-move_Doxyfile_into_doc_subdir.patch
|
|
|
|
|
Patch0007: %{url}/commit/4a546e7b2f471157c6f479df1ef687864fcbd89e.patch#/%{name}-0.14-arraylist_optimizations.patch
|
|
|
|
|
# Start providing versioned symbols
|
|
|
|
|
# rhbz#2001067
|
|
|
|
|
Patch0008: json-c-0.14-versioned-symbols.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: cmake
|
|
|
|
|
BuildRequires: gcc
|
|
|
|
|
BuildRequires: ninja-build
|
|
|
|
|
%ifarch %{valgrind_arches}
|
|
|
|
|
BuildRequires: valgrind
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
Source1: %{url}/archive/%{name}-%{version_old}-%{reldate_old}.tar.gz
|
|
|
|
|
%endif
|
|
|
|
|
# CVE-2020-12762 json-c: integer overflow and out-of-bounds write via a large JSON file
|
|
|
|
|
# rhbz#1835626
|
|
|
|
|
Patch0: json-c-int-overflow.patch
|
|
|
|
|
# patch for support of versioned symbols
|
|
|
|
|
# rhbz#2001063
|
|
|
|
|
Patch1: json-c-versioned-symbols.patch
|
|
|
|
|
|
|
|
|
|
BuildRequires: libtool
|
|
|
|
|
|
|
|
|
|
%description
|
|
|
|
|
JSON-C implements a reference counting object model that allows you
|
|
|
|
@ -61,7 +43,8 @@ of JSON objects. It aims to conform to RFC 7159.
|
|
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
|
Summary: Development files for %{name}
|
|
|
|
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
Requires: %{name}%{?_isa} == %{version}-%{release}
|
|
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
|
This package contains libraries and header files for
|
|
|
|
@ -81,46 +64,87 @@ This package contains the reference manual for %{name}.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%prep
|
|
|
|
|
%autosetup -n %{name}-%{name}-%{version}-%{reldate} -p 1
|
|
|
|
|
%autosetup -Tb 0 -n %{name}-%{name}-%{version}-%{reldate} -p 1
|
|
|
|
|
|
|
|
|
|
for doc in ChangeLog; do
|
|
|
|
|
%{_bindir}/iconv -f iso-8859-1 -t utf8 ${doc} > ${doc}.new
|
|
|
|
|
/bin/touch -r ${doc} ${doc}.new
|
|
|
|
|
%{__mv} -f ${doc}.new ${doc}
|
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
# Remove pre-built html documentation.
|
|
|
|
|
rm -fr doc/html
|
|
|
|
|
%{__sed} -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am
|
|
|
|
|
%{_bindir}/autoreconf -fiv
|
|
|
|
|
|
|
|
|
|
# Update Doxyfile.
|
|
|
|
|
doxygen -s -u doc/Doxyfile.in
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
%{__mkdir} -p bootstrap_ver
|
|
|
|
|
pushd bootstrap_ver
|
|
|
|
|
%{__tar} --strip-components=1 -xf %{SOURCE1}
|
|
|
|
|
|
|
|
|
|
%{__sed} -i -e 's!#ACLOCAL_AMFLAGS!ACLOCAL_AMFLAGS!g' Makefile.am
|
|
|
|
|
%{_bindir}/autoreconf -fiv
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%build
|
|
|
|
|
%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_build --target all doc
|
|
|
|
|
# it is easier and more efficient to add version script flag
|
|
|
|
|
# here instead of having to rebuild the configure script
|
|
|
|
|
LDFLAGS="%{build_ldflags} -Wl,--version-script,${PWD}/json-c.sym"
|
|
|
|
|
%configure \
|
|
|
|
|
--disable-silent-rules \
|
|
|
|
|
--disable-static \
|
|
|
|
|
--enable-shared \
|
|
|
|
|
--enable-threading
|
|
|
|
|
|
|
|
|
|
%make_build
|
|
|
|
|
|
|
|
|
|
%{_bindir}/doxygen Doxyfile
|
|
|
|
|
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
pushd bootstrap_ver
|
|
|
|
|
%configure \
|
|
|
|
|
--disable-silent-rules \
|
|
|
|
|
--disable-static \
|
|
|
|
|
--enable-shared \
|
|
|
|
|
--enable-threading
|
|
|
|
|
|
|
|
|
|
%make_build
|
|
|
|
|
popd
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%install
|
|
|
|
|
%cmake_install
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
%make_install -C bootstrap_ver
|
|
|
|
|
%{__rm} -fr %{buildroot}%{_includedir}/%{name} \
|
|
|
|
|
%{buildroot}%{_libdir}/lib%{name}.so \
|
|
|
|
|
%{buildroot}%{_libdir}/pkgconfig
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
%make_install
|
|
|
|
|
|
|
|
|
|
%{_bindir}/find %{buildroot} -name '*.a' -delete -print
|
|
|
|
|
%{_bindir}/find %{buildroot} -name '*.la' -delete -print
|
|
|
|
|
|
|
|
|
|
# Documentation
|
|
|
|
|
mkdir -p %{buildroot}%{_pkgdocdir}
|
|
|
|
|
cp -a %{__cmake_builddir}/doc/html ChangeLog README README.* \
|
|
|
|
|
%{buildroot}%{_pkgdocdir}
|
|
|
|
|
hardlink -cfv %{buildroot}%{_pkgdocdir}
|
|
|
|
|
%{__mkdir} -p %{buildroot}%{_pkgdocdir}
|
|
|
|
|
%{__cp} -pr doc/html ChangeLog README README.* %{buildroot}%{_pkgdocdir}
|
|
|
|
|
%{_sbindir}/hardlink -cvf %{buildroot}%{_pkgdocdir}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%check
|
|
|
|
|
export USE_VALGRIND=0
|
|
|
|
|
%ctest
|
|
|
|
|
%ifarch %{valgrind_arches}
|
|
|
|
|
export USE_VALGRIND=1
|
|
|
|
|
%ctest
|
|
|
|
|
%make_build check
|
|
|
|
|
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
%make_build -C bootstrap_ver check
|
|
|
|
|
%endif
|
|
|
|
|
unset USE_VALGRIND
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%pretrans devel -p <lua>
|
|
|
|
|
path = "%{_includedir}/%{name}"
|
|
|
|
|
st = posix.stat(path)
|
|
|
|
|
if st and st.type == "link" then
|
|
|
|
|
os.remove(path)
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%ldconfig_scriptlets
|
|
|
|
@ -130,14 +154,15 @@ unset USE_VALGRIND
|
|
|
|
|
%license AUTHORS
|
|
|
|
|
%license COPYING
|
|
|
|
|
%{_libdir}/lib%{name}.so.%{so_ver}*
|
|
|
|
|
%if 0%{?bootstrap}
|
|
|
|
|
%{_libdir}/lib%{name}.so.%{so_ver_old}*
|
|
|
|
|
%endif
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%files devel
|
|
|
|
|
%doc %dir %{_pkgdocdir}
|
|
|
|
|
%doc %{_pkgdocdir}/ChangeLog
|
|
|
|
|
%doc %{_pkgdocdir}/README*
|
|
|
|
|
%{_includedir}/%{name}
|
|
|
|
|
%{_libdir}/cmake/%{name}
|
|
|
|
|
%{_includedir}/%{name}/
|
|
|
|
|
%{_libdir}/lib%{name}.so
|
|
|
|
|
%{_libdir}/pkgconfig/%{name}.pc
|
|
|
|
|
|
|
|
|
@ -145,105 +170,33 @@ unset USE_VALGRIND
|
|
|
|
|
%files doc
|
|
|
|
|
%if 0%{?fedora} || 0%{?rhel} >= 7
|
|
|
|
|
%license %{_datadir}/licenses/%{name}*
|
|
|
|
|
%endif
|
|
|
|
|
%endif # 0%%{?fedora} || 0%%{?rhel} >= 7
|
|
|
|
|
%doc %{_pkgdocdir}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
%changelog
|
|
|
|
|
* Tue Sep 14 2021 Tomas Korbar <tkorbar@redhat.com> - 0.14-11
|
|
|
|
|
- Start providing versioned symbols
|
|
|
|
|
- Resolves: rhbz#2001067
|
|
|
|
|
|
|
|
|
|
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 0.14-10
|
|
|
|
|
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
|
|
|
|
|
Related: rhbz#1991688
|
|
|
|
|
|
|
|
|
|
* Fri Apr 16 2021 Mohan Boddu <mboddu@redhat.com> - 0.14-9
|
|
|
|
|
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937
|
|
|
|
|
|
|
|
|
|
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 0.14-8
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Mon Jul 27 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-7
|
|
|
|
|
- Use new cmake macros
|
|
|
|
|
|
|
|
|
|
* Tue May 26 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-6
|
|
|
|
|
- Build using Ninja instead of Make
|
|
|
|
|
- Add a patch to move Doxyfile into doc subdir
|
|
|
|
|
- Remove pre-built html documentation
|
|
|
|
|
- Update Doxyfile during %%prep
|
|
|
|
|
- Add a patch to apply some optimizations to arraylist
|
|
|
|
|
- Hardlink the files in %%_pkgdocdir
|
|
|
|
|
|
|
|
|
|
* Mon May 25 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-5
|
|
|
|
|
- Run the testssuite with valgrind on %%valgrind_arches
|
|
|
|
|
|
|
|
|
|
* Mon May 18 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-4
|
|
|
|
|
- Add a patch to fix a test
|
|
|
|
|
- Add a patch to fix generation of user-documentation
|
|
|
|
|
|
|
|
|
|
* Mon May 11 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-3
|
|
|
|
|
- Add upstream patch fixing usage of errno in json_parse_uint64()
|
|
|
|
|
|
|
|
|
|
* Sun May 10 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-2
|
|
|
|
|
- Add a patch to backport fixes applied on upstream master branch
|
|
|
|
|
- Re-enable RDRAND as json-c can detect broken implementations in CPUs now
|
|
|
|
|
- Disable -Werror during build
|
|
|
|
|
|
|
|
|
|
* Tue Apr 21 2020 Björn Esser <besser82@fedoraproject.org> - 0.14-1
|
|
|
|
|
- Update to 0.14
|
|
|
|
|
|
|
|
|
|
* Mon Apr 20 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.4.20200416gita911439
|
|
|
|
|
- Remove config.h file from installation
|
|
|
|
|
- Drop hardlinking of the documentation files
|
|
|
|
|
|
|
|
|
|
* Thu Apr 16 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.3.20200416gita911439
|
|
|
|
|
- Update to recent git snapshot
|
|
|
|
|
|
|
|
|
|
* Tue Apr 14 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.2.20200414git7fb8d56
|
|
|
|
|
- Update to recent git snapshot
|
|
|
|
|
|
|
|
|
|
* Tue Apr 14 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.99-0.1.20200414gitab5425a
|
|
|
|
|
- Update to recent git snapshot using forge macros
|
|
|
|
|
|
|
|
|
|
* Sun Apr 12 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-11
|
|
|
|
|
- Drop bootstrap logic, as the package is no dependency of @build anymore
|
|
|
|
|
- Add some explicit BuildRequires, which were implicit
|
|
|
|
|
- Small spec file cleanups
|
|
|
|
|
|
|
|
|
|
* Sat Apr 11 2020 Björn Esser <besser82@fedoraproject.org> - 0.13.1-10
|
|
|
|
|
- Add explicit configure switch to disable rdrand
|
|
|
|
|
- Add explicit configure switch to enable linking with Bsymbolic
|
|
|
|
|
- Do not use macros to invoke executables
|
|
|
|
|
- Drop obsolete %%pretrans scriptlet
|
|
|
|
|
|
|
|
|
|
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-9
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
|
|
|
|
|
|
|
|
|
* Thu Nov 28 2019 Petr Menšík <pemensik@redhat.com> - 0.13.1-8
|
|
|
|
|
- Remove empty doc dir from library package
|
|
|
|
|
|
|
|
|
|
* Wed Nov 06 2019 Miroslav Lichvar <mlichvar@redhat.com> 0.13.1-7
|
|
|
|
|
- Disable rdrand support (#1745333)
|
|
|
|
|
|
|
|
|
|
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-6
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
|
|
|
|
* Tue Sep 14 2021 Tomas Korbar <tkorbar@redhat.com> - 0.13.1-3
|
|
|
|
|
- Start versioning symbols when building library
|
|
|
|
|
- Resolves: rhbz#2001063
|
|
|
|
|
|
|
|
|
|
* Wed Jun 26 2019 Björn Esser <besser82@fedoraproject.org> - 0.13.1-5
|
|
|
|
|
- Use hardlink without full path to the binary (#1721964)
|
|
|
|
|
- Use new style bootstrap logic
|
|
|
|
|
* Thu May 20 2021 Joe Orton <jorton@redhat.com> - 0.13.1-2
|
|
|
|
|
- rebuild (#1954436)
|
|
|
|
|
|
|
|
|
|
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-4
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
|
|
|
* Thu Apr 15 2021 Tomas Korbar <tkorbar@redhat.com> - 0.13.1-1
|
|
|
|
|
- Fix CVE-2020-12762 out-of-bounds write via a large JSON file
|
|
|
|
|
- Resolves: rhbz#1835626
|
|
|
|
|
|
|
|
|
|
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.13.1-3
|
|
|
|
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
|
|
|
* Wed Feb 03 2021 Petr Menšík <pemensik@redhat.com> - 0.13.1-0.4
|
|
|
|
|
- Move json-c-devel to AppStream
|
|
|
|
|
|
|
|
|
|
* Tue May 08 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-2
|
|
|
|
|
- Add some cherry-picked fixes from upstream master
|
|
|
|
|
* Fri Sep 18 2020 Anna Khaitovich <akhaitov@redhat.com> - 0.13.1-0.3
|
|
|
|
|
- Don't package empty /usr/share/doc/json-c
|
|
|
|
|
- Resolves: rhbz#1741076
|
|
|
|
|
- Do not use --enable-rdrand
|
|
|
|
|
- Resolves: rhbz#1806532
|
|
|
|
|
|
|
|
|
|
* Tue Mar 06 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-1
|
|
|
|
|
- New upstream release (rhbz#1552053)
|
|
|
|
|
* Fri Aug 03 2018 Radovan Sroka <rsroka@redhat.com> - 0.13.1-0.2
|
|
|
|
|
- disable bootstrap for RHEL8
|
|
|
|
|
|
|
|
|
|
* Tue Mar 06 2018 Björn Esser <besser82@fedoraproject.org> - 0.13.1-0.1
|
|
|
|
|
- Bootstrapping for so-name bump
|
|
|
|
|