[arch-commits] Commit in facter/trunk (3 files)
Levente Polyak
anthraxx at archlinux.org
Wed Aug 14 09:08:06 UTC 2019
Date: Wednesday, August 14, 2019 @ 09:08:05
Author: anthraxx
Revision: 499191
upgpkg: facter 3.14.2-2 (build against shared libs, fix udev dependency)
Added:
facter/trunk/rapidjson-1.1-compat.patch
facter/trunk/shared_cpp_hcon.patch
Modified:
facter/trunk/PKGBUILD
----------------------------+
PKGBUILD | 31 +++++++++++++++-------
rapidjson-1.1-compat.patch | 60 +++++++++++++++++++++++++++++++++++++++++++
shared_cpp_hcon.patch | 11 +++++++
3 files changed, 92 insertions(+), 10 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2019-08-14 08:57:05 UTC (rev 499190)
+++ PKGBUILD 2019-08-14 09:08:05 UTC (rev 499191)
@@ -10,27 +10,33 @@
pkgname=facter
pkgver=3.14.2
-pkgrel=1
+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')
-makedepends=('boost' 'boost-libs' 'cmake' 'java-environment>=10' 'leatherman'
- 'cpp-hocon' 'java-environment-common' 'ruby' 'python'
- 'libudev0-shim' 'libwhereami')
+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-environment: jruby support'
+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')
+ 'fix-shared-libwhereami-detection.patch'
+ 'shared_cpp_hcon.patch'
+ 'rapidjson-1.1-compat.patch')
validpgpkeys=('6F6B15509CF8E59E6E469F327F438280EF8D349F') # "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release at puppet.com>"
sha512sums=('e8f0b8b509c5d5ea1d7f2c3a0a7ff36d25aa55001237cc9cdc96eafcd59da845eb2a01a8ac334c2376a1692e80862dc575a551340a03d7ae02d6f32e5215a3ec'
'SKIP'
'c06f8b75a697c89c696729aaca88d30cf4d8652406245d457d97a0de973f6129a037e226847e71785070dc16d5b40b98f287258f961da7904cf5338eb601fc09'
- '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2')
+ '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2'
+ '15fdfb75bb1045e160c095b62025f10d0a04c167223340072a9b8d065a2a185e942d299f86c80449661f37be5e1807efb49e77def44b8de4a9a9f7c2cc111e1a'
+ 'a1fb08be2c6c9b2a4085404f1d13b13c9d41e3c1a38d35cbad1d29bbd497380492dab368a0fa7288d141f7f94ff7a7a0ae5ce271119e7074e039868682cc766f')
prepare() {
cd "${srcdir}/${pkgname}-${pkgver}"
@@ -50,14 +56,16 @@
# add missing cmake helper to find the udev lib (provided by systemd)
install -Dm644 "${srcdir}/FindUDEV.cmake" cmake/
- # patch FindWHEREAMI.cmake so that it works with the shared lib
+ # 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"
}
build() {
cd "${srcdir}/${pkgname}-${pkgver}"
- mkdir build
+ mkdir -p build
cd build
export JAVA_HOME=/usr/lib/jvm/default
@@ -64,6 +72,7 @@
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=/usr \
-DENABLE_CXX_WERROR=OFF \
+ -DBUILD_SHARED_LIBS=ON \
..
make
}
@@ -80,3 +89,5 @@
install -Dm644 ../LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}
+
+# vim: ts=2 sw=2 et:
Added: rapidjson-1.1-compat.patch
===================================================================
--- rapidjson-1.1-compat.patch (rev 0)
+++ rapidjson-1.1-compat.patch 2019-08-14 09:08:05 UTC (rev 499191)
@@ -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
+
Added: shared_cpp_hcon.patch
===================================================================
--- shared_cpp_hcon.patch (rev 0)
+++ shared_cpp_hcon.patch 2019-08-14 09:08:05 UTC (rev 499191)
@@ -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")
More information about the arch-commits
mailing list