Hello community,

here is the log from the commit of package ykpers for openSUSE:Factory checked 
in at 2020-06-10 00:48:26
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/ykpers (Old)
 and      /work/SRC/openSUSE:Factory/.ykpers.new.3606 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "ykpers"

Wed Jun 10 00:48:26 2020 rev:10 rq:812717 version:1.20.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/ykpers/ykpers.changes    2019-07-16 
08:41:21.403036888 +0200
+++ /work/SRC/openSUSE:Factory/.ykpers.new.3606/ykpers.changes  2020-06-10 
00:48:29.294956299 +0200
@@ -1,0 +2,7 @@
+Mon Jun  8 06:59:22 UTC 2020 - Torsten Gruner <[email protected]>
+
+- Fix build with gcc 10 [gh#Yubico/yubikey-personalization#155]
+- Fix boolean value with json-c 0.14 [gh#Yubico/yubikey-personalization#159]
+  adds ykpers-json.patch
+
+-------------------------------------------------------------------

New:
----
  ykpers-json.patch

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

Other differences:
------------------
++++++ ykpers.spec ++++++
--- /var/tmp/diff_new_pack.aE8iwl/_old  2020-06-10 00:48:29.866957795 +0200
+++ /var/tmp/diff_new_pack.aE8iwl/_new  2020-06-10 00:48:29.870957806 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package ykpers
 #
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -26,6 +26,8 @@
 Source0:        
https://developers.yubico.com/yubikey-personalization/Releases/ykpers-%{version}.tar.gz
 Source1:        
https://developers.yubico.com/yubikey-personalization/Releases/ykpers-%{version}.tar.gz.sig
 Source2:        %{name}.keyring
+# PATCH-FIX-UPSTREAM ykpers-json.patch gh#Yubico/yubikey-personalization#159
+Patch0:         ykpers-json.patch
 BuildRequires:  libyubikey-devel >= 1.12
 BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(json-c) >= 0.10
@@ -53,9 +55,11 @@
 Yubico's YubiKey can be re-programmed. This project provides a reference 
implementation for configuration of YubiKeys.
 
 %prep
-%setup -q
+%autosetup
 # Add access for group "users"
 sed -i 's|--device=$env{DEVNAME}"|--device=$env{DEVNAME}" GROUP="users"|g' 
70-yubikey.rules
+# PATCH-FIX-UPSTREAM gh#Yubico/yubikey-personalization#155 -- Fix build with 
gcc 10
+sed -i 's|^const char|extern const char|g' ykpers-args.h
 
 %build
 %configure --disable-static --with-pic \


++++++ ykpers-json.patch ++++++
--- ykpers-json.c.orig  2019-02-19 13:29:54.000000000 +0100
+++ ykpers-json.c       2020-06-08 08:49:02.960771280 +0200
@@ -40,7 +40,7 @@
 #define yk_json_object_object_get(obj, key, value) 
json_object_object_get_ex(obj, key, &value)
 #else
 typedef int json_bool;
-#define yk_json_object_object_get(obj, key, value) (value = 
json_object_object_get(obj, key)) == NULL ? (json_bool)FALSE : (json_bool)TRUE
+#define yk_json_object_object_get(obj, key, value) (value = 
json_object_object_get(obj, key)) == NULL ? 0 : 1
 #endif
 
 static void set_json_value(struct map_st *p, int mode, json_object *options, 
YKP_CONFIG *cfg) {
@@ -50,7 +50,7 @@
        if(p->mode && (mode & p->mode) == mode) {
                json_object *joption;
                json_bool ret = yk_json_object_object_get(options, 
p->json_text, joption);
-               if(ret == TRUE && json_object_get_type(joption) == 
json_type_boolean) {
+               if(ret == 1 && json_object_get_type(joption) == 
json_type_boolean) {
                        int value = json_object_get_boolean(joption);
                        if(value == 1) {
                                p->setter(cfg, true);
@@ -230,20 +230,20 @@
                        ykp_errno = YKP_EINVAL;
                        goto out;
                }
-               if(yk_json_object_object_get(jobj, "yubiProdConfig", 
yprod_json) == FALSE) {
+               if(yk_json_object_object_get(jobj, "yubiProdConfig", 
yprod_json) == 0) {
                        ykp_errno = YKP_EINVAL;
                        goto out;
                }
-               if(yk_json_object_object_get(yprod_json, "mode", jmode) == 
FALSE) {
+               if(yk_json_object_object_get(yprod_json, "mode", jmode) == 0) {
                        ykp_errno = YKP_EINVAL;
                        goto out;
                }
-               if(yk_json_object_object_get(yprod_json, "options", options) == 
FALSE) {
+               if(yk_json_object_object_get(yprod_json, "options", options) == 
0) {
                        ykp_errno = YKP_EINVAL;
                        goto out;
                }
 
-               if(yk_json_object_object_get(yprod_json, "targetConfig", 
jtarget) == TRUE) {
+               if(yk_json_object_object_get(yprod_json, "targetConfig", 
jtarget) == 1) {
                        int target_config = json_object_get_int(jtarget);
                        int command;
                        if(target_config == 1) {
@@ -275,13 +275,13 @@
                if(mode == MODE_OATH_HOTP) {
                        json_object *jdigits, *jrandom;
                        ykp_set_tktflag_OATH_HOTP(cfg, true);
-                       if(yk_json_object_object_get(options, "oathDigits", 
jdigits) == TRUE) {
+                       if(yk_json_object_object_get(options, "oathDigits", 
jdigits) == 1) {
                                int digits = json_object_get_int(jdigits);
                                if(digits == 8) {
                                        ykp_set_cfgflag_OATH_HOTP8(cfg, true);
                                }
                        }
-                       if(yk_json_object_object_get(options, "randomSeed", 
jrandom) == TRUE) {
+                       if(yk_json_object_object_get(options, "randomSeed", 
jrandom) == 1) {
                                int random = json_object_get_boolean(jrandom);
                                int seed = 0;
                                if(random == 1) {
@@ -290,7 +290,7 @@
                                        goto out;
                                } else {
                                        json_object *jseed;
-                                       if(yk_json_object_object_get(options, 
"fixedSeedvalue", jseed) == TRUE) {
+                                       if(yk_json_object_object_get(options, 
"fixedSeedvalue", jseed) == 1) {
                                                seed = 
json_object_get_int(jseed);
                                        }
                                }


Reply via email to