simp-beaker-helpers 1.33.0 → 1.34.0

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: 7d7c715ff67c345d0184eab0ec4957b54c89c1564109b828e86aef993dc8d839
4
- data.tar.gz: 74bde0332be1aca5f900f183056d3020486cd257656ad8818bece891884e11a8
3
+ metadata.gz: 1f134126c3a1b23c87a495aac126cd172bc1f261d9da6bcf5f488af22cbdade7
4
+ data.tar.gz: 7a24de4dff9da4288b91995e6af7d5be0e58505116c1661e588d51cfcc5bfc0c
5
5
  SHA512:
6
- metadata.gz: 35682af281ee71680a34a53bfe8475d56df8d2f6937989ca3914e83bd4ba327a1824ac1c5c70bf4dde47fd44bc59a036156d3a4c3c42432a4beb0f4df019a45a
7
- data.tar.gz: 76cf9275532481c877133574532935aa923a8d109e99cc0c3934bb64f890e24f022d3edd3c04069e2fc167020c6f58ea9ee8520964ffa591d61a3c6e7cf7aa61
6
+ metadata.gz: 69ce9cb283b5df89a141c540df080c670505bd9d1f65db91fdb53b96171e4a66e642f6d3850d26cb4939a3d04271f6766062d45610873f0b9a55a0c6913e0725
7
+ data.tar.gz: 74f9426f0356d2b97ef1c7dbcb8eb568b200cdfbeaaa2c0581e87ac1118a7ad2cf0e8060f3a3c5a91d9f73bec963d0d1c570962f475507a6b1ddeb0cfeefdf29
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ ### 1.34.0 / 2024-09-17
2
+ * Fixed:
3
+ * Legacy fact usage
4
+ * Added:
5
+ * EL9 support in Simp::BeakerHelpers::SSG
6
+
1
7
  ### 1.33.0 / 2024-06-05
2
8
  * Fixed:
3
9
  * Update gem dependencies
@@ -46,8 +46,8 @@ module Simp::BeakerHelpers
46
46
  @sut.install_package("inspec-#{@inspec_version}")
47
47
  end
48
48
 
49
- os = fact_on(@sut, 'operatingsystem')
50
- os_rel = fact_on(@sut, 'operatingsystemmajrelease')
49
+ os = fact_on(@sut, 'os.name')
50
+ os_rel = fact_on(@sut, 'os.release.major')
51
51
 
52
52
  @profile = "#{os}-#{os_rel}-#{profile}"
53
53
  @profile_dir = '/tmp/inspec/inspec_profiles'
@@ -28,7 +28,7 @@ module Simp::BeakerHelpers
28
28
  'openscap-utils',
29
29
  'python-jinja2',
30
30
  'python-lxml',
31
- 'python-setuptools'
31
+ 'python-setuptools',
32
32
  ]
33
33
 
34
34
  EL8_PACKAGES = [
@@ -43,7 +43,22 @@ module Simp::BeakerHelpers
43
43
  'python3-lxml',
44
44
  'python3-pyyaml',
45
45
  'python3-setuptools',
46
- 'libarchive'
46
+ 'libarchive',
47
+ ]
48
+
49
+ EL9_PACKAGES = [
50
+ 'cmake',
51
+ 'git',
52
+ 'make',
53
+ 'openscap-python3',
54
+ 'openscap-utils',
55
+ 'openscap-scanner',
56
+ 'python3',
57
+ 'python3-jinja2',
58
+ 'python3-lxml',
59
+ 'python3-pyyaml',
60
+ 'python3-setuptools',
61
+ 'libarchive',
47
62
  ]
48
63
 
49
64
  OS_INFO = {
@@ -71,6 +86,14 @@ module Simp::BeakerHelpers
71
86
  'build_target' => 'rhel8',
72
87
  'datastream' => 'ssg-rhel8-ds.xml'
73
88
  }
89
+ },
90
+ '9' => {
91
+ 'required_packages' => EL9_PACKAGES,
92
+ 'ssg' => {
93
+ 'profile_target' => 'rhel9',
94
+ 'build_target' => 'rhel9',
95
+ 'datastream' => 'ssg-rhel9-ds.xml'
96
+ }
74
97
  }
75
98
  },
