[Collab-qa-commits] r1803 - in debcluster/scripts: . bin bin.local tasks

Lucas Nussbaum lucas at alioth.debian.org
Sat Sep 25 06:28:26 UTC 2010


Author: lucas
Date: 2010-09-25 06:28:21 +0000 (Sat, 25 Sep 2010)
New Revision: 1803

Added:
   debcluster/scripts/bin.local/instest-squeeze-amd64.sh
   debcluster/scripts/bin.local/rebuild-squeeze-main-squeeze64.sh
Modified:
   debcluster/scripts/bin.local/rebuild-sid-main-sid64.sh
   debcluster/scripts/bin/dc-mountnfs
   debcluster/scripts/bin/dc-startnodes
   debcluster/scripts/tasks/buildpackage.rb
   debcluster/scripts/tasks/instest.rb
   debcluster/scripts/tasks/preparenode.rb
   debcluster/scripts/update-mirror-debian.bash
Log:
various minor changes

Modified: debcluster/scripts/bin/dc-mountnfs
===================================================================
--- debcluster/scripts/bin/dc-mountnfs	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/bin/dc-mountnfs	2010-09-25 06:28:21 UTC (rev 1803)
@@ -4,6 +4,8 @@
 
 echo "Starting dc-mountnfs -- $(date)"
 
+ln -sf /bin/bash /bin/sh
+
 if [ $(mount |grep " /tmp "| grep ext2 | wc -l) -eq 1 ]; then
   part=$(mount | grep " /tmp " | cut -d ' ' -f 1)
   tune2fs -j $part || true
@@ -13,6 +15,8 @@
 set +x
 
 apt-get update
+# work around for outdated /etc/ldap/ldap.conf
+rm -f /etc/ldap/ldap.conf || true
 export DEBIAN_FRONTEND=noninteractive
 apt-get -y install nfs-common initscripts sysvinit-utils
 

Modified: debcluster/scripts/bin/dc-startnodes
===================================================================
--- debcluster/scripts/bin/dc-startnodes	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/bin/dc-startnodes	2010-09-25 06:28:21 UTC (rev 1803)
@@ -20,7 +20,7 @@
   ths << Thread::new(n) do |node|
     system("scp #{SSHOPTS.join(' ')} ~/bin/dc-mountnfs #{LOGIN}@#{node}:/root/dc-mountnfs")
     system("ssh #{SSHOPTS.join(' ')} #{LOGIN}@#{node} /root/dc-mountnfs")
-    system("ssh #{SSHOPTS.join(' ')} #{LOGIN}@#{node} \"/dc/debcluster/scripts/tasks/preparenode.rb --log /dc/data/logs/preparenode/#{node}.$(date --iso)\"")
+    system("ssh #{SSHOPTS.join(' ')} #{LOGIN}@#{node} \"/dc/debcluster/scripts/tasks/preparenode.rb --log /dc/data/logs/preparenode/#{node}.$(date --iso)\" --type 3")
   end
 end
 ths.each do |t|

