This repository was deprecated and split into two repositories:
- Homebrew formulae/packages: Homebrew/homebrew-core (former contents of
Library/Formula
) - Homebrew package manager: Homebrew/brew
๐ฆ Bundler for non-Ruby dependencies from Homebrew, Homebrew Cask and the Mac App Store.
License: MIT License
This repository was deprecated and split into two repositories:
Library/Formula
)Functionality for installing with options was added in #17, but they have not been released in a new version of this gem. Is this scheduled to occur?
If you put a brew-brewdler.rb
or similarly named file in the cmd
directory of a tap then you can call it with brew brewdler
without having to add it to the PATH
, install it with RubyGems or any of that jazz. It'll also be kept up-to-date automatically with brew update
.
Seems to me this could be a pretty neat deployment method as it wouldn't require any installation beyond a brew tap andrew/homebrew-brewdler
. The only downside is that using Bundler and Gem dependencies is trickier. Taking a brief look at the code I reckon this project could get away with no runtime Gem dependencies.
Thoughts? If you're extremely ๐ on this I'm happy to close out. Otherwise would be great if anyone wanted to pick this up (and if they didn't, I will). I'm also happy to get this moved to the Homebrew organisation and bless it as the "official" solution.
Thanks again @andrew and others!
brew bundle dump
should handle entry order based on dependencies. The dependencies of a formula should come first. At the same time, requirements from cask like java
, mactex
should come first as well. But some casks should come later for those depend on formula.
Homebrew now understands versions e.g. brew versions redis
, so brewdler could support specifying particular versions like so:
redis, '> 2.6.0'
$ brewdle
No Brewfile found
...
$ echo $?
0
We had plans for a project a little like this but the idea was to make it cross platform so if you develop on Mac and deploy to Linux, dependencies would install and resolve properly in both places... currently of course Homebrew is Mac only, but I saw someone has an experimental Solaris port of homebrew (https://github.com/rmyers/homebrew)... Curious if this is a personal itch you'd like to scratch as well, and if so, I know some people (myself included) who'd like to help if we can!
Maybe it's a good idea to support homebrew/aliases
inside bundle (install & dump). DSL may look like:
alias "up" => "update"
alias "status" => "!git status"
It would be helpful to pipe the Brewfile into brew bundle
. This can allow for small modular Brewfiles without littering the filesystem.
For installing machine specific software :)
Brewfile is much like a Gemfile. However, the brewdler implementation is a lot of simpler. Currently, we use the evil eval
to parse Brewfile and string concatenation to generate system command. So there will be a lot of security vulnerabilities. Hence, the question is can we improve it like what gem did?
I'm not a security expert. But I think we can do better.
Hello all,
On a completely fresh OSX Mountain Lion install. Homebrew is installed, brew tap homebrew/bundle completed correctly. Running: brew bundle results in the following:
Error: /usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:72: odd number list for Hash
name: f["name"],
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:72: syntax error, unexpected ':', expecting '}'
name: f["name"],
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:73: syntax error, unexpected ':', expecting '='
full_name: f["full_name"],
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:74: syntax error, unexpected ':', expecting '='
args: args,
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:75: syntax error, unexpected ':', expecting '='
version: keg["version"],
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:76: syntax error, unexpected ':', expecting '='
dependencies: f["dependencies"],
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:77: syntax error, unexpected ':', expecting '='
requirements: f["requirements"],
^
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:78: syntax error, unexpected '}', expecting '='
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:81: class definition in method body
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:89: syntax error, unexpected $end, expecting kEND
Please report this bug:
https://git.io/brew-troubleshooting
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle.rb:8:in `require'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle.rb:8
/usr/local/Library/Taps/homebrew/homebrew-bundle/cmd/brew-bundle.rb:16:in `require'
/usr/local/Library/Taps/homebrew/homebrew-bundle/cmd/brew-bundle.rb:16
/usr/local/Library/brew.rb:67:in `require'
/usr/local/Library/brew.rb:67:in `require?'
/usr/local/Library/brew.rb:155
brew 'git'
cask 'google-chrome'
Would you be interested in merging this?
I want to brew install
with options.
For example, brew install --cocoa emacs
.
We have drop the support of the gem. But the repo's url is still pointed to the rubygem website.
I'm looking to add a Brewfile
to a project, and run brew bundle
when bootstrapping it.
If I have a pretty simple Brewfile
like:
brew 'nagios'
And I run brew bundle
multiple times, I always get this output, even when nagios is already installed:
$ brew bundle
Succeeded in installing nagios
Success: 1 Fail: 0
I could imagine there being a flag like --quiet
which only outputs if something was actually installed. Or, maybe having a --check
option which is used for scripting, so you can do something like this: https://github.com/github/scripts-to-rule-them-all/blob/master/script/bootstrap#L10-L13
When installing grep & gnu-time from .brewfile with:
brew 'grep', args: ['--with-default-names']
brew 'gnu-time', args: ['--with-default-names']
The default-names arg is not respected.
Trying to add the --appdir=/Applications arg to cask installs?
Maybe there could just be some sort of global setting at the top of the Brewfile and then it wouldn't need to be added to each of the casks?
Just an idea?
I'm sorry if this isn't the right place but I couldn't find a better place to post this: I started using homebrew-bundle with linuxbrew (Ubuntu 15.10) and it works great! I thought I should let you know because of the incertain wording in the readme (should work).
$ brew cask info
Error: This command requires a cask's name
https://github.com/andrew/brewdler/blob/master/lib/brewdler/cask_installer.rb#L4
So I just created a Brewfile with a bunch of casks. If I modify the Brewfile and run brew bundle
again, it doesn't appear to skip the casks that have already been installed. It's sitting there on each line for a while with "curl" up in the Terminal header.
e.g. currently:
$ brew brewdle --help
brew brewdle dump [--force]
brew brewdle cleanup [--dry-run]
brew brewdle [--version]
brew brewdle [-h|--help]
Usage:
Bundler for non-Ruby dependencies from Homebrew
brew brewdle read Brewfile and install all dependencies
brew brewdle dump write all currently installed packages into a B
ewfile
brew brewdle cleanup uninstall all Homebrew formulae not listed in B
ewfile
Options:
--force force overwrite existed Brewfile
--dry-run list formulae rather than actual uninstalling th
m
-h, --help show this help message and exit
--version show the version of brewdler
Steps to reproduce:
$ brew cask install skitch
Warning: A Cask for skitch is already installed. Add the "--force" option to force re-install.
Brewfile
cask 'skitch'
$ brew bundle
Succeeded in installing skitch
Success: 1 Fail: 0
Since this becomes homebrew official method to bundle homebrew install. I hope we can add more feature to it. Shall we?
So instead of reading Brewfile and install them, I hope to do the reverse that is writing current installation to a Brewfile. I have wrote some similar tool before. And if it's OK, I can work on a PR.
In my Brewfile, I have brew 'gpg'
, which is a Homebrew alias for gnupg
. However, when I run brew bundle cleanup
, it says that gnupg
will be removed.
Would there be a way to support the aliases that are defined in /homebrew/Library/Aliases
so that this doesn't happen when running brew bundle cleanup
?
Should the README be corrected to say "brewdle" instead of "bundle"?
For example brew bundle dump
will give the deprecation warning but brew brewdle dump
works like a charm.
Is it possible to somehow have it show you where the invalid line is?
Even if it was just the line # that would be helpful.
Hi all. I love this project!
I'm using brewdle right now to setup a new machine. And its seems to be going smoothly, but... The output is blank! The only thing I got for this Brewfile:
# Packages
brew 'zsh'
brew 'git'
brew 'rbenv'
brew 'ruby-build'
brew 'vim', args: ['override-system-vi']
brew 'node'
brew 'python'
brew 'brew-cask'
brew 'imagemagick'
# Apps
tap 'caskroom/cask'
cask 'iterm2'
cask 'google-chrome'
cask 'alfred'
# more stuff...
was
$ brew brewdle
Error: No available formula for brew-cask
Cloning into '/usr/local/Library/Taps/caskroom/homebrew-cask'...
remote: Counting objects: 124686, done.
remote: Compressing objects: 100% (63/63), done.
remote: Total 124686 (delta 33), reused 2 (delta 0)
Receiving objects: 100% (124686/124686), 34.34 MiB | 1.29 MiB/s, done.
Resolving deltas: 100% (82534/82534), done.
Checking connectivity... done.
Error: Unknown command: cask
Error: Unknown command: cask
Error: Unknown command: cask
...
I was expecting some output like successfully installed 'zsh'
. I think either adding redirecting brew's stdout by default, or at lest adding a verbose option, would be a nice improvement.
When running brew bundle
now, if a package fails to install, the command still returns 0
. It would be awesome if the command returned 1
or some other non-zero value whenever it encounters an error.
For example, given the following Brewfile:
# Brewfile
brew 'node'
brew 'some-package-that-doesnt-exist'
$ brew bundle
Succeed to install node
Error: No available formula for some-package-that-doesnt-exist
Searching formulae...
Searching taps...
Fail to install some-package-that-doesnt-exist
Success: 1 Fail: 1
$ echo $?
0
cquinn@Quinnertube% brew bundle
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/utils.rb:35:in `rescue in brewfile': No Brewfile found (RuntimeError)
from /usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/utils.rb:28:in `brewfile'
from /usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/commands/install.rb:4:in `run'
from /usr/local/Library/Taps/homebrew/homebrew-bundle/cmd/brew-bundle:66:in `<main>'
Can we clean that up a bit?
I'm sorry, my English is not good.
An error has occurred.
Can anyone help me?
mac OS X El Capitan
> brew -v
Homebrew 0.9.5 (git revision 11160; last commit 2015-11-08)
> brew bundle --version
1.1.1
> brew bundle install
Succeeded in tapping homebrew/bundle
Error: undefined method `[]' for nil:NilClass
Please report this bug:
https://github.com/Homebrew/homebrew-bundle/issues/
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:77:in `formula_inspector'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:64:in `block in formulae_info'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:64:in `map'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:64:in `formulae_info'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:14:in `formulae'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_dumper.rb:38:in `formula_names'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_installer.rb:58:in `installed_formulae'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_installer.rb:50:in `formula_installed?'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_installer.rb:74:in `installed?'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_installer.rb:26:in `install_or_upgrade'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/brew_installer.rb:10:in `install'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/dsl.rb:56:in `block in install'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/dsl.rb:40:in `each'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/dsl.rb:40:in `install'
/usr/local/Library/Taps/homebrew/homebrew-bundle/lib/bundle/commands/install.rb:4:in `run'
/usr/local/Library/Taps/homebrew/homebrew-bundle/cmd/brew-bundle:71:in `<main>'
Brewfile
tap 'homebrew/bundle'
brew 'ack'
brew 'autoconf'
brew 'checkbashisms'
brew 'coreutils'
brew 'cowsay'
brew 'direnv'
brew 'ffmpeg'
brew 'figlet'
brew 'fzf'
brew 'gawk'
brew 'gdbm'
brew 'gifsicle'
brew 'git'
brew 'go', args: ['cross-compile-common']
brew 'hub'
brew 'hugo'
brew 'jq'
brew 'lame'
brew 'libevent'
brew 'mercurial'
brew 'nkf'
brew 'node.js'
brew 'nodebrew'
brew 'openssl'
brew 'peco'
brew 'python'
brew 'rbenv'
brew 'readline'
brew 'reattach-to-user-namespace'
brew 'ruby-build'
brew 'shellcheck'
brew 'sqlite'
brew 'terminal-notifier'
brew 'tig', args: ['with-docs']
brew 'tmux'
brew 'tree'
brew 'vim', args: ['with-lua', 'with-luajit']
brew 'wget'
brew 'zsh', args: ['disable-etcdir']
brew 'zsh-completions'
tap 'caskroom/cask'
brew 'brew-cask'
cask '1password'
cask 'appcleaner'
cask 'bettertouchtool'
cask 'burn'
cask 'clipmenu'
cask 'dragondrop'
#cask 'dropbox'
cask 'firefox'
cask 'flashlight'
cask 'google-japanese-ime'
cask 'karabiner'
cask 'karabiner'
cask 'keycast'
cask 'kobito'
cask 'macdown'
cask 'mactex'
cask 'macvim'
cask 'mailbox'
cask 'messenger'
cask 'skitch'
cask 'skype'
cask 'the-unarchiver'
cask 'vagrant'
cask 'virtualbox'
cask 'vlc'
# vim: ft=conf
To force all packages to use homebrew's version of openssl, scripts often include
brew unlink openssl && brew link openssl --force
Is there any scope for a link
and unlink
command in the dsl?
I wonder if it makes sense to make brew bundle cleanup
not do anything without either e.g. --dry-run
, --global
or --force
. A coworker was just trying out brew bundle
and managed to blow away almost all his installed formulae by mistake. I've personally never used cleanup
without --global
and I can see why it would be dangerous.
Running brew bundle check
with brew 'zmq'
in my Brewfile results in:
brew bundle can't satisfy your Brewfile's dependencies.
Install missing dependencies with `brew bundle install`.
Running brew bundle install
succeeds with no errors, but the error message still shows when running check
. Replacing 'zmq' with 'zeromq' in the Brewfile
fixes the problem.
Took me a few minutes to figure out what the problem was, so if supporting aliases isn't an easy fix, I'd suggest a more specific error message when one is included in a Brewfile.
I might have a Brewfile
with cask 'java'
. Problem is, I want to be able to use this on systems which may already have Java installed from somewhere other than brew cask
.
Perhaps it'd be nice to have an API like:
cask 'java', unless: "/usr/libexec/java_home --failfast"
that will only install Java if that command fails. If the cask
is already installed it should still upgrade it.
Hi
I would like to install rbenv-build. And the command I run is brew install --HEAD ruby-build
.
How can I handle it with Brewfile?
Thanks!
When nginx
is installed it has a launchd
plist
that it includes. This isn't (yet) copied or started but it'd be nice if it could be.
Perhaps it'd be nice to have an API like:
brew 'nginx', restart_service: 'true'
that will run tap https://github.com/Homebrew/homebrew-services and then run brew services restart nginx
to setup and start nginx
.
If I've installed a formula as brew install homebrew/versions/gcc48
then it should be dumped the same way in the Brewfile
e.g. brew 'homebrew/versions/gcc48
rather than the current version which is just gcc48
. Additionally we could use this to simplify only dumping tap
s that don't belong to one of these formulae (if necessary).
Adding this so I remember to do it at some stage but if anyone wants to beat me to it: feel free!
Currently the DSL seems to choke on invalid quotes, causing the whole Brewfile to fail with "missing formula" errors for each single line. I would suggest to either
I'm not a ruby guy and I've only briefly looked at the code, but my guess would be that the first option is actually easier to implement.
I'm converting my Brewfile
from the old format.
At the top of my old Brewfile
, I had:
update # Sync the git repo
upgrade # Upgrade already-installed formulae
and at the bottom I had:
cleanup # Remove outdated versions from the cellar
How do I handle these tasks in the new Brewfile
format?
I use brew-gem to manage my installed Ruby gems with homebrew, but when I put gem install somegemname
on a line in a Brewfile, I get Error: Invalid Brewfile.
Can you make these two great tastes taste great together?
Mac$ brew install snort
==> Downloading https://www.snort.org/downloads/snort/snort-2.9.7.3.tar.gz
curl: (22) The requested URL returned error: 404 Not Found
Error: Failed to download resource "snort"
Download failed: https://www.snort.org/downloads/snort/snort-2.9.7.3.tar.gz
The new path is:
https://www.snort.org/downloads/snort/snort-2.9.7.6.tar.gz
Can I customize the install process with new version number?
Regards
It looks like all the caveats section is not shown when using the bundle.
Some times the caveats section provides useful info. It should be visible when installing.
Currently, using Brewfile
as a 'whitelist' (using cleanup) will remove any installed dependencies for installed packages. A good example is installing ffmpeg
and then running brew brewdle cleanup
which removes the dependencies for ffmpeg
.
I feel that the cleanup
functionality should ignore/skip packages that are installed as dependencies for a package existing in the Brewfile
. Otherwise, cleanup can break many installations.
Thanks for working on this!
The output for the main command seems a little off in terms of idiomatic English.
Succeed to install <thing>
Should be something like:
Successfully installed <thing>
Failed to install <thing>
Tapped <thing>
I will try and sort this if I have a spare moment - the relevant line is https://github.com/Homebrew/homebrew-brewdler/blob/7d9be9deb2601247136e0ce2b526ae0c1e7a7ada/lib/brewdler/dsl.rb#L41-L47
For the future it might be nice to have these strings generally translated.
Your Readme.mkdown says "Note: this is now a native feature in homebrew"
However, note that apparently the brew bundle
function has been deprecated. See Homebrew/legacy-homebrew#32952
Instead someone recommended this project ;-)
It would be nice to have the ability to upgrade packages. This could either be automatically (if an upgrade exists for a package in the Brewfile, then upgrade it) or a separate dsl so its a tad more explicit (such as 'brew_upgrade').
This is inspired by thoughtbot's laptop setup script: https://github.com/thoughtbot/laptop/blob/master/mac#L56
brew_install_or_upgrade() {
if brew_is_installed "$1"; then
if brew_is_upgradable "$1"; then
fancy_echo "Upgrading %s ..." "$1"
brew upgrade "$@"
else
fancy_echo "Already using the latest version of %s. Skipping ..." "$1"
fi
else
fancy_echo "Installing %s ..." "$1"
brew install "$@"
fi
}
I'd love to submit a PR for this feature, just interested to hear which method is more likely to be accepted.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.