Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

Select Status

RSS

homebrew (64) Versions 5.0.8

Install Homebrew and includes resources for working with taps and casks

Policyfile
Berkshelf
Knife
cookbook 'homebrew', '= 5.0.8', :supermarket
cookbook 'homebrew', '= 5.0.8'
knife supermarket install homebrew
knife supermarket download homebrew
README
Dependencies
Changelog
Quality 100%

Homebrew Cookbook

Build Status Cookbook Version

This cookbook installs Homebrew and provides resources for working with taps and casks

Note: The homebrew_tap and homebrew_cask resources shipped in Chef 14.0. When Chef 15.0 is released in April 2019 these resources will be removed from this cookbook as all users should be on 14.0 or later.

Requirements

Platforms

  • macOS

Chef

  • Chef 12.7+

Cookbooks

  • none

Resources

homebrew_tap

Resource for brew tap, a Homebrew command used to add additional formula repositories. From the brew man page:

brew tap [--full] user/repo [URL]
    Tap a formula repository.

    With URL unspecified, taps a formula repository from GitHub using HTTPS.
    Since so many taps are hosted on GitHub, this command is a shortcut for
    tap user/repo https://github.com/user/homebrew-repo.

    With URL specified, taps a formula repository from anywhere, using
    any transport protocol that git handles. The one-argument form of tap
    simplifies but also limits. This two-argument command makes no
    assumptions, so taps can be cloned from places other than GitHub and
    using protocols other than HTTPS, e.g., SSH, GIT, HTTP, FTP(S), RSYNC.

    By default, the repository is cloned as a shallow copy (--depth=1), but
    if --full is passed, a full clone will be used. To convert a shallow copy
    to a full copy, you can retap passing --full without first untapping.

Default action is :tap which enables the repository. Use :untap to disable a tapped repository.

Actions

  • :tap (default) - Add a tap
  • :untap - Remove a tap

Properties

  • :tap_name - Optional name property to override the resource name value
  • :url - Optional URL to the tap
  • :full - Perform a full clone rather than a shallow clone on the tap (default: false)
  • :homebrew_path - the path to the homebrew binary (default: '/usr/local/bin/brew')
  • :owner - the owner of the homebrew installation (default: calculated based on existing files)

Examples

homebrew_tap 'homebrew/dupes'

homebrew_tap 'homebrew/dupes' do
  action :untap
end

homebrew_tap "Let's install homebrew/dupes" do
  tap_name 'homebrew/dupes'
  url 'https://github.com/homebrew/homebrew-dupes.git'
  full true
end

homebrew_cask

Resource 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.

homebrew-cask on GitHub

Actions

  • :install (default) - install an Application
  • :remove - remove an Application.

Properties

  • :cask_name - Optional name property to override the resource name value
  • :options - options to pass to the brew CLI during installation
  • :install_cask - auto install cask tap if necessary (default: true)
  • :homebrew_path - the path to the homebrew binary (default: '/usr/local/bin/brew')
  • :owner - the owner of the homebrew installation (default: calculated based on existing files)

Examples

homebrew_cask 'google-chrome'

homebrew_cask "Let's remove google-chrome" do
  cask_name 'google-chrome'
  install_cask false
  action :remove
end

View the list of available Casks

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 the SUDO_USER if invoked with sudo). The default is nil.
  • node['homebrew']['auto-update'] - Whether the default recipe should automatically update Homebrew each run or not. The default is true 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 the homebrew::install_formulas recipe.

    • To install the most recent version, include just the recipe name: - simple_formula
    • To install a specific version, specify both its name and version:
    - name: special-version-formula
      version: 1.2.3
    
    • To install the HEAD of a formula, specify both its name and head: true:
    - name: head-tracking-formula
      head: true
    
    • To provide other options, specify both its name and options
    - name: formula-with-options
      options: --with-option-1 --with-other-option
    
  • node['homebrew']['casks'] - An Array of casks that should be installed using brew cask by default, used only in the homebrew::install_casks recipe.

  • node['homebrew']['taps'] - An Array of taps that should be installed using brew tap by default, used only in the homebrew::install_taps recipe. For example:<br>

  [
    'homebrew/science',
    # 'tap' is the only required key for the Hash
    { 'tap' => 'homebrew/dupes', 'url' => 'https://github.com', 'full' => true }
  ]

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 recipe also ensures that Homebrew is installed and up to date if the auto update attribute (above) is true (default).

