]> git.pld-linux.org Git - packages/ruby-ohai.git/commitdiff
Merge branch 'chef-14'
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 18 Sep 2018 11:42:08 +0000 (14:42 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 18 Sep 2018 11:42:26 +0000 (14:42 +0300)
ohai.1 [deleted file]
platform-pld.patch
ruby-ohai.spec

diff --git a/ohai.1 b/ohai.1
deleted file mode 100644 (file)
index 6474d31..0000000
--- a/ohai.1
+++ /dev/null
@@ -1,23 +0,0 @@
-.\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.36.
-.TH OHAI "1" "April 2009" "ohai" "User Commands"
-.SH NAME
-ohai \- collect system information
-.SH SYNOPSIS
-.B ohai
-[\fIOPTION\fR]... 
-.SH DESCRIPTION
-Information about your system is collected and returned as multidimensional
-attributes in a JSON format.
-.TP
-\fB\-d\fR, \fB\-\-directory\fR NAME
-A directory to add to the Ohai search path
-.TP
-\fB\-f\fR, \fB\-\-file\fR NAME
-A file to run Ohai against
-.TP
-\fB\-l\fR, \fB\-\-loglevel\fR NAME
-Set log level for Ohai
-.TP
-\fB\-h\fR, \fB\-\-help\fR
-Show this message
-.IP
index a801c89fbfbb8c1dbe4b2acf913a39ebaebc8ecf..5032da87677001f05485025a15562f17ed7bfefe 100644 (file)
@@ -3,15 +3,14 @@ set one in linux/platform
 
 [1] https://github.com/opscode/ohai/blob/7.4.0/lib/ohai/plugins/platform.rb#L26
 
---- 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
+--- ohai-14.1.7/lib/ohai/plugins/linux/platform.rb~    2018-05-29 19:14:33.000000000 +0300
++++ ohai-14.1.7/lib/ohai/plugins/linux/platform.rb     2018-07-16 16:13:58.058756979 +0300
+@@ -147,6 +147,8 @@
+       "arch"
+     when /exherbo/
+       "exherbo"
 +    when /pld/
 +      "pld"
-+    end
-   end
-   collect_data(:linux) do
+     when /alpine/
+       "alpine"
+     when /clearlinux/
index 1f5fdd4d1fb264ee5468c0c5b4a5df6a20417341..b25f47e1c3188f6cee8d4a1479fda9440be7a56a 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Release Notes: https://github.com/opscode/ohai/blob/master/CHANGELOG.md
+# Release Notes: https://github.com/chef/ohai/blob/master/CHANGELOG.md
 #
 # Conditional build:
 %bcond_with    tests           # build without tests
@@ -8,21 +8,17 @@
 Summary:       Profiles your system and emits JSON
 Name:          ruby-%{pkgname}
 Version:       14.2.0
-Release:       0.1
+Release:       1
 License:       Apache v2.0
 Group:         Development/Languages
 Source0:       https://github.com/opscode/ohai/archive/v%{version}/%{pkgname}-%{version}.tar.gz
 # Source0-md5: 2758eda1e642dec6991c839a8c3d1488
 Patch1:                platform-pld.patch
-URL:           http://docs.getchef.com/ohai.html
+URL:           https://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}
 BuildRequires: ruby-ffi >= 1.9
 BuildRequires: ruby-ffi-yajl >= 1.1
@@ -36,16 +32,7 @@ BuildRequires:       ruby-systemu >= 2.6.4
 Requires:      iproute2
 Requires:      lsb-release
 Requires:      mount
-Requires:      ruby-ffi >= 1.9
-Requires:      ruby-ffi-yajl >= 1.1
-Requires:      ruby-ipaddress
-Requires:      ruby-mime-types >= 1.16
-Requires:      ruby-mixlib-cli
-Requires:      ruby-mixlib-config >= 2.0
-Requires:      ruby-mixlib-log
-Requires:      ruby-mixlib-shellout >= 1.2
-Requires:      ruby-systemu >= 2.6.4
-Suggests:      ruby-net-dhcp
+Requires:      ruby(abi) >= 2.0
 BuildArch:     noarch
 BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
@@ -73,6 +60,7 @@ This package contains documentation for %{name}.
 %{__sed} -i -e '/net-dhcp/d' %{pkgname}.gemspec
 # platform specific and optional
 %{__sed} -i -e '/wmi-lite/d' %{pkgname}.gemspec
+%{__sed} -i -e '/plist/d' %{pkgname}.gemspec
 # dev dep
 %{__sed} -i -e '/rake/d' %{pkgname}.gemspec
 
@@ -80,13 +68,15 @@ This package contains documentation for %{name}.
 rm spec/unit/plugins/darwin/system_profiler_spec.rb
 
 # can't figure how to fix -r rubygems does not help
-# ohai-6.16.0/spec/unit/plugins/ruby_spec.rb:52:in `block in <top (required)>': uninitialized cons tant Gem (NameError)
+# ohai-6.16.0/spec/unit/plugins/ruby_spec.rb:52:in `block in <top (required)>': uninitialized constant Gem (NameError)
 rm spec/unit/plugins/ruby_spec.rb
 
 %build
-rake -Ilib gem
-%{__tar} -xmf pkg/ohai-%{version}*.gem
-%__gem_helper spec
+# make gemspec self-contained
+ruby -r rubygems -e 'spec = eval(File.read("%{pkgname}.gemspec"))
+       File.open("%{pkgname}-%{version}.gemspec", "w") do |file|
+       file.puts spec.to_ruby_for_cache
+end'
 
 %if %{with tests}
 # Occasionally fails with "undefined method `rfc2822' for nil:NilClass" during
This page took 0.060429 seconds and 4 git commands to generate.