]> git.pld-linux.org Git - packages/ruby-ohai.git/commitdiff
up to 7.0.0 alpha1 snapshot
authorElan Ruusamäe <glen@delfi.ee>
Mon, 25 Nov 2013 21:07:00 +0000 (23:07 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Mon, 25 Nov 2013 21:07:00 +0000 (23:07 +0200)
php-builddate.patch [deleted file]
ruby-ohai.spec
virtualization-vserver.patch

diff --git a/php-builddate.patch b/php-builddate.patch
deleted file mode 100644 (file)
index 091c534..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-fix build date parsing from php if php patched with suhosin:
-
-$ php -v
-PHP 5.3.27 with Suhosin-Patch (cli) (built: Aug 30 2013 04:30:30) 
-Copyright (c) 1997-2013 The PHP Group
-Zend Engine v2.3.0, Copyright (c) 1998-2013 Zend Technologies
-
---- ohai-6.16.0/lib/ohai/plugins/php.rb        2013-01-17 21:03:16.000000000 +0200
-+++ ohai-6.16.0/lib/ohai/plugins/php.rb        2013-09-11 15:26:11.000000000 +0300
-@@ -26,10 +26,10 @@
- status, stdout, stderr = run_command(:no_status_check => true, :command => "php -v")
- if status == 0
--  output = stdout.split
--  if output.length >= 6
-+  output = /PHP (\S+).+built: ([^)]+)/.match(stdout)
-+  if output
-     php[:version] = output[1]
--    php[:builddate] = "%s %s %s" % [output[4],output[5],output[6]]
-+    php[:builddate] = output[2]
-   end
-   languages[:php] = php if php[:version]
- end
index e051e716d7678394be08c07e11cd12bb13b64d45..c2b23bff2586d2655799a20f2d218d6a63fb7b46 100644 (file)
@@ -1,18 +1,18 @@
 #
 # Conditional build:
-%bcond_without tests           # build without tests
+%bcond_with    tests           # build without tests
 
 %define pkgname ohai
 Summary:       Profiles your system and emits JSON
 Name:          ruby-%{pkgname}
-Version:       6.18.0
-Release:       1
+Version:       7.0.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: 898ee1f9395b9b7dc5c7d9779b8a6291
+#Source0:      https://github.com/opscode/ohai/archive/%{version}/%{pkgname}-%{version}.tar.gz
+Source0:       https://github.com/opscode/ohai/archive/master/%{pkgname}-%{version}-bcc1557.tar.gz
+# Source0-md5: 1192ea216030e105171162b57a40ca6f
 Patch0:                virtualization-vserver.patch
-Patch1:                php-builddate.patch
 URL:           http://docs.opscode.com/ohai.html
 BuildRequires: rpm-rubyprov
 BuildRequires: rpmbuild(macros) >= 1.665
@@ -52,9 +52,9 @@ Requires:     %{name} = %{version}-%{release}
 This package contains documentation for %{name}.
 
 %prep
