Skip to content

Commit d7ed881

Browse files
Clemens Beckbalasankarc
authored andcommitted
Revert "Merge branch 'update-chef-gem' into 'master'"
This reverts merge request !7276
1 parent ea94d67 commit d7ed881

File tree

5 files changed

+75
-41
lines changed

5 files changed

+75
-41
lines changed

Gemfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ omnibus_gem_version = Gitlab::Version.new('omnibus')
2222
# grep "gem 'install " config/software/*
2323
gem 'omnibus', git: omnibus_gem_version.remote(Gitlab::Version::ALTERNATIVE_SOURCE), tag: omnibus_gem_version.print(false)
2424
source 'https://packagecloud.io/cinc-project/stable' do
25-
gem 'chef', '~> 17.10.95'
25+
gem 'chef', '~> 17.10.0'
2626
gem 'chef-cli', '~> 5.6.1'
2727
gem 'chef-utils'
2828
gem 'mixlib-versioning'

Gemfile.lock

Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -20,34 +20,34 @@ GIT
2020
GEM
2121
remote: https://packagecloud.io/cinc-project/stable/
2222
specs:
23-
chef (17.10.95)
23+
chef (17.10.0)
2424
addressable
2525
aws-sdk-s3 (~> 1.91)
2626
aws-sdk-secretsmanager (~> 1.46)
27-
chef-config (= 17.10.95)
28-
chef-utils (= 17.10.95)
27+
chef-config (= 17.10.0)
28+
chef-utils (= 17.10.0)
2929
chef-vault
3030
chef-zero (>= 14.0.11)
3131
corefoundation (~> 0.3.4)
3232
diff-lcs (>= 1.2.4, < 1.6.0, != 1.4.0)
3333
erubis (~> 2.7)
34-
ffi (~> 1.15.0)
34+
ffi (>= 1.5.0)
3535
ffi-libarchive (~> 1.0, >= 1.0.3)
3636
ffi-yajl (~> 2.2)
3737
iniparse (~> 1.4)
38-
inspec-core (>= 4.23)
38+
inspec-core (~> 4.23)
3939
license-acceptance (>= 1.0.5, < 3)
4040
mixlib-archive (>= 0.4, < 2.0)
4141
mixlib-authentication (>= 2.1, < 4)
4242
mixlib-cli (>= 2.1.1, < 3.0)
4343
mixlib-log (>= 2.0.3, < 4.0)
4444
mixlib-shellout (>= 3.1.1, < 4.0)
45-
net-sftp (>= 2.1.2, < 5.0)
45+
net-sftp (>= 2.1.2, < 4.0)
4646
ohai (~> 17.0)
4747
plist (~> 3.2)
4848
proxifier (~> 1.0)
4949
syslog-logger (~> 1.6)
50-
train-core (~> 3.10)
50+
train-core (~> 3.2, >= 3.2.28)
5151
train-winrm (>= 0.2.5)
5252
uuidtools (>= 2.1.5, < 3.0)
5353
vault (~> 0.16)
@@ -63,14 +63,14 @@ GEM
6363
mixlib-shellout (>= 2.0, < 4.0)
6464
pastel (~> 0.7)
6565
solve (> 2.0, < 5.0)
66-
chef-config (17.10.95)
66+
chef-config (17.10.0)
6767
addressable
68-
chef-utils (= 17.10.95)
68+
chef-utils (= 17.10.0)
6969
fuzzyurl
7070
mixlib-config (>= 2.2.12, < 4.0)
7171
mixlib-shellout (>= 2.0, < 4.0)
7272
tomlrb (~> 1.2)
73-
chef-utils (17.10.95)
73+
chef-utils (17.10.0)
7474
concurrent-ruby
7575
chef-zero (15.0.11)
7676
ffi-yajl (~> 2.2)
@@ -79,27 +79,27 @@ GEM
7979
rack (~> 2.0, >= 2.0.6)
8080
uuidtools (~> 2.1)
8181
webrick
82-
inspec-core (5.22.36)
82+
inspec-core (4.56.20)
8383
addressable (~> 2.4)
8484
chef-telemetry (~> 1.0, >= 1.0.8)
85-
faraday (>= 1, < 3)
86-
faraday-follow_redirects (~> 0.3)
87-
hashie (>= 3.4, < 6.0)
85+
faraday (>= 0.9.0, < 1.5)
86+
faraday_middleware (~> 1.0)
87+
hashie (>= 3.4, < 5.0)
8888
license-acceptance (>= 0.2.13, < 3.0)
8989
method_source (>= 0.8, < 2.0)
9090
mixlib-log (~> 3.0)
9191
multipart-post (~> 2.0)
9292
parallel (~> 1.9)
93-
parslet (>= 1.5, < 3.0)
93+
parslet (>= 1.5, < 2.0)
9494
pry (~> 0.13)
95-
rspec (>= 3.9, <= 3.12)
95+
rspec (>= 3.9, <= 3.11)
9696
rspec-its (~> 1.2)
9797
rubyzip (>= 1.2.2, < 3.0)
9898
semverse (~> 3.0)
9999
sslshake (~> 1.2)
100-
thor (>= 0.20, < 1.3.0)
100+
thor (>= 0.20, < 2.0)
101101
tomlrb (>= 1.2, < 2.1)
102-
train-core (~> 3.10)
102+
train-core (~> 3.0)
103103
tty-prompt (~> 0.17)
104104
tty-table (~> 0.10)
105105
mixlib-versioning (1.2.12)
@@ -138,8 +138,8 @@ GEM
138138
aws-sdk-core (~> 3, >= 3.127.0)
139139
aws-sdk-kms (~> 1)
140140
aws-sigv4 (~> 1.4)
141-
aws-sdk-secretsmanager (1.75.0)
142-
aws-sdk-core (~> 3, >= 3.165.0)
141+
aws-sdk-secretsmanager (1.60.0)
142+
aws-sdk-core (~> 3, >= 3.127.0)
143143
aws-sigv4 (~> 1.1)
144144
aws-sigv4 (1.5.2)
145145
aws-eventstream (~> 1, >= 1.0.2)
@@ -150,7 +150,7 @@ GEM
150150
chef-telemetry (1.1.1)
151151
chef-config
152152
concurrent-ruby (~> 1.0)
153-
chef-vault (4.1.11)
153+
chef-vault (4.1.10)
154154
chefspec (9.3.3)
155155
chef (>= 15)
156156
chef-cli
@@ -202,7 +202,7 @@ GEM
202202
multi_json
203203
domain_name (0.5.20190701)
204204
unf (>= 0.0.5, < 1.0.0)
205-
erubi (1.12.0)
205+
erubi (1.11.0)
206206
erubis (2.7.0)
207207
excon (0.76.0)
208208
fantaskspec (1.2.0)
@@ -219,19 +219,19 @@ GEM
219219
faraday-em_http (1.0.0)
220220
faraday-em_synchrony (1.0.0)
221221
faraday-excon (1.1.0)
222-
faraday-follow_redirects (0.3.0)
223-
faraday (>= 1, < 3)
224222
faraday-http-cache (2.4.1)
225223
faraday (>= 0.8)
226224
faraday-net_http (1.0.1)
227225
faraday-net_http_persistent (1.2.0)
226+
faraday_middleware (1.2.0)
227+
faraday (~> 1.0)
228228
fauxhai-ng (8.7.0)
229229
net-ssh
230230
ffi (1.15.5)
231231
ffi-compiler (1.0.1)
232232
ffi (>= 1.0.0)
233233
rake
234-
ffi-libarchive (1.1.13)
234+
ffi-libarchive (1.1.3)
235235
ffi (~> 1.0)
236236
ffi-yajl (2.4.0)
237237
libyajl2 (>= 1.2)
@@ -334,7 +334,7 @@ GEM
334334
llhttp-ffi (0.4.0)
335335
ffi-compiler (~> 1.0)
336336
rake (~> 13.0)
337-
logging (2.3.1)
337+
logging (2.3.0)
338338
little-plugger (~> 1.1)
339339
multi_json (~> 1.14)
340340
memoist (0.16.2)
@@ -361,8 +361,8 @@ GEM
361361
nap (1.1.0)
362362
net-scp (3.0.0)
363363
net-ssh (>= 2.6.5, < 7.0.0)
364-
net-sftp (4.0.0)
365-
net-ssh (>= 5.0.0, < 8.0.0)
364+
net-sftp (3.0.0)
365+
net-ssh (>= 5.0.0, < 7.0.0)
366366
net-ssh (6.1.0)
367367
netrc (0.11.0)
368368
no_proxy_fix (0.1.2)
@@ -395,7 +395,7 @@ GEM
395395
parallel (1.19.2)
396396
parser (3.2.2.1)
397397
ast (~> 2.4.1)
398-
parslet (2.0.0)
398+
parslet (1.8.2)
399399
pastel (0.8.0)
400400
tty-color (~> 0.5)
401401
pedump (0.6.6)
@@ -410,7 +410,7 @@ GEM
410410
parser
411411
unparser
412412
proxifier (1.0.3)
413-
pry (0.14.2)
413+
pry (0.14.1)
414414
coderay (~> 1.1)
415415
method_source (~> 1.0)
416416
public_suffix (5.0.0)
@@ -527,13 +527,13 @@ GEM
527527
tomlib (0.6.0)
528528
tomlrb (1.3.0)
529529
trailblazer-option (0.1.2)
530-
train-core (3.11.0)
530+
train-core (3.9.2)
531531
addressable (~> 2.5)
532532
ffi (!= 1.13.0)
533533
json (>= 1.8, < 3.0)
534534
mixlib-shellout (>= 2.0, < 4.0)
535-
net-scp (>= 1.2, < 5.0)
536-
net-ssh (>= 2.9, < 8.0)
535+
net-scp (>= 1.2, < 4.0)
536+
net-ssh (>= 2.9, < 7.0)
537537
train-winrm (0.2.13)
538538
winrm (>= 2.3.6, < 3.0)
539539
winrm-elevated (~> 1.2.2)
@@ -567,7 +567,7 @@ GEM
567567
diff-lcs (~> 1.3)
568568
parser (>= 3.2.0)
569569
uuidtools (2.2.0)
570-
vault (0.18.2)
570+
vault (0.16.0)
571571
aws-sigv4
572572
webrick (1.7.0)
573573
winrm (2.3.6)
@@ -600,7 +600,7 @@ PLATFORMS
600600
DEPENDENCIES
601601
aws-sdk-ec2
602602
aws-sdk-marketplacecatalog
603-
chef (~> 17.10.95)!
603+
chef (~> 17.10.0)!
604604
chef-cli (~> 5.6.1)!
605605
chef-utils!
606606
chefspec
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From bedef6179381d1c8c2b13bf4328e8197c9c49cde Mon Sep 17 00:00:00 2001
2+
From: Clemens Beck <[email protected]>
3+
Date: Tue, 2 May 2023 11:04:44 +0200
4+
Subject: [PATCH] Version 17 EOL detection
5+
6+
---
7+
lib/chef/client.rb | 6 ++++++
8+
1 file changed, 6 insertions(+)
9+
10+
diff --git a/lib/chef/client.rb b/lib/chef/client.rb
11+
index 743b5ec473..d65f9fbae3 100644
12+
--- a/lib/chef/client.rb
13+
+++ b/lib/chef/client.rb
14+
@@ -343,6 +343,12 @@ class Chef
15+
# the year it goes EOL
16+
eol_year = 2006 + Gem::Version.new(Chef::VERSION).segments.first
17+
18+
+ # Increment the EOL year of version 17, as it's support has been extended by one year.
19+
+ # See: https://www.chef.io/blog/announcement-about-change-in-infra-client-17-end-of-life-timeline
20+
+ if Gem::Version.new(Chef::VERSION).segments.first == 17
21+
+ eol_year += 1
22+
+ end
23+
+
24+
if Time.now > Time.new(eol_year, 5, 01)
25+
logger.warn("This release of #{ChefUtils::Dist::Infra::PRODUCT} became end of life (EOL) on May 1st #{eol_year}. Please update to a supported release to receive new features, bug fixes, and security updates.")
26+
end
27+
--
28+
2.40.1
29+

