Source0: https://github.com/opscode/ohai/archive/%{version}/%{pkgname}-%{version}.tar.gz
# Source0-md5: 7a2182e562bab7dcc48e0b68e07daf92
Patch1: platform-pld.patch
-#Patch2: soft-net-dhcp.patch
URL: http://docs.getchef.com/ohai.html
BuildRequires: rpm-rubyprov
BuildRequires: rpmbuild(macros) >= 1.665
%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