Added: debcluster/scripts/bin.local/instest-squeeze-amd64.sh
===================================================================
--- debcluster/scripts/bin.local/instest-squeeze-amd64.sh	                        (rev 0)
+++ debcluster/scripts/bin.local/instest-squeeze-amd64.sh	2010-09-25 06:28:21 UTC (rev 1803)
@@ -0,0 +1,39 @@
+#!/bin/bash
+
+set -e
+
+# needs TARGET WALLTIME NODES
+#export OARSUBOPT="-p \"netgdx='YES'\""
+
+ARCH=amd64
+ID=squeeze64-amd64.$(date --iso)
+SUBNODES=5
+JOBTYPE=3
+#LIST=~/failed
+#LISTOK=~/inst_ok
+
+cd ~/collab-qa/debcluster/scripts
+
+cat ~/mirrors/debian/dists/squeeze/main/binary-${ARCH}/Packages.gz | gunzip |grep "^Package:" | awk '{print $2}' | \
+grep -v -w libasio-dev | sort > /tmp/wp.${ID}.1
+cat /tmp/wp.${ID}.1 > /tmp/wp.${ID}.2
+if [ "$LIST" != "" ];then
+  fcb -l /tmp/wp.$ID.1 and $LIST > /tmp/wp.$ID.2
+fi
+if [ "$LISTOK" != "" ];then
+  fcb -l /tmp/wp.$ID.1 minus $LISTOK > /tmp/wp.$ID.2
+fi
+#fcb /tmp/wp.${ID}.1 minus piuparts/piuparts.untestable > /tmp/wp.${ID}.2
+for p in $(</tmp/wp.${ID}.2); do
+  echo "it_${ID}_${p} [0,-1] /dc/debcluster/scripts/tasks/instest.rb -p $p -c lsqueeze64-instest -l /dc/data/logs/inst.${ID}/${p}.log --upgrade-chroot llenny64-instest"
+done > /tmp/tasklisttext.inst.${ID}.3
+echo "Tasklist (in text) is /tmp/tasklisttext.inst.${ID}.3"
+
+./buildtasklist.rb < /tmp/tasklisttext.inst.${ID}.3 > /tmp/tl.$ID
+TL=$(basename /tmp/tl.$ID)
+
+scp /tmp/tl.$ID $TARGET:
+
+ENV=lenny-x64-base
+ENV=squeeze-minimal
+ssh $TARGET "oarsub -t deploy $OAROPTS -l nodes=${NODES},walltime=${WALLTIME} \"/home/lnussbaum/bin/katapult3 --deploy-env ${ENV} --copy-ssh-key -- /home/lnussbaum/bin/dc-startcluster ${TL} --update squeeze64-instest-source --update lenny64-instest-source --type $JOBTYPE --subnodes ${SUBNODES} --mirror\""


Property changes on: debcluster/scripts/bin.local/instest-squeeze-amd64.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: debcluster/scripts/bin.local/rebuild-sid-main-sid64.sh
===================================================================
--- debcluster/scripts/bin.local/rebuild-sid-main-sid64.sh	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/bin.local/rebuild-sid-main-sid64.sh	2010-09-25 06:28:21 UTC (rev 1803)
@@ -28,7 +28,8 @@
 grep -v -w linux-modules-di-i386-2.6 |\
 grep -v -w linux-kernel-di-i386-2.6 |\
 grep -v -w linux-modules-di-amd64-2.6 |\
-grep -v -w linux-kernel-di-amd64-2.6\
+grep -v -w linux-kernel-di-amd64-2.6 |\
+grep -v -w openclipart\
  > /tmp/wb_$ID.1.1
 rebuild-archive/pasfilter.rb $ARCH < /tmp/wb_$ID.1.1 > /tmp/wb_$ID.2
 if [ "$LIST" != "" ]; then