config/software/chef-bin.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
#
1616

1717
name 'chef-bin'
18-
# The version here should be in agreement with /Gemfile.lock so that our rspec
19-
# testing stays consistent with the package contents.
18+
# The version here should be in agreement with the chef-gem version and
19+
# /Gemfile.lock so that our rspec testing stays consistent with the package
20+
# contents.
2021
default_version '17.10.0'
2122

2223
license 'Apache-2.0'

config/software/chef-gem.rb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,10 @@
1717
require 'mixlib/shellout'
1818

1919
name 'chef-gem'
20-
# The version here should be in agreement with /Gemfile.lock so that our rspec
21-
# testing stays consistent with the package contents.
22-
default_version '17.10.95'
20+
# The version here should be in agreement with the chef-bin/cinc version and
21+
# /Gemfile.lock so that our rspec testing stays consistent with the package
22+
# contents.
23+
default_version '17.10.0'
2324

2425
license 'Apache-2.0'
2526
license_file 'LICENSE'
@@ -49,6 +50,9 @@
4950
prefix_path = "#{install_dir}/embedded"
5051
gem_path = shellout!("#{embedded_bin('ruby')} -e \"puts Gem.path.find { |path| path.start_with?(\'#{prefix_path}\') }\"", env: env).stdout.chomp
5152

53+
patch source: "Version-17-EOL-detection.patch",
54+
target: "#{gem_path}/gems/chef-#{version}/lib/chef/client.rb"
55+
5256
patch source: "utf8-locale-support.patch",
5357
target: "#{gem_path}/gems/chef-config-#{version}/lib/chef-config/config.rb"
5458
end

0 commit comments

Comments
 (0)