beaker 7.8.2 → 7.8.4

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: 81a5056bbf75fb1a2d0203ea5885a278d12300fc339415e5afeeb46ebef8d785
4
- data.tar.gz: e5a03effce21a9d74058016da1dcdf3421c9f9ccb2ea9717b295c8b5f99a16b1
3
+ metadata.gz: bc70d9b91085103e8380ab0e1a5dbbbbba99cd091d6b214462f95ce4f4735bd5
4
+ data.tar.gz: e4a7714defa006440a6b39c017f42ecd8c6ef1bc97c2793c86b1386c9737ff5d
5
5
  SHA512:
6
- metadata.gz: 4c7ce30592e319300a0dfe9d864c4194ba1ea6eaf86febb0b0c1b8122ae9f6ec7ab4a7e718a7b0e43a48c64746f9226d4cad83688d6f71871ab9e57282e25d7e
7
- data.tar.gz: 0cb47533c54b7ef3497652a1b4396ea90c53f5cf2ef7e6c9a3a964826b1cf782e75f46cd371ce38de33ae7a7249f9f6f3631d2818014c9acec11aae40dd7d7da
6
+ metadata.gz: b3d88078d0717e7768c614884f1e9fa430cd5cb55465d8bc570ab5f154353897ae525b24a8a54b0b0b896f5a3ce1f4572a5af2c84f15b10ca0f564ec6c0f8d58
7
+ data.tar.gz: 279efae545117ac3c344ccad94d1830fba5793c2235c6fa9ceeddc6b3859b5fed6b20a4bfeb9e4975f27fa68acd78c5f88bbf5cd67b7882a2c83277aec721cee
@@ -17,14 +17,14 @@ jobs:
17
17
  steps:
18
18
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
19
19
  - name: Install Ruby
20
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
20
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
21
21
  with:
22
22
  ruby-version: 'ruby'
23
23
  - name: Build gem
24
24
  shell: bash
25
25
  run: gem build --verbose *.gemspec
26
26
  - name: Upload gem to GitHub cache
27
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
27
+ uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
28
28
  with:
29
29
  name: gem-artifact
30
30
  path: '*.gem'
@@ -39,7 +39,7 @@ jobs:
39
39
  contents: write # clone repo and create release
40
40
  steps:
41
41
  - name: Download gem from GitHub cache
42
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
42
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
43
43
  with:
44
44
  name: gem-artifact
45
45
  - name: Create Release
@@ -56,7 +56,7 @@ jobs:
56
56
  packages: write # publish to rubygems.pkg.github.com
57
57
  steps:
58
58
  - name: Download gem from GitHub cache
59
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
59
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
60
60
  with:
61
61
  name: gem-artifact
62
62
  - name: Publish gem to GitHub packages
@@ -73,7 +73,7 @@ jobs:
73
73
  id-token: write # rubygems.org authentication
74
74
  steps:
75
75
  - name: Download gem from GitHub cache
76
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
76
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
77
77
  with:
78
78
  name: gem-artifact
79
79
  - uses: rubygems/configure-rubygems-credentials@dc5a8d8553e6ee01fc26761a49e99e733d17954a # v2.1.0
@@ -92,11 +92,11 @@ jobs:
92
92
  - release-to-rubygems
93
93
  steps:
94
94
  - name: Download gem from GitHub cache
95
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
95
+ uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
96
96
  with:
97
97
  name: gem-artifact
98
98
  - name: Install Ruby
99
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
99
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
100
100
  with:
101
101
  ruby-version: 'ruby'
102
102
  - name: Wait for release to propagate
@@ -18,7 +18,7 @@ jobs:
18
18
  steps:
19
19
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
20
20
  - name: Install Ruby ${{ matrix.ruby }}
21
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
21
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
22
22
  with:
23
23
  ruby-version: '4.0'
24
24
  bundler-cache: true
@@ -40,7 +40,7 @@ jobs:
40
40
  steps:
41
41
  - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
42
42
  - name: Install Ruby ${{ matrix.ruby }}
