Line
Link Here
|
0 |
-- puppetdb-1.2.0/tasks/install.rake.old |
0 |
++ puppetdb-1.2.0/tasks/install.rake |
Lines 62-67
task :install => [ JAR_FILE ] do
Link Here
|
62 |
cp_p "ext/files/puppetdb.default", "#{DESTDIR}/etc/default/#{@name}" |
62 |
cp_p "ext/files/puppetdb.default", "#{DESTDIR}/etc/default/#{@name}" |
63 |
cp_pr "ext/files/#{@name}.debian.init", "#{DESTDIR}/etc/init.d/#{@name}" |
63 |
cp_pr "ext/files/#{@name}.debian.init", "#{DESTDIR}/etc/init.d/#{@name}" |
64 |
chmod 0755, "#{DESTDIR}/etc/init.d/#{@name}" |
64 |
chmod 0755, "#{DESTDIR}/etc/init.d/#{@name}" |
|
|
65 |
elsif @osfamily == "linux" |
66 |
mkdir_p "#{DESTDIR}/etc/conf.d" |
67 |
cp_p "ext/files/puppetdb.gentoo.conf", "#{DESTDIR}/etc/conf.d/#{@name}" |
68 |
cp_pr "ext/files/#{@name}.gentoo.init", "#{DESTDIR}/etc/init.d/#{@name}" |
69 |
chmod 0755, "#{DESTDIR}/etc/init.d/#{@name}" |
65 |
else |
70 |
else |
66 |
raise "Unknown or unsupported osfamily: #{@osfamily}" |
71 |
raise "Unknown or unsupported osfamily: #{@osfamily}" |
67 |
end |
72 |
end |
68 |
-- puppetdb-1.2.0/tasks/template.rake.old |
73 |
++ puppetdb-1.2.0/tasks/template.rake |
Lines 3-47
Link Here
|
3 |
task :template => [ :clean ] do |
3 |
task :template => [ :clean ] do |
4 |
mkdir_p "ext/files/debian" |
4 |
mkdir_p "ext/files/debian" |
5 |
# files for deb and rpm |
5 |
# files for deb and rpm |
6 |
erb "ext/templates/log4j.properties.erb", "ext/files/log4j.properties" |
6 |
|
7 |
erb "ext/templates/config.ini.erb" , "ext/files/config.ini" |
7 |
def templatizing(source, destination) |
8 |
erb "ext/templates/jetty.ini.erb", "ext/files/jetty.ini" |
8 |
template_file = File.open(source, 'r').read |
9 |
erb "ext/templates/repl.ini.erb", "ext/files/repl.ini" |
9 |
erb = ERB.new(template_file, nil, '-') |
10 |
erb "ext/templates/database.ini.erb", "ext/files/database.ini" |
10 |
File.open(destination, 'w+') { |file| file.write(erb.result(binding)) } |
11 |
erb "ext/templates/puppetdb-foreground.erb", "ext/files/puppetdb-foreground" |
11 |
end |
|
|
12 |
|
13 |
templatizing("ext/templates/log4j.properties.erb", "ext/files/log4j.properties") |
14 |
|
15 |
|
16 |
templatizing("ext/templates/config.ini.erb", "ext/files/config.ini") |
17 |
templatizing("ext/templates/jetty.ini.erb", "ext/files/jetty.ini") |
18 |
templatizing("ext/templates/repl.ini.erb", "ext/files/repl.ini") |
19 |
templatizing("ext/templates/database.ini.erb", "ext/files/database.ini") |
20 |
templatizing("ext/templates/puppetdb-foreground.erb", "ext/files/puppetdb-foreground") |
12 |
chmod 0700, "ext/files/puppetdb-foreground" |
21 |
chmod 0700, "ext/files/puppetdb-foreground" |
13 |
erb "ext/templates/puppetdb-import.erb", "ext/files/puppetdb-import" |
22 |
templatizing("ext/templates/puppetdb-import.erb", "ext/files/puppetdb-import") |
14 |
chmod 0700, "ext/files/puppetdb-import" |
23 |
chmod 0700, "ext/files/puppetdb-import" |
15 |
erb "ext/templates/puppetdb-export.erb", "ext/files/puppetdb-export" |
24 |
templatizing("ext/templates/puppetdb-export.erb", "ext/files/puppetdb-export") |
16 |
chmod 0700, "ext/files/puppetdb-export" |
25 |
chmod 0700, "ext/files/puppetdb-export" |
17 |
|
26 |
|
18 |
# files for deb |
27 |
# files for deb |
19 |
erb "ext/templates/init_debian.erb", "ext/files/debian/#{@name}.init" |
28 |
templatizing("ext/templates/init_debian.erb", "ext/files/debian/#{@name}.init") |
20 |
erb "ext/templates/puppetdb_default.erb", "ext/files/debian/#{@name}.default" |
29 |
templatizing("ext/templates/puppetdb_default.erb", "ext/files/debian/#{@name}.default") |
21 |
erb "ext/templates/deb/control.erb", "ext/files/debian/control" |
30 |
templatizing("ext/templates/deb/control.erb", "ext/files/debian/control") |
22 |
erb "ext/templates/deb/prerm.erb", "ext/files/debian/#{@name}.prerm" |
31 |
templatizing("ext/templates/deb/prerm.erb", "ext/files/debian/#{@name}.prerm") |
23 |
erb "ext/templates/deb/postrm.erb", "ext/files/debian/#{@name}.postrm" |
32 |
templatizing("ext/templates/deb/postrm.erb", "ext/files/debian/#{@name}.postrm") |
24 |
erb "ext/templates/deb/base.install.erb", "ext/files/debian/#{@name}.install" |
33 |
templatizing("ext/templates/deb/base.install.erb", "ext/files/debian/#{@name}.install") |
25 |
erb "ext/templates/deb/terminus.install.erb", "ext/files/debian/#{@name}-terminus.install" |
34 |
templatizing("ext/templates/deb/terminus.install.erb", "ext/files/debian/#{@name}-terminus.install") |
26 |
erb "ext/templates/deb/rules.erb", "ext/files/debian/rules" |
35 |
templatizing("ext/templates/deb/rules.erb", "ext/files/debian/rules") |
27 |
chmod 0755, "ext/files/debian/rules" |
36 |
chmod 0755, "ext/files/debian/rules" |
28 |
erb "ext/templates/deb/changelog.erb", "ext/files/debian/changelog" |
37 |
templatizing("ext/templates/deb/changelog.erb", "ext/files/debian/changelog") |
29 |
erb "ext/templates/deb/preinst.erb", "ext/files/debian/#{@name}.preinst" |
38 |
templatizing("ext/templates/deb/preinst.erb", "ext/files/debian/#{@name}.preinst") |
30 |
erb "ext/templates/deb/postinst.erb", "ext/files/debian/#{@name}.postinst" |
39 |
templatizing("ext/templates/deb/postinst.erb", "ext/files/debian/#{@name}.postinst") |
31 |
erb "ext/templates/logrotate.erb", "ext/files/debian/#{@name}.logrotate" |
40 |
templatizing("ext/templates/logrotate.erb", "ext/files/debian/#{@name}.logrotate") |
32 |
erb "ext/templates/init_debian.erb", "ext/files/#{@name}.debian.init" |
41 |
templatizing("ext/templates/init_debian.erb", "ext/files/#{@name}.debian.init") |
33 |
cp_pr FileList["ext/templates/deb/*"], "ext/files/debian" |
42 |
cp_pr FileList["ext/templates/deb/*"], "ext/files/debian" |
34 |
cp_pr "ext/templates/puppetdb-ssl-setup", "ext/files" |
43 |
cp_pr "ext/templates/puppetdb-ssl-setup", "ext/files" |
35 |
chmod 0700, "ext/files/puppetdb-ssl-setup" |
44 |
chmod 0700, "ext/files/puppetdb-ssl-setup" |
36 |
rm_rf FileList["ext/files/debian/*.erb"] |
45 |
rm_rf FileList["ext/files/debian/*.erb"] |
37 |
|
46 |
|
38 |
# files for rpm |
47 |
# files for rpm |
39 |
erb "ext/templates/logrotate.erb", "ext/files/puppetdb.logrotate" |
48 |
templatizing("ext/templates/logrotate.erb", "ext/files/puppetdb.logrotate") |
40 |
erb "ext/templates/init_redhat.erb", "ext/files/puppetdb.redhat.init" |
49 |
templatizing("ext/templates/init_redhat.erb", "ext/files/puppetdb.redhat.init") |
41 |
erb "ext/templates/puppetdb_default.erb", "ext/files/puppetdb.default" |
50 |
templatizing("ext/templates/puppetdb_default.erb", "ext/files/puppetdb.default") |
42 |
|
51 |
|
43 |
# developer utility files for redhat |
52 |
# developer utility files for redhat |
44 |
mkdir_p "ext/files/dev/redhat" |
53 |
mkdir_p "ext/files/dev/redhat" |
45 |
erb "ext/templates/dev/redhat/redhat_dev_preinst.erb", "ext/files/dev/redhat/redhat_dev_preinst" |
54 |
templatizing("ext/templates/dev/redhat/redhat_dev_preinst.erb", "ext/files/dev/redhat/redhat_dev_preinst") |
46 |
erb "ext/templates/dev/redhat/redhat_dev_postinst.erb", "ext/files/dev/redhat/redhat_dev_postinst" |
55 |
templatizing("ext/templates/dev/redhat/redhat_dev_postinst.erb", "ext/files/dev/redhat/redhat_dev_postinst") |
|
|
56 |
|
57 |
# files for gentoo |
58 |
templatizing("ext/templates/conf_gentoo.erb", "ext/files/puppetdb.gentoo.conf") |
59 |
templatizing("ext/templates/init_gentoo.erb", "ext/files/puppetdb.gentoo.init") |
47 |
end |
60 |
end |
48 |
-- puppetdb-1.2.0/tasks/tar.rake.old |
61 |
++ puppetdb-1.2.0/tasks/tar.rake |
Lines 25-32
task :package => [ :clobber, JAR_FILE, :template ] do
Link Here
|
25 |
File.open(File.join(workdir,'version'), File::CREAT|File::TRUNC|File::RDWR, 0644) do |f| |
25 |
File.open(File.join(workdir,'version'), File::CREAT|File::TRUNC|File::RDWR, 0644) do |f| |
26 |
f.puts @version |
26 |
f.puts @version |
27 |
end |
27 |
end |
28 |
mv "#{workdir}/ext/files/debian", "#{workdir}/ext" |
28 |
# mv "#{workdir}/ext/files/debian", "#{workdir}/ext" |
29 |
cp_pr "puppet", "#{workdir}/ext/master" |
29 |
# cp_pr "puppet", "#{workdir}/ext/master" |
30 |
mkdir_p "pkg" |
30 |
mkdir_p "pkg" |
31 |
pkg_dir = File.expand_path(File.join(".", "pkg")) |
31 |
pkg_dir = File.expand_path(File.join(".", "pkg")) |
32 |
sh "cd #{temp}; tar --exclude=.gitignore --exclude=ext/packaging -zcf #{pkg_dir}/#{@name}-#{@version}.tar.gz #{@name}-#{@version}" |
32 |
sh "cd #{temp}; tar --exclude=.gitignore --exclude=ext/packaging -zcf #{pkg_dir}/#{@name}-#{@version}.tar.gz #{@name}-#{@version}" |