[arch-commits] Commit in facter/repos (8 files)

Felix Yan felixonmars at gemini.archlinux.org
Mon Jun 13 11:42:09 UTC 2022


    Date: Monday, June 13, 2022 @ 11:42:09
  Author: felixonmars
Revision: 1237468

archrelease: copy trunk to community-staging-x86_64

Added:
  facter/repos/community-staging-x86_64/
  facter/repos/community-staging-x86_64/PKGBUILD
    (from rev 1237467, facter/trunk/PKGBUILD)
  facter/repos/community-staging-x86_64/azure_rapidjson_fix.patch
    (from rev 1237467, facter/trunk/azure_rapidjson_fix.patch)
  facter/repos/community-staging-x86_64/fix-shared-libwhereami-detection.patch
    (from rev 1237467, facter/trunk/fix-shared-libwhereami-detection.patch)
  facter/repos/community-staging-x86_64/gcc12.patch
    (from rev 1237467, facter/trunk/gcc12.patch)
  facter/repos/community-staging-x86_64/rapidjson-1.1-compat.patch
    (from rev 1237467, facter/trunk/rapidjson-1.1-compat.patch)
  facter/repos/community-staging-x86_64/shared_cpp_hcon.patch
    (from rev 1237467, facter/trunk/shared_cpp_hcon.patch)
  facter/repos/community-staging-x86_64/workaround-broken-double-test.patch
    (from rev 1237467, facter/trunk/workaround-broken-double-test.patch)

----------------------------------------+
 PKGBUILD                               |  104 +++++++++++++++++++++++++++++++
 azure_rapidjson_fix.patch              |   13 +++
 fix-shared-libwhereami-detection.patch |   13 +++
 gcc12.patch                            |   10 ++
 rapidjson-1.1-compat.patch             |   60 +++++++++++++++++
 shared_cpp_hcon.patch                  |   11 +++
 workaround-broken-double-test.patch    |   16 ++++
 7 files changed, 227 insertions(+)

Copied: facter/repos/community-staging-x86_64/PKGBUILD (from rev 1237467, facter/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD	                        (rev 0)
+++ community-staging-x86_64/PKGBUILD	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -0,0 +1,104 @@
+# Maintainer: Thore Bödecker <foxxx0 at archlinux.org>
+# Maintainer: Tim Meusel <tim at bastelfreak.de>
+# Contributor: Christian Rebischke <chris.rebischke at archlinux.org>
+# 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.23
+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' 'util-linux-libs' 'ruby' 'libblkid.so' 'yaml-cpp' 'dmidecode' 'pciutils' 'virt-what')
+makedepends=('boost' 'cmake' 'java-environment>=10' 'python' 'rapidjson')
+checkdepends=('ruby-rake' 'ruby-diff-lcs' 'ruby-mocha' 'ruby-rspec-support'
+              'ruby-rspec-core' 'ruby-rspec-expectations' 'ruby-rspec-mocks'
+              'ruby-rspec')
+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}
+        'fix-shared-libwhereami-detection.patch'
+        'shared_cpp_hcon.patch'
+        'rapidjson-1.1-compat.patch'
+        'workaround-broken-double-test.patch'
+        'gcc12.patch'
+        'azure_rapidjson_fix.patch')
+validpgpkeys=('D6811ED3ADEEB8441AF5AA8F4528B6CD9E61EF26') # "Puppet, Inc. Release Key (Puppet, Inc. Release Key) <release at puppet.com>"
+sha512sums=('ad5d58df123d56c13fa3a9155189da4b938b17d4270c18df19eb80bc5adc886d9536ecb1d4e3bb54e7532b452f5b6def6802568bca93588969988febbb6a6a47'
+            'SKIP'
+            '1f5d2595cd6b2a63fc01c92c84eccf8f92bd9e9f0721ea1a3f59836d7d02f5ec6e6e3711b223b240d46ca55f7377f27339b7458c12d6c21564a2764c76df12b2'
+            '15fdfb75bb1045e160c095b62025f10d0a04c167223340072a9b8d065a2a185e942d299f86c80449661f37be5e1807efb49e77def44b8de4a9a9f7c2cc111e1a'
+            'a1fb08be2c6c9b2a4085404f1d13b13c9d41e3c1a38d35cbad1d29bbd497380492dab368a0fa7288d141f7f94ff7a7a0ae5ce271119e7074e039868682cc766f'
+            '335c6db6a4953cf3678877ba81506c475d93f461ec2ee75c22fba4a3f938db0bca7f6cf3ee0376eb4c34b43f1f3fb1a35a0a0e64be5a484c344bd689641ddc2b'
+            '77b7faeea9804f97f68168ef019b7f2204305891c257ba63ddd290cae558b1cf7fcda4f4481481829b45f3abbcb0d271629f71c4d7cc797d039c4a95c0bc9a16'
+            '8b03cbc74c7672aaa121d279198993a5779bc6ca30a2f03cf75cb371f4b2699476df1422fcbbfe08b6f700ca434ef589b852aa8157dbbbdb6ae4bfe204ac8733')
+
+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
+
+  # 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}/azure_rapidjson_fix.patch"
+
+  patch -p1 -N -i "${srcdir}/gcc12.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}"
+
+  local _gemdir="$(gem env gemdir)"
+
+  make -C build DESTDIR="${pkgdir}" install
+
+  install -Dm644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+
+  # install the gemspec file
+  # this allows other gems to load puppet as a library (for example puppet-strings)
+  install -Dm644 .gemspec "${pkgdir}/${_gemdir}/specifications/${pkgname}-${pkgver}.gemspec"
+}
+
+# vim: ts=2 sw=2 et:

