Switch back to the upstream nginx cookbook

chef_nginx is deprecated
This commit is contained in:
Greg Karékinian
2019-03-14 10:35:11 +01:00
parent e20ad9e6f9
commit fc265014de
122 changed files with 565 additions and 617 deletions

View File

@@ -26,7 +26,7 @@
property :source, String, name_property: true
property :checksum, String
property :download_dir, String, default: Chef::Config[:file_cache_path]
property :group, String, default: 'root'
property :group, String, default: node['root_group']
property :mode, String, default: '0755'
property :target_dir, String
property :creates, String
@@ -54,7 +54,7 @@ action :extract do
end
remote_file basename do
source r.name
source r.source
checksum r.checksum
path local_archive
backup false
@@ -80,6 +80,7 @@ end
action_class do
def extract_tar(local_archive, r)
directory r.target_dir
execute "extract #{local_archive}" do
flags = if r.tar_flags.is_a?(String)
r.tar_flags

View File

@@ -39,6 +39,10 @@ action :install do
dirname = basename.chomp('.tar.gz') # Assuming .tar.gz
src_dir = r.source_directory
directory src_dir do
recursive true
end
remote_file basename do
source r.name
path "#{src_dir}/#{basename}"
@@ -60,7 +64,7 @@ action :install do
execute "compile & install #{dirname}" do
flags = [r.prefix ? "--prefix=#{r.prefix}" : nil, *r.configure_flags].compact.join(' ')
command "./configure --quiet #{flags} && make --quiet && make --quiet install"
command "./configure --quiet #{flags} && make -s && make -s install"
cwd "#{src_dir}/#{dirname}"
creates r.creates
end