Use ruby-build for Mastodon, update cookbooks
This uses the ruby_build provider for Mastodon, installing Ruby 2.4.1 currently. It also updates some other cookbooks and the runlists.
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: homebrew
|
||||
# Cookbook:: homebrew
|
||||
# Recipes:: cask
|
||||
#
|
||||
# Copyright 2014-2015, Chef Software, Inc <legal@chef.io>
|
||||
# Copyright:: 2014-2016, Chef Software, Inc <legal@chef.io>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -16,23 +16,11 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
Chef::Resource.send(:include, Homebrew::Mixin)
|
||||
|
||||
homebrew_tap 'caskroom/cask'
|
||||
|
||||
directory '/Library/Caches/Homebrew/Casks' do
|
||||
owner homebrew_owner
|
||||
mode 00775
|
||||
mode '775'
|
||||
only_if { ::Dir.exist?('/Library/Caches/Homebrew') }
|
||||
end
|
||||
|
||||
directory '/opt/homebrew-cask' do
|
||||
owner homebrew_owner
|
||||
mode 00775
|
||||
recursive true
|
||||
end
|
||||
|
||||
directory '/opt/homebrew-cask/Caskroom' do
|
||||
owner homebrew_owner
|
||||
mode 00775
|
||||
end
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
#
|
||||
# Author:: Joshua Timberman (<jtimberman@chef.io>)
|
||||
# Author:: Graeme Mathieson (<mathie@woss.name>)
|
||||
# Cookbook Name:: homebrew
|
||||
# Cookbook:: homebrew
|
||||
# Recipe:: default
|
||||
#
|
||||
# Copyright 2011-2015, Chef Software, Inc.
|
||||
# Copyright:: 2011-2016, Chef Software, Inc.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -19,16 +19,15 @@
|
||||
# limitations under the License.
|
||||
#
|
||||
|
||||
Chef::Resource.send(:include, Homebrew::Mixin)
|
||||
Chef::Recipe.send(:include, Homebrew::Mixin)
|
||||
|
||||
homebrew_go = "#{Chef::Config[:file_cache_path]}/homebrew_go"
|
||||
|
||||
Chef::Log.debug("Homebrew owner is '#{homebrew_owner}'")
|
||||
|
||||
remote_file homebrew_go do
|
||||
source 'https://raw.githubusercontent.com/Homebrew/install/master/install'
|
||||
mode 00755
|
||||
source node['homebrew']['installer']['url']
|
||||
checksum node['homebrew']['installer']['checksum'] unless node['homebrew']['installer']['checksum'].nil?
|
||||
mode '755'
|
||||
not_if { ::File.exist? '/usr/local/bin/brew' }
|
||||
end
|
||||
|
||||
execute 'install homebrew' do
|
||||
@@ -38,6 +37,13 @@ execute 'install homebrew' do
|
||||
not_if { ::File.exist? '/usr/local/bin/brew' }
|
||||
end
|
||||
|
||||
execute 'set analytics' do
|
||||
environment lazy { { 'HOME' => ::Dir.home(homebrew_owner), 'USER' => homebrew_owner } }
|
||||
user homebrew_owner
|
||||
command "/usr/local/bin/brew analytics #{node['homebrew']['enable-analytics'] ? 'on' : 'off'}"
|
||||
only_if { shell_out('/usr/local/bin/brew analytics state', user: homebrew_owner).stdout.include?('enabled') != node['homebrew']['enable-analytics'] }
|
||||
end
|
||||
|
||||
if node['homebrew']['auto-update']
|
||||
package 'git' do
|
||||
not_if 'which git'
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: homebrew
|
||||
# Cookbook:: homebrew
|
||||
# Recipe:: install_casks
|
||||
#
|
||||
# Copyright 2014-2015, Chef Software, Inc <legal@chef.io>
|
||||
# Copyright:: 2014-2016, Chef Software, Inc <legal@chef.io>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: homebrew
|
||||
# Cookbook:: homebrew
|
||||
# Recipes:: install_casks
|
||||
#
|
||||
# Copyright 2014-2015, Chef Software, Inc <legal@chef.io>
|
||||
# Copyright:: 2014-2016, Chef Software, Inc <legal@chef.io>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
@@ -21,8 +21,10 @@ include_recipe 'homebrew'
|
||||
|
||||
node['homebrew']['formulas'].each do |formula|
|
||||
if formula.class == Chef::Node::ImmutableMash
|
||||
formula_options = formula.fetch(:options, '')
|
||||
formula_options += ' --HEAD' if formula.fetch(:head, false)
|
||||
package formula.fetch(:name) do
|
||||
options '--HEAD' if formula.fetch(:head, false)
|
||||
options formula_options.strip
|
||||
version formula['version'] if formula.fetch(:version, false)
|
||||
end
|
||||
else
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#
|
||||
# Cookbook Name:: homebrew
|
||||
# Cookbook:: homebrew
|
||||
# Recipes:: install_taps
|
||||
#
|
||||
# Copyright 2015, Chef Software, Inc <legal@chef.io>
|
||||
# Copyright:: 2015-2016, Chef Software, Inc <legal@chef.io>
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
Reference in New Issue
Block a user