From 4d04e48cebff9a32525cb1111fbd41b2b06526d5 Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Fri, 10 May 2024 16:44:47 +0200 Subject: [PATCH] Drop Fedora < 22 support Those are long EOL and this makes sure the right commands on Fedora 40 are used. --- .../module/spec/acceptance/nodesets/fedora-18-x64.yml | 10 ---------- ...pl-puppetserver-latest-repos-pe-fedora-20-i386.repo | 6 ------ ...-puppetserver-latest-repos-pe-fedora-20-x86_64.repo | 6 ------ ...pl-puppetserver-latest-repos-pe-fedora-21-i386.repo | 6 ------ ...-puppetserver-latest-repos-pe-fedora-21-x86_64.repo | 6 ------ ...pl-puppetserver-latest-repos-pe-fedora-22-i386.repo | 6 ------ ...-puppetserver-latest-repos-pe-fedora-22-x86_64.repo | 6 ------ ...pl-puppetserver-latest-repos-pe-fedora-23-i386.repo | 6 ------ ...-puppetserver-latest-repos-pe-fedora-23-x86_64.repo | 6 ------ ...-puppetserver-latest-repos-pe-fedora-24-x86_64.repo | 6 ------ lib/beaker/host/unix/exec.rb | 4 ++-- lib/beaker/host/unix/pkg.rb | 2 +- lib/beaker/host_prebuilt_steps.rb | 4 ++-- spec/helpers.rb | 9 +++------ 14 files changed, 8 insertions(+), 75 deletions(-) delete mode 100644 acceptance/fixtures/module/spec/acceptance/nodesets/fedora-18-x64.yml delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-i386.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-x86_64.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-i386.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-x86_64.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-i386.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-x86_64.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-i386.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-x86_64.repo delete mode 100644 acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-24-x86_64.repo diff --git a/acceptance/fixtures/module/spec/acceptance/nodesets/fedora-18-x64.yml b/acceptance/fixtures/module/spec/acceptance/nodesets/fedora-18-x64.yml deleted file mode 100644 index 1361649830..0000000000 --- a/acceptance/fixtures/module/spec/acceptance/nodesets/fedora-18-x64.yml +++ /dev/null @@ -1,10 +0,0 @@ -HOSTS: - fedora-18-x64: - roles: - - master - platform: fedora-18-x86_64 - box : fedora-18-x64-vbox4210-nocm - box_url : http://puppet-vagrant-boxes.puppetlabs.com/fedora-18-x64-vbox4210-nocm.box - hypervisor : vagrant -CONFIG: - type: foss diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-i386.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-i386.repo deleted file mode 100644 index a8867a63df..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-i386.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f20/PC1/i386/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-x86_64.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-x86_64.repo deleted file mode 100644 index 34b5c9af07..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-20-x86_64.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f20/PC1/x86_64/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-i386.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-i386.repo deleted file mode 100644 index 38117991fc..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-i386.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f21/PC1/i386/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-x86_64.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-x86_64.repo deleted file mode 100644 index b84e948547..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-21-x86_64.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f21/PC1/x86_64/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-i386.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-i386.repo deleted file mode 100644 index 1dc797fe53..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-i386.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f22/PC1/i386/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-x86_64.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-x86_64.repo deleted file mode 100644 index 4cbb7288a5..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-22-x86_64.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f22/PC1/x86_64/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-i386.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-i386.repo deleted file mode 100644 index bb0e3d40a8..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-i386.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f23/PC1/i386/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-x86_64.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-x86_64.repo deleted file mode 100644 index aff46b1632..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-23-x86_64.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f23/PC1/x86_64/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-24-x86_64.repo b/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-24-x86_64.repo deleted file mode 100644 index 42af3fdd8e..0000000000 --- a/acceptance/fixtures/package/rpm/pl-puppetserver-latest-repos-pe-fedora-24-x86_64.repo +++ /dev/null @@ -1,6 +0,0 @@ -[pl-puppetserver-latest] -name=PL Repo for puppetserver at commit latest -baseurl=http://nightlies.puppetlabs.com/puppetserver-latest/repos/fedora/f24/PC1/x86_64/ -enabled=1 -gpgcheck=1 -gpgkey=http://nightlies.puppetlabs.com/07BB6C57 diff --git a/lib/beaker/host/unix/exec.rb b/lib/beaker/host/unix/exec.rb index 0b40353a40..eea62c63d2 100644 --- a/lib/beaker/host/unix/exec.rb +++ b/lib/beaker/host/unix/exec.rb @@ -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")) diff --git a/lib/beaker/host/unix/pkg.rb b/lib/beaker/host/unix/pkg.rb index 9455b6176c..227cb84b8e 100644 --- a/lib/beaker/host/unix/pkg.rb +++ b/lib/beaker/host/unix/pkg.rb @@ -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) diff --git a/lib/beaker/host_prebuilt_steps.rb b/lib/beaker/host_prebuilt_steps.rb index cb4f736557..72e7e4175c 100644 --- a/lib/beaker/host_prebuilt_steps.rb +++ b/lib/beaker/host_prebuilt_steps.rb @@ -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")) diff --git a/spec/helpers.rb b/spec/helpers.rb index 2a846bbdf5..2507698faa 100644 --- a/spec/helpers.rb +++ b/spec/helpers.rb @@ -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 @@ -134,9 +133,7 @@ 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', @@ -144,5 +141,5 @@ module PlatformHelpers 'redhat', 'oracle', 'scientific', - 'eos',].concat(FEDORASYSTEMV) + 'eos',] end