summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn McCrae <john.mccrae@progress.com>2022-03-24 13:44:27 -0700
committerGitHub <noreply@github.com>2022-03-24 13:44:27 -0700
commit52ef0c8a9835ce5559eccfda7973312ac26d739d (patch)
treec60feceba928c9ecdfbf6f496aa09d403a7fdf52
parent2b6d99b1c0340ee1d9622286a51f6bf2e480c3da (diff)
parent8c11b691afccdffa3b43440e7746ce8dc580e7e5 (diff)
downloadchef-52ef0c8a9835ce5559eccfda7973312ac26d739d.tar.gz
Merge branch 'main' into INFC-7
-rwxr-xr-x.expeditor/promote-docker-images.sh2
-rw-r--r--.expeditor/scripts/bk_win_functional.ps16
-rw-r--r--.expeditor/scripts/bk_win_integration.ps13
-rw-r--r--.expeditor/verify.pipeline.yml88
-rw-r--r--CHANGELOG.md9
-rw-r--r--Gemfile3
-rw-r--r--Gemfile.lock33
-rw-r--r--VERSION2
-rw-r--r--chef-bin/lib/chef-bin/version.rb2
-rw-r--r--chef-config/lib/chef-config/config.rb2
-rw-r--r--chef-config/lib/chef-config/version.rb2
-rw-r--r--chef-config/spec/unit/config_spec.rb1
-rw-r--r--chef-utils/lib/chef-utils/version.rb2
-rw-r--r--knife/Gemfile3
-rw-r--r--knife/lib/chef/knife/version.rb2
-rw-r--r--lib/chef/compliance/input.rb2
-rw-r--r--lib/chef/compliance/profile.rb2
-rw-r--r--lib/chef/compliance/waiver.rb2
-rw-r--r--lib/chef/dsl/reader_helpers.rb2
-rw-r--r--lib/chef/http/ssl_policies.rb6
-rw-r--r--lib/chef/node/mixin/immutablize_array.rb1
-rw-r--r--lib/chef/recipe.rb2
-rw-r--r--lib/chef/resource/chef_client_launchd.rb1
-rw-r--r--lib/chef/resource/inspec_waiver_file_entry.rb4
-rw-r--r--lib/chef/version.rb2
-rw-r--r--omnibus/Gemfile.lock4
-rw-r--r--omnibus_overrides.rb1
-rw-r--r--post-bundle-install.rb12
-rw-r--r--spec/data/rubygems.org/sexp_processor-info2
-rw-r--r--spec/unit/application/client_spec.rb10
30 files changed, 110 insertions, 103 deletions
diff --git a/.expeditor/promote-docker-images.sh b/.expeditor/promote-docker-images.sh
index 857fb3012f..1bc8ed4a1c 100755
--- a/.expeditor/promote-docker-images.sh
+++ b/.expeditor/promote-docker-images.sh
@@ -42,7 +42,7 @@ latest_major_version_in_omnibus_stable="$(mixlib-install download chef --version
if [[ "$channel" == "current" ]]; then
# Add major and major.minor version tags unless this major version has been promoted to the omnibus STABLE channel
- if [[ "$major_version_is_in_omnibus_stable" = "false" ]] ; then
+ if [[ "$major_version_is_in_omnibus_stable" == "false" ]] ; then
create_and_push_manifest "$major_version"
create_and_push_manifest "${major_version}.${minor_version}"
fi
diff --git a/.expeditor/scripts/bk_win_functional.ps1 b/.expeditor/scripts/bk_win_functional.ps1
index 05f8e57248..8b4a445b44 100644
--- a/.expeditor/scripts/bk_win_functional.ps1
+++ b/.expeditor/scripts/bk_win_functional.ps1
@@ -9,12 +9,8 @@ $ErrorActionPreference = 'Stop'
Write-Output "--- Enable Ruby 2.7"
-Write-Output "Add Uru to Environment PATH"
-$env:PATH = "C:\Program Files (x86)\Uru;" + $env:PATH
-[Environment]::SetEnvironmentVariable('PATH', $env:PATH, [EnvironmentVariableTarget]::Machine)
-
Write-Output "Register Installed Ruby Version 2.7 With Uru"
-Start-Process "C:\Program Files (x86)\Uru\uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait
+Start-Process "uru_rt.exe" -ArgumentList 'admin add C:\ruby27\bin' -Wait
uru 271
if (-not $?) { throw "Can't Activate Ruby. Did Uru Registration Succeed?" }
ruby -v
diff --git a/.expeditor/scripts/bk_win_integration.ps1 b/.expeditor/scripts/bk_win_integration.ps1
index 6b0debc790..7a2d99ecc8 100644
--- a/.expeditor/scripts/bk_win_integration.ps1
+++ b/.expeditor/scripts/bk_win_integration.ps1
@@ -2,8 +2,7 @@ $CurrentDirectory = Split-Path -Path $MyInvocation.MyCommand.Definition -Parent
$PrepScript = Join-Path $CurrentDirectory "bk_win_prep.ps1"
Invoke-Expression $PrepScript
-# Set-Item -Path Env:Path -Value ($Env:Path + ";C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin")
-$Env:Path="C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\ruby27\bin;C:\ci-studio-common\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin;C:\Program Files\Git\cmd;C:\Users\ContainerAdministrator\AppData\Local\Microsoft\WindowsApps;C:\Go\bin;C:\Users\ContainerAdministrator\go\bin"
+Set-Item -Path Env:Path -Value ("C:\Program Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;" + $Env:Path)
winrm quickconfig -q
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index daa9d0025e..14b168661f 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -42,10 +42,10 @@ steps:
image: rubydistros/ubuntu-18.04:2.6
#########################################################################
- # Tests Ruby 3.0
+ # Tests Ruby 3.1
#########################################################################
-- label: "Integration Ubuntu 18.04 :ruby: 3.0"
+- label: "Integration Ubuntu 18.04 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
@@ -55,10 +55,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
privileged: true
-- label: "Functional Ubuntu 18.04 :ruby: 3.0"
+- label: "Functional Ubuntu 18.04 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- apt-get update -y
@@ -70,10 +70,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
privileged: true
-- label: "Unit Ubuntu 18.04 :ruby: 3.0"
+- label: "Unit Ubuntu 18.04 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- apt-get update -y
@@ -86,9 +86,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
-- label: "Integration Ubuntu 20.04 :ruby: 3.0"
+- label: "Integration Ubuntu 20.04 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
@@ -98,10 +98,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-20.04:3.0
+ image: rubydistros/ubuntu-20.04:3.1
privileged: true
-- label: "Functional Ubuntu 20.04 :ruby: 3.0"
+- label: "Functional Ubuntu 20.04 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- apt-get update -y
@@ -113,10 +113,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-20.04:3.0
+ image: rubydistros/ubuntu-20.04:3.1
privileged: true
-- label: "Unit Ubuntu 20.04 :ruby: 3.0"
+- label: "Unit Ubuntu 20.04 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- apt-get update -y
@@ -129,9 +129,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-20.04:3.0
+ image: rubydistros/ubuntu-20.04:3.1
-- label: "Integration CentOS 7 :ruby: 3.0"
+- label: "Integration CentOS 7 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
@@ -141,10 +141,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/centos-7:3.0
+ image: rubydistros/centos-7:3.1
privileged: true
-- label: "Functional CentOS 7 :ruby: 3.0"
+- label: "Functional CentOS 7 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- yum install -y crontabs e2fsprogs
@@ -156,10 +156,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/centos-7:3.0
+ image: rubydistros/centos-7:3.1
privileged: true
-- label: "Unit CentOS 7 :ruby: 3.0"
+- label: "Unit CentOS 7 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- yum install -y libarchive-devel
@@ -171,9 +171,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/centos-7:3.0
+ image: rubydistros/centos-7:3.1
-- label: "Integration openSUSE 15 :ruby: 3.0"
+- label: "Integration openSUSE 15 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- zypper install -y cron insserv-compat
@@ -184,10 +184,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/opensuse-15:3.0
+ image: rubydistros/opensuse-15:3.1
privileged: true
-- label: "Functional openSUSE 15 :ruby: 3.0"
+- label: "Functional openSUSE 15 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- zypper install -y cronie insserv-compat
@@ -199,10 +199,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/opensuse-15:3.0
+ image: rubydistros/opensuse-15:3.1
privileged: true
-- label: "Unit openSUSE 15 :ruby: 3.0"
+- label: "Unit openSUSE 15 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- zypper install -y cron insserv-compat libarchive-devel
@@ -214,9 +214,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/opensuse-15:3.0
+ image: rubydistros/opensuse-15:3.1
-- label: "Integration Fedora :ruby: 3.0"
+- label: "Integration AlmaLinux 8 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- cd /workdir; bundle config set --local without omnibus_package
@@ -226,10 +226,10 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/fedora-latest:3.0
+ image: rubydistros/almalinux-8:3.1
privileged: true
-- label: "Functional Fedora :ruby: 3.0"
+- label: "Functional AlmaLinux 8 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- dnf install -y crontabs e2fsprogs
@@ -240,15 +240,19 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/fedora-latest:3.0
+ image: rubydistros/almalinux-8:3.1
privileged: true
environment:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
-- label: "Unit Fedora :ruby: 3.0"
+- label: "Unit AlmaLinux 8 :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
+ - dnf install dnf-plugins-core -y
+ - dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm -y
+ - dnf config-manager --enable epel
+ - dnf config-manager --set-enabled powertools
- dnf install -y libarchive-devel
- bundle config set --local without omnibus_package
- bundle config set --local path 'vendor/bundle'
@@ -258,9 +262,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/fedora-latest:3.0
+ image: rubydistros/almalinux-8:3.1
-- label: "Functional Windows :ruby: 3.0"
+- label: "Functional Windows :ruby: 2.7"
commands:
- .expeditor/scripts/bk_win_functional.ps1
expeditor:
@@ -300,7 +304,7 @@ steps:
# EXTERNAL GEM TESTING
#########################################################################
-- label: "chef-zero gem :ruby: 3.0"
+- label: "chef-zero gem :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
@@ -310,12 +314,12 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
environment:
- PEDANT_OPTS=--skip-oc_id
- CHEF_FS=true
-- label: "cheffish gem :ruby: 3.0"
+- label: "cheffish gem :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
@@ -325,9 +329,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
-- label: "chefspec gem :ruby: 3.0"
+- label: "chefspec gem :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
@@ -337,9 +341,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
-- label: "knife-windows gem :ruby: 3.0"
+- label: "knife-windows gem :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- bundle config set --local without omnibus_package
@@ -349,9 +353,9 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
-- label: "berkshelf gem :ruby: 3.0"
+- label: "berkshelf gem :ruby: 3.1"
commands:
- /workdir/.expeditor/scripts/bk_container_prep.sh
- apt-get update -y
@@ -362,7 +366,7 @@ steps:
expeditor:
executor:
docker:
- image: rubydistros/ubuntu-18.04:3.0
+ image: rubydistros/ubuntu-18.04:3.1
- label: ":habicat: Linux plan"
commands:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5936ce5059..05598f58b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,17 +1,20 @@
<!-- usage documentation: http://expeditor-docs.es.chef.io/configuration/changelog/ -->
This changelog lists individual merged pull requests to Chef Infra Client and geared towards developers. For a list of significant changes per release see the [Chef Infra Client Release Notes](https://docs.chef.io/release_notes_client/).
-<!-- latest_release 18.0.72 -->
-## [v18.0.72](https://github.com/chef/chef/tree/v18.0.72) (2022-03-21)
+<!-- latest_release 18.0.75 -->
+## [v18.0.75](https://github.com/chef/chef/tree/v18.0.75) (2022-03-24)
#### Merged Pull Requests
-- Ruby 3.1 fixes [#12696](https://github.com/chef/chef/pull/12696) ([lamont-granquist](https://github.com/lamont-granquist))
+- update chef client launchd to run at load [#12706](https://github.com/chef/chef/pull/12706) ([rishichawda](https://github.com/rishichawda))
<!-- latest_release -->
<!-- release_rollup since=17.9.26 -->
### Changes not yet released to stable
#### Merged Pull Requests
+- update chef client launchd to run at load [#12706](https://github.com/chef/chef/pull/12706) ([rishichawda](https://github.com/rishichawda)) <!-- 18.0.75 -->
+- Enable ruby 3.1 testing on verify pipeline for unix, fix breakage [#12695](https://github.com/chef/chef/pull/12695) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 18.0.74 -->
+- Use the latest libarchive (3.6.0) [#12648](https://github.com/chef/chef/pull/12648) ([tas50](https://github.com/tas50)) <!-- 18.0.73 -->
- Ruby 3.1 fixes [#12696](https://github.com/chef/chef/pull/12696) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 18.0.72 -->
- Chef-18: Enable unifed_mode by default [#12692](https://github.com/chef/chef/pull/12692) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 18.0.71 -->
- Fix windows kitchen tests [#12693](https://github.com/chef/chef/pull/12693) ([lamont-granquist](https://github.com/lamont-granquist)) <!-- 18.0.70 -->
diff --git a/Gemfile b/Gemfile
index affd8adcc0..5827d92e69 100644
--- a/Gemfile
+++ b/Gemfile
@@ -33,6 +33,9 @@ group(:omnibus_package, :pry) do
gem "pry-stack_explorer"
end
+# proxifier gem is busted on ruby 3.1 and seems abandoned so use git fork of gem
+gem "proxifier", git: "https://github.com/chef/ruby-proxifier", branch: "lcg/ruby-3"
+
# Everything except AIX and Windows
group(:ruby_shadow) do
# if ruby-shadow does a release that supports ruby-3.0 this can be removed
diff --git a/Gemfile.lock b/Gemfile.lock
index 2e0bf629f0..fa05e003d2 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -26,6 +26,13 @@ GIT
wmi-lite (~> 1.0)
GIT
+ remote: https://github.com/chef/ruby-proxifier
+ revision: 8b87d0b5b469adbd93eabc0d20f3e47007aef743
+ branch: lcg/ruby-3
+ specs:
+ proxifier (1.0.3)
+
+GIT
remote: https://github.com/chef/ruby-shadow
revision: 3b8ea40b0e943b5de721d956741308ce805a5c3c
branch: lcg/ruby-3.0
@@ -35,12 +42,12 @@ GIT
PATH
remote: .
specs:
- chef (18.0.72)
+ chef (18.0.75)
addressable
aws-sdk-s3 (~> 1.91)
aws-sdk-secretsmanager (~> 1.46)
- chef-config (= 18.0.72)
- chef-utils (= 18.0.72)
+ chef-config (= 18.0.75)
+ chef-utils (= 18.0.75)
chef-vault
chef-zero (>= 14.0.11)
corefoundation (~> 0.3.4)
@@ -68,13 +75,13 @@ PATH
train-winrm (>= 0.2.5)
uuidtools (>= 2.1.5, < 3.0)
vault (~> 0.16)
- chef (18.0.72-universal-mingw32)
+ chef (18.0.75-universal-mingw32)
addressable
aws-sdk-s3 (~> 1.91)
aws-sdk-secretsmanager (~> 1.46)
- chef-config (= 18.0.72)
+ chef-config (= 18.0.75)
chef-powershell (~> 1.0.12)
- chef-utils (= 18.0.72)
+ chef-utils (= 18.0.75)
chef-vault
chef-zero (>= 14.0.11)
corefoundation (~> 0.3.4)
@@ -117,15 +124,15 @@ PATH
PATH
remote: chef-bin
specs:
- chef-bin (18.0.72)
- chef (= 18.0.72)
+ chef-bin (18.0.75)
+ chef (= 18.0.75)
PATH
remote: chef-config
specs:
- chef-config (18.0.72)
+ chef-config (18.0.75)
addressable
- chef-utils (= 18.0.72)
+ chef-utils (= 18.0.75)
fuzzyurl
mixlib-config (>= 2.2.12, < 4.0)
mixlib-shellout (>= 2.0, < 4.0)
@@ -134,7 +141,7 @@ PATH
PATH
remote: chef-utils
specs:
- chef-utils (18.0.72)
+ chef-utils (18.0.75)
concurrent-ruby
GEM
@@ -322,7 +329,6 @@ GEM
pastel (0.8.0)
tty-color (~> 0.5)
plist (3.6.0)
- proxifier (1.0.3)
pry (0.13.0)
coderay (~> 1.1)
method_source (~> 1.0)
@@ -510,6 +516,7 @@ DEPENDENCIES
fauxhai-ng
inspec-core-bin (~> 4.24)
ohai!
+ proxifier!
pry (= 0.13.0)
pry-byebug
pry-stack_explorer
@@ -520,4 +527,4 @@ DEPENDENCIES
webmock
BUNDLED WITH
- 2.3.7
+ 2.3.6
diff --git a/VERSION b/VERSION
index ef8449e2c4..ddea16e324 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-18.0.72 \ No newline at end of file
+18.0.75 \ No newline at end of file
diff --git a/chef-bin/lib/chef-bin/version.rb b/chef-bin/lib/chef-bin/version.rb
index 9086016201..39b26161e6 100644
--- a/chef-bin/lib/chef-bin/version.rb
+++ b/chef-bin/lib/chef-bin/version.rb
@@ -21,7 +21,7 @@
module ChefBin
CHEFBIN_ROOT = File.expand_path("..", __dir__)
- VERSION = "18.0.72".freeze
+ VERSION = "18.0.75".freeze
end
#
diff --git a/chef-config/lib/chef-config/config.rb b/chef-config/lib/chef-config/config.rb
index 87e0b6bab2..2932fdc82f 100644
--- a/chef-config/lib/chef-config/config.rb
+++ b/chef-config/lib/chef-config/config.rb
@@ -174,7 +174,7 @@ module ChefConfig
# Call to_sym because Chef::Config expects only symbol keys. Also
# runs a simple parse on the string for some common types.
- memo[key.to_sym] = YAML.safe_load(value)
+ memo[key.to_sym] = YAML.safe_load(value, permitted_classes: [Date])
memo
end
set_extra_config_options(extra_parsed_options)
diff --git a/chef-config/lib/chef-config/version.rb b/chef-config/lib/chef-config/version.rb
index 0d081e6407..d77a6b2fef 100644
--- a/chef-config/lib/chef-config/version.rb
+++ b/chef-config/lib/chef-config/version.rb
@@ -15,5 +15,5 @@
module ChefConfig
CHEFCONFIG_ROOT = File.expand_path("..", __dir__)
- VERSION = "18.0.72".freeze
+ VERSION = "18.0.75".freeze
end
diff --git a/chef-config/spec/unit/config_spec.rb b/chef-config/spec/unit/config_spec.rb
index d4d5844d3d..89eb785b06 100644
--- a/chef-config/spec/unit/config_spec.rb
+++ b/chef-config/spec/unit/config_spec.rb
@@ -19,6 +19,7 @@
require "spec_helper"
require "chef-config/config"
+require "date" unless defined?(Date)
RSpec.describe ChefConfig::Config do
before(:each) do
diff --git a/chef-utils/lib/chef-utils/version.rb b/chef-utils/lib/chef-utils/version.rb
index ff0db46e7d..2998e3b4ac 100644
--- a/chef-utils/lib/chef-utils/version.rb
+++ b/chef-utils/lib/chef-utils/version.rb
@@ -16,5 +16,5 @@
module ChefUtils
CHEFUTILS_ROOT = File.expand_path("..", __dir__)
- VERSION = "18.0.72"
+ VERSION = "18.0.75"
end
diff --git a/knife/Gemfile b/knife/Gemfile
index a2321726c7..ed6bf36acb 100644
--- a/knife/Gemfile
+++ b/knife/Gemfile
@@ -2,6 +2,9 @@ source "https://rubygems.org"
gem "knife", path: "."
+# proxifier gem is busted on ruby 3.1 and seems abandoned so use git fork of gem
+gem "proxifier", git: "https://github.com/chef/ruby-proxifier", branch: "lcg/ruby-3"
+
group(:development, :test) do
gem "cheffish", ">= 14" # testing only , but why didn't this need to explicit in chef?
gem "webmock" # testing only
diff --git a/knife/lib/chef/knife/version.rb b/knife/lib/chef/knife/version.rb
index e566e203db..6f44f80b01 100644
--- a/knife/lib/chef/knife/version.rb
+++ b/knife/lib/chef/knife/version.rb
@@ -17,7 +17,7 @@
class Chef
class Knife
KNIFE_ROOT = File.expand_path("../..", __dir__)
- VERSION = "18.0.72".freeze
+ VERSION = "18.0.75".freeze
end
end
diff --git a/lib/chef/compliance/input.rb b/lib/chef/compliance/input.rb
index 686b516b2e..237a4e12d0 100644
--- a/lib/chef/compliance/input.rb
+++ b/lib/chef/compliance/input.rb
@@ -101,7 +101,7 @@ class Chef
# and cookbook_name are required this is probably not externally useful.
#
def self.from_yaml(events, string, path = nil, cookbook_name = nil)
- from_hash(events, YAML.load(string), path, cookbook_name)
+ from_hash(events, YAML.safe_load(string, permitted_classes: [Date]), path, cookbook_name)
end
# @param filename [String] full path to the yml file in the cookbook
diff --git a/lib/chef/compliance/profile.rb b/lib/chef/compliance/profile.rb
index ec9d61895c..f0d02000fc 100644
--- a/lib/chef/compliance/profile.rb
+++ b/lib/chef/compliance/profile.rb
@@ -108,7 +108,7 @@ class Chef
# and cookbook_name are required this is probably not externally useful.
#
def self.from_yaml(events, string, path, cookbook_name)
- from_hash(events, YAML.load(string), path, cookbook_name)
+ from_hash(events, YAML.safe_load(string, permitted_classes: [Date]), path, cookbook_name)
end
# @param filename [String] full path to the inspec.yml file in the cookbook
diff --git a/lib/chef/compliance/waiver.rb b/lib/chef/compliance/waiver.rb
index 0062a7d5d9..6284e06f04 100644
--- a/lib/chef/compliance/waiver.rb
+++ b/lib/chef/compliance/waiver.rb
@@ -101,7 +101,7 @@ class Chef
# and cookbook_name are required this is probably not externally useful.
#
def self.from_yaml(events, string, path = nil, cookbook_name = nil)
- from_hash(events, YAML.load(string), path, cookbook_name)
+ from_hash(events, YAML.safe_load(string, permitted_classes: [Date]), path, cookbook_name)
end
# @param filename [String] full path to the yml file in the cookbook
diff --git a/lib/chef/dsl/reader_helpers.rb b/lib/chef/dsl/reader_helpers.rb
index 6a9b021d89..fd8b21e9f0 100644
--- a/lib/chef/dsl/reader_helpers.rb
+++ b/lib/chef/dsl/reader_helpers.rb
@@ -42,7 +42,7 @@ class Chef
end
def parse_yaml(filename)
- YAML.load(IO.read(filename))
+ YAML.safe_load_file(filename, permitted_classes: [Date])
end
extend self
diff --git a/lib/chef/http/ssl_policies.rb b/lib/chef/http/ssl_policies.rb
index bc688f13a6..eb5e6cc747 100644
--- a/lib/chef/http/ssl_policies.rb
+++ b/lib/chef/http/ssl_policies.rb
@@ -88,10 +88,10 @@ class Chef
certs = Dir.glob(::File.join(Chef::Util::PathHelper.escape_glob_dir(config.trusted_certs_dir), "*.{crt,pem}"))
certs.each do |cert_file|
cert = begin
- OpenSSL::X509::Certificate.new(::File.binread(cert_file))
+ OpenSSL::X509::Certificate.new(::File.binread(cert_file))
rescue OpenSSL::X509::CertificateError => e
raise Chef::Exceptions::ConfigurationError, "Error reading cert file '#{cert_file}', original error '#{e.class}: #{e.message}'"
- end
+ end
add_trusted_cert(cert)
end
end
@@ -132,7 +132,7 @@ class Chef
def add_trusted_cert(cert)
http_client.cert_store.add_cert(cert)
rescue OpenSSL::X509::StoreError => e
- raise e unless e.message == "cert already in hash table"
+ raise e unless e.message =~ /cert already in hash table/
end
end
diff --git a/lib/chef/node/mixin/immutablize_array.rb b/lib/chef/node/mixin/immutablize_array.rb
index 652061bc36..ab4d65580f 100644
--- a/lib/chef/node/mixin/immutablize_array.rb
+++ b/lib/chef/node/mixin/immutablize_array.rb
@@ -73,6 +73,7 @@ class Chef
include?
index
inject
+ intersect?
intersection
join
last
diff --git a/lib/chef/recipe.rb b/lib/chef/recipe.rb
index 972edf9649..2f7a282ca8 100644
--- a/lib/chef/recipe.rb
+++ b/lib/chef/recipe.rb
@@ -101,7 +101,7 @@ class Chef
end
def from_yaml(string)
- res = ::YAML.safe_load(string)
+ res = ::YAML.safe_load(string, permitted_classes: [Date])
unless res.is_a?(Hash) && res.key?("resources")
raise ArgumentError, "YAML recipe '#{source_file}' must contain a top-level 'resources' hash (YAML sequence), i.e. 'resources:'"
end
diff --git a/lib/chef/resource/chef_client_launchd.rb b/lib/chef/resource/chef_client_launchd.rb
index 0fbe7b9263..1016ea4d49 100644
--- a/lib/chef/resource/chef_client_launchd.rb
+++ b/lib/chef/resource/chef_client_launchd.rb
@@ -134,6 +134,7 @@ class Chef
program_arguments ["/bin/bash",
"-c",
"echo; echo #{ChefUtils::Dist::Infra::PRODUCT} launchd daemon config has been updated. Manually unloading and reloading the daemon; echo Now unloading the daemon; sudo /bin/launchctl unload /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist; sleep 2; echo Now loading the daemon; sudo /bin/launchctl load /Library/LaunchDaemons/com.#{ChefUtils::Dist::Infra::SHORT}.#{ChefUtils::Dist::Infra::CLIENT}.plist"]
+ run_at_load true
action :enable # enable creates the plist & triggers service restarts on change
end
diff --git a/lib/chef/resource/inspec_waiver_file_entry.rb b/lib/chef/resource/inspec_waiver_file_entry.rb
index 7ad31fd58d..f19dff2b74 100644
--- a/lib/chef/resource/inspec_waiver_file_entry.rb
+++ b/lib/chef/resource/inspec_waiver_file_entry.rb
@@ -136,11 +136,11 @@ class Chef
def load_waiver_file_to_hash(file_name)
if %r{(/|C:\\).*(.yaml|.yml)}i.match?(file_name)
if ::File.exist?(file_name)
- hash = ::YAML.load_file(file_name)
+ hash = ::YAML.safe_load_file(file_name, permitted_classes: [Date])
if hash == false || hash.nil? || hash == ""
{}
else
- ::YAML.load_file(file_name)
+ ::YAML.safe_load_file(file_name, permitted_classes: [Date])
end
else
{}
diff --git a/lib/chef/version.rb b/lib/chef/version.rb
index f27cd11d2a..9f3a58e618 100644
--- a/lib/chef/version.rb
+++ b/lib/chef/version.rb
@@ -23,7 +23,7 @@ require_relative "version_string"
class Chef
CHEF_ROOT = File.expand_path("..", __dir__)
- VERSION = Chef::VersionString.new("18.0.72")
+ VERSION = Chef::VersionString.new("18.0.75")
end
#
diff --git a/omnibus/Gemfile.lock b/omnibus/Gemfile.lock
index e2715e25f2..b2c045d513 100644
--- a/omnibus/Gemfile.lock
+++ b/omnibus/Gemfile.lock
@@ -301,7 +301,7 @@ GEM
parslet (1.8.2)
pastel (0.8.0)
tty-color (~> 0.5)
- pedump (0.6.4)
+ pedump (0.6.5)
awesome_print
iostruct (>= 0.0.4)
multipart-post (>= 2.0.0)
@@ -464,4 +464,4 @@ DEPENDENCIES
winrm-fs (~> 1.0)
BUNDLED WITH
- 2.2.32
+ 2.3.7
diff --git a/omnibus_overrides.rb b/omnibus_overrides.rb
index 72acde87b6..64c435204d 100644
--- a/omnibus_overrides.rb
+++ b/omnibus_overrides.rb
@@ -3,7 +3,6 @@
#
# NOTE: You MUST update omnibus-software when adding new versions of
# software here: bundle exec rake dependencies:update_omnibus_gemfile_lock
-override "libarchive", version: "3.5.2"
override "libffi", version: "3.4.2"
override "libiconv", version: "1.16"
override "liblzma", version: "5.2.5"
diff --git a/post-bundle-install.rb b/post-bundle-install.rb
index 3abefab725..86a530bffd 100644
--- a/post-bundle-install.rb
+++ b/post-bundle-install.rb
@@ -9,19 +9,19 @@ puts "fixing bundle installed gems in #{gem_home}"
# rake install since we need --conservative --minimal-deps in order to not install duplicate gems.
#
Dir["#{gem_home}/bundler/gems/*"].each do |gempath|
- matches = File.basename(gempath).match(/(.*)-[A-Fa-f0-9]{12}/)
+ matches = File.basename(gempath).match(/.*-[A-Fa-f0-9]{12}/)
next unless matches
- gem_name = matches[1]
+ gem_name = File.basename(Dir["#{gempath}/*.gemspec"].first, ".gemspec")
+ # FIXME: should strip any valid ruby platform off of the gem_name if it matches
+
next unless gem_name
- next if gem_name == "chef"
+ # FIXME: should omit the gem which is in the current directory and not hard code chef
+ next if %w{chef chef-universal-mingw32}.include?(gem_name)
puts "re-installing #{gem_name}..."
- # we can't use "command" or "bundle" or "gem" DSL methods here since those are lazy and we need to run commands immediately
- # (this is like a shell_out inside of a ruby_block in core chef, you don't use an execute resource inside of a ruby_block or
- # things get really weird and unexpected)
Dir.chdir(gempath) do
system("gem build #{gem_name}.gemspec") or raise "gem build failed"
system("gem install #{gem_name}*.gem --conservative --minimal-deps --no-document") or raise "gem install failed"
diff --git a/spec/data/rubygems.org/sexp_processor-info b/spec/data/rubygems.org/sexp_processor-info
index 78add7f2fa..a37139f592 100644
--- a/spec/data/rubygems.org/sexp_processor-info
+++ b/spec/data/rubygems.org/sexp_processor-info
@@ -46,4 +46,4 @@
4.14.0 |checksum:99a20cc5e7b901f6b493a8ca5e13439b73b19671eaaca68a00216c4f66765edc
4.14.1 |checksum:0fa8731445cf4a0c01570ec29aac4b50a0451ce66b1b31ad768f5035e3af7b90,ruby:~> 2.2
4.15.0 |checksum:a5ec27d8055ad47444cfb7ce860bad8af2365772a82892f4a8a0d97e8e9e3b34,ruby:~> 2.2
-4.15.1 |checksum:9291a0f2247f50d15068ee6965b67cd7b678b0d273e18adf3c0b2ea4a890125c,ruby:< 3.1&>= 2.1
+4.15.1 |checksum:9291a0f2247f50d15068ee6965b67cd7b678b0d273e18adf3c0b2ea4a890125c,ruby:>= 2.1
diff --git a/spec/unit/application/client_spec.rb b/spec/unit/application/client_spec.rb
index 6977e4f108..06eb591b62 100644
--- a/spec/unit/application/client_spec.rb
+++ b/spec/unit/application/client_spec.rb
@@ -564,16 +564,6 @@ describe Chef::Application::Client, "run_application", :unix_only do
expect(IO.select([@pipe[0]], nil, nil, 0)).not_to be_nil
expect(@pipe[0].gets).to eq("finished\n")
end
-
- it "should exit hard when sent before converge" do
- pid = fork do
- sleep 3
- @app.run_application
- end
- Process.kill("TERM", pid)
- _pid, result = Process.waitpid2(pid)
- expect(result.exitstatus).to eq(3)
- end
end
end