Added: debcluster/scripts/bin.local/rebuild-squeeze-main-squeeze64.sh
===================================================================
--- debcluster/scripts/bin.local/rebuild-squeeze-main-squeeze64.sh	                        (rev 0)
+++ debcluster/scripts/bin.local/rebuild-squeeze-main-squeeze64.sh	2010-09-25 06:28:21 UTC (rev 1803)
@@ -0,0 +1,53 @@
+#!/bin/bash
+
+# needs TARGET WALLTIME NODES OAROPTS
+
+ARCH=amd64
+CHROOT=lsqueeze64
+ID=${CHROOT}-${ARCH}.$(date --iso)
+SUBNODES=4
+JOBTYPE=3
+#LIST=~/failed
+WALL=wall
+#WALL=
+cd /dc/debcluster/scripts
+# reasons for exclusion:
+# #419692: mozart-gtk: FTBFS: 'parse error'(9681 '__pthread_slist_t'|pthread_attr_t|pthread_t|fsfilcnt_t|fsblkcnt_t|blkcnt_t|fd_mask|fd_set|'__fd_mask'|suseconds_t|,,,|,,,)
+# #458660: ardour: FTBFS: build times out 
+# NNN: docbook-xsl-saxon: FTBFS: build blocks
+# #479923: libmodule-install-perl: FTBFS: test blocked
+# #479935: autopsy: FTBFS: prompts for location of perl executable 
+
+# we don't exclude them
+#grep -v -w ardour |\
+#grep -v -w docbook-xsl-saxon |\
+#grep -v -w libmodule-install-perl |\
+#grep -v -w autopsy |\
+wget -O - --header="Host: udd.debian.org" http://localhost:12104/cgi-bin/sources_rebuild_squeeze.cgi | awk '{print $1 " " $2}' |\
+grep -v -w debian-installer |\
+grep -v -w linux-modules-di-i386-2.6 |\
+grep -v -w linux-kernel-di-i386-2.6 |\
+grep -v -w linux-modules-di-amd64-2.6 |\
+grep -v -w linux-kernel-di-amd64-2.6 |\
+grep -v -w openclipart\
+ > /tmp/wb_$ID.1.1
+rebuild-archive/pasfilter.rb $ARCH < /tmp/wb_$ID.1.1 > /tmp/wb_$ID.2
+if [ "$LIST" != "" ]; then
+  fcb -l /tmp/wb_$ID.2 and $LIST > /tmp/wb_$ID.2.1
+  mv /tmp/wb_$ID.2.1 /tmp/wb_$ID.2
+fi
+rebuild-archive/annotatewithpriority.rb rebuild-archive/buildtime.list < /tmp/wb_$ID.2 > /tmp/wb_$ID.3
+rebuild-archive/gentasklist.rb $CHROOT $ID < /tmp/wb_$ID.3 | bogosort -n > /tmp/tasklisttext_$ID
+echo "Tasklist (in text) is /tmp/tasklisttext_$ID"
+./buildtasklist.rb < /tmp/tasklisttext_$ID > /tmp/tl.$ID
+TL=$(basename /tmp/tl.$ID)
+
+scp /tmp/tl.$ID $TARGET:
+
+#ENV=sid-x64-base-1.1
+#ENV=sid-x64-base-1.1.20090210
+ENV=lenny-x64-base
+ENV=squeeze-minimal
+#ENV=lenny-x64-base-2.0
+#ssh $TARGET "oarsub -t deploy $OAROPTS -l nodes=${NODES},walltime=${WALLTIME} \"/home/lnussbaum/bin/katapult3 --deploy-env ${ENV} --copy-ssh-key -- /home/lnussbaum/bin/dc-startcluster ${TL} --update sid64-source --type $JOBTYPE --subnodes ${SUBNODES} --mirror\""
+ssh $TARGET "oarsub -t deploy $OAROPTS -l nodes=${NODES},walltime=${WALLTIME} \"/home/lnussbaum/bin/katapult3 --deploy-env ${ENV} --copy-ssh-key --sleep -- /home/lnussbaum/bin/dc-startcluster ${TL} --type $JOBTYPE --subnodes ${SUBNODES} --mirror --update squeeze64-source\""


Property changes on: debcluster/scripts/bin.local/rebuild-squeeze-main-squeeze64.sh
___________________________________________________________________
Added: svn:executable
   + *

Modified: debcluster/scripts/tasks/buildpackage.rb
===================================================================
--- debcluster/scripts/tasks/buildpackage.rb	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/tasks/buildpackage.rb	2010-09-25 06:28:21 UTC (rev 1803)
@@ -63,7 +63,7 @@
 end
 
 # Copy chroot locally if needed FIXME for other chroots
-if ['lsid32', 'llenny32', 'lsid64', 'lsid64b', 'lsid64c', 'llucid32', 'llucid64', 'llucid64b', 'llucid64c', 'lubuntu32', 'lubuntu64'].include?(chroot)
+if ['lsid32', 'llenny32', 'lsid64', 'lsid64b', 'lsid64c', 'llucid32', 'llucid64', 'llucid64b', 'llucid64c', 'lubuntu32', 'lubuntu64', 'lsqueeze64'].include?(chroot)
   chr = chroot.gsub(/^l/,'')
   if not File::exists?("/debscratch/chroots/#{chr}.tgz")
     system("lockfile-create /debscratch/chroots/#{chr}.lock")

