From 6e37167db1faa7aca03a78e9c7f8e2d6f79ee55d Mon Sep 17 00:00:00 2001 From: Artem Sidorenko Date: Fri, 21 Oct 2016 10:06:25 +0200 Subject: [PATCH] Remove dependenies to apt and yum cookbooks. The following resources are now completely provided by chef: - yum_repository - yum_package - apt_repository - apt_package Currently you get warnings: WARN: Chef::Provider::AptRepository already exists! Cannot create deprecation class for LWRP provider apt_repository from cookbook apt WARN: AptRepository already exists! Deprecation class overwrites Custom resource apt_repository from cookbook apt WARN: Chef::Provider::YumRepository already exists! Cannot create deprecation class for LWRP provider yum_repository from cookbook yum WARN: YumRepository already exists! Deprecation class overwrites Custom resource yum_repository from cookbook yum Starting from the version v12.14.89 the behaviour of yum_repository seems to be the same like in the cookbook before. Using this version as the requirement. --- .kitchen.yml | 2 +- README.md | 4 +--- metadata.rb | 2 -- recipes/apt.rb | 2 -- recipes/yum.rb | 2 -- 5 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.kitchen.yml b/.kitchen.yml index 6cbdd10f..e2e52156 100644 --- a/.kitchen.yml +++ b/.kitchen.yml @@ -1,7 +1,7 @@ --- driver: name: dokken - chef_version: 12.5.1 + chef_version: 12.14.89 privileged: true # because Docker and SystemD/Upstart transport: diff --git a/README.md b/README.md index ba8d8f95..d3d54fc4 100644 --- a/README.md +++ b/README.md @@ -29,11 +29,9 @@ It will not: ## Requirements -* Chef +* Chef >= 12.14.89 * Cookbooks: * Sander van Zoest sysctl `https://github.com/svanzoest-cookbooks/sysctl` - * Chef apt `https://github.com/chef-cookbooks/apt` - * Chef yum `https://github.com/chef-cookbooks/yum` **Note for `sysctl` usage:** diff --git a/metadata.rb b/metadata.rb index bd53ae57..00421816 100644 --- a/metadata.rb +++ b/metadata.rb @@ -30,8 +30,6 @@ supports 'oracle', '>= 6.4' depends 'sysctl', '<= 0.7.5' -depends 'apt', '~> 3.0.0' -depends 'yum' recipe 'os-hardening::default', 'harden the operating system (all recipes)' recipe 'os-hardening::limits', 'prevent core dumps' diff --git a/recipes/apt.rb b/recipes/apt.rb index f6935232..f5efb5de 100644 --- a/recipes/apt.rb +++ b/recipes/apt.rb @@ -18,8 +18,6 @@ # limitations under the License. # -include_recipe 'apt' - # apt-get and aptitude check package signatures by default. # TODO: could check apt.conf to make sure this hasn't been disabled. diff --git a/recipes/yum.rb b/recipes/yum.rb index 5dce8b6c..242a6997 100644 --- a/recipes/yum.rb +++ b/recipes/yum.rb @@ -18,8 +18,6 @@ # limitations under the License. # -include_recipe 'yum' - # NSA chapter: NSA 2.1.2.3.3 # verify package signatures # search /etc/yum.conf gpgcheck=1