Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Auto merge of #218 - aneeshusa:link-openssl-on-osx, r=larsbergstrom
Browse files Browse the repository at this point in the history
Link a newer openssl from homebrew on OS X

This should be manually tested to a) make sure I didn't break the autoconf linkage, and b) to ensure the openssl linkage works properly.

Closes #210 (for real this time!)

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/saltfs/218)
<!-- Reviewable:end -->
  • Loading branch information
bors-servo committed Feb 8, 2016
2 parents 65a4e37 + 7ceda87 commit 611619c
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 47 deletions.
3 changes: 3 additions & 0 deletions .travis/test_pillars/travis.sls
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
travis: True

homebrew:
user: travis
10 changes: 10 additions & 0 deletions map.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{%
set homebrew = salt['grains.filter_by']({
'defaults': {},
'Darwin': { 'user': 'administrator' }
},
base='defaults',
merge=salt.pillar.get('homebrew', {}),
grain='kernel'
)
%}
100 changes: 53 additions & 47 deletions servo-dependencies.sls
Original file line number Diff line number Diff line change
@@ -1,50 +1,4 @@
{% if grains['kernel'] != 'Darwin' %}
FIX enable multiverse:
pkgrepo.absent:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse

enable multiverse:
pkgrepo.managed:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse

ttf-mscorefonts-installer:
debconf.set:
- name: ttf-mscorefonts-installer
- data: { 'msttcorefonts/accepted-mscorefonts-eula': { 'type': 'boolean', 'value': True } }
pkg.installed:
- pkgs:
- ttf-mscorefonts-installer
- requires:
- debconf: ttf-mscorefonts-installer
{% endif %}

{% if grains['kernel'] == 'Darwin' %}
# Workaround for https://github.com/saltstack/salt/issues/26414
servo-darwin-homebrew-versions-dependencies:
module.run:
- name: pkg.install
- pkgs:
- automake
- autoconf213
- taps:
- homebrew/versions
- require_in:
- pkg: servo-dependencies

homebrew-link-autoconf:
cmd.run:
- name: 'brew link --overwrite autoconf'
- user: administrator
# Warning: Only checks that some autoconf Homebrew package is linked,
# not necessarily the version installed above.
# Whether this handles updating autoconf properly is an open question.
# This state should be replaced by a custom Salt state.
- creates: /usr/local/Library/LinkedKegs/autoconf
- require:
- module: servo-darwin-homebrew-versions-dependencies
- require_in:
- pkg: servo-dependencies
{% endif %}
{% from 'map.jinja' import homebrew with context %}
servo-dependencies:
pkg.installed:
Expand All @@ -53,7 +7,9 @@ servo-dependencies:
- git
- ccache
{% if grains['kernel'] == 'Darwin' %}
- automake
- pkg-config
- openssl
{% else %}
- libglib2.0-dev
- libgl1-mesa-dri
Expand All @@ -74,3 +30,53 @@ servo-dependencies:
- pkgs:
- virtualenv
- ghp-import
{% if grains['kernel'] == 'Darwin' %}
# Workaround for https://github.com/saltstack/salt/issues/26414
servo-darwin-homebrew-versions-dependencies:
module.run:
- name: pkg.install
- pkgs:
- autoconf213
- taps:
- homebrew/versions
# Warning: These states that manually run brew link only check that some
# version of the Homebrew package is linked, not necessarily the version
# linked above. Whether this handles updates properly is an open question.
# These should be replaced by a custom Salt state.
homebrew-link-autoconf:
cmd.run:
- name: 'brew link --overwrite autoconf'
- user: {{ homebrew.user }}
- creates: /usr/local/Library/LinkedKegs/autoconf
- require:
- pkg: servo-dependencies
- module: servo-darwin-homebrew-versions-dependencies
homebrew-link-openssl:
cmd.run:
- name: 'brew link --force openssl'
- user: {{ homebrew.user }}
- creates: /usr/local/Library/LinkedKegs/openssl
- require:
- pkg: servo-dependencies
{% else %}
FIX enable multiverse:
pkgrepo.absent:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse
enable multiverse:
pkgrepo.managed:
- name: deb http://archive.ubuntu.com/ubuntu trusty multiverse
ttf-mscorefonts-installer:
debconf.set:
- name: ttf-mscorefonts-installer
- data: { 'msttcorefonts/accepted-mscorefonts-eula': { 'type': 'boolean', 'value': True } }
pkg.installed:
- pkgs:
- ttf-mscorefonts-installer
- requires:
- debconf: ttf-mscorefonts-installer
{% endif %}

0 comments on commit 611619c

Please sign in to comment.