Commit a2d6ec482e4715707cd6c1904b0843c129c922d1

Authored by Jianwei Han
1 parent 42c5acab4d
Exists in master

Fix problems for Homebrew in standard location

Showing 8 changed files with 24 additions and 39 deletions Side-by-side Diff

... ... @@ -29,7 +29,7 @@
29 29 # Includes many of our custom types and providers, as well as global
30 30 # config. Required.
31 31  
32   -github "boxen", "3.6.1"
  32 +github "boxen", "3.6.3.rc", :repo => "hanjianwei/puppet-boxen"
33 33  
34 34 # Support for default hiera data in modules
35 35  
36 36  
... ... @@ -38,13 +38,10 @@
38 38 # Core modules for a basic development environment. You can replace
39 39 # some/most of these if you want, but it's not recommended.
40 40  
41   -github "dnsmasq", "1.0.1"
42   -github "gcc", "2.0.101"
43 41 github "git", "2.4.0"
44 42 github "homebrew", "1.9.5.rc", :repo => "hanjianwei/puppet-homebrew"
45 43 github "hub", "1.3.0"
46 44 github "inifile", "1.0.3", :repo => "puppetlabs/puppetlabs-inifile"
47   -github "nginx", "1.4.3"
48 45 github "nodejs", "3.7.0"
49 46 github "openssl", "1.0.0"
50 47 github "pkgconfig", "1.0.0"
51 48  
... ... @@ -57,7 +54,6 @@
57 54 # Optional/custom modules. There are tons available at
58 55 # https://github.com/boxen.
59 56 github "osx", "2.7.0"
60   -github "property_list_key", "0.2.1", :repo => "glarizza/puppet-property_list_key"
61 57 github "brewcask", "0.0.4.rc2", :repo => "hanjianwei/puppet-brewcask"
62   -github "dotfiles", "0.0.6", :repo => "hanjianwei/puppet-dotfiles"
  58 +github "dotfiles", "0.0.9", :repo => "hanjianwei/puppet-dotfiles"
1 1 GITHUBTARBALL
2   - remote: boxen/puppet-boxen
3   - specs:
4   - boxen (3.6.1)
5   -
6   -GITHUBTARBALL
7   - remote: boxen/puppet-dnsmasq
8   - specs:
9   - dnsmasq (1.0.1)
10   -
11   -GITHUBTARBALL
12   - remote: boxen/puppet-gcc
13   - specs:
14   - gcc (2.0.101)
15   -
16   -GITHUBTARBALL
17 2 remote: boxen/puppet-git
18 3 specs:
19 4 git (2.4.0)
... ... @@ -24,11 +9,6 @@
24 9 hub (1.3.0)
25 10  
26 11 GITHUBTARBALL
27   - remote: boxen/puppet-nginx
28   - specs:
29   - nginx (1.4.3)
30   -
31   -GITHUBTARBALL
32 12 remote: boxen/puppet-nodejs
33 13 specs:
34 14 nodejs (3.7.0)
35 15  
... ... @@ -69,9 +49,9 @@
69 49 xquartz (1.1.1)
70 50  
71 51 GITHUBTARBALL
72   - remote: glarizza/puppet-property_list_key
  52 + remote: hanjianwei/puppet-boxen
73 53 specs:
74   - property_list_key (0.2.1)
  54 + boxen (3.6.3.rc)
75 55  
76 56 GITHUBTARBALL
77 57 remote: hanjianwei/puppet-brewcask
... ... @@ -81,7 +61,7 @@
81 61 GITHUBTARBALL
82 62 remote: hanjianwei/puppet-dotfiles
83 63 specs:
84   - dotfiles (0.0.6)
  64 + dotfiles (0.0.9)
85 65  
86 66 GITHUBTARBALL
87 67 remote: hanjianwei/puppet-homebrew
88 68  
89 69  
90 70  
... ... @@ -104,22 +84,18 @@
104 84 module-data (0.0.3)
105 85  
106 86 DEPENDENCIES
107   - boxen (= 3.6.1)
  87 + boxen (= 3.6.3.rc)
108 88 brewcask (= 0.0.4.rc2)
109   - dnsmasq (= 1.0.1)
110   - dotfiles (= 0.0.6)
111   - gcc (= 2.0.101)
  89 + dotfiles (= 0.0.9)
112 90 git (= 2.4.0)
113 91 homebrew (= 1.9.5.rc)
114 92 hub (= 1.3.0)
115 93 inifile (= 1.0.3)
116 94 module-data (= 0.0.3)
117   - nginx (= 1.4.3)
118 95 nodejs (= 3.7.0)
119 96 openssl (= 1.0.0)
120 97 osx (= 2.7.0)
121 98 pkgconfig (= 1.0.0)
122   - property_list_key (= 0.2.1)
123 99 repository (= 2.3.0)
124 100 ruby (= 8.0.4)
125 101 stdlib (= 4.2.1)
... ... @@ -23,4 +23,13 @@
23 23  
24 24 # required for Github Enterprise (defaults to "https://github.com/%s")
25 25 # ENV['BOXEN_REPO_URL_TEMPLATE'] = 'https://github.yourdomain.com/%s'
  26 +
  27 +# Setup config for Homebrew
  28 +require 'fileutils'
  29 +
  30 +facts_dir = '/opt/boxen/config/facts'
  31 +homebrew_json = '{"use_default_homebrew": true}'
  32 +
  33 +FileUtils.mkdir_p facts_dir
  34 +File.write "#{facts_dir}/homebrew.json", homebrew_json
hiera/users/hanjianwei.yaml
1 1 ruby::global::version: "2.1.2"
2 2 nodejs::global::version: "v0.10"
  3 +boxen::config::homebrewdir: "/usr/local"
... ... @@ -10,7 +10,7 @@
10 10 "${boxen::config::home}/rbenv/shims",
11 11 "${boxen::config::home}/rbenv/bin",
12 12 "${boxen::config::home}/rbenv/plugins/ruby-build/bin",
13   - "${boxen::config::home}/homebrew/bin",
  13 + "/usr/local/bin",
14 14 '/usr/bin',
15 15 '/bin',
16 16 '/usr/sbin',
modules/people/manifests/hanjianwei/applications.pp
... ... @@ -5,8 +5,11 @@
5 5 'qt5',
6 6 'reattach-to-user-namespace',
7 7 'tmux',
8   - 'vim',
9 8 'wget']:
  9 + }
  10 +
  11 + package { 'vim':
  12 + install_options => ['--override-system-vi'],
10 13 }
11 14  
12 15 homebrew::tap { 'homebrew/science': }
script/boxen-git-credential
... ... @@ -40,7 +40,7 @@
40 40 require "open4"
41 41  
42 42 fallback = ENV["BOXEN_GIT_CREDENTIAL_FALLBACK"]
43   - fallback ||= "#{config.homedir}/homebrew/bin/git-credential-osxkeychain"
  43 + fallback ||= "/usr/local/bin/git-credential-osxkeychain"
44 44  
45 45 status = Open4.popen4 fallback, *ARGV do |pid, stdin, stdout, stderr|
46 46 stdin.write input
... ... @@ -35,7 +35,7 @@
35 35  
36 36 # Sync Homebrew packages.
37 37  
38   -Dir.chdir "#{config.homedir}/homebrew/Cellar" do
  38 +Dir.chdir "/usr/local/Cellar" do
39 39 Dir["*/*"].each do |dir|
40 40 name, version = File.split dir
41 41