[arch-commits] Commit in facter/repos/community-x86_64 (12 files)
Thore Bödecker
foxxx0 at archlinux.org
Wed Aug 26 09:23:59 UTC 2020
Date: Wednesday, August 26, 2020 @ 09:23:59
Author: foxxx0
Revision: 688909
archrelease: copy trunk to community-x86_64
Added:
facter/repos/community-x86_64/FindUDEV.cmake
(from rev 688908, facter/trunk/FindUDEV.cmake)
facter/repos/community-x86_64/PKGBUILD
(from rev 688908, facter/trunk/PKGBUILD)
facter/repos/community-x86_64/fix-shared-libwhereami-detection.patch
(from rev 688908, facter/trunk/fix-shared-libwhereami-detection.patch)
facter/repos/community-x86_64/rapidjson-1.1-compat.patch
(from rev 688908, facter/trunk/rapidjson-1.1-compat.patch)
facter/repos/community-x86_64/shared_cpp_hcon.patch
(from rev 688908, facter/trunk/shared_cpp_hcon.patch)
facter/repos/community-x86_64/workaround-broken-double-test.patch
(from rev 688908, facter/trunk/workaround-broken-double-test.patch)
Deleted:
facter/repos/community-x86_64/FindUDEV.cmake
facter/repos/community-x86_64/PKGBUILD
facter/repos/community-x86_64/fix-shared-libwhereami-detection.patch
facter/repos/community-x86_64/rapidjson-1.1-compat.patch
facter/repos/community-x86_64/shared_cpp_hcon.patch
facter/repos/community-x86_64/workaround-broken-double-test.patch
----------------------------------------+
FindUDEV.cmake | 158 ++++++++++++-------------
PKGBUILD | 190 +++++++++++++++----------------
fix-shared-libwhereami-detection.patch | 26 ++--
rapidjson-1.1-compat.patch | 120 +++++++++----------
shared_cpp_hcon.patch | 22 +--
workaround-broken-double-test.patch | 32 ++---
6 files changed, 274 insertions(+), 274 deletions(-)
Deleted: FindUDEV.cmake
===================================================================
--- FindUDEV.cmake 2020-08-26 09:23:47 UTC (rev 688908)
+++ FindUDEV.cmake 2020-08-26 09:23:59 UTC (rev 688909)
@@ -1,79 +0,0 @@
-##
-# based on https://github.com/rpavlik/cmake-modules/blob/master/Findudev.cmake
-##
-# - try to find the udev library
-#
-# Cache Variables: (probably not for direct use in your scripts)
-# UDEV_INCLUDE_DIR
-# UDEV_SOURCE_DIR
-# UDEV_LIBRARY
-#
-# Non-cache variables you might use in your CMakeLists.txt:
-# UDEV_FOUND
-# UDEV_INCLUDE_DIRS
-# UDEV_LIBRARIES
-#
-# Requires these CMake modules:
-# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
-#
-# Original Author:
-# 2014 Kevin M. Godby <kevin at godby.org>
-#
-# Distributed under the Boost Software License, Version 1.0.
-# (See accompanying file LICENSE_1_0.txt or copy at
-# http://www.boost.org/LICENSE_1_0.txt)
-
-set(UDEV_ROOT_DIR
- "${UDEV_ROOT_DIR}"
- CACHE
- PATH
- "Directory to search for udev")
-
-find_package(PkgConfig QUIET)
-if(PKG_CONFIG_FOUND)
- pkg_check_modules(PC_LIBUDEV libudev)
-endif()
-
-find_library(UDEV_LIBRARY
- NAMES
- udev
- PATHS
- ${PC_LIBUDEV_LIBRARY_DIRS}
- ${PC_LIBUDEV_LIBDIR}
- HINTS
- "${UDEV_ROOT_DIR}"
- PATH_SUFFIXES
- lib
- )
-
-get_filename_component(_libdir "${UDEV_LIBRARY}" PATH)
-
-find_path(UDEV_INCLUDE_DIR
- NAMES
- libudev.h
- PATHS
- ${PC_LIBUDEV_INCLUDE_DIRS}
- ${PC_LIBUDEV_INCLUDEDIR}
- HINTS
- "${_libdir}"
- "${_libdir}/.."
- "${UDEV_ROOT_DIR}"
- PATH_SUFFIXES
- include
- )
-
-include(FindPackageHandleStandardArgs)
-find_package_handle_standard_args(UDEV
- DEFAULT_MSG
- UDEV_LIBRARY
- UDEV_INCLUDE_DIR
- )
-
-if(UDEV_FOUND)
- list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
- list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
- mark_as_advanced(UDEV_ROOT_DIR)
-endif()
-
-mark_as_advanced(UDEV_INCLUDE_DIR
- UDEV_LIBRARY)
Copied: facter/repos/community-x86_64/FindUDEV.cmake (from rev 688908, facter/trunk/FindUDEV.cmake)
===================================================================
--- FindUDEV.cmake (rev 0)
+++ FindUDEV.cmake 2020-08-26 09:23:59 UTC (rev 688909)
@@ -0,0 +1,79 @@
+##
+# based on https://github.com/rpavlik/cmake-modules/blob/master/Findudev.cmake
+##
+# - try to find the udev library
+#
+# Cache Variables: (probably not for direct use in your scripts)
+# UDEV_INCLUDE_DIR
+# UDEV_SOURCE_DIR
+# UDEV_LIBRARY
+#
+# Non-cache variables you might use in your CMakeLists.txt:
+# UDEV_FOUND
+# UDEV_INCLUDE_DIRS
+# UDEV_LIBRARIES
+#
+# Requires these CMake modules:
+# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
+#
+# Original Author:
+# 2014 Kevin M. Godby <kevin at godby.org>
+#
+# Distributed under the Boost Software License, Version 1.0.
+# (See accompanying file LICENSE_1_0.txt or copy at
+# http://www.boost.org/LICENSE_1_0.txt)
+
+set(UDEV_ROOT_DIR
+ "${UDEV_ROOT_DIR}"
+ CACHE
+ PATH
+ "Directory to search for udev")
+
+find_package(PkgConfig QUIET)
+if(PKG_CONFIG_FOUND)
+ pkg_check_modules(PC_LIBUDEV libudev)
+endif()
+
+find_library(UDEV_LIBRARY
+ NAMES
+ udev
+ PATHS
+ ${PC_LIBUDEV_LIBRARY_DIRS}
+ ${PC_LIBUDEV_LIBDIR}
+ HINTS
+ "${UDEV_ROOT_DIR}"
+ PATH_SUFFIXES
+ lib
+ )
+
+get_filename_component(_libdir "${UDEV_LIBRARY}" PATH)
+
+find_path(UDEV_INCLUDE_DIR
+ NAMES
+ libudev.h
+ PATHS
+ ${PC_LIBUDEV_INCLUDE_DIRS}
+ ${PC_LIBUDEV_INCLUDEDIR}
+ HINTS
+ "${_libdir}"
+ "${_libdir}/.."
+ "${UDEV_ROOT_DIR}"
+ PATH_SUFFIXES
+ include
+ )
+
+include(FindPackageHandleStandardArgs)
+find_package_handle_standard_args(UDEV
+ DEFAULT_MSG
+ UDEV_LIBRARY
+ UDEV_INCLUDE_DIR
+ )
+
+if(UDEV_FOUND)
+ list(APPEND UDEV_LIBRARIES ${UDEV_LIBRARY})
+ list(APPEND UDEV_INCLUDE_DIRS ${UDEV_INCLUDE_DIR})
+ mark_as_advanced(UDEV_ROOT_DIR)
+endif()
+
+mark_as_advanced(UDEV_INCLUDE_DIR
+ UDEV_LIBRARY)
Deleted: PKGBUILD
===================================================================
--- PKGBUILD 2020-08-26 09:23:47 UTC (rev 688908)
+++ PKGBUILD 2020-08-26 09:23:59 UTC (rev 688909)
@@ -1,95 +0,0 @@
-# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
-# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
-# Contributor: Tim Meusel <tim at bastelfreak.de>
-# Contributor: Jonathan Steel <jsteel at archlinux.org>
-# Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr>
-# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux at free.fr>
-# Contributor: Thomas S Hatch <thatch45 (at) Gmail.com>
-# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com>
-# Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com>
-
-pkgname=facter
-pkgver=3.14.12
-pkgrel=2
-pkgdesc="Collect and display system facts"
-arch=('x86_64')
-url="https://puppetlabs.com/facter"
-license=('APACHE')
-depends=('yaml-cpp' 'boost-libs' 'curl' 'libwhereami' 'libwhereami.so' 'cpp-hocon' 'libcpp-hocon.so'
- 'systemd-libs' 'leatherman' 'leatherman_curl.so' 'leatherman_ruby.so' 'leatherman_execution.so'
- 'leatherman_file_util.so' 'leatherman_util.so' 'leatherman_logging.so' 'leatherman_locale.so'
- 'openssl' 'gcc-libs' 'glibc' 'libutil-linux' 'libblkid.so' 'yaml-cpp')
-makedepends=('boost' 'cmake' 'java-environment>=10' 'ruby' 'python' 'rapidjson')
-checkdepends=('ruby-bundler' 'ruby-rake' 'ruby-rspec' 'ruby-mocha')
-optdepends=('java-runtime>=8: jruby support'
- 'puppet: retrieve puppet facts')
-replaces=('cfacter')
-provides=('libfacter.so')
-source=("https://downloads.puppet.com/facter/facter-${pkgver}.tar.gz"{,.asc}
- 'FindUDEV.cmake'
- 'fix-shared-libwhereami-detection.patch'
- 'shared_cpp_hcon.patch'
- 'rapidjson-1.1-compat.patch'
- 'workaround-broken-double-test.patch')
-validpgpkeys=('6F6B15509CF8E59E6E469F327F438280EF8D349F') # "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release at puppet.com>"
-sha512sums=('63e52cae15d660c8cd5dad96acdc5d69a9639d13092f3f8a59b1390b0e0eb1c4bf75747a6794f7cf56b9d60719e02eb7f37e6940433e6caaa5ba9a76582beaf1'
- 'SKIP'
- 'c06f8b75a697c89c696729aaca88d30cf4d8652406245d457d97a0de973f6129a037e226847e71785070dc16d5b40b98f287258f961da7904cf5338eb601fc09'
- '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2'
- '15fdfb75bb1045e160c095b62025f10d0a04c167223340072a9b8d065a2a185e942d299f86c80449661f37be5e1807efb49e77def44b8de4a9a9f7c2cc111e1a'
- 'a1fb08be2c6c9b2a4085404f1d13b13c9d41e3c1a38d35cbad1d29bbd497380492dab368a0fa7288d141f7f94ff7a7a0ae5ce271119e7074e039868682cc766f'
- '335c6db6a4953cf3678877ba81506c475d93f461ec2ee75c22fba4a3f938db0bca7f6cf3ee0376eb4c34b43f1f3fb1a35a0a0e64be5a484c344bd689641ddc2b')
-
-prepare() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- # Puppet builds Facter in a way that the java library is compatible with Java 6
- # We require at least Java 8. 7 technically works, but already throws a deprecation warning
- sed --in-place 's/-source 1.6 -target 1.6/-source 1.8 -target 1.8/' CMakeLists.txt
-
- # https://tickets.puppetlabs.com/browse/FACT-1968
- # facter is designed for ruby 2.4, which uses rb_data_object_alloc.
- # This is deprecated in our Ruby 2.6 version
- sed --in-place 's/rb_data_object_alloc/rb_data_object_wrap/g' lib/src/ruby/*.cc
-
- # strip version boundary of gems
- sed -i -r 's|(gem .\w+.).*|\1|' lib/Gemfile
-
- # add missing cmake helper to find the udev lib (provided by systemd)
- install -Dm644 "${srcdir}/FindUDEV.cmake" cmake/
-
- # patch *.cmake so that it works with shared libs
- patch -p1 -N -i "${srcdir}/fix-shared-libwhereami-detection.patch"
- patch -p1 -N -i "${srcdir}/shared_cpp_hcon.patch"
- patch -p1 -N -i "${srcdir}/rapidjson-1.1-compat.patch"
-
- patch -p1 -N -i "${srcdir}/workaround-broken-double-test.patch"
-}
-
-build() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- export JAVA_HOME=/usr/lib/jvm/default
- cmake \
- -B build \
- -DCMAKE_BUILD_TYPE=None \
- -DCMAKE_INSTALL_PREFIX:PATH=/usr \
- -DENABLE_CXX_WERROR=OFF \
- -DBUILD_SHARED_LIBS=ON
- make -C build
-}
-
-check(){
- cd "${srcdir}/${pkgname}-${pkgver}/build"
- make test
-}
-
-package() {
- cd "${srcdir}/${pkgname}-${pkgver}"
-
- make -C build DESTDIR="${pkgdir}" install
-
- install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
-}
-
-# vim: ts=2 sw=2 et:
Copied: facter/repos/community-x86_64/PKGBUILD (from rev 688908, facter/trunk/PKGBUILD)
===================================================================
--- PKGBUILD (rev 0)
+++ PKGBUILD 2020-08-26 09:23:59 UTC (rev 688909)
@@ -0,0 +1,95 @@
+# Maintainer: Christian Rebischke <chris.rebischke at archlinux.org>
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Contributor: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Jonathan Steel <jsteel at archlinux.org>
+# Contributor: Greg Sutcliffe <facter_aur (at) emeraldreverie.orgr>
+# Contributor: Hyacinthe Cartiaux <hyacinthe.cartiaux at free.fr>
+# Contributor: Thomas S Hatch <thatch45 (at) Gmail.com>
+# Contributor: Dave Simons <miouhpi (at) Gmail (dot) com>
+# Contributor: Niels Abspoel <aboe76 (at) Gmail (dot) com>
+
+pkgname=facter
+pkgver=3.14.13
+pkgrel=1
+pkgdesc="Collect and display system facts"
+arch=('x86_64')
+url="https://puppetlabs.com/facter"
+license=('APACHE')
+depends=('yaml-cpp' 'boost-libs' 'curl' 'libwhereami' 'libwhereami.so' 'cpp-hocon' 'libcpp-hocon.so'
+ 'systemd-libs' 'leatherman' 'leatherman_curl.so' 'leatherman_ruby.so' 'leatherman_execution.so'
+ 'leatherman_file_util.so' 'leatherman_util.so' 'leatherman_logging.so' 'leatherman_locale.so'
+ 'openssl' 'gcc-libs' 'glibc' 'libutil-linux' 'libblkid.so' 'yaml-cpp')
+makedepends=('boost' 'cmake' 'java-environment>=10' 'ruby' 'python' 'rapidjson')
+checkdepends=('ruby-bundler' 'ruby-rake' 'ruby-rspec' 'ruby-mocha')
+optdepends=('java-runtime>=8: jruby support'
+ 'puppet: retrieve puppet facts')
+replaces=('cfacter')
+provides=('libfacter.so')
+source=("https://downloads.puppet.com/facter/facter-${pkgver}.tar.gz"{,.asc}
+ 'FindUDEV.cmake'
+ 'fix-shared-libwhereami-detection.patch'
+ 'shared_cpp_hcon.patch'
+ 'rapidjson-1.1-compat.patch'
+ 'workaround-broken-double-test.patch')
+validpgpkeys=('6F6B15509CF8E59E6E469F327F438280EF8D349F') # "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release at puppet.com>"
+sha512sums=('15210def2336b137a48fb01c484a84da282badddd2a887e2737bbf445e237f4e41c1b464a91b2b67616cb81d05b35971bd2664095e379ff8f3eb106a580f7530'
+ 'SKIP'
+ 'c06f8b75a697c89c696729aaca88d30cf4d8652406245d457d97a0de973f6129a037e226847e71785070dc16d5b40b98f287258f961da7904cf5338eb601fc09'
+ '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2'
+ '15fdfb75bb1045e160c095b62025f10d0a04c167223340072a9b8d065a2a185e942d299f86c80449661f37be5e1807efb49e77def44b8de4a9a9f7c2cc111e1a'
+ 'a1fb08be2c6c9b2a4085404f1d13b13c9d41e3c1a38d35cbad1d29bbd497380492dab368a0fa7288d141f7f94ff7a7a0ae5ce271119e7074e039868682cc766f'
+ '335c6db6a4953cf3678877ba81506c475d93f461ec2ee75c22fba4a3f938db0bca7f6cf3ee0376eb4c34b43f1f3fb1a35a0a0e64be5a484c344bd689641ddc2b')
+
+prepare() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ # Puppet builds Facter in a way that the java library is compatible with Java 6
+ # We require at least Java 8. 7 technically works, but already throws a deprecation warning
+ sed --in-place 's/-source 1.6 -target 1.6/-source 1.8 -target 1.8/' CMakeLists.txt
+
+ # https://tickets.puppetlabs.com/browse/FACT-1968
+ # facter is designed for ruby 2.4, which uses rb_data_object_alloc.
+ # This is deprecated in our Ruby 2.6 version
+ sed --in-place 's/rb_data_object_alloc/rb_data_object_wrap/g' lib/src/ruby/*.cc
+
+ # strip version boundary of gems
+ sed -i -r 's|(gem .\w+.).*|\1|' lib/Gemfile
+
+ # add missing cmake helper to find the udev lib (provided by systemd)
+ install -Dm644 "${srcdir}/FindUDEV.cmake" cmake/
+
+ # patch *.cmake so that it works with shared libs
+ patch -p1 -N -i "${srcdir}/fix-shared-libwhereami-detection.patch"
+ patch -p1 -N -i "${srcdir}/shared_cpp_hcon.patch"
+ patch -p1 -N -i "${srcdir}/rapidjson-1.1-compat.patch"
+
+ patch -p1 -N -i "${srcdir}/workaround-broken-double-test.patch"
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ export JAVA_HOME=/usr/lib/jvm/default
+ cmake \
+ -B build \
+ -DCMAKE_BUILD_TYPE=None \
+ -DCMAKE_INSTALL_PREFIX:PATH=/usr \
+ -DENABLE_CXX_WERROR=OFF \
+ -DBUILD_SHARED_LIBS=ON
+ make -C build
+}
+
+check(){
+ cd "${srcdir}/${pkgname}-${pkgver}/build"
+ make test
+}
+
+package() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ make -C build DESTDIR="${pkgdir}" install
+
+ install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+}
+
+# vim: ts=2 sw=2 et:
Deleted: fix-shared-libwhereami-detection.patch
===================================================================
--- fix-shared-libwhereami-detection.patch 2020-08-26 09:23:47 UTC (rev 688908)
+++ fix-shared-libwhereami-detection.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -1,13 +0,0 @@
-diff -upr a/cmake/FindWHEREAMI.cmake b/cmake/FindWHEREAMI.cmake
---- a/cmake/FindWHEREAMI.cmake 2019-07-19 10:11:10.000000000 +0200
-+++ b/cmake/FindWHEREAMI.cmake 2019-08-12 14:49:04.730902701 +0200
-@@ -1,6 +1,6 @@
- include(FindDependency)
--find_dependency(WHEREAMI DISPLAY "whereami" HEADERS "whereami/whereami.hpp" LIBRARIES "libwhereami.a")
-+find_dependency(WHEREAMI DISPLAY "whereami" HEADERS "whereami/whereami.hpp" LIBRARIES "libwhereami.so")
-
- include(FeatureSummary)
- set_package_properties(WHEREAMI PROPERTIES DESCRIPTION "A hypervisor detection library" URL "https://github.com/puppetlabs/libwhereami")
--set_package_properties(WHEREAMI PROPERTIES PURPOSE "Reports hypervisors in use.")
-\ No newline at end of file
-+set_package_properties(WHEREAMI PROPERTIES PURPOSE "Reports hypervisors in use.")
Copied: facter/repos/community-x86_64/fix-shared-libwhereami-detection.patch (from rev 688908, facter/trunk/fix-shared-libwhereami-detection.patch)
===================================================================
--- fix-shared-libwhereami-detection.patch (rev 0)
+++ fix-shared-libwhereami-detection.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -0,0 +1,13 @@
+diff -upr a/cmake/FindWHEREAMI.cmake b/cmake/FindWHEREAMI.cmake
+--- a/cmake/FindWHEREAMI.cmake 2019-07-19 10:11:10.000000000 +0200
++++ b/cmake/FindWHEREAMI.cmake 2019-08-12 14:49:04.730902701 +0200
+@@ -1,6 +1,6 @@
+ include(FindDependency)
+-find_dependency(WHEREAMI DISPLAY "whereami" HEADERS "whereami/whereami.hpp" LIBRARIES "libwhereami.a")
++find_dependency(WHEREAMI DISPLAY "whereami" HEADERS "whereami/whereami.hpp" LIBRARIES "libwhereami.so")
+
+ include(FeatureSummary)
+ set_package_properties(WHEREAMI PROPERTIES DESCRIPTION "A hypervisor detection library" URL "https://github.com/puppetlabs/libwhereami")
+-set_package_properties(WHEREAMI PROPERTIES PURPOSE "Reports hypervisors in use.")
+\ No newline at end of file
++set_package_properties(WHEREAMI PROPERTIES PURPOSE "Reports hypervisors in use.")
Deleted: rapidjson-1.1-compat.patch
===================================================================
--- rapidjson-1.1-compat.patch 2020-08-26 09:23:47 UTC (rev 688908)
+++ rapidjson-1.1-compat.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -1,60 +0,0 @@
-From 7a1c680a2b140e2bab7d1b8a85b3dc97c8a131ba Mon Sep 17 00:00:00 2001
-From: Apollon Oikonomopoulos <apollon at skroutz.gr>
-Date: Mon, 19 Mar 2018 14:21:22 +0200
-Subject: [PATCH] rapidjson 1.1 compatibility
-
-RapidJSON 1.1 slightly changed its API for custom handlers, by
-introducing the RawNumber method, see [1]. Instead of defining the
-method itself, change all handlers to inherit from
-rapidjson::BaseReaderHandler.
-
-Additionally, the facter::facts::<anon>::stream_adapter must typedef Ch.
-
-[1] https://github.com/Tencent/rapidjson/issues/581
----
- lib/inc/facter/facts/collection.hpp | 1 +
- lib/src/facts/external/json_resolver.cc | 2 +-
- lib/src/facts/resolvers/gce_resolver.cc | 2 +-
- 3 files changed, 3 insertions(+), 2 deletions(-)
-
-diff --git a/lib/inc/facter/facts/collection.hpp b/lib/inc/facter/facts/collection.hpp
-index c89daa5e..570cc67d 100644
---- a/lib/inc/facter/facts/collection.hpp
-+++ b/lib/inc/facter/facts/collection.hpp
-@@ -46,6 +46,7 @@ namespace facter { namespace facts {
- */
- struct stream_adapter
- {
-+ typedef char Ch;
- /**
- * Constructs an adapter for use with rapidjson around the given stream.
- * @param stream an output stream to which JSON will be written
-diff --git a/lib/src/facts/external/json_resolver.cc b/lib/src/facts/external/json_resolver.cc
-index 8edc0467..35817d59 100644
---- a/lib/src/facts/external/json_resolver.cc
-+++ b/lib/src/facts/external/json_resolver.cc
-@@ -24,7 +24,7 @@ using namespace rapidjson;
- namespace facter { namespace facts { namespace external {
-
- // Helper event handler for parsing JSON data
-- struct json_event_handler
-+ struct json_event_handler : public rapidjson::BaseReaderHandler<>
- {
- explicit json_event_handler(collection& facts) :
- _initialized(false),
-diff --git a/lib/src/facts/resolvers/gce_resolver.cc b/lib/src/facts/resolvers/gce_resolver.cc
-index ed579e5f..6ea737fa 100644
---- a/lib/src/facts/resolvers/gce_resolver.cc
-+++ b/lib/src/facts/resolvers/gce_resolver.cc
-@@ -35,7 +35,7 @@ namespace facter { namespace facts { namespace resolvers {
- #endif
-
- // Helper event handler for parsing JSON data
-- struct gce_event_handler
-+ struct gce_event_handler : public rapidjson::BaseReaderHandler<>
- {
- explicit gce_event_handler(map_value& root) :
- _initialized(false),
---
-2.16.1
-
Copied: facter/repos/community-x86_64/rapidjson-1.1-compat.patch (from rev 688908, facter/trunk/rapidjson-1.1-compat.patch)
===================================================================
--- rapidjson-1.1-compat.patch (rev 0)
+++ rapidjson-1.1-compat.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -0,0 +1,60 @@
+From 7a1c680a2b140e2bab7d1b8a85b3dc97c8a131ba Mon Sep 17 00:00:00 2001
+From: Apollon Oikonomopoulos <apollon at skroutz.gr>
+Date: Mon, 19 Mar 2018 14:21:22 +0200
+Subject: [PATCH] rapidjson 1.1 compatibility
+
+RapidJSON 1.1 slightly changed its API for custom handlers, by
+introducing the RawNumber method, see [1]. Instead of defining the
+method itself, change all handlers to inherit from
+rapidjson::BaseReaderHandler.
+
+Additionally, the facter::facts::<anon>::stream_adapter must typedef Ch.
+
+[1] https://github.com/Tencent/rapidjson/issues/581
+---
+ lib/inc/facter/facts/collection.hpp | 1 +
+ lib/src/facts/external/json_resolver.cc | 2 +-
+ lib/src/facts/resolvers/gce_resolver.cc | 2 +-
+ 3 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/inc/facter/facts/collection.hpp b/lib/inc/facter/facts/collection.hpp
+index c89daa5e..570cc67d 100644
+--- a/lib/inc/facter/facts/collection.hpp
++++ b/lib/inc/facter/facts/collection.hpp
+@@ -46,6 +46,7 @@ namespace facter { namespace facts {
+ */
+ struct stream_adapter
+ {
++ typedef char Ch;
+ /**
+ * Constructs an adapter for use with rapidjson around the given stream.
+ * @param stream an output stream to which JSON will be written
+diff --git a/lib/src/facts/external/json_resolver.cc b/lib/src/facts/external/json_resolver.cc
+index 8edc0467..35817d59 100644
+--- a/lib/src/facts/external/json_resolver.cc
++++ b/lib/src/facts/external/json_resolver.cc
+@@ -24,7 +24,7 @@ using namespace rapidjson;
+ namespace facter { namespace facts { namespace external {
+
+ // Helper event handler for parsing JSON data
+- struct json_event_handler
++ struct json_event_handler : public rapidjson::BaseReaderHandler<>
+ {
+ explicit json_event_handler(collection& facts) :
+ _initialized(false),
+diff --git a/lib/src/facts/resolvers/gce_resolver.cc b/lib/src/facts/resolvers/gce_resolver.cc
+index ed579e5f..6ea737fa 100644
+--- a/lib/src/facts/resolvers/gce_resolver.cc
++++ b/lib/src/facts/resolvers/gce_resolver.cc
+@@ -35,7 +35,7 @@ namespace facter { namespace facts { namespace resolvers {
+ #endif
+
+ // Helper event handler for parsing JSON data
+- struct gce_event_handler
++ struct gce_event_handler : public rapidjson::BaseReaderHandler<>
+ {
+ explicit gce_event_handler(map_value& root) :
+ _initialized(false),
+--
+2.16.1
+
Deleted: shared_cpp_hcon.patch
===================================================================
--- shared_cpp_hcon.patch 2020-08-26 09:23:47 UTC (rev 688908)
+++ shared_cpp_hcon.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -1,11 +0,0 @@
-diff --git a/cmake/FindCPPHOCON.cmake b/cmake/FindCPPHOCON.cmake
-index 00ba8bd..0df0a51 100644
---- a/cmake/FindCPPHOCON.cmake
-+++ b/cmake/FindCPPHOCON.cmake
-@@ -1,5 +1,5 @@
- include(FindDependency)
--find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
-+find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
-
- include(FeatureSummary)
- set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")
Copied: facter/repos/community-x86_64/shared_cpp_hcon.patch (from rev 688908, facter/trunk/shared_cpp_hcon.patch)
===================================================================
--- shared_cpp_hcon.patch (rev 0)
+++ shared_cpp_hcon.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -0,0 +1,11 @@
+diff --git a/cmake/FindCPPHOCON.cmake b/cmake/FindCPPHOCON.cmake
+index 00ba8bd..0df0a51 100644
+--- a/cmake/FindCPPHOCON.cmake
++++ b/cmake/FindCPPHOCON.cmake
+@@ -1,5 +1,5 @@
+ include(FindDependency)
+-find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.a")
++find_dependency(CPPHOCON DISPLAY "cpp-hocon" HEADERS "hocon/config.hpp" LIBRARIES "libcpp-hocon.so")
+
+ include(FeatureSummary)
+ set_package_properties(CPPHOCON PROPERTIES DESCRIPTION "A C++ parser for the HOCON configuration language" URL "https://github.com/puppetlabs/cpp-hocon")
Deleted: workaround-broken-double-test.patch
===================================================================
--- workaround-broken-double-test.patch 2020-08-26 09:23:47 UTC (rev 688908)
+++ workaround-broken-double-test.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -1,16 +0,0 @@
---- a/lib/tests/facts/double_value.cc 2019-09-30 09:13:02.000000000 +0200
-+++ b/lib/tests/facts/double_value.cc 2019-10-12 19:54:49.184377937 +0200
-@@ -23,13 +23,6 @@ SCENARIO("using a double fact value") {
- REQUIRE(json.GetDouble() == Approx(42.4242));
- }
- }
-- WHEN("serialized to YAML") {
-- THEN("it should have the same value") {
-- Emitter emitter;
-- value.write(emitter);
-- REQUIRE(string(emitter.c_str()) == "42.4242");
-- }
-- }
- WHEN("serialized to text") {
- THEN("it should have the same value") {
- ostringstream stream;
Copied: facter/repos/community-x86_64/workaround-broken-double-test.patch (from rev 688908, facter/trunk/workaround-broken-double-test.patch)
===================================================================
--- workaround-broken-double-test.patch (rev 0)
+++ workaround-broken-double-test.patch 2020-08-26 09:23:59 UTC (rev 688909)
@@ -0,0 +1,16 @@
+--- a/lib/tests/facts/double_value.cc 2019-09-30 09:13:02.000000000 +0200
++++ b/lib/tests/facts/double_value.cc 2019-10-12 19:54:49.184377937 +0200
+@@ -23,13 +23,6 @@ SCENARIO("using a double fact value") {
+ REQUIRE(json.GetDouble() == Approx(42.4242));
+ }
+ }
+- WHEN("serialized to YAML") {
+- THEN("it should have the same value") {
+- Emitter emitter;
+- value.write(emitter);
+- REQUIRE(string(emitter.c_str()) == "42.4242");
+- }
+- }
+ WHEN("serialized to text") {
+ THEN("it should have the same value") {
+ ostringstream stream;
More information about the arch-commits
mailing list