Modified: debcluster/scripts/tasks/instest.rb
===================================================================
--- debcluster/scripts/tasks/instest.rb	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/tasks/instest.rb	2010-09-25 06:28:21 UTC (rev 1803)
@@ -57,7 +57,7 @@
 system("iptables-save -c > #{$rulesbefore} || true")
 
 # Copy chroot locally if needed
-if ['lsid32', 'llenny32', 'lsid64', 'lsid64b', 'lsid64c', 'llucid32', 'llucid64'].include?($chroot)
+if ['lsid32', 'llenny32', 'lsid64', 'lsid64-instest', 'lsid64b', 'lsid64c', 'llucid32', 'llucid64', 'lsqueeze64-instest'].include?($chroot)
   chr = $chroot.gsub(/^l/,'')
   if not File::exists?("/debscratch/chroots/#{chr}.tgz")
     system("lockfile-create /debscratch/chroots/#{chr}.lock")
@@ -65,7 +65,7 @@
       system("cp /dc/data/chroots/#{chr}.tgz /debscratch/chroots/#{chr}.tgz.#{$$}")
       system("mv /debscratch/chroots/#{chr}.tgz.#{$$} /debscratch/chroots/#{chr}.tgz")
       # Updating to refresh apt-p2p meta-informations
-      system("schroot -c #{$chroot} apt-get update >/dev/null 2>&1")
+      system("schroot -c #{$chroot} apt-get -o Debug::pkgProblemResolver=true update >/dev/null 2>&1")
     end
     system('lockfile-remove /debscratch/chroots/#{chr}.lock')
   end
@@ -133,7 +133,7 @@
 unstable_version = s.split(/\n/).grep(/^Version: /)[0].split(' ')[1]
 puts unstable_version
 print "-- Finding depends: "
-s = `schroot -c #{chr} -r -- apt-get -s install #{$package} 2>&1`.chomp
+s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -s install #{$package} 2>&1`.chomp
 if $?.exitstatus != 0
   puts "FAILED\n#{form(s)}"
   $tests_failed << 'find-deps'
@@ -142,7 +142,7 @@
 pkgs = (s.split(/\n/).grep(/^Inst /).map { |e| e.split(' ')[1] } - [$package])
 puts pkgs.join(' ')
 print "-- Installing depends: "
-s = `schroot -c #{chr} -r -- apt-get -y install #{pkgs.join(' ')} 2>&1`
+s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install #{pkgs.join(' ')} 2>&1`
 if $?.exitstatus != 0
   puts "FAILED\n#{form(s)}"
   $tests_failed << 'inst-deps'
@@ -152,7 +152,7 @@
   $tests_ok << 'inst-deps'
 end
 print "-- Installing the package after its depends: "
-s = `schroot -c #{chr} -r -- apt-get -y install #{$package} 2>&1`
+s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install #{$package} 2>&1`
 if $?.exitstatus != 0
   puts "FAILED\n#{form(s)}"
   $tests_failed << 'inst-after-deps'
@@ -164,7 +164,7 @@
 
 chr = create_chroot
 print "-- Installing the package together with its depends: "
-s = `schroot -c #{chr} -r -- apt-get -y install #{$package} 2>&1`
+s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install #{$package} 2>&1`
 if $?.exitstatus != 0
   puts "FAILED\n#{form(s)}"
   $tests_failed << 'inst-with-deps'
@@ -176,7 +176,7 @@
 
 chr = create_chroot
 print "-- Installing the package with aptitude: "
-s = `schroot -c #{chr} -r -- apt-get -y install aptitude 2>&1`
+s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install aptitude 2>&1`
 if $?.exitstatus != 0
   puts "FAILED while installing aptitude\n#{form(s)}"
   $tests_failed << 'inst-aptitude'
@@ -194,7 +194,7 @@
 chr = create_chroot
 print "-- Installing the package together with its depends and recommends: "
 pkgs_before = `schroot -c #{chr} -r -- dpkg -l 2>&1`.split(/\n/).grep(/^ii /).map { |e| e.split(/\s+/)[1] }
-s = `schroot -c #{chr} -r -- apt-get -y install -o APT::Install-Recommends=true #{$package} 2>&1`
+s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install -o APT::Install-Recommends=true #{$package} 2>&1`
 if $?.exitstatus != 0
   puts "FAILED\n#{form(s)}"
   $tests_failed << 'inst-with-recs'
@@ -203,7 +203,7 @@
   $tests_ok << 'inst-with-recs'
   pkgs_after = `schroot -c #{chr} -r -- dpkg -l 2>&1`.split(/\n/).grep(/^ii /).map { |e| e.split(/\s+/)[1] }
   print "-- Removing the package: "
-  s = `schroot -c #{chr} -r -- apt-get -y --force-yes remove #{$package} 2>&1`
+  s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y --force-yes remove #{$package} 2>&1`
   if $?.exitstatus != 0
     puts "FAILED\n#{form(s)}"
     $tests_failed << 'rm-pkg'
@@ -211,7 +211,9 @@
     puts "OK\n#{form(s)}"
     $tests_ok << 'rm-pkg'
     print "-- Removing all dependencies: "
-    s = `schroot -c #{chr} -r -- apt-get -y --force-yes remove #{(pkgs_after - pkgs_before - [$package]).join(' ')} 2>&1`
+    # ignore problems with adduser and ucf at this point
+    deps = (pkgs_after - pkgs_before - [$package, 'adduser', 'ucf'])
+    s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y --force-yes remove #{deps.join(' ')} 2>&1`
     if $?.exitstatus != 0
       puts "FAILED\n#{form(s)}"
       $tests_failed << 'rm-deps'
@@ -233,7 +235,7 @@
 
 if $uchroot != nil
   # Copy chroot locally if needed
-  if ['lsid32', 'llenny32', 'llenny64', 'lsid64', 'lsid64b', 'lsid64c', 'llucid32', 'llucid64'].include?($uchroot)
+  if ['lsid32', 'llenny32', 'llenny64', 'llenny64-instest', 'lsid64', 'lsid64b', 'lsid64c', 'llucid32', 'llucid64'].include?($uchroot)
     chr = $uchroot.gsub(/^l/,'')
     if not File::exists?("/debscratch/chroots/#{chr}.tgz")
       system("lockfile-create /debscratch/chroots/#{chr}.lock")
@@ -241,7 +243,7 @@
         system("cp /dc/data/chroots/#{chr}.tgz /debscratch/chroots/#{chr}.tgz.#{$$}")
         system("mv /debscratch/chroots/#{chr}.tgz.#{$$} /debscratch/chroots/#{chr}.tgz")
         # Updating to refresh apt-p2p meta-informations
-        system("schroot -c #{$uchroot} apt-get update >/dev/null 2>&1")
+        system("schroot -c #{$uchroot} apt-get -o Debug::pkgProblemResolver=true update >/dev/null 2>&1")
       end
       system('lockfile-remove /debscratch/chroots/#{chr}.lock')
     end
@@ -257,7 +259,7 @@
      sver = sver[0].split(' ')[1]
      puts sver
     print "-- Installing #{$package} in #{$uchroot}: "
-    s = `schroot -c #{chr} -r -- apt-get -y install #{$package} 2>&1`
+    s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install #{$package} 2>&1`
     if $?.exitstatus != 0
       puts "FAILED\n#{form(s)}"
       $tests_failed << 'inst-old'
@@ -265,9 +267,16 @@
       puts "OK\n#{form(s)}"
       $tests_ok << 'inst-old'
       print "-- Upgrading distribution: "
-      s = `schroot -c #{chr} -r -- sed -i 's/ lenny / sid /' /etc/apt/sources.list 2>&1`
-      s = `schroot -c #{chr} -r -- apt-get update 2>&1`
-      s = `schroot -c #{chr} -r -- apt-get -y dist-upgrade 2>&1`
+      s = "## Updating /etc/apt/sources.list...\n"
+      s += `schroot -c #{chr} -r -- sed -i 's/ lenny / squeeze /' /etc/apt/sources.list 2>&1`
+      s += "## Running apt-get update...\n"
+      s += `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true update 2>&1`
+      s += "## Running apt-get -y install apt...\n"
+      s += `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install apt 2>&1`
+      s += "## Running apt-get -y upgrade...\n"
+      s += `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y upgrade 2>&1`
+      s += "## Running apt-get -y dist-upgrade...\n"
+      s += `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y dist-upgrade 2>&1`
       if $?.exitstatus != 0
         puts "FAILED\n#{form(s)}"
         $tests_failed << 'upgrade-old'
