[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openembedded-devel
Subject:    Re: [oe] [meta-oe][PATCH] json-schema-validator: Updrade to 2.2.0
From:       "Martin Jansa" <Martin.Jansa () gmail ! com>
Date:       2023-08-30 7:27:25
Message-ID: CA+chaQdhEoT03kXOeicMJcgS2Vp+Xwf_etjvGCdNWbJ3KVb+Qw () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Was meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch
 really merged upstream?

It now fails in multilib builds with:
ERROR: lib32-json-schema-validator-2.2.0-r0 do_package: QA Issue:
lib32-json-schema-validator: Files/directories were installed but not
shipped in any package:
  /usr/lib/libnlohmann_json_schema_validator.so.2
  /usr/lib/libnlohmann_json_schema_validator.so.2.2.0
  /usr/lib/libnlohmann_json_schema_validator.so
  /usr/lib/cmake
  /usr/lib/cmake/nlohmann_json_schema_validator

/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorConfig.cmake


/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorConfigVersion.cmake


/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorTargets.cmake


/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorTargets-noconfig.cmake
 Please set FILES such that these items are packaged. Alternatively if they
are unneeded, avoid installing them or delete them within do_install.
lib32-json-schema-validator: 9 installed and not shipped files.
[installed-vs-shipped]

https://github.com/pboettch/json-schema-validator/pull/197 was closed due
to branch rename, but I don't see this change applied in:
https://github.com/pboettch/json-schema-validator/commits/main/CMakeLists.txt
so I guess the .patch is still needed.

On Tue, Aug 22, 2023 at 8:03 PM Parian Golchin <par.golchin@gmail.com>
wrote:

> Upgrade and add important patches to the release
> 
> Signed-off-by: Parian Golchin <par.golchin@gmail.com>
> ---
> ...or-Install-off-if-it-finds-it-via-li.patch | 29 ++++++++
> .../0001-cmake-Use-GNUInstallDirs.patch       | 46 ------------
> .../0002-Fix-assumed-signed-char.patch        | 71 +++++++++++++++++++
> ...003-For-root-value-use-empty-pointer.patch | 41 +++++++++++
> .../json-schema-validator_2.1.0.bb            | 16 -----
> .../json-schema-validator_2.2.0.bb            | 18 +++++
> 6 files changed, 159 insertions(+), 62 deletions(-)
> create mode 100644
> meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch
>  delete mode 100644
> meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch
>  create mode 100644
> meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch
>  create mode 100644
> meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch
>  delete mode 100644 meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.1.0.bb
> create mode 100644 meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.2.0.bb
> 
> diff --git
> a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch
>  b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch
>  new file mode 100644
> index 000000000..6e6a4b93e
> --- /dev/null
> +++
> b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch
>  @@ -0,0 +1,29 @@
> +From 35939115142db6cd366ab11b29692a0179338ddf Mon Sep 17 00:00:00 2001
> +From: Parian Golchin <Parian.Golchin@iris-sensing.com>
> +Date: Fri, 18 Aug 2023 15:54:25 +0200
> +Subject: [PATCH 1/3] Set Json_validator Install off if it finds it via
> linking
> +
> +Upstream-Status: Inappropriate [newer version of cmake in main branch]
> +
> +Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com>
> +---
> + CMakeLists.txt | 3 +++
> + 1 file changed, 3 insertions(+)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index f636734..9e4587f 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -55,6 +55,9 @@ option(JSON_VALIDATOR_BUILD_EXAMPLES "Build examples"
> ${JSON_VALIDATOR_IS_TOP_LE
> +
> + if(NOT TARGET nlohmann_json::nlohmann_json)
> +     find_package(nlohmann_json REQUIRED)
> ++else()
> ++    message(STATUS "Found nlohmann_json::nlohmann_json-target - linking
> with it")
> ++    set(JSON_VALIDATOR_INSTALL OFF)
> + endif()
> +
> + target_link_libraries(
> +--
> +2.25.1
> +
> diff --git
> a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch
>  b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch
>  deleted file mode 100644
> index 4b1184a39..000000000
> ---
> a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch
>                 
> +++ /dev/null
> @@ -1,46 +0,0 @@
> -From e0b1ad02c678513412aba95a1b2fb4005c3c0452 Mon Sep 17 00:00:00 2001
> -From: Khem Raj <raj.khem@gmail.com>
> -Date: Sat, 19 Mar 2022 22:40:49 -0700
> -Subject: [PATCH] cmake: Use GNUInstallDirs
> -
> -This helps it make it platform independent, some platforms e.g.
> -ppc64/linux use /usr/lib64 for system libraries
> -
> -Upstream-Status: Submitted [
> https://github.com/pboettch/json-schema-validator/pull/197]
> -Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ----
> - CMakeLists.txt | 8 +++++---
> - 1 file changed, 5 insertions(+), 3 deletions(-)
> -
> -diff --git a/CMakeLists.txt b/CMakeLists.txt
> -index c4cc218..594dc5f 100644
> ---- a/CMakeLists.txt
> -+++ b/CMakeLists.txt
> -@@ -122,11 +122,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
> -     endif()
> - endif()
> -
> -+include(GNUInstallDirs)
> -+
> - if(JSON_VALIDATOR_INSTALL)
> -     install(TARGETS nlohmann_json_schema_validator
> -             EXPORT ${PROJECT_NAME}Targets
> --            LIBRARY DESTINATION lib
> --            ARCHIVE DESTINATION lib
> -+            LIBRARY DESTINATION ${LIBDIR}
> -+            ARCHIVE DESTINATION ${LIBDIR}
> -             RUNTIME DESTINATION bin)
> -
> -     install(FILES src/nlohmann/json-schema.hpp
> -@@ -155,7 +157,7 @@ if(JSON_VALIDATOR_INSTALL)
> -     # Set Up the Project Targets and Config Files for CMake
> -
> -     # Set the install path to the cmake config files
> --    set(INSTALL_CMAKE_DIR
> ${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME})
> -+    set(INSTALL_CMAKE_DIR
> ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
> -
> -     # Create the ConfigVersion file
> -     include(CMakePackageConfigHelpers) # write_basic_package_version_file
> ---
> -2.35.1
> -
> diff --git
> a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch
>  b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch
>  new file mode 100644
> index 000000000..2ee0a3912
> --- /dev/null
> +++
> b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch
>  @@ -0,0 +1,71 @@
> +From 2065015da40cf79dd8ec9e3f186538e17c3b592f Mon Sep 17 00:00:00 2001
> +From: Robert Joslyn <robert.joslyn@redrectangle.org>
> +Date: Wed, 30 Nov 2022 13:07:29 -0800
> +Subject: [PATCH 2/3] Fix assumed signed char
> +
> +The code assumes that char is signed, but whether char is signed or
> +unsigned is implementation defined. On some architectures like PowerPC,
> +GCC treats char as unsigned resulting in compile errors:
> +
> +       smtp-address-validator.cpp:213:1: error: narrowing conversion of
> '-32' from 'int' to 'char' [-Wnarrowing]
> +
> +Fix this by specifying signed char.
> +
> +Upstream-Status: Accepted [
> https://github.com/pboettch/json-schema-validator/commit/491ac44026e08f31790f5cacffa62e168bb35e32
>  ]
> +
> +Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com>
> +---
> + src/smtp-address-validator.cpp | 16 ++++++++--------
> + 1 file changed, 8 insertions(+), 8 deletions(-)
> +
> +diff --git a/src/smtp-address-validator.cpp
> b/src/smtp-address-validator.cpp
> +index a63ead0..3903b51 100644
> +--- a/src/smtp-address-validator.cpp
> ++++ b/src/smtp-address-validator.cpp
> +@@ -63,7 +63,7 @@ static const short _address_key_offsets[] = {
> +       1363, 1365, 1367, 1368, 1370, 1388, 0
> + };
> +
> +-static const char _address_trans_keys[] = {
> ++static const signed char _address_trans_keys[] = {
> +       -32, -19, -16, -12, 34, 45, 61, 63,
> +       -62, -33, -31, -17, -15, -13, 33, 39,
> +       42, 43, 47, 57, 65, 90, 94, 126,
> +@@ -711,7 +711,7 @@ bool is_address(const char* p, const char* pe)
> +       {
> +               int _klen;
> +               unsigned int _trans = 0;
> +-              const char * _keys;
> ++              const signed char * _keys;
> +               const signed char * _acts;
> +               unsigned int _nacts;
> +               _resume: {}
> +@@ -728,9 +728,9 @@ bool is_address(const char* p, const char* pe)
> +
> +                       _klen = (int)_address_single_lengths[cs];
> +                       if ( _klen > 0 ) {
> +-                              const char *_lower = _keys;
> +-                              const char *_upper = _keys + _klen - 1;
> +-                              const char *_mid;
> ++                              const signed char *_lower = _keys;
> ++                              const signed char *_upper = _keys + _klen
> - 1;
> ++                              const signed char *_mid;
> +                               while ( 1 ) {
> +                                       if ( _upper < _lower ) {
> +                                               _keys += _klen;
> +@@ -752,9 +752,9 @@ bool is_address(const char* p, const char* pe)
> +
> +                       _klen = (int)_address_range_lengths[cs];
> +                       if ( _klen > 0 ) {
> +-                              const char *_lower = _keys;
> +-                              const char *_upper = _keys + (_klen<<1) -
> 2;
> +-                              const char *_mid;
> ++                              const signed char *_lower = _keys;
> ++                              const signed char *_upper = _keys +
> (_klen<<1) - 2;
> ++                              const signed char *_mid;
> +                               while ( 1 ) {
> +                                       if ( _upper < _lower ) {
> +                                               _trans += (unsigned
> int)_klen;
> +--
> +2.25.1
> +
> diff --git
> a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch
>  b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch
>  new file mode 100644
> index 000000000..e0d0cf8ce
> --- /dev/null
> +++
> b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch
>  @@ -0,0 +1,41 @@
> +From fa49c29942763285c51b7d2dea417d9f51e4961f Mon Sep 17 00:00:00 2001
> +From: Sven Fink <sven.fink@wipotec.com>
> +Date: Fri, 13 Jan 2023 09:15:42 +0100
> +Subject: [PATCH 3/3] For root value, use empty pointer
> +
> +Upstream-Status: Accepted [
> https://github.com/pboettch/json-schema-validator/commit/59c9d6200bf3cd54b4fc717ec1660c91eddb4d1a
>  ]
> +
> +Signed-off-by: Parian Golchin <Parian.Golchin@iris-sensing.com>
> +---
> + src/json-validator.cpp | 8 ++++++++
> + 1 file changed, 8 insertions(+)
> +
> +diff --git a/src/json-validator.cpp b/src/json-validator.cpp
> +index 7f34553..3c73d98 100644
> +--- a/src/json-validator.cpp
> ++++ b/src/json-validator.cpp
> +@@ -553,6 +553,9 @@ class type_schema : public schema
> +                                       else_->validate(ptr, instance,
> patch, e);
> +                       }
> +               }
> ++              if (instance.is_null()) {
> ++                      patch.add(nlohmann::json::json_pointer{},
> default_value_);
> ++              }
> +       }
> +
> + protected:
> +@@ -1134,6 +1137,11 @@ public:
> +                       propertyNames_ = schema::make(attr.value(), root,
> {"propertyNames"}, uris);
> +                       sch.erase(attr);
> +               }
> ++
> ++              attr = sch.find("default");
> ++              if (attr != sch.end()) {
> ++                      set_default_value(*attr);
> ++              }
> +       }
> + };
> +
> +--
> +2.25.1
> +
> diff --git a/meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.1.0.bb
> b/meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.1.0.bb
> deleted file mode 100644
> index 00d26d7b3..000000000
> --- a/meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.1.0.bb
> +++ /dev/null
> @@ -1,16 +0,0 @@
> -SUMMARY = "JSON schema validator for JSON for Modern C++"
> -LICENSE = "MIT"
> -LIC_FILES_CHKSUM = "file://LICENSE;md5=c441d022da1b1663c70181a32225d006"
> -
> -SRC_URI = "git://
> github.com/pboettch/json-schema-validator;branch=master;protocol=https \
> -           file://0001-cmake-Use-GNUInstallDirs.patch \
> -          "
> -SRCREV = "27fc1d094503623dfe39365ba82581507524545c"
> -
> -S = "${WORKDIR}/git"
> -
> -DEPENDS += "nlohmann-json"
> -
> -inherit cmake
> -EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF
> -DBUILD_TESTS=OFF"
> -
> diff --git a/meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.2.0.bb
> b/meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.2.0.bb
> new file mode 100644
> index 000000000..6f0b42402
> --- /dev/null
> +++ b/meta-oe/recipes-devtools/json-schema-validator/
> json-schema-validator_2.2.0.bb
> @@ -0,0 +1,18 @@
> +SUMMARY = "JSON schema validator for JSON for Modern C++"
> +LICENSE = "MIT"
> +LIC_FILES_CHKSUM = "file://LICENSE;md5=c441d022da1b1663c70181a32225d006"
> +
> +SRC_URI = "git://
> github.com/pboettch/json-schema-validator;branch=main;protocol=https \
> +
> file://0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch \
> +           file://0002-Fix-assumed-signed-char.patch \
> +           file://0003-For-root-value-use-empty-pointer.patch \
> +           "
> +
> +SRCREV = "6b17782d6a5d1dee5d2c4fc5d25ffb1123913431"
> +
> +S = "${WORKDIR}/git"
> +
> +DEPENDS += "nlohmann-json"
> +
> +inherit cmake
> +EXTRA_OECMAKE = "-DBUILD_SHARED_LIBS=ON -DJSON_VALIDATOR_BUILD_TESTS=OFF
> -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF"
> --
> 2.34.1
> 
> 
> 
> 
> 


[Attachment #5 (text/html)]

<div dir="ltr">Was meta-oe/recipes-devtools/json-<span \
class="gmail-il">schema</span>-<span class="gmail-il">validator</span>/<span \
class="gmail-il">json</span>-<span class="gmail-il">schema</span>-<span \
class="gmail-il">validator</span>/0001-cmake-Use-GNUInstallDirs.patch really merged \
upstream?<div><br></div><div>It now fails in multilib builds with:</div><div>ERROR: \
lib32-json-schema-validator-2.2.0-r0 do_package: QA Issue: \
lib32-json-schema-validator: Files/directories were installed but not shipped in any \
package:<br>   /usr/lib/libnlohmann_json_schema_validator.so.2<br>   \
/usr/lib/libnlohmann_json_schema_validator.so.2.2.0 <br>   \
/usr/lib/libnlohmann_json_schema_validator.so <br>   /usr/lib/cmake<br>   \
/usr/lib/cmake/nlohmann_json_schema_validator<br>   \
/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorConfig.cmake<br> \
/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorConfigVersion.cmake<br> \
/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorTargets.cmake<br> \
/usr/lib/cmake/nlohmann_json_schema_validator/nlohmann_json_schema_validatorTargets-noconfig.cmake<br>Please \
set FILES such that these items are packaged. Alternatively if they are unneeded, \
avoid installing them or delete them within \
do_install.<br>lib32-json-schema-validator: 9 installed and not shipped files. \
[installed-vs-shipped]<br></div><div><br></div><div><a \
href="https://github.com/pboettch/json-schema-validator/pull/197">https://github.com/pboettch/json-schema-validator/pull/197</a> \
was closed due to branch rename, but I don&#39;t see this change applied \
in:<br></div><div><a \
href="https://github.com/pboettch/json-schema-validator/commits/main/CMakeLists.txt">h \
ttps://github.com/pboettch/json-schema-validator/commits/main/CMakeLists.txt</a><br></div><div>so \
I guess the .patch is still needed.</div></div><br><div class="gmail_quote"><div \
dir="ltr" class="gmail_attr">On Tue, Aug 22, 2023 at 8:03 PM Parian Golchin &lt;<a \
href="mailto:par.golchin@gmail.com">par.golchin@gmail.com</a>&gt; \
wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Upgrade and add \
important patches to the release<br> <br>
Signed-off-by: Parian Golchin &lt;<a href="mailto:par.golchin@gmail.com" \
                target="_blank">par.golchin@gmail.com</a>&gt;<br>
---<br>
  ...or-Install-off-if-it-finds-it-via-li.patch | 29 ++++++++<br>
  .../0001-cmake-Use-GNUInstallDirs.patch           | 46 ------------<br>
  .../0002-Fix-assumed-signed-char.patch            | 71 +++++++++++++++++++<br>
  ...003-For-root-value-use-empty-pointer.patch | 41 +++++++++++<br>
  .../<a href="http://json-schema-validator_2.1.0.bb" rel="noreferrer" \
                target="_blank">json-schema-validator_2.1.0.bb</a>                  | \
                16 -----<br>
  .../<a href="http://json-schema-validator_2.2.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.2.0.bb</a>                  | 18 +++++<br>  6 \
files changed, 159 insertions(+), 62 deletions(-)<br>  create mode 100644 \
meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch<br>
  delete mode 100644 \
meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch<br>
  create mode 100644 \
meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch<br>
  create mode 100644 \
meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch<br>
  delete mode 100644 meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.1.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.1.0.bb</a><br>  create mode 100644 \
meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.2.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.2.0.bb</a><br> <br>
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch \
b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch<br>
 new file mode 100644<br>
index 000000000..6e6a4b93e<br>
--- /dev/null<br>
+++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch<br>
 @@ -0,0 +1,29 @@<br>
+From 35939115142db6cd366ab11b29692a0179338ddf Mon Sep 17 00:00:00 2001<br>
+From: Parian Golchin &lt;<a href="mailto:Parian.Golchin@iris-sensing.com" \
target="_blank">Parian.Golchin@iris-sensing.com</a>&gt;<br> +Date: Fri, 18 Aug 2023 \
15:54:25 +0200<br> +Subject: [PATCH 1/3] Set Json_validator Install off if it finds \
it via linking<br> +<br>
+Upstream-Status: Inappropriate [newer version of cmake in main branch]<br>
+<br>
+Signed-off-by: Parian Golchin &lt;<a href="mailto:Parian.Golchin@iris-sensing.com" \
target="_blank">Parian.Golchin@iris-sensing.com</a>&gt;<br> +---<br>
+ CMakeLists.txt | 3 +++<br>
+ 1 file changed, 3 insertions(+)<br>
+<br>
+diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
+index f636734..9e4587f 100644<br>
+--- a/CMakeLists.txt<br>
++++ b/CMakeLists.txt<br>
+@@ -55,6 +55,9 @@ option(JSON_VALIDATOR_BUILD_EXAMPLES &quot;Build examples&quot; \
${JSON_VALIDATOR_IS_TOP_LE<br> + <br>
+ if(NOT TARGET nlohmann_json::nlohmann_json)<br>
+        find_package(nlohmann_json REQUIRED)<br>
++else()<br>
++      message(STATUS &quot;Found nlohmann_json::nlohmann_json-target - linking with \
it&quot;)<br> ++      set(JSON_VALIDATOR_INSTALL OFF)<br>
+ endif()<br>
+ <br>
+ target_link_libraries(<br>
+-- <br>
+2.25.1<br>
+<br>
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch \
b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch<br>
 deleted file mode 100644<br>
index 4b1184a39..000000000<br>
--- a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0001-cmake-Use-GNUInstallDirs.patch<br>
                
+++ /dev/null<br>
@@ -1,46 +0,0 @@<br>
-From e0b1ad02c678513412aba95a1b2fb4005c3c0452 Mon Sep 17 00:00:00 2001<br>
-From: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" \
                target="_blank">raj.khem@gmail.com</a>&gt;<br>
-Date: Sat, 19 Mar 2022 22:40:49 -0700<br>
-Subject: [PATCH] cmake: Use GNUInstallDirs<br>
-<br>
-This helps it make it platform independent, some platforms e.g.<br>
-ppc64/linux use /usr/lib64 for system libraries<br>
-<br>
-Upstream-Status: Submitted [<a \
href="https://github.com/pboettch/json-schema-validator/pull/197" rel="noreferrer" \
                target="_blank">https://github.com/pboettch/json-schema-validator/pull/197</a>]<br>
                
-Signed-off-by: Khem Raj &lt;<a href="mailto:raj.khem@gmail.com" \
                target="_blank">raj.khem@gmail.com</a>&gt;<br>
----<br>
- CMakeLists.txt | 8 +++++---<br>
- 1 file changed, 5 insertions(+), 3 deletions(-)<br>
-<br>
-diff --git a/CMakeLists.txt b/CMakeLists.txt<br>
-index c4cc218..594dc5f 100644<br>
---- a/CMakeLists.txt<br>
-+++ b/CMakeLists.txt<br>
-@@ -122,11 +122,13 @@ if(CMAKE_CXX_COMPILER_ID STREQUAL &quot;GNU&quot;)<br>
-        endif()<br>
- endif()<br>
- <br>
-+include(GNUInstallDirs)<br>
-+<br>
- if(JSON_VALIDATOR_INSTALL)<br>
-        install(TARGETS nlohmann_json_schema_validator<br>
-                    EXPORT ${PROJECT_NAME}Targets<br>
--                  LIBRARY DESTINATION lib<br>
--                  ARCHIVE DESTINATION lib<br>
-+                  LIBRARY DESTINATION ${LIBDIR}<br>
-+                  ARCHIVE DESTINATION ${LIBDIR}<br>
-                    RUNTIME DESTINATION bin)<br>
- <br>
-        install(FILES src/nlohmann/json-schema.hpp<br>
-@@ -155,7 +157,7 @@ if(JSON_VALIDATOR_INSTALL)<br>
-        # Set Up the Project Targets and Config Files for CMake<br>
- <br>
-        # Set the install path to the cmake config files<br>
--      set(INSTALL_CMAKE_DIR ${CMAKE_INSTALL_PREFIX}/lib/cmake/${PROJECT_NAME})<br>
-+      set(INSTALL_CMAKE_DIR \
                ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})<br>
                
- <br>
-        # Create the ConfigVersion file<br>
-        include(CMakePackageConfigHelpers) # write_basic_package_version_file<br>
--- <br>
-2.35.1<br>
-<br>
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch \
b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch<br>
 new file mode 100644<br>
index 000000000..2ee0a3912<br>
--- /dev/null<br>
+++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0002-Fix-assumed-signed-char.patch<br>
 @@ -0,0 +1,71 @@<br>
+From 2065015da40cf79dd8ec9e3f186538e17c3b592f Mon Sep 17 00:00:00 2001<br>
+From: Robert Joslyn &lt;<a href="mailto:robert.joslyn@redrectangle.org" \
target="_blank">robert.joslyn@redrectangle.org</a>&gt;<br> +Date: Wed, 30 Nov 2022 \
13:07:29 -0800<br> +Subject: [PATCH 2/3] Fix assumed signed char<br>
+<br>
+The code assumes that char is signed, but whether char is signed or<br>
+unsigned is implementation defined. On some architectures like PowerPC,<br>
+GCC treats char as unsigned resulting in compile errors:<br>
+<br>
+           smtp-address-validator.cpp:213:1: error: narrowing conversion of \
&#39;-32&#39; from &#39;int&#39; to &#39;char&#39; [-Wnarrowing]<br> +<br>
+Fix this by specifying signed char.<br>
+<br>
+Upstream-Status: Accepted [<a \
href="https://github.com/pboettch/json-schema-validator/commit/491ac44026e08f31790f5cacffa62e168bb35e32" \
rel="noreferrer" target="_blank">https://github.com/pboettch/json-schema-validator/commit/491ac44026e08f31790f5cacffa62e168bb35e32</a>]<br>
 +<br>
+Signed-off-by: Parian Golchin &lt;<a href="mailto:Parian.Golchin@iris-sensing.com" \
target="_blank">Parian.Golchin@iris-sensing.com</a>&gt;<br> +---<br>
+ src/smtp-address-validator.cpp | 16 ++++++++--------<br>
+ 1 file changed, 8 insertions(+), 8 deletions(-)<br>
+<br>
+diff --git a/src/smtp-address-validator.cpp b/src/smtp-address-validator.cpp<br>
+index a63ead0..3903b51 100644<br>
+--- a/src/smtp-address-validator.cpp<br>
++++ b/src/smtp-address-validator.cpp<br>
+@@ -63,7 +63,7 @@ static const short _address_key_offsets[] = {<br>
+           1363, 1365, 1367, 1368, 1370, 1388, 0<br>
+ };<br>
+ <br>
+-static const char _address_trans_keys[] = {<br>
++static const signed char _address_trans_keys[] = {<br>
+           -32, -19, -16, -12, 34, 45, 61, 63,<br>
+           -62, -33, -31, -17, -15, -13, 33, 39,<br>
+           42, 43, 47, 57, 65, 90, 94, 126,<br>
+@@ -711,7 +711,7 @@ bool is_address(const char* p, const char* pe)<br>
+           {<br>
+                       int _klen;<br>
+                       unsigned int _trans = 0;<br>
+-                     const char * _keys;<br>
++                     const signed char * _keys;<br>
+                       const signed char * _acts;<br>
+                       unsigned int _nacts;<br>
+                       _resume: {}<br>
+@@ -728,9 +728,9 @@ bool is_address(const char* p, const char* pe)<br>
+                                   <br>
+                                   _klen = (int)_address_single_lengths[cs];<br>
+                                   if ( _klen &gt; 0 ) {<br>
+-                                             const char *_lower = _keys;<br>
+-                                             const char *_upper = _keys + _klen - \
1;<br> +-                                             const char *_mid;<br>
++                                             const signed char *_lower = _keys;<br>
++                                             const signed char *_upper = _keys + \
_klen - 1;<br> ++                                             const signed char \
*_mid;<br> +                                               while ( 1 ) {<br>
+                                                           if ( _upper &lt; _lower ) \
{<br> +                                                                       _keys \
+= _klen;<br> +@@ -752,9 +752,9 @@ bool is_address(const char* p, const char* pe)<br>
+                                   <br>
+                                   _klen = (int)_address_range_lengths[cs];<br>
+                                   if ( _klen &gt; 0 ) {<br>
+-                                             const char *_lower = _keys;<br>
+-                                             const char *_upper = _keys + \
(_klen&lt;&lt;1) - 2;<br> +-                                             const char \
*_mid;<br> ++                                             const signed char *_lower = \
_keys;<br> ++                                             const signed char *_upper = \
_keys + (_klen&lt;&lt;1) - 2;<br> ++                                             \
const signed char *_mid;<br> +                                               while ( \
1 ) {<br> +                                                           if ( _upper \
&lt; _lower ) {<br> +                                                                 \
_trans += (unsigned int)_klen;<br> +-- <br>
+2.25.1<br>
+<br>
diff --git a/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch \
b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch<br>
 new file mode 100644<br>
index 000000000..e0d0cf8ce<br>
--- /dev/null<br>
+++ b/meta-oe/recipes-devtools/json-schema-validator/json-schema-validator/0003-For-root-value-use-empty-pointer.patch<br>
 @@ -0,0 +1,41 @@<br>
+From fa49c29942763285c51b7d2dea417d9f51e4961f Mon Sep 17 00:00:00 2001<br>
+From: Sven Fink &lt;<a href="mailto:sven.fink@wipotec.com" \
target="_blank">sven.fink@wipotec.com</a>&gt;<br> +Date: Fri, 13 Jan 2023 09:15:42 \
+0100<br> +Subject: [PATCH 3/3] For root value, use empty pointer<br>
+<br>
+Upstream-Status: Accepted [<a \
href="https://github.com/pboettch/json-schema-validator/commit/59c9d6200bf3cd54b4fc717ec1660c91eddb4d1a" \
rel="noreferrer" target="_blank">https://github.com/pboettch/json-schema-validator/commit/59c9d6200bf3cd54b4fc717ec1660c91eddb4d1a</a>]<br>
 +<br>
+Signed-off-by: Parian Golchin &lt;<a href="mailto:Parian.Golchin@iris-sensing.com" \
target="_blank">Parian.Golchin@iris-sensing.com</a>&gt;<br> +---<br>
+ src/json-validator.cpp | 8 ++++++++<br>
+ 1 file changed, 8 insertions(+)<br>
+<br>
+diff --git a/src/json-validator.cpp b/src/json-validator.cpp<br>
+index 7f34553..3c73d98 100644<br>
+--- a/src/json-validator.cpp<br>
++++ b/src/json-validator.cpp<br>
+@@ -553,6 +553,9 @@ class type_schema : public schema<br>
+                                                           else_-&gt;validate(ptr, \
instance, patch, e);<br> +                                   }<br>
+                       }<br>
++                     if (instance.is_null()) {<br>
++                                 patch.add(nlohmann::json::json_pointer{}, \
default_value_);<br> ++                     }<br>
+           }<br>
+ <br>
+ protected:<br>
+@@ -1134,6 +1137,11 @@ public:<br>
+                                   propertyNames_ = schema::make(attr.value(), root, \
{&quot;propertyNames&quot;}, uris);<br> +                                   \
sch.erase(attr);<br> +                       }<br>
++<br>
++                     attr = sch.find(&quot;default&quot;);<br>
++                     if (attr != sch.end()) {<br>
++                                 set_default_value(*attr);<br>
++                     }<br>
+           }<br>
+ };<br>
+ <br>
+-- <br>
+2.25.1<br>
+<br>
diff --git a/meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.1.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.1.0.bb</a> \
b/meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.1.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.1.0.bb</a><br> deleted file mode 100644<br>
index 00d26d7b3..000000000<br>
--- a/meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.1.0.bb" rel="noreferrer" \
                target="_blank">json-schema-validator_2.1.0.bb</a><br>
+++ /dev/null<br>
@@ -1,16 +0,0 @@<br>
-SUMMARY = &quot;JSON schema validator for JSON for Modern C++&quot;<br>
-LICENSE = &quot;MIT&quot;<br>
-LIC_FILES_CHKSUM = &quot;file://LICENSE;md5=c441d022da1b1663c70181a32225d006&quot;<br>
                
-<br>
-SRC_URI = &quot;git://<a \
href="http://github.com/pboettch/json-schema-validator;branch=master;protocol=https" \
rel="noreferrer" target="_blank">github.com/pboettch/json-schema-validator;branch=master;protocol=https</a> \
                \<br>
-                 file://0001-cmake-Use-GNUInstallDirs.patch \<br>
-               &quot;<br>
-SRCREV = &quot;27fc1d094503623dfe39365ba82581507524545c&quot;<br>
-<br>
-S = &quot;${WORKDIR}/git&quot;<br>
-<br>
-DEPENDS += &quot;nlohmann-json&quot;<br>
-<br>
-inherit cmake<br>
-EXTRA_OECMAKE = &quot;-DBUILD_SHARED_LIBS=ON -DBUILD_EXAMPLES=OFF \
                -DBUILD_TESTS=OFF&quot;<br>
-<br>
diff --git a/meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.2.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.2.0.bb</a> \
b/meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.2.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.2.0.bb</a><br> new file mode 100644<br>
index 000000000..6f0b42402<br>
--- /dev/null<br>
+++ b/meta-oe/recipes-devtools/json-schema-validator/<a \
href="http://json-schema-validator_2.2.0.bb" rel="noreferrer" \
target="_blank">json-schema-validator_2.2.0.bb</a><br> @@ -0,0 +1,18 @@<br>
+SUMMARY = &quot;JSON schema validator for JSON for Modern C++&quot;<br>
+LICENSE = &quot;MIT&quot;<br>
+LIC_FILES_CHKSUM = &quot;file://LICENSE;md5=c441d022da1b1663c70181a32225d006&quot;<br>
 +<br>
+SRC_URI = &quot;git://<a \
href="http://github.com/pboettch/json-schema-validator;branch=main;protocol=https" \
rel="noreferrer" target="_blank">github.com/pboettch/json-schema-validator;branch=main;protocol=https</a> \
\<br> +                 \
file://0001-Set-Json_validator-Install-off-if-it-finds-it-via-li.patch \<br> +        \
file://0002-Fix-assumed-signed-char.patch \<br> +                 \
file://0003-For-root-value-use-empty-pointer.patch \<br> +                 &quot;<br>
+<br>
+SRCREV = &quot;6b17782d6a5d1dee5d2c4fc5d25ffb1123913431&quot;<br>
+<br>
+S = &quot;${WORKDIR}/git&quot;<br>
+<br>
+DEPENDS += &quot;nlohmann-json&quot;<br>
+<br>
+inherit cmake<br>
+EXTRA_OECMAKE = &quot;-DBUILD_SHARED_LIBS=ON -DJSON_VALIDATOR_BUILD_TESTS=OFF \
                -DJSON_VALIDATOR_BUILD_EXAMPLES=OFF&quot;<br>
-- <br>
2.34.1<br>
<br>
<br>
<br>
<br>
</blockquote></div>



-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#104652): https://lists.openembedded.org/g/openembedded-devel/message/104652
Mute This Topic: https://lists.openembedded.org/mt/100899596/4455120
Group Owner: openembedded-devel+owner@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [openembedded-devel@marc.info]
-=-=-=-=-=-=-=-=-=-=-=-



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic