Skip to content

Commit

Permalink
Drop Fedora < 22 support
Browse files Browse the repository at this point in the history
Those are long EOL and this makes sure the right commands on Fedora 40
are used.
  • Loading branch information
ekohl committed May 10, 2024
1 parent 8603333 commit 4d04e48
Show file tree
Hide file tree
Showing 14 changed files with 8 additions and 75 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

4 changes: 2 additions & 2 deletions lib/beaker/host/unix/exec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ def ssh_service_restart
case self['platform']
when /debian|ubuntu/
exec(Beaker::Command.new("service ssh restart"))
when /amazon|(el|centos|redhat|oracle|scientific)-[7-9]|eos-7|fedora-(1[4-9]|2[0-9]|3[0-9])|archlinux-/
when /amazon|(el|centos|redhat|oracle|scientific)-[7-9]|eos-7|fedora|archlinux-/
exec(Beaker::Command.new("systemctl restart sshd.service"))
when /el-|centos|fedora|redhat|oracle|scientific|eos/
when /el-|centos|redhat|oracle|scientific|eos/
exec(Beaker::Command.new("/sbin/service sshd restart"))
when /opensuse|sles/
exec(Beaker::Command.new("/usr/sbin/rcsshd restart"))
Expand Down
2 changes: 1 addition & 1 deletion lib/beaker/host/unix/pkg.rb
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def upgrade_package(name, cmdline_args = '', opts = {})
case self['platform']
when /opensuse|sles-/
execute("zypper --non-interactive --no-gpg-checks up #{name}", opts)
when /fedora-(2[2-9]|3[0-9])/
when /fedora/
execute("dnf -y #{cmdline_args} update #{name}", opts)
when /cisco|fedora|centos|redhat|eos|el-/
execute("yum -y #{cmdline_args} update #{name}", opts)
Expand Down
4 changes: 2 additions & 2 deletions lib/beaker/host_prebuilt_steps.rb
Original file line number Diff line number Diff line change
Expand Up @@ -382,9 +382,9 @@ def enable_root_login host, opts
# restart sshd
if /debian|ubuntu/.match?(host['platform'])
host.exec(Command.new("sudo su -c \"service ssh restart\""), { :pty => true })
elsif /amazon|arch|(centos|el|redhat)-[789]|fedora-(1[4-9]|2[0-9]|3[0-9])/.match?(host['platform'])
elsif /amazon|arch|(centos|el|redhat)-[789]|fedora/.match?(host['platform'])
host.exec(Command.new("sudo -E systemctl restart sshd.service"), { :pty => true })
elsif /centos|el-|redhat|fedora|eos/.match?(host['platform'])
elsif /centos|el-|redhat|eos/.match?(host['platform'])
host.exec(Command.new("sudo -E /sbin/service sshd reload"), { :pty => true })
elsif /(free|open)bsd/.match?(host['platform'])
host.exec(Command.new("sudo /etc/rc.d/sshd restart"))
Expand Down
9 changes: 3 additions & 6 deletions spec/helpers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -122,9 +122,8 @@ def make_instance instance_data = {}
module PlatformHelpers
DEBIANPLATFORMS = %w[debian ubuntu]

FEDORASYSTEMD = (14..39).to_a.collect! { |i| "fedora-#{i}" }

SYSTEMDPLATFORMS = %w[amazon-2023
fedora
el-7
centos-7
redhat-7
Expand All @@ -134,15 +133,13 @@ module PlatformHelpers
el-8
centos-8
redhat-8
oracle-8].concat(FEDORASYSTEMD)

FEDORASYSTEMV = (1..13).to_a.collect! { |i| "fedora-#{i}" }
oracle-8]

SYSTEMVPLATFORMS = ['el-',
'centos',
'fedora',
'redhat',
'oracle',
'scientific',
'eos',].concat(FEDORASYSTEMV)
'eos',]
end

0 comments on commit 4d04e48

Please sign in to comment.