@@ -293,6 +302,23 @@
         else
           puts "FAILED (#{new_version} != #{unstable_version})"
           $tests_failed << 'pkg-upgrade'
+          print "-- Packages that will be removed if installed: "
+          s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -s install #{$package} 2>&1`.chomp
+          if $?.exitstatus != 0
+            puts "FAILED\n#{form(s)}"
+            $tests_failed << 'find-rm-after-upgrade'
+            exit(0)
+          end
+          pkgs = (s.split(/\n/).grep(/^Remv /).map { |e| e.split(' ')[1] })
+          puts pkgs.join(' ')
+	  print "-- Trying to install new version anyway: "
+	  s = `schroot -c #{chr} -r -- apt-get -o Debug::pkgProblemResolver=true -y install #{$package} 2>&1`
+	  if $?.exitstatus != 0
+            puts "FAILED\n#{form(s)}"
+            tests_failed << 'inst-new-after-upgrade'
+	  else
+            puts "OK\n#{form(s)}"
+          end
         end
       end
     end

Modified: debcluster/scripts/tasks/preparenode.rb
===================================================================
--- debcluster/scripts/tasks/preparenode.rb	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/tasks/preparenode.rb	2010-09-25 06:28:21 UTC (rev 1803)
@@ -59,7 +59,7 @@
 puts "Starting preparenode.rb -- #{Time::now}"
 
 # SSH
-system("mkdir -p ~/.ssh &>/dev/null")
+system("mkdir -p ~/.ssh >/dev/null 2>&1")
 system_r("cp /dc/data/ssh/* ~/.ssh/")
 
 system_r("sed -i 's/.*MaxStartups.*/MaxStartups 200/' /etc/ssh/sshd_config")
@@ -73,16 +73,16 @@
 system("rm -f /etc/apt/apt.conf.d/proxy")
 if mirror.nil?
   File::open('/etc/apt/sources.list', 'w') do |f|
-    f.puts "deb http://beaujolais.grenoble.grid5000.fr/mirrors/debian lenny main contrib non-free"
     f.puts "deb http://beaujolais.grenoble.grid5000.fr/mirrors/debian squeeze main contrib non-free"
     f.puts "deb-src http://beaujolais.grenoble.grid5000.fr/mirrors/debian sid main contrib non-free"
+    f.puts "deb-src http://beaujolais.grenoble.grid5000.fr/mirrors/debian squeeze main contrib non-free"
     f.puts "deb-src http://beaujolais.grenoble.grid5000.fr/mirrors/debian lenny main contrib non-free"
   end
 else
   File::open('/etc/apt/sources.list', 'w') do |f|
-    f.puts "deb #{mirror} lenny main contrib non-free"
     f.puts "deb #{mirror} squeeze main contrib non-free"
     f.puts "deb-src #{mirror} sid main contrib non-free"
+    f.puts "deb-src #{mirror} squeeze main contrib non-free"
     f.puts "deb-src #{mirror} lenny main contrib non-free"
   end
 end
@@ -94,12 +94,8 @@
 File::open('/etc/apt/preferences', 'w') do |f|
   f.puts <<-EOF
 Package: *
-Pin: release a=stable
-Pin-Priority: 800
-
-Package: *
 Pin: release a=testing
-Pin-Priority: 750
+Pin-Priority: 800
 EOF
 end
 
@@ -110,16 +106,11 @@
 
 # pre-upgrade stuff
 system("apt-get -y remove --purge nscd libc6-i386")
-system_r("apt-get install -t testing -y util-linux libc6 nscd")
+system_r("apt-get install -y util-linux libc6 nscd")
 
 # basic packages