43
- uses: ruby/setup-ruby@95ef2b042f9d7a56d8268cba8559e2842e2ad01b # v1.321.0
43
+ uses: ruby/setup-ruby@b3aaceaef7e0ee231b499e7b5f49c03fc1d32199 # v1.338.0
44
44
  with:
45
45
  ruby-version: ${{ matrix.ruby }}
46
46
  bundler-cache: true
data/CHANGELOG.md CHANGED
@@ -2,9 +2,25 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file.
4
4
 
5
- ## [7.8.2](https://github.com/voxpupuli/beaker/tree/7.8.2) (2026-09-09)
5
+ ## [7.8.4](https://github.com/voxpupuli/beaker/tree/7.8.4) (2026-11-11)
6
6
 
7
- [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.8.1...7.8.2)
7
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.8.3...7.8.4)
8
+
9
+ **Fixed bugs:**
10
+
11
+ - Restart Cygwin's sshd under its current service name [\#2059](https://github.com/voxpupuli/beaker/pull/2059) ([nmburgan](https://github.com/nmburgan))
12
+
13
+ ## [v7.8.3](https://github.com/voxpupuli/beaker/tree/v7.8.3) (2026-09-17)
14
+
15
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.8.2...v7.8.3)
16
+
17
+ **Fixed bugs:**
18
+
19
+ - Fix Solaris sshd\_config editing in ssh\_permit\_user\_environment [\#2029](https://github.com/voxpupuli/beaker/pull/2029) ([shubhamshinde360](https://github.com/shubhamshinde360))
20
+
21
+ ## [v7.8.2](https://github.com/voxpupuli/beaker/tree/v7.8.2) (2026-09-09)
22
+
23
+ [Full Changelog](https://github.com/voxpupuli/beaker/compare/v7.8.1...v7.8.2)
8
24
 
9
25
  **Fixed bugs:**
10
26
 
@@ -300,11 +300,13 @@ module Unix::Exec
300
300
  # (from {#ssh_service_restart}).
301
301
  def ssh_permit_user_environment
302
302
  case self['platform']
303
- when /amazon|debian|ubuntu|archlinux|el-|centos|fedora|redhat|oracle|scientific|opensuse|sles|solaris/
303
+ when /amazon|debian|ubuntu|archlinux|el-|centos|fedora|redhat|oracle|scientific|opensuse|sles/
304
304
  directory = tmpdir
305
305
  exec(Beaker::Command.new("sed -e 's/^PermitUserEnvironment .*/PermitUserEnvironment yes/' -e t -e '1s/^/PermitUserEnvironment yes\\n/' /etc/ssh/sshd_config > #{directory}/sshd_config.permit"))
306
306
  exec(Beaker::Command.new("mv #{directory}/sshd_config.permit /etc/ssh/sshd_config"))
307
307
  exec(Beaker::Command.new("echo '' >/etc/environment")) if self['platform'].include?('ubuntu-')
308
+ when /solaris/
309
+ exec(Beaker::Command.new("perl -i -0777 -pe 's/^#?PermitUserEnvironment\\b[^\\n]*/PermitUserEnvironment yes/m or s/\\z/PermitUserEnvironment yes\\n/' /etc/ssh/sshd_config"))
308
310
  when /(free|open)bsd/
309
311
  exec(Beaker::Command.new("sudo perl -pi -e 's/^#?PermitUserEnvironment no/PermitUserEnvironment yes/' /etc/ssh/sshd_config"), { :pty => true })
310
312
  else
@@ -65,13 +65,16 @@ module Windows::Exec
65
65
  #
66
66
  # @return [Result] result of starting SSH service
67
67
  def ssh_service_restart
68
+ # Cygwin's ssh-host-config names the service cygsshd. Older versions named it sshd.
69
+ cygsshd = exec(Beaker::Command.new('cygrunsrv -Q cygsshd'), :accept_all_exit_codes => true).exit_code == 0
70
+ service_name = cygsshd ? 'cygsshd' : 'sshd'
68
71
  command_result = nil
69
72
  # we get periodic failures to restart the service, so looping these with re-attempts
70
73
  repeat_fibonacci_style_for(5) do
71
- 0 == exec(Beaker::Command.new("cygrunsrv -E sshd"), :acceptable_exit_codes => [0, 1]).exit_code
74
+ 0 == exec(Beaker::Command.new("cygrunsrv -E #{service_name}"), :acceptable_exit_codes => [0, 1]).exit_code
72
75
  end
73
76
  repeat_fibonacci_style_for(5) do
74
- command_result = exec(Beaker::Command.new("cygrunsrv -S sshd"), :acceptable_exit_codes => [0, 1])
77
+ command_result = exec(Beaker::Command.new("cygrunsrv -S #{service_name}"), :acceptable_exit_codes => [0, 1])
75
78
  0 == command_result.exit_code
76
79
  end
77
80
  command_result
@@ -1,5 +1,5 @@
1
1
  module Beaker
2
2
  module Version
3
- STRING = '7.8.2'
3
+ STRING = '7.8.4'
4
4
  end
5
5
  end
@@ -95,6 +95,18 @@ module Beaker
95
95
  expect { instance.ssh_permit_user_environment }.not_to raise_error
96
96
  end
97
97
  end
98
+
99
+ context 'on Solaris' do
100
+ PlatformHelpers::SOLARISPLATFORMS.each do |platform|
101
+ it "calls the correct commands for #{platform}" do
102
+ opts['platform'] = platform
103
+ expect(instance).to receive(:exec).once
104
+ expect(Beaker::Command).to receive(:new).with("perl -i -0777 -pe 's/^#?PermitUserEnvironment\\b[^\\n]*/PermitUserEnvironment yes/m or s/\\z/PermitUserEnvironment yes\\n/' /etc/ssh/sshd_config")
105
+ expect(instance).to receive(:ssh_service_restart)
106
+ expect { instance.ssh_permit_user_environment }.not_to raise_error
107
+ end
108
+ end
109
+ end
98
110
  end
99
111
 
100
112
  it 'raises an error on unsupported platforms' do
@@ -78,6 +78,25 @@ module Beaker
78
78
  end
79
79
  end
80
80
 
81
+ describe '#ssh_service_restart' do
82
+ let(:success) { double('success', :exit_code => 0) }
83
+ let(:failure) { double('failure', :exit_code => 1) }
84
+
85
+ it 'restarts the cygsshd service when it exists' do
86
+ allow(instance).to receive(:exec).with(having_attributes(command: 'cygrunsrv -Q cygsshd'), anything).and_return(success)
87
+ expect(instance).to receive(:exec).with(having_attributes(command: 'cygrunsrv -E cygsshd'), anything).and_return(success)
88
+ expect(instance).to receive(:exec).with(having_attributes(command: 'cygrunsrv -S cygsshd'), anything).and_return(success)
89
+ expect(instance.ssh_service_restart).to eq(success)
90
+ end
91
+
92
+ it 'restarts the sshd service when there is no cygsshd service' do
93
+ allow(instance).to receive(:exec).with(having_attributes(command: 'cygrunsrv -Q cygsshd'), anything).and_return(failure)
94
+ expect(instance).to receive(:exec).with(having_attributes(command: 'cygrunsrv -E sshd'), anything).and_return(success)
95
+ expect(instance).to receive(:exec).with(having_attributes(command: 'cygrunsrv -S sshd'), anything).and_return(success)
96
+ expect(instance.ssh_service_restart).to eq(success)
97
+ end
98
+ end
99
+
81
100
  context 'mv' do
82
101
  let(:origin) { '/origin/path/of/content' }
83
102
  let(:destination) { '/destination/path/of/content' }
data/spec/helpers.rb CHANGED
@@ -136,4 +136,6 @@ module PlatformHelpers
136
136
  scientific
137
137
  archlinux
138
138
  ]
139
+
140
+ SOLARISPLATFORMS = %w[solaris10-SPARC solaris11-SPARC]
139
141
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: beaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.8.2
4
+ version: 7.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Puppet
@@ -755,7 +755,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
755
755
  - !ruby/object:Gem::Version
756
756
  version: '0'
757
757
  requirements: []
758
- rubygems_version: 4.0.16
758
+ rubygems_version: 4.0.20
759
759
  specification_version: 4
760
760
  summary: Let's test Puppet!
761
761
  test_files: []