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1.6.6
- 1.6.4
- 1.6.2
- 1.6.0
- 1.5.4
- 1.5.2
- 1.5.0
- 1.4.0
- 1.3.2
- 1.3.0
- 1.2.0
- 1.0.0
Install Homebrew and includes resources for working with taps and casks
cookbook 'homebrew', '= 1.10.0', :supermarket
knife supermarket install homebrew
knife supermarket download homebrew
Homebrew Cookbook
This cookbook installs Homebrew and replaces MacPorts as the default package provider for the package resource on OS X systems.
This cookbook is now maintained by Opscode. The original author, maintainer and copyright holder is Graeme Mathieson. The cookbook remains licensed under the Apache License version 2.
Requirements
Prerequisites
In order for this recipe to work, your userid must own /usr/local
. This is outside the scope of the cookbook because it's anticipated that you'll run the cookbook as your own user, not root and you'd have to be root to take ownership of the directory. Easiest way to get started:
sudo chown -R `whoami`:staff /usr/local
Bear in mind that this will take ownership of the entire folder and its contents, so if you've already got stuff in there (eg MySQL owned by a mysql
user) you'll need to be a touch more careful. This is a recommendation from Homebrew.
Platform
- Mac OS X (10.6+)
The only platform supported by Homebrew itself at the time of this writing is Mac OS X. It should work fine on Server edition as well, and on platforms that Homebrew supports in the future.
Attributes
-
node['homebrew']['owner']
- The user that will own the Homebrew installation and packages. Setting this will override the default behavior which is to use the non-privileged user that has invoked the Chef run (or theSUDO_USER
if invoked with sudo). The default isnil
. -
node['homebrew']['auto-update']
- Whether the default recipe should automatically update homebrew each run or not. The default istrue
to maintain compatibility. Set to false or nil to disable. Note that disabling this feature may cause formula to not work. -
node['homebrew']['formulas']
- An Array of formula that should be installed using homebrew by default, used only in thehomebrew::install_formulas
recipe. -
node['homebrew']['casks']
- An Array of casks that should be installed using brew cask by default, used only in thehomebrew::install_casks
recipe.
Resources and Providers
package / homebrew_package
This cookbook provides a package provider called homebrew_package
which will install/remove packages using Homebrew. This becomes the default provider for package
if your platform is Mac OS X.
As this extends the built-in package resource/provider in Chef, it has all the resource attributes and actions available to the package resource. However, a couple notes:
- Homebrew itself doesn't have a notion of "upgrade" per se. The "upgrade" action will simply perform an install, and if the Homebrew Formula for the package is newer, it will upgrade.
- Likewise, Homebrew doesn't have a purge, but the "purge" action will act like "remove".
Examples
package 'mysql' do action :install end homebrew_package 'mysql' package 'mysql' do provider Chef::Provider::Package::Homebrew end package 'wireshark' do options '--with-qt --devel' end
homebrew_tap
LWRP for brew tap
, a Homebrew command used to add additional formula repositories. From the brew
man page:
tap [tap] Tap a new formula repository from GitHub, or list existing taps. tap is of the form user/repo, e.g. brew tap homebrew/dupes.
Default action is :tap
which enables the repository. Use :untap
to disable a tapped repository.
Examples
homebrew_tap 'homebrew/dupes' homebrew_tap 'homebrew/dupes' do action :untap end
homebrew_cask
LWRP for brew cask
, a Homebrew-style CLI workflow for the administration
of Mac applications distributed as binaries. It's implemented as a homebrew
"external command" called cask.
Prerequisites
You must have the homebrew-cask repository tapped.
homebrew_tap 'caskroom/cask'
And then install the homebrew cask package before using this LWRP.
package "brew-cask" do
action :install
end
You can include the homebrew::cask
recipe to do this.
Examples
homebrew_cask "google-chrome"
homebrew_cask "google-chrome" do
action :uncask
end
Default action is :cask
which installs the Application binary . Use :uncask
to
uninstall a an Application.
View the list of available Casks
Usage
We strongly recommend that you put "recipe[homebrew]" in your node's run list, to ensure that it is available on the system and that Homebrew itself gets installed. Putting an explicit dependency in the metadata will cause the cookbook to be downloaded and the library loaded, thus resulting in changing the package provider on Mac OS X, so if you have systems you want to use the default (Mac Ports), they would be changed to Homebrew.
The default itself ensures that Homebrew is installed and up to date.
License and Authors
- Author:: Graeme Mathieson (mathie@woss.name)
- Author:: Joshua Timberman (joshua@opscode.com)
Copyright:: 2011, Graeme Mathieson Copyright:: 2012, Opscode, Inc <legal@opscode.com> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Dependent cookbooks
This cookbook has no specified dependencies.
Contingent cookbooks
homebrew Cookbook CHANGELOG
This file is used to list changes made in each version of the homebrew cookbook.
v1.10.0 (2014-12-09)
- #55 This cookbook no longer sets its
homebrew_package
as thepackage
provider for OS X when running under Chef 12 - List CHEF as the maintainer instead of Opscode.
v1.9.2 (2014-10-09)
Bug Fixes:
- #57 Update url per homebrew error: Upstream, the homebrew project has changed the URL for the installation script. All users of this cookbook are advised to update to this version.
v1.9.0 (2014-07-29)
Improvements:
- #35 Modernize the cask provider (use why run mode, inline resources)
- #43 Use
brew cask list
to determine if casks are installed - #45 Add
default_action
and print warning messages on earlier versions of Chef (10.10)
New Features:
- #44 Add
:install
and:uninstall
actions and alias previous:cask
,:uncask
actions to them
Bug Fixes:
- #27 Fix name for taps adding the
/homebrew
prefix - #28 Set
RUBYOPT
tonil
so Chef can execute in a bundle (bundler setsRUBYOPT
and this can cause issues when running the underlyingbrew
commands) - #40 Fix regex for cask to match current homebrew conventions
- #42 Fix attribute for list of formulas to match the README and maintain backward compat for 6 day old version
v1.8.0 (2014-07-23)
- Add recipes to install an array of formulas/casks
v1.7.2 (2014-06-26)
- Implement attribute to control auto-update
v1.7.0 (2014-06-26)
38 - Add homebrew::cask recipe
v1.6.6 (2014-05-29)
- [COOK-3283] Use homebrew_owner for cask and tap
- [COOK-4670] homebrew_tap provider is not idempotent
- [COOK-4671] Syntax Error in README
v1.6.4 (2014-05-08)
- Fixing cask provider correctly this time. "brew cask list"
v1.6.2 (2014-05-08)
- Fixing typo in cask provider: 's/brew brew/brew/'
v1.6.0 (2014-04-23)
- [COOK-3960] Added LWRP for brew cask
- [COOK-4508] Add ChefSpec matchers for homebrew_tap
- [COOK-4566] Guard against "HEAD only" formulae
v1.5.4
- [COOK-4023] Fix installer script's URL.
- Fixing up style for rubocop
v1.5.2
- [COOK-3825] setting $HOME on homebrew_package
v1.5.0
Bug
- COOK-3589 - Add homebrew as the default package manager on OS X Server
v1.4.0
Bug
- COOK-3283 - Support running homebrew cookbook as root user, with sudo, or a non-privileged user
v1.3.2
- [COOK-1793] - use homebrew "go" script to install homebrew
- [COOK-1821] - Discovered version using Homebrew Formula factory fails check that verifies that version is a String
- [COOK-1843] - Homebrew README.md contains non-ASCII characters, triggering same issue as COOK-522
v1.3.0
- [COOK-1425] - use new json output format for formula
- [COOK-1578] - Use shell_out! instead of popen4
v1.2.0
Opscode has taken maintenance of this cookbook as the original author has other commitments. This is the initial release with Opscode as maintainer.
Changes in this release:
- [pull/2] - support for option passing to brew
- [pull/3] - add brew upgrade and control return value from command
- [pull/9] - added LWRP for "brew tap"
- README is now markdown, not rdoc.
Foodcritic Metric
1.10.0 failed this metric
FC017: LWRP does not notify when updated: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/tap.rb:36
FC017: LWRP does not notify when updated: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/tap.rb:46
FC023: Prefer conditional attributes: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/cask.rb:18
FC023: Prefer conditional attributes: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/cask.rb:27
1.10.0 failed this metric
FC017: LWRP does not notify when updated: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/tap.rb:46
FC023: Prefer conditional attributes: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/cask.rb:18
FC023: Prefer conditional attributes: /tmp/cook/d7a6fdb82bb2fb6c334d8ef9/homebrew/providers/cask.rb:27