From bd646bb122e2805a05147a54265de4c29aedd25a1446c533f0395c9cc67e7f9f Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 2 Jun 2011 14:23:03 +0000 Subject: [PATCH 1/6] Accepting request 72488 from Virtualization I would like to submit libyajl to SLE11-SP2 (FATE#310918) but can't get it accepted with 'no-manual-page-for-binary' rpmlint filter. I've created some simple man pages for json_{reformat,verify} and would like to submit here for review/comment before re-submitting to SUSE:SLE-11-SP2:GA. Thanks. - Add man pages for json_{reformat,verify} OBS-URL: https://build.opensuse.org/request/show/72488 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=8 --- json_reformat.1 | 22 ++++++++++++++++++++++ json_verify.1 | 25 +++++++++++++++++++++++++ libyajl-rpmlintrc | 1 - libyajl.changes | 5 +++++ libyajl.spec | 6 ++++++ 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 json_reformat.1 create mode 100644 json_verify.1 diff --git a/json_reformat.1 b/json_reformat.1 new file mode 100644 index 0000000..13474ce --- /dev/null +++ b/json_reformat.1 @@ -0,0 +1,22 @@ +.TH json_reformat 1 +.SH NAME +json_reformat \- Reformat json from stdin +.SH SYNOPSIS +.B json_reformat +[ +.I OPTION +] +.SH "DESCRIPTION" +A sample program to demonstrate the use of yajl. json_reformat reformats json from stdin. +.SH OPTIONS +.TP +.B \-m +minimize json rather than beautify (default) +.TP +.B \-u +allow invalid UTF8 inside strings during parsing +.BR +.SH AUTHORS + Lloyd Hilaiel + + diff --git a/json_verify.1 b/json_verify.1 new file mode 100644 index 0000000..66ad135 --- /dev/null +++ b/json_verify.1 @@ -0,0 +1,25 @@ +.TH json_verify 1 +.SH NAME +json_verify \- Validate json from stdin +.SH SYNOPSIS +.B json_verify +[ +.I OPTION +] +.SH "DESCRIPTION" +A sample program to demonstrate the use of yajl. json_verify validates json from stdin. +.SH OPTIONS +.TP +.B \-q +quiet mode +.TP +.B \-c +allow comments +.TP +.B \-u +allow invalid utf8 inside strings +.BR +.SH AUTHORS + Lloyd Hilaiel + + diff --git a/libyajl-rpmlintrc b/libyajl-rpmlintrc index 2c4fbcc..9320c19 100644 --- a/libyajl-rpmlintrc +++ b/libyajl-rpmlintrc @@ -1,4 +1,3 @@ addFilter("no-dependency-on libyajl/libyajl-libs/liblibyajl") addFilter("libyajl-devel-static..*: W: shlib-policy-missing-lib") -addFilter("no-manual-page-for-binary .*") addFilter("macro-in-comment .*") diff --git a/libyajl.changes b/libyajl.changes index 30b9c87..58105c7 100644 --- a/libyajl.changes +++ b/libyajl.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Jun 1 22:33:07 MDT 2011 - jfehlig@novell.com + +- Add man pages for json_{reformat,verify} + ------------------------------------------------------------------- Wed Apr 13 10:43:49 MDT 2011 - jfehlig@novell.com diff --git a/libyajl.spec b/libyajl.spec index 453bd56..0877ef9 100644 --- a/libyajl.spec +++ b/libyajl.spec @@ -46,6 +46,8 @@ Summary: Yet Another JSON Library # http://download.github.com/lloyd-yajl-%{version}-0-g%{githash}.tar.gz Source: lloyd-yajl-%{version}-0-g%{githash}.tar.bz2 Source1: baselibs.conf +Source2: json_reformat.1 +Source3: json_verify.1 Patch1: libyajl-optflags.patch Patch2: libyajl-lib_suffix.patch Source99: %{name}-rpmlintrc @@ -134,6 +136,8 @@ popd build pushd build %makeinstall popd build +install -d -m 0755 $RPM_BUILD_ROOT%{_mandir}/man1 +install -m644 %SOURCE2 %SOURCE3 $RPM_BUILD_ROOT/%{_mandir}/man1 %check cd test @@ -162,6 +166,8 @@ cd test %files -n yajl %defattr(-,root,root) +%doc %{_mandir}/man1/json_reformat.1* +%doc %{_mandir}/man1/json_verify.1* %{_bindir}/json_reformat %{_bindir}/json_verify From 293fdafe323b19c7f53685e4bf30542bf2e820590d6db6b0a09f8df12a75506a Mon Sep 17 00:00:00 2001 From: Stephan Kulow Date: Thu, 2 Jun 2011 14:23:27 +0000 Subject: [PATCH 2/6] prepare_spec OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=11 --- libyajl.spec | 69 ++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 32 deletions(-) diff --git a/libyajl.spec b/libyajl.spec index 0877ef9..f3feebd 100644 --- a/libyajl.spec +++ b/libyajl.spec @@ -17,8 +17,10 @@ # norootforbuild -Name: libyajl -Version: 1.0.11 + +Name: libyajl +Version: 1.0.11 +Release: 0 # # NB, upstream does not provide pre-built tar.gz downloads. Instead # they make you use the 'on the fly' generated tar.gz from GITHub's @@ -41,41 +43,42 @@ Version: 1.0.11 %global githash f4baae0 %define soname 1 -Release: 0 -Summary: Yet Another JSON Library +Summary: Yet Another JSON Library # http://download.github.com/lloyd-yajl-%{version}-0-g%{githash}.tar.gz -Source: lloyd-yajl-%{version}-0-g%{githash}.tar.bz2 -Source1: baselibs.conf -Source2: json_reformat.1 -Source3: json_verify.1 -Patch1: libyajl-optflags.patch -Patch2: libyajl-lib_suffix.patch -Source99: %{name}-rpmlintrc -URL: http://lloyd.github.com/yajl/ -Group: System/Libraries -License: BSD3c -BuildRoot: %{_tmppath}/build-%{name}-%{version} -BuildRequires: bison flex -BuildRequires: cmake -BuildRequires: gcc-c++ libstdc++-devel -BuildRequires: make glibc-devel +Source: lloyd-yajl-%{version}-0-g%{githash}.tar.bz2 +Source1: baselibs.conf +Source2: json_reformat.1 +Source3: json_verify.1 +Patch1: libyajl-optflags.patch +Patch2: libyajl-lib_suffix.patch +Source99: %{name}-rpmlintrc +Url: http://lloyd.github.com/yajl/ +Group: System/Libraries +License: BSD3c +BuildRoot: %{_tmppath}/%{name}-%{version}-build +BuildRequires: bison flex +BuildRequires: cmake +BuildRequires: gcc-c++ libstdc++-devel +BuildRequires: glibc-devel make %description YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a small validating JSON generator. %package -n %{name}%{soname} -Summary: Yet Another JSON Library -Group: System/Libraries + +Summary: Yet Another JSON Library +Group: System/Libraries %description -n %{name}%{soname} YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a small validating JSON generator. %package -n %{name}-devel -Summary: Yet Another JSON Library (Development Environment) -Group: Development/Libraries/C and C++ -Requires: %{name}%{soname} = %{version} + +Summary: Yet Another JSON Library (Development Environment) +Group: Development/Libraries/C and C++ +Requires: %{name}%{soname} = %{version} %description -n %{name}-devel YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a @@ -85,9 +88,10 @@ This package provides the necessary environment for compiling and linking against %{name}. %package -n %{name}-devel-static -Summary: Yet Another JSON Library (Static Library) -Group: Development/Libraries/C and C++ -Requires: %{name}-devel = %{version} + +Summary: Yet Another JSON Library (Static Library) +Group: Development/Libraries/C and C++ +Requires: %{name}-devel = %{version} %description -n %{name}-devel-static YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a @@ -97,9 +101,10 @@ This package provides the necessary environment for linking statically against %{name}. %package -n yajl -Summary: Yet Another JSON Library Tools -Group: Productivity/Text/Utilities -Requires: %{name}%{soname} = %{version} + +Summary: Yet Another JSON Library Tools +Group: Productivity/Text/Utilities +Requires: %{name}%{soname} = %{version} %description -n yajl YAJL is a small event-driven (SAX-style) JSON parser written in ANSI C, and a @@ -144,6 +149,7 @@ cd test ./run_tests.sh %post -n %{name}%{soname} -p /sbin/ldconfig + %postun -n %{name}%{soname} -p /sbin/ldconfig %clean @@ -170,5 +176,4 @@ cd test %doc %{_mandir}/man1/json_verify.1* %{_bindir}/json_reformat %{_bindir}/json_verify - - +%changelog From c040bd1fdf2588ce02cfb655d12b7116f9cce1921c629830acdd77acf56db2ad Mon Sep 17 00:00:00 2001 From: Pascal Bleser Date: Mon, 13 Jun 2011 07:20:43 +0000 Subject: [PATCH 3/6] merged OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=12 --- libyajl-rpmlintrc | 1 + libyajl.changes | 6 ++++++ libyajl.spec | 9 ++++++--- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/libyajl-rpmlintrc b/libyajl-rpmlintrc index 9320c19..2c4fbcc 100644 --- a/libyajl-rpmlintrc +++ b/libyajl-rpmlintrc @@ -1,3 +1,4 @@ addFilter("no-dependency-on libyajl/libyajl-libs/liblibyajl") addFilter("libyajl-devel-static..*: W: shlib-policy-missing-lib") +addFilter("no-manual-page-for-binary .*") addFilter("macro-in-comment .*") diff --git a/libyajl.changes b/libyajl.changes index 58105c7..94eb0ae 100644 --- a/libyajl.changes +++ b/libyajl.changes @@ -9,6 +9,12 @@ Wed Apr 13 10:43:49 MDT 2011 - jfehlig@novell.com - Add filters to rpmlintrc - spec file: Document githash usage in tarbal name +------------------------------------------------------------------- +Wed Apr 13 10:43:49 MDT 2011 - jfehlig@novell.com + +- Add filters to rpmlintrc +- spec file: Document githash usage in tarbal name + ------------------------------------------------------------------- Fri Apr 8 20:43:36 UTC 2011 - coolo@novell.com diff --git a/libyajl.spec b/libyajl.spec index f3feebd..83d3178 100644 --- a/libyajl.spec +++ b/libyajl.spec @@ -20,7 +20,7 @@ Name: libyajl Version: 1.0.11 -Release: 0 +Release: 7 # # NB, upstream does not provide pre-built tar.gz downloads. Instead # they make you use the 'on the fly' generated tar.gz from GITHub's @@ -67,6 +67,7 @@ small validating JSON generator. %package -n %{name}%{soname} + Summary: Yet Another JSON Library Group: System/Libraries @@ -76,6 +77,7 @@ small validating JSON generator. %package -n %{name}-devel + Summary: Yet Another JSON Library (Development Environment) Group: Development/Libraries/C and C++ Requires: %{name}%{soname} = %{version} @@ -89,6 +91,7 @@ against %{name}. %package -n %{name}-devel-static + Summary: Yet Another JSON Library (Static Library) Group: Development/Libraries/C and C++ Requires: %{name}-devel = %{version} @@ -101,7 +104,6 @@ This package provides the necessary environment for linking statically against %{name}. %package -n yajl - Summary: Yet Another JSON Library Tools Group: Productivity/Text/Utilities Requires: %{name}%{soname} = %{version} @@ -134,7 +136,7 @@ cmake \ -DLIB_SUFFIX="$LIBSUFFIX" \ .. -%__make %{?jobs:-j%{jobs}} +%__make %{?_smp_flags} popd build %install @@ -176,4 +178,5 @@ cd test %doc %{_mandir}/man1/json_verify.1* %{_bindir}/json_reformat %{_bindir}/json_verify + %changelog From e89cb3550ef8607cbd34d3cc543ec2de971b4e92f3f3173b862a01084e1d1d1d Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 12 Aug 2011 11:11:28 +0000 Subject: [PATCH 4/6] Accepting request 78636 from devel:languages:ruby:extensions - update to 2.0.1 - lth generator flag to allow client to specify they want escaped solidi '/'. issue #28 - lth crash fix when yajl_parse() is never called. issue #27 - additional changes from 2.0.0 - lth YAJL is now ISC licensed: http://en.wikipedia.org/wiki/ISC_license - lth 20-35% (osx and linux respectively) parsing performance improvement attained by tweaking string scanning (idea: @michaelrhanson). - Florian Forster & lth - yajl_tree interface introduced as a higher level interface to the parser (eats JSON, poops a memory representation) - lth require a C99 compiler - lth integers are now represented with long long (64bit+) on all platforms. - lth size_t now used throughout to represent buffer lengths, so you can safely manage buffers greater than 4GB. - gno semantic improvements to yajl's API regarding partial value parsing and trailing garbage - lth new configuration mechanism for yajl, see yajl_config() and yajl_gen_config() - gno more allocation checking in more places - gno remove usage of strtol, replace with custom implementation that cares not about your locale. - lth yajl_parse_complete renamed to yajl_complete_parse. - lth add a switch to validate utf8 strings as they are generated. - lth tests are a lot quieter in their output. - lth addition of a little in tree performance benchmark, OBS-URL: https://build.opensuse.org/request/show/78636 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=13 --- libyajl-optflags.patch | 10 ++++--- libyajl.changes | 48 ++++++++++++++++++++++++++++++ libyajl.spec | 10 +++---- lloyd-yajl-2.0.1-0-gf4b2b1a.tar.gz | 3 ++ 4 files changed, 62 insertions(+), 9 deletions(-) create mode 100644 lloyd-yajl-2.0.1-0-gf4b2b1a.tar.gz diff --git a/libyajl-optflags.patch b/libyajl-optflags.patch index 130e7bd..df7a393 100644 --- a/libyajl-optflags.patch +++ b/libyajl-optflags.patch @@ -1,7 +1,9 @@ ---- CMakeLists.txt.orig 2010-12-01 22:29:50.000000000 +0100 -+++ CMakeLists.txt 2010-12-01 22:30:29.000000000 +0100 -@@ -70,7 +70,7 @@ - "${CMAKE_C_FLAGS} -fPIC -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") +Index: CMakeLists.txt +=================================================================== +--- CMakeLists.txt.orig ++++ 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") SET(CMAKE_C_FLAGS_DEBUG "-DDEBUG -g") - SET(CMAKE_C_FLAGS_RELEASE "-DNDEBUG -O2 -Wuninitialized") diff --git a/libyajl.changes b/libyajl.changes index 94eb0ae..7eeeff5 100644 --- a/libyajl.changes +++ b/libyajl.changes @@ -1,3 +1,51 @@ +------------------------------------------------------------------- +Fri Aug 12 11:09:08 UTC 2011 - mrueckert@suse.de + +- update to 2.0.1 + - lth generator flag to allow client to specify they want escaped + solidi '/'. issue #28 + - lth crash fix when yajl_parse() is never called. issue #27 +- additional changes from 2.0.0 + - lth YAJL is now ISC licensed: + http://en.wikipedia.org/wiki/ISC_license + - lth 20-35% (osx and linux respectively) parsing performance + improvement attained by tweaking string scanning (idea: + @michaelrhanson). + - Florian Forster & lth - yajl_tree interface introduced as a + higher level interface to the parser (eats JSON, poops a memory + representation) + - lth require a C99 compiler + - lth integers are now represented with long long (64bit+) on all + platforms. + - lth size_t now used throughout to represent buffer lengths, so + you can safely manage buffers greater than 4GB. + - gno semantic improvements to yajl's API regarding partial value + parsing and trailing garbage + - lth new configuration mechanism for yajl, see yajl_config() and + yajl_gen_config() + - gno more allocation checking in more places + - gno remove usage of strtol, replace with custom implementation + that cares not about your locale. + - lth yajl_parse_complete renamed to yajl_complete_parse. + - lth add a switch to validate utf8 strings as they are + generated. + - lth tests are a lot quieter in their output. + - lth addition of a little in tree performance benchmark, + `perftest` in perf/perftest.c +- additional changes from 1.0.12 + - Conrad Irwin - Parse null bytes correctly + - Mirek Rusin - fix LLVM warnings + - gno - Don't generate numbers for keys. closes #13 + - lth - various win32 fixes, including build documentation + improvements + - John Stamp - Don't export private symbols. + - John Stamp - Install yajl_version.h, not the template. + - John Stamp - Don't use -fPIC for static lib. Cmake will + automatically add it for the shared. + - lth 0 fix paths embedded in dylib upon installation on osx. + closes #11 +- refreshed optflags patch + ------------------------------------------------------------------- Wed Jun 1 22:33:07 MDT 2011 - jfehlig@novell.com diff --git a/libyajl.spec b/libyajl.spec index 83d3178..86d8619 100644 --- a/libyajl.spec +++ b/libyajl.spec @@ -19,8 +19,8 @@ Name: libyajl -Version: 1.0.11 -Release: 7 +Version: 2.0.1 +Release: 0 # # NB, upstream does not provide pre-built tar.gz downloads. Instead # they make you use the 'on the fly' generated tar.gz from GITHub's @@ -40,12 +40,12 @@ Release: 7 # # So for new versions, update 'githash' to match the hash of the # GIT tag associated with updated 'Version:' field just above -%global githash f4baae0 +%global githash f4b2b1a %define soname 1 Summary: Yet Another JSON Library # http://download.github.com/lloyd-yajl-%{version}-0-g%{githash}.tar.gz -Source: lloyd-yajl-%{version}-0-g%{githash}.tar.bz2 +Source: lloyd-yajl-%{version}-0-g%{githash}.tar.gz Source1: baselibs.conf Source2: json_reformat.1 Source3: json_verify.1 @@ -54,7 +54,7 @@ Patch2: libyajl-lib_suffix.patch Source99: %{name}-rpmlintrc Url: http://lloyd.github.com/yajl/ Group: System/Libraries -License: BSD3c +License: ISC BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: bison flex BuildRequires: cmake diff --git a/lloyd-yajl-2.0.1-0-gf4b2b1a.tar.gz b/lloyd-yajl-2.0.1-0-gf4b2b1a.tar.gz new file mode 100644 index 0000000..1bba7d4 --- /dev/null +++ b/lloyd-yajl-2.0.1-0-gf4b2b1a.tar.gz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c2d9096ba1ebc9a368347c7c695cfbbc72690571a5f7955ce226eedbea5b4721 +size 82102 From edffb2bb377e3a5645cb1d657ca2ab76d003fe77e7b603af33e3bc71d3b76e1c Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 12 Aug 2011 13:55:07 +0000 Subject: [PATCH 5/6] Accepting request 78664 from devel:languages:ruby:extensions - fix soversion OBS-URL: https://build.opensuse.org/request/show/78664 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=14 --- libyajl.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libyajl.spec b/libyajl.spec index 86d8619..6586559 100644 --- a/libyajl.spec +++ b/libyajl.spec @@ -42,7 +42,7 @@ Release: 0 # GIT tag associated with updated 'Version:' field just above %global githash f4b2b1a -%define soname 1 +%define soname 2 Summary: Yet Another JSON Library # http://download.github.com/lloyd-yajl-%{version}-0-g%{githash}.tar.gz Source: lloyd-yajl-%{version}-0-g%{githash}.tar.gz From e68342a39ed16bf1c1a00f154fd8d67166a992dcdcc420acb0899fe58ad26e28 Mon Sep 17 00:00:00 2001 From: Marcus Rueckert Date: Fri, 12 Aug 2011 13:57:05 +0000 Subject: [PATCH 6/6] Accepting request 78665 from devel:languages:ruby:extensions - cleanup outdated tarball OBS-URL: https://build.opensuse.org/request/show/78665 OBS-URL: https://build.opensuse.org/package/show/devel:libraries:c_c++/libyajl?expand=0&rev=15 --- lloyd-yajl-1.0.11-0-gf4baae0.tar.bz2 | 3 --- 1 file changed, 3 deletions(-) delete mode 100644 lloyd-yajl-1.0.11-0-gf4baae0.tar.bz2 diff --git a/lloyd-yajl-1.0.11-0-gf4baae0.tar.bz2 b/lloyd-yajl-1.0.11-0-gf4baae0.tar.bz2 deleted file mode 100644 index c64abe0..0000000 --- a/lloyd-yajl-1.0.11-0-gf4baae0.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:00dbfd8401ac66846fe482b16bca32fa15916d166bb4038a584610853a20a296 -size 43076