Copied: facter/repos/community-staging-x86_64/azure_rapidjson_fix.patch (from rev 1237467, facter/trunk/azure_rapidjson_fix.patch)
===================================================================
--- community-staging-x86_64/azure_rapidjson_fix.patch	                        (rev 0)
+++ community-staging-x86_64/azure_rapidjson_fix.patch	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -0,0 +1,13 @@
+diff --git a/lib/src/facts/resolvers/az_resolver.cc b/lib/src/facts/resolvers/az_resolver.cc
+index f789f4925..5f2d778b9 100644
+--- a/lib/src/facts/resolvers/az_resolver.cc
++++ b/lib/src/facts/resolvers/az_resolver.cc
+@@ -47,7 +47,7 @@ namespace facter { namespace facts { namespace resolvers {
+     #endif
+ #endif
+ 
+-    struct json_event_handler
++    struct json_event_handler : public rapidjson::BaseReaderHandler<>
+     {
+         explicit json_event_handler(map_value& root) :
+             _initialized(false),

Copied: facter/repos/community-staging-x86_64/fix-shared-libwhereami-detection.patch (from rev 1237467, facter/trunk/fix-shared-libwhereami-detection.patch)
===================================================================
--- community-staging-x86_64/fix-shared-libwhereami-detection.patch	                        (rev 0)
+++ community-staging-x86_64/fix-shared-libwhereami-detection.patch	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -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.")

Copied: facter/repos/community-staging-x86_64/gcc12.patch (from rev 1237467, facter/trunk/gcc12.patch)
===================================================================
--- community-staging-x86_64/gcc12.patch	                        (rev 0)
+++ community-staging-x86_64/gcc12.patch	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -0,0 +1,10 @@
+diff -upr facter-3.14.23.orig/lib/src/facts/glib/load_average_resolver.cc facter-3.14.23/lib/src/facts/glib/load_average_resolver.cc
+--- facter-3.14.23.orig/lib/src/facts/glib/load_average_resolver.cc	2022-04-16 03:32:32.000000000 +0300
++++ facter-3.14.23/lib/src/facts/glib/load_average_resolver.cc	2022-06-13 14:38:41.793965119 +0300
+@@ -1,5 +1,6 @@
+ #include <internal/facts/glib/load_average_resolver.hpp>
+ #include <leatherman/logging/logging.hpp>
++#include <array>
+ #include <cstdlib>
+ 
+ #ifdef __sun

Copied: facter/repos/community-staging-x86_64/rapidjson-1.1-compat.patch (from rev 1237467, facter/trunk/rapidjson-1.1-compat.patch)
===================================================================
--- community-staging-x86_64/rapidjson-1.1-compat.patch	                        (rev 0)
+++ community-staging-x86_64/rapidjson-1.1-compat.patch	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -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
+

Copied: facter/repos/community-staging-x86_64/shared_cpp_hcon.patch (from rev 1237467, facter/trunk/shared_cpp_hcon.patch)
===================================================================
--- community-staging-x86_64/shared_cpp_hcon.patch	                        (rev 0)
+++ community-staging-x86_64/shared_cpp_hcon.patch	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -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")

Copied: facter/repos/community-staging-x86_64/workaround-broken-double-test.patch (from rev 1237467, facter/trunk/workaround-broken-double-test.patch)
===================================================================
--- community-staging-x86_64/workaround-broken-double-test.patch	                        (rev 0)
+++ community-staging-x86_64/workaround-broken-double-test.patch	2022-06-13 11:42:09 UTC (rev 1237468)
@@ -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