[1] https://github.com/opscode/ohai/blob/7.4.0/lib/ohai/plugins/platform.rb#L26
---- ohai-7.4.0/lib/ohai/plugins/linux/platform.rb~ 2014-09-06 07:18:08.000000000 +0300
-+++ ohai-7.4.0/lib/ohai/plugins/linux/platform.rb 2014-11-14 14:04:37.000000000 +0200
-@@ -121,6 +121,8 @@
- platform_family "arch"
- when /exherbo/
- platform_family "exherbo"
-+ when /pld/
-+ platform_family "pld"
+--- ohai-14.2.0/lib/ohai/plugins/linux/platform.rb~ 2018-06-04 21:41:29.000000000 +0200
++++ ohai-14.2.0/lib/ohai/plugins/linux/platform.rb 2018-07-16 21:00:42.751122191 +0200
+@@ -152,6 +152,9 @@
+ when /clearlinux/
+ "clearlinux"
end
++ when /pld/
++ "pld"
++ end
end
- end
+
+ collect_data(:linux) do
%define pkgname ohai
Summary: Profiles your system and emits JSON
Name: ruby-%{pkgname}
-Version: 7.6.0
-Release: 5
+Version: 14.2.0
+Release: 0.1
License: Apache v2.0
Group: Development/Languages
-Source0: https://github.com/opscode/ohai/archive/%{version}/%{pkgname}-%{version}.tar.gz
-# Source0-md5: b28339ec7f835a2ed4ec0f876178fb14
+Source0: https://github.com/opscode/ohai/archive/v%{version}/%{pkgname}-%{version}.tar.gz
+# Source0-md5: 2758eda1e642dec6991c839a8c3d1488
Patch1: platform-pld.patch
-Patch2: soft-net-dhcp.patch
URL: http://docs.getchef.com/ohai.html
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.665
BuildRequires: ruby-rake
BuildRequires: sed >= 4.0
+BuildRequires: rubocop
+BuildRequires: ruby-chefstyle
# rake gem uses installed ohai version not version we intend to build!
BuildConflicts: ruby-ohai
%if %{with tests}
%prep
%setup -q -n ohai-%{version}
%patch1 -p1
-%patch2 -p1
%{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
# don't need shellout 2.0 yet, but 2.0 is ok
+++ /dev/null
-require net/dhcp only when cloudstack hint present
-
---- ./lib/ohai/mixin/cloudstack_metadata.rb~ 2014-12-01 22:01:15.000000000 +0200
-+++ ./lib/ohai/mixin/cloudstack_metadata.rb 2014-12-04 17:21:55.363338588 +0200
-@@ -17,7 +17,6 @@
-
- require 'ohai/mixin/ec2_metadata'
- require 'ohai/hints'
--require 'net/dhcp'
- require 'socket'
-
-
-@@ -30,6 +29,8 @@
- response = ''
- if Ohai::Hints.hint?('cloudstack')
- begin
-+ require 'net/dhcp'
-+
- request = DHCP::Discover.new
-
- listensock = UDPSocket.new