[dev_setup] Use github for lua-cjson source

This change switches to downloading the source from github to avoid
outage of lua-cjson's author's homepage.

  Test plan:
    Run dev_setup on a vanilla VM and pass BVTs

Change-Id: I8068a5060014b46847cfa288916e282de22fb88a
This commit is contained in:
Jesse Zhang 2012-05-21 14:08:09 -07:00
Родитель bdca700e92
Коммит 0f4be4814f
2 изменённых файлов: 6 добавлений и 5 удалений

Просмотреть файл

@ -15,7 +15,7 @@ default[:lua][:version] = "5.1.4"
default[:lua][:simple_version] = lua[:version].match(/\d+\.\d+/).to_s # something like 5.1
default[:lua][:source] = "http://www.lua.org/ftp/lua-#{lua[:version]}.tar.gz"
default[:lua][:path] = File.join(node[:deployment][:home], "deploy", "lua", "lua-#{lua[:version]}")
default[:lua][:cjson_source] = "http://www.kyne.com.au/~mark/software/lua-cjson-1.0.3.tar.gz"
default[:lua][:cjson_source] = "http://github.com/mpx/lua-cjson/tarball/ddbb686f535accac1e3cc375994191883fbe35d8"
default[:lua][:module_path] = File.join(lua[:path], 'lib', 'lua', lua[:simple_version])
default[:lua][:plugin_source_path] = File.join(node["cloudfoundry"]["path"], "router", "ext", "nginx")

Просмотреть файл

@ -28,10 +28,11 @@ when "ubuntu"
not_if { ::File.exists?(File.join("", "tmp", "lua-#{lua_version}.tar.gz")) }
end
remote_file File.join("", "tmp", "lua-cjson-1.0.3.tar.gz") do
lua_cjson_tarball = File.join(node[:deployment][:setup_cache], "lua-cjson-1.0.3.tar.gz")
remote_file lua_cjson_tarball do
owner node[:deployment][:user]
source node[:lua][:cjson_source]
not_if { ::File.exists?(File.join("", "tmp", "lua-cjson-1.0.3.tar.gz")) }
checksum 'b4e3495dde10d087a9550d3a6f364e8998a5dda4f5f4722c69ff89420c9a8c09'
end
# Nginx related packages
@ -110,8 +111,8 @@ when "ubuntu"
cwd File.join("", "tmp")
user node[:deployment][:user]
code <<-EOH
tar xzf lua-cjson-1.0.3.tar.gz
cd lua-cjson-1.0.3
tar xzf #{lua_cjson_tarball}
cd mpx-lua-cjson-ddbb686
sed 's!^PREFIX ?=.*!PREFIX ?='#{lua_path}'!' Makefile > tmp
mv tmp Makefile
make