git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1024 980ebf18-57e1-0310-9a29-db15c13687c0
This commit is contained in:
luke 2006-03-13 20:05:18 +00:00
Родитель 805b32bc29
Коммит 271a8d2553
2 изменённых файлов: 58 добавлений и 5 удалений

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

@ -18,6 +18,8 @@ end
require 'rake/clean'
require 'rake/testtask'
require 'facter'
if $rdoc
require 'rake/rdoctask'
end
@ -49,10 +51,19 @@ if ENV['HOSTS']
else
TESTHOSTS = %w{fedora1 rh3a culain openbsd1 centos1}
end
OS = Facter["operatingsystem"].value
#TESTHOSTS = %w{sol10b}
# The default task is run if rake is given no explicit arguments.
$sitedir = $:.find { |d| d =~ /site_ruby$/ }
unless $sitedir
raise "Could not find site_ruby directory"
end
desc "Default Task"
task :default => :alltests
@ -203,7 +214,6 @@ the configuration.
}
Rake::GemPackageTask.new(spec) { |pkg|
#pkg.need_zip = true
pkg.need_tar = true
}
CLEAN.include("pkg")
@ -424,10 +434,45 @@ task :fedorarpm => [:package] do
sh %{ssh fedora1 'cd puppet; rake rpm'}
end
desc "Create a Native Package"
task :nativepkg do
# Okay, first we get a file list
def epmlist(match, prefix = "/usr")
dest = "../epmtmp/#{OS}-#{match}"
list = %x{mkepmlist --prefix #{prefix} ../puppet-#{PKG_VERSION}}.gsub(/luke/, "0")
list = list.split(/\n/).find_all do |line|
line =~ /#{prefix}\/#{match}/
end.join("\n")
File.open(dest, "w") { |f| f.puts list }
return dest
end
directory "pkg/epm"
directory "pkg/epmtmp"
desc "Create packages using EPM"
task :epmpkg => ["pkg/epm", "pkg/epmtmp", :package] do
$epmdir = "pkg/epm"
$epmtmpdir = "pkg/epmtmp"
Dir.chdir($epmdir) do
type = nil
binfile = epmlist("bin", "/usr")
libfile = epmlist("lib", $sitedir)
listfile = "../epmtmp/#{OS}.list"
sh %{cat ../../conf/epm.list #{binfile} #{libfile} > #{listfile}}
sh %{epm -f native puppet #{listfile}}
end
end
desc "Make all of the appropriate packages"
task :allepmpkgs => [:package] do
%w{freebsd1 culain}.each do |host|
sh %{ssh #{host} 'cd puppet; rake epmpkg'}
end
end
# $Id$

8
conf/epm.list Normal file
Просмотреть файл

@ -0,0 +1,8 @@
%product Puppet
%copyright 2004-2005 by Reductive Labs, All Rights Reserved
%vendor Reductive Labs
%license COPYING
%readme README
%description System Automation and Configuration Management Software
%version 0.15.0
%requires facter 1.1