76
99
  'CentOS' => {
@@ -97,6 +120,14 @@ module Simp::BeakerHelpers
97
120
  'build_target' => 'centos8',
98
121
  'datastream' => 'ssg-centos8-ds.xml'
99
122
  }
123
+ },
124
+ '9' => {
125
+ 'required_packages' => EL9_PACKAGES,
126
+ 'ssg' => {
127
+ 'profile_target' => 'cs9',
128
+ 'build_target' => 'cs9',
129
+ 'datastream' => 'ssg-cs9-ds.xml'
130
+ }
100
131
  }
101
132
  },
102
133
  'Rocky' => {
@@ -107,6 +138,14 @@ module Simp::BeakerHelpers
107
138
  'build_target' => 'centos8',
108
139
  'datastream' => 'ssg-centos8-ds.xml'
109
140
  }
141
+ },
142
+ '9' => {
143
+ 'required_packages' => EL9_PACKAGES,
144
+ 'ssg' => {
145
+ 'profile_target' => 'cs9',
146
+ 'build_target' => 'cs9',
147
+ 'datastream' => 'ssg-cs9-ds.xml'
148
+ }
110
149
  }
111
150
  },
112
151
  'OracleLinux' => {
@@ -125,6 +164,14 @@ module Simp::BeakerHelpers
125
164
  'build_target' => 'ol8',
126
165
  'datastream' => 'ssg-ol8-ds.xml'
127
166
  }
167
+ },
168
+ '9' => {
169
+ 'required_packages' => EL9_PACKAGES,
170
+ 'ssg' => {
171
+ 'profile_target' => 'ol9',
172
+ 'build_target' => 'ol9',
173
+ 'datastream' => 'ssg-ol9-ds.xml'
174
+ }
128
175
  }
129
176
  }
130
177
  }
@@ -3,5 +3,5 @@
3
3
  module Simp; end
4
4
 
5
5
  module Simp::BeakerHelpers
6
- VERSION = '1.33.0'
6
+ VERSION = '1.34.0'
7
7
  end
@@ -723,8 +723,8 @@ module Simp::BeakerHelpers
723
723
  os_info = fact_on(sut, 'os')
724
724
 
725
725
  # Make sure we have a domain on our host
726
- current_domain = fact_on(sut, 'domain').strip
727
- hostname = fact_on(sut, 'hostname').strip
726
+ current_domain = fact_on(sut, 'networking.domain').strip
727
+ hostname = fact_on(sut, 'networking.hostname').strip
728
728
 
729
729
  if current_domain.empty?
730
730
  new_fqdn = hostname + '.beaker.test'
@@ -744,7 +744,7 @@ module Simp::BeakerHelpers
744
744
  end
745
745
  end
746
746
 
747
- if fact_on(sut, 'domain').strip.empty?
747
+ if fact_on(sut, 'networking.domain').strip.empty?
748
748
  fail("Error: hosts must have an FQDN, got domain='#{current_domain}'")
749
749
  end
750
750
 
@@ -1004,7 +1004,7 @@ module Simp::BeakerHelpers
1004
1004
  suts_network_info = {}
1005
1005
 
1006
1006
  hosts.each do |host|
1007
- fqdn = fact_on(host, 'fqdn').strip
1007
+ fqdn = fact_on(host, 'networking.fqdn').strip
1008
1008
 
1009
1009
  host_entry = { fqdn => [] }
1010
1010
 
@@ -1090,7 +1090,7 @@ module Simp::BeakerHelpers
1090
1090
  # public/fdqn.pub
1091
1091
  # private/fdqn.pem
1092
1092
  def copy_pki_to(sut, local_pki_dir, sut_base_dir = '/etc/pki/simp-testing')
1093
- fqdn = fact_on(sut, 'fqdn')
1093
+ fqdn = fact_on(sut, 'networking.fqdn')
1094
1094
  sut_pki_dir = File.join( sut_base_dir, 'pki' )
1095
1095
  local_host_pki_tree = File.join(local_pki_dir,'pki','keydist',fqdn)
1096
1096
  local_cacert = File.join(local_pki_dir,'pki','demoCA','cacert.pem')
@@ -1,19 +1,10 @@
1
1
  ---
2
2
  HOSTS:
3
- el7:
3
+ el9:
4
4
  roles:
