]> git.pld-linux.org Git - packages/ykpers.git/commitdiff
- added json-c patch (fixes build with json-c 0.14); release 2 master auto/th/ykpers-1.20.0-2
authorJakub Bogusz <qboosh@pld-linux.org>
Fri, 1 May 2020 19:50:44 +0000 (21:50 +0200)
committerJakub Bogusz <qboosh@pld-linux.org>
Fri, 1 May 2020 19:50:44 +0000 (21:50 +0200)
ykpers-json-c.patch [new file with mode: 0644]
ykpers.spec

diff --git a/ykpers-json-c.patch b/ykpers-json-c.patch
new file mode 100644 (file)
index 0000000..8be31b8
--- /dev/null
@@ -0,0 +1,70 @@
+--- ykpers-1.20.0/ykpers-json.c.orig   2019-02-19 13:29:54.000000000 +0100
++++ ykpers-1.20.0/ykpers-json.c        2020-05-01 21:45:21.661700644 +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 ? (json_bool)0 : (json_bool)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);
+                                       }
+                               }
index b0b4cae0490aeb5a31b6c481a6935b7c33c77506..42d89a326cd910597d7f229edc29ef26e8dedc90 100644 (file)
@@ -7,11 +7,12 @@ Summary:      Yubikey personalization program
 Summary(pl.UTF-8):     Program do personalizacji urządzeń Yubikey
 Name:          ykpers
 Version:       1.20.0
-Release:       1
+Release:       2
 License:       BSD
 Group:         Applications/System
 Source0:       https://developers.yubico.com/yubikey-personalization/Releases/%{name}-%{version}.tar.gz
 # Source0-md5: 8749113ce5a0164fe2b429b61242ba0f
+Patch0:                %{name}-json-c.patch
 URL:           https://developers.yubico.com/yubikey-personalization/
 BuildRequires: asciidoc
 BuildRequires: json-c-devel
@@ -59,6 +60,7 @@ Statyczna biblioteka ykpers.
 
 %prep
 %setup -q
+%patch0 -p1
 
 %build
 %configure \
This page took 0.099607 seconds and 4 git commands to generate.