Hello community,

here is the log from the commit of package jshon for openSUSE:Factory checked 
in at 2019-05-05 21:21:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/jshon (Old)
 and      /work/SRC/openSUSE:Factory/.jshon.new.5148 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "jshon"

Sun May  5 21:21:52 2019 rev:1 rq:700489 version:20131105

Changes:
--------
New Changes file:

--- /dev/null   2019-05-02 15:18:01.516169518 +0200
+++ /work/SRC/openSUSE:Factory/.jshon.new.5148/jshon.changes    2019-05-05 
21:21:52.917352799 +0200
@@ -0,0 +1,17 @@
+-------------------------------------------------------------------
+Fri May  3 19:31:18 UTC 2019 - Martin Hauke <mar...@gmx.de>
+
+- Remove not used patch:
+  * 0002-fix-documentation-for-creating-JSON.patch
+
+-------------------------------------------------------------------
+Fri May  3 18:11:57 UTC 2019 - Martin Hauke <mar...@gmx.de>
+
+- Update to upstream release 20131105
+- Specfile cleanup
+
+-------------------------------------------------------------------
+Sun Feb 15 21:44:03 UTC 2015 - mar...@gmx.de
+
+- initial package, version 0.0.0.git1405173528.a61d7f2
+

New:
----
  0001-Fix-Makefile-typo.patch
  0001-Fix-null-termination-in-read_stream.patch
  0001-check-for-a-error-on-file-open-with-F-option.patch
  jshon-20131105.tar.gz
  jshon-fix-install-permissions.diff
  jshon.changes
  jshon.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ jshon.spec ++++++
#
# spec file for package jshon
#
# Copyright (c) 2015, Martin Hauke <mar...@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


Name:           jshon
Version:        20131105
Release:        0
Summary:        A JSON parser for the shell
License:        MIT
Group:          Productivity/Text/Utilities
URL:            http://kmkeen.com/jshon
#Git-Clone:     https://github.com/keenerd/jshon.git
Source:         
https://github.com/keenerd/%{name}/archive/%{version}.tar.gz#/%{name}-%{version}.tar.gz
Patch0:         jshon-fix-install-permissions.diff
Patch1:         0001-check-for-a-error-on-file-open-with-F-option.patch
Patch2:         0001-Fix-Makefile-typo.patch
Patch3:         0001-Fix-null-termination-in-read_stream.patch
BuildRequires:  pkgconfig
BuildRequires:  pkgconfig(jansson)

%description
Jshon parses, reads and creates JSON. It is designed to be as usable as possible
from within the shell and replaces fragile adhoc parsers made from grep/sed/awk
as well as heavyweight one-line parsers made from perl/python.

%prep
%autosetup

%build
export CFLAGS="%{optflags}"
make %{?_smp_mflags}

%install
%make_install

%files
%license LICENSE
%{_bindir}/jshon
%{_mandir}/man1/jshon.1%{?ext_man}

%changelog
++++++ 0001-Fix-Makefile-typo.patch ++++++
>From 830e2df6c7938b6ddd515ef4c88d72d4de81bf3e Mon Sep 17 00:00:00 2001
From: Rowan Thorpe <ro...@rowanthorpe.com>
Date: Mon, 9 Dec 2013 11:38:11 +0200
Subject: [PATCH] Fix Makefile typo

---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index eca5ccf..60dbd47 100644
--- a/Makefile
+++ b/Makefile
@@ -18,7 +18,7 @@ all: $(DISTFILES)
 
 $(DISTFILES): jshon.o
 
-strip: $(DISFILES)
+strip: $(DISTFILES)
        strip --strip-all $(DISTFILES)
 
 clean:
-- 
2.16.4

++++++ 0001-Fix-null-termination-in-read_stream.patch ++++++
>From d919aeaece37962251dbe6c1ee50f0028a5c90e4 Mon Sep 17 00:00:00 2001
From: Mikael Brockman <mik...@brockman.se>
Date: Thu, 2 Mar 2017 10:15:24 +0200
Subject: [PATCH] Fix null termination in read_stream

This came up in issue #53.
---
 jshon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/jshon.c b/jshon.c
index 6e2f96a..ffefee6 100644
--- a/jshon.c
+++ b/jshon.c
@@ -368,6 +368,8 @@ char* read_stream(FILE* fp)
                 (ssize_t)st.st_size, (ssize_t)bytes_r);
     }
 
+    buffer[bytes_r] = 0;
+
     return buffer;
 }
 
-- 
2.16.4

++++++ 0001-check-for-a-error-on-file-open-with-F-option.patch ++++++
>From 7579558b8018d4abcd0a4ee0a16d9be467a5744a Mon Sep 17 00:00:00 2001
From: Jordan Metzmeier <jmetzmeie...@gmail.com>
Date: Tue, 19 Nov 2013 22:38:49 -0600
Subject: [PATCH 1/2] check for a error on file open with -F option

---
 jshon.c | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/jshon.c b/jshon.c
index f42b6da..ad0fb7c 100644
--- a/jshon.c
+++ b/jshon.c
@@ -375,6 +375,10 @@ char* read_file(char* path)
     FILE* fp;
     char* content;
     fp = fopen(path, "r");
+    if ( !fp ) {
+      fprintf(stderr, "unable to read file %s: %s\n", path, strerror(errno));
+      return NULL;
+    }
     content = read_stream(fp);
     fclose(fp);
     return content;
@@ -927,6 +931,11 @@ int main (int argc, char *argv[])
         {content = read_file(file_path);}
     else
         {content = read_stdin();}
+    if (!content) {
+      fprintf(stderr, "error: failed to read input\n");
+      exit(1);
+    }
+
     if (!content[0] && !quiet)
         {fprintf(stderr, "warning: nothing to read\n");}
 
-- 
2.16.4

++++++ jshon-fix-install-permissions.diff ++++++
diff --git a/Makefile b/Makefile
index 60dbd47..fb99bc2 100644
--- a/Makefile
+++ b/Makefile
@@ -25,8 +25,8 @@ clean:
        rm -f *.o $(DISTFILES)
 
 install:
-       $(INSTALL) -D $(DISTFILES) $(TARGET_PATH)/$(DISTFILES)
-       $(INSTALL) -D $(MANFILE) $(MANDIR)/$(MANFILE)
+       $(INSTALL) -Dm0755 $(DISTFILES) $(TARGET_PATH)/$(DISTFILES)
+       $(INSTALL) -Dm0644 $(MANFILE) $(MANDIR)/$(MANFILE)
 
 dist: clean
        sed -i "s/#define JSHONVER .*/#define JSHONVER ${VERSION}/" jshon.c

Reply via email to