-system_r("apt-get install -y dpkg util-linux apt lvm2 nullmailer")
 system("rm -rf /etc/schroot")
-system_r("apt-get install -y fakeroot pbuilder debootstrap lockfile-progs")
-system_r("apt-get install -y -t testing lintian sbuild piuparts")
-# buxy's sbuild packages
-#system_r("dpkg -i /dc/data/sbuild/*deb")
-#system_r("apt-get -f install")
+system_r("apt-get install --no-install-recommends -y nullmailer fakeroot debootstrap lockfile-progs lintian sbuild")
 
 system_r("echo 'DEBIAN_FRONTEND=noninteractive' >> /etc/environment")
 ENV['http_proxy'] = nil
@@ -139,7 +130,7 @@
 system_r("mount -o remount,commit=86400 /tmp")
 end
 
-system_r("mkdir -p #{scratch}/lucas &>/dev/null")
+system_r("mkdir -p #{scratch}/lucas >/dev/null 2>&1")
 system_r("ln -sf #{scratch}/lucas /debscratch")
 
 if type == 2 # tmpfs
@@ -152,28 +143,28 @@
 
 if type == 3 # reformat /tmp as swap area.
   system("umount /tmp")
-  system("umount /scratch")
   system_r("mkswap /dev/sda5")
   system_r("swapon /dev/sda5")
   size = `grep SwapTotal: /proc/meminfo`.chomp.split[1].to_i * 1024
   system_r("mount -t tmpfs -o size=#{size},nr_inodes=0 plop /tmp")
   system_r("chmod a+rwt /tmp")
-  system_r("mkdir -p /tmp/lucas &>/dev/null")
+  system_r("mkdir -p /tmp/lucas >/dev/null 2>&1")
   system_r("ln -sf /tmp/lucas /debscratch")
 end
 
 system_r("rm -rf /var/lib/schroot")
-system_r("mkdir -p #{scratch}/lucas/schroot /debscratch/chroots &>/dev/null")
+system_r("mkdir -p #{scratch}/lucas/schroot /debscratch/chroots >/dev/null 2>&1")
 system_r("ln -sf #{scratch}/lucas/schroot /var/lib/schroot")
 
-system_r("mkdir -p #{scratch}/lucas/approx &>/dev/null")
+system_r("mkdir -p #{scratch}/lucas/approx >/dev/null 2>&1")
 system_r("ln -sf #{scratch}/lucas/approx /var/cache/approx")
 system_r("apt-get install -y approx")
 system_r("chown approx:approx #{scratch}/lucas/approx")
-system_r("/etc/init.d/approx restart")
+system_r("grep -q nowait.65000 /etc/inetd.conf || sed -i s/nowait/nowait.65000/ /etc/inetd.conf")
+system_r("/etc/init.d/openbsd-inetd restart")
 if aptp2p
   system_r("apt-get install -y apt-p2p")
-  system_r("mkdir -p #{scratch}/lucas/apt-p2p &>/dev/null")
+  system_r("mkdir -p #{scratch}/lucas/apt-p2p >/dev/null 2>&1")
   system_r("chown apt-p2p #{scratch}/lucas/apt-p2p")
   system_r("cp /dc/debcluster/configs/apt-p2p.conf /etc/apt-p2p/")
   system_r("/etc/init.d/apt-p2p restart")

Modified: debcluster/scripts/update-mirror-debian.bash
===================================================================
--- debcluster/scripts/update-mirror-debian.bash	2010-09-25 06:26:11 UTC (rev 1802)
+++ debcluster/scripts/update-mirror-debian.bash	2010-09-25 06:28:21 UTC (rev 1803)
@@ -4,7 +4,7 @@
 ROOT=debian
 DIST=lenny,squeeze,sid,experimental
 SECT=main,contrib,non-free,main/debian-installer
-ARCH=amd64,i386
+ARCH=amd64,i386,kfreebsd-amd64,kfreebsd-i386
 CLEANUP=--cleanup
 TARGET=/home/lnussbaum/mirrors/debian
 




More information about the Collab-qa-commits mailing list