1 Commits

Author SHA256 Message Date
4ec06dbbc2 Sync changes to SLFO-1.2 branch 2025-08-20 09:46:15 +02:00
6 changed files with 22 additions and 113 deletions

View File

@@ -1,5 +1,7 @@
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
Index: yajl-2.1.0/src/CMakeLists.txt
===================================================================
--- yajl-2.1.0.orig/src/CMakeLists.txt
+++ yajl-2.1.0/src/CMakeLists.txt
@@ -28,7 +28,7 @@ SET (PUB_HDRS api/yajl_parse.h api/yajl_
ADD_DEFINITIONS(-DYAJL_BUILD)

View File

@@ -1,5 +1,7 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
Index: yajl-2.1.0/CMakeLists.txt
===================================================================
--- yajl-2.1.0.orig/CMakeLists.txt
+++ yajl-2.1.0/CMakeLists.txt
@@ -59,7 +59,7 @@ ELSE (WIN32)
"${CMAKE_C_FLAGS} -std=c99 -pedantic -Wpointer-arith -Wno-format-y2k -Wstrict-prototypes -Wmissing-declarations -Wnested-externs -Wextra -Wundef -Wwrite-strings -Wold-style-definition -Wredundant-decls -Wno-unused-parameter -Wno-sign-compare -Wmissing-prototypes")

View File

@@ -1,5 +1,7 @@
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
Index: yajl-2.1.0/src/CMakeLists.txt
===================================================================
--- yajl-2.1.0.orig/src/CMakeLists.txt
+++ yajl-2.1.0/src/CMakeLists.txt
@@ -84,4 +84,4 @@ INSTALL(TARGETS yajl
INSTALL(TARGETS yajl_s ARCHIVE DESTINATION lib${LIB_SUFFIX})
INSTALL(FILES ${PUB_HDRS} DESTINATION include/yajl)

View File

@@ -1,13 +1,3 @@
-------------------------------------------------------------------
Fri Jul 18 21:13:32 UTC 2025 - Christoph G <foss@grueninger.de>
- Re-add removed braces for variables in spec file
-------------------------------------------------------------------
Fri Apr 25 12:34:56 UTC 2025 - olaf@aepfle.de
- handle cmake 4 with libyajl.patch (bsc#1239788)
-------------------------------------------------------------------
Fri Jul 7 21:27:27 UTC 2023 - James Fehlig <jfehlig@suse.com>

View File

@@ -1,93 +0,0 @@
---
CMakeLists.txt | 2 +-
reformatter/CMakeLists.txt | 6 ------
reformatter/json_reformat.c | 7 ++++---
src/CMakeLists.txt | 2 +-
src/yajl_parser.c | 3 ++-
verify/CMakeLists.txt | 6 ------
6 files changed, 8 insertions(+), 18 deletions(-)
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,7 +12,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.10)
PROJECT(YetAnotherJSONParser C)
--- a/reformatter/CMakeLists.txt
+++ b/reformatter/CMakeLists.txt
@@ -34,10 +34,4 @@ IF (NOT WIN32)
TARGET_LINK_LIBRARIES(json_reformat m)
ENDIF (NOT WIN32)
-# copy the binary into the output directory
-GET_TARGET_PROPERTY(binPath json_reformat LOCATION)
-
-ADD_CUSTOM_COMMAND(TARGET json_reformat POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
-
INSTALL(TARGETS json_reformat RUNTIME DESTINATION bin)
--- a/reformatter/json_reformat.c
+++ b/reformatter/json_reformat.c
@@ -188,9 +188,10 @@ main(int argc, char ** argv)
{
const unsigned char * buf;
size_t len;
- yajl_gen_get_buf(g, &buf, &len);
- fwrite(buf, 1, len, stdout);
- yajl_gen_clear(g);
+ if (yajl_gen_get_buf(g, &buf, &len) == yajl_gen_status_ok) {
+ fwrite(buf, 1, len, stdout);
+ yajl_gen_clear(g);
+ }
}
}
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -67,7 +67,7 @@ CONFIGURE_FILE(yajl.pc.cmake ${shareDir}
FOREACH (header ${PUB_HDRS})
SET (header ${CMAKE_CURRENT_SOURCE_DIR}/${header})
- EXEC_PROGRAM(${CMAKE_COMMAND} ARGS -E copy_if_different ${header} ${incDir})
+ execute_process(COMMAND ${CMAKE_COMMAND} -E copy_if_different ${header} ${incDir})
ADD_CUSTOM_COMMAND(TARGET yajl_s POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_if_different ${header} ${incDir})
--- a/src/yajl_parser.c
+++ b/src/yajl_parser.c
@@ -342,8 +342,8 @@ yajl_do_parse(yajl_handle hand, const un
yajl_bs_pop(hand->stateStack);
goto around_again;
}
- /* intentional fall-through */
}
+ /* fall through */
case yajl_tok_colon:
case yajl_tok_comma:
case yajl_tok_right_bracket:
@@ -411,6 +411,7 @@ yajl_do_parse(yajl_handle hand, const un
yajl_bs_pop(hand->stateStack);
goto around_again;
}
+ /* fall through */
default:
yajl_bs_set(hand->stateStack, yajl_state_parse_error);
hand->parseError =
--- a/verify/CMakeLists.txt
+++ b/verify/CMakeLists.txt
@@ -28,10 +28,4 @@ ADD_EXECUTABLE(json_verify ${SRCS})
TARGET_LINK_LIBRARIES(json_verify yajl_s)
-# copy in the binary
-GET_TARGET_PROPERTY(binPath json_verify LOCATION)
-
-ADD_CUSTOM_COMMAND(TARGET json_verify POST_BUILD
- COMMAND ${CMAKE_COMMAND} -E copy_if_different ${binPath} ${binDir})
-
INSTALL(TARGETS json_verify RUNTIME DESTINATION bin)

View File

@@ -1,7 +1,7 @@
#
# spec file for package libyajl
#
# Copyright (c) 2025 SUSE LLC
# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -29,18 +29,18 @@ Source1: baselibs.conf
Source2: json_reformat.1
Source3: json_verify.1
Source99: %{name}-rpmlintrc
Patch0: %{name}.patch
Patch1: libyajl-optflags.patch
Patch2: libyajl-lib_suffix.patch
Patch3: libyajl-pkgconfig.patch
Patch4: libyajl-CVE-2022-24795.patch
Patch5: libyajl-CVE-2023-33460.patch
BuildRequires: bison
BuildRequires: cmake >= 3.10
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: flex
BuildRequires: gcc-c++
BuildRequires: pkg-config
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a
@@ -105,23 +105,29 @@ install -m644 %{SOURCE2} %{SOURCE3} %{buildroot}/%{_mandir}/man1
%check
make %{?_smp_mflags} test
%ldconfig_scriptlets -n %{name}%{sover}
%post -n %{name}%{sover} -p /sbin/ldconfig
%postun -n %{name}%{sover} -p /sbin/ldconfig
%files -n %{name}%{sover}
%defattr(-,root,root)
%license COPYING
%{_libdir}/libyajl.so.%{sover}
%{_libdir}/libyajl.so.%{sover}.*
%files -n %{name}-devel
%defattr(-,root,root)
%doc README TODO
%{_includedir}/yajl
%{_libdir}/libyajl.so
%{_libdir}/pkgconfig/yajl.pc
%files -n %{name}-devel-static
%defattr(-,root,root)
%{_libdir}/libyajl_s.a
%files -n yajl
%defattr(-,root,root)
%{_mandir}/man1/json_reformat.1*
%{_mandir}/man1/json_verify.1*
%{_bindir}/json_reformat