update to facter-3.4.0
https://docs.puppet.com/facter/3.4/release_notes.html
This commit is contained in:
parent
e98581c427
commit
8f520cffb8
@ -1,9 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.33 2016/08/10 14:06:20 jasper Exp $
|
||||
# $OpenBSD: Makefile,v 1.34 2016/08/12 08:42:52 jasper Exp $
|
||||
|
||||
# XXXTODO: Subpackage facter.jar for use with puppetserver
|
||||
COMMENT = collect and display system facts
|
||||
|
||||
DISTNAME = facter-3.3.0
|
||||
DISTNAME = facter-3.4.0
|
||||
SHARED_LIBS += facter 3.0 # 3.2
|
||||
PKGSPEC = facter->=3.0,<4.0
|
||||
CATEGORIES = sysutils
|
||||
@ -30,7 +30,8 @@ LIB_DEPENDS = devel/boost>=1.58 \
|
||||
devel/yaml-cpp \
|
||||
net/curl
|
||||
|
||||
BUILD_DEPENDS = devel/leatherman
|
||||
BUILD_DEPENDS = devel/cpp-hocon \
|
||||
devel/leatherman
|
||||
|
||||
CONFIGURE_ARGS+= -DFACTER_RUBY="${LOCALBASE}/lib/libruby${MODRUBY_BINREV}.so" \
|
||||
-DRUBY_LIB_INSTALL="${PREFIX}/lib/ruby/vendor_ruby/${MODRUBY_REV}" \
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (facter-3.3.0.tar.gz) = 9rGtMgbwr50fDa+mxkDPyoTh/KYBwsz2+z98a/Ik8jE=
|
||||
SIZE (facter-3.3.0.tar.gz) = 297153
|
||||
SHA256 (facter-3.4.0.tar.gz) = M77LHbhVtk4V7VP9HNFwf+ozl7XWsMDCYFoP6K3risI=
|
||||
SIZE (facter-3.4.0.tar.gz) = 300508
|
||||
|
@ -1,18 +0,0 @@
|
||||
$OpenBSD: patch-CMakeLists_txt,v 1.9 2016/06/02 20:15:59 jasper Exp $
|
||||
|
||||
From cb8b0569104a5803fd658f1f0fadd13ae09cef1d Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 14:39:48 +0200
|
||||
Subject: [PATCH] (FACT-1431) Enable curl on OpenBSD
|
||||
|
||||
--- CMakeLists.txt.orig Wed Jun 1 20:11:33 2016
|
||||
+++ CMakeLists.txt Thu Jun 2 08:55:31 2016
|
||||
@@ -51,7 +51,7 @@ SET(LEATHERMAN_COMPONENTS locale catch nowide logging
|
||||
|
||||
# We look for curl early, because whether or not we link to the leatherman curl library
|
||||
# is dependant on whether or not we find curl on the system.
|
||||
-if ((("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") OR WIN32) AND NOT WITHOUT_CURL)
|
||||
+if ((("${CMAKE_SYSTEM_NAME}" MATCHES "Linux") OR ("${CMAKE_SYSTEM_NAME}" MATCHES "OpenBSD") OR WIN32) AND NOT WITHOUT_CURL)
|
||||
find_package(CURL)
|
||||
if (CURL_FOUND)
|
||||
add_definitions(-DUSE_CURL)
|
@ -1,22 +1,10 @@
|
||||
$OpenBSD: patch-lib_CMakeLists_txt,v 1.15 2016/06/01 07:02:02 jasper Exp $
|
||||
$OpenBSD: patch-lib_CMakeLists_txt,v 1.16 2016/08/12 08:42:52 jasper Exp $
|
||||
|
||||
- From fbb7625c044091f5de8525e85f714999eb79e81a Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 18:56:21 +0200
|
||||
Subject: [PATCH] (FACT-1432) Fixup OpenBSD networking facts
|
||||
- Override library version
|
||||
|
||||
--- lib/CMakeLists.txt.orig Fri May 20 18:36:55 2016
|
||||
+++ lib/CMakeLists.txt Mon May 30 16:42:26 2016
|
||||
@@ -202,6 +202,7 @@ elseif ("${CMAKE_SYSTEM_NAME}" MATCHES "OpenBSD")
|
||||
"src/facts/openbsd/collection.cc"
|
||||
"src/facts/glib/load_average_resolver.cc"
|
||||
"src/facts/bsd/filesystem_resolver.cc"
|
||||
+ "src/facts/bsd/networking_resolver.cc"
|
||||
"src/facts/bsd/uptime_resolver.cc"
|
||||
"src/facts/openbsd/dmi_resolver.cc"
|
||||
"src/facts/openbsd/networking_resolver.cc"
|
||||
@@ -282,7 +283,7 @@ link_directories(
|
||||
--- lib/CMakeLists.txt.orig Wed Aug 10 23:43:54 2016
|
||||
+++ lib/CMakeLists.txt Thu Aug 11 10:28:04 2016
|
||||
@@ -287,7 +287,7 @@ link_directories(
|
||||
add_library(libfactersrc OBJECT ${LIBFACTER_COMMON_SOURCES} ${LIBFACTER_STANDARD_SOURCES} ${LIBFACTER_PLATFORM_SOURCES})
|
||||
set_target_properties(libfactersrc PROPERTIES POSITION_INDEPENDENT_CODE true)
|
||||
add_library(libfacter SHARED $<TARGET_OBJECTS:libfactersrc>)
|
||||
|
@ -1,23 +0,0 @@
|
||||
$OpenBSD: patch-lib_inc_internal_facts_openbsd_networking_resolver_hpp,v 1.3 2016/06/01 07:02:02 jasper Exp $
|
||||
|
||||
From fbb7625c044091f5de8525e85f714999eb79e81a Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 18:56:21 +0200
|
||||
Subject: [PATCH] (FACT-1432) Fixup OpenBSD networking facts
|
||||
|
||||
--- lib/inc/internal/facts/openbsd/networking_resolver.hpp.orig Mon May 30 15:26:16 2016
|
||||
+++ lib/inc/internal/facts/openbsd/networking_resolver.hpp Mon May 30 15:26:37 2016
|
||||
@@ -30,6 +30,13 @@ namespace facter { namespace facts { namespace openbsd
|
||||
* @returns Returns true if the socket address is a link layer address or false if it is not.
|
||||
*/
|
||||
virtual bool is_link_address(sockaddr const* addr) const override;
|
||||
+
|
||||
+ /**
|
||||
+ * Gets the bytes of the link address.
|
||||
+ * @param addr The socket address representing the link address.
|
||||
+ * @return Returns a pointer to the address bytes or nullptr if not a link address.
|
||||
+ */
|
||||
+ virtual uint8_t const* get_link_address_bytes(sockaddr const* addr) const override;
|
||||
};
|
||||
|
||||
}}} // namespace facter::facts::openbsd
|
@ -1,19 +0,0 @@
|
||||
$OpenBSD: patch-lib_src_facts_bsd_filesystem_resolver_cc,v 1.7 2016/06/02 20:15:59 jasper Exp $
|
||||
|
||||
From cade2dd2fadd4d31355aa688f76e89f534a5c464 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Thu, 2 Jun 2016 11:50:59 +0200
|
||||
Subject: [PATCH] (FACT-1434) Recognize wxallowed mount option
|
||||
|
||||
--- lib/src/facts/bsd/filesystem_resolver.cc.orig Thu Jun 2 11:45:23 2016
|
||||
+++ lib/src/facts/bsd/filesystem_resolver.cc Thu Jun 2 11:45:30 2016
|
||||
@@ -73,6 +73,9 @@ namespace facter { namespace facts { namespace bsd {
|
||||
make_tuple<unsigned int, string>(MNT_JOURNALED, "journaled"),
|
||||
make_tuple<unsigned int, string>(MNT_DEFWRITE, "deferwrites"),
|
||||
#endif
|
||||
+#ifdef __OpenBSD__
|
||||
+ make_tuple<unsigned int, string>(MNT_WXALLOWED, "wxallowed"),
|
||||
+#endif
|
||||
};
|
||||
|
||||
vector<string> options;
|
@ -1,49 +0,0 @@
|
||||
$OpenBSD: patch-lib_src_facts_openbsd_memory_resolver_cc,v 1.5 2016/06/02 20:15:59 jasper Exp $
|
||||
|
||||
- From 8ee968b997ab0cd55be4ae071f9d17d6ef0b33a6 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 18:34:50 +0200
|
||||
Subject: [PATCH] (MAINT) Unbreak after leatherman split in cc1245ab
|
||||
- From 27369d5db64f0926da0c4d916ac5c65ad750ed49 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Tue, 31 May 2016 16:01:53 +0200
|
||||
Subject: [PATCH] (FACT-1433) Properly scale swap results
|
||||
|
||||
--- lib/src/facts/openbsd/memory_resolver.cc.orig Fri May 20 18:36:55 2016
|
||||
+++ lib/src/facts/openbsd/memory_resolver.cc Tue May 31 15:53:39 2016
|
||||
@@ -1,5 +1,5 @@
|
||||
#include <internal/facts/openbsd/memory_resolver.hpp>
|
||||
-#include <facter/execution/execution.hpp>
|
||||
+#include <leatherman/execution/execution.hpp>
|
||||
#include <leatherman/logging/logging.hpp>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
@@ -9,8 +9,7 @@
|
||||
#include <unistd.h>
|
||||
|
||||
using namespace std;
|
||||
-using namespace facter::execution;
|
||||
-using namespace facter::util;
|
||||
+using namespace leatherman::execution;
|
||||
|
||||
namespace facter { namespace facts { namespace openbsd {
|
||||
|
||||
@@ -49,12 +48,16 @@ namespace facter { namespace facts { namespace openbsd
|
||||
uint64_t swap_used = 0;
|
||||
for (auto &&swap : swapdev) {
|
||||
if (swap.se_flags & SWF_ENABLE) {
|
||||
- result.swap_total += swap.se_nblks * DEV_BSIZE;
|
||||
- swap_used += swap.se_inuse * DEV_BSIZE;
|
||||
+ result.swap_total += swap.se_nblks / (1024 / DEV_BSIZE);
|
||||
+ swap_used += swap.se_inuse / (1024 / DEV_BSIZE);
|
||||
}
|
||||
}
|
||||
|
||||
result.swap_free = result.swap_total - swap_used;
|
||||
+
|
||||
+ // Adjust for expected scale
|
||||
+ result.swap_total *= 1024;
|
||||
+ result.swap_free *= 1024;
|
||||
|
||||
// 0 is for CTL_SWPENC_NAMES' "enable", see uvm_swap_encrypt.h
|
||||
int swap_encrypted_mib[] = { CTL_VM, VM_SWAPENCRYPT, 0 };
|
@ -1,48 +0,0 @@
|
||||
$OpenBSD: patch-lib_src_facts_openbsd_networking_resolver_cc,v 1.3 2016/06/01 07:02:02 jasper Exp $
|
||||
|
||||
- From 8ee968b997ab0cd55be4ae071f9d17d6ef0b33a6 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 18:34:50 +0200
|
||||
Subject: [PATCH] (MAINT) Unbreak after leatherman split in cc1245ab
|
||||
- From fbb7625c044091f5de8525e85f714999eb79e81a Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 18:56:21 +0200
|
||||
Subject: [PATCH] (FACT-1432) Fixup OpenBSD networking facts
|
||||
|
||||
--- lib/src/facts/openbsd/networking_resolver.cc.orig Fri May 20 18:36:55 2016
|
||||
+++ lib/src/facts/openbsd/networking_resolver.cc Mon May 30 16:57:25 2016
|
||||
@@ -1,6 +1,6 @@
|
||||
#include <internal/facts/openbsd/networking_resolver.hpp>
|
||||
#include <internal/util/bsd/scoped_ifaddrs.hpp>
|
||||
-#include <facter/execution/execution.hpp>
|
||||
+#include <leatherman/execution/execution.hpp>
|
||||
#include <leatherman/logging/logging.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <sys/sockio.h>
|
||||
@@ -12,13 +12,25 @@
|
||||
using namespace std;
|
||||
using namespace facter::util;
|
||||
using namespace facter::util::bsd;
|
||||
-using namespace facter::execution;
|
||||
+using namespace leatherman::execution;
|
||||
|
||||
namespace facter { namespace facts { namespace openbsd {
|
||||
|
||||
bool networking_resolver::is_link_address(sockaddr const* addr) const
|
||||
{
|
||||
return addr && addr->sa_family == AF_LINK;
|
||||
+ }
|
||||
+
|
||||
+ uint8_t const* networking_resolver::get_link_address_bytes(sockaddr const* addr) const
|
||||
+ {
|
||||
+ if (!is_link_address(addr)) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ sockaddr_dl const* link_addr = reinterpret_cast<sockaddr_dl const*>(addr);
|
||||
+ if (link_addr->sdl_alen != 6) {
|
||||
+ return nullptr;
|
||||
+ }
|
||||
+ return reinterpret_cast<uint8_t const*>(LLADDR(link_addr));
|
||||
}
|
||||
|
||||
boost::optional<uint64_t> networking_resolver::get_link_mtu(string const& interface, void* data) const
|
@ -1,24 +0,0 @@
|
||||
$OpenBSD: patch-lib_src_facts_openbsd_virtualization_resolver_cc,v 1.3 2016/06/01 07:02:02 jasper Exp $
|
||||
|
||||
From 8ee968b997ab0cd55be4ae071f9d17d6ef0b33a6 Mon Sep 17 00:00:00 2001
|
||||
From: Jasper Lievisse Adriaanse <jasper@humppa.nl>
|
||||
Date: Mon, 30 May 2016 18:34:50 +0200
|
||||
Subject: [PATCH] (MAINT) Unbreak after leatherman split in cc1245ab
|
||||
|
||||
--- lib/src/facts/openbsd/virtualization_resolver.cc.orig Mon May 30 16:52:49 2016
|
||||
+++ lib/src/facts/openbsd/virtualization_resolver.cc Mon May 30 16:55:50 2016
|
||||
@@ -3,12 +3,12 @@
|
||||
#include <facter/facts/collection.hpp>
|
||||
#include <facter/facts/fact.hpp>
|
||||
#include <facter/facts/vm.hpp>
|
||||
-#include <facter/execution/execution.hpp>
|
||||
+#include <leatherman/execution/execution.hpp>
|
||||
#include <boost/algorithm/string.hpp>
|
||||
|
||||
using namespace std;
|
||||
using namespace facter::facts;
|
||||
-using namespace facter::execution;
|
||||
+using namespace leatherman::execution;
|
||||
|
||||
namespace facter { namespace facts { namespace openbsd {
|
||||
|
Loading…
x
Reference in New Issue
Block a user