Permalink
Browse files

Merge pull request #30 from patcoll/master

Fixes for COOK-1916 and COOK-1917
  • Loading branch information...
jtimberman committed Dec 5, 2012
2 parents e340cef + 0a50b6c commit 97aa784b5636e0f1c8f8549b4f8e8c64d9c6c4cc
Showing with 14 additions and 3 deletions.
  1. +14 −3 recipes/mod_auth_openid.rb
View
@@ -62,7 +62,7 @@
cd libopkele-2.0.4 && ./configure --prefix=/usr --libdir=#{syslibdir}
#{make_cmd} && #{make_cmd} install
EOH
- not_if { File.exists?("#{syslibdir}/libopkele.a") }
+ creates "#{syslibdir}/libopkele.a"
end
end
@@ -71,11 +71,20 @@
configure_flags = node['apache']['mod_auth_openid']['configure_flags']
remote_file "#{Chef::Config['file_cache_path']}/mod_auth_openid-#{version}.tar.gz" do
- source "http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-#{version}.tar.gz"
+ if Chef::Version.new(version) >= Chef::Version.new(0.7)
+ source "https://github.com/downloads/bmuller/mod_auth_openid/mod_auth_openid-#{version}.tar.gz"
+ else
+ source "http://butterfat.net/releases/mod_auth_openid/mod_auth_openid-#{version}.tar.gz"
+ end
mode 00644
checksum _checksum
end
+file "mod_auth_openid_dblocation" do
+ path node['apache']['mod_auth_openid']['dblocation']
+ action :nothing
+end
+
bash "install mod_auth_openid" do
cwd Chef::Config['file_cache_path']
code <<-EOH
@@ -84,7 +93,9 @@
perl -pi -e "s/-i -a -n 'authopenid'/-i -n 'authopenid'/g" Makefile
#{make_cmd} && #{make_cmd} install
EOH
- not_if { ::File.exists?("#{node['apache']['libexecdir']}/mod_auth_openid.so") }
+ creates "#{node['apache']['libexecdir']}/mod_auth_openid.so"
+ notifies :delete, "file[mod_auth_openid_dblocation]", :immediately
+ notifies :restart, "service[apache2]"
end
directory node['apache']['mod_auth_openid']['cache_dir'] do

0 comments on commit 97aa784

Please sign in to comment.