License and Authors

This cookbook is maintained by CHEF. The original author, maintainer and copyright holder is Graeme Mathieson. The cookbook remains licensed under the Apache License version 2.

Original blog post by Graeme

Author:: Graeme Mathieson (mathie@woss.name)

Author:: Joshua Timberman (joshua@chef.io)

Copyright:: 2011, Graeme Mathieson
Copyright:: 2012-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.
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

atom Applicable Versions
azure_pipelines_agent_macos Applicable Versions
bacula-backup Applicable Versions
bazel Applicable Versions
chefdk_bootstrap Applicable Versions
docker Applicable Versions
expect Applicable Versions
filebeat Applicable Versions
foreflight_build_agent Applicable Versions
git Applicable Versions
gnu_parallel Applicable Versions
hekad Applicable Versions
homebrew_packages Applicable Versions
iterm2 Applicable Versions
java Applicable Versions
java-snapshot Applicable Versions
languages Applicable Versions
mac-app-store Applicable Versions
macbase Applicable Versions
macos Applicable Versions
mysql Applicable Versions
nodejs Applicable Versions
omnibus Applicable Versions
omnibus 1.0.0
omnibus 1.0.2
omnibus 1.0.4
omnibus 1.0.6
omnibus 1.0.8
omnibus 1.0.10
omnibus 1.1.0
omnibus 1.2.0
omnibus 1.2.2
omnibus 1.2.4
omnibus 2.0.0
omnibus 2.0.2
omnibus 2.1.0
omnibus 2.1.2
omnibus 2.2.0
omnibus 2.3.0
omnibus 2.3.2
omnibus 2.3.4
omnibus 2.4.0
omnibus 2.4.2
omnibus 2.4.4
omnibus 2.4.6
omnibus 2.4.8
omnibus 2.4.10
omnibus 2.4.12
omnibus 2.4.14
omnibus 2.4.16
omnibus 2.4.18
omnibus 2.5.0
omnibus 2.5.1
omnibus 2.5.2
omnibus 2.5.3
omnibus 2.5.4
omnibus 2.5.5
omnibus 2.6.0
omnibus 2.6.1
omnibus 2.6.2
omnibus 2.6.3
omnibus 2.6.4
omnibus 2.6.5
omnibus 2.6.6
omnibus 2.6.7
omnibus 2.6.8
omnibus 2.6.9
omnibus 2.6.10
omnibus 2.6.11
omnibus 2.6.12
omnibus 2.6.13
omnibus 2.7.0
omnibus 2.7.1
omnibus 2.7.2
omnibus 2.7.4
omnibus 2.7.5
omnibus 2.7.6
omnibus 2.7.7
omnibus 3.0.0
omnibus 3.1.0
omnibus 3.1.1
omnibus 3.1.2
omnibus 3.1.3
omnibus 3.1.4
omnibus 3.2.0
omnibus 3.2.1
omnibus 3.2.2
omnibus 3.2.3
omnibus 3.2.4
omnibus 3.2.5
omnibus 3.2.6
omnibus 3.2.7
omnibus 3.3.0
omnibus 4.0.0
omnibus 4.0.1
omnibus 4.0.2
omnibus 4.1.0
omnibus 4.2.0
omnibus 4.2.1
omnibus 4.2.2
omnibus 4.2.3
omnibus 4.2.4
omnibus 4.2.5
omnibus 4.2.6
omnibus 4.2.7
omnibus 4.2.8
omnibus 4.2.9
omnibus 5.0.0
omnibus 5.0.1
omnibus 5.1.0
omnibus 5.1.1
omnibus 5.1.2
omnibus 5.1.3
omnibus 5.1.4
omnibus 5.1.5
omnibus 5.1.6
omnibus 5.1.7
omnibus 5.2.0
omnibus 5.2.1
omnibus 5.2.2
omnibus 5.3.0
omnibus 5.3.1
omnibus 5.3.2
omnibus 5.3.3
omnibus 5.4.0
omnibus 5.5.0
omnibus 5.6.0
omnibus 5.6.1
omnibus 5.7.0
omnibus 5.7.1
omnibus 5.7.2
omnibus 6.0.0
osquery Applicable Versions
pandoc Applicable Versions
pantry Applicable Versions
reattach-to-user-namespace Applicable Versions
ruby_build Applicable Versions
sanitize Applicable Versions
telegraf Applicable Versions
ut_base Applicable Versions
ut_workstation Applicable Versions
vs_code Applicable Versions
vsts_agent Applicable Versions
vsts_agent_macos Applicable Versions

homebrew Cookbook CHANGELOG

This file is used to list changes made in each version of the homebrew cookbook.

5.0.8 (2018-10-04)

  • Updates homebrew cask tap to homebrew/cask
  • Updates URLs to the homebrew cask repository

5.0.7 (2018-09-26)

  • Fix cask resource running each chef-client run

5.0.6 (2018-09-26)

  • Avoid CHEF-25 Deprecation warnings by making the tap/cask resources no-ops on modern chef-client releases

5.0.5 (2018-09-04)

  • Update name of macos in kitchen config
  • Add deprecation notice for the homebrew_tap and homebrew_cask resources. These resources are now built into Chef 14 and they will be removed from this cookbook when Chef 13 goes EOL, April 2019.

5.0.4 (2018-03-16)

  • Fix backwards logic in the cask install action

5.0.3 (2018-03-09)

  • Resolve method missing errors in the library

5.0.2 (2018-03-09)

  • Remove some legacy logic around the Chef Homebrew user module
  • Use lazy to prevent compilation failures on non-macOS platforms

5.0.1 (2018-03-08)

  • Added a cask_name and tap_name property to the cask/tap resources. These are name_properties which allow you to set the tap/cask name to something other than the resources name. Handy for avoiding resource cloning.

5.0.0 (2018-03-08)

  • Added a new homebrew_path property to cask/tap for the homebrew binary
  • Added a new owner property to cash/tap for setting the homebrew owner
  • Converted execute resources in the resources to converge_by and shellout to provide better converge messaging in line with other core Chef resources=
  • Renamed the :uninstall action in the cask resource to :remove. This aligns with other chef package resources. The previous action will continue to function.
  • Fully documented the resource actions and properties in the readme
  • Removed deprecated taps out of the test recipe
  • Removed the ChefSpec matchers that are now autogenerated by ChefSpec in modern releases of ChefDK. If this causes failures you need to upgrade ChefDK

4.3.0 (2018-01-13)

  • Allow Cask name to be scoped to tap
  • Disable Foodcrtiic's FC108 since it doesn't apply here
  • Automatically install caskroom/cask in the cask resource. This eliminates the need for the cask recipe.
  • Resolve Chef 14 deprecation warnings

4.2.2 (2018-01-13)

  • Fix failures in the cask resource
  • Improve inspec output for file mode test

4.2.1 (2018-01-13)

  • Remove double shellout from a bad merge
  • Test on modern macOS releases
  • Use full file modes throughout the recipes
  • Add 2 retries for downloading the homebrew script in case it fails

4.2.0 (2017-05-30)

  • Remove class_eval and require Chef 12.7+

4.1.0 (2017-04-25)

  • Extend the tap resource to use the --full option. See the readme for details and examples

4.0.0 (2017-04-19)

  • Convert the tap and cask resources from LWRPs to custom resources which simplifies the code and fixes an incompatibility with Chef 13
  • Uses the homebrew_owner as the user to check if a cask has been casked
  • Fixed the location of the tap dir to properly prevent trying to install a tap twice
  • Refactor the mixin to be a simpler helper that is easier to test
  • Resolved failures in the Chefspecs on Travis
  • Test with Local Delivery and not Rake
  • Use standardize Apache 2 license string
  • Only check if homebrew exists once in the default recipe

3.0.0 (2016-12-19)

  • The homebrew package provider has been removed from this cookbook. It ships with Chef 12.0+. This cookbook now requires a minimum of Chef 12.1 or later.
  • This cookbook no longer depends on build-essential as it wasn't using it directly
  • Properly define the chefspec matchers
  • Add chef_version metadata and remove OS X server which isn't an actual platform from ohai
  • Don't grab homebrew_go script if homebrew is already installed.
  • Add ability to disable sending analytics data via a new attribute
  • Move testing to a test cookbook to make it easier to expand in the future. Also convert integration tests to InSpec from ServerSpec

2.1.2 (2016-09-07)

  • Allow passing custom options to brew packages

2.1.1 (2016-09-06)

  • Run chefspecs as OS X
  • Update cask recipe to not create /opt/homebrew-cask and /opt/homebrew-cask/Caskroom
  • Update tests

v2.1.0 (2016-03-29)

  • Make homebrew install script url configurable
  • Make package_info more efficient

v2.0.5 (2016-01-25)

  • Updated execute resources to pass in the HOME/USER environmental variables so homebrew commands are properly executed
  • Removed redundant code from recipes and providers
  • Removed brew-cask installation and the upgade execute that are no longer necessary
  • Added directory creation of /Library/Caches/Homebrew/Casks in case it's not present
  • Updated creation of /opt/homebrew-cask to be recursive in case /opt hasn't been created yet

v2.0.4 (2016-01-20)

  • Use the officially supported method of querying homebrew data vs. unsupported internal APIs
  • Fixed environmental variables in the homebrew command execution

v2.0.3 (2015-12-09)

  • Fixed poor name matching in determining if a cask had been installed already, which prevented some casks from installing

v2.0.2 (2015-12-04)

  • Prevents casks from installing on every chef run

v2.0.1 (2015-12-03)

  • Fixed already-installed casks breaking builds

v2.0.0 (2015-12-01)

  • Removed all Chef 10 compatibility code
  • 77 Update the tap provider to properly notify on changes
  • 73 Allow specifying versions (or HEAD) of formulas (see readme for usage)
  • Updated contributing, testing, and maintainers docs
  • Updated contents of chefignore and .gitignore files
  • Updated development dependencies in the Gemfile
  • Added Travis CI and supermarket version badges to the readme
  • Added Chef standard rubocop file and resolved all warnings
  • Added super metadata for Supermarket
  • Added testing in Travis CI
  • 75 Fix Chefspecs to properly run on Linux hosts (like Travis)
  • Add Rakefile for simplified testing
  • Resolved all foodcritic warnings

v1.13.0 (2015-06-23)

  • 72 Massage Chef12HomebrewUser.find_homebrew_uid into username
  • 69 Add options to cask

v1.12.0 (2015-01-29)

  • 67 Add attribute and recipe for installing homebrew taps

v1.11.0 (2015-01-12)

  • 59 Update Homebrew Cask if auto-update attribute is true
  • 52 Manage Homebrew Cask's install directories
  • 56 Fix check for existing casks
  • 61 Fix owner class for Chef 12
  • Depend on build-essential cookbook 2.1.2+ to support OS X 10.10
  • 64, #66 add and fix ChefSpec tests for default recipe

v1.10.0 (2014-12-09)

  • 55 This cookbook no longer sets its homebrew_package as the
  • package provider for OS X when running under Chef 12
  • List CHEF as the maintainer instead of Chef.

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 to nil so Chef can execute in a bundle (bundler
  • sets RUBYOPT and this can cause issues when running the
  • underlying brew 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

Chef Software has taken maintenance of this cookbook as the original author has other commitments. This is the initial release with Chef Software 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.

Collaborator Number Metric
            

5.0.8 passed this metric

Contributing File Metric
            

5.0.8 passed this metric

Foodcritic Metric
            

5.0.8 passed this metric

No Binaries Metric
            

5.0.8 passed this metric

Testing File Metric
            

5.0.8 passed this metric

Version Tag Metric
            

5.0.8 passed this metric