ohai 17.1.0 → 17.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e30d1da39ec42887fd2cb097f22f5cfeb0662275c11abe0a5b647f317f9a44b
4
- data.tar.gz: 92330832131633f2c132857481898d6e3a0f3f966bfc122d91f33b416e400c1f
3
+ metadata.gz: 41b4188e51b39e36fad8b57469446d7f7728842543175edf1ea4f4f919e42ed5
4
+ data.tar.gz: 863e1b6aca39b9d3bf1f982c6a512877ff75c09e19638ed58fe1dbd60fc29d28
5
5
  SHA512:
6
- metadata.gz: 5ac054f71a2c0fae3566af336a08de3b5277c3bf7fc2e7c7fee076eb949018aba6aed602b28deffd9d97c6a543cb2cafefc42af0d820f6eaaa688e38867842d6
7
- data.tar.gz: 0b63b2a16cb614b7c33e90decce218654e1d92ce6a394a041dd8a906ce18ac65fda3028fdfd1523dc145d4ab7f3af8d868f3950384e2cc36d186c57d25478af4
6
+ metadata.gz: f852e14b190cd4f5e9fe2d24cb17085f5146b5b069df85942ea0ddc3fba984ac9b8be266c665e40ddc119efdc99e232122ff03f058a3a7771ea0d3de436efa52
7
+ data.tar.gz: 7745e8ebbc26abc7ca4bbdb937983e00d46b38ad049ed035fc17434594f212b062f6d1690ce919417978d28a1d4e63c734bfd6f5f9da71282ab505c9b23b05fd
data/Gemfile CHANGED
@@ -9,14 +9,14 @@ gem "chef-utils", git: "https://github.com/chef/chef", branch: "master", glob: "
9
9
 
10
10
  # NOTE: do not submit PRs to add pry as a dep, add to your Gemfile.local
11
11
  group :development do
12
- gem "chefstyle", git: "https://github.com/chef/chefstyle.git", branch: "master"
12
+ gem "chefstyle", "2.0.6"
13
13
  gem "ipaddr_extensions"
14
14
  gem "rake", ">= 10.1.0"
15
15
  gem "rspec-collection_matchers", "~> 1.0"
16
16
  gem "rspec-core", "~> 3.0"
17
17
  gem "rspec-expectations", "~> 3.0"
18
18
  gem "rspec-mocks", "~> 3.0"
19
- gem "rubocop-performance", "1.10.2"
19
+ gem "rubocop-performance", "1.11.4"
20
20
  gem "rubocop-rspec"
21
21
  end
22
22
 
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # Author:: Song Liu <song@kernel.org>
4
+ # Copyright:: Copyright (c) 2021 Facebook, Inc.
5
+ # License:: Apache License, Version 2.0
6
+ #
7
+ # Licensed under the Apache License, Version 2.0 (the "License");
8
+ # you may not use this file except in compliance with the License.
9
+ # You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing, software
14
+ # distributed under the License is distributed on an "AS IS" BASIS,
15
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16
+ # See the License for the specific language governing permissions and
17
+ # limitations under the License.
18
+ #
19
+
20
+ Ohai.plugin(:Livepatch) do
21
+ provides "livepatch"
22
+
23
+ collect_data(:linux) do
24
+ if file_exist?("/sys/kernel/livepatch")
25
+ patches = Mash.new
26
+ dir_glob("/sys/kernel/livepatch/*").each do |livepatch_dir|
27
+ dir = File.basename(livepatch_dir)
28
+ patches[dir] = Mash.new
29
+ %w{enabled transition}.each do |check|
30
+ if file_exist?("/sys/kernel/livepatch/#{dir}/#{check}")
31
+ file_open("/sys/kernel/livepatch/#{dir}/#{check}") { |f| patches[dir][check] = f.read_nonblock(1024).strip }
32
+ end
33
+ end
34
+ livepatch patches
35
+ end
36
+ end
37
+ end
38
+ end
@@ -80,7 +80,7 @@ Ohai.plugin(:Network) do
80
80
  line.strip!
81
81
  logger.trace("Plugin Network: Parsing #{line}")
82
82
  if /\\/.match?(line)
83
- parts = line.split('\\')
83
+ parts = line.split("\\")
84
84
  route_dest = parts.shift.strip
85
85
  route_endings = parts
86
86
  elsif line =~ /^([^\s]+)\s(.*)$/
@@ -137,7 +137,7 @@ Ohai.plugin(:Platform) do
137
137
  when /ubuntu/, /debian/, /linuxmint/, /raspbian/, /cumulus/, /kali/, /pop/
138
138
  # apt-get+dpkg almost certainly goes here
139
139
  "debian"
140
- when /centos/, /redhat/, /oracle/, /almalinux/, /rocky/, /scientific/, /enterpriseenterprise/, /xenserver/, /xcp-ng/, /cloudlinux/, /alibabalinux/, /sangoma/, /clearos/, /parallels/, /ibm_powerkvm/, /nexus_centos/, /bigip/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID"
140
+ when /centos/, /redhat/, /oracle/, /almalinux/, /rocky/, /scientific/, /enterpriseenterprise/, /xenserver/, /xcp-ng/, /cloudlinux/, /alibabalinux/, /sangoma/, /clearos/, /parallels/, /ibm_powerkvm/, /nexus_centos/, /bigip/, /virtuozzo/ # Note that 'enterpriseenterprise' is oracle's LSB "distributor ID"
141
141
  # NOTE: "rhel" should be reserved exclusively for recompiled rhel versions that are nearly perfectly compatible down to the platform_version.
142
142
  # The operating systems that are "rhel" should all be as compatible as rhel7 = centos7 = oracle7 = scientific7 (98%-ish core RPM version compatibility
143
143
  # and the version numbers MUST track the upstream). The appropriate EPEL version repo should work nearly perfectly. Some variation like the
data/lib/ohai/version.rb CHANGED
@@ -19,5 +19,5 @@
19
19
 
20
20
  module Ohai
21
21
  OHAI_ROOT = File.expand_path(__dir__)
22
- VERSION = "17.1.0"
22
+ VERSION = "17.3.1"
23
23
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ohai
3
3
  version: !ruby/object:Gem::Version
4
- version: 17.1.0
4
+ version: 17.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Jacob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-05-03 00:00:00.000000000 Z
11
+ date: 2021-07-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef-config
@@ -302,6 +302,7 @@ files:
302
302
  - lib/ohai/plugins/linux/hostnamectl.rb
303
303
  - lib/ohai/plugins/linux/interrupts.rb
304
304
  - lib/ohai/plugins/linux/ipc.rb
305
+ - lib/ohai/plugins/linux/livepatch.rb
305
306
  - lib/ohai/plugins/linux/lsb.rb
306
307
  - lib/ohai/plugins/linux/lspci.rb
307
308
  - lib/ohai/plugins/linux/machineid.rb