Yoji SHIDARA
null+****@clear*****
Fri Mar 1 14:45:38 JST 2013
Yoji SHIDARA 2013-03-01 14:45:38 +0900 (Fri, 01 Mar 2013) New Revision: d6c3cc2afbb21d63924f4e046507c00355fa6026 https://github.com/groonga/chef-cookbooks/commit/d6c3cc2afbb21d63924f4e046507c00355fa6026 Log: Use apt to generate groonga.list Removed files: groonga/templates/default/groonga.list.erb Modified files: groonga/recipes/repository.rb Modified: groonga/recipes/repository.rb (+8 -10) =================================================================== --- groonga/recipes/repository.rb 2013-03-01 13:41:44 +0900 (d8f782d) +++ groonga/recipes/repository.rb 2013-03-01 14:45:38 +0900 (ab450ab) @@ -21,9 +21,9 @@ if platform_family?("debian") package "lsb-release" do end - template "/etc/apt/sources.list.d/groonga.list" do + apt_repository "groonga" do extend Chef::Mixin::ShellOut - source "groonga.list.erb" + platform = node.platform apt_policy = shell_out!("apt-cache", "policy").stdout if /(?:[an]=)(?:unstable|sid),/ =~ apt_policy @@ -31,21 +31,19 @@ if platform_family?("debian") else code_name = shell_out!("lsb_release", "--short", "--codename").stdout.strip end + case platform when "debian" component = "main" when "ubuntu" component = "universe" end - variables(:platform => platform, - :code_name => code_name, - :component => component) - notifies :run, resources(:execute => "apt-get update"), :immediately - end - package "groonga-keyring" do - options("--allow-unauthenticated") - notifies :run, resources(:execute => "apt-get update"), :immediately + uri "http://packages.groonga.org/#{platform}/" + distribution code_name + components [component] + keyserver "keyserver.ubuntu.com" + key "45499429" end elsif platform_family?("rhel", "fedora") if platform_family?("rhel") Deleted: groonga/templates/default/groonga.list.erb (+0 -2) 100644 =================================================================== --- groonga/templates/default/groonga.list.erb 2013-03-01 13:41:44 +0900 (768da47) +++ /dev/null @@ -1,2 +0,0 @@ -deb http://packages.groonga.org/<%= @platform %>/ <%= @code_name %> <%= @component %> -deb-src http://packages.groonga.org/<%= @platform %>/ <%= @code_name %> <%= @component %> -------------- next part -------------- HTML����������������������������... Download