summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-13 20:05:18 +0000
committerluke <luke@980ebf18-57e1-0310-9a29-db15c13687c0>2006-03-13 20:05:18 +0000
commit271a8d2553c21c50d168b2cc7b69fd41f58bc330 (patch)
treedc692bc32e6c8937108f30db6d613886638e577d
parent805b32bc29a3c8f19300c7829b43ee46944ef11e (diff)
downloadpuppet-271a8d2553c21c50d168b2cc7b69fd41f58bc330.tar.gz
puppet-271a8d2553c21c50d168b2cc7b69fd41f58bc330.tar.xz
puppet-271a8d2553c21c50d168b2cc7b69fd41f58bc330.zip
Adding EPM package building.
git-svn-id: https://reductivelabs.com/svn/puppet/trunk@1024 980ebf18-57e1-0310-9a29-db15c13687c0
-rw-r--r--Rakefile55
-rw-r--r--conf/epm.list8
2 files changed, 58 insertions, 5 deletions
diff --git a/Rakefile b/Rakefile
index 7cf78f072..06cfad5e6 100644
--- a/Rakefile
+++ b/Rakefile
@@ -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$
diff --git a/conf/epm.list b/conf/epm.list
new file mode 100644
index 000000000..d7d7b40e5
--- /dev/null
+++ b/conf/epm.list
@@ -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