aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRomain Tartière <romain@FreeBSD.org>2025-06-28 02:54:31 +0000
committerRomain Tartière <romain@FreeBSD.org>2025-07-19 21:06:53 +0000
commitd4e3301eef6281e93fc6bd10c552d5949cae65c5 (patch)
tree1976f693b59af02e20dca6e0c85b902b37acc404
parent0a42e0e644b485d656bffdafb89e35f1f4d40b2c (diff)
sysutils/rubygem-openfact: New port
Copied from sysutils/rubygem-facter With hat: puppet
-rw-r--r--sysutils/Makefile1
-rw-r--r--sysutils/rubygem-facter/Makefile2
-rw-r--r--sysutils/rubygem-openfact/Makefile28
-rw-r--r--sysutils/rubygem-openfact/distinfo3
-rw-r--r--sysutils/rubygem-openfact/files/patch-lib_facter_custom__facts_util_config.rb10
-rw-r--r--sysutils/rubygem-openfact/files/patch-openfact.gemspec10
-rw-r--r--sysutils/rubygem-openfact/pkg-descr5
7 files changed, 58 insertions, 1 deletions
diff --git a/sysutils/Makefile b/sysutils/Makefile
index 8c4dc7f4892e..e949eefe000c 100644
--- a/sysutils/Makefile
+++ b/sysutils/Makefile
@@ -1198,6 +1198,7 @@
SUBDIR += rubygem-mothra
SUBDIR += rubygem-murder
SUBDIR += rubygem-ohai
+ SUBDIR += rubygem-openfact
SUBDIR += rubygem-parallel
SUBDIR += rubygem-puppet_forge
SUBDIR += rubygem-puppetfile-resolver
diff --git a/sysutils/rubygem-facter/Makefile b/sysutils/rubygem-facter/Makefile
index 0700e06c7748..e43601c63a7e 100644
--- a/sysutils/rubygem-facter/Makefile
+++ b/sysutils/rubygem-facter/Makefile
@@ -20,7 +20,7 @@ RUN_DEPENDS+= rubygem-ruby-augeas>0:textproc/rubygem-ruby-augeas \
USES= cpe gem
CPE_VENDOR= puppet
-CONFLICTS_INSTALL= facter # bin/facter
+CONFLICTS_INSTALL= facter rubygem-openfact # bin/facter
NO_ARCH= yes
diff --git a/sysutils/rubygem-openfact/Makefile b/sysutils/rubygem-openfact/Makefile
new file mode 100644
index 000000000000..4c5ba0a59b2d
--- /dev/null
+++ b/sysutils/rubygem-openfact/Makefile
@@ -0,0 +1,28 @@
+PORTNAME= openfact
+PORTVERSION= 5.0.0
+CATEGORIES= sysutils rubygems
+MASTER_SITES= RG
+
+MAINTAINER= puppet@FreeBSD.org
+COMMENT= Cross-platform Ruby library for retrieving facts from OS
+WWW= https://github.com/OpenVoxProject/openfact/
+
+LICENSE= APACHE20
+
+RUN_DEPENDS= rubygem-hocon>=1.3<2:devel/rubygem-hocon \
+ rubygem-thor>=1.0.1<2.0:devel/rubygem-thor
+# Soft dependencies that resolve more FreeBSD facts
+RUN_DEPENDS+= rubygem-ruby-augeas>0:textproc/rubygem-ruby-augeas \
+ rubygem-ffi>=1.0:devel/rubygem-ffi \
+ rubygem-rexml>0:textproc/rubygem-rexml \
+ rubygem-sys-filesystem>0:sysutils/rubygem-sys-filesystem
+
+USES= cpe gem
+
+CONFLICTS_INSTALL= facter rubygem-facter # bin/facter
+
+NO_ARCH= yes
+
+PLIST_FILES= bin/facter
+
+.include <bsd.port.mk>
diff --git a/sysutils/rubygem-openfact/distinfo b/sysutils/rubygem-openfact/distinfo
new file mode 100644
index 000000000000..b54ac34c47a9
--- /dev/null
+++ b/sysutils/rubygem-openfact/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1751077014
+SHA256 (rubygem/openfact-5.0.0.gem) = e551b669c07df25e9cb4c3f1ebc48e064757b0c162418e9a9dd45cedb30b2871
+SIZE (rubygem/openfact-5.0.0.gem) = 172032
diff --git a/sysutils/rubygem-openfact/files/patch-lib_facter_custom__facts_util_config.rb b/sysutils/rubygem-openfact/files/patch-lib_facter_custom__facts_util_config.rb
new file mode 100644
index 000000000000..9bc20c1a5681
--- /dev/null
+++ b/sysutils/rubygem-openfact/files/patch-lib_facter_custom__facts_util_config.rb
@@ -0,0 +1,10 @@
+--- lib/facter/custom_facts/util/config.rb.orig 2020-08-31 03:41:56 UTC
++++ lib/facter/custom_facts/util/config.rb
+@@ -43,6 +43,7 @@ module LegacyFacter
+ [File.join(windows_dir, 'PuppetLabs', 'facter', 'facts.d')]
+ else
+ [
++ '/usr/local/etc/facter/facts.d/',
+ '/etc/puppetlabs/facter/facts.d',
+ '/etc/facter/facts.d/',
+ '/opt/puppetlabs/facter/facts.d'
diff --git a/sysutils/rubygem-openfact/files/patch-openfact.gemspec b/sysutils/rubygem-openfact/files/patch-openfact.gemspec
new file mode 100644
index 000000000000..7d4016fa8bfd
--- /dev/null
+++ b/sysutils/rubygem-openfact/files/patch-openfact.gemspec
@@ -0,0 +1,10 @@
+--- openfact.gemspec.orig 2025-06-28 02:21:18 UTC
++++ openfact.gemspec
+@@ -32,6 +32,6 @@ Gem::Specification.new do |s|
+ s.add_development_dependency(%q<webmock>.freeze, ["~> 3.12".freeze])
+ s.add_development_dependency(%q<yard>.freeze, ["~> 0.9".freeze])
+ s.add_runtime_dependency(%q<hocon>.freeze, ["~> 1.3".freeze])
+- s.add_runtime_dependency(%q<thor>.freeze, [">= 1.0.1".freeze, "< 1.3".freeze])
++ s.add_runtime_dependency(%q<thor>.freeze, [">= 1.0.1".freeze, "< 2".freeze])
+ end
+
diff --git a/sysutils/rubygem-openfact/pkg-descr b/sysutils/rubygem-openfact/pkg-descr
new file mode 100644
index 000000000000..b612ced9d443
--- /dev/null
+++ b/sysutils/rubygem-openfact/pkg-descr
@@ -0,0 +1,5 @@
+A cross-platform Ruby library for retrieving facts from operating systems.
+Supports multiple resolution mechanisms, any of which can be restricted to
+working only on certain operating systems or environments. Facter is
+especially useful for retrieving things like operating system names, IP
+addresses, MAC addresses, and SSH keys.