-%setup -q -n ohai-%{version}
+%setup -qc
+mv ohai-*/* .
 %patch0 -p1
-%patch1 -p1
 %{__sed} -i -e '1 s,#!.*ruby,#!%{__ruby},' bin/*
 
 # no plist and not darwin so don't care
@@ -66,7 +66,7 @@ rm spec/unit/plugins/ruby_spec.rb
 
 %build
 rake gem
-%{__tar} -xmf pkg/ohai-%{version}.gem
+%{__tar} -xmf pkg/ohai-%{version}*.gem
 %__gem_helper spec
 
 %if %{with tests}
@@ -83,7 +83,10 @@ install -d $RPM_BUILD_ROOT{%{ruby_vendorlibdir},%{ruby_specdir},%{_bindir},%{_ma
 cp -a bin/* $RPM_BUILD_ROOT%{_bindir}
 cp -a lib/* $RPM_BUILD_ROOT%{ruby_vendorlibdir}
 cp -p docs/man/man1/ohai.1 $RPM_BUILD_ROOT%{_mandir}/man1
-cp -p %{pkgname}-%{version}.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
+cp -p %{pkgname}-%{version}*.gemspec $RPM_BUILD_ROOT%{ruby_specdir}
+
+# testing tool (used by spec/... files)
+rm $RPM_BUILD_ROOT%{_bindir}/grab_data.rb
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -95,4 +98,4 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man1/ohai.1*
 %{ruby_vendorlibdir}/%{pkgname}.rb
 %{ruby_vendorlibdir}/%{pkgname}
-%{ruby_specdir}/%{pkgname}-%{version}.gemspec
+%{ruby_specdir}/%{pkgname}-%{version}*.gemspec
index 54b9080254f14380cd13b69a5f3b1c848f51ab60..d9c0eb399276bb4999db03c8e728aae988015943 100644 (file)
@@ -1,41 +1,47 @@
---- ohai-6.16.0/lib/ohai/plugins/linux/virtualization.rb~      2013-01-17 21:03:16.000000000 +0200
-+++ ohai-6.16.0/lib/ohai/plugins/linux/virtualization.rb       2013-05-25 20:52:31.871480338 +0300
-@@ -23,6 +23,20 @@
- # if it is possible to detect paravirt vs hardware virt, it should be put in
- # virtualization[:mechanism]
+detect vserver before vbox, allowing "vbox-guest" status to overwrite "vserver-host" detection
+
+https://tickets.opscode.com/browse/OHAI-479
+
+--- ruby-ohai-7.0.0.alpha.0/lib/ohai/plugins/linux/virtualization.rb~  2013-11-25 21:34:08.000000000 +0200
++++ ruby-ohai-7.0.0.alpha.0/lib/ohai/plugins/linux/virtualization.rb   2013-11-25 22:36:18.108064611 +0200
+@@ -81,6 +81,20 @@
+       virtualization[:role] = "guest"
+     end
  
-+# Detect Linux-VServer
-+if File.exists?("/proc/self/status")
-+  proc_self_status = File.read("/proc/self/status")
-+  vxid = proc_self_status.match(/^(s_context|VxID): (\d+)$/)
-+  if vxid and vxid[2]
-+    virtualization[:system] = "linux-vserver"
-+    if vxid[2] == "0"
-+      virtualization[:role] = "host"
-+    else
-+      virtualization[:role] = "guest"
-+     end
-+  end
-+end
++    # Detect Linux-VServer
++    if File.exists?("/proc/self/status")
++      proc_self_status = File.read("/proc/self/status")
++      vxid = proc_self_status.match(/^(s_context|VxID): (\d+)$/)
++      if vxid and vxid[2]
++        virtualization[:system] = "linux-vserver"
++        if vxid[2] == "0"
++          virtualization[:role] = "host"
++        else
++          virtualization[:role] = "guest"
++        end
++      end
++    end
 +
- ## Xen
- # /proc/xen is an empty dir for EL6 + Linode Guests
- if File.exists?("/proc/xen")
-@@ -109,17 +123,3 @@
+     # http://www.dmo.ca/blog/detecting-virtualization-on-linux
+     if File.exists?("/usr/sbin/dmidecode")
+       so = shell_out("dmidecode")
+@@ -109,19 +123,5 @@
+         nil
+       end
+     end
+-
+-    # Detect Linux-VServer
+-    if File.exists?("/proc/self/status")
+-      proc_self_status = File.read("/proc/self/status")
+-      vxid = proc_self_status.match(/^(s_context|VxID): (\d+)$/)
+-      if vxid and vxid[2]
+-        virtualization[:system] = "linux-vserver"
+-        if vxid[2] == "0"
+-          virtualization[:role] = "host"
+-        else
+-          virtualization[:role] = "guest"
+-        end
+-      end
+-    end
    end
  end
--
--# Detect Linux-VServer
--if File.exists?("/proc/self/status")
--  proc_self_status = File.read("/proc/self/status")
--  vxid = proc_self_status.match(/^(s_context|VxID): (\d+)$/)
--  if vxid and vxid[2]
--    virtualization[:system] = "linux-vserver"
--    if vxid[2] == "0"
--      virtualization[:role] = "host"
--    else
--      virtualization[:role] = "guest"
--     end
--  end
--end
This page took 0.079208 seconds and 4 git commands to generate.