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

The dmg cookbook has been deprecated

Author provided reason for deprecation:

The dmg cookbook has been deprecated and is no longer being maintained by its authors. Use of the dmg cookbook is no longer recommended.


dmg (25) Versions 4.1.1

Resource for installing macOS applications from DMGs

cookbook 'dmg', '~> 4.1.1', :supermarket
cookbook 'dmg', '~> 4.1.1'
knife supermarket install dmg
knife supermarket download dmg
Quality 17%

The dmg_package resource is now included in Chef 14 and this cookbook has been deprecated. We highly recommend updating to Chef 14 so you can use this resource without the need for a cookbook dependency.

dmg Cookbook

Build Status Cookbook Version

Resource to install OS X applications (.app) from dmg files.



  • macOS


  • Chef 12.5+


  • none



This resource will install a DMG "Package". It will retrieve the DMG from a remote URL, mount it using OS X's hdid, copy the application (.app directory) to the specified destination (/Applications), and detach the image using hdiutil. The dmg file will be stored in the Chef::Config[:file_cache_path]. If you want to install an application that has already been downloaded (not using the source parameter), copy it to the appropriate location. You can find out what directory this is with the following command on the node to run chef:

knife exec -E 'p Chef::Config[:file_cache_path]' -c /etc/chef/client.rb

Optionally, the LWRP can install an "mpkg" or "pkg" package using installer(8).


  • :install - Installs the application.

Parameter attributes:

  • app - This is the name of the application used by default for the /Volumes directory and the .app directory copied to /Applications.
  • source - remote URL for the dmg to download if specified. Default is nil.
  • file - local dmg full file path. Default is nil.
  • owner - owner that should own the package installation.
  • destination - directory to copy the .app into. Default is /Applications.
  • checksum - sha256 checksum of the dmg to download. Default is nil.
  • type - type of package, "app", "pkg" or "mpkg". Default is "app". When using "pkg" or "mpkg", the destination must be /Applications.
  • volumes_dir - Directory under /Volumes where the dmg is mounted. Not all dmgs are mounted into a /Volumes location matching the name of the dmg. If not specified, this will use the name attribute.
  • package_id - Package id registered with pkgutil when a pkg or mpkg is installed
  • dmg_name - Specify the name of the dmg if it is not the same as app, or if the name has spaces.
  • dmg_passphrase - Specify a passphrase to use to unencrypt the dmg while mounting.
  • accept_eula - Specify whether to accept the EULA. Certain dmgs require acceptance of EULA before mounting. Can be true or false, defaults to false.
  • headers - Allows custom HTTP headers (like cookies) to be set on the remote_file resource.
  • allow_untrusted - Allows packages with untrusted certs to be installed.


Install /Applications/ from the primary download site.

dmg_package 'Tunnelblick' do
  source   ''
  checksum '5053038aa8caf7dea66dcab11d6d240672216e6546eff4c2622e216c61af85e5'
  action   :install

Install Google Chrome. Uses the dmg_name because the application name has spaces. Installs in /Applications/Google

dmg_package 'Google Chrome' do
  dmg_name 'googlechrome'
  source   ''
  checksum '7daa2dc5c46d9bfb14f1d7ff4b33884325e5e63e694810adc58f14795165c91a'
  action   :install

Install Dropbox. Uses volumes_dir because the mounted directory is different than the name of the application directory. Installs in /Applications/

dmg_package 'Dropbox' do
  volumes_dir 'Dropbox Installer'
  source      ''
  checksum    'b4ea620ca22b0517b75753283ceb82326aca8bc3c86212fbf725de6446a96a13'
  action      :install

Install MacIrssi to ~/Applications from the local file downloaded to the cache path into an Applications directory in the current user's home directory. Chef should run as a non-root user for this.

directory "#{ENV['HOME']}/Applications"

dmg_package 'MacIrssi' do
  destination "#{ENV['HOME']}/Applications"
  action      :install

Install Virtualbox to /Applications from the .mpkg:

dmg_package 'Virtualbox' do
  source ''
  type   'mpkg'

Install pgAdmin to /Applications and automatically accept the EULA:

dmg_package 'pgAdmin3' do
  source   ''
  checksum '9435f79d5b52d0febeddfad392adf82db9df159196f496c1ab139a6957242ce9'
  accept_eula true

Install Silverlight, with idempotence check based on pkgutil:

dmg_package 'Silerlight' do
  source     ''
  type       'pkg'
  checksum   '6d4a0ad4552d9815531463eb3f467fb8cf4bffcc'
  package_id ''

License & Authors

