summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-01-23 11:56:05 -0800
committerTim Smith <tsmith@chef.io>2019-01-23 11:56:05 -0800
commit15c557782e71894d7ef2da2b513da4ec3f2c7583 (patch)
tree57e7cee3c32bb573ad3e8578bab5aff3d18a3619
parent2d9aaaa000e3973435e715d5ff45309a0674b50d (diff)
downloadchef-remove_old_opensuse.tar.gz
Remove support for unsupported opensuse < 42 from group providerremove_old_opensuse
We had a few places where we checked for legacy opensuse platforms. Chef 15 doesn't support this platform and you won't be able to find binaries via omnitruck. We might as well yank out a bit of provider logic. Also for some reason usermod has logic in a method for suse, but the provider didn't support that. Signed-off-by: Tim Smith <tsmith@chef.io>
-rw-r--r--kitchen-tests/cookbooks/end_to_end/metadata.rb2
-rw-r--r--lib/chef/provider/group/groupadd.rb2
-rw-r--r--lib/chef/provider/group/suse.rb3
-rw-r--r--lib/chef/provider/group/usermod.rb5
-rw-r--r--spec/unit/provider/group/usermod_spec.rb2
5 files changed, 5 insertions, 9 deletions
diff --git a/kitchen-tests/cookbooks/end_to_end/metadata.rb b/kitchen-tests/cookbooks/end_to_end/metadata.rb
index 83cea5c9a8..9394d16408 100644
--- a/kitchen-tests/cookbooks/end_to_end/metadata.rb
+++ b/kitchen-tests/cookbooks/end_to_end/metadata.rb
@@ -20,7 +20,7 @@ depends "git"
supports "ubuntu"
supports "debian"
supports "centos"
-supports "opensuse"
+supports "opensuseleap"
supports "fedora"
supports "amazon"
diff --git a/lib/chef/provider/group/groupadd.rb b/lib/chef/provider/group/groupadd.rb
index fb8f306034..dd99a1c49a 100644
--- a/lib/chef/provider/group/groupadd.rb
+++ b/lib/chef/provider/group/groupadd.rb
@@ -1,6 +1,6 @@
#
# Author:: AJ Christensen (<aj@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
diff --git a/lib/chef/provider/group/suse.rb b/lib/chef/provider/group/suse.rb
index 7e8473c901..3f4300278f 100644
--- a/lib/chef/provider/group/suse.rb
+++ b/lib/chef/provider/group/suse.rb
@@ -1,6 +1,6 @@
#
# Author:: AJ Christensen (<aj@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -23,7 +23,6 @@ class Chef
class Provider
class Group
class Suse < Chef::Provider::Group::Groupadd
- provides :group, platform: "opensuse", platform_version: "< 12.3"
provides :group, platform: "suse", platform_version: "< 12.0"
def load_current_resource
diff --git a/lib/chef/provider/group/usermod.rb b/lib/chef/provider/group/usermod.rb
index 6b040b7190..e8daf9676b 100644
--- a/lib/chef/provider/group/usermod.rb
+++ b/lib/chef/provider/group/usermod.rb
@@ -1,6 +1,6 @@
#
# Author:: AJ Christensen (<aj@chef.io>)
-# Copyright:: Copyright 2008-2016, Chef Software Inc.
+# Copyright:: Copyright 2008-2019, Chef Software Inc.
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -24,7 +24,6 @@ class Chef
class Usermod < Chef::Provider::Group::Groupadd
provides :group, os: %w{openbsd solaris2 hpux}
- provides :group, platform: "opensuse"
def load_current_resource
super
@@ -79,7 +78,7 @@ class Chef
case node[:platform]
when "openbsd", "netbsd", "aix", "solaris2", "smartos", "omnios"
"-G"
- when "solaris", "suse", "opensuse"
+ when "solaris"
[ "-a", "-G" ]
end
end
diff --git a/spec/unit/provider/group/usermod_spec.rb b/spec/unit/provider/group/usermod_spec.rb
index e34949f839..3fca15ea8d 100644
--- a/spec/unit/provider/group/usermod_spec.rb
+++ b/spec/unit/provider/group/usermod_spec.rb
@@ -49,8 +49,6 @@ describe Chef::Provider::Group::Usermod do
"openbsd" => [ "-G" ],
"netbsd" => [ "-G" ],
"solaris" => [ "-a", "-G" ],
- "suse" => [ "-a", "-G" ],
- "opensuse" => [ "-a", "-G" ],
"smartos" => [ "-G" ],
"omnios" => [ "-G" ],
}