5
- - default
6
- - el7
7
- platform: el-7-x86_64
8
- box: centos/7
9
- hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
10
- family: centos-cloud/centos-7
11
- gce_machine_type: n1-standard-2
12
- el8:
13
- roles:
14
- - el8
15
- platform: el-8-x86_64
16
- box: generic/centos8s
5
+ - el9
6
+ platform: el-9-x86_64
7
+ box: generic/centos9s
17
8
  hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
18
9
  family: centos-cloud/centos-stream-8
19
10
  gce_machine_type: n1-standard-2
@@ -1,20 +1,12 @@
1
1
  ---
2
2
  HOSTS:
3
- el7.test.net:
3
+ el9.test.net:
4
4
  roles:
5
5
  - default
6
- - el7
7
- platform: el-7-x86_64
6
+ - el9
7
+ platform: el-9-x86_64
8
8
  hypervisor: docker
9
- image: simpproject/simp_beaker_el7
10
- docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log"
11
-
12
- el8.test.net:
13
- roles:
14
- - el8
15
- platform: el-8-x86_64
16
- hypervisor: docker
17
- image: simpproject/simp_beaker_el8
9
+ image: quay.io/centos/centos:stream9
18
10
  docker_cmd: "/usr/sbin/sshd -D -E /var/log/sshd.log"
19
11
 
20
12
  CONFIG:
@@ -1,13 +1,5 @@
1
1
  ---
2
2
  HOSTS:
3
- oel7:
4
- roles:
5
- - default
6
- - el7
7
- platform: el-7-x86_64
8
- box: generic/oracle7
9
- hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
10
-
11
3
  oel8:
12
4
  roles:
13
5
  - el8
@@ -15,6 +7,14 @@ HOSTS:
15
7
  box: generic/oracle8
16
8
  hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
17
9
 
10
+ oel9:
11
+ roles:
12
+ - default
13
+ - el9
14
+ platform: el-9-x86_64
15
+ box: generic/oracle9
16
+ hypervisor: "<%= ENV.fetch('BEAKER_HYPERVISOR', 'vagrant') %>"
17
+
18
18
  CONFIG:
19
19
  log_level: verbose
20
20
  type: aio
@@ -2,7 +2,7 @@ require 'spec_helper_acceptance'
2
2
 
3
3
  hosts.each do |host|
4
4
  expect_failures = false
5
- if hosts_with_role(hosts, 'el8').include?(host)
5
+ if hosts_with_role(hosts, 'el9').include?(host)
6
6
  expect_failures = true
7
7
  end
8
8
 
@@ -12,7 +12,15 @@ hosts.each do |host|
12
12
  end
13
13
 
14
14
  context 'default settings' do
15
- before(:all) { install_simp_repos(host) }
15
+ before(:all) do
16
+ install_simp_repos(host)
17
+ rescue => e
18
+ if expect_failures
19
+ warn e.message
20
+ else
21
+ raise e
22
+ end
23
+ end
16
24
 
17
25
  it 'enables the correct repos' do
18
26
  skip "#{host} is not supported yet" if expect_failures
@@ -34,7 +42,15 @@ hosts.each do |host|
34
42
  end
35
43
 
36
44
  context 'when passed a disabled list ' do
37
- before(:all) { install_simp_repos(host, ['simp-community-simp'] ) }
45
+ before(:all) do
46
+ install_simp_repos(host, ['simp-community-simp'] )
47
+ rescue => e
48
+ if expect_failures
49
+ warn e.message
50
+ else
51
+ raise e
52
+ end
53
+ end
38
54
 
39
55
  it 'enables the correct repos' do
40
56
  skip "#{host} is not supported yet" if expect_failures
@@ -14,7 +14,7 @@ describe 'Inspec STIG Profile' do
14
14
  profile_path = File.join(
15
15
  fixtures_path,
16
16
  'inspec_profiles',
17
- "#{fact_on(host, 'operatingsystem')}-#{fact_on(host, 'operatingsystemmajrelease')}-#{profile}"
17
+ "#{fact_on(host, 'os.name')}-#{fact_on(host, 'os.release.major')}-#{profile}"
18
18
  )
19
19
 
20
20
  unless File.exist?(profile_path)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: simp-beaker-helpers
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.33.0
4
+ version: 1.34.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Tessmer
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-06-06 00:00:00.000000000 Z
12
+ date: 2024-09-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: beaker