Minor fixes for Facter 4.2.0

epel9
Ewoud Kohl van Wijngaarden 4 years ago
parent 543f4810b2
commit 9c048a98f0
No known key found for this signature in database
GPG Key ID: C6EC8F04A934BAB1

@ -1,47 +0,0 @@
diff --git a/lib/src/util/bsd/scoped_ifaddrs.cc b/lib/src/util/bsd/scoped_ifaddrs.cc
index d61d8a4..fbbea6d 100644
--- a/lib/src/util/bsd/scoped_ifaddrs.cc
+++ b/lib/src/util/bsd/scoped_ifaddrs.cc
@@ -1,3 +1,4 @@
+#include <cstddef>
#include <internal/util/bsd/scoped_ifaddrs.hpp>
using namespace std;
diff --git a/lib/src/util/posix/scoped_addrinfo.cc b/lib/src/util/posix/scoped_addrinfo.cc
index 1dc60b4..bf5bf00 100644
--- a/lib/src/util/posix/scoped_addrinfo.cc
+++ b/lib/src/util/posix/scoped_addrinfo.cc
@@ -1,3 +1,5 @@
+#include <cstddef>
+
#include <internal/util/posix/scoped_addrinfo.hpp>
using namespace std;
diff --git a/lib/src/util/posix/scoped_bio.cc b/lib/src/util/posix/scoped_bio.cc
index cdf25d6..dfb7f09 100644
--- a/lib/src/util/posix/scoped_bio.cc
+++ b/lib/src/util/posix/scoped_bio.cc
@@ -1,4 +1,5 @@
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+#include <cstddef>
#include <internal/util/posix/scoped_bio.hpp>
using namespace std;
diff --git a/lib/src/util/posix/scoped_descriptor.cc b/lib/src/util/posix/scoped_descriptor.cc
index 3ba2d4e..7a131d3 100644
--- a/lib/src/util/posix/scoped_descriptor.cc
+++ b/lib/src/util/posix/scoped_descriptor.cc
@@ -1,3 +1,4 @@
+#include <cstddef>
#include <internal/util/posix/scoped_descriptor.hpp>
using namespace std;
diff --git a/lib/src/util/scoped_file.cc b/lib/src/util/scoped_file.cc
index 440d8e3..2369987 100644
--- a/lib/src/util/scoped_file.cc
+++ b/lib/src/util/scoped_file.cc
@@ -1,3 +1,4 @@
+#include <cstddef>
#include <internal/util/scoped_file.hpp>
#include <boost/nowide/cstdio.hpp>

@ -14,9 +14,25 @@ Source2: https://downloads.puppetlabs.com/puppet-gpg-signing-key-20250406
BuildRequires: gnupg2
BuildRequires: rubygems-devel
BuildRequires: ruby
BuildRequires: ruby >= 2.3
Requires: ruby(rubygems)
# Add runtime deps for testing
BuildRequires: rubygem(hocon)
BuildRequires: rubygem(thor)
# Binaries that Facter can call for complete facts
%ifarch %ix86 x86_64 ia64
Requires: dmidecode
Requires: pciutils
Requires: virt-what
%endif
Requires: net-tools
Provides: ruby-%{name} = %{version}
Obsoletes: ruby-%{name} < 4
Obsoletes: %{name}-devel < 4
BuildArch: noarch
%description
@ -42,24 +58,27 @@ Documentation for %{name}.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%setup -q -n %{gem_name}-%{version}
%build
gem build %{gem_name}.gemspec
gem build ../%{gem_name}-%{version}.gemspec
%gem_install
%install
mkdir -p %{buildroot}%{gem_dir}
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
mkdir -p %{buildroot}%{_bindir}
cp -a ./%{gem_instdir}/bin/facter %{buildroot}%{_bindir}
cp -a .%{gem_instdir}/bin/facter %{buildroot}%{_bindir}
rm -rf %{buildroot}/%{gem_instdir}/bin
%check
# No test suite can run since the spec files are not part of the gem
# So try to run the executable and see if that works
GEM_HOME="%{buildroot}%{gem_dir}" %{buildroot}%{_bindir}/facter
%files
%dir %{gem_instdir}

@ -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")
Loading…
Cancel
Save