Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Embed ruby to support stemcells >=3303 #18

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 13 additions & 8 deletions config/blobs.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
---
source/apr-1.5.1.tar.gz:
size: 1020833
object_id: 6b6b4ae6-fbe6-44a4-8c1f-4141818a06c8
sha: 9caa83e3f50f3abc9fab7c4a3f2739a12b14c3a3
size: 1020833
source/openssl-1.0.1h.tar.gz:
object_id: 9e3cb9c8-0547-4f59-acac-509c4c22f2de
sha: b2239599c8bf8f7fc48590a55205c26abe560bf8
size: 4475692
source/collectd-5.4.1.tar.gz:
size: 1894132
object_id: a5d77875-63bf-46d9-bf78-21b5b102491f
sha: faaccac4daf48449bcefc9d6f9236f98a5dd5b4b
size: 1894132
source/nxlog-ce_2.9.1347_ubuntu_1404_amd64.deb:
size: 1520716
object_id: 24ec0add-7a46-4c62-aada-26de4a2e493a
sha: 3751854f76b34b19fac29b292a3d2edb01a769ca
size: 1520716
source/openssl-1.0.1h.tar.gz:
size: 4475692
object_id: 9e3cb9c8-0547-4f59-acac-509c4c22f2de
sha: b2239599c8bf8f7fc48590a55205c26abe560bf8
source/ruby-1.9.3-p545.tar.gz:
size: 12582277
sha: 03455364740914e8d2dfd6421f681b3fb68a4313
source/yaml-0.1.6.tar.gz:
size: 503012
sha: f3d404e11bec3c4efcddfd14c42d46f1aabe0b5d
1 change: 1 addition & 0 deletions jobs/logsearch-shipper/spec
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: "logsearch-shipper"
packages:
- "logsearch-collectd"
- "logsearch-nxlog"
- "logsearch-ruby"

templates:
#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/var/vcap/bosh/bin/ruby
#!/var/vcap/packages/logsearch-ruby/bin/ruby

require 'digest'
require 'yaml'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/var/vcap/bosh/bin/ruby
#!/var/vcap/packages/logsearch-ruby/bin/ruby

require 'yaml'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/var/vcap/bosh/bin/ruby
#!/var/vcap/packages/logsearch-ruby/bin/ruby

require 'net/http'
require 'uri'
Expand Down
37 changes: 37 additions & 0 deletions packages/logsearch-ruby/packaging
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/bin/bash

exec 2>&1

set -e
set -u

CPUS=$(grep -c ^processor /proc/cpuinfo)


tar -xzf source/yaml-0.1.6.tar.gz
tar -xzf source/ruby-1.9.3-p545.tar.gz


( cd yaml-0.1.6

./configure \
--prefix=${BOSH_INSTALL_TARGET}

make -j${CPUS}
make install

)


( cd ruby-1.9.3-p545

sed -i 's/\(OSSL_SSL_METHOD_ENTRY(SSLv2[^3]\)/\/\/\1/g' ext/openssl/ossl_ssl.c

./configure \
--prefix=${BOSH_INSTALL_TARGET} \
--disable-install-doc

make -j${CPUS}
make install

)
7 changes: 7 additions & 0 deletions packages/logsearch-ruby/spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
name: "logsearch-ruby"
files:
# https://github.com/cloudfoundry/bosh/blob/stable-3263.10/stemcell_builder/stages/bosh_ruby/assets/yaml-0.1.6.tar.gz
- "source/yaml-0.1.6.tar.gz"
# https://github.com/cloudfoundry/bosh/blob/stable-3263.10/stemcell_builder/stages/bosh_ruby/assets/ruby-1.9.3-p545.tar.gz
- "source/ruby-1.9.3-p545.tar.gz"