Author: Cookbook Engineering Team (

Copyright: 2011-2017, 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.
You may obtain a copy of the License at

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
See the License for the specific language governing permissions and
limitations under the License.

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

adium Applicable Versions
applications Applicable Versions
box-sync Applicable Versions
chef-dk Applicable Versions
chrome Applicable Versions
dropbox Applicable Versions
firefox Applicable Versions
foreflight_build_agent Applicable Versions
gimp Applicable Versions
git Applicable Versions
git-annex Applicable Versions
java_se Applicable Versions
kindle Applicable Versions
macapps Applicable Versions
macoffice Applicable Versions
macports Applicable Versions
mozilla_firefox Applicable Versions
openbazaar Applicable Versions
pandoc Applicable Versions
parallels Applicable Versions
privacy_services_manager Applicable Versions
private-internet-access Applicable Versions
sanitize Applicable Versions
scansnap1300i Applicable Versions
selenium_grid Applicable Versions
skype-app Applicable Versions
skype5 Applicable Versions
spotify Applicable Versions
steam Applicable Versions
teamforge Applicable Versions
tunnelblick Applicable Versions
ut_workstation Applicable Versions
vagrant Applicable Versions
virtualbox Applicable Versions
virtualbox-install Applicable Versions
vlc Applicable Versions
vmware-fusion Applicable Versions
webhook Applicable Versions
x2go-client Applicable Versions
xcode Applicable Versions
xquartz Applicable Versions

dmg Cookbook CHANGELOG

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

4.1.1 (2018-04-06)

  • The dmg_package resource is now included in Chef 14 and this cookbook has been deprecated. We highly recommend updating to Chef 14 so you can use this resource without the need for a cookbook dependency.
  • Validate the type field in the resource
  • Remove the now autogenerated ChefSpec matchers

4.1.0 (2017-11-15)

  • Adds allow_untrusted property for older packages that aren't signed
  • Resolve Chef 14 deprecation warnings
  • Minor testing updates and cleanup

4.0.0 (2017-04-27)

  • Converted the existing LWRP to a custom resource which increases the required chef-client release to 12.5+
  • Added Test Kitchen config with private atlas boxes for 10.10 and 10.11
  • Added a test recipe to installed Tunnelblick
  • Added an Inspec test to confirm that Tunnelblick actually installs
  • Remove unused attributes and the entire attributes file
  • Add a warning if you include the default recipe on your runlist
  • Update specs to run on 10.12 and against the test recipe since dmg::default is empty and the existing spec tested nothing

3.1.1 (2017-04-11)

  • Cookstyle updates
  • Test with Local Delivery and not Rake
  • Update apache2 license string
  • Remove foodcritic exclusions

3.1.0 (2017-01-18)

  • Fixed pkg,mpkg installation when it was using mounted app name while it was actually mounted under different name for some applications
  • Cookstyle fixes

3.0.0 (2016-09-06)

  • Add chef_version metadata
  • Run the specs against a mock of OS X
  • Testing updates
  • Require Chef 12+

v2.4.0 (2016-04-26)

  • Added support for local .dmg files with the file property. See the readme for details
  • Resolved all rubocop warnings

v2.3.0 (2015-10-20)

  • Add new headers property to the LWRP for custom http headers. See the readme for more information
  • Removed pivotal tracker example in the readme
  • Added travis and cookbook version badges to the readme
  • Added a .foodcritic file to exclude rules
  • Updated chefignore and .gitignore files
  • Updated platforms in Test Kitchen
  • Added standard Rubocop file
  • Updated Travis to test using ChefDK for the latest deps
  • Added a Berksfile
  • Updated contributing and testing docs
  • Updated Gemfile with the latest testing deps
  • Added and maintainers.toml
  • Added rakefile for simplified testing
  • Added source_url and issues_url metadata
  • Added basic converge chefspec

v2.2.2 (2014-11-12)

  • # 23, add chefspec matchers

v2.2.0 (2014-02-25)

  • [COOK-4285] Accept long EULAs

v2.1.4 (2014-01-26)

  • [COOK-4157] - dmg_package LWRP broken due to "puts" instead of "system"
  • [COOK-4065] - dmg cookbook outputs the name of packages when checking if they are installed


Cleaning up merge errors



  • COOK-3946 - Syntax error in resources/package.rb
  • COOK-2672 - EULA for package is displayed instead accepted


Adding a Chef 10 compatibility check in provider



  • [COOK-3302] - Sometimes hdiutil detach fails due to cfprefsd running in background


  • Adding foodcritic and rubocop to .travis.yml



  • COOK-3331 - Fix an issue where dmg_package with no source raises an exception



  • COOK-3578 - Support package_ids with spaces
  • COOK-3302 - Fix an issue where hdiutil detach fails due to cfprefsd running in the background



  • COOK-3389 - Use rsync instead of cp (potentially a breaking change on some systems)


  • [COOK-1847] - accept owner parameter for installing packages


  • [COOK-852] - Support "pkg" in addition to "mpkg" package types


  • [COOK-854] - use cp -R instead of cp -r
  • [COOK-855] - specify a file or directory to check for prior install


  • option to install software that is an .mpkg inside a .dmg
  • ignore failure on chmod in case mode is already set, or is root owned

Collaborator Number Metric

4.1.1 failed this metric

Failure: Cookbook has 1 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric

4.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Cookstyle Metric

4.1.1 failed this metric

Chef/Deprecations/ResourceWithoutUnifiedTrue: Set `unified_mode true` in Chef Infra Client 15.3+ custom resources to ensure they work correctly in Chef Infra Client 18 (April 2022) when Unified Mode becomes the default. ( dmg/resources/package.rb: 1

Run with Cookstyle Version 7.32.1 with cops Chef/Deprecations,Chef/Correctness,Chef/Sharing,Chef/RedundantCode,Chef/Modernize,Chef/Security,InSpec/Deprecations

No Binaries Metric

4.1.1 passed this metric

Testing File Metric

4.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must contain a file

Version Tag Metric

4.1.1 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of, and your repo must include a tag that matches this cookbook version number