Commit 3768ebdb authored by Patrick J Cherry's avatar Patrick J Cherry
Browse files

updated Rakefile and auto-build update/test to fixate on lenny.

parent 14cf24cb
......@@ -12,7 +12,7 @@ AVAILABLE_BUILD_ARCH=["amd64", "i386"]
CLEAN.add %w(Release.asc Packages.new Sources.new Release.new *-stamp)
CLOBBER.add %w(Packages Sources Packages.gz Sources.gz Release Release.gpg *.deb *.tar.gz *.build *.diff.gz *.dsc *.changes)
DISTRO = File.basename(FileUtils.pwd)
DISTRO = "lenny"
#
# Monkey patch rake to output on stdout like normal people
......@@ -314,32 +314,33 @@ rsync_args = %w(
rsync_excludes = %w(*/ Makefile Rakefile TODO README .hgignore AUTOBUILD .hgtags)
hg_number = `hg id -n -r tip`.chomp
hg_number = `hg id -i -r tip`.chomp
htdocs_home = File.join(ENV['HOME'],"htdocs",DISTRO)
file "#{ENV['HOME']}/htdocs/#{hg_number}/Release.gpg" => "Release.gpg" do |t|
file "#{htdocs_home}/#{hg_number}/Release.gpg" => "Release.gpg" do |t|
cmd = %w(rsync) + rsync_args
rsync_excludes.each do |ex|
cmd << "--exclude '#{ex}'"
end
sh "#{cmd.join(" ")} --times $PWD/ #{ENV['HOME']}/htdocs/#{hg_number}"
rm "#{ENV['HOME']}/htdocs/#{DISTRO}"
sh "#{cmd.join(" ")} --times $PWD/ #{htdocs_home}/#{hg_number}"
rm "#{htdocs_home}/current"
end
file "#{ENV["HOME"]}/htdocs/#{DISTRO}" => "#{ENV['HOME']}/htdocs/#{hg_number}/Release.gpg" do |t|
sh "cd #{ENV["HOME"]}/htdocs && ln -sf #{hg_number} #{DISTRO}"
file "#{htdocs_home}/current" => "#{htdocs_home}/#{hg_number}/Release.gpg" do |t|
sh "cd #{htdocs_home} && ln -sf #{hg_number} current"
end
AVAILABLE_BUILD_ARCH.each do |arch|
file "#{ENV["HOME"]}/htdocs/#{DISTRO}/#{arch}" => "#{ENV["HOME"]}/htdocs/#{DISTRO}" do |t|
file "#{htdocs_home}/current/#{arch}" => "#{htdocs_home}/current" do |t|
sh "cd #{t.prerequisites.first} && ln -sf . #{arch}"
end
end
desc "Upload packages to the local tree"
task "upload" => AVAILABLE_BUILD_ARCH.collect{|arch| "#{ENV["HOME"]}/htdocs/#{DISTRO}/#{arch}"}
task "upload" => AVAILABLE_BUILD_ARCH.collect{|arch| "#{htdocs_home}/current/#{arch}"}
desc "Upload packages to mirror. !DANGER!"
task "upload-live" => ["#{ENV['HOME']}/htdocs/lenny"] + AVAILABLE_BUILD_ARCH.collect{|arch| "#{ENV["HOME"]}/htdocs/lenny/#{arch}"} do |t|
task "upload-live" => ["#{htdocs_home}/lenny"] + AVAILABLE_BUILD_ARCH.collect{|arch| "#{htdocs_home}/lenny/#{arch}"} do |t|
sh "rsync -Pr --delete #{t.prerequisites.first}/ repo@mirroir.sh:htdocs/symbiosis/lenny/"
end
......@@ -4,7 +4,6 @@ set -e
GUESTNAME=${GUESTNAME:-symtester}
BUILDER=${BUILDER:-symbiosis-builder.sh.bytemark.co.uk}
PACKAGE_DIR=${PACKAGE_DIR:-lenny}
mkdir -p "/srv/$GUESTNAME.test/config/"
touch "/srv/$GUESTNAME.test/config/antivirus"
......@@ -37,7 +36,7 @@ sleep 20
# package1,version1
# package2,version2
#
pkgvers=`wget -q -O - http://$BUILDER/$PACKAGE_DIR/Packages | grep '^\(Package\|Version\)' | sed -n 'N;s/\(Package\|Version\): //g;s/\n/,/;p' | uniq`
pkgvers=`wget -q -O - http://$BUILDER/lenny/current/Packages | grep '^\(Package\|Version\)' | sed -n 'N;s/\(Package\|Version\): //g;s/\n/,/;p' | uniq`
for pkgver in $pkgvers ; do
pkg=${pkgver%,*}
......
......@@ -3,7 +3,6 @@
set -e
BUILDER=${BUILDER:-symbiosis-builder.sh.bytemark.co.uk}
PACKAGE_DIR=${PACKAGE_DIR:-lenny}
#
# Make sure we're up to date
......@@ -25,7 +24,7 @@ echo "Changing package lists..."
#
# Now change the package lists
#
sed -i -e "s#http://\(vhost\|symbiosis\).bytemark.co.uk/[^ ]\+#http://$BUILDER/$PACKAGE_DIR#g" /etc/apt/sources.list{,.security}
sed -i -e "s#http://\(vhost\|symbiosis\).bytemark.co.uk/[^ ]\+#http://$BUILDER/lenny/current#g" /etc/apt/sources.list{,.security}
echo "Doing second upgrade..."
#
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment