Merge lp:~ember/update-manager/ubuntu.bug1002956 into lp:update-manager

Proposed by Pedro Fragoso on 2012-05-22
Status: Merged
Merge reported by: Michael Vogt
Merged at revision: not available
Proposed branch: lp:~ember/update-manager/ubuntu.bug1002956
Merge into: lp:update-manager
Diff against target: 336905 lines (+333319/-0) (has conflicts)
641 files modified
.bzr-builddeb/default.conf (+2/-0)
AUTHORS (+19/-0)
AutoUpgradeTester/README (+8/-0)
AutoUpgradeTester/UpgradeTestBackend.py (+167/-0)
AutoUpgradeTester/UpgradeTestBackendChroot.py (+338/-0)
AutoUpgradeTester/UpgradeTestBackendEC2.py (+329/-0)
AutoUpgradeTester/UpgradeTestBackendQemu.py (+585/-0)
AutoUpgradeTester/UpgradeTestBackendSSH.py (+218/-0)
AutoUpgradeTester/UpgradeTestBackendSimulate.py (+32/-0)
AutoUpgradeTester/apt-watchdog (+50/-0)
AutoUpgradeTester/auto-install-tester.py (+207/-0)
AutoUpgradeTester/auto-upgrade-tester (+383/-0)
AutoUpgradeTester/auto-upgrade-tester-jenkins-slave (+60/-0)
AutoUpgradeTester/chart_dpkg_progress.py (+51/-0)
AutoUpgradeTester/install_all.py (+235/-0)
AutoUpgradeTester/install_all_main.py (+79/-0)
AutoUpgradeTester/install_blacklist.cfg (+33/-0)
AutoUpgradeTester/install_universe (+263/-0)
AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave (+12/-0)
AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave.conf (+28/-0)
AutoUpgradeTester/jeos/README (+49/-0)
AutoUpgradeTester/jeos/create-base-image.sh (+36/-0)
AutoUpgradeTester/post_upgrade_tests/README (+8/-0)
AutoUpgradeTester/post_upgrade_tests/conffiles_test.sh (+12/-0)
AutoUpgradeTester/post_upgrade_tests/debconf_test.py (+65/-0)
AutoUpgradeTester/post_upgrade_tests/debsums_lite.py (+19/-0)
AutoUpgradeTester/post_upgrade_tests/kernel_test.py (+24/-0)
AutoUpgradeTester/post_upgrade_tests/python_import_test.py (+104/-0)
AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_system.py (+66/-0)
AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_user.py (+98/-0)
AutoUpgradeTester/post_upgrade_tests/xserver_test.py (+29/-0)
AutoUpgradeTester/prepare_lts_desktop (+22/-0)
AutoUpgradeTester/prepare_lts_user (+116/-0)
AutoUpgradeTester/profile/auto-install-tester/DistUpgrade.cfg (+60/-0)
AutoUpgradeTester/profile/auto-install-tester/pkgs.cfg (+1/-0)
AutoUpgradeTester/profile/auto-install-tester/pkgs_blacklist.txt (+3/-0)
AutoUpgradeTester/profile/dapper-hardy-lucid-server/DistUpgrade.cfg (+67/-0)
AutoUpgradeTester/profile/dapper-hardy-lucid-ubuntu/DistUpgrade.cfg (+67/-0)
AutoUpgradeTester/profile/defaults.cfg.d/defaults.cfg (+63/-0)
AutoUpgradeTester/profile/edubuntu/DistUpgrade.cfg (+8/-0)
AutoUpgradeTester/profile/euca-cloud/DistUpgrade.cfg (+4/-0)
AutoUpgradeTester/profile/euca-cloud/pkgs.cfg (+5/-0)
AutoUpgradeTester/profile/euca-nc/DistUpgrade.cfg (+3/-0)
AutoUpgradeTester/profile/euca-nc/pkgs.cfg (+2/-0)
AutoUpgradeTester/profile/kubuntu/DistUpgrade.cfg (+3/-0)
AutoUpgradeTester/profile/lts-kubuntu/DistUpgrade.cfg (+6/-0)
AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg (+12/-0)
AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg.dapper (+65/-0)
AutoUpgradeTester/profile/lts-main-all-amd64/install_blacklist.cfg (+46/-0)
AutoUpgradeTester/profile/lts-main-all-amd64/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-main-all-amd64/prerequists-sources.list (+5/-0)
AutoUpgradeTester/profile/lts-main-all-amd64/removal_blacklist.cfg (+11/-0)
AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg (+8/-0)
AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg.dapper (+65/-0)
AutoUpgradeTester/profile/lts-main-all/install_blacklist.cfg (+46/-0)
AutoUpgradeTester/profile/lts-main-all/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-main-all/prerequists-sources.list (+5/-0)
AutoUpgradeTester/profile/lts-main-all/removal_blacklist.cfg (+11/-0)
AutoUpgradeTester/profile/lts-mythbuntu/DistUpgrade.cfg (+8/-0)
AutoUpgradeTester/profile/lts-server-amd64/DistUpgrade.cfg (+9/-0)
AutoUpgradeTester/profile/lts-server-amd64/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-server-tasks/DistUpgrade.cfg (+6/-0)
AutoUpgradeTester/profile/lts-server-tasks/pkgs.cfg (+10/-0)
AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg (+7/-0)
AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg.dapper (+53/-0)
AutoUpgradeTester/profile/lts-server/local_testing.list (+1/-0)
AutoUpgradeTester/profile/lts-server/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-ubuntu-amd64/DistUpgrade.cfg (+13/-0)
AutoUpgradeTester/profile/lts-ubuntu-amd64/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg (+10/-0)
AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg.dapper (+67/-0)
AutoUpgradeTester/profile/lts-ubuntu/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-universe-amd64/DistUpgrade.cfg (+12/-0)
AutoUpgradeTester/profile/lts-universe-amd64/install_blacklist.cfg (+40/-0)
AutoUpgradeTester/profile/lts-universe-amd64/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lts-universe-i386/DistUpgrade.cfg (+11/-0)
AutoUpgradeTester/profile/lts-universe-i386/install_blacklist.cfg (+40/-0)
AutoUpgradeTester/profile/lts-universe-i386/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/lubuntu/DistUpgrade.cfg (+4/-0)
AutoUpgradeTester/profile/main-all-amd64/DistUpgrade.cfg (+8/-0)
AutoUpgradeTester/profile/main-all-amd64/install_blacklist.cfg (+29/-0)
AutoUpgradeTester/profile/main-all-amd64/pkgs.cfg (+2/-0)
AutoUpgradeTester/profile/main-all/DistUpgrade.cfg (+5/-0)
AutoUpgradeTester/profile/main-all/install_blacklist.cfg (+28/-0)
AutoUpgradeTester/profile/main-all/pkgs.cfg (+2/-0)
AutoUpgradeTester/profile/mythbuntu/DistUpgrade.cfg (+4/-0)
AutoUpgradeTester/profile/override.cfg.d/global.cfg (+9/-0)
AutoUpgradeTester/profile/python-all/DistUpgrade.cfg (+6/-0)
AutoUpgradeTester/profile/python-all/pkgs.cfg (+2/-0)
AutoUpgradeTester/profile/server-amd64/DistUpgrade.cfg (+7/-0)
AutoUpgradeTester/profile/server-amd64/pkgs.cfg (+2/-0)
AutoUpgradeTester/profile/server-tasks-amd64/DistUpgrade.cfg (+6/-0)
AutoUpgradeTester/profile/server-tasks-amd64/pkgs.cfg (+9/-0)
AutoUpgradeTester/profile/server-tasks/DistUpgrade.cfg (+3/-0)
AutoUpgradeTester/profile/server-tasks/pkgs.cfg (+10/-0)
AutoUpgradeTester/profile/server/DistUpgrade.cfg (+4/-0)
AutoUpgradeTester/profile/server/pkgs.cfg (+2/-0)
AutoUpgradeTester/profile/ubuntu-amd64/DistUpgrade.cfg (+7/-0)
AutoUpgradeTester/profile/ubuntu-amd64/pkgs.cfg (+1/-0)
AutoUpgradeTester/profile/ubuntu/DistUpgrade.cfg (+4/-0)
AutoUpgradeTester/profile/ubuntu/pkgs.cfg (+1/-0)
AutoUpgradeTester/profile/universe-amd64/DistUpgrade.cfg (+9/-0)
AutoUpgradeTester/profile/universe-amd64/install_blacklist.cfg (+34/-0)
AutoUpgradeTester/profile/universe-amd64/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/universe-i386/DistUpgrade.cfg (+8/-0)
AutoUpgradeTester/profile/universe-i386/install_blacklist.cfg (+34/-0)
AutoUpgradeTester/profile/universe-i386/pkgs.cfg (+3/-0)
AutoUpgradeTester/profile/xubuntu/DistUpgrade.cfg (+4/-0)
AutoUpgradeTester/randomInst.py (+21/-0)
AutoUpgradeTester/run_and_publish_tests.sh (+92/-0)
AutoUpgradeTester/toChroot/etc/hosts (+2/-0)
AutoUpgradeTester/toChroot/etc/kernel-img.conf (+6/-0)
BUGS (+5/-0)
COPYING (+340/-0)
ChangeLog (+62/-0)
DistUpgrade/Changelog (+188/-0)
DistUpgrade/DevelReleaseAnnouncement (+58/-0)
DistUpgrade/DevelReleaseAnnouncement.html (+88/-0)
DistUpgrade/DistUpgrade.cfg (+117/-0)
DistUpgrade/DistUpgrade.cfg.dapper (+56/-0)
DistUpgrade/DistUpgrade.cfg.hardy (+106/-0)
DistUpgrade/DistUpgrade.cfg.lucid (+114/-0)
DistUpgrade/DistUpgrade.ui (+1605/-0)
DistUpgrade/DistUpgradeApport.py (+84/-0)
DistUpgrade/DistUpgradeAptCdrom.py (+298/-0)
DistUpgrade/DistUpgradeAufs.py (+252/-0)
DistUpgrade/DistUpgradeCache.py (+1218/-0)
DistUpgrade/DistUpgradeConfigParser.py (+70/-0)
DistUpgrade/DistUpgradeController.py (+1779/-0)
DistUpgrade/DistUpgradeFetcherCore.py (+292/-0)
DistUpgrade/DistUpgradeFetcherSelf.py (+30/-0)
DistUpgrade/DistUpgradeGettext.py (+59/-0)
DistUpgrade/DistUpgradeMain.py (+223/-0)
DistUpgrade/DistUpgradePatcher.py (+106/-0)
DistUpgrade/DistUpgradeQuirks.py (+1262/-0)
DistUpgrade/DistUpgradeVersion.py (+1/-0)
DistUpgrade/DistUpgradeView.py (+432/-0)
DistUpgrade/DistUpgradeViewGtk.py (+748/-0)
DistUpgrade/DistUpgradeViewGtk3.py (+741/-0)
DistUpgrade/DistUpgradeViewKDE.py (+863/-0)
DistUpgrade/DistUpgradeViewNonInteractive.py (+320/-0)
DistUpgrade/DistUpgradeViewText.py (+276/-0)
DistUpgrade/EOLReleaseAnnouncement (+62/-0)
DistUpgrade/EOLReleaseAnnouncement.html (+95/-0)
DistUpgrade/README (+90/-0)
DistUpgrade/ReleaseAnnouncement (+56/-0)
DistUpgrade/ReleaseAnnouncement.html (+90/-0)
DistUpgrade/TODO (+65/-0)
DistUpgrade/additional_pkgs.cfg (+2/-0)
DistUpgrade/apt-autoinst-fixup.py (+71/-0)
DistUpgrade/apt_btrfs_snapshot.py (+188/-0)
DistUpgrade/base-installer/VERSION (+500/-0)
DistUpgrade/base-installer/kernel/Makefile (+7/-0)
DistUpgrade/base-installer/kernel/README (+76/-0)
DistUpgrade/base-installer/kernel/alpha.sh (+19/-0)
DistUpgrade/base-installer/kernel/amd64.sh (+38/-0)
DistUpgrade/base-installer/kernel/armeb.sh (+20/-0)
DistUpgrade/base-installer/kernel/armel.sh (+26/-0)
DistUpgrade/base-installer/kernel/hppa.sh (+25/-0)
DistUpgrade/base-installer/kernel/hurd-i386.sh (+14/-0)
DistUpgrade/base-installer/kernel/i386.sh (+141/-0)
DistUpgrade/base-installer/kernel/ia64.sh (+17/-0)
DistUpgrade/base-installer/kernel/kfreebsd-amd64.sh (+18/-0)
DistUpgrade/base-installer/kernel/kfreebsd-i386.sh (+72/-0)
DistUpgrade/base-installer/kernel/m68k.sh (+29/-0)
DistUpgrade/base-installer/kernel/mips.sh (+49/-0)
DistUpgrade/base-installer/kernel/mipsel.sh (+44/-0)
DistUpgrade/base-installer/kernel/powerpc.sh (+51/-0)
DistUpgrade/base-installer/kernel/s390.sh (+19/-0)
DistUpgrade/base-installer/kernel/sh4.sh (+29/-0)
DistUpgrade/base-installer/kernel/sparc.sh (+27/-0)
DistUpgrade/base-installer/kernel/tests/README (+52/-0)
DistUpgrade/base-installer/kernel/tests/alpha/escher-smp.test (+13/-0)
DistUpgrade/base-installer/kernel/tests/alpha/escher.cpuinfo (+19/-0)
DistUpgrade/base-installer/kernel/tests/alpha/escher.test (+10/-0)
DistUpgrade/base-installer/kernel/tests/amd64/cittagazze.cpuinfo (+20/-0)
DistUpgrade/base-installer/kernel/tests/amd64/cittagazze.test (+23/-0)
DistUpgrade/base-installer/kernel/tests/armeb/slug.cpuinfo (+24/-0)
DistUpgrade/base-installer/kernel/tests/armeb/slug.test (+7/-0)
DistUpgrade/base-installer/kernel/tests/armel/adsvgx.cpuinfo (+24/-0)
DistUpgrade/base-installer/kernel/tests/armel/adsvgx.test (+30/-0)
DistUpgrade/base-installer/kernel/tests/armel/armadaxp.cpuinfo (+23/-0)
DistUpgrade/base-installer/kernel/tests/armel/armadaxp.test (+29/-0)
DistUpgrade/base-installer/kernel/tests/armel/dove.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/armel/dove.test (+29/-0)
DistUpgrade/base-installer/kernel/tests/armel/efikamx.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/armel/efikamx.test (+18/-0)
DistUpgrade/base-installer/kernel/tests/armel/imx51.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/armel/imx51.test (+27/-0)
DistUpgrade/base-installer/kernel/tests/armel/n2100.cpuinfo (+24/-0)
DistUpgrade/base-installer/kernel/tests/armel/n2100.test (+29/-0)
DistUpgrade/base-installer/kernel/tests/armel/omap4.cpuinfo (+17/-0)
DistUpgrade/base-installer/kernel/tests/armel/omap4.test (+27/-0)
DistUpgrade/base-installer/kernel/tests/armel/qemu-versatilepb.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/armel/qemu-versatilepb.test (+34/-0)
DistUpgrade/base-installer/kernel/tests/armel/sheevaplug.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/armel/sheevaplug.test (+26/-0)
DistUpgrade/base-installer/kernel/tests/armel/slug.cpuinfo (+24/-0)
DistUpgrade/base-installer/kernel/tests/armel/slug.test (+29/-0)
DistUpgrade/base-installer/kernel/tests/armel/ts-109.cpuinfo (+24/-0)
DistUpgrade/base-installer/kernel/tests/armel/ts-109.test (+25/-0)
DistUpgrade/base-installer/kernel/tests/dotest (+109/-0)
DistUpgrade/base-installer/kernel/tests/hppa/b180.cpuinfo (+18/-0)
DistUpgrade/base-installer/kernel/tests/hppa/b180.test (+12/-0)
DistUpgrade/base-installer/kernel/tests/hppa/paer.cpuinfo (+30/-0)
DistUpgrade/base-installer/kernel/tests/hppa/paer.test (+11/-0)
DistUpgrade/base-installer/kernel/tests/i386/amd-k7-old.cpuinfo (+19/-0)
DistUpgrade/base-installer/kernel/tests/i386/amd-k7-old.test (+25/-0)
DistUpgrade/base-installer/kernel/tests/i386/cittagazze.cpuinfo (+19/-0)
DistUpgrade/base-installer/kernel/tests/i386/cittagazze.test (+26/-0)
DistUpgrade/base-installer/kernel/tests/i386/oqo1.cpuinfo (+19/-0)
DistUpgrade/base-installer/kernel/tests/i386/oqo1.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-3.cpuinfo (+19/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-3.test (+23/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-4M-bigmem-2.test (+24/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-4M-bigmem.test (+24/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-4M.cpuinfo (+18/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-4M.test (+24/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-d-2p.cpuinfo (+51/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium-d-2p.test (+23/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium.cpuinfo (+17/-0)
DistUpgrade/base-installer/kernel/tests/i386/pentium.test (+14/-0)
DistUpgrade/base-installer/kernel/tests/i386/via-c3-nehemiah.cpuinfo (+23/-0)
DistUpgrade/base-installer/kernel/tests/i386/via-c3-nehemiah.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/i386/via-c7-Esther.cpuinfo (+18/-0)
DistUpgrade/base-installer/kernel/tests/i386/via-c7-Esther.test (+24/-0)
DistUpgrade/base-installer/kernel/tests/i386/via-c7-Samuel.cpuinfo (+18/-0)
DistUpgrade/base-installer/kernel/tests/i386/via-c7-Samuel.test (+14/-0)
DistUpgrade/base-installer/kernel/tests/ia64/caballero.cpuinfo (+28/-0)
DistUpgrade/base-installer/kernel/tests/ia64/caballero.test (+10/-0)
DistUpgrade/base-installer/kernel/tests/ia64/merulo.cpuinfo (+28/-0)
DistUpgrade/base-installer/kernel/tests/ia64/merulo.test (+10/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-amd64/core2.cpuinfo (+9/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-amd64/core2.test (+8/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-amd64/k8.cpuinfo (+9/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-amd64/k8.test (+8/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-i386/core2.cpuinfo (+9/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-i386/core2.test (+13/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-i386/k8.cpuinfo (+9/-0)
DistUpgrade/base-installer/kernel/tests/kfreebsd-i386/k8.test (+13/-0)
DistUpgrade/base-installer/kernel/tests/m68k/crest.cpuinfo (+6/-0)
DistUpgrade/base-installer/kernel/tests/m68k/crest.test (+16/-0)
DistUpgrade/base-installer/kernel/tests/mips/4kc-malta.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mips/4kc-malta.test (+14/-0)
DistUpgrade/base-installer/kernel/tests/mips/5kc-malta.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mips/5kc-malta.test (+16/-0)
DistUpgrade/base-installer/kernel/tests/mips/ip32-r5k.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/mips/ip32-r5k.test (+14/-0)
DistUpgrade/base-installer/kernel/tests/mips/qemu.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mips/qemu.test (+14/-0)
DistUpgrade/base-installer/kernel/tests/mips/r4k-ip22.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/mips/r4k-ip22.test (+14/-0)
DistUpgrade/base-installer/kernel/tests/mips/r5k-ip22.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/mips/r5k-ip22.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/mips/sb1-bcm91250a.cpuinfo (+25/-0)
DistUpgrade/base-installer/kernel/tests/mips/sb1-bcm91250a.test (+19/-0)
DistUpgrade/base-installer/kernel/tests/mips/sb1a-bcm91480b.cpuinfo (+45/-0)
DistUpgrade/base-installer/kernel/tests/mips/sb1a-bcm91480b.test (+19/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/4kc-malta.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/4kc-malta.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/5kc-malta.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/5kc-malta.test (+19/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/fuloong-2e.cpuinfo (+14/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/fuloong-2e.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/fuloong-2f.cpuinfo (+14/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/fuloong-2f.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/qemu.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/qemu.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/r3k-kn02.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/r3k-kn02.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/r4k-kn04.cpuinfo (+10/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/r4k-kn04.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/r5k-cobalt.cpuinfo (+11/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/r5k-cobalt.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/sb1-bcm91250a.cpuinfo (+23/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/sb1-bcm91250a.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/sb1a-bcm91480b.cpuinfo (+45/-0)
DistUpgrade/base-installer/kernel/tests/mipsel/sb1a-bcm91480b.test (+17/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/chrp_ibm.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/chrp_ibm.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/g5.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/g5.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/powermac7,3.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/powermac7,3.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/powermac_newworld.cpuinfo (+12/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/powermac_newworld.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/powerstackII.cpuinfo (+7/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/powerstackII.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/ps3.cpuinfo (+13/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/ps3.cpuinfo.moved (+12/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/ps3.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/ps3.test.moved (+20/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/rs64-iv.cpuinfo (+23/-0)
DistUpgrade/base-installer/kernel/tests/powerpc/rs64-iv.test (+20/-0)
DistUpgrade/base-installer/kernel/tests/runtests (+128/-0)
DistUpgrade/base-installer/kernel/tests/s390/raptor.cpuinfo (+9/-0)
DistUpgrade/base-installer/kernel/tests/s390/raptor.test (+16/-0)
DistUpgrade/base-installer/kernel/tests/sh4/rts7751r2d.cpuinfo (+10/-0)
DistUpgrade/base-installer/kernel/tests/sh4/rts7751r2d.test (+11/-0)
DistUpgrade/base-installer/kernel/tests/sh4/sh7785lcr.cpuinfo (+10/-0)
DistUpgrade/base-installer/kernel/tests/sh4/sh7785lcr.test (+11/-0)
DistUpgrade/base-installer/kernel/tests/sparc/niagara-t1-smp.cpuinfo (+58/-0)
DistUpgrade/base-installer/kernel/tests/sparc/niagara-t1-smp.test (+16/-0)
DistUpgrade/base-installer/kernel/tests/sparc/niagara-t1-up.cpuinfo (+28/-0)
DistUpgrade/base-installer/kernel/tests/sparc/niagara-t1-up.test (+16/-0)
DistUpgrade/base-installer/kernel/tests/sparc/ultra-IIi.cpuinfo (+10/-0)
DistUpgrade/base-installer/kernel/tests/sparc/ultra-IIi.test (+14/-0)
DistUpgrade/build-dist.sh (+53/-0)
DistUpgrade/build-exclude.txt (+9/-0)
DistUpgrade/build-tarball.sh (+35/-0)
DistUpgrade/cdromupgrade (+40/-0)
DistUpgrade/crashdialog.ui (+142/-0)
DistUpgrade/dialog_changes.ui (+213/-0)
DistUpgrade/dialog_conffile.ui (+142/-0)
DistUpgrade/dialog_error.ui (+119/-0)
DistUpgrade/dist-upgrade.py (+7/-0)
DistUpgrade/etc-default-apport (+7/-0)
DistUpgrade/get_kernel_list.sh (+29/-0)
DistUpgrade/imported/invoke-rc.d (+455/-0)
DistUpgrade/imported/invoke-rc.d.diff (+24/-0)
DistUpgrade/mirrors.cfg (+830/-0)
DistUpgrade/patches/README (+17/-0)
DistUpgrade/patches/_usr_bin_pycompile.b17cebfbf18d152702278b15710d5095.97c07a02e5951cf68cb3f86534f6f917 (+80/-0)
DistUpgrade/prerequists-sources.dapper-ports.list (+4/-0)
DistUpgrade/prerequists-sources.dapper.list (+4/-0)
DistUpgrade/prerequists-sources.list (+6/-0)
DistUpgrade/removal_blacklist.cfg (+19/-0)
DistUpgrade/screenrc (+3/-0)
DistUpgrade/window_main.ui (+267/-0)
DistUpgrade/xorg_fix_proprietary.py (+165/-0)
DistUpgrade/zz-update-grub (+19/-0)
Janitor/Makefile (+43/-0)
Janitor/README (+37/-0)
Janitor/computerjanitor/__init__.py (+60/-0)
Janitor/computerjanitor/cruft.py (+138/-0)
Janitor/computerjanitor/cruft_tests.py (+56/-0)
Janitor/computerjanitor/exc.py (+30/-0)
Janitor/computerjanitor/exc_tests.py (+34/-0)
Janitor/computerjanitor/file_cruft.py (+58/-0)
Janitor/computerjanitor/file_cruft_tests.py (+63/-0)
Janitor/computerjanitor/missing_package_cruft.py (+45/-0)
Janitor/computerjanitor/missing_package_cruft_tests.py (+61/-0)
Janitor/computerjanitor/package_cruft.py (+57/-0)
Janitor/computerjanitor/package_cruft_tests.py (+61/-0)
Janitor/computerjanitor/plugin.py (+184/-0)
Janitor/computerjanitor/plugin_tests.py (+112/-0)
Janitor/find-conffiles-dirs (+37/-0)
Janitor/plugins/deb_plugin.py (+41/-0)
Janitor/plugins/deb_plugin_tests.py (+52/-0)
Janitor/plugins/dpkg_status_plugin.py (+66/-0)
Janitor/plugins/dpkg_status_plugin_tests.py (+39/-0)
Janitor/plugins/kdelibs4to5_plugin.py (+41/-0)
Janitor/plugins/langpack_manual_plugin.py (+65/-0)
Janitor/plugins/remove_lilo_plugin.py (+43/-0)
Janitor/testplugins/hello_plugin.py (+33/-0)
LGPL (+510/-0)
README (+18/-0)
README.dist-upgrade (+34/-0)
TODO (+22/-0)
UpdateManager/ChangelogViewer.py (+283/-0)
UpdateManager/Core/AlertWatcher.py (+94/-0)
UpdateManager/Core/DistUpgradeFetcherCore.py (+292/-0)
UpdateManager/Core/MetaRelease.py (+331/-0)
UpdateManager/Core/MyCache.py (+357/-0)
UpdateManager/Core/UpdateList.py (+100/-0)
UpdateManager/Core/roam.py (+203/-0)
UpdateManager/Core/utils.py (+461/-0)
UpdateManager/DistUpgradeFetcher.py (+140/-0)
UpdateManager/DistUpgradeFetcherKDE.py (+181/-0)
UpdateManager/GtkProgress.py (+202/-0)
UpdateManager/HelpViewer.py (+33/-0)
UpdateManager/MetaReleaseGObject.py (+53/-0)
UpdateManager/ReleaseNotesViewer.py (+186/-0)
UpdateManager/ReleaseNotesViewerWebkit.py (+52/-0)
UpdateManager/SimpleGtk3builderApp.py (+61/-0)
UpdateManager/SimpleGtkbuilderApp.py (+61/-0)
UpdateManager/UnitySupport.py (+103/-0)
UpdateManager/UpdateManager.py (+1228/-0)
UpdateManager/__init__.py (+1/-0)
UpdateManager/backend/InstallBackendAptdaemon.py (+89/-0)
UpdateManager/backend/InstallBackendSynaptic.py (+69/-0)
UpdateManager/backend/__init__.py (+61/-0)
UpdateManager/check-meta-release.py (+30/-0)
UpdateManager/dialog_release_notes.ui (+70/-0)
UpdateManager/fdsend/COPYING (+339/-0)
UpdateManager/fdsend/ChangeLog (+5/-0)
UpdateManager/fdsend/MANIFEST.in (+3/-0)
UpdateManager/fdsend/PKG-INFO (+10/-0)
UpdateManager/fdsend/README (+51/-0)
UpdateManager/fdsend/fdsend.c (+363/-0)
UpdateManager/fdsend/setup.cfg (+11/-0)
UpdateManager/fdsend/setup.py (+17/-0)
UpdateManager/fetch-progress.ui (+106/-0)
UpdateManagerText/UpdateManagerText.py (+186/-0)
check-new-release-gtk (+202/-0)
data/Makefile (+9/-0)
data/com.ubuntu.update-manager.gschema.xml.in (+59/-0)
data/do-release-upgrade.8 (+35/-0)
data/gtkbuilder/UpdateManager.ui (+1471/-0)
data/gtkbuilder/UpgradePromptDialog.ui (+343/-0)
data/icons/scalable/apps/system-software-update.svg (+1519/-0)
data/meta-release (+7/-0)
data/release-upgrades (+17/-0)
data/update-manager.8 (+78/-0)
data/update-manager.convert (+10/-0)
data/update-manager.desktop.in (+10/-0)
debian/91-release-upgrade (+5/-0)
debian/auto-upgrade-tester.dirs (+4/-0)
debian/auto-upgrade-tester.install (+8/-0)
debian/changelog (+6115/-0)
debian/compat (+1/-0)
debian/control (+85/-0)
debian/copyright (+22/-0)
debian/docs (+3/-0)
debian/release-upgrade-motd (+40/-0)
debian/rules (+28/-0)
debian/source_update-manager.py (+48/-0)
debian/update-manager-core.dirs (+7/-0)
debian/update-manager-core.install (+14/-0)
debian/update-manager-core.links (+1/-0)
debian/update-manager-core.manpages (+1/-0)
debian/update-manager-core.preinst (+41/-0)
debian/update-manager-kde.install (+4/-0)
debian/update-manager-text.install (+2/-0)
debian/update-manager.install (+21/-0)
debian/update-manager.manpages (+1/-0)
do-release-upgrade (+126/-0)
help/C/Makefile.am (+7/-0)
help/C/fdl-appendix.xml (+655/-0)
help/C/legal.xml (+76/-0)
help/C/update-manager-C.omf (+18/-0)
help/C/update-manager.xml (+1023/-0)
kubuntu-devel-release-upgrade (+2/-0)
missing (+336/-0)
mkinstalldirs (+111/-0)
po/ChangeLog (+196/-0)
po/Makefile (+25/-0)
po/POTFILES.in (+61/-0)
po/POTFILES.skip (+6/-0)
po/af.po (+2342/-0)
po/am.po (+2288/-0)
po/an.po (+2291/-0)
po/ar.po (+2644/-0)
po/ast.po (+2713/-0)
po/az.po (+2259/-0)
po/be.po (+2690/-0)
po/bg.po (+2672/-0)
po/bn.po (+2777/-0)
po/bo.po (+2532/-0)
po/br.po (+2498/-0)
po/bs.po (+2718/-0)
po/ca.po (+2741/-0)
po/ca@valencia.po (+2696/-0)
po/ceb.po (+2223/-0)
po/ckb.po (+2223/-0)
po/crh.po (+2725/-0)
po/cs.po (+2733/-0)
po/csb.po (+2404/-0)
po/cv.po (+2223/-0)
po/cy.po (+2566/-0)
po/da.po (+2716/-0)
po/de.po (+2816/-0)
po/dv.po (+2225/-0)
po/el.po (+2694/-0)
po/en_AU.po (+2688/-0)
po/en_CA.po (+2500/-0)
po/en_GB.po (+2690/-0)
po/eo.po (+2699/-0)
po/es.po (+2745/-0)
po/et.po (+2635/-0)
po/eu.po (+2576/-0)
po/fa.po (+2255/-0)
po/fi.po (+2698/-0)
po/fil.po (+2386/-0)
po/fo.po (+2245/-0)
po/fr.po (+2774/-0)
po/fur.po (+2267/-0)
po/fy.po (+2237/-0)
po/ga.po (+2223/-0)
po/gd.po (+2781/-0)
po/gl.po (+2715/-0)
po/gu.po (+2232/-0)
po/gv.po (+2225/-0)
po/he.po (+2632/-0)
po/hi.po (+2572/-0)
po/hr.po (+2738/-0)
po/hu.po (+2712/-0)
po/hy.po (+2223/-0)
po/id.po (+2655/-0)
po/is.po (+2448/-0)
po/it.po (+2745/-0)
po/ja.po (+2549/-0)
po/jv.po (+2223/-0)
po/ka.po (+2323/-0)
po/kk.po (+2641/-0)
po/km.po (+2686/-0)
po/kn.po (+2223/-0)
po/ko.po (+2441/-0)
po/ku.po (+2303/-0)
po/ky.po (+2223/-0)
po/lb.po (+2238/-0)
po/lo.po (+2223/-0)
po/lt.po (+2735/-0)
po/lv.po (+2729/-0)
po/mk.po (+2307/-0)
po/ml.po (+2287/-0)
po/mn.po (+2232/-0)
po/mr.po (+2319/-0)
po/ms.po (+2713/-0)
po/mus.po (+2223/-0)
po/my.po (+2234/-0)
po/nb.po (+2650/-0)
po/nds.po (+2261/-0)
po/ne.po (+2232/-0)
po/nl.po (+2743/-0)
po/nn.po (+2653/-0)
po/oc.po (+2758/-0)
po/pa.po (+2280/-0)
po/pl.po (+2726/-0)
po/ps.po (+2223/-0)
po/pt.po (+2699/-0)
po/pt_BR.po (+2727/-0)
po/qu.po (+2223/-0)
po/ro.po (+2771/-0)
po/ru.po (+2736/-0)
po/rw.po (+2231/-0)
po/sc.po (+2225/-0)
po/sco.po (+2250/-0)
po/sd.po (+2223/-0)
po/shn.po (+2223/-0)
po/si.po (+2226/-0)
po/sk.po (+2740/-0)
po/sl.po (+2765/-0)
po/sq.po (+2735/-0)
po/sr.po (+2727/-0)
po/sv.po (+2714/-0)
po/ta.po (+2239/-0)
po/ta_LK.po (+2228/-0)
po/te.po (+2353/-0)
po/th.po (+2503/-0)
po/tl.po (+2360/-0)
po/tr.po (+2685/-0)
po/ug.po (+2681/-0)
po/uk.po (+2742/-0)
po/update-manager.pot (+2213/-0)
po/ur.po (+2223/-0)
po/uz.po (+2232/-0)
po/vi.po (+2662/-0)
po/xh.po (+2224/-0)
po/zh_CN.po (+2484/-0)
po/zh_HK.po (+2465/-0)
po/zh_TW.po (+2477/-0)
po/zu.po (+2223/-0)
pre-build.sh (+46/-0)
setup.cfg (+10/-0)
setup.py (+80/-0)
tests/Makefile (+18/-0)
tests/aptroot-update-origin/etc/apt/sources.list (+5/-0)
tests/data-sources-list-test/DistUpgrade.cfg (+33/-0)
tests/data-sources-list-test/mirrors.cfg (+17/-0)
tests/data-sources-list-test/prerequists-sources.list.in (+6/-0)
tests/data-sources-list-test/prerequists-sources.list.in.broken (+7/-0)
tests/data-sources-list-test/prerequists-sources.list.in.no_archive_falllback (+4/-0)
tests/data-sources-list-test/sources.list (+7/-0)
tests/data-sources-list-test/sources.list.EOL (+6/-0)
tests/data-sources-list-test/sources.list.EOL2Supported (+6/-0)
tests/data-sources-list-test/sources.list.apt-cacher (+15/-0)
tests/data-sources-list-test/sources.list.commercial-ppa-uploaders (+11/-0)
tests/data-sources-list-test/sources.list.commercial-transition (+8/-0)
tests/data-sources-list-test/sources.list.d/prerequists-sources.list (+6/-0)
tests/data-sources-list-test/sources.list.d/prerequists-sources.list.distUpgrade (+6/-0)
tests/data-sources-list-test/sources.list.distUpgrade (+7/-0)
tests/data-sources-list-test/sources.list.hardy (+10/-0)
tests/data-sources-list-test/sources.list.in (+9/-0)
tests/data-sources-list-test/sources.list.minimal (+4/-0)
tests/data-sources-list-test/sources.list.no_archive_u_c (+8/-0)
tests/data-sources-list-test/sources.list.no_valid_mirror (+6/-0)
tests/data-sources-list-test/sources.list.nothing (+1/-0)
tests/data-sources-list-test/sources.list.partner (+7/-0)
tests/data-sources-list-test/sources.list.powerpc (+7/-0)
tests/data-sources-list-test/sources.list.sparc (+7/-0)
tests/interactive_fetch_release_upgrader.py (+85/-0)
tests/patchdir/dotdot_expected (+2/-0)
tests/patchdir/dotdot_orig (+1/-0)
tests/patchdir/fail_orig (+1/-0)
tests/patchdir/foo_orig (+2/-0)
tests/patchdir/fstab_orig (+17/-0)
tests/patchdir/patchdir_dotdot.8cf8463b34caa8ac871a52d5dd7ad1ef.cddc4be46bedd91db15ddb9f7ddfa804 (+4/-0)
tests/patchdir/patchdir_fail.ed04abbc6ee688ee7908c9dbb4b9e0a2.deadbeefdeadbeefdeadbeff (+1/-0)
tests/patchdir/patchdir_foo.f41121a903eafadf258962abc57c8644.52f83ff6877e42f613bcd2444c22528c (+1/-0)
tests/patchdir/patchdir_fstab.a1b72f1370f4f847f602fd0e239265d2.c56d2d038afb651920c83106ec8dfd09 (+13/-0)
tests/patchdir/patchdir_pycompile.b17cebfbf18d152702278b15710d5095.97c07a02e5951cf68cb3f86534f6f917 (+80/-0)
tests/patchdir/pycompile_orig (+281/-0)
tests/test-data-cdrom/.disk/base_components (+2/-0)
tests/test-data-cdrom/.disk/cd_type (+1/-0)
tests/test-data-cdrom/.disk/info (+1/-0)
tests/test-data-cdrom/.disk/udeb_include (+4/-0)
tests/test-data-cdrom/README.diskdefines (+9/-0)
tests/test-data-cdrom/cdromupgrade (+32/-0)
tests/test-data-cdrom/dists/intrepid/Release (+27/-0)
tests/test-data-cdrom/dists/intrepid/Release.gpg (+7/-0)
tests/test-data-cdrom/dists/intrepid/main/binary-amd64/Release (+6/-0)
tests/test-data-cdrom/dists/intrepid/main/debian-installer/binary-amd64/Packages.gz (+1/-0)
tests/test-data-cdrom/dists/intrepid/restricted/binary-amd64/Release (+6/-0)
tests/test-data/cpuinfo-i486 (+16/-0)
tests/test-data/cpuinfo-i586 (+19/-0)
tests/test-data/cpuinfo-via-c7m (+19/-0)
tests/test-data/cpuinfo-with-sse (+54/-0)
tests/test-data/cpuinfo-without-cmov (+50/-0)
tests/test-data/cpuinfo-without-sse (+54/-0)
tests/test-data/meta-release (+135/-0)
tests/test-data/xorg.conf.fglrx (+84/-0)
tests/test-data/xorg.conf.multiseat (+163/-0)
tests/test_cache.py (+39/-0)
tests/test_cdrom.py (+130/-0)
tests/test_changelog.py (+62/-0)
tests/test_country_mirror.py (+28/-0)
tests/test_dist_upgrade_fetcher_core.py (+95/-0)
tests/test_end_of_life.py (+64/-0)
tests/test_kernel_from_baseinstaller.py (+41/-0)
tests/test_meta_release_core.py (+137/-0)
tests/test_prerequists.py (+155/-0)
tests/test_proxy.py (+31/-0)
tests/test_pyflakes.py (+18/-0)
tests/test_quirks.py (+179/-0)
tests/test_sources_list.py (+317/-0)
tests/test_update_origin.py (+123/-0)
tests/test_utils.py (+65/-0)
tests/test_xorg_fix_intrepid.py (+46/-0)
ubuntu-support-status (+173/-0)
update-manager (+116/-0)
update-manager-text (+66/-0)
utils/apt/sources.list (+1/-0)
utils/demoted.cfg (+250/-0)
utils/demoted.cfg.dapper (+243/-0)
utils/demoted.cfg.hardy (+568/-0)
utils/demoted.cfg.lucid (+468/-0)
utils/demotions.py (+127/-0)
utils/est_kernel_size.py (+13/-0)
utils/update-base-installer.sh (+51/-0)
utils/update_mirrors.py (+22/-0)
Conflict adding file .bzr-builddeb.  Moved existing file to .bzr-builddeb.moved.
Conflict adding file AUTHORS.  Moved existing file to AUTHORS.moved.
Conflict adding file AutoUpgradeTester.  Moved existing file to AutoUpgradeTester.moved.
Conflict adding file BUGS.  Moved existing file to BUGS.moved.
Conflict adding file COPYING.  Moved existing file to COPYING.moved.
Conflict adding file ChangeLog.  Moved existing file to ChangeLog.moved.
Conflict adding file DistUpgrade.  Moved existing file to DistUpgrade.moved.
Conflict adding file Janitor.  Moved existing file to Janitor.moved.
Conflict adding file LGPL.  Moved existing file to LGPL.moved.
Conflict adding file README.dist-upgrade.  Moved existing file to README.dist-upgrade.moved.
Conflict adding file README.  Moved existing file to README.moved.
Conflict adding file TODO.  Moved existing file to TODO.moved.
Conflict adding file UpdateManager.  Moved existing file to UpdateManager.moved.
Conflict adding file UpdateManagerText.  Moved existing file to UpdateManagerText.moved.
Conflict adding file check-new-release-gtk.  Moved existing file to check-new-release-gtk.moved.
Conflict adding file check_new_release_gtk.py.  Moved existing file to check_new_release_gtk.py.moved.
Conflict adding file data.  Moved existing file to data.moved.
Conflict adding file debian.  Moved existing file to debian.moved.
Conflict adding file do-release-upgrade.  Moved existing file to do-release-upgrade.moved.
Conflict adding file help.  Moved existing file to help.moved.
Conflict adding file kubuntu-devel-release-upgrade.  Moved existing file to kubuntu-devel-release-upgrade.moved.
Conflict adding file missing.  Moved existing file to missing.moved.
Conflict adding file mkinstalldirs.  Moved existing file to mkinstalldirs.moved.
Conflict adding file po.  Moved existing file to po.moved.
Conflict adding file pre-build.sh.  Moved existing file to pre-build.sh.moved.
Conflict adding file setup.cfg.  Moved existing file to setup.cfg.moved.
Conflict adding file setup.py.  Moved existing file to setup.py.moved.
Conflict adding file tests.  Moved existing file to tests.moved.
Conflict adding file ubuntu-support-status.  Moved existing file to ubuntu-support-status.moved.
Conflict adding file update-manager-text.  Moved existing file to update-manager-text.moved.
Conflict adding file update-manager.  Moved existing file to update-manager.moved.
Conflict adding file utils.  Moved existing file to utils.moved.
To merge this branch: bzr merge lp:~ember/update-manager/ubuntu.bug1002956
Reviewer Review Type Date Requested Status
Michael Vogt 2012-05-22 Approve on 2012-05-23
Review via email: mp+106832@code.launchpad.net
To post a comment you must log in.
Michael Vogt (mvo) wrote :

Thanks for this fix! I (manually) merged it into the update-manager branch now and we should SRU it for both precise and oneiric.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory '.bzr-builddeb'
2=== renamed directory '.bzr-builddeb' => '.bzr-builddeb.moved'
3=== added file '.bzr-builddeb/default.conf'
4--- .bzr-builddeb/default.conf 1970-01-01 00:00:00 +0000
5+++ .bzr-builddeb/default.conf 2012-05-22 15:21:19 +0000
6@@ -0,0 +1,2 @@
7+[BUILDDEB]
8+native = True
9
10=== added file 'AUTHORS'
11--- AUTHORS 1970-01-01 00:00:00 +0000
12+++ AUTHORS 2012-05-22 15:21:19 +0000
13@@ -0,0 +1,19 @@
14+Hackers
15+=======
16+Michiel Sikkes <michiel@eyesopened.nl>
17+Michael Vogt <michael.vogt@canonical.com>
18+
19+Translators
20+===========
21+Jorge Bernal <koke@amedias.org>
22+Jean Privat <privat@lirmm.fr>
23+Martin Willemoes Hansen <mwh@sysrq.dk>
24+Zygmunt Krynicki <zyga@www.suxx.pl>
25+
26+Technical Author
27+================
28+Sean Wheller <sean@inwords.co.za>
29+
30+Icons
31+=====
32+Jakub Steiner <jimmac@novell.com>
33
34=== renamed file 'AUTHORS' => 'AUTHORS.moved'
35=== added directory 'AutoUpgradeTester'
36=== renamed directory 'AutoUpgradeTester' => 'AutoUpgradeTester.moved'
37=== added symlink 'AutoUpgradeTester/DistUpgrade'
38=== target is u'../DistUpgrade/'
39=== added file 'AutoUpgradeTester/README'
40--- AutoUpgradeTester/README 1970-01-01 00:00:00 +0000
41+++ AutoUpgradeTester/README 2012-05-22 15:21:19 +0000
42@@ -0,0 +1,8 @@
43+
44+
45+This code will test a release upgrade.
46+
47+If its started and there is a dir/symlink called "DistUpgrade" this
48+code will be used for the upgrade (useful for testing the bzr
49+development version of the upgrader code). Otherwise the latest
50+released version of the archive is used via "do-release-upgrade".
51\ No newline at end of file
52
53=== added file 'AutoUpgradeTester/UpgradeTestBackend.py'
54--- AutoUpgradeTester/UpgradeTestBackend.py 1970-01-01 00:00:00 +0000
55+++ AutoUpgradeTester/UpgradeTestBackend.py 2012-05-22 15:21:19 +0000
56@@ -0,0 +1,167 @@
57+# TargetNonInteractive.py
58+#
59+# abstraction for non-interactive backends (like chroot, qemu)
60+#
61+
62+from DistUpgrade.DistUpgradeConfigParser import DistUpgradeConfig
63+
64+import ConfigParser
65+import os
66+import os.path
67+import tempfile
68+from shutil import rmtree
69+
70+# refactor the code so that we have
71+# UpgradeTest - the controler object
72+# UpgradeTestImage - abstraction for chroot/qemu/xen
73+
74+class UpgradeTestImage(object):
75+ def runInTarget(self, command):
76+ pass
77+ def copyToImage(self, fromFile, toFile):
78+ pass
79+ def copyFromImage(self, fromFile, toFile):
80+ pass
81+ def bootstrap(self, force=False):
82+ pass
83+ def start(self):
84+ pass
85+ def stop(self):
86+ pass
87+
88+class UpgradeTestBackend(object):
89+ """ This is a abstrace interface that all backends (chroot, qemu)
90+ should implement - very basic currently :)
91+ """
92+
93+ apt_options = ["-y","--allow-unauthenticated"]
94+
95+ def __init__(self, profiledir, resultdir=""):
96+ " init the backend with the given profile "
97+ # init the dirs
98+ assert(profiledir != None)
99+ profiledir = os.path.normpath(profiledir)
100+ profile = os.path.join(os.path.abspath(profiledir), "DistUpgrade.cfg")
101+ self.upgradefilesdir = "./DistUpgrade"
102+
103+ if os.path.exists("./post_upgrade_tests/"):
104+ self.post_upgrade_tests_dir = "./post_upgrade_tests/"
105+ else:
106+ self.post_upgrade_tests_dir = "/usr/share/auto-upgrade-tester/post_upgrade_tests/"
107+ # init the rest
108+ if os.path.exists(profile):
109+ override_cfg_d = os.path.join(profiledir, "..", "override.cfg.d")
110+ defaults_cfg_d = os.path.join(profiledir, "..", "defaults.cfg.d")
111+ self.profile = os.path.abspath(profile)
112+ self.config = DistUpgradeConfig(datadir=os.path.dirname(profile),
113+ name=os.path.basename(profile),
114+ override_dir=override_cfg_d,
115+ defaults_dir=defaults_cfg_d)
116+ else:
117+ raise IOError, "Can't find profile '%s' (%s) " % (profile, os.getcwd())
118+ if resultdir:
119+ base_resultdir = resultdir
120+ else:
121+ base_resultdir = self.config.getWithDefault(
122+ "NonInteractive", "ResultDir", "results-upgrade-tester")
123+ self.resultdir = os.path.abspath(
124+ os.path.join(base_resultdir, profiledir.split("/")[-1]))
125+
126+ # Cleanup result directory before new run
127+ if os.path.exists(self.resultdir):
128+ rmtree(self.resultdir)
129+ os.makedirs(self.resultdir)
130+
131+ self.fromDist = self.config.get("Sources","From")
132+ if "http_proxy" in os.environ and not self.config.has_option("NonInteractive","Proxy"):
133+ self.config.set("NonInteractive","Proxy", os.environ["http_proxy"])
134+ elif self.config.has_option("NonInteractive","Proxy"):
135+ proxy=self.config.get("NonInteractive","Proxy")
136+ os.putenv("http_proxy",proxy)
137+ os.putenv("DEBIAN_FRONTEND","noninteractive")
138+ self.cachedir = None
139+ try:
140+ self.cachedir = self.config.get("NonInteractive","CacheDebs")
141+ except ConfigParser.NoOptionError:
142+ pass
143+ # init a sensible environment (to ensure proper operation if
144+ # run from cron)
145+ os.environ["PATH"] = "/usr/sbin:/usr/bin:/sbin:/bin"
146+
147+ def installPackages(self, pkgs):
148+ """
149+ install packages in the image
150+ """
151+ pass
152+
153+ def getSourcesListFile(self):
154+ """
155+ creates a temporary sources.list file and returns it to
156+ the caller
157+ """
158+ # write new sources.list
159+ sourceslist = tempfile.NamedTemporaryFile()
160+ comps = self.config.getlist("NonInteractive","Components")
161+ pockets = self.config.getlist("NonInteractive","Pockets")
162+ mirror = self.config.get("NonInteractive","Mirror")
163+ sourceslist.write("deb %s %s %s\n" % (mirror, self.fromDist, " ".join(comps)))
164+ for pocket in pockets:
165+ sourceslist.write("deb %s %s-%s %s\n" % (mirror, self.fromDist,pocket, " ".join(comps)))
166+ sourceslist.flush()
167+ return sourceslist
168+
169+ def bootstrap(self):
170+ " bootstaps a pristine install"
171+ pass
172+
173+ def upgrade(self):
174+ " upgrade a given install "
175+ pass
176+
177+ def test(self):
178+ " test if the upgrade was successful "
179+ pass
180+
181+ def resultsToJunitXML(self, results, outputfile = None):
182+ """
183+ Filter results to get Junit XML output
184+
185+ :param results: list of results. Each result is a dictionary of the form
186+ name: name of the test
187+ result: (pass, fail, error)
188+ time: execution time of the test in seconds
189+ message: optional message in case of failure or error
190+ :param output: Output XML to this file instead of returning the value
191+ """
192+ from xml.sax.saxutils import escape
193+
194+ output = ""
195+ testsuite_name = ''
196+ res = [x['result'] for x in results]
197+ fail_count = res.count('fail')
198+ error_count = res.count('error')
199+ total_count = len(res)
200+ total_time = sum([x['time'] for x in results])
201+
202+ output = """<testsuite errors="%d" failures="%d" name="%s" tests="%d" time="%.3f">\n""" % (
203+ error_count, fail_count, testsuite_name, total_count,total_time)
204+
205+ for result in results:
206+ output += """<testcase classname="%s" name="%s" time="%.3f">\n""" % (
207+ self.profilename + '.PostUpgradeTest',
208+ result['name'][:-3], result['time'])
209+ if 'fail' in result['result']:
210+ output += """<failure type="%s">%s\n</failure>\n""" % (
211+ 'exception', escape(result['message']))
212+ elif 'error' in result['result']:
213+ output += """<error type="%s">%s\n</error>\n""" % (
214+ 'exception', escape(result['message']))
215+
216+ output += "</testcase>\n"
217+ output += "</testsuite>\n"
218+
219+ if outputfile:
220+ with open(outputfile, 'w') as f:
221+ f.write(output)
222+ else:
223+ return output
224
225=== added file 'AutoUpgradeTester/UpgradeTestBackendChroot.py'
226--- AutoUpgradeTester/UpgradeTestBackendChroot.py 1970-01-01 00:00:00 +0000
227+++ AutoUpgradeTester/UpgradeTestBackendChroot.py 2012-05-22 15:21:19 +0000
228@@ -0,0 +1,338 @@
229+
230+import sys
231+import os
232+import warnings
233+warnings.filterwarnings("ignore", "apt API not stable yet", FutureWarning)
234+
235+from UpgradeTestBackend import UpgradeTestBackend
236+
237+import tempfile
238+import subprocess
239+import shutil
240+import glob
241+import ConfigParser
242+
243+class UpgradeTestBackendChroot(UpgradeTestBackend):
244+
245+ diverts = ["/usr/sbin/mkinitrd",
246+ "/sbin/modprobe",
247+ "/usr/sbin/invoke-rc.d",
248+ # install-info has a locking problem quite often
249+ "/usr/sbin/install-info",
250+ "/sbin/start-stop-daemon"]
251+
252+ def __init__(self, profile):
253+ UpgradeTestBackend.__init__(self, profile)
254+ self.tarball = None
255+
256+ def _umount(self, chrootdir):
257+ umount_list = []
258+ for line in open("/proc/mounts"):
259+ (dev, mnt, fs, options, d, p) = line.split()
260+ if mnt.startswith(chrootdir):
261+ umount_list.append(mnt)
262+ # now sort and umount by reverse length (to ensure
263+ # we umount /sys/fs/binfmt_misc before /sys)
264+ umount_list.sort(key=len)
265+ umount_list.reverse()
266+ # do the list
267+ for mpoint in umount_list:
268+ print "Umount '%s'" % mpoint
269+ os.system("umount %s" % mpoint)
270+
271+
272+ def login(self):
273+ d = self._unpackToTmpdir(self.tarball)
274+ print "logging into: '%s'" % d
275+ self._runInChroot(d, ["/bin/sh"])
276+ print "Cleaning up"
277+ if d:
278+ shutil.rmtree(d)
279+
280+ def _runInChroot(self, chrootdir, command, cmd_options=[]):
281+ print "runing: ",command
282+ print "in: ", chrootdir
283+ pid = os.fork()
284+ if pid == 0:
285+ os.chroot(chrootdir)
286+ os.chdir("/")
287+ os.system("mount -t devpts devpts /dev/pts")
288+ os.system("mount -t sysfs sysfs /sys")
289+ os.system("mount -t proc proc /proc")
290+ os.system("mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc")
291+ env = os.environ
292+ env["DEBIAN_FRONTEND"] = "noninteractive"
293+ os.execve(command[0], command, env)
294+ else:
295+ print "Parent: waiting for %s" % pid
296+ (id, exitstatus) = os.waitpid(pid, 0)
297+ self._umount(chrootdir)
298+ return exitstatus
299+
300+ def _runApt(self, tmpdir, command, cmd_options=[]):
301+ ret = self._runInChroot(tmpdir,
302+ ["/usr/bin/apt-get", command]+self.apt_options+cmd_options)
303+ return ret
304+
305+
306+ def installPackages(self, pkgs):
307+ print "installPackages: ", pkgs
308+ if not pkgs:
309+ return True
310+ res = self._runApt(self.tmpdir, "install", pkgs)
311+ return res == 0
312+
313+ def _tryRandomPkgInstall(self, amount):
314+ " install 'amount' packages randomly "
315+ self._runApt(self.tmpdir,"install",["python2.4-apt", "python-apt"])
316+ shutil.copy("%s/randomInst.py",self.tmpdir+"/tmp")
317+ ret = subprocess.call(["chroot",self.tmpdir,"/tmp/randomInst.py","%s" % amount])
318+ print ret
319+
320+ def _cacheDebs(self, tmpdir):
321+ # see if the debs should be cached
322+ if self.cachedir:
323+ print "Caching debs"
324+ for f in glob.glob(tmpdir+"/var/cache/apt/archives/*.deb"):
325+ if not os.path.exists(self.cachedir+"/"+os.path.basename(f)):
326+ try:
327+ shutil.copy(f,self.cachedir)
328+ except IOError, e:
329+ print "Can't copy '%s' (%s)" % (f,e)
330+
331+ def _getTmpDir(self):
332+ tmpdir = self.config.getWithDefault("CHROOT","Tempdir",None)
333+ if tmpdir is None:
334+ tmpdir = tempfile.mkdtemp()
335+ else:
336+ if os.path.exists(tmpdir):
337+ self._umount(tmpdir)
338+ shutil.rmtree(tmpdir)
339+ os.makedirs(tmpdir)
340+ return tmpdir
341+
342+ def bootstrap(self,outfile=None):
343+ " bootstaps a pristine fromDist tarball"
344+ if not outfile:
345+ outfile = os.path.dirname(self.profile) + "/dist-upgrade-%s.tar.gz" % self.fromDist
346+ outfile = os.path.abspath(outfile)
347+ self.tarball = outfile
348+
349+ # don't bootstrap twice if this is something we can cache
350+ try:
351+ if (self.config.getboolean("CHROOT","CacheTarball") and
352+ os.path.exists(self.tarball) ):
353+ self.tmpdir = self._unpackToTmpdir(self.tarball)
354+ if not self.tmpdir:
355+ print "Error extracting tarball"
356+ return False
357+ return True
358+ except ConfigParser.NoOptionError:
359+ pass
360+
361+ # bootstrap!
362+ self.tmpdir = tmpdir = self._getTmpDir()
363+ print "tmpdir is %s" % tmpdir
364+
365+ print "bootstraping to %s" % outfile
366+ ret = subprocess.call(["debootstrap", self.fromDist, tmpdir, self.config.get("NonInteractive","Mirror")])
367+ print "debootstrap returned: %s" % ret
368+ if ret != 0:
369+ return False
370+
371+ print "diverting"
372+ self._dpkgDivert(tmpdir)
373+
374+ # create some minimal device node
375+ print "Creating some devices"
376+ os.system("(cd %s/dev ; echo $PWD; ./MAKEDEV null)" % tmpdir)
377+ #self._runInChroot(tmpdir, ["/bin/mknod","/dev/null","c","1","3"])
378+
379+ # set a hostname
380+ shutil.copy("/etc/hostname","%s/etc/hostanme" % tmpdir)
381+
382+ # copy the stuff from toChroot/
383+ if os.path.exists("./toChroot/"):
384+ os.chdir("toChroot/")
385+ for (dirpath, dirnames, filenames) in os.walk("."):
386+ for name in filenames:
387+ if not os.path.exists(os.path.join(tmpdir,dirpath,name)):
388+ shutil.copy(os.path.join(dirpath,name), os.path.join(tmpdir,dirpath,name))
389+ os.chdir("..")
390+
391+ # write new sources.list
392+ if (self.config.has_option("NonInteractive","Components") and
393+ self.config.has_option("NonInteractive","Pockets")):
394+ sourcelist=self.getSourcesListFile()
395+ shutil.copy(sourcelist.name, tmpdir+"/etc/apt/sources.list")
396+ print open(tmpdir+"/etc/apt/sources.list","r").read()
397+
398+ # move the cache debs
399+ self._populateWithCachedDebs(tmpdir)
400+
401+ print "Updating the chroot"
402+ ret = self._runApt(tmpdir,"update")
403+ print "apt update returned %s" % ret
404+ if ret != 0:
405+ return False
406+ # run it three times to work around network issues
407+ for i in range(3):
408+ ret = self._runApt(tmpdir,"dist-upgrade")
409+ print "apt dist-upgrade returned %s" % ret
410+ if ret != 0:
411+ return False
412+
413+ print "installing basepkg"
414+ ret = self._runApt(tmpdir,"install", [self.config.get("NonInteractive","BasePkg")])
415+ print "apt returned %s" % ret
416+ if ret != 0:
417+ return False
418+
419+ CMAX = 4000
420+ pkgs = self.config.getListFromFile("NonInteractive","AdditionalPkgs")
421+ while(len(pkgs)) > 0:
422+ print "installing additonal: %s" % pkgs[:CMAX]
423+ ret= self._runApt(tmpdir,"install",pkgs[:CMAX])
424+ print "apt(2) returned: %s" % ret
425+ if ret != 0:
426+ self._cacheDebs(tmpdir)
427+ return False
428+ pkgs = pkgs[CMAX+1:]
429+
430+ if self.config.has_option("NonInteractive","PostBootstrapScript"):
431+ script = self.config.get("NonInteractive","PostBootstrapScript")
432+ if os.path.exists(script):
433+ shutil.copy(script, os.path.join(tmpdir,"tmp"))
434+ self._runInChroot(tmpdir,[os.path.join("/tmp",script)])
435+ else:
436+ print "WARNING: %s not found" % script
437+
438+ try:
439+ amount = self.config.get("NonInteractive","RandomPkgInstall")
440+ self._tryRandomPkgInstall(amount)
441+ except ConfigParser.NoOptionError:
442+ pass
443+
444+ print "Caching debs"
445+ self._cacheDebs(tmpdir)
446+
447+ print "Cleaning chroot"
448+ ret = self._runApt(tmpdir,"clean")
449+ if ret != 0:
450+ return False
451+
452+ print "building tarball: '%s'" % outfile
453+ os.chdir(tmpdir)
454+ ret = subprocess.call(["tar","czf",outfile,"."])
455+ print "tar returned %s" % ret
456+
457+ return True
458+
459+ def _populateWithCachedDebs(self, tmpdir):
460+ # now populate with hardlinks for the debs
461+ if self.cachedir:
462+ print "Linking cached debs into chroot"
463+ for f in glob.glob(self.cachedir+"/*.deb"):
464+ try:
465+ os.link(f, tmpdir+"/var/cache/apt/archives/%s" % os.path.basename(f))
466+ except OSError, e:
467+ print "Can't link: %s (%s)" % (f,e)
468+ return True
469+
470+ def upgrade(self, tarball=None):
471+ if not tarball:
472+ tarball = self.tarball
473+ assert(tarball != None)
474+ print "runing upgrade on: %s" % tarball
475+ tmpdir = self.tmpdir
476+ #self._runApt(tmpdir, "install",["apache2"])
477+
478+ self._populateWithCachedDebs(tmpdir)
479+
480+ # copy itself to the chroot (resolve symlinks)
481+ targettmpdir = os.path.join(tmpdir,"tmp","dist-upgrade")
482+ if not os.path.exists(targettmpdir):
483+ os.makedirs(targettmpdir)
484+ for f in glob.glob("%s/*" % self.upgradefilesdir):
485+ if not os.path.isdir(f):
486+ shutil.copy(f, targettmpdir)
487+
488+ # copy the profile
489+ if os.path.exists(self.profile):
490+ print "Copying '%s' to '%s' " % (self.profile,targettmpdir)
491+ shutil.copy(self.profile, targettmpdir)
492+ # copy the .cfg and .list stuff from there too
493+ for f in glob.glob("%s/*.cfg" % (os.path.dirname(self.profile))):
494+ shutil.copy(f, targettmpdir)
495+ for f in glob.glob("%s/*.list" % (os.path.dirname(self.profile))):
496+ shutil.copy(f, targettmpdir)
497+
498+ # run it
499+ pid = os.fork()
500+ if pid == 0:
501+ os.chroot(tmpdir)
502+ os.chdir("/tmp/dist-upgrade")
503+ os.system("mount -t devpts devpts /dev/pts")
504+ os.system("mount -t sysfs sysfs /sys")
505+ os.system("mount -t proc proc /proc")
506+ os.system("mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc")
507+ if os.path.exists("/tmp/dist-upgrade/dist-upgrade.py"):
508+ os.execl("/tmp/dist-upgrade/dist-upgrade.py",
509+ "/tmp/dist-upgrade/dist-upgrade.py")
510+ else:
511+ os.execl("/usr/bin/do-release-upgrade",
512+ "/usr/bin/do-release-upgrade","-d",
513+ "-f","DistUpgradeViewNonInteractive")
514+ else:
515+ print "Parent: waiting for %s" % pid
516+ (id, exitstatus) = os.waitpid(pid, 0)
517+ print "Child exited (%s, %s): %s" % (id, exitstatus, os.WEXITSTATUS(exitstatus))
518+ # copy the result
519+ for f in glob.glob(tmpdir+"/var/log/dist-upgrade/*"):
520+ print "copying result to: ", self.resultdir
521+ shutil.copy(f, self.resultdir)
522+ # cache debs and cleanup
523+ self._cacheDebs(tmpdir)
524+ self._umount(tmpdir)
525+ shutil.rmtree(tmpdir)
526+ return (exitstatus == 0)
527+
528+ def _unpackToTmpdir(self, baseTarBall):
529+ # unpack the tarball
530+ self.tmpdir = tmpdir = self._getTmpDir()
531+ os.chdir(tmpdir)
532+ ret = subprocess.call(["tar","xzf",baseTarBall])
533+ if ret != 0:
534+ return None
535+ return tmpdir
536+
537+ def _dpkgDivert(self, tmpdir):
538+ for d in self.diverts:
539+ cmd = ["chroot",tmpdir,
540+ "dpkg-divert","--add","--local",
541+ "--divert",d+".thereal",
542+ "--rename",d]
543+ ret = subprocess.call(cmd)
544+ if ret != 0:
545+ print "dpkg-divert returned: %s" % ret
546+ shutil.copy(tmpdir+"/bin/true",tmpdir+d)
547+
548+ def test(self):
549+ # FIXME: add some sanity testing here
550+ return True
551+
552+if __name__ == "__main__":
553+ if len(sys.argv) > 1:
554+ profilename = sys.argv[1]
555+ else:
556+ profilename = "default"
557+ chroot = UpgradeTestBackendChroot(profilename)
558+ tarball = "%s/tarball/dist-upgrade-%s.tar.gz" % (os.getcwd(),profilename)
559+ if not os.path.exists(tarball):
560+ print "No existing tarball found, creating a new one"
561+ chroot.bootstrap(tarball)
562+ chroot.upgrade(tarball)
563+
564+ #tmpdir = chroot._unpackToTmpdir(tarball)
565+ #chroot._dpkgDivert(tmpdir)
566+ #print tmpdir
567
568=== added file 'AutoUpgradeTester/UpgradeTestBackendEC2.py'
569--- AutoUpgradeTester/UpgradeTestBackendEC2.py 1970-01-01 00:00:00 +0000
570+++ AutoUpgradeTester/UpgradeTestBackendEC2.py 2012-05-22 15:21:19 +0000
571@@ -0,0 +1,329 @@
572+# ec2 backend
573+
574+from UpgradeTestBackendSSH import UpgradeTestBackendSSH
575+from UpgradeTestBackend import UpgradeTestBackend
576+
577+from DistUpgrade.sourceslist import SourcesList
578+
579+from boto.ec2.connection import EC2Connection
580+
581+import ConfigParser
582+import os
583+import sys
584+import os.path
585+import glob
586+import time
587+import atexit
588+import apt_pkg
589+
590+
591+# images created with EC2
592+class NoCredentialsFoundException(Exception):
593+ pass
594+
595+class OptionError(Exception):
596+ pass
597+
598+
599+# Step to perform for a ec2 upgrade test
600+#
601+# 1. conn = EC2Connect()
602+# 2. reservation = conn.run_instances(image_id = image, security_groups = groups, key_name = key)
603+# 3. wait for instance.state == 'running':
604+# instance.update()
605+# 4. ssh -i <key> root@instance.dns_name <command>
606+
607+
608+# TODO
609+#
610+# Using ebs (elastic block storage) and snapshots for the test
611+# 1. ec2-create-volume -s 80 -z us-east-1a
612+# (check with ec2-describe-instance that its actually in
613+# the right zone)
614+# 2. ec2-attach-volume vol-7bd23de2 -i i-3325ad4 -d /dev/sdh
615+# (do not name it anything but sd*)
616+# 3. mount/use the thing inside the instance
617+#
618+#
619+# Other useful things:
620+# - sda1: root fs
621+# - sda2: free space (~140G)
622+# - sda3: swapspace (~1G)
623+
624+class UpgradeTestBackendEC2(UpgradeTestBackendSSH):
625+ " EC2 backend "
626+
627+ def __init__(self, profile):
628+ UpgradeTestBackend.__init__(self, profile)
629+ self.profiledir = os.path.abspath(os.path.dirname(profile))
630+ # ami base name (e.g .ami-44bb5c2d)
631+ self.ec2ami = self.config.get("EC2","AMI")
632+ self.ssh_key = self.config.get("EC2","SSHKey")
633+ try:
634+ self.access_key_id = (os.getenv("AWS_ACCESS_KEY_ID") or
635+ self.config.get("EC2","access_key_id"))
636+ self.secret_access_key = (os.getenv("AWS_SECRET_ACCESS_KEY") or
637+ self.config.get("EC2","secret_access_key"))
638+ except ConfigParser.NoOptionError:
639+ print "Either export AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY or"
640+ print "set access_key_id and secret_access_key in the profile config"
641+ print "file."
642+ sys.exit(1)
643+ self._conn = EC2Connection(self.access_key_id, self.secret_access_key)
644+ self.ubuntu_official_ami = False
645+ if self.config.has_option("EC2","UbuntuOfficialAMI"):
646+ self.ubuntu_official_ami = self.config.getboolean("EC2","UbuntuOfficialAMI")
647+
648+ try:
649+ self.security_groups = self.config.getlist("EC2","SecurityGroups")
650+ except ConfigParser.NoOptionError:
651+ self.security_groups = []
652+
653+ if self.ssh_key.startswith("./"):
654+ self.ssh_key = self.profiledir + self.ssh_key[1:]
655+ self.ssh_port = "22"
656+ self.instance = None
657+
658+ # the public name of the instance, e.g.
659+ # ec2-174-129-152-83.compute-1.amazonaws.com
660+ self.ssh_hostname = ""
661+ # the instance name (e.g. i-3325ad4)
662+ self.ec2instance = ""
663+ if (self.config.has_option("NonInteractive","RealReboot") and
664+ self.config.getboolean("NonInteractive","RealReboot")):
665+ raise OptionError, "NonInteractive/RealReboot option must be set to False for the ec2 upgrader"
666+ atexit.register(self._cleanup)
667+
668+ def _cleanup(self):
669+ print "_cleanup(): stopping running instance"
670+ if self.instance:
671+ self.instance.stop()
672+
673+ def _enableRootLogin(self):
674+ command = ["sudo",
675+ "sed", "-i", "-e", "'s,\(.*\)\(ssh-rsa.*\),\\2,'",
676+ "/root/.ssh/authorized_keys"]
677+ ret = self._runInImageAsUser("ubuntu", command)
678+ return (ret == 0)
679+
680+ def bootstrap(self, force=False):
681+ print "bootstrap()"
682+
683+ print "Building new image based on '%s'" % self.ec2ami
684+
685+ # get common vars
686+ basepkg = self.config.get("NonInteractive","BasePkg")
687+
688+ # start the VM
689+ self.start_instance()
690+
691+ # prepare the sources.list (needed because a AMI may have any
692+ # sources.list)
693+ sources = self.getSourcesListFile()
694+ ret = self._copyToImage(sources.name, "/etc/apt/sources.list")
695+ assert(ret == 0)
696+
697+ # install some useful stuff
698+ ret = self._runInImage(["apt-get","update"])
699+ assert(ret == 0)
700+ # FIXME: instead of this retrying (for network errors with
701+ # proxies) we should have a self._runAptInImage()
702+ for i in range(3):
703+ ret = self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","install", "--allow-unauthenticated", "-y",basepkg])
704+ assert(ret == 0)
705+
706+ CMAX = 4000
707+ pkgs = self.config.getListFromFile("NonInteractive","AdditionalPkgs")
708+ while(len(pkgs)) > 0:
709+ print "installing additonal: %s" % pkgs[:CMAX]
710+ ret= self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","install","--reinstall", "--allow-unauthenticated", "-y"]+pkgs[:CMAX])
711+ print "apt(2) returned: %s" % ret
712+ if ret != 0:
713+ #self._cacheDebs(tmpdir)
714+ print "apt returned a error, stopping"
715+ self.stop_instance()
716+ return False
717+ pkgs = pkgs[CMAX+1:]
718+
719+ if self.config.has_option("NonInteractive","PostBootstrapScript"):
720+ script = self.config.get("NonInteractive","PostBootstrapScript")
721+ print "have PostBootstrapScript: %s" % script
722+ if os.path.exists(script):
723+ self._runInImage(["mkdir","/upgrade-tester"])
724+ self._copyToImage(script, "/upgrade-tester")
725+ print "running script: %s" % os.path.join("/tmp",script)
726+ self._runInImage([os.path.join("/upgrade-tester",script)])
727+ else:
728+ print "WARNING: %s not found" % script
729+
730+ if self.config.getWithDefault("NonInteractive",
731+ "UpgradeFromDistOnBootstrap", False):
732+ print "running apt-get upgrade in from dist (after bootstrap)"
733+ for i in range(3):
734+ ret = self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","--allow-unauthenticated", "-y","dist-upgrade"])
735+ assert(ret == 0)
736+
737+ print "Cleaning image"
738+ ret = self._runInImage(["apt-get","clean"])
739+ assert(ret == 0)
740+
741+ # done with the bootstrap
742+
743+ # FIXME: idealy we would reboot here, but its less important
744+ # because we can't get a new kernel anyway in ec2 (yet)
745+ # - the reboot thing is *not* yet reliable!
746+ #self.reboot_instance()
747+
748+ # FIXME: support for caching/snapshoting the base image here
749+
750+ return True
751+
752+ def start_instance(self):
753+ print "Starting ec2 instance and wait until its availabe "
754+
755+ # start the instance
756+ reservation = self._conn.run_instances(image_id=self.ec2ami,
757+ security_groups=self.security_groups,
758+ key_name=self.ssh_key[:-4].split("/")[-1])
759+ self.instance = reservation.instances[0]
760+ while self.instance.state == "pending":
761+ print "Waiting for instance %s to come up..." % self.instance.id
762+ time.sleep(10)
763+ self.instance.update()
764+
765+ print "It's up: hostname =", self.instance.dns_name
766+ self.ssh_hostname = self.instance.dns_name
767+ self.ec2instance = self.instance.id
768+
769+ # now sping until ssh comes up in the instance
770+ if self.ubuntu_official_ami:
771+ user = "ubuntu"
772+ else:
773+ user = "root"
774+ for i in range(900):
775+ time.sleep(1)
776+ if self.ping(user):
777+ print "instance available via ssh ping"
778+ break
779+ else:
780+ print "Could not connect to instance after 900s, exiting"
781+ return False
782+ # re-enable root login if needed
783+ if self.ubuntu_official_ami:
784+ print "Re-enabling root login... ",
785+ ret = self._enableRootLogin()
786+ if ret:
787+ print "Done!"
788+ else:
789+ print "Oops, failed to enable root login..."
790+ assert (ret == True)
791+ # the official image seems to run a update on startup?!?
792+ print "waiting for the official image to leave apt alone"
793+ time.sleep(10)
794+ return True
795+
796+ def reboot_instance(self):
797+ " reboot a ec2 instance and wait until its available again "
798+ self.instance.reboot()
799+ # FIMXE: find a better way to know when the instance is
800+ # down - maybe with "-v" ?
801+ time.sleep(5)
802+ while True:
803+ if self._runInImage(["/bin/true"]) == 0:
804+ print "instance rebootet"
805+ break
806+
807+ def stop_instance(self):
808+ " permanently stop a instance (it can never be started again "
809+ # terminates are final - all data is lost
810+ self.instance.stop()
811+ # wait until its down
812+ while True:
813+ if self._runInImage(["/bin/true"]) != 0:
814+ print "instance stopped"
815+ break
816+
817+ def upgrade(self):
818+ print "upgrade()"
819+
820+ # clean from any leftover pyc files
821+ for f in glob.glob("%s/*.pyc" % self.upgradefilesdir):
822+ os.unlink(f)
823+
824+ print "Starting for upgrade"
825+
826+ assert(self.ec2instance)
827+ assert(self.ssh_hostname)
828+
829+ # copy the profile
830+ if os.path.exists(self.profile):
831+ print "Copying '%s' to image overrides" % self.profile
832+ self._runInImage(["mkdir","-p","/etc/update-manager/release-upgrades.d"])
833+ self._copyToImage(self.profile, "/etc/update-manager/release-upgrades.d/")
834+
835+ # copy test repo sources.list (if needed)
836+ test_repo = self.config.getWithDefault("NonInteractive","AddRepo","")
837+ if test_repo:
838+ test_repo = os.path.join(os.path.dirname(self.profile), test_repo)
839+ self._copyToImage(test_repo, "/etc/apt/sources.list.d")
840+ sourcelist = self.getSourcesListFile()
841+ apt_pkg.Config.Set("Dir::Etc", os.path.dirname(sourcelist.name))
842+ apt_pkg.Config.Set("Dir::Etc::sourcelist",
843+ os.path.basename(sourcelist.name))
844+ sources = SourcesList(matcherPath=".")
845+ sources.load(test_repo)
846+ # add the uri to the list of valid mirros in the image
847+ for entry in sources.list:
848+ if (not (entry.invalid or entry.disabled) and
849+ entry.type == "deb"):
850+ print "adding %s to mirrors" % entry.uri
851+ self._runInImage(["echo '%s' >> /upgrade-tester/mirrors.cfg" % entry.uri])
852+
853+ # check if we have a bzr checkout dir to run against or
854+ # if we should just run the normal upgrader
855+ if (os.path.exists(self.upgradefilesdir) and
856+ self.config.getWithDefault("NonInteractive",
857+ "UseUpgraderFromBzr",
858+ True)):
859+ self._copyUpgraderFilesFromBzrCheckout()
860+ ret = self._runBzrCheckoutUpgrade()
861+ else:
862+ ret = self._runInImage(["do-release-upgrade","-d",
863+ "-f","DistUpgradeViewNonInteractive"])
864+ print "dist-upgrade.py returned: %i" % ret
865+
866+
867+ # copy the result
868+ print "coyping the result"
869+ self._copyFromImage("/var/log/dist-upgrade/*",self.resultdir)
870+
871+ # stop the machine
872+ print "Shuting down the VM"
873+ self.stop_instance()
874+
875+ return True
876+
877+ def test(self):
878+ # FIXME: add some tests here to see if the upgrade worked
879+ # this should include:
880+ # - new kernel is runing (run uname -r in target)
881+ # - did it sucessfully rebooted
882+ # - is X runing
883+ # - generate diff of upgrade vs fresh install
884+ # ...
885+ return True
886+
887+
888+ # compatibility for the auto-install-tester
889+ def start(self):
890+ self.start_instance()
891+ def stop(self):
892+ self.stop_instance()
893+ def saveVMSnapshot(self):
894+ print "saveVMSnapshot not supported yet"
895+ def restoreVMSnapshot(self):
896+ print "restoreVMSnapshot not supported yet"
897+
898+
899+# vim:ts=4:sw=4:et
900+
901
902=== added file 'AutoUpgradeTester/UpgradeTestBackendQemu.py'
903--- AutoUpgradeTester/UpgradeTestBackendQemu.py 1970-01-01 00:00:00 +0000
904+++ AutoUpgradeTester/UpgradeTestBackendQemu.py 2012-05-22 15:21:19 +0000
905@@ -0,0 +1,585 @@
906+# qemu backend
907+
908+from UpgradeTestBackendSSH import UpgradeTestBackendSSH
909+from DistUpgrade.sourceslist import SourcesList
910+
911+import ConfigParser
912+import subprocess
913+import os
914+import sys
915+import os.path
916+import shutil
917+import glob
918+import time
919+import tempfile
920+import atexit
921+import apt_pkg
922+import fcntl
923+
924+from DistUpgrade.utils import is_port_already_listening
925+
926+# images created with http://bazaar.launchpad.net/~mvo/ubuntu-jeos/mvo
927+# ./ubuntu-jeos-builder --vm kvm --kernel-flavor generic --suite feisty --ssh-key `pwd`/ssh-key.pub --components main,restricted --rootsize 20G
928+#
929+
930+
931+# TODO:
932+# - add support to boot certain images with certain parameters
933+# (dapper-386 needs qemu/kvm with "-no-acpi" to boot reliable)
934+# - add option to use pre-done base images
935+# the bootstrap() step is then a matter of installing the right
936+# packages into the image (via _runInImage())
937+#
938+# - refactor and move common code to UpgradeTestBackend
939+# - convert ChrootNonInteractive
940+# - benchmark qemu/qemu+kqemu/kvm/chroot
941+# - write tests (unittest, doctest?)
942+# - offer "test-upgrade" feature on real system, run it
943+# as "qemu -hda /dev/hda -snapshot foo -append init=/upgrade-test"
944+# (this *should* write the stuff to the snapshot file
945+# - add "runInTarget()" that will write a marker file so that we can
946+# re-run a command if it fails the first time (or fails because
947+# a fsck was done and reboot needed in the VM etc)
948+# - start a X session with the gui-upgrader in a special
949+# "non-interactive" mode to see if the gui upgrade would work too
950+
951+class NoImageFoundException(Exception):
952+ pass
953+
954+class PortInUseException(Exception):
955+ pass
956+class NoPortsException(Exception):
957+ pass
958+
959+
960+class UpgradeTestBackendQemu(UpgradeTestBackendSSH):
961+ " qemu/kvm backend - need qemu >= 0.9.0"
962+
963+ QEMU_DEFAULT_OPTIONS = [
964+ "-monitor","stdio",
965+ "-localtime",
966+ "-no-reboot", # exit on reboot
967+ # "-no-kvm", # crashes sometimes with kvm HW
968+ ]
969+
970+ def __init__(self, profile):
971+ UpgradeTestBackendSSH.__init__(self, profile)
972+ self.qemu_options = self.QEMU_DEFAULT_OPTIONS[:]
973+ self.qemu_pid = None
974+ self.profiledir = profile
975+ self.profile_override = os.path.join(
976+ self.profiledir, "..", "override.cfg.d")
977+ # get the kvm binary
978+ self.qemu_binary = self.config.getWithDefault("KVM","KVM","kvm")
979+ # setup mount dir/imagefile location
980+ self.baseimage = self.config.get("KVM", "BaseImage")
981+ if not os.path.exists(self.baseimage):
982+ print "Missing '%s' base image, need to build it now" % self.baseimage
983+ arch = self.config.getWithDefault("KVM", "Arch", "i386")
984+ rootsize = self.config.getWithDefault("KVM", "RootSize", "80000")
985+ destdir = "ubuntu-kvm-%s-%s" % (arch, self.fromDist)
986+ ret = subprocess.call(["sudo",
987+ "ubuntu-vm-builder","kvm", self.fromDist,
988+ "--kernel-flavour", "generic",
989+ "--ssh-key", "%s.pub" % self.ssh_key ,
990+ "--components", "main,restricted",
991+ "--rootsize", rootsize,
992+ "--addpkg", "openssh-server",
993+ "--destdir", destdir,
994+ "--arch", arch])
995+ # move the disk in place, ubuntu-vm-builder uses a random filename
996+ shutil.move(glob.glob("%s/*.qcow2" % destdir)[0],
997+ self.baseimage)
998+ # remove old tree to ensure that subsequent runs work
999+ shutil.rmtree(destdir)
1000+ if ret != 0:
1001+ raise NoImageFoundException
1002+ # check if we want virtio here and default to yes
1003+ try:
1004+ self.virtio = self.config.getboolean("KVM","Virtio")
1005+ except ConfigParser.NoOptionError:
1006+ self.virtio = True
1007+ if self.virtio:
1008+ self.qemu_options.extend(["-net","nic,model=virtio"])
1009+ self.qemu_options.extend(["-net","user"])
1010+ # swapimage
1011+ if self.config.getWithDefault("KVM","SwapImage",""):
1012+ self.qemu_options.append("-hdb")
1013+ self.qemu_options.append(self.config.get("KVM","SwapImage"))
1014+ # regular image
1015+ self.profilename = self.config.get("NonInteractive","ProfileName")
1016+ imagedir = self.config.get("KVM","ImageDir")
1017+ self.image = os.path.join(imagedir, "test-image.%s" % self.profilename)
1018+ # make ssh login possible (localhost 54321) available
1019+ ssh_port = int(self.config.getWithDefault("KVM","SshPort","54321"))
1020+ (self.ssh_lock, ssh_port) = self.getFreePort(port_base=ssh_port)
1021+ if not self.ssh_lock:
1022+ raise NoPortsException("Couldn't allocate SSH port.")
1023+ self.ssh_port = str(ssh_port)
1024+ print "using ssh port: %s" % self.ssh_port
1025+ self.ssh_hostname = "localhost"
1026+ self.qemu_options.append("-redir")
1027+ self.qemu_options.append("tcp:%s::22" % self.ssh_port)
1028+ # vnc port/display
1029+ VNC_BASE_PORT = 5900
1030+ vncport = int(self.config.getWithDefault("KVM","VncNum", "0")) + VNC_BASE_PORT
1031+ (self.vnc_lock, vncport) = self.getFreePort(port_base=vncport)
1032+ if not self.vnc_lock:
1033+ raise NoPortsException("Couldn't allocate VNC port.")
1034+ print "using VncNum: %s" % vncport
1035+ self.qemu_options.append("-vnc")
1036+ self.qemu_options.append("localhost:%s" % str(vncport - VNC_BASE_PORT))
1037+
1038+ # make the memory configurable
1039+ mem = self.config.getWithDefault("KVM","VirtualRam","1536")
1040+ self.qemu_options.append("-m")
1041+ self.qemu_options.append(str(mem))
1042+
1043+ # check if the ssh port is in use
1044+ if subprocess.call("netstat -t -l -n |grep 0.0.0.0:%s" % self.ssh_port,
1045+ shell=True) == 0:
1046+ raise PortInUseException, "the port is already in use (another upgrade tester is running?)"
1047+ # register exit handler to ensure that we quit kvm on exit
1048+ atexit.register(self.stop)
1049+
1050+ def __del__(self):
1051+ """
1052+ Destructor
1053+ Clean-up lockfiles
1054+ """
1055+ for lock in (self.ssh_lock, self.vnc_lock):
1056+ lockpath = lock.name
1057+ print "Releasing lock: %s" % lockpath
1058+ lock.close()
1059+ os.unlink(lockpath)
1060+
1061+ def genDiff(self):
1062+ """
1063+ generate a diff that compares a fresh install to a upgrade.
1064+ ideally that should be empty
1065+ Ensure that we always run this *after* the regular upgrade was
1066+ run (otherwise it is useless)
1067+ """
1068+ # generate ls -R output of test-image (
1069+ self.start()
1070+ self._runInImage(["find", "/bin", "/boot", "/etc/", "/home",
1071+ "/initrd", "/lib", "/root", "/sbin/",
1072+ "/srv", "/usr", "/var"],
1073+ stdout=open(self.resultdir+"/upgrade_install.files","w"))
1074+ self._runInImage(["dpkg","--get-selections"],
1075+ stdout=open(self.resultdir+"/upgrade_install.pkgs","w"))
1076+ self._runInImage(["tar","cvf","/tmp/etc-upgrade.tar","/etc"])
1077+ self._copyFromImage("/tmp/etc-upgrade.tar", self.resultdir)
1078+ self.stop()
1079+
1080+ # HACK: now build fresh toDist image - it would be best if
1081+ self.fromDist = self.config.get("Sources","To")
1082+ self.config.set("Sources","From",
1083+ self.config.get("Sources","To"))
1084+ diff_image = os.path.join(self.profiledir, "test-image.diff")
1085+ # FIXME: we need to regenerate the base image too, but there is no
1086+ # way to do this currently without running as root
1087+ # as a workaround we regenerate manually every now and then
1088+ # and use UpgradeFromDistOnBootstrap=true here
1089+ self.config.set("KVM","CacheBaseImage", "false")
1090+ self.config.set("NonInteractive","UpgradeFromDistOnBootstrap","true")
1091+ self.baseimage = "jeos/%s-i386.qcow2" % self.config.get("Sources","To")
1092+ self.image = diff_image
1093+ print "bootstraping into %s" % diff_image
1094+ self.bootstrap()
1095+ print "bootstrap finshsed"
1096+ self.start()
1097+ print "generating file diff list"
1098+ self._runInImage(["find", "/bin", "/boot", "/etc/", "/home",
1099+ "/initrd", "/lib", "/root", "/sbin/",
1100+ "/srv", "/usr", "/var"],
1101+ stdout=open(self.resultdir+"/fresh_install","w"))
1102+ self._runInImage(["dpkg","--get-selections"],
1103+ stdout=open(self.resultdir+"/fresh_install.pkgs","w"))
1104+ self._runInImage(["tar","cvf","/tmp/etc-fresh.tar","/etc"])
1105+ self._copyFromImage("/tmp/etc-fresh.tar", self.resultdir)
1106+ self.stop()
1107+ # now compare the diffs
1108+ pass
1109+
1110+ def bootstrap(self, force=False):
1111+ print "bootstrap()"
1112+
1113+ # move old crash files away so that test() is not
1114+ # confused by them
1115+ for f in glob.glob(self.resultdir+"/*.crash"):
1116+ shutil.move(f, f+".old")
1117+
1118+ # copy image into place, use baseimage as template
1119+ # we expect to be able to ssh into the baseimage to
1120+ # set it up
1121+ if (not force and
1122+ os.path.exists("%s.%s" % (self.image,self.fromDist)) and
1123+ self.config.has_option("KVM","CacheBaseImage") and
1124+ self.config.getboolean("KVM","CacheBaseImage")):
1125+ print "Not bootstraping again, we have a cached BaseImage"
1126+ shutil.copy("%s.%s" % (self.image,self.fromDist), self.image)
1127+ return True
1128+
1129+ print "Building new image '%s' based on '%s'" % (self.image, self.baseimage)
1130+ shutil.copy(self.baseimage, self.image)
1131+
1132+ # get common vars
1133+ basepkg = self.config.get("NonInteractive","BasePkg")
1134+ additional_base_pkgs = self.config.getlist("Distro","BaseMetaPkgs")
1135+
1136+ # start the VM
1137+ self.start()
1138+
1139+ # FIXME: make this part of the apt env
1140+ # otherwise we get funny debconf promtps for
1141+ # e.g. the xserver
1142+ #export DEBIAN_FRONTEND=noninteractive
1143+ #export APT_LISTCHANGES_FRONTEND=none
1144+ #
1145+
1146+ # generate static network config (NetworkManager likes
1147+ # to reset the dhcp interface and that sucks when
1148+ # going into the VM with ssh)
1149+ nm = self.config.getWithDefault("NonInteractive","WorkaroundNetworkManager","")
1150+ if nm:
1151+ interfaces = tempfile.NamedTemporaryFile()
1152+ interfaces.write("""
1153+auto lo
1154+iface lo inet loopback
1155+
1156+auto eth0
1157+iface eth0 inet static
1158+ address 10.0.2.15
1159+ netmask 255.0.0.0
1160+ gateway 10.0.2.2
1161+""")
1162+ interfaces.flush()
1163+ self._copyToImage(interfaces.name, "/etc/network/interfaces")
1164+
1165+ # generate hosts file, the default hosts file contains
1166+ # "127.0.0.1 ubuntu. ubuntu" for some reason and the missing
1167+ # domain part after the "." makes e.g. postfix rather unhappy
1168+ etc_hosts = tempfile.NamedTemporaryFile()
1169+ etc_hosts.write('127.0.0.1 localhost\n')
1170+ etc_hosts.write('127.0.0.1 upgrade-test-vm\n')
1171+ etc_hosts.flush()
1172+ self._copyToImage(etc_hosts.name, "/etc/hosts")
1173+
1174+ # generate apt.conf
1175+ proxy = self.config.getWithDefault("NonInteractive","Proxy","")
1176+ if proxy:
1177+ aptconf = tempfile.NamedTemporaryFile()
1178+ aptconf.write('Acquire::http::proxy "%s";' % proxy)
1179+ aptconf.flush()
1180+ self._copyToImage(aptconf.name, "/etc/apt/apt.conf")
1181+
1182+ # tzdata is unhappy without that file
1183+ tzone = tempfile.NamedTemporaryFile()
1184+ tzone.write("Europe/Berlin")
1185+ tzone.flush()
1186+ self._copyToImage(tzone.name, "/etc/timezone")
1187+
1188+ aptclone = self.config.getWithDefault('NonInteractive', 'AptCloneFile', '')
1189+
1190+ if not aptclone:
1191+ # create /etc/apt/sources.list
1192+ sources = self.getSourcesListFile()
1193+ self._copyToImage(sources.name, "/etc/apt/sources.list")
1194+
1195+ # install some useful stuff
1196+ ret = self._runInImage(["apt-get","update"])
1197+ assert ret == 0
1198+ # FIXME: instead of this retrying (for network errors with
1199+ # proxies) we should have a self._runAptInImage()
1200+ for i in range(3):
1201+ ret = self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","install", "-y",basepkg]+additional_base_pkgs)
1202+ assert ret == 0
1203+ else:
1204+ dst_clonename = '/tmp/apt-clone.tgz'
1205+ self._copyToImage(aptclone, dst_clonename)
1206+ ret = self._runInImage(["DEBIAN_FRONTEND=noninteractive", "apt-get",
1207+ "install", "-y", "apt-clone"])
1208+ assert ret == 0
1209+ print "Restoring clone from %s" % aptclone
1210+ ret = self._runInImage(['DEBIAN_FRONTEND=noninteractive',
1211+ 'apt-clone', 'restore', dst_clonename])
1212+ # FIXME: what action should be taken when a package failed
1213+ # to restore?
1214+ if ret != 0:
1215+ print "WARNING: Some packages failed to restore. Continuing anyway!"
1216+ #assert ret == 0
1217+
1218+ CMAX = 4000
1219+ pkgs = self.config.getListFromFile("NonInteractive","AdditionalPkgs")
1220+ while(len(pkgs)) > 0:
1221+ print "installing additonal: %s" % pkgs[:CMAX]
1222+ ret= self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","install","--reinstall","-y"]+pkgs[:CMAX])
1223+ print "apt(2) returned: %s" % ret
1224+ if ret != 0:
1225+ #self._cacheDebs(tmpdir)
1226+ self.stop()
1227+ return False
1228+ pkgs = pkgs[CMAX+1:]
1229+
1230+ # Copy additional data to the image that can the be used by the
1231+ # post bootstrap script
1232+ # Data is copied to /upgrade-tester/data
1233+ # Value is a list of files separated by commas
1234+ datadir = '/upgrade-tester/data'
1235+ self._runInImage(["mkdir", "-p", datadir])
1236+ if self.config.has_option("NonInteractive", "PostBootstrapData"):
1237+ data = self.config.get("NonInteractive", "PostBootstrapData")
1238+ for datafile in data.split(','):
1239+ self._copyToImage(datafile, datadir)
1240+
1241+ if self.config.has_option("NonInteractive","PostBootstrapScript"):
1242+ script = self.config.get("NonInteractive","PostBootstrapScript")
1243+ print "have PostBootstrapScript: %s" % script
1244+ if os.path.exists(script):
1245+ self._copyToImage(script, "/upgrade-tester")
1246+ self._copyToImage(glob.glob(os.path.dirname(
1247+ self.profile)+"/*.cfg"), "/upgrade-tester")
1248+ script_name = os.path.basename(script)
1249+ self._runInImage(["chmod","755",
1250+ os.path.join("/upgrade-tester",script_name)])
1251+ print "running script: %s" % script_name
1252+ cmd = os.path.join("/upgrade-tester",script_name)
1253+ ret = self._runInImage(["cd /upgrade-tester; %s" % cmd])
1254+ print "PostBootstrapScript returned: %s" % ret
1255+ assert ret == 0, "PostBootstrapScript returned non-zero"
1256+ else:
1257+ print "WARNING: %s not found" % script
1258+
1259+ if self.config.getWithDefault("NonInteractive",
1260+ "UpgradeFromDistOnBootstrap", False):
1261+ print "running apt-get upgrade in from dist (after bootstrap)"
1262+ for i in range(3):
1263+ ret = self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","-y","dist-upgrade"])
1264+ assert ret == 0, "dist-upgrade returned %s" % ret
1265+
1266+ print "Cleaning image"
1267+ ret = self._runInImage(["apt-get","clean"])
1268+ assert ret == 0, "apt-get clean returned %s" % ret
1269+
1270+ # done with the bootstrap
1271+ self.stop()
1272+
1273+ # copy cache into place (if needed)
1274+ if (self.config.has_option("KVM","CacheBaseImage") and
1275+ self.config.getboolean("KVM","CacheBaseImage")):
1276+ shutil.copy(self.image, "%s.%s" % (self.image,self.fromDist))
1277+
1278+ return True
1279+
1280+ def saveVMSnapshot(self,name):
1281+ # savevm
1282+ print "savevm"
1283+ self.stop()
1284+ shutil.copy(self.image, self.image+"."+name)
1285+ return
1286+ # *sigh* buggy :/
1287+ #self.qemu_pid.stdin.write("stop\n")
1288+ #self.qemu_pid.stdin.write("savevm %s\n" % name)
1289+ #self.qemu_pid.stdin.write("cont\n")
1290+ def delVMSnapshot(self,name):
1291+ print "delvm"
1292+ self.qemu_pid.stdin.write("delvm %s\n" % name)
1293+ def restoreVMSnapshot(self,name):
1294+ print "restorevm"
1295+ self.stop()
1296+ shutil.copy(self.image+"."+name, self.image)
1297+ return
1298+ # loadvm
1299+ # *sigh* buggy :/
1300+ #self.qemu_pid.stdin.write("stop\n")
1301+ #self.qemu_pid.stdin.write("loadvm %s\n" % name)
1302+ #self.qemu_pid.stdin.write("cont\n")
1303+
1304+ def start(self):
1305+ if self.qemu_pid != None:
1306+ print "already runing"
1307+ return True
1308+ # mvo: disabled for now, hardy->lucid does not work well with it
1309+ # (random hangs)
1310+ #if self.virtio:
1311+ # drive = ["-drive", "file=%s,if=virtio,boot=on" % self.image]
1312+ #else:
1313+ drive = ["-hda", self.image]
1314+ # build cmd
1315+ cmd = [self.qemu_binary]+drive+self.qemu_options
1316+ print "Starting %s" % cmd
1317+ self.qemu_pid = subprocess.Popen(cmd, stdin=subprocess.PIPE)
1318+ # spin here until ssh has come up and we can login
1319+ now = time.time()
1320+ while True:
1321+ if self.qemu_pid.poll():
1322+ res = self.qemu_pid.wait()
1323+ print "qemu stopped unexpecedtly with exit code '%s'" % res
1324+ return False
1325+ time.sleep(1)
1326+ if self._runInImage(["/bin/true"]) == 0:
1327+ break
1328+ if (time.time() - now) > 900:
1329+ print "Could not start image after 900s, exiting"
1330+ return False
1331+ return True
1332+
1333+ def stop(self):
1334+ " we stop because we run with -no-reboot"
1335+ print "stop"
1336+ if self.qemu_pid:
1337+ print "stop pid: ", self.qemu_pid
1338+ self._runInImage(["/sbin/reboot"])
1339+ print "waiting for qemu to shutdown"
1340+ for i in range(600):
1341+ if self.qemu_pid.poll() is not None:
1342+ print "poll() returned"
1343+ break
1344+ time.sleep(1)
1345+ else:
1346+ print "Not stopped after 600s, killing "
1347+ try:
1348+ os.kill(int(self.qemu_pid.pid), 15)
1349+ time.sleep(10)
1350+ os.kill(int(self.qemu_pid.pid), 9)
1351+ except Exception, e:
1352+ print "FAILED to kill %s '%s'" % (self.qemu_pid, e)
1353+ self.qemu_pid = None
1354+ print "qemu stopped"
1355+
1356+
1357+ def upgrade(self):
1358+ print "upgrade()"
1359+
1360+ # clean from any leftover pyc files
1361+ for f in glob.glob("%s/*.pyc" % self.upgradefilesdir):
1362+ os.unlink(f)
1363+
1364+ print "Starting for upgrade"
1365+ if not self.start():
1366+ return False
1367+
1368+ # copy the profile
1369+ if os.path.exists(self.profile):
1370+ print "Copying '%s' to image overrides" % self.profile
1371+ self._runInImage(["mkdir","-p","/etc/update-manager/release-upgrades.d"])
1372+ self._copyToImage(self.profile, "/etc/update-manager/release-upgrades.d/")
1373+ for override_cfg in glob.glob(
1374+ os.path.abspath(os.path.join(self.profile_override, "*.cfg"))):
1375+ print "Copying '%s' to image overrides" % override_cfg
1376+ self._copyToImage(
1377+ override_cfg, "/etc/update-manager/release-upgrades.d/")
1378+
1379+ # copy test repo sources.list (if needed)
1380+ test_repo = self.config.getWithDefault("NonInteractive","AddRepo","")
1381+ if test_repo:
1382+ test_repo = os.path.join(os.path.dirname(self.profile), test_repo)
1383+ self._copyToImage(test_repo, "/etc/apt/sources.list.d")
1384+ sourcelist = self.getSourcesListFile()
1385+ apt_pkg.Config.Set("Dir::Etc", os.path.dirname(sourcelist.name))
1386+ apt_pkg.Config.Set("Dir::Etc::sourcelist",
1387+ os.path.basename(sourcelist.name))
1388+ sources = SourcesList(matcherPath=".")
1389+ sources.load(test_repo)
1390+ # add the uri to the list of valid mirros in the image
1391+ self._runInImage(["mkdir","-p","/upgrade-tester"])
1392+ self._runInImage(["echo -e '[Sources]\nValidMirrors=/upgrade-tester/new_mirrors.cfg' > /etc/update-manager/release-upgrades.d/new_mirrors.cfg"])
1393+ for entry in sources.list:
1394+ if (not (entry.invalid or entry.disabled) and
1395+ entry.type == "deb"):
1396+ print "adding %s to mirrors" % entry.uri
1397+ self._runInImage(["echo '%s' >> /upgrade-tester/new_mirrors.cfg" % entry.uri])
1398+
1399+ # upgrade *before* the regular upgrade runs
1400+ if self.config.getWithDefault("NonInteractive", "AddRepoUpgradeImmediately", False):
1401+ self._runInImage(["apt-get", "update"])
1402+ self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","-y","dist-upgrade", "--allow-unauthenticated"])
1403+
1404+ apt_conf = self.config.getWithDefault("NonInteractive","AddAptConf","")
1405+ if apt_conf:
1406+ apt_conf = os.path.join(os.path.dirname(self.profile), apt_conf)
1407+ self._copyToImage(apt_conf, "/etc/apt/apt.conf.d")
1408+
1409+ # check if we have a bzr checkout dir to run against or
1410+ # if we should just run the normal upgrader
1411+ cmd_prefix=[]
1412+ debconf_log = self.config.getWithDefault(
1413+ 'NonInteractive', 'DebconfLog', '')
1414+ if debconf_log:
1415+ cmd_prefix=['export DEBIAN_FRONTEND=editor EDITOR="cat>>%s";' % debconf_log]
1416+ print "Logging debconf prompts to %s" % debconf_log
1417+ if not self.config.getWithDefault("NonInteractive","ForceOverwrite", False):
1418+ print "Disabling ForceOverwrite"
1419+ cmd_prefix += ["export RELEASE_UPGRADE_NO_FORCE_OVERWRITE=1;"]
1420+ if (os.path.exists(self.upgradefilesdir) and
1421+ self.config.getWithDefault("NonInteractive",
1422+ "UseUpgraderFromBzr",
1423+ True)):
1424+ print "Using ./DistUpgrade/* for the upgrade"
1425+ self._copyUpgraderFilesFromBzrCheckout()
1426+ ret = self._runBzrCheckoutUpgrade(cmd_prefix)
1427+ else:
1428+ print "Using do-release-upgrade for the upgrade"
1429+ ret = self._runInImage(cmd_prefix+["do-release-upgrade","-d",
1430+ "-f","DistUpgradeViewNonInteractive"])
1431+ print "dist-upgrade.py returned: %i" % ret
1432+
1433+ # copy the result
1434+ print "coyping the result"
1435+ self._copyFromImage("/var/log/dist-upgrade/*",self.resultdir)
1436+
1437+ # give the ssh output extra time
1438+ time.sleep(10)
1439+
1440+ # stop the machine
1441+ print "Shuting down the VM"
1442+ self.stop()
1443+ return (ret == 0)
1444+
1445+ def getFreePort(self, port_base=1025, prefix='auto-upgrade-tester'):
1446+ """ Find a free port and lock it when found
1447+ :param port_base: Base port number.
1448+ :param prefix: Prefix name for the lock
1449+ :return: (lockfile, portnumber)
1450+ """
1451+
1452+ # allows the system to be configurable
1453+ lockdir = self.profiledir
1454+
1455+ for port_inc in range(0, 100):
1456+ port_num = port_base + port_inc
1457+ if is_port_already_listening(port_num):
1458+ print "Port %d already in use. Skipping!" % port_num
1459+ continue
1460+
1461+ lockfilepath = os.path.join(lockdir, '%s.%d.lock' % (prefix, port_num))
1462+ # FIXME: we can use apt_pkg.get_lock() here instead
1463+ if not os.path.exists(lockfilepath):
1464+ open(lockfilepath, 'w').close()
1465+ lock = open(lockfilepath, 'r+')
1466+ try:
1467+ fcntl.flock(lock, fcntl.LOCK_EX|fcntl.LOCK_NB)
1468+ return (lock, port_num)
1469+ except IOError:
1470+ print "Port %d already locked. Skipping!" % port_num
1471+ lock.close()
1472+
1473+ print "No free port found. Aborting!"
1474+ return (None, None)
1475+
1476+if __name__ == "__main__":
1477+
1478+ # FIXME: very rough proof of conecpt, unify with the chroot
1479+ # and automatic-upgrade code
1480+ # see also /usr/sbin/qemu-make-debian-root
1481+
1482+ qemu = UpgradeTestBackendQemu(sys.argv[1],".")
1483+ #qemu.bootstrap()
1484+ #qemu.start()
1485+ #qemu._runInImage(["ls","/"])
1486+ #qemu.stop()
1487+ qemu.upgrade()
1488+
1489+ # FIXME: now write something into rc.local again and run reboot
1490+ # and see if we come up with the new kernel
1491
1492=== added file 'AutoUpgradeTester/UpgradeTestBackendSSH.py'
1493--- AutoUpgradeTester/UpgradeTestBackendSSH.py 1970-01-01 00:00:00 +0000
1494+++ AutoUpgradeTester/UpgradeTestBackendSSH.py 2012-05-22 15:21:19 +0000
1495@@ -0,0 +1,218 @@
1496+# abstract backend that is based around ssh login
1497+
1498+from UpgradeTestBackend import UpgradeTestBackend
1499+
1500+import glob
1501+import logging
1502+import os
1503+import os.path
1504+import subprocess
1505+import time
1506+
1507+
1508+class UpgradeTestBackendSSH(UpgradeTestBackend):
1509+ " abstract backend that works with ssh "
1510+
1511+ def __init__(self, profile):
1512+ UpgradeTestBackend.__init__(self, profile)
1513+ self.profiledir = os.path.dirname(profile)
1514+ # get ssh key name
1515+ self.ssh_key = os.path.abspath(
1516+ self.config.getWithDefault(
1517+ "NonInteractive",
1518+ "SSHKey",
1519+ "/var/cache/auto-upgrade-tester/ssh-key")
1520+ )
1521+ if not os.path.exists(self.ssh_key):
1522+ print "Creating key: %s" % self.ssh_key
1523+ subprocess.call(["ssh-keygen","-N","","-f",self.ssh_key])
1524+
1525+ def login(self):
1526+ " run a shell in the image "
1527+ print "login"
1528+ self.start()
1529+ ret = self._runInImage(["/bin/sh"])
1530+ if ret != 0:
1531+ logging.warn("_runInImage returned: %s" % ret)
1532+ self.stop()
1533+
1534+ def ping(self, user="root"):
1535+ " check if the instance is ready "
1536+ ret = self._runInImageAsUser(user, ["/bin/true"])
1537+ return (ret == 0)
1538+
1539+ def _copyToImage(self, fromF, toF, recursive=False):
1540+ "copy a file (or a list of files) to the given toF image location"
1541+ cmd = ["scp",
1542+ "-P", self.ssh_port,
1543+ "-q","-q", # shut it up
1544+ "-i",self.ssh_key,
1545+ "-o", "StrictHostKeyChecking=no",
1546+ "-o", "UserKnownHostsFile=%s" % os.path.dirname(
1547+ self.profile)+"/known_hosts"
1548+ ]
1549+ if recursive:
1550+ cmd.append("-r")
1551+ # we support both single files and lists of files
1552+ if isinstance(fromF,list):
1553+ cmd += fromF
1554+ else:
1555+ cmd.append(fromF)
1556+ cmd.append("root@%s:%s" % (self.ssh_hostname, toF))
1557+ #print cmd
1558+ ret = subprocess.call(cmd)
1559+ return ret
1560+
1561+ def _copyFromImage(self, fromF, toF):
1562+ "copy a file from the given fromF image location"
1563+ cmd = ["scp",
1564+ "-P",self.ssh_port,
1565+ "-q","-q", # shut it up
1566+ "-i",self.ssh_key,
1567+ "-o", "StrictHostKeyChecking=no",
1568+ "-o", "UserKnownHostsFile=%s" % os.path.dirname(self.profile)+"/known_hosts",
1569+ "root@%s:%s" % (self.ssh_hostname, fromF),
1570+ toF
1571+ ]
1572+ #print cmd
1573+ ret = subprocess.call(cmd)
1574+ return ret
1575+
1576+
1577+ def _runInImage(self, command, **kwargs):
1578+ ret = self._runInImageAsUser("root", command, **kwargs)
1579+ return ret
1580+
1581+ def _runInImageAsUser(self, user, command, **kwargs):
1582+ "run a given command in the image"
1583+ # ssh -l root -p 54321 localhost -i profile/server/ssh_key
1584+ # -o StrictHostKeyChecking=no
1585+ ret = subprocess.call(["ssh",
1586+ "-tt",
1587+ "-l", user,
1588+ "-p",self.ssh_port,
1589+ self.ssh_hostname,
1590+ "-q","-q", # shut it up
1591+ "-i",self.ssh_key,
1592+ "-o", "StrictHostKeyChecking=no",
1593+ "-o", "BatchMode=yes",
1594+ "-o", "UserKnownHostsFile=%s" % os.path.dirname(self.profile)+"/known_hosts",
1595+ ]+command, **kwargs)
1596+ return ret
1597+
1598+
1599+ def installPackages(self, pkgs):
1600+ " install additional pkgs (list) into the vm before the upgrade "
1601+ if not pkgs:
1602+ return True
1603+ self.start()
1604+ self._runInImage(["apt-get","update"])
1605+ ret = self._runInImage(["DEBIAN_FRONTEND=noninteractive","apt-get","install", "--reinstall", "-y"]+pkgs)
1606+ self.stop()
1607+ return (ret == 0)
1608+
1609+
1610+ def _copyUpgraderFilesFromBzrCheckout(self):
1611+ " copy upgrader files from a bzr checkout "
1612+ print "copy upgrader into image"
1613+ # copy the upgrade into target+/upgrader-tester/
1614+ files = []
1615+ self._runInImage(["mkdir","-p","/upgrade-tester","/etc/update-manager/release-upgrades.d"])
1616+ for f in glob.glob("%s/*" % self.upgradefilesdir):
1617+ if not os.path.isdir(f):
1618+ files.append(f)
1619+ elif os.path.islink(f):
1620+ print "Copying link '%s' to image " % f
1621+ self._copyToImage(f, "/upgrade-tester", recursive=True)
1622+ self._copyToImage(files, "/upgrade-tester")
1623+ # and any other cfg files
1624+ for f in glob.glob(os.path.dirname(self.profile)+"/*.cfg"):
1625+ if (os.path.isfile(f) and
1626+ not os.path.basename(f).startswith("DistUpgrade.cfg")):
1627+ print "Copying '%s' to image " % f
1628+ self._copyToImage(f, "/upgrade-tester")
1629+ # base-installer
1630+ bi="%s/base-installer" % self.upgradefilesdir
1631+ print "Copying '%s' to image" % bi
1632+ self._copyToImage(bi, "/upgrade-tester/", recursive=True)
1633+ # copy the patches
1634+ pd="%s/patches" % self.upgradefilesdir
1635+ print "Copying '%s' to image" % pd
1636+ self._copyToImage(pd, "/upgrade-tester/", recursive=True)
1637+ # and prereq lists
1638+ prereq = self.config.getWithDefault("PreRequists","SourcesList",None)
1639+ if prereq is not None:
1640+ prereq = os.path.join(os.path.dirname(self.profile),prereq)
1641+ print "Copying '%s' to image" % prereq
1642+ self._copyToImage(prereq, "/upgrade-tester")
1643+
1644+ def _runBzrCheckoutUpgrade(self, cmd_prefix):
1645+ # start the upgrader
1646+ print "running the upgrader now"
1647+
1648+ # this is to support direct copying of backport udebs into the
1649+ # qemu image - useful for testing backports without having to
1650+ # push them into the archive
1651+ upgrader_args = ""
1652+ upgrader_env = ""
1653+
1654+ backports = self.config.getlist("NonInteractive", "PreRequistsFiles")
1655+ if backports:
1656+ self._runInImage(["mkdir -p /upgrade-tester/backports"])
1657+ for f in backports:
1658+ print "Copying %s" % os.path.basename(f)
1659+ self._copyToImage(f, "/upgrade-tester/backports/")
1660+ self._runInImage(["(cd /upgrade-tester/backports ; dpkg-deb -x %s . )" % os.path.basename(f)])
1661+ upgrader_args = " --have-prerequists"
1662+ upgrader_env = "LD_LIBRARY_PATH=/upgrade-tester/backports/usr/lib PATH=/upgrade-tester/backports/usr/bin:$PATH PYTHONPATH=/upgrade-tester/backports//usr/lib/python$(python -c 'import sys; print \"%s.%s\" % (sys.version_info[0], sys.version_info[1])')/site-packages/ "
1663+
1664+ ret = self._runInImage(cmd_prefix+["(cd /upgrade-tester/ ; "
1665+ "%s./dist-upgrade.py %s)" % (upgrader_env,
1666+ upgrader_args)])
1667+ return ret
1668+
1669+ def test(self):
1670+ # - generate diff of upgrade vs fresh install
1671+ # ...
1672+ #self.genDiff()
1673+ self.start()
1674+ # check for crashes
1675+ self._copyFromImage("/var/crash/*.crash", self.resultdir)
1676+ crashfiles = glob.glob(self.resultdir+"/*.crash")
1677+ # run stuff in post_upgrade_tests dir
1678+ ok = True
1679+ results = []
1680+ for script in glob.glob(self.post_upgrade_tests_dir+"*"):
1681+ if not os.access(script, os.X_OK):
1682+ continue
1683+ result = {'name':os.path.basename(script),
1684+ 'result':'pass',
1685+ 'time':0,
1686+ 'message':''
1687+ }
1688+ start_time = time.time()
1689+ logging.info("running '%s' post_upgrade_test" % script)
1690+ self._copyToImage(script, "/tmp/")
1691+ ret = self._runInImage(["/tmp/%s" % os.path.basename(script)])
1692+ if ret != 0:
1693+ print "WARNING: post_upgrade_test '%s' failed" % script
1694+ ok = False
1695+ log=open(self.resultdir+"/test-%s.FAIL" % os.path.basename(script), "w")
1696+ log.write("FAIL")
1697+ result['result'] = 'fail'
1698+ result['message'] = "post_upgrade_test '%s' failed" % script
1699+ result['time'] = time.time() - start_time
1700+ results.append(result)
1701+
1702+ # check for conffiles (the copy is done via a post upgrade script)
1703+ self._copyFromImage("/tmp/*.dpkg-dist", self.resultdir)
1704+ # Collect debconf prompts generated by debconf_test.py script
1705+ self._copyFromImage("/tmp/debconf_*.log", self.resultdir)
1706+ self.resultsToJunitXML(results, os.path.join(self.resultdir, 'results.xml'))
1707+
1708+ self.stop()
1709+ if len(crashfiles) > 0:
1710+ print "WARNING: crash files detected on the upgrade"
1711+ print crashfiles
1712+ return False
1713+ return ok
1714
1715=== added file 'AutoUpgradeTester/UpgradeTestBackendSimulate.py'
1716--- AutoUpgradeTester/UpgradeTestBackendSimulate.py 1970-01-01 00:00:00 +0000
1717+++ AutoUpgradeTester/UpgradeTestBackendSimulate.py 2012-05-22 15:21:19 +0000
1718@@ -0,0 +1,32 @@
1719+# UpgradeTestBackendSimulate.py
1720+#
1721+# test backend
1722+#
1723+
1724+import tempfile
1725+
1726+from UpgradeTestBackend import UpgradeTestBackend
1727+
1728+class UpgradeTestBackendSimulate(UpgradeTestBackend):
1729+
1730+ def __init__(self, profiledir, resultdir=""):
1731+ tmpdir = tempfile.mkdtemp()
1732+ super(UpgradeTestBackendSimulate, self).__init__(profiledir, resultdir=tmpdir)
1733+
1734+ def installPackages(self, pkgs):
1735+ print "simulate installing packages: %s" % ",".join(pkgs)
1736+
1737+ def bootstrap(self):
1738+ " bootstaps a pristine install"
1739+ print "simulate running bootstrap"
1740+ return True
1741+
1742+ def upgrade(self):
1743+ " upgrade a given install "
1744+ print "simulate running upgrade"
1745+ return True
1746+
1747+ def test(self):
1748+ " test if the upgrade was successful "
1749+ print "running post upgrade test"
1750+ return True
1751
1752=== added file 'AutoUpgradeTester/__init__.py'
1753=== added file 'AutoUpgradeTester/apt-watchdog'
1754--- AutoUpgradeTester/apt-watchdog 1970-01-01 00:00:00 +0000
1755+++ AutoUpgradeTester/apt-watchdog 2012-05-22 15:21:19 +0000
1756@@ -0,0 +1,50 @@
1757+#!/usr/bin/python
1758+#
1759+# this is watchdog that will try to kill hanging apt-get installs
1760+# that may happen when the auto-install-tester runs
1761+#
1762+# its probably not useful for anything else
1763+
1764+import os
1765+import signal
1766+import subprocess
1767+import sys
1768+import time
1769+
1770+# default kill time 60min
1771+WAKEUP_INTERVAL = 60*60
1772+
1773+def watchdog_loop():
1774+ watch_files = ["/var/log/apt/term.log",
1775+ "/var/log/dist-upgrade/apt-term.log"]
1776+ mtime = 0
1777+ while True:
1778+ for f in watch_files:
1779+ if os.path.exists(f):
1780+ mtime = max(mtime, os.path.getmtime(f))
1781+ time.sleep(WAKEUP_INTERVAL)
1782+ for f in watch_files:
1783+ if os.path.exists(f):
1784+ if os.path.getmtime(f) > mtime:
1785+ break
1786+ else:
1787+ print "no mtime change for %s seconds, sending SIGINT" % WAKEUP_INTERVAL
1788+ subprocess.call(["killall","-INT","apt-get"])
1789+
1790+
1791+if __name__ == "__main__":
1792+ print "Starting apt watchdog daemon for the auto-install-tester"
1793+
1794+ if len(sys.argv) > 1 and sys.argv[1] == "--no-daemon":
1795+ watchdog_loop()
1796+
1797+ # do the daemon thing
1798+ pid = os.fork()
1799+ if pid == 0:
1800+ os.setsid()
1801+ signal.signal(signal.SIGHUP, signal.SIG_IGN)
1802+ watchdog_loop()
1803+ else:
1804+ # add a little sleep to ensure child is setup
1805+ time.sleep(10)
1806+ os._exit(0)
1807
1808=== added file 'AutoUpgradeTester/auto-install-tester.py'
1809--- AutoUpgradeTester/auto-install-tester.py 1970-01-01 00:00:00 +0000
1810+++ AutoUpgradeTester/auto-install-tester.py 2012-05-22 15:21:19 +0000
1811@@ -0,0 +1,207 @@
1812+#!/usr/bin/python
1813+
1814+from optparse import OptionParser
1815+import os
1816+import os.path
1817+import time
1818+
1819+import sys
1820+sys.path.insert(0, "../DistUpgrade")
1821+
1822+from UpgradeTestBackendQemu import UpgradeTestBackendQemu
1823+
1824+import apt
1825+import apt_pkg
1826+
1827+def do_install_remove(backend, pkgname):
1828+ """ install a package in the backend """
1829+ #print "watchdog_runing: ", backend.watchdog_running
1830+ if not backend.watchdog_running:
1831+ print "starting watchdog"
1832+ backend._runInImage(["/bin/apt-watchdog"])
1833+ backend.watchdog_running = True
1834+# ret = backend._runInImage(["DEBIAN_FRONTEND=text","DEBIAN_PRIORITY=low",
1835+# "apt-get","install","-q","-y",pkg.name])
1836+ ret = backend._runInImage(["DEBIAN_FRONTEND=noninteractive",
1837+ "apt-get","install","-q","-y",pkg.name])
1838+ print "apt returned: ", ret
1839+ if ret != 0:
1840+ return False
1841+ # now remove it again
1842+ ret = backend._runInImage(["DEBIAN_FRONTEND=noninteractive",
1843+ "apt-get","autoremove", "-y",pkg.name])
1844+ print "apt returned: ", ret
1845+ if ret != 0:
1846+ return False
1847+ return True
1848+
1849+def test_downloadable(backend, pkgname):
1850+ """ test if the pkg is downloadable or gives a 404 """
1851+ ret = backend._runInImage(["apt-get","install","-q","--download-only","-y",pkg.name])
1852+ print "apt --download-only returned: ", ret
1853+ if ret != 0:
1854+ return False
1855+ return True
1856+
1857+if __name__ == "__main__":
1858+
1859+ parser = OptionParser()
1860+ parser.add_option("-p", "--profile", dest="profile",
1861+ default="profile/auto-install-tester/",
1862+ help="base profile dir")
1863+
1864+ (options, args) = parser.parse_args()
1865+
1866+ # create backend
1867+ apt_pkg.Config.Set("APT::Architecture","i386")
1868+ basedir = os.path.abspath(os.path.dirname(options.profile))
1869+ aptbasedir = os.path.join(basedir,"auto-install-test")
1870+
1871+
1872+ # create apt dirs if needed
1873+ for d in ["etc/apt/",
1874+ "var/lib/dpkg",
1875+ "var/lib/apt/lists/partial",
1876+ "var/cache/apt/archives/partial"]:
1877+ if not os.path.exists(os.path.join(aptbasedir,d)):
1878+ os.makedirs(os.path.join(aptbasedir,d))
1879+
1880+
1881+ backend = UpgradeTestBackendQemu(options.profile)
1882+ backend.watchdog_running = False
1883+ backend.bootstrap()
1884+
1885+ # copy status file from image to aptbasedir
1886+ backend.start()
1887+ print "copy apt-watchdog"
1888+ backend._copyToImage("apt-watchdog", "/bin/")
1889+ print "copy status file"
1890+ backend._copyFromImage("/var/lib/dpkg/status",
1891+ os.path.join(aptbasedir,"var/lib/dpkg/","status"))
1892+ print "run update"
1893+ backend._runInImage(["apt-get","-q", "update"])
1894+ backend.stop()
1895+
1896+ # build apt stuff (outside of the kvm)
1897+ mirror = backend.config.get("NonInteractive","Mirror")
1898+ dist = backend.config.get("Sources","From")
1899+ components = backend.config.getlist("NonInteractive","Components")
1900+ pockets = backend.config.getlist("NonInteractive","Pockets")
1901+ f=open(os.path.join(aptbasedir,"etc","apt","sources.list"),"w")
1902+ f.write("deb %s %s %s\n" % (mirror, dist, " ".join(components)))
1903+ for pocket in pockets:
1904+ f.write("deb %s %s-%s %s\n" % (mirror, dist, pocket, " ".join(components)))
1905+ f.close()
1906+
1907+ # get a cache
1908+ cache = apt.Cache(rootdir=os.path.abspath(aptbasedir))
1909+ cache.update(apt.progress.text.AcquireProgress())
1910+ cache.open(apt.progress.OpProgress())
1911+
1912+ # now test if we can install stuff
1913+ backend.saveVMSnapshot("clean-base")
1914+ backend.start()
1915+
1916+ # setup dirs
1917+ resultdir = backend.resultdir
1918+ print "Using resultdir: '%s'" % resultdir
1919+ failures = open(os.path.join(resultdir,"failures.txt"),"w")
1920+
1921+ # pkg blacklist - only useful for pkg that causes exsessive delays
1922+ # when installing, e.g. by requiring input or by tryint to connect
1923+ # to a (firewalled) network
1924+ pkgs_blacklisted = set()
1925+ sname = os.path.join(resultdir,"pkgs_blacklisted.txt")
1926+ print "looking at ", sname
1927+ if os.path.exists(sname):
1928+ pkgs_blacklisted = set(open(sname).read().split("\n"))
1929+ print "have '%s' with '%i' entries" % (sname, len(pkgs_blacklisted))
1930+
1931+ # set with package that have been tested successfully
1932+ pkgs_tested = set()
1933+ sname = os.path.join(resultdir,"pkgs_done.txt")
1934+ print "looking at ", sname
1935+ if os.path.exists(sname):
1936+ pkgs_tested = set(open(sname).read().split("\n"))
1937+ print "have '%s' with '%i' entries" % (sname, len(pkgs_tested))
1938+ statusfile = open(sname, "a")
1939+ else:
1940+ statusfile = open(sname, "w")
1941+
1942+ # now see if we can install and remove it again
1943+ for (i, pkg) in enumerate(cache):
1944+# for (i, pkg) in enumerate([ cache["abook"],
1945+# cache["emacspeak"],
1946+# cache["postfix"] ]):
1947+ # clean the cache
1948+ cache._depcache.Init()
1949+ print "\n\nPackage %s: %i of %i (%f.2)" % (pkg.name, i, len(cache),
1950+ float(i)/float(len(cache))*100)
1951+ print "pkgs_tested has %i entries\n\n" % len(pkgs_tested)
1952+
1953+ pkg_failed = False
1954+
1955+ # skip stuff in the ubuntu-minimal that we can't install or upgrade
1956+ if pkg.is_installed and not pkg.is_upgradable:
1957+ continue
1958+
1959+ # skip blacklisted pkg names
1960+ if pkg.name in pkgs_blacklisted:
1961+ print "blacklisted: ", pkg.name
1962+ continue
1963+
1964+ # skip packages we tested already
1965+ if "%s-%s" % (pkg.name, pkg.candidateVersion) in pkgs_tested:
1966+ print "already tested: ", pkg.name
1967+ continue
1968+
1969+ # see if we can install/upgrade the pkg
1970+ try:
1971+ pkg.markInstall()
1972+ except SystemError, e:
1973+ pkg.markKeep()
1974+ if not (pkg.markedInstall or pkg.markedUpgrade):
1975+ print "pkg: %s not installable" % pkg.name
1976+ failures.write("%s markInstall()\n " % pkg.name)
1977+ continue
1978+
1979+ if not test_downloadable(backend, pkg.name):
1980+ # because the test runs for so long its likely that we hit
1981+ # 404 because the archive has changed since we ran, deal with
1982+ # that here by not outputing it as a error for a start
1983+ # FIXME: restart whole test
1984+ continue
1985+
1986+ # mark as tested
1987+ statusfile.write("%s-%s\n" % (pkg.name, pkg.candidateVersion))
1988+
1989+ if not do_install_remove(backend, pkg.name):
1990+ # on failure, re-run in a clean env so that the log
1991+ # is more meaningful
1992+ print "pkg: %s failed, re-testing in a clean(er) environment" % pkg.name
1993+ backend.restoreVMSnapshot("clean-base")
1994+ backend.watchdog_running = False
1995+ backend.start()
1996+ if not do_install_remove(backend, pkg.name):
1997+ outname = os.path.join(resultdir,"%s-fail.txt" % pkg.name)
1998+ failures.write("failed to install/remove %s (log at %s)\n" % (pkg.name, outname))
1999+ time.sleep(5)
2000+ backend._copyFromImage("/var/log/apt/term.log",outname)
2001+
2002+ # now restore back to a clean state and continue testing
2003+ # (but do not record the package as succesful tested)
2004+ backend.restoreVMSnapshot("clean-base")
2005+ backend.watchdog_running = False
2006+ backend.start()
2007+ continue
2008+
2009+ # installation worked, record that we have tested this package
2010+ for pkg in cache:
2011+ if pkg.markedInstall or pkg.markedUpgrade:
2012+ pkgs_tested.add("%s-%s" % (pkg.name, pkg.candidateVersion))
2013+ statusfile.flush()
2014+ failures.flush()
2015+
2016+ # all done, stop the backend
2017+ backend.stop()
2018+
2019
2020=== added file 'AutoUpgradeTester/auto-upgrade-tester'
2021--- AutoUpgradeTester/auto-upgrade-tester 1970-01-01 00:00:00 +0000
2022+++ AutoUpgradeTester/auto-upgrade-tester 2012-05-22 15:21:19 +0000
2023@@ -0,0 +1,383 @@
2024+#!/usr/bin/python -u
2025+# "-u": Force stdin, stdout and stderr to be totally unbuffered.
2026+# To get more accurate log files
2027+#
2028+# see also
2029+# http://www.faqts.com/knowledge_base/entry/versions/index.phtml?aid=4419
2030+
2031+import datetime
2032+import glob
2033+import logging
2034+import multiprocessing
2035+import os
2036+import shutil
2037+import sys
2038+import time
2039+import subprocess
2040+from ConfigParser import SafeConfigParser
2041+
2042+# check if we run from a bzr checkout
2043+if os.path.exists("./UpgradeTestBackend.py"):
2044+ sys.path.insert(0, "../")
2045+
2046+from optparse import OptionParser
2047+from AutoUpgradeTester.UpgradeTestBackend import UpgradeTestBackend
2048+
2049+# bigger exitcode means more problematic error,
2050+# exitcode 101 means generic error
2051+class FailedToBootstrapError(Exception):
2052+ """ Failed to initial bootstrap the test system """
2053+ exitcode = 99
2054+
2055+class FailedToUpgradeError(Exception):
2056+ """ Failed to upgrade the test system """
2057+ exitcode = 98
2058+
2059+class FailedPostUpgradeTestError(Exception):
2060+ """ Some post upgrade tests failed """
2061+ exitcode = 97
2062+
2063+class OutputThread(multiprocessing.Process):
2064+ def __init__(self, filename):
2065+ multiprocessing.Process.__init__(self)
2066+ self.file = os.open(filename, os.O_RDONLY)
2067+ def run(self):
2068+ while True:
2069+ # the read() seems to not block for some reason
2070+ # but return "" ?!?
2071+ s = os.read(self.file, 1024)
2072+ if s:
2073+ print s,
2074+ else:
2075+ time.sleep(0.1)
2076+
2077+# FIXME: move this into the generic backend code
2078+def login(backend):
2079+ """ login into a backend """
2080+ backend.bootstrap()
2081+ backend.login()
2082+
2083+def createBackend(backend_name, profile):
2084+ """ create a backend of the given name for the given profile """
2085+ try:
2086+ backend_full_name = "AutoUpgradeTester.%s" % backend_name
2087+ backend_modul = __import__(backend_full_name, fromlist="AutoUpgradeTester")
2088+ backend_class = getattr(backend_modul, backend_name)
2089+ except (ImportError, AttributeError, TypeError), e:
2090+ logging.exception("can not import '%s'" % backend_name)
2091+ return None
2092+ return backend_class(profile)
2093+
2094+class HtmlOutputStream:
2095+ HTML_HEADER=r"""
2096+<?xml version="1.0" encoding="ascii"?>
2097+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2098+ "DTD/xhtml1-transitional.dtd">
2099+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
2100+<head>
2101+ <title>Auto upgrade tester</title>
2102+<style type="text/css">
2103+.error { background-color:#FF6600; }
2104+.warning { background-color:#FFA000; }
2105+.aright { text-align:right; }
2106+table { width:90%%; }
2107+</style>
2108+</head>
2109+<body>
2110+<h1>Automatic upgrade tester test results</h1>
2111+
2112+<p>Upgrade test started %(date)s</p>
2113+
2114+<table border="1">
2115+<tr><th>Profile</th><th>Result</th><th>Bugs</th><th>Date Finished</th><th>Runtime</th><th>Full Logs</th></tr>
2116+"""
2117+
2118+ HTML_FOOTER="""
2119+</table>
2120+<p>Upgrade test finished %s</p>
2121+</body>
2122+"""
2123+
2124+ def __init__(self, outputdir=None):
2125+ self.html_output = None
2126+ if outputdir:
2127+ self.outputdir = outputdir
2128+ if not os.path.exists(outputdir):
2129+ os.makedirs(outputdir)
2130+ self.html_output = open(os.path.join(outputdir, "index.html"), "w")
2131+ def write(self, s):
2132+ if self.html_output:
2133+ self.html_output.write(s)
2134+ self.html_output.flush()
2135+ def copy_results_and_add_table_link(self, profile_name, resultdir):
2136+ if not self.html_output:
2137+ return
2138+ # copy logs & sanitize permissions
2139+ targetdir = os.path.join(self.outputdir, profile_name)
2140+ html_output.copytree(resultdir, targetdir)
2141+ for f in glob.glob(targetdir+"/*"):
2142+ os.chmod(f, 0644)
2143+ # write html line that links to output dir
2144+ s = "<td><a href=\"./%(logdir)s\">Logs for %(profile)s test</a></td>" % {
2145+ 'logdir' : profile_name,
2146+ 'profile': profile_name, }
2147+ html_output.write(s)
2148+ def copytree(self, src, dst):
2149+ if self.html_output:
2150+ shutil.copytree(src, dst)
2151+ def write_html_header(self, time_started):
2152+ self.write(self.HTML_HEADER % { 'date' : time_started })
2153+ def write_html_footer(self):
2154+ self.write(self.HTML_FOOTER % datetime.datetime.now())
2155+
2156+def testUpgrade(backend_name, profile, add_pkgs, quiet=False,
2157+ html_output=HtmlOutputStream()):
2158+ """ test upgrade for the given backend/profile """
2159+ backend = createBackend(backend_name, profile)
2160+ assert(backend != None)
2161+ if not os.path.exists(profile):
2162+ print "ERROR: Can't find '%s' " % profile
2163+ html_output.write("<tr><td>Can't find profile '%s'</td>" % profile)
2164+ html_output.write(4*"<td></td>")
2165+ return 2
2166+ print "Storing the result in '%s'" % backend.resultdir
2167+ profile_name = os.path.split(os.path.normpath(profile))[1]
2168+ # setup output
2169+ outfile = os.path.join(backend.resultdir, "bootstrap.log")
2170+ fd = os.open(outfile, os.O_WRONLY|os.O_CREAT|os.O_TRUNC, 0644)
2171+ out = OutputThread(outfile)
2172+ out.daemon = True
2173+ if not quiet:
2174+ out.start()
2175+ old_stdout = os.dup(1)
2176+ old_stderr = os.dup(2)
2177+ os.dup2(fd, 1)
2178+ os.dup2(fd, 2)
2179+ time_started = datetime.datetime.now()
2180+ print "%s log started" % time_started
2181+ result = 0
2182+ try:
2183+ # write what we working on
2184+ html_output.write("<td>%s</td>" % profile_name)
2185+ # init
2186+ if not backend.bootstrap():
2187+ print "FAILED: bootstrap for '%s'" % profile
2188+ html_output.write("<td class=\"error\">Failed to bootstrap</td>")
2189+ raise FailedToBootstrapError("Failed to bootstrap '%s'" % profile)
2190+ if add_pkgs:
2191+ if not backend.installPackages(add_pkgs):
2192+ print "FAILED: installPacakges '%s'" % add_pkgs
2193+ html_output.write("<td class=\"error\">Failed to add pkgs '%s'</td>" % ",".join(add_pkgs))
2194+ raise Exception, "Failed to install packages '%s'" % add_pkgs
2195+ if not backend.upgrade():
2196+ print "FAILED: upgrade for '%s'" % profile
2197+ html_output.write("<td class=\"error\">Failed to upgrade</td>")
2198+ raise FailedToUpgradeError("Failed to upgrade %s" % profile)
2199+ if not backend.test():
2200+ print "FAILED: test for '%s'" % profile
2201+ html_output.write("<td class=\"warning\">Upgraded, but post upgrade test failed</td>")
2202+ raise FailedPostUpgradeTestError("Failed in post upgrade test %s" % profile)
2203+ print "profile: %s worked" % profile
2204+ html_output.write("<td>ok</td>")
2205+ except (FailedToBootstrapError, FailedToUpgradeError, FailedPostUpgradeTestError) as e:
2206+ print e
2207+ result = e.exitcode
2208+ except Exception, e:
2209+ import traceback
2210+ traceback.print_exc()
2211+ print "Caught exception in testUpgrade for '%s' (%s)" % (profile, e)
2212+ html_output.write("<td class=\"error\">Unknown failure (should not happen)</td>")
2213+ result = 2
2214+ finally:
2215+ # print out result details
2216+ print "Logs can be found here:"
2217+ for n in ["bootstrap.log", "main.log", "apt.log"]:
2218+ print " %s/%s" % (backend.resultdir, n)
2219+
2220+ time_ended = datetime.datetime.now()
2221+ print "%s log ended." % time_ended
2222+ print "Duration: %s" % (time_ended - time_started)
2223+
2224+ # give the output time to settle and kill the daemon
2225+ time.sleep(2)
2226+ if out.is_alive():
2227+ out.terminate()
2228+ out.join()
2229+ # write result line
2230+ s="<td></td><td>%(date)s</td><td class=\"aright\">%(runtime)s</td>" % {
2231+ 'date' : datetime.datetime.now(),
2232+ 'runtime' : datetime.datetime.now() - time_started}
2233+ html_output.write(s)
2234+ html_output.copy_results_and_add_table_link(profile_name, backend.resultdir)
2235+ html_output.write("</tr>")
2236+ # close and restore file descriptors
2237+ os.close(fd)
2238+ os.dup2(old_stdout, 1)
2239+ os.dup2(old_stderr, 2)
2240+ return result
2241+
2242+def profileFromAptClone(aptclonefile):
2243+ """ Create a profile from an apt-clone archive
2244+
2245+ :param aptclonefile: Path to an apt-clone archive
2246+ :return: path to profile or None if it fails to recognize the clone file
2247+ """
2248+ profile = None
2249+ try:
2250+ cmd = ('apt-clone', 'info', aptclonefile)
2251+ output = subprocess.check_output(cmd)
2252+ clone_properties = {}
2253+ for k, v in [ line.split(': ') for line in output.split('\n') if ': ' in line]:
2254+ clone_properties[k] = v
2255+ try:
2256+ clone_date = datetime.datetime.strptime(clone_properties['Date'], '%c').strftime('_%Y%m%d-%H%M%S')
2257+ except:
2258+ clone_date = ''
2259+ profilename = "%s_%s_%s%s" % (
2260+ clone_properties['Distro'],
2261+ clone_properties['Arch'],
2262+ clone_properties['Hostname'],
2263+ clone_date)
2264+
2265+ # Generate configuration file for this profile
2266+ # FIXME:
2267+ # update packaging to grant write access on base for upgrade-tester user
2268+ ppath = 'profile' if os.path.exists("./UpgradeTestBackend.py") else base
2269+ profile = os.path.join(ppath, profilename)
2270+ profilecfg = SafeConfigParser()
2271+ if not os.path.exists(profile):
2272+ os.makedirs(profile)
2273+
2274+ profilecfg.set('DEFAULT', 'SourceRelease', clone_properties['Distro'])
2275+ profilecfg.add_section('NonInteractive')
2276+ profilecfg.set('NonInteractive', 'ProfileName', profilename)
2277+ profilecfg.set('NonInteractive', 'AptcloneFile', os.path.abspath(aptclonefile))
2278+ profilecfg.add_section('KVM')
2279+ profilecfg.set('KVM', 'Arch', clone_properties['Arch'])
2280+ with open(os.path.join(profile, 'DistUpgrade.cfg'), 'wb') as profilefile:
2281+ profilecfg.write(profilefile)
2282+
2283+ except subprocess.CalledProcessError:
2284+ return None
2285+
2286+ return profile
2287+
2288+if __name__ == "__main__":
2289+ logging.basicConfig(level=logging.INFO)
2290+
2291+ parser = OptionParser()
2292+ parser.add_option("--additinoal", "--additional-pkgs", dest="add_pkgs",
2293+ default="",
2294+ help="add additional pkgs before running the upgrade")
2295+ parser.add_option("-a", "--auto", dest="auto", default=False,
2296+ action="store_true",
2297+ help="run all tests in profile/ dir")
2298+ parser.add_option("--bootstrap-only", "--bootstrap-only",dest="bootstrap_only",
2299+ default=False,
2300+ action="store_true",
2301+ help="only bootstrap the image")
2302+ parser.add_option("--tests-only", "", default=False,
2303+ action="store_true",
2304+ help="only run post_upgrade_tests in the image")
2305+ parser.add_option("-l", "--login", dest="login", default=False,
2306+ action="store_true",
2307+ help="log into the a profile")
2308+ parser.add_option("-b", "--backend", dest="backend",
2309+ default="UpgradeTestBackendQemu",
2310+ help="UpgradeTestBackend to use: UpgradeTestBackendChroot, UpgradeTestBackendQemu")
2311+ parser.add_option("-d", "--diff", dest="gen_diff",
2312+ default=False, action="store_true",
2313+ help="generate a diff of the upgraded image versus a fresh installed image")
2314+ parser.add_option("--quiet", "--quiet", default=False, action="store_true",
2315+ help="quiet operation")
2316+ parser.add_option("", "--html-output-dir", default=None,
2317+ help="html output directory")
2318+
2319+ (options, args) = parser.parse_args()
2320+
2321+ # save for later
2322+ fd1 = os.dup(1)
2323+ fd2 = os.dup(2)
2324+
2325+ # FIXME: move this to a configuration
2326+ base="/usr/share/auto-upgrade-tester/profiles/"
2327+ # check if we have something to do
2328+ profiles = args
2329+ if not profiles and not options.auto:
2330+ print sys.argv[0]
2331+ print "No profile specified, available default profiles:"
2332+ print "\n".join(os.listdir(base))
2333+ print
2334+ print "Or use '-a' for 'auto' mode"
2335+ sys.exit(1)
2336+
2337+ # generic
2338+ res = 0
2339+ add_pkgs = []
2340+ if options.add_pkgs:
2341+ add_pkgs = options.add_pkgs.split(",")
2342+ # auto mode
2343+ if options.auto:
2344+ print "running in auto-mode"
2345+ for d in os.listdir(base):
2346+ os.dup2(fd1, 1)
2347+ os.dup2(fd2, 2)
2348+ print "Testing '%s'" % d
2349+ res = max(res, testUpgrade(options.backend, base+d, add_pkgs))
2350+ sys.exit(res)
2351+ # profile mode, test the given profiles
2352+ time_started = datetime.datetime.now()
2353+
2354+ # clean output dir
2355+ html_output = HtmlOutputStream(options.html_output_dir)
2356+ html_output.write_html_header(time_started)
2357+ for profile in profiles:
2358+
2359+ # case of an apt-clone archive
2360+ if os.path.isfile(profile):
2361+ profilename = profileFromAptClone(profile)
2362+ if not profilename:
2363+ print "File is not a valid apt-clone image: %s" % profilename
2364+ continue
2365+ profile = profilename
2366+ print "Using generated profile: %s" % profile
2367+
2368+ if not "/" in profile:
2369+ profile = base + profile
2370+ try:
2371+ if options.login:
2372+ backend = createBackend(options.backend, profile)
2373+ login(backend)
2374+ elif options.bootstrap_only:
2375+ backend = createBackend(options.backend, profile)
2376+ backend.bootstrap(force=True)
2377+ elif options.tests_only:
2378+ backend = createBackend(options.backend, profile)
2379+ backend.test()
2380+ elif options.gen_diff:
2381+ backend = createBackend(options.backend, profile)
2382+ backend.genDiff()
2383+ else:
2384+ print "Testing '%s'" % profile
2385+ now = datetime.datetime.now()
2386+ current_res = testUpgrade(options.backend, profile,
2387+ add_pkgs, options.quiet,
2388+ html_output)
2389+ if current_res == 0:
2390+ print "Profile '%s' worked" % profile
2391+ else:
2392+ print "Profile '%s' FAILED" % profile
2393+ res = max(res, current_res)
2394+ except Exception, e:
2395+ import traceback
2396+ print "ERROR: exception caught '%s' " % e
2397+ html_output.write('<pre class="error">unhandled ERROR %s:\n%s</pre>' % (e, traceback.format_exc()))
2398+ traceback.print_exc()
2399+ if hasattr(e, "exitcode"):
2400+ res = max(res, e.exitcode)
2401+ else:
2402+ res = max(res, 101)
2403+ html_output.write_html_footer()
2404+
2405+ # return exit code
2406+ sys.exit(res)
2407
2408=== added file 'AutoUpgradeTester/auto-upgrade-tester-jenkins-slave'
2409--- AutoUpgradeTester/auto-upgrade-tester-jenkins-slave 1970-01-01 00:00:00 +0000
2410+++ AutoUpgradeTester/auto-upgrade-tester-jenkins-slave 2012-05-22 15:21:19 +0000
2411@@ -0,0 +1,60 @@
2412+#!/usr/bin/python
2413+#
2414+# Copyright (C) 2010, Canonical Ltd (http://www.canonical.com/)
2415+#
2416+# This file is part of ubuntu-server-iso-testing.
2417+#
2418+# ubuntu-server-iso-testing is free software: you can redistribute it
2419+# and/or modify it under the terms of the GNU General Public License
2420+# as published by the Free Software Foundation, either version 3 of
2421+# the License, or (at your option) any later version.
2422+#
2423+# ubuntu-server-iso-testing is distributed in the hope that it will
2424+# be useful, but WITHOUT ANY WARRANTY; without even the implied warranty
2425+# of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
2426+# GNU General Public License for more details.
2427+#
2428+# You should have received a copy of the GNU General Public License
2429+# along with ubuntu-server-iso-testing. If not, see
2430+# <http://www.gnu.org/licenses/>.
2431+#
2432+
2433+import logging
2434+import optparse
2435+import os
2436+import urllib
2437+import sys
2438+import subprocess
2439+import socket
2440+
2441+usage="usage: %prog [options] HUDSON_URL"
2442+parser = optparse.OptionParser(usage=usage)
2443+parser.add_option("-d", "--debug", dest="debug", action="store_true", default=False,
2444+ help="enable debugging")
2445+parser.add_option("-n", "--nodename", dest="nodename", default=socket.gethostname(),
2446+ help="hostname to use when registering with hudson (default=hostname)")
2447+(options, args) = parser.parse_args()
2448+
2449+if len(args) == 0:
2450+ logging.error("Need a HUDSON_URL to execute")
2451+ parser.print_help()
2452+ sys.exit(1)
2453+
2454+if options.debug:
2455+ logging.basicConfig(level=logging.DEBUG)
2456+else:
2457+ logging.basicConfig(level=logging.INFO)
2458+
2459+HUDSON_URL=args[0]
2460+HUDSON_PATH="/computer/%s/slave-agent.jnlp"
2461+SLAVE_URL=HUDSON_URL + 'jnlpJars/slave.jar'
2462+SLAVE_JAR=os.path.expanduser("~/.slave.jar")
2463+
2464+l_hudson_url= HUDSON_URL + HUDSON_PATH % options.nodename
2465+
2466+logging.debug("Retrieving hudson slave.jar")
2467+urllib.urlretrieve(SLAVE_URL, SLAVE_JAR)
2468+
2469+cmd = [ 'java','-jar', SLAVE_JAR, '-jnlpUrl', l_hudson_url ]
2470+logging.debug("Cmd: %s" % (cmd))
2471+subprocess.check_call(cmd)
2472
2473=== added file 'AutoUpgradeTester/chart_dpkg_progress.py'
2474--- AutoUpgradeTester/chart_dpkg_progress.py 1970-01-01 00:00:00 +0000
2475+++ AutoUpgradeTester/chart_dpkg_progress.py 2012-05-22 15:21:19 +0000
2476@@ -0,0 +1,51 @@
2477+#!/usr/bin/python
2478+
2479+
2480+import sys
2481+import string
2482+from heapq import heappush, heappop
2483+
2484+if __name__ == "__main__":
2485+
2486+ start_time = 0.0
2487+ last_time = 0.0
2488+ total_time = 0.0
2489+ pkgs = {}
2490+ last_pkgname = None
2491+
2492+ log = open(sys.argv[1])
2493+ for line in map(string.strip, log):
2494+ line_data = line.split(":")
2495+
2496+ # special cases
2497+ if line_data[1].strip() == "Start":
2498+ start_time = float(line_data[0])
2499+ continue
2500+ elif line_data[1].strip() == "Finished":
2501+ total_time = float(line_data[0]) - start_time
2502+ continue
2503+
2504+ # we have a real pkg here
2505+ current_time = float(line_data[0])
2506+ pkgname = line_data[2]
2507+
2508+ # special cases
2509+ if not last_time:
2510+ last_time = current_time
2511+ if not pkgname in pkgs:
2512+ pkgs[pkgname] = 0
2513+
2514+ # add up time
2515+ if last_pkgname:
2516+ pkgs[last_pkgname] += (current_time-last_time)
2517+ last_time = current_time
2518+ last_pkgname = pkgname
2519+
2520+
2521+ # put into heap and output by time it takes
2522+ heap = []
2523+ for pkg in pkgs:
2524+ heappush(heap, (pkgs[pkg], pkg))
2525+ while heap:
2526+ print "%.6ss: %s" % heappop(heap)
2527+ print "total: %4.7ss %4.6sm" % (total_time, total_time/60)
2528
2529=== added file 'AutoUpgradeTester/install_all.py'
2530--- AutoUpgradeTester/install_all.py 1970-01-01 00:00:00 +0000
2531+++ AutoUpgradeTester/install_all.py 2012-05-22 15:21:19 +0000
2532@@ -0,0 +1,235 @@
2533+#!/usr/bin/python
2534+
2535+
2536+import apt
2537+import apt_pkg
2538+import re
2539+import os
2540+import string
2541+import sys
2542+
2543+# global install blacklist
2544+pkg_blacklist = None
2545+
2546+# whitelist regexp to include only certain packages (useful for e.g.
2547+# installing only all python packages)
2548+pkg_whitelist = ""
2549+
2550+class InstallProgress(apt.progress.base.InstallProgress):
2551+ " Out install progress that can automatically remove broken pkgs "
2552+ def error(self, pkg, errormsg):
2553+ # on failure:
2554+ # - add failing package to "install_failures.txt" [done]
2555+ # - remove package from best.txt [done]
2556+ # FIXME: - remove all rdepends from best.txt
2557+ # - remove the failed install attempts [done]
2558+ # * explode if a package can not be removed and let the user cleanup
2559+ open("install_failures.txt","a").write("%s _:_ %s" % (pkg, errormsg))
2560+ bad = set()
2561+ bad.add(os.path.basename(pkg).split("_")[0])
2562+ # FIXME: just run apt-cache rdepends $pkg here?
2563+ # or use apt.Package.candidateDependencies ?
2564+ # or calculate the set again? <- BEST!
2565+ for name in bad:
2566+ new_best = open("best.txt").read().replace(name+"\n","")
2567+ open("best.txt","w").write(new_best)
2568+ open("install_blacklist.cfg","a").write("# auto added by install_all.py\n%s\n" % name)
2569+
2570+def do_install(cache):
2571+ # go and install
2572+ res = False
2573+ current = 0
2574+ maxRetries = 5
2575+ while current < maxRetries:
2576+ print "Retry: ", current
2577+ try:
2578+ res = cache.commit(apt.progress.text.AcquireProgress(),
2579+ InstallProgress())
2580+ break
2581+ except IOError, e:
2582+ # fetch failed, will be retried
2583+ current += 1
2584+ print "Retrying to fetch: ", current, e
2585+ continue
2586+ except SystemError, e:
2587+ print "Error installing packages! "
2588+ print e
2589+ print "Install result: ",res
2590+ break
2591+ # check for failed packages and remove them
2592+ if os.path.exists("install_failures.txt"):
2593+ failures = set(map(lambda s: os.path.basename(s.split("_:_")[0]).split("_")[0],
2594+ open("install_failures.txt").readlines()))
2595+ print "failed: ", failures
2596+ assert(os.system("dpkg -r %s" % " ".join(failures)) == 0)
2597+ assert(os.system("dpkg --configure -a") == 0)
2598+ # remove pos.txt and best.txt to force recalculation
2599+ os.unlink("pos.txt")
2600+ os.unlink("best.txt")
2601+ return res
2602+
2603+def blacklisted(name):
2604+ global pkg_blacklist
2605+ if pkg_blacklist is None and os.path.exists("install_blacklist.cfg"):
2606+ pkg_blacklist = set()
2607+ for name in map(string.strip, open("install_blacklist.cfg").readlines()):
2608+ if name and not name.startswith("#"):
2609+ pkg_blacklist.add(name)
2610+ print "blacklist: ", pkg_blacklist
2611+ if pkg_blacklist:
2612+ for b in pkg_blacklist:
2613+ if re.match(b, name):
2614+ return True
2615+ return False
2616+
2617+def reapply(cache, pkgnames):
2618+ for name in pkgnames:
2619+ cache[name].mark_install(False)
2620+
2621+def contains_blacklisted_pkg(cache):
2622+ for pkg in cache:
2623+ if pkg.marked_install and blacklisted(pkg.name):
2624+ return True
2625+ return False
2626+
2627+
2628+# ----------------------------------------------------------------
2629+
2630+#apt_pkg.Config.Set("Dir::State::status","./empty")
2631+
2632+# debug stuff
2633+#apt_pkg.Config.Set("Debug::pkgProblemResolver","true")
2634+#apt_pkg.Config.Set("Debug::pkgDepCache::AutoInstall","true")
2635+#apt_pkg.Config.Set("Debug::pkgDpkgPM","true")
2636+
2637+# Increase the maxsize limits here
2638+#
2639+# this code in apt that splits the argument list if its too long
2640+# is problematic, because it may happen that
2641+# the argument list is split in a way that A depends on B
2642+# and they are in the same "--configure A B" run
2643+# - with the split they may now be configured in different
2644+# runs
2645+
2646+apt_pkg.config.set("Dpkg::MaxArgs",str(16*1024))
2647+apt_pkg.config.set("Dpkg::MaxArgBytes",str(64*1024))
2648+
2649+print "install_all.py"
2650+os.environ["DEBIAN_FRONTEND"] = "noninteractive"
2651+os.environ["APT_LISTCHANGES_FRONTEND"] = "none"
2652+
2653+cache = apt.Cache()
2654+
2655+# dapper does not have this yet
2656+group = cache.actiongroup()
2657+#print [pkg.name for pkg in cache if pkg.is_installed]
2658+
2659+# see what gives us problems
2660+troublemaker = set()
2661+best = set()
2662+
2663+# first install all of main, then the rest
2664+comps= ["main","universe"]
2665+i=0
2666+
2667+# reapply checkpoints
2668+if os.path.exists("best.txt"):
2669+ best = map(string.strip, open("best.txt").readlines())
2670+ reapply(cache, best)
2671+
2672+if os.path.exists("pos.txt"):
2673+ (comp, i) = open("pos.txt").read().split()
2674+ i = int(i)
2675+ if comp == "universe":
2676+ comps = ["universe"]
2677+
2678+sorted_pkgs = cache.keys()[:]
2679+sorted_pkgs.sort()
2680+
2681+
2682+for comp in comps:
2683+ for pkgname in sorted_pkgs[i:]:
2684+ # skip multiarch packages
2685+ if ":" in pkgname:
2686+ continue
2687+ pkg = cache[pkgname]
2688+ i += 1
2689+ percent = (float(i)/len(cache))*100.0
2690+ print "\r%.3f " % percent,
2691+ sys.stdout.flush()
2692+ # ignore stuff that does not match the whitelist pattern
2693+ # (if we use this)
2694+ if pkg_whitelist:
2695+ if not re.match(pkg_whitelist, pkg.name):
2696+ #print "skipping '%s' (not in whitelist)" % pkg.name
2697+ continue
2698+ print "looking at ", pkg.name
2699+ # only work on stuff that has a origin
2700+ if pkg.candidate:
2701+ for c in pkg.candidate.origins:
2702+ if comp == None or c.component == comp:
2703+ current = set([p.name for p in cache if p.marked_install])
2704+ if not (pkg.is_installed or blacklisted(pkg.name)):
2705+ try:
2706+ pkg.mark_install()
2707+ except SystemError, e:
2708+ print "Installing '%s' cause problems: %s" % (pkg.name, e)
2709+ pkg.mark_keep()
2710+ # check blacklist
2711+ if contains_blacklisted_pkg(cache):
2712+ cache.clear()
2713+ reapply(cache, best)
2714+ continue
2715+ new = set([p.name for p in cache if p.marked_install])
2716+ #if not pkg.marked_install or len(new) < len(current):
2717+ if not (pkg.is_installed or pkg.marked_install):
2718+ print "Can't install: %s" % pkg.name
2719+ if len(current-new) > 0:
2720+ troublemaker.add(pkg.name)
2721+ print "Installing '%s' caused removals %s" % (pkg.name, current - new)
2722+ # FIXME: instead of len() use score() and score packages
2723+ # according to criteria like "in main", "priority" etc
2724+ if len(new) >= len(best):
2725+ best = new
2726+ open("best.txt","w").write("\n".join(best))
2727+ open("pos.txt","w").write("%s %s" % (comp, i))
2728+ else:
2729+ print "Installing '%s' reduced the set (%s < %s)" % (pkg.name, len(new), len(best))
2730+ cache.clear()
2731+ reapply(cache, best)
2732+ i=0
2733+
2734+# make sure that the ubuntu base packages are installed (and a bootloader)
2735+print len(troublemaker)
2736+for pkg in ["ubuntu-desktop", "ubuntu-minimal", "ubuntu-standard", "grub-pc"]:
2737+ cache[pkg].mark_install()
2738+
2739+# make sure we don't install blacklisted stuff
2740+for pkg in cache:
2741+ if blacklisted(pkg.name):
2742+ pkg.mark_keep()
2743+
2744+# install it
2745+print "We can install:", len([pkg.name for pkg in cache if pkg.marked_install])
2746+# get size
2747+pm = apt_pkg.PackageManager(cache._depcache)
2748+fetcher = apt_pkg.Acquire()
2749+pm.get_archives(fetcher, cache._list, cache._records)
2750+print "Download: ", apt_pkg.size_to_str(fetcher.fetch_needed)
2751+print "Total space: ", apt_pkg.size_to_str(cache._depcache.usr_size)
2752+
2753+# write out file with all pkgs
2754+outf = "all_pkgs.cfg"
2755+print "writing out file with the selected package names to '%s'" % outf
2756+f = open(outf, "w")
2757+f.write("\n".join([pkg.name for pkg in cache if pkg.marked_install]))
2758+f.close()
2759+
2760+# now do the real install
2761+res = do_install(cache)
2762+
2763+if not res:
2764+ # FIXME: re-exec itself
2765+ sys.exit(1)
2766+
2767+sys.exit(0)
2768
2769=== added file 'AutoUpgradeTester/install_all_main.py'
2770--- AutoUpgradeTester/install_all_main.py 1970-01-01 00:00:00 +0000
2771+++ AutoUpgradeTester/install_all_main.py 2012-05-22 15:21:19 +0000
2772@@ -0,0 +1,79 @@
2773+#!/usr/bin/python
2774+
2775+import apt
2776+import apt_pkg
2777+
2778+def blacklisted(name):
2779+ # we need to blacklist linux-image-* as it does not install
2780+ # cleanly in the chroot (postinst failes)
2781+ blacklist = ["linux-image-","ltsp-client",
2782+ "glibc-doc-reference", "libpthread-dev",
2783+ "cman", "mysql-server", "fuse-utils",
2784+ "ltspfs", "gfs2-tools", "edubuntu-server",
2785+ "gnbd-client", "gnbd-server", "mysql-server-5.0",
2786+ "rgmanager", "clvm","redhat-cluster-suit",
2787+ # has a funny "can not be upgraded automatically" policy
2788+ # see debian #368226
2789+ "quagga",
2790+ "system-config-cluster", "gfs-tools"]
2791+ for b in blacklist:
2792+ if name.startswith(b):
2793+ return True
2794+ return False
2795+
2796+#apt_pkg.Config.Set("Dir::State::status","./empty")
2797+
2798+cache = apt.Cache()
2799+group = apt_pkg.GetPkgActionGroup(cache._depcache)
2800+#print [pkg.name for pkg in cache if pkg.is_installed]
2801+
2802+troublemaker = set()
2803+for pkg in cache:
2804+ for c in pkg.candidateOrigin:
2805+ if c.component == "main":
2806+ current = set([p.name for p in cache if p.marked_install])
2807+ if not (pkg.is_installed or blacklisted(pkg.name)):
2808+ pkg.mark_install()
2809+ new = set([p.name for p in cache if p.marked_install])
2810+ #if not pkg.markedInstall or len(new) < len(current):
2811+ if not (pkg.is_installed or pkg.marked_install):
2812+ print "Can't install: %s" % pkg.name
2813+ if len(current-new) > 0:
2814+ troublemaker.add(pkg.name)
2815+ print "Installing '%s' caused removals_ %s" % (pkg.name, current - new)
2816+
2817+#print len(troublemaker)
2818+for pkg in ["ubuntu-desktop", "ubuntu-minimal", "ubuntu-standard"]:
2819+ cache[pkg].mark_install()
2820+
2821+# make sure we don't install blacklisted stuff
2822+for pkg in cache:
2823+ if blacklisted(pkg.name):
2824+ pkg.mark_keep()
2825+
2826+print "We can install:"
2827+print len([pkg.name for pkg in cache if pkg.marked_install])
2828+print "Download: "
2829+pm = apt_pkg.GetPackageManager(cache._depcache)
2830+fetcher = apt_pkg.GetAcquire()
2831+pm.GetArchives(fetcher, cache._list, cache._records)
2832+print apt_pkg.SizeToStr(fetcher.FetchNeeded)
2833+print "Total space: ", apt_pkg.SizeToStr(cache._depcache.UsrSize)
2834+
2835+res = False
2836+current = 0
2837+maxRetries = 3
2838+while current < maxRetries:
2839+ try:
2840+ res = cache.commit(apt.progress.text.AcquireProgress(),
2841+ apt.progress.base.InstallProgress())
2842+ except IOError, e:
2843+ # fetch failed, will be retried
2844+ current += 1
2845+ print "Retrying to fetch: ", current
2846+ continue
2847+ except SystemError, e:
2848+ print "Error installing packages! "
2849+ print e
2850+ print "Install result: ",res
2851+ break
2852
2853=== added file 'AutoUpgradeTester/install_blacklist.cfg'
2854--- AutoUpgradeTester/install_blacklist.cfg 1970-01-01 00:00:00 +0000
2855+++ AutoUpgradeTester/install_blacklist.cfg 2012-05-22 15:21:19 +0000
2856@@ -0,0 +1,33 @@
2857+# file-overwrite problem with libc6-dev
2858+libpthread-dev
2859+# FUBAR (was removed in feisty)
2860+glibc-doc-reference
2861+# has a funny "can not be upgraded automatically" policy
2862+# see debian #368226
2863+quagga
2864+# the following packages try to access /lib/modules/`uname -r` and fail
2865+vmware-player-kernel-.*
2866+# not installable on a regular machine
2867+ltsp-client
2868+ltsp-client-core
2869+# why is this in the archive?
2870+debsig-verify
2871+# speedbar,ede fails for some reason
2872+speedbar
2873+ede
2874+ecb
2875+emacs-snapshot
2876+# ec2
2877+ec2-init
2878+linux-image-ec2
2879+linux-image-2.6.31-302-ec2
2880+
2881+bacula-director-mysql
2882+linux-backports-modules-wireless-2.6.32-21-generic-pae
2883+linux-backports-modules-wireless-2.6.32-22-generic-pae
2884+linux-backports-modules-wireless-2.6.32-23-generic-pae
2885+linux-backports-modules-wireless-2.6.32-24-generic-pae
2886+
2887+# no fun
2888+cloud-init
2889+eucalyptus-.*
2890\ No newline at end of file
2891
2892=== added file 'AutoUpgradeTester/install_universe'
2893--- AutoUpgradeTester/install_universe 1970-01-01 00:00:00 +0000
2894+++ AutoUpgradeTester/install_universe 2012-05-22 15:21:19 +0000
2895@@ -0,0 +1,263 @@
2896+#!/usr/bin/python
2897+"""
2898+Install all packages with a desktop file in app-install-data
2899+"""
2900+
2901+
2902+import apt
2903+import apt_pkg
2904+import re
2905+import os
2906+import string
2907+import sys
2908+
2909+# global install blacklist
2910+pkg_blacklist = None
2911+
2912+# whitelist regexp to include only certain packages (useful for e.g.
2913+# installing only all python packages)
2914+pkg_whitelist = ""
2915+
2916+class InstallProgress(apt.progress.base.InstallProgress):
2917+ " Out install progress that can automatically remove broken pkgs "
2918+ def error(self, pkg, errormsg):
2919+ # on failure:
2920+ # - add failing package to "install_failures.txt" [done]
2921+ # - remove package from best.txt [done]
2922+ # FIXME: - remove all rdepends from best.txt
2923+ # - remove the failed install attempts [done]
2924+ # * explode if a package can not be removed and let the user cleanup
2925+ open("install_failures.txt","a").write("%s _:_ %s" % (pkg, errormsg))
2926+ bad = set()
2927+ bad.add(os.path.basename(pkg).split("_")[0])
2928+ # FIXME: just run apt-cache rdepends $pkg here?
2929+ # or use apt.Package.candidateDependencies ?
2930+ # or calculate the set again? <- BEST!
2931+ for name in bad:
2932+ new_best = open("best.txt").read().replace(name+"\n","")
2933+ open("best.txt","w").write(new_best)
2934+ open("install_blacklist.cfg","a").write("# auto added by install_all.py\n%s\n" % name)
2935+
2936+def do_install(cache):
2937+ # go and install
2938+ res = False
2939+ current = 0
2940+ maxRetries = 5
2941+ while current < maxRetries:
2942+ print "Retry: ", current
2943+ try:
2944+ res = cache.commit(apt.progress.text.AcquireProgress(),
2945+ InstallProgress())
2946+ break
2947+ except IOError, e:
2948+ # fetch failed, will be retried
2949+ current += 1
2950+ print "Retrying to fetch: ", current, e
2951+ continue
2952+ except SystemError, e:
2953+ print "Error installing packages! "
2954+ print e
2955+ print "Install result: ",res
2956+ break
2957+ # check for failed packages and remove them
2958+ if os.path.exists("install_failures.txt"):
2959+ failures = set(map(lambda s: os.path.basename(s.split("_:_")[0]).split("_")[0],
2960+ open("install_failures.txt").readlines()))
2961+ print "failed: ", failures
2962+ assert(os.system("dpkg -r %s" % " ".join(failures)) == 0)
2963+ assert(os.system("dpkg --configure -a") == 0)
2964+ # remove pos.txt and best.txt to force recalculation
2965+ os.unlink("pos.txt")
2966+ os.unlink("best.txt")
2967+ return res
2968+
2969+def blacklisted(name):
2970+ global pkg_blacklist
2971+ if pkg_blacklist is None and os.path.exists("install_blacklist.cfg"):
2972+ pkg_blacklist = set()
2973+ for name in map(string.strip, open("install_blacklist.cfg").readlines()):
2974+ if name and not name.startswith("#"):
2975+ pkg_blacklist.add(name)
2976+ print "blacklist: ", pkg_blacklist
2977+ if pkg_blacklist:
2978+ for b in pkg_blacklist:
2979+ if re.match(b, name):
2980+ return True
2981+ return False
2982+
2983+def reapply(cache, pkgnames):
2984+ for name in pkgnames:
2985+ cache[name].mark_install(False)
2986+
2987+def contains_blacklisted_pkg(cache):
2988+ for pkg in cache:
2989+ if pkg.marked_install and blacklisted(pkg.name):
2990+ return True
2991+ return False
2992+
2993+def appinstall_pkgs():
2994+ import ConfigParser
2995+
2996+ APPINSTALL_DIR = "/usr/share/app-install/desktop"
2997+
2998+ content = ConfigParser.ConfigParser()
2999+ pkgs = []
3000+
3001+ # List of sections to skip. This must be a valid regular expression
3002+ # We must exclude window managers to not kill ourselves
3003+ for dsk in os.listdir(APPINSTALL_DIR):
3004+ dskfile = os.path.join(APPINSTALL_DIR, dsk)
3005+ if not 'desktop' in dsk[-7:]:
3006+ continue
3007+ try:
3008+ content.read(dskfile)
3009+ pkg = content.get('Desktop Entry', 'X-AppInstall-Package')
3010+ if not pkg in pkgs:
3011+ pkgs.append(pkg)
3012+ except:
3013+ print "Error: unable to parse %s" % dskfile
3014+ continue
3015+
3016+ return pkgs
3017+
3018+# ----------------------------------------------------------------
3019+
3020+#apt_pkg.Config.Set("Dir::State::status","./empty")
3021+
3022+# debug stuff
3023+#apt_pkg.Config.Set("Debug::pkgProblemResolver","true")
3024+#apt_pkg.Config.Set("Debug::pkgDepCache::AutoInstall","true")
3025+#apt_pkg.Config.Set("Debug::pkgDpkgPM","true")
3026+
3027+# Increase the maxsize limits here
3028+#
3029+# this code in apt that splits the argument list if its too long
3030+# is problematic, because it may happen that
3031+# the argument list is split in a way that A depends on B
3032+# and they are in the same "--configure A B" run
3033+# - with the split they may now be configured in different
3034+# runs
3035+
3036+apt_pkg.config.set("Dpkg::MaxArgs",str(16*1024))
3037+apt_pkg.config.set("Dpkg::MaxArgBytes",str(64*1024))
3038+
3039+print "*** installings all packages from app-install-data ***"
3040+os.environ["DEBIAN_FRONTEND"] = "noninteractive"
3041+os.environ["APT_LISTCHANGES_FRONTEND"] = "none"
3042+
3043+cache = apt.Cache()
3044+
3045+# dapper does not have this yet
3046+group = cache.actiongroup()
3047+#print [pkg.name for pkg in cache if pkg.is_installed]
3048+
3049+# see what gives us problems
3050+troublemaker = set()
3051+best = set()
3052+
3053+# first install all of main, then the rest
3054+comps= ["main","universe"]
3055+i=0
3056+
3057+# reapply checkpoints
3058+if os.path.exists("best.txt"):
3059+ best = map(string.strip, open("best.txt").readlines())
3060+ reapply(cache, best)
3061+
3062+comp = None
3063+if os.path.exists("pos.txt"):
3064+ (comp, i) = open("pos.txt").read().split()
3065+ i = int(i)
3066+
3067+sorted_pkgs = appinstall_pkgs()
3068+sorted_pkgs.sort()
3069+
3070+for pkgname in sorted_pkgs[i:]:
3071+ # skip multiarch packages
3072+ i += 1
3073+ if ":" in pkgname:
3074+ continue
3075+ try:
3076+ pkg = cache[pkgname]
3077+ except:
3078+ print "WARNING: No package named %s" % pkg
3079+ continue
3080+ percent = (float(i)/len(sorted_pkgs))*100.0
3081+ print "\r%.3f " % percent,
3082+ sys.stdout.flush()
3083+ # ignore stuff that does not match the whitelist pattern
3084+ # (if we use this)
3085+ if pkg_whitelist:
3086+ if not re.match(pkg_whitelist, pkg.name):
3087+ #print "skipping '%s' (not in whitelist)" % pkg.name
3088+ continue
3089+ print "looking at ", pkg.name
3090+ # only work on stuff that has a origin
3091+ if pkg.candidate:
3092+ for c in pkg.candidate.origins:
3093+ comp = c.component
3094+ if not (pkg.is_installed or blacklisted(pkg.name)):
3095+ current = set([p.name for p in cache if p.marked_install])
3096+ try:
3097+ pkg.mark_install()
3098+ except SystemError, e:
3099+ print "Installing '%s' cause problems: %s" % (pkg.name, e)
3100+ pkg.mark_keep()
3101+ # check blacklist
3102+ if contains_blacklisted_pkg(cache):
3103+ cache.clear()
3104+ reapply(cache, best)
3105+ continue
3106+ new = set([p.name for p in cache if p.marked_install])
3107+ #if not pkg.marked_install or len(new) < len(current):
3108+ if not (pkg.is_installed or pkg.marked_install):
3109+ print "Can't install: %s" % pkg.name
3110+ if len(current-new) > 0:
3111+ troublemaker.add(pkg.name)
3112+ print "Installing '%s' caused removals %s" % (pkg.name, current - new)
3113+ # FIXME: instead of len() use score() and score packages
3114+ # according to criteria like "in main", "priority" etc
3115+ if len(new) >= len(best):
3116+ best = new
3117+ open("best.txt","w").write("\n".join(best))
3118+ open("pos.txt","w").write("%s %s" % (comp, i))
3119+ else:
3120+ print "Installing '%s' reduced the set (%s < %s)" % (pkg.name, len(new), len(best))
3121+ cache.clear()
3122+ reapply(cache, best)
3123+i=0
3124+
3125+# make sure that the ubuntu base packages are installed (and a bootloader)
3126+print len(troublemaker)
3127+for pkg in ["ubuntu-desktop", "ubuntu-minimal", "ubuntu-standard", "grub-pc"]:
3128+ cache[pkg].mark_install()
3129+
3130+# make sure we don't install blacklisted stuff
3131+for pkg in cache:
3132+ if blacklisted(pkg.name):
3133+ pkg.mark_keep()
3134+
3135+# install it
3136+print "We can install:", len([pkg.name for pkg in cache if pkg.marked_install])
3137+# get size
3138+pm = apt_pkg.PackageManager(cache._depcache)
3139+fetcher = apt_pkg.Acquire()
3140+pm.get_archives(fetcher, cache._list, cache._records)
3141+print "Download: ", apt_pkg.size_to_str(fetcher.fetch_needed)
3142+print "Total space: ", apt_pkg.size_to_str(cache._depcache.usr_size)
3143+
3144+# write out file with all pkgs
3145+outf = "all_pkgs.cfg"
3146+print "writing out file with the selected package names to '%s'" % outf
3147+f = open(outf, "w")
3148+f.write("\n".join([pkg.name for pkg in cache if pkg.marked_install]))
3149+f.close()
3150+
3151+# now do the real install
3152+res = do_install(cache)
3153+
3154+if not res:
3155+ # FIXME: re-exec itself
3156+ sys.exit(1)
3157+
3158+sys.exit(0)
3159
3160=== added directory 'AutoUpgradeTester/jenkins'
3161=== added file 'AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave'
3162--- AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave 1970-01-01 00:00:00 +0000
3163+++ AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave 2012-05-22 15:21:19 +0000
3164@@ -0,0 +1,12 @@
3165+# init configuration script for hudson-slave
3166+# User and Group to execute slave daemon asa
3167+# defaults to the ubuntu server iso testing
3168+# account as part of this package
3169+USER=upgrade-tester
3170+GROUP=nogroup
3171+# URL to access Hudson Master Server
3172+HUDSON_MASTER=
3173+# Options to pass to hudson-slave
3174+# OPTS="-d"
3175+# Run at startup
3176+STARTUP=false
3177
3178=== added file 'AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave.conf'
3179--- AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave.conf 1970-01-01 00:00:00 +0000
3180+++ AutoUpgradeTester/jenkins/auto-upgrade-tester-jenkins-slave.conf 2012-05-22 15:21:19 +0000
3181@@ -0,0 +1,28 @@
3182+# Hudson Slave
3183+
3184+description "auto-upgrade-tester-jenkins-slave: distributed job control"
3185+author "James Page <james.page@canonical.com>"
3186+
3187+start on (local-filesystems and net-device-up IFACE!=lo)
3188+stop on runlevel [!2345]
3189+
3190+pre-start script
3191+ . /etc/default/auto-upgrade-tester-jenkins-slave
3192+ test -x /usr/bin/auto-upgrade-tester-jenkins-slave || { stop ; exit 0; }
3193+ test -r /etc/default/auto-upgrade-tester-jenkins-slave || { stop ; exit 0; }
3194+ test "${STARTUP}" = "true" || { stop; exit 0; }
3195+end script
3196+
3197+script
3198+ . /etc/default/auto-upgrade-tester-jenkins-slave
3199+
3200+ JDK_DIRS="/usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-sun"
3201+ for jdir in $JDK_DIRS; do
3202+ if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then
3203+ JAVA_HOME="$jdir"
3204+ fi
3205+ done
3206+ export JAVA_HOME
3207+
3208+ exec start-stop-daemon --start --chuid $USER:$GROUP --exec /usr/bin/auto-upgrade-tester-jenkins-slave -- $OPTS $HUDSON_MASTER
3209+end script
3210
3211=== added directory 'AutoUpgradeTester/jeos'
3212=== added file 'AutoUpgradeTester/jeos/README'
3213--- AutoUpgradeTester/jeos/README 1970-01-01 00:00:00 +0000
3214+++ AutoUpgradeTester/jeos/README 2012-05-22 15:21:19 +0000
3215@@ -0,0 +1,49 @@
3216+Create the images by simply running
3217+$ ./create-base-image.sh maverick
3218+(or whatever distroibution release you want to create)
3219+
3220+
3221+===== old info below ====
3222+
3223+Images created with:
3224+
3225+First create a ssh key:
3226+$ ssh-keygen -N '' -f ssh-key
3227+
3228+[intrepid]
3229+
3230+Can use the official ubuntu-vm-builder pacakges]
3231+
3232+$ sudo ubuntu-vm-builder kvm intrepid --kernel-flavour generic --ssh-key `pwd`/ssh-key.pub --components main,restricted --rootsize 80000 --arch i386
3233+$ mv ubuntu-kvm/disk0.qcow2 intrepid-i386.qcow2
3234+- login and check if openssh-server is installed (intrepid ubuntu-vm-builder FTW)
3235+
3236+For old releases:
3237+
3238+$ bzr get http://bazaar.launchpad.net/~mvo/ubuntu-jeos/mvo
3239+
3240+[hardy]
3241+$ ./ubuntu-jeos-builder --vm kvm --kernel-flavour generic --suite hardy --ssh-key `pwd`/ssh-key.pub --components main,restricted --rootsize 80G --no-opt
3242+
3243+[gutsy]
3244+$ ./ubuntu-jeos-builder --vm kvm --kernel-flavour generic --suite gutsy --ssh-key `pwd`/ssh-key.pub --components main,restricted --rootsize 80G --no-opt
3245+
3246+
3247+[feisty]
3248+$ ./ubuntu-jeos-builder --vm kvm --kernel-flavour generic --suite feisty --ssh-key `pwd`/ssh-key.pub --components main,restricted --rootsize 80G --no-opt
3249+
3250+[dapper]
3251+$ ./ubuntu-jeos-builder --vm kvm --kernel-flavour 386 --suite dapper --ssh-key `pwd`/foo.pub --components main,restricted --rootsize 80G --no-opt
3252+
3253+(notice the different kernel names for dapper,feisty). The ssh-key is the
3254+key that is used by the upgrade tester to log into the virtual machine.
3255+
3256+The copy it from
3257+"jeos/ubuntu-jeos-$dist-i386/root.qcow2"
3258+to
3259+"jeos/$dist-i386.qcow2"
3260+
3261+Make sure you copy the "ssh-key" file into the profile dir so that the
3262+upgrade tester can access it
3263+
3264+
3265
3266=== added file 'AutoUpgradeTester/jeos/create-base-image.sh'
3267--- AutoUpgradeTester/jeos/create-base-image.sh 1970-01-01 00:00:00 +0000
3268+++ AutoUpgradeTester/jeos/create-base-image.sh 2012-05-22 15:21:19 +0000
3269@@ -0,0 +1,36 @@
3270+#!/bin/sh
3271+
3272+set -e
3273+
3274+DIST=$(lsb_release -c -s)
3275+
3276+if [ -z "$1" ]; then
3277+ echo "need distro codename to create as first argument "
3278+ exit 1
3279+fi
3280+
3281+# check depends
3282+if [ ! -f /usr/bin/ubuntu-vm-builder ]; then
3283+ apt-get install -y ubuntu-vm-builder
3284+fi
3285+
3286+if [ ! -f /usr/bin/kvm ]; then
3287+ apt-get install -y kvm
3288+fi
3289+
3290+# create a default ssh key
3291+if [ ! -e ssh-key ]; then
3292+ ssh-keygen -N '' -f ssh-key
3293+fi
3294+
3295+KERNEL=generic
3296+if [ "$1" = "dapper" ]; then
3297+ KERNEL=386
3298+fi
3299+
3300+# create the image
3301+ubuntu-vm-builder kvm $1 --kernel-flavour $KERNEL --ssh-key $(pwd)/ssh-key.pub \
3302+ --components main,restricted --rootsize 80000 --arch i386 --dest ubuntu-$1
3303+
3304+# move into place
3305+mv ubuntu-$1/*.qcow2 $1-i386.qcow2
3306
3307=== added directory 'AutoUpgradeTester/post_upgrade_tests'
3308=== added file 'AutoUpgradeTester/post_upgrade_tests/README'
3309--- AutoUpgradeTester/post_upgrade_tests/README 1970-01-01 00:00:00 +0000
3310+++ AutoUpgradeTester/post_upgrade_tests/README 2012-05-22 15:21:19 +0000
3311@@ -0,0 +1,8 @@
3312+The scripts in this folder are run after the upgrade was performed
3313+and after a reboot. They can test various functionality like
3314+- is the latest kernel running
3315+- is the xserver running
3316+- is python still working
3317+- are my daemons still running
3318+
3319+etc
3320
3321=== added file 'AutoUpgradeTester/post_upgrade_tests/conffiles_test.sh'
3322--- AutoUpgradeTester/post_upgrade_tests/conffiles_test.sh 1970-01-01 00:00:00 +0000
3323+++ AutoUpgradeTester/post_upgrade_tests/conffiles_test.sh 2012-05-22 15:21:19 +0000
3324@@ -0,0 +1,12 @@
3325+#!/bin/sh
3326+
3327+set -e
3328+
3329+find /etc -name "*.dpkg-dist" -exec cp '{}' /tmp \;
3330+
3331+# check if we have a dpkg-dist file
3332+if ls /tmp/*.dpkg-dist 2>/dev/null; then
3333+ exit 1
3334+fi
3335+
3336+exit 0
3337\ No newline at end of file
3338
3339=== added file 'AutoUpgradeTester/post_upgrade_tests/debconf_test.py'
3340--- AutoUpgradeTester/post_upgrade_tests/debconf_test.py 1970-01-01 00:00:00 +0000
3341+++ AutoUpgradeTester/post_upgrade_tests/debconf_test.py 2012-05-22 15:21:19 +0000
3342@@ -0,0 +1,65 @@
3343+#!/usr/bin/python
3344+"""
3345+Parse debconf log file and split in a file per prompt
3346+Exit with status 1 if there is a debconf prompt not in whitelist
3347+"""
3348+import re, os, sys
3349+
3350+# Keep this path in sync with the corresponding setting in
3351+# profile/defaults.cfg.d/defaults.cfg
3352+DEBCONF_LOG_PATH = '/var/log/dist-upgrade/debconf.log'
3353+RESULT_DIR = '/tmp'
3354+
3355+# Prompts in this list won't generate a test failure
3356+# i.e WHITELIST = ['libraries/restart-without-asking']
3357+WHITELIST = [
3358+ 'glibc/restart-services',
3359+ 'libraries/restart-without-asking' ]
3360+
3361+def run_test(logfile, resultdir):
3362+ """ Run the test and slice debconf log
3363+
3364+ :param logfile: Path to debconf log
3365+ :param resultdir: Output directory to write log file to
3366+ """
3367+ global WHITELIST
3368+
3369+ ret = 0
3370+ if not os.path.exists(logfile):
3371+ return ret
3372+
3373+ re_dsetting = re.compile('^\w')
3374+ inprompt = False
3375+ prompt = dsetting = ""
3376+
3377+ with open(logfile, 'r') as f_in:
3378+ for line in f_in.readlines():
3379+ # Only keep interesting bits of the prompt
3380+ if line.startswith('#####'):
3381+ inprompt = not inprompt
3382+
3383+ # Reached the second separator, write content to result file
3384+ # One per prompt
3385+ if not inprompt:
3386+ print "Got debconf prompt for '%s'" % dsetting
3387+ if dsetting in WHITELIST:
3388+ print ' But it is in Whitelist. Skipping!'
3389+ continue
3390+ else:
3391+ ret = 1
3392+
3393+ with open(os.path.join(
3394+ resultdir,
3395+ 'debconf_%s.log' % dsetting.replace('/', '_')),
3396+ 'w') as f_out:
3397+ f_out.write(prompt)
3398+
3399+ if inprompt:
3400+ prompt += line
3401+ if re_dsetting.match(line) and '=' in line:
3402+ dsetting = line.split('=')[0]
3403+
3404+ return ret
3405+
3406+if __name__ == '__main__':
3407+ sys.exit(run_test(DEBCONF_LOG_PATH, RESULT_DIR))
3408
3409=== added file 'AutoUpgradeTester/post_upgrade_tests/debsums_lite.py'
3410--- AutoUpgradeTester/post_upgrade_tests/debsums_lite.py 1970-01-01 00:00:00 +0000
3411+++ AutoUpgradeTester/post_upgrade_tests/debsums_lite.py 2012-05-22 15:21:19 +0000
3412@@ -0,0 +1,19 @@
3413+#!/usr/bin/python
3414+
3415+import glob
3416+import os
3417+import subprocess
3418+import sys
3419+
3420+basepath = "/var/lib/dpkg/info/*.md5sums"
3421+ok = True
3422+for f in glob.glob(basepath):
3423+ ret = subprocess.call(["md5sum", "--quiet", "-c",
3424+ os.path.join(basepath, f)],
3425+ cwd="/")
3426+ if ret != 0:
3427+ ok = False
3428+
3429+if not ok:
3430+ print "WARNING: at least one md5sum mismatch"
3431+ sys.exit(1)
3432
3433=== added file 'AutoUpgradeTester/post_upgrade_tests/kernel_test.py'
3434--- AutoUpgradeTester/post_upgrade_tests/kernel_test.py 1970-01-01 00:00:00 +0000
3435+++ AutoUpgradeTester/post_upgrade_tests/kernel_test.py 2012-05-22 15:21:19 +0000
3436@@ -0,0 +1,24 @@
3437+#!/usr/bin/python
3438+
3439+import apt_pkg
3440+import glob
3441+import os
3442+import sys
3443+
3444+current_kernelver = os.uname()[2]
3445+
3446+apt_pkg.init()
3447+
3448+vers = set()
3449+for k in glob.glob("/boot/vmlinuz-*"):
3450+ ver = "-".join(k.split("-")[1:3])
3451+ vers.add(ver)
3452+ if apt_pkg.VersionCompare(current_kernelver, ver) < 0:
3453+ print "WARNING: there is a kernel version '%s' installed higher than the running kernel" % (ver, current_kernelver)
3454+ sys.exit(1)
3455+
3456+print "kernel versions: %s" % ", ".join(vers)
3457+if len(vers) < 2:
3458+ print "WARNING: only one kernel version found '%s'" % vers
3459+ print "expected at least two (new + previous)"
3460+ sys.exit(1)
3461
3462=== added file 'AutoUpgradeTester/post_upgrade_tests/python_import_test.py'
3463--- AutoUpgradeTester/post_upgrade_tests/python_import_test.py 1970-01-01 00:00:00 +0000
3464+++ AutoUpgradeTester/post_upgrade_tests/python_import_test.py 2012-05-22 15:21:19 +0000
3465@@ -0,0 +1,104 @@
3466+#!/usr/bin/python -u
3467+
3468+import logging
3469+import os
3470+import subprocess
3471+import sys
3472+
3473+
3474+OLD_PYTHONVER="python2.6"
3475+NEW_PYTHONVER="python2.7"
3476+
3477+OLD_BASEPATH="/usr/lib/%s/dist-packages/" % OLD_PYTHONVER
3478+NEW_BASEPATH="/usr/lib/%s/dist-packages/" % NEW_PYTHONVER
3479+
3480+# total imports
3481+TOTAL = 0
3482+FAIL = 0
3483+
3484+# stuff that we know does not work when doing a simple "import"
3485+blacklist = ["speechd_config",
3486+ "PAMmodule.so",
3487+ "aomodule.so",
3488+ "plannerui.so",
3489+ # needs a KeyringDaemon
3490+ "desktopcouch",
3491+ # just hangs
3492+ "ropemacs",
3493+ # needs X
3494+ "keyring",
3495+ "invest",
3496+ "Onboard",
3497+ "goocanvasmodule.so",
3498+ ]
3499+
3500+def get_module_from_path(path):
3501+ f = os.path.basename(path)
3502+ if path and os.path.exists(os.path.join(path, "__init__.py")):
3503+ return f
3504+ elif f.endswith(".py"):
3505+ return f.split(".")[0]
3506+ # swig uses this, calls it "foomodule.so" but the import is "foo"
3507+ # (eg xdelta3module.so, pqueuemodule.so)
3508+ elif f.endswith("module.so"):
3509+ return f.split("modules.so")[0]
3510+ elif f.endswith(".so"):
3511+ return f.split(".")[0]
3512+
3513+def try_import(path):
3514+ global TOTAL, FAIL
3515+ logging.info("Importing %s" % path)
3516+ # a simple __import__(module) does not work, the problem
3517+ # is that module import have funny side-effects (like
3518+ # "import uno; import pyatspi" will fail, but importing
3519+ # them individually is fine
3520+ module = get_module_from_path(path)
3521+ if not module:
3522+ logging.warn("could not get module for '%s'" % path)
3523+ return True
3524+ cmd = ["python", "-c","import %s" % module]
3525+ logging.debug("cmd: '%s'" % cmd)
3526+ TOTAL += 1
3527+ ret = subprocess.call(cmd)
3528+ if ret != 0:
3529+ FAIL += 1
3530+ print "WARNING: failed to import '%s'" % module
3531+ subprocess.call(["dpkg", "-S", os.path.realpath(path)])
3532+ print "\n\n"
3533+ return False
3534+ return True
3535+
3536+def py_module_filter(pymodule):
3537+ f = pymodule
3538+ # ignore a bunch of modules that
3539+ if (f.endswith(".egg-info") or
3540+ f.endswith(".pth") or
3541+ f.startswith("_") or
3542+ f.endswith(".pyc") or
3543+ f.endswith("_d.so") or
3544+ f in blacklist):
3545+ return False
3546+ return True
3547+
3548+if __name__ == "__main__":
3549+ #logging.basicConfig(level=logging.DEBUG)
3550+
3551+ # Only compare if old and new paths exists
3552+ # When previous version of python is dropped then only new exists
3553+ if os.path.exists(OLD_BASEPATH) and os.path.exists(NEW_BASEPATH):
3554+ old_modules = set(filter(py_module_filter, os.listdir(OLD_BASEPATH)))
3555+ new_modules = set(filter(py_module_filter, os.listdir(NEW_BASEPATH)))
3556+ print "Available for the old version, but *not* the new: %s\n" % (
3557+ ", ".join(old_modules - new_modules))
3558+
3559+ res = True
3560+ # FIXME: instead os os.listdir() use os.walk() to catch subdirs
3561+ # like lazr/* ?
3562+ for f in filter(py_module_filter, os.listdir(NEW_BASEPATH)):
3563+ logging.debug("looking at '%s'" % f)
3564+ res &= try_import(os.path.join(NEW_BASEPATH, f))
3565+
3566+ print "Total imports: %s" % TOTAL
3567+ print "Failures: %s" % FAIL
3568+ if not res:
3569+ sys.exit(1)
3570
3571=== added file 'AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_system.py'
3572--- AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_system.py 1970-01-01 00:00:00 +0000
3573+++ AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_system.py 2012-05-22 15:21:19 +0000
3574@@ -0,0 +1,66 @@
3575+#!/usr/bin/python
3576+#
3577+# This script checks system-wide configuration settings after an Ubuntu 10.04
3578+# LTS to Ubuntu 12.04 LTS upgrade. Run this after upgrading to 12.04 or later.
3579+# It reads the old gdm settings and ensures that they were appropriately
3580+# migrated to lightdm and that lightdm is the default DM.
3581+# It does not need any particular privileges, it is fine to run this as any
3582+# user.
3583+#
3584+# (C) 2012 Canonical Ltd.
3585+# Author: Martin Pitt <martin.pitt@ubuntu.com>
3586+# License: GPL v2 or higher
3587+
3588+import unittest
3589+import os, sys
3590+import ConfigParser
3591+
3592+class T(unittest.TestCase):
3593+ @classmethod
3594+ def setUpClass(klass):
3595+ # read gdm configuration
3596+ klass.gdm_config = klass._read_conf('/etc/gdm/custom.conf', 'daemon')
3597+ klass.lightdm_config = klass._read_conf('/etc/lightdm/lightdm.conf', 'SeatDefaults')
3598+
3599+ def test_lightdm_default_dm(self):
3600+ '''lightdm is the default display manager'''
3601+
3602+ with open('/etc/X11/default-display-manager') as f:
3603+ default_dm = f.read().strip()
3604+
3605+ self.assertTrue(os.access(default_dm, os.X_OK))
3606+ self.assertEqual(os.path.basename(default_dm), 'lightdm')
3607+
3608+ def test_autologin_migration(self):
3609+ '''autologin migration from gdm to lightdm'''
3610+
3611+ if self.gdm_config.get('automaticloginenable', 'false') == 'true':
3612+ gdm_autologin = self.gdm_config.get('automaticlogin', '')
3613+ else:
3614+ gdm_autologin = ''
3615+
3616+ self.assertEqual(gdm_autologin, self.lightdm_config.get('autologin-user', ''))
3617+
3618+ @classmethod
3619+ def _read_conf(klass, filename, section):
3620+ '''Read section from an INI configuration file.
3621+
3622+ Return a dictionary with the configuration of the given section.
3623+ '''
3624+ p = ConfigParser.ConfigParser()
3625+ p.read(filename)
3626+ config = {}
3627+ try:
3628+ for (key, value) in p.items(section):
3629+ config[key] = value
3630+ except ConfigParser.NoSectionError:
3631+ # just keep an empty config
3632+ pass
3633+ return config
3634+
3635+# Only run on lts-ubuntu testcases
3636+if not os.path.exists('/upgrade-tester/prepare_lts_desktop'):
3637+ print "Not an Ubuntu Desktop LTS upgrade. Skipping!"
3638+ sys.exit(0)
3639+
3640+unittest.main()
3641
3642=== added file 'AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_user.py'
3643--- AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_user.py 1970-01-01 00:00:00 +0000
3644+++ AutoUpgradeTester/post_upgrade_tests/test_lts_upgrade_user.py 2012-05-22 15:21:19 +0000
3645@@ -0,0 +1,98 @@
3646+#!/usr/bin/python
3647+#
3648+# This script checks user configuration settings after an Ubuntu 10.04
3649+# LTS to Ubuntu 12.04 LTS upgrade. Run prepare_lts_upgrade_user.sh in 10.04
3650+# LTS, then upgrade to 12.04 LTS (or later), and run this script to confirm
3651+# that settings were migrated properly. In particular this checks for gconf ->
3652+# gsettings migration (and sometimes changing the format of the values) for
3653+# popular settings, as well as custom panel/desktop launchers.
3654+#
3655+# You need to run both the prepare and this test script as the same user,
3656+# in a full desktop session.
3657+#
3658+# (C) 2012 Canonical Ltd.
3659+# Author: Martin Pitt <martin.pitt@ubuntu.com>
3660+# License: GPL v2 or higher
3661+
3662+import unittest
3663+import os, sys
3664+import subprocess
3665+
3666+try:
3667+ from gi.repository import Gio
3668+except:
3669+ # Not a desktop
3670+ print "Failed to import gi.repository. Not a LTS Desktop Upgrade. Skipping!"
3671+ sys.exit(0)
3672+
3673+class T(unittest.TestCase):
3674+ def test_background(self):
3675+ '''background image'''
3676+
3677+ bg_settings = Gio.Settings('org.gnome.desktop.background')
3678+ # note: original gconf value does not have a file:// prefix, but GNOME
3679+ # 3.x requires this prefix
3680+ self.assertEqual(bg_settings.get_string('picture-uri'),
3681+ 'file://%s/mybackground.jpg' % os.environ['HOME'])
3682+
3683+ def test_gtk_theme(self):
3684+ '''GTK theme'''
3685+
3686+ iface_settings = Gio.Settings('org.gnome.desktop.interface')
3687+ self.assertEqual(iface_settings.get_string('gtk-theme'), 'Radiance')
3688+
3689+ def test_custom_launchers(self):
3690+ '''Custom panel/desktop launchers appear in Unity launcher'''
3691+
3692+ launcher_settings = Gio.Settings('com.canonical.Unity.Launcher')
3693+ favorites = launcher_settings['favorites']
3694+
3695+ # gedit was dragged from Application menu to panel, pointing to system
3696+ # .desktop file
3697+ self.assertTrue('gedit.desktop' in favorites)
3698+
3699+ # custom "echo hello" panel starter uses its own .desktop file
3700+ for starter in favorites:
3701+ if 'echo' in starter:
3702+ self.assertTrue(os.path.exists(starter))
3703+ break
3704+ else:
3705+ self.fail('custom hello starter not found')
3706+
3707+ # gucharmap was dragged from Application menu to desktop, should be
3708+ # converted to system .desktop file
3709+ self.assertTrue('gucharmap.desktop' in favorites)
3710+
3711+ # custom "bc -l" desktop starter uses its own .desktop file
3712+ self.assertTrue('%s/Desktop/termcalc.desktop' % os.environ['HOME'] in favorites)
3713+
3714+ def test_keyboard_layouts(self):
3715+ '''Custom keyboard layouts are migrated and applied'''
3716+
3717+ # verify gconf->gsettings migration
3718+ kbd_settings = Gio.Settings('org.gnome.libgnomekbd.keyboard')
3719+ self.assertEqual(kbd_settings['layouts'],
3720+ '[us,de\tnodeadkeys,gb,gb\tdvorak]')
3721+
3722+# NO DISPLAY IN AUTOMATED TEST
3723+# # verify that they get applied to the X server correctly
3724+# xprop = subprocess.Popen(['xprop', '-root', '_XKB_RULES_NAMES'],
3725+# stdout=subprocess.PIPE)
3726+# out = xprop.communicate()[0]
3727+# self.assertEqual(xprop.returncode, 0)
3728+#
3729+# # chop off key name
3730+# out = out.split('=', 1)[1].strip()
3731+#
3732+# self.assertEqual(out, '"evdev", "pc105", "us,de,gb,gb", ",nodeadkeys,,dvorak", "grp:alts_toggle"')
3733+
3734+# Only run on lts-ubuntu testcases
3735+if not os.path.exists('/upgrade-tester/prepare_lts_desktop'):
3736+ print "Not an Ubuntu Desktop LTS upgrade. Skipping!"
3737+ sys.exit(0)
3738+
3739+if os.getuid() == 0:
3740+ # Root ? reexecute itself as user ubuntu
3741+ subprocess.call('sudo -H -u ubuntu dbus-launch %s' % os.path.abspath(__file__), shell=True)
3742+else:
3743+ unittest.main()
3744
3745=== added file 'AutoUpgradeTester/post_upgrade_tests/xserver_test.py'
3746--- AutoUpgradeTester/post_upgrade_tests/xserver_test.py 1970-01-01 00:00:00 +0000
3747+++ AutoUpgradeTester/post_upgrade_tests/xserver_test.py 2012-05-22 15:21:19 +0000
3748@@ -0,0 +1,29 @@
3749+#!/usr/bin/python
3750+
3751+import glob
3752+import os
3753+import subprocess
3754+import sys
3755+import time
3756+
3757+def is_process_running(procname):
3758+ proclist = subprocess.Popen(["ps","-eo","comm"], stdout=subprocess.PIPE).communicate()[0]
3759+ for line in proclist.split("\n"):
3760+ if line == procname:
3761+ return True
3762+ return False
3763+
3764+if __name__ == "__main__":
3765+ if os.path.exists("/usr/bin/X") or glob.glob("/var/log/Xorg*.log"):
3766+ #print "Checking for running Xorg"
3767+ for i in range(10):
3768+ if not is_process_running("Xorg"):
3769+ print "Xorg not running yet, waiting"
3770+ # wait a bit to and see if it comes up
3771+ time.sleep(10)
3772+ if not is_process_running("Xorg"):
3773+ print "WARNING: /usr/bin/X found but no Xorg running"
3774+ sys.exit(1)
3775+
3776+
3777+
3778
3779=== added file 'AutoUpgradeTester/prepare_lts_desktop'
3780--- AutoUpgradeTester/prepare_lts_desktop 1970-01-01 00:00:00 +0000
3781+++ AutoUpgradeTester/prepare_lts_desktop 2012-05-22 15:21:19 +0000
3782@@ -0,0 +1,22 @@
3783+#!/bin/sh
3784+
3785+# Setup Autologin
3786+cat > /etc/gdm/custom.conf <<EOF
3787+
3788+[daemon]
3789+TimedLoginEnable=false
3790+AutomaticLoginEnable=true
3791+TimedLogin=ubuntu
3792+AutomaticLogin=ubuntu
3793+TimedLoginDelay=30
3794+DefaultSession=gnome
3795+EOF
3796+
3797+# Execute User setup script
3798+USERSETUP="/upgrade-tester/data/prepare_lts_user"
3799+TARGETUSER="ubuntu"
3800+
3801+if [ -f "$USERSETUP" ]; then
3802+ chmod +x $USERSETUP
3803+ sudo -i -u $TARGETUSER sh $USERSETUP
3804+fi
3805
3806=== added file 'AutoUpgradeTester/prepare_lts_user'
3807--- AutoUpgradeTester/prepare_lts_user 1970-01-01 00:00:00 +0000
3808+++ AutoUpgradeTester/prepare_lts_user 2012-05-22 15:21:19 +0000
3809@@ -0,0 +1,116 @@
3810+#!/bin/sh
3811+# This script sets some popular user configuration settings in an Ubuntu 10.04
3812+# LTS GNOME system. Run this, then upgrade to 12.04 LTS (or later), and run
3813+# test_lts_upgrade_user.py to confirm that settings were migrated properly. In
3814+# particular this checks for gconf -> gsettings migration (and sometimes
3815+# changing the format of the values) for popular settings, as well as custom
3816+# panel/desktop launchers.
3817+#
3818+# You need to run this script in a fully running GNOME desktop session.
3819+
3820+#
3821+# (C) 2012 Canonical Ltd.
3822+# Author: Martin Pitt <martin.pitt@ubuntu.com>
3823+# License: GPL v2 or higher
3824+
3825+set -e
3826+
3827+echo "Setting custom background..."
3828+cp `ls /usr/share/backgrounds/*.jpg | head -n1` $HOME/mybackground.jpg
3829+gconftool -s /desktop/gnome/background/picture_filename --type string $HOME/mybackground.jpg
3830+
3831+echo "Setting Radiance theme..."
3832+gconftool -s /desktop/gnome/interface/gtk_theme --type string Radiance
3833+
3834+echo "Adding custom panel launchers..."
3835+# add launcher for system desktop file (gedit)
3836+gconftool -s /apps/panel/objects/object_0/menu_path --type string 'applications:/'
3837+gconftool -s /apps/panel/objects/object_0/launcher_location --type string '/usr/share/applications/gedit.desktop'
3838+gconftool -s /apps/panel/objects/object_0/bonobo_iid --type string ''
3839+gconftool -s /apps/panel/objects/object_0/custom_icon --type string ''
3840+gconftool -s /apps/panel/objects/object_0/locked --type bool false
3841+gconftool -s /apps/panel/objects/object_0/panel_right_stick --type bool false
3842+gconftool -s /apps/panel/objects/object_0/object_type --type string 'launcher-object'
3843+gconftool -s /apps/panel/objects/object_0/use_custom_icon --type bool false
3844+gconftool -s /apps/panel/objects/object_0/tooltip --type string ''
3845+gconftool -s /apps/panel/objects/object_0/toplevel_id --type string 'top_panel_screen0'
3846+gconftool -s /apps/panel/objects/object_0/action_type --type string 'lock'
3847+gconftool -s /apps/panel/objects/object_0/use_menu_path --type bool false
3848+gconftool -s /apps/panel/objects/object_0/position --type int 60
3849+gconftool -s /apps/panel/objects/object_0/attached_toplevel_id --type string ''
3850+
3851+# add launcher for custom desktop file
3852+mkdir -p $HOME/.gnome2/panel2.d/default/launchers/
3853+mkdir -p $HOME/Desktop
3854+
3855+cat <<EOF > $HOME/.gnome2/panel2.d/default/launchers/echo-1.desktop
3856+#!/usr/bin/env xdg-open
3857+[Desktop Entry]
3858+Version=1.0
3859+Type=Application
3860+Terminal=true
3861+Icon[en_US]=partner
3862+Name[en_US]=hello
3863+Exec=echo hello
3864+Name=hello
3865+Icon=gnome-panel-launcher
3866+EOF
3867+chmod 755 $HOME/.gnome2/panel2.d/default/launchers/echo-1.desktop
3868+gconftool -s /apps/panel/objects/object_1/menu_path --type string 'applications:/'
3869+gconftool -s /apps/panel/objects/object_1/launcher_location --type string 'echo-1.desktop'
3870+gconftool -s /apps/panel/objects/object_1/bonobo_iid --type string ''
3871+gconftool -s /apps/panel/objects/object_1/custom_icon --type string ''
3872+gconftool -s /apps/panel/objects/object_1/locked --type bool false
3873+gconftool -s /apps/panel/objects/object_1/panel_right_stick --type bool false
3874+gconftool -s /apps/panel/objects/object_1/object_type --type string 'launcher-object'
3875+gconftool -s /apps/panel/objects/object_1/use_custom_icon --type bool false
3876+gconftool -s /apps/panel/objects/object_1/tooltip --type string ''
3877+gconftool -s /apps/panel/objects/object_1/toplevel_id --type string 'top_panel_screen0'
3878+gconftool -s /apps/panel/objects/object_1/action_type --type string 'lock'
3879+gconftool -s /apps/panel/objects/object_1/use_menu_path --type bool false
3880+gconftool -s /apps/panel/objects/object_1/position --type int 90
3881+gconftool -s /apps/panel/objects/object_1/attached_toplevel_id --type string ''
3882+
3883+# add the two new launchers to the panel object list
3884+old_list=`gconftool -g /apps/panel/general/object_id_list | sed 's/]$//'`
3885+gconftool -s /apps/panel/general/object_id_list --type list --list-type string "$old_list,object_0,object_1]"
3886+
3887+echo "Adding custom desktop launchers ..."
3888+cat <<EOF > $HOME/Desktop/gucharmap.desktop
3889+#!/usr/bin/env xdg-open
3890+[Desktop Entry]
3891+Name=Character Map
3892+Comment=Insert special characters into documents
3893+Exec=gucharmap
3894+Icon=accessories-character-map
3895+Terminal=false
3896+Type=Application
3897+Categories=GNOME;GTK;Utility;
3898+X-GNOME-Bugzilla-Bugzilla=GNOME
3899+X-GNOME-Bugzilla-Product=gucharmap
3900+X-GNOME-Bugzilla-Component=general
3901+X-GNOME-Bugzilla-Version=2.30.0
3902+StartupNotify=true
3903+X-Ubuntu-Gettext-Domain=gucharmap
3904+EOF
3905+chmod 755 $HOME/Desktop/gucharmap.desktop
3906+
3907+cat <<EOF > $HOME/Desktop/termcalc.desktop
3908+#!/usr/bin/env xdg-open
3909+
3910+[Desktop Entry]
3911+Version=1.0
3912+Type=Application
3913+Terminal=true
3914+Icon[en_US]=/usr/share/icons/gnome/scalable/apps/calc.svg
3915+Name[en_US]=termcalc
3916+Exec=bc -l
3917+Name=termcalc
3918+Icon=/usr/share/icons/gnome/scalable/apps/calc.svg
3919+EOF
3920+chmod 755 $HOME/Desktop/termcalc.desktop
3921+
3922+echo "Setting custom keyboard layouts..."
3923+gconftool -s /desktop/gnome/peripherals/keyboard/kbd/layouts --type list --list-type string "[us,de nodeadkeys,gb,gb dvorak]"
3924+
3925+echo 'Success. Now upgrade to 12.04 LTS and run test_lts_upgrade_user.py'
3926
3927=== added directory 'AutoUpgradeTester/profile'
3928=== added directory 'AutoUpgradeTester/profile/auto-install-tester'
3929=== added file 'AutoUpgradeTester/profile/auto-install-tester/DistUpgrade.cfg'
3930--- AutoUpgradeTester/profile/auto-install-tester/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
3931+++ AutoUpgradeTester/profile/auto-install-tester/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
3932@@ -0,0 +1,60 @@
3933+[View]
3934+#View=DistUpgradeViewGtk
3935+View=DistUpgradeViewNonInteractive
3936+
3937+[Distro]
3938+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
3939+
3940+[Aufs]
3941+;EnableFullOverlay=yes
3942+;EnableChrootOverlay=yes
3943+;EnableChrootRsync=yes
3944+
3945+[Sources]
3946+From=lucid
3947+To=lucid
3948+
3949+[NonInteractive]
3950+ProfileName=auto-install-tester
3951+BasePkg = ubuntu-standard
3952+AdditionalPkgs = pkgs.cfg
3953+Mirror = http://archive.ubuntu.com/ubuntu
3954+;Mirror = http://us.ec2.archive.ubuntu.com/ubuntu
3955+;Proxy=http://192.168.1.1:3128/
3956+ForceOverwrite=no
3957+Components=main,restricted,universe
3958+Pockets=security,updates
3959+UpgradeFromDistOnBootstrap=true
3960+;AddRepo=local_testing.list
3961+DpkgProgressLog=yes
3962+ResultDir=/var/cache/auto-upgrade-tester/result
3963+SSHKey=/var/cache/auto-upgrade-tester/ssh-key
3964+DebugBrokenScripts=yes
3965+
3966+[KVM]
3967+Virtio=True
3968+VncNum=3
3969+SshPort=54324
3970+ImageDir=/var/cache/auto-upgrade-tester/
3971+CacheImageDir=/var/cache/auto-upgrade-tester/
3972+BaseImage=%(ImageDir)s/lucid-i386.qcow2
3973+;SwapImage=jeos/swap.qcow2
3974+CacheBaseImage=yes
3975+
3976+[EC2]
3977+; Ubuntu official images:
3978+; https://help.ubuntu.com/community/EC2StartersGuide#Getting%20the%20images
3979+;AMI=ami-44bb5c2d
3980+; inofficial image
3981+AMI=ami-0d729464
3982+SSHKey=./ec2-keypair.pem
3983+;Specify the security groups you want attached to
3984+;the instance. For example:
3985+;SecurityGroups = ssh,web
3986+; Set this to "yes" if using an Ubuntu official AMI as we need to
3987+; allow root logins
3988+;UbuntuOfficialAMI = yes
3989+
3990+[CHROOT]
3991+Tempdir=/tmp/upgrade-tester
3992+CacheTarball=yes
3993
3994=== added file 'AutoUpgradeTester/profile/auto-install-tester/pkgs.cfg'
3995--- AutoUpgradeTester/profile/auto-install-tester/pkgs.cfg 1970-01-01 00:00:00 +0000
3996+++ AutoUpgradeTester/profile/auto-install-tester/pkgs.cfg 2012-05-22 15:21:19 +0000
3997@@ -0,0 +1,1 @@
3998+update-manager-core
3999
4000=== added file 'AutoUpgradeTester/profile/auto-install-tester/pkgs_blacklist.txt'
4001--- AutoUpgradeTester/profile/auto-install-tester/pkgs_blacklist.txt 1970-01-01 00:00:00 +0000
4002+++ AutoUpgradeTester/profile/auto-install-tester/pkgs_blacklist.txt 2012-05-22 15:21:19 +0000
4003@@ -0,0 +1,3 @@
4004+emacspeak
4005+espeak
4006+pioneers-meta-server
4007
4008=== added directory 'AutoUpgradeTester/profile/dapper-hardy-lucid-server'
4009=== added file 'AutoUpgradeTester/profile/dapper-hardy-lucid-server/DistUpgrade.cfg'
4010--- AutoUpgradeTester/profile/dapper-hardy-lucid-server/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4011+++ AutoUpgradeTester/profile/dapper-hardy-lucid-server/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4012@@ -0,0 +1,67 @@
4013+#
4014+# this is a dapper->hardy->lucid test image
4015+# - its cheated because the base image was dapper and then it was
4016+# *manually* upgraded to hardy, but because we cache the base
4017+# image this is ok and its a dapper->hardy->lucid upgrade from
4018+# that point on
4019+
4020+[View]
4021+#View=DistUpgradeViewGtk
4022+View=DistUpgradeViewNonInteractive
4023+
4024+[Distro]
4025+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4026+
4027+[Aufs]
4028+;EnableFullOverlay=yes
4029+;EnableChrootOverlay=yes
4030+;EnableChrootRsync=yes
4031+
4032+[Sources]
4033+From=hardy
4034+To=lucid
4035+
4036+[NonInteractive]
4037+ProfileName=dapper-hardy-lucid-server
4038+BasePkg = ubuntu-standard
4039+AdditionalPkgs = pkgs.cfg
4040+Mirror = http://archive.ubuntu.com/ubuntu
4041+;Mirror = http://us.ec2.archive.ubuntu.com/ubuntu
4042+;Proxy=http://192.168.1.1:3128/
4043+ForceOverwrite=no
4044+Components=main,restricted
4045+Pockets=security,updates
4046+UpgradeFromDistOnBootstrap=true
4047+;AddRepo=local_testing.list
4048+DpkgProgressLog=yes
4049+ResultDir=/var/cache/auto-upgrade-tester/result
4050+SSHKey=/var/cache/auto-upgrade-tester/ssh-key
4051+DebugBrokenScripts=yes
4052+
4053+[KVM]
4054+Virtio=True
4055+VncNum=1
4056+SshPort=54322
4057+ImageDir=/var/cache/auto-upgrade-tester/
4058+CacheImageDir=/var/cache/auto-upgrade-tester/
4059+BaseImage=%(ImageDir)s/dapper-i386.qcow2
4060+;SwapImage=jeos/swap.qcow2
4061+CacheBaseImage=yes
4062+
4063+[EC2]
4064+; Ubuntu official images:
4065+; https://help.ubuntu.com/community/EC2StartersGuide#Getting%20the%20images
4066+;AMI=ami-44bb5c2d
4067+; inofficial image
4068+AMI=ami-0d729464
4069+SSHKey=./ec2-keypair.pem
4070+;Specify the security groups you want attached to
4071+;the instance. For example:
4072+;SecurityGroups = ssh,web
4073+; Set this to "yes" if using an Ubuntu official AMI as we need to
4074+; allow root logins
4075+;UbuntuOfficialAMI = yes
4076+
4077+[CHROOT]
4078+Tempdir=/tmp/upgrade-tester
4079+CacheTarball=yes
4080
4081=== added directory 'AutoUpgradeTester/profile/dapper-hardy-lucid-ubuntu'
4082=== added file 'AutoUpgradeTester/profile/dapper-hardy-lucid-ubuntu/DistUpgrade.cfg'
4083--- AutoUpgradeTester/profile/dapper-hardy-lucid-ubuntu/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4084+++ AutoUpgradeTester/profile/dapper-hardy-lucid-ubuntu/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4085@@ -0,0 +1,67 @@
4086+#
4087+# this is a dapper->hardy->lucid test image
4088+# - its cheated because the base image was dapper and then it was
4089+# *manually* upgraded to hardy, but because we cache the base
4090+# image this is ok and its a dapper->hardy->lucid upgrade from
4091+# that point on
4092+
4093+[View]
4094+#View=DistUpgradeViewGtk
4095+View=DistUpgradeViewNonInteractive
4096+
4097+[Distro]
4098+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4099+
4100+[Aufs]
4101+;EnableFullOverlay=yes
4102+;EnableChrootOverlay=yes
4103+;EnableChrootRsync=yes
4104+
4105+[Sources]
4106+From=hardy
4107+To=lucid
4108+
4109+[NonInteractive]
4110+ProfileName=dapper-hardy-lucid-ubuntu
4111+BasePkg = ubuntu-desktop
4112+AdditionalPkgs = pkgs.cfg
4113+Mirror = http://archive.ubuntu.com/ubuntu
4114+;Mirror = http://us.ec2.archive.ubuntu.com/ubuntu
4115+;Proxy=http://192.168.1.1:3128/
4116+ForceOverwrite=no
4117+Components=main,restricted
4118+Pockets=security,updates
4119+UpgradeFromDistOnBootstrap=true
4120+;AddRepo=local_testing.list
4121+DpkgProgressLog=yes
4122+ResultDir=/var/cache/auto-upgrade-tester/result
4123+SSHKey=/var/cache/auto-upgrade-tester/ssh-key
4124+DebugBrokenScripts=yes
4125+
4126+[KVM]
4127+Virtio=True
4128+VncNum=1
4129+SshPort=54322
4130+ImageDir=/var/cache/auto-upgrade-tester/
4131+CacheImageDir=/var/cache/auto-upgrade-tester/
4132+BaseImage=%(ImageDir)s/dapper-i386.qcow2
4133+;SwapImage=jeos/swap.qcow2
4134+CacheBaseImage=yes
4135+
4136+[EC2]
4137+; Ubuntu official images:
4138+; https://help.ubuntu.com/community/EC2StartersGuide#Getting%20the%20images
4139+;AMI=ami-44bb5c2d
4140+; inofficial image
4141+AMI=ami-0d729464
4142+SSHKey=./ec2-keypair.pem
4143+;Specify the security groups you want attached to
4144+;the instance. For example:
4145+;SecurityGroups = ssh,web
4146+; Set this to "yes" if using an Ubuntu official AMI as we need to
4147+; allow root logins
4148+;UbuntuOfficialAMI = yes
4149+
4150+[CHROOT]
4151+Tempdir=/tmp/upgrade-tester
4152+CacheTarball=yes
4153
4154=== added directory 'AutoUpgradeTester/profile/defaults.cfg.d'
4155=== added file 'AutoUpgradeTester/profile/defaults.cfg.d/defaults.cfg'
4156--- AutoUpgradeTester/profile/defaults.cfg.d/defaults.cfg 1970-01-01 00:00:00 +0000
4157+++ AutoUpgradeTester/profile/defaults.cfg.d/defaults.cfg 2012-05-22 15:21:19 +0000
4158@@ -0,0 +1,63 @@
4159+# global defaults, override as needed in the indivual configuration
4160+# files
4161+#
4162+[DEFAULT]
4163+AutoUpgradeTesterBaseDir=/var/cache
4164+SourceRelease=oneiric
4165+TargetRelease=precise
4166+
4167+[Distro]
4168+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4169+
4170+[Distro]
4171+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4172+
4173+[Sources]
4174+From=%(SourceRelease)s
4175+To=%(TargetRelease)s
4176+
4177+[NonInteractive]
4178+BasePkg = ubuntu-standard
4179+Mirror = http://archive.ubuntu.com/ubuntu
4180+ForceOverwrite=no
4181+Components=main,restricted
4182+Pockets=security,updates
4183+UpgradeFromDistOnBootstrap=false
4184+DpkgProgressLog=no
4185+ResultDir=%(AutoUpgradeTesterBaseDir)s/auto-upgrade-tester/result
4186+SSHKey=%(AutoUpgradeTesterBaseDir)s/auto-upgrade-tester/ssh-key
4187+DebugBrokenScripts=yes
4188+UseUpgraderFromBzr=false
4189+;AddRepo=local_testing.list
4190+DebconfLog=/var/log/dist-upgrade/debconf.log
4191+
4192+
4193+[KVM]
4194+Virtio=True
4195+Arch=i386
4196+ImageDir=%(AutoUpgradeTesterBaseDir)s/auto-upgrade-tester/
4197+CacheImageDir=%(AutoUpgradeTesterBaseDir)s/auto-upgrade-tester/
4198+BaseImage=%(ImageDir)s/%(SourceRelease)s-%(Arch)s.qcow2
4199+CacheBaseImage=yes
4200+VncNum=1
4201+SshPort=54322
4202+VirtualRam=1536
4203+RootSize=80000
4204+
4205+[EC2]
4206+; Ubuntu official images:
4207+; https://help.ubuntu.com/community/EC2StartersGuide#Getting%20the%20images
4208+;AMI=ami-44bb5c2d
4209+; inofficial image
4210+AMI=ami-0d729464
4211+SSHKey=./ec2-keypair.pem
4212+;Specify the security groups you want attached to
4213+;the instance. For example:
4214+;SecurityGroups = ssh,web
4215+; Set this to "yes" if using an Ubuntu official AMI as we need to
4216+; allow root logins
4217+;UbuntuOfficialAMI = yes
4218+
4219+[CHROOT]
4220+Tempdir=/tmp/upgrade-tester
4221+CacheTarball=yes
4222
4223=== added directory 'AutoUpgradeTester/profile/edubuntu'
4224=== added file 'AutoUpgradeTester/profile/edubuntu/DistUpgrade.cfg'
4225--- AutoUpgradeTester/profile/edubuntu/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4226+++ AutoUpgradeTester/profile/edubuntu/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4227@@ -0,0 +1,8 @@
4228+[Sources]
4229+Components=main,restricted,universe,multiverse
4230+
4231+[NonInteractive]
4232+ProfileName = edubuntu
4233+BasePkg = edubuntu-desktop
4234+Components=main,restricted,universe,multiverse
4235+
4236
4237=== added symlink 'AutoUpgradeTester/profile/edubuntu/demoted.cfg'
4238=== target is u'../../demoted.cfg'
4239=== added directory 'AutoUpgradeTester/profile/edubuntu/result'
4240=== added symlink 'AutoUpgradeTester/profile/edubuntu/ssh-key'
4241=== target is u'../../jeos/ssh-key'
4242=== added directory 'AutoUpgradeTester/profile/euca-cloud'
4243=== added file 'AutoUpgradeTester/profile/euca-cloud/DistUpgrade.cfg'
4244--- AutoUpgradeTester/profile/euca-cloud/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4245+++ AutoUpgradeTester/profile/euca-cloud/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4246@@ -0,0 +1,4 @@
4247+[NonInteractive]
4248+ProfileName=eua-cloud
4249+AdditionalPkgs = pkgs.cfg
4250+
4251
4252=== added file 'AutoUpgradeTester/profile/euca-cloud/pkgs.cfg'
4253--- AutoUpgradeTester/profile/euca-cloud/pkgs.cfg 1970-01-01 00:00:00 +0000
4254+++ AutoUpgradeTester/profile/euca-cloud/pkgs.cfg 2012-05-22 15:21:19 +0000
4255@@ -0,0 +1,5 @@
4256+python-apt
4257+eucalyptus-cc
4258+eucalyptus-cloud
4259+eucalyptus-walrus
4260+eucalyptus-sc
4261
4262=== added directory 'AutoUpgradeTester/profile/euca-nc'
4263=== added file 'AutoUpgradeTester/profile/euca-nc/DistUpgrade.cfg'
4264--- AutoUpgradeTester/profile/euca-nc/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4265+++ AutoUpgradeTester/profile/euca-nc/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4266@@ -0,0 +1,3 @@
4267+[NonInteractive]
4268+ProfileName=eua-nc
4269+AdditionalPkgs = pkgs.cfg
4270
4271=== added file 'AutoUpgradeTester/profile/euca-nc/pkgs.cfg'
4272--- AutoUpgradeTester/profile/euca-nc/pkgs.cfg 1970-01-01 00:00:00 +0000
4273+++ AutoUpgradeTester/profile/euca-nc/pkgs.cfg 2012-05-22 15:21:19 +0000
4274@@ -0,0 +1,2 @@
4275+python-apt
4276+eucalyptus-nc
4277
4278=== added directory 'AutoUpgradeTester/profile/kubuntu'
4279=== added file 'AutoUpgradeTester/profile/kubuntu/DistUpgrade.cfg'
4280--- AutoUpgradeTester/profile/kubuntu/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4281+++ AutoUpgradeTester/profile/kubuntu/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4282@@ -0,0 +1,3 @@
4283+[NonInteractive]
4284+ProfileName=kubuntu
4285+BasePkg = kubuntu-desktop
4286
4287=== added symlink 'AutoUpgradeTester/profile/kubuntu/demoted.cfg'
4288=== target is u'../../demoted.cfg'
4289=== added directory 'AutoUpgradeTester/profile/kubuntu/result'
4290=== added symlink 'AutoUpgradeTester/profile/kubuntu/ssh-key'
4291=== target is u'../../jeos/ssh-key'
4292=== added directory 'AutoUpgradeTester/profile/lts-kubuntu'
4293=== added file 'AutoUpgradeTester/profile/lts-kubuntu/DistUpgrade.cfg'
4294--- AutoUpgradeTester/profile/lts-kubuntu/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4295+++ AutoUpgradeTester/profile/lts-kubuntu/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4296@@ -0,0 +1,6 @@
4297+[DEFAULT]
4298+SourceRelease=lucid
4299+
4300+[NonInteractive]
4301+ProfileName=lts-kubuntu
4302+BasePkg = kubuntu-desktop
4303
4304=== added symlink 'AutoUpgradeTester/profile/lts-kubuntu/demoted.cfg'
4305=== target is u'../../demoted.cfg'
4306=== added directory 'AutoUpgradeTester/profile/lts-kubuntu/result'
4307=== added symlink 'AutoUpgradeTester/profile/lts-kubuntu/ssh-key'
4308=== target is u'../../jeos/ssh-key'
4309=== added directory 'AutoUpgradeTester/profile/lts-main-all'
4310=== added directory 'AutoUpgradeTester/profile/lts-main-all-amd64'
4311=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg'
4312--- AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4313+++ AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4314@@ -0,0 +1,12 @@
4315+[DEFAULT]
4316+SourceRelease=lucid
4317+
4318+[NonInteractive]
4319+ProfileName = lts-main-all-amd64
4320+AdditionalPkgs = pkgs.cfg
4321+PostBootstrapScript=/usr/share/pyshared/AutoUpgradeTester/install_all.py
4322+;PostBootstrapScript=/home/upgrade-tester/update-manager/AutoUpgradeTester/install_all.py
4323+
4324+[KVM]
4325+Arch=amd64
4326+
4327
4328=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg.dapper'
4329--- AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg.dapper 1970-01-01 00:00:00 +0000
4330+++ AutoUpgradeTester/profile/lts-main-all-amd64/DistUpgrade.cfg.dapper 2012-05-22 15:21:19 +0000
4331@@ -0,0 +1,65 @@
4332+[View]
4333+#View=DistUpgradeViewGtk
4334+View=DistUpgradeViewNonInteractive
4335+
4336+# Distro contains global information about the upgrade
4337+[Distro]
4338+# the meta-pkgs we support
4339+MetaPkgs=ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop
4340+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4341+PostUpgradePurge=xorg-common, libgl1-mesa
4342+Demotions=demoted.cfg
4343+RemoveEssentialOk=sysvinit
4344+RemovalBlacklistFile=removal_blacklist.cfg
4345+
4346+# information about the individual meta-pkgs
4347+[ubuntu-desktop]
4348+KeyDependencies=gdm, gnome-panel, ubuntu-artwork
4349+# those pkgs will be marked remove right after the distUpgrade in the cache
4350+PostUpgradeRemove=xchat, xscreensaver
4351+
4352+[kubuntu-desktop]
4353+KeyDependencies=kdm, kicker, kubuntu-artwork-usplash
4354+# those packages are marked as obsolete right after the upgrade
4355+ForcedObsoletes=ivman
4356+
4357+[edubuntu-desktop]
4358+KeyDependencies=edubuntu-artwork, tuxpaint
4359+
4360+[xubuntu-desktop]
4361+KeyDependencies=xubuntu-artwork-usplash, xubuntu-default-settings, xfce4
4362+
4363+
4364+[Files]
4365+BackupExt=distUpgrade
4366+
4367+[Sources]
4368+From=dapper
4369+To=hardy
4370+ValidOrigin=Ubuntu
4371+ValidMirrors = mirrors.cfg
4372+
4373+[Network]
4374+MaxRetries=3
4375+
4376+[PreRequists]
4377+Packages=release-upgrader-apt,release-upgrader-dpkg
4378+SourcesList=prerequists-sources.list
4379+
4380+[NonInteractive]
4381+ProfileName = main-all
4382+BasePkg = ubuntu-standard
4383+AdditionalPkgs = pkgs.cfg
4384+Mirror = http://archive.ubuntu.com/ubuntu
4385+Proxy=http://192.168.1.1:3128/
4386+ForceOverwrite=yes
4387+CacheTarball=yes
4388+PostBootstrapScript=install_all.py
4389+Components=main,restricted
4390+Pockets=security,updates
4391+BaseImage=jeos/dapper-i386.qcow2
4392+CacheBaseImage=yes
4393+SwapImage=jeos/swap.qcow2
4394+UpgradeFromDistOnBootstrap=true
4395+SSHKey=ssh-key
4396+ReadReboot=yes
4397\ No newline at end of file
4398
4399=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/demoted.cfg'
4400=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/install_blacklist.cfg'
4401--- AutoUpgradeTester/profile/lts-main-all-amd64/install_blacklist.cfg 1970-01-01 00:00:00 +0000
4402+++ AutoUpgradeTester/profile/lts-main-all-amd64/install_blacklist.cfg 2012-05-22 15:21:19 +0000
4403@@ -0,0 +1,46 @@
4404+# jaunty: endless loop with DEBIAN_FRONTEND=noninteractive
4405+moodle
4406+# has a funny "can not be upgraded automatically" policy
4407+# see debian #368226
4408+quagga
4409+# not installable on a regular machine (preinst error)
4410+ltsp-client
4411+# gwenview-i18n has some file conflicts
4412+gwenview-i18n
4413+# ipppd needs MAKEDEV
4414+ipppd
4415+# cmake has incorrect emacs dependencies
4416+cmake
4417+# cluster manager hangs on shutdown
4418+cman
4419+
4420+# Conflicts/uninstallable packages in Oneiric
4421+libgladeui-doc
4422+mythes-it
4423+amavisd-new
4424+grub-legacy-ec2
4425+
4426+# LP:#901638
4427+tdsodbc
4428+
4429+# Only useful on livecd
4430+casper
4431+ubiquity
4432+
4433+# No need for so many kernels
4434+linux-image-.*
4435+
4436+# Failed to install
4437+bacula-director-mysql
4438+dovecot-common
4439+rabbitmq-server
4440+
4441+# cloud/ec2 no fun
4442+cloud-init
4443+ec2-init
4444+linux-image-ec2
4445+linux-image-2.6.31-302-ec2
4446+
4447+# not installable on a regular machine
4448+ltsp-client
4449+ltsp-client-core
4450
4451=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/pkgs.cfg'
4452--- AutoUpgradeTester/profile/lts-main-all-amd64/pkgs.cfg 1970-01-01 00:00:00 +0000
4453+++ AutoUpgradeTester/profile/lts-main-all-amd64/pkgs.cfg 2012-05-22 15:21:19 +0000
4454@@ -0,0 +1,3 @@
4455+python-apt
4456+python-gnupginterface
4457+grub-pc
4458
4459=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/prerequists-sources.list'
4460--- AutoUpgradeTester/profile/lts-main-all-amd64/prerequists-sources.list 1970-01-01 00:00:00 +0000
4461+++ AutoUpgradeTester/profile/lts-main-all-amd64/prerequists-sources.list 2012-05-22 15:21:19 +0000
4462@@ -0,0 +1,5 @@
4463+# sources.list fragment for pre-requists (one with countrymirror, one fallback)
4464+deb http://archive.ubuntu.com/ubuntu dapper-backports main/debian-installer
4465+#deb http://archive.ubuntu.com/ubuntu feisty-backports main/debian-installer
4466+# below is just for testing
4467+#deb http://archive.dogfood.launchpad.net/ubuntu feisty-backports main/debian-installer
4468
4469=== added file 'AutoUpgradeTester/profile/lts-main-all-amd64/removal_blacklist.cfg'
4470--- AutoUpgradeTester/profile/lts-main-all-amd64/removal_blacklist.cfg 1970-01-01 00:00:00 +0000
4471+++ AutoUpgradeTester/profile/lts-main-all-amd64/removal_blacklist.cfg 2012-05-22 15:21:19 +0000
4472@@ -0,0 +1,11 @@
4473+# blacklist of packages that should never be removed
4474+ubuntu-standard
4475+ubuntu-minimal
4476+ubuntu-desktop
4477+kubuntu-desktop
4478+edubuntu-desktop
4479+gobuntu-desktop
4480+# never remove nvidia-glx and friends
4481+^nvidia-glx$
4482+^nvidia-glx-new$
4483+^nvidia-glx-legacy$
4484
4485=== added file 'AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg'
4486--- AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4487+++ AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4488@@ -0,0 +1,8 @@
4489+[DEFAULT]
4490+SourceRelease=lucid
4491+
4492+[NonInteractive]
4493+ProfileName = lts-main-all
4494+AdditionalPkgs = pkgs.cfg
4495+PostBootstrapScript=/usr/share/pyshared/AutoUpgradeTester/install_all.py
4496+;PostBootstrapScript=/home/upgrade-tester/update-manager/AutoUpgradeTester/install_all.py
4497
4498=== added file 'AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg.dapper'
4499--- AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg.dapper 1970-01-01 00:00:00 +0000
4500+++ AutoUpgradeTester/profile/lts-main-all/DistUpgrade.cfg.dapper 2012-05-22 15:21:19 +0000
4501@@ -0,0 +1,65 @@
4502+[View]
4503+#View=DistUpgradeViewGtk
4504+View=DistUpgradeViewNonInteractive
4505+
4506+# Distro contains global information about the upgrade
4507+[Distro]
4508+# the meta-pkgs we support
4509+MetaPkgs=ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop
4510+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4511+PostUpgradePurge=xorg-common, libgl1-mesa
4512+Demotions=demoted.cfg
4513+RemoveEssentialOk=sysvinit
4514+RemovalBlacklistFile=removal_blacklist.cfg
4515+
4516+# information about the individual meta-pkgs
4517+[ubuntu-desktop]
4518+KeyDependencies=gdm, gnome-panel, ubuntu-artwork
4519+# those pkgs will be marked remove right after the distUpgrade in the cache
4520+PostUpgradeRemove=xchat, xscreensaver
4521+
4522+[kubuntu-desktop]
4523+KeyDependencies=kdm, kicker, kubuntu-artwork-usplash
4524+# those packages are marked as obsolete right after the upgrade
4525+ForcedObsoletes=ivman
4526+
4527+[edubuntu-desktop]
4528+KeyDependencies=edubuntu-artwork, tuxpaint
4529+
4530+[xubuntu-desktop]
4531+KeyDependencies=xubuntu-artwork-usplash, xubuntu-default-settings, xfce4
4532+
4533+
4534+[Files]
4535+BackupExt=distUpgrade
4536+
4537+[Sources]
4538+From=dapper
4539+To=hardy
4540+ValidOrigin=Ubuntu
4541+ValidMirrors = mirrors.cfg
4542+
4543+[Network]
4544+MaxRetries=3
4545+
4546+[PreRequists]
4547+Packages=release-upgrader-apt,release-upgrader-dpkg
4548+SourcesList=prerequists-sources.list
4549+
4550+[NonInteractive]
4551+ProfileName = main-all
4552+BasePkg = ubuntu-standard
4553+AdditionalPkgs = pkgs.cfg
4554+Mirror = http://archive.ubuntu.com/ubuntu
4555+Proxy=http://192.168.1.1:3128/
4556+ForceOverwrite=yes
4557+CacheTarball=yes
4558+PostBootstrapScript=install_all.py
4559+Components=main,restricted
4560+Pockets=security,updates
4561+BaseImage=jeos/dapper-i386.qcow2
4562+CacheBaseImage=yes
4563+SwapImage=jeos/swap.qcow2
4564+UpgradeFromDistOnBootstrap=true
4565+SSHKey=ssh-key
4566+ReadReboot=yes
4567\ No newline at end of file
4568
4569=== added symlink 'AutoUpgradeTester/profile/lts-main-all/demoted.cfg'
4570=== target is u'../../DistUpgrade/demoted.cfg'
4571=== added file 'AutoUpgradeTester/profile/lts-main-all/install_blacklist.cfg'
4572--- AutoUpgradeTester/profile/lts-main-all/install_blacklist.cfg 1970-01-01 00:00:00 +0000
4573+++ AutoUpgradeTester/profile/lts-main-all/install_blacklist.cfg 2012-05-22 15:21:19 +0000
4574@@ -0,0 +1,46 @@
4575+# jaunty: endless loop with DEBIAN_FRONTEND=noninteractive
4576+moodle
4577+# has a funny "can not be upgraded automatically" policy
4578+# see debian #368226
4579+quagga
4580+# not installable on a regular machine (preinst error)
4581+ltsp-client
4582+# gwenview-i18n has some file conflicts
4583+gwenview-i18n
4584+# ipppd needs MAKEDEV
4585+ipppd
4586+# cmake has incorrect emacs dependencies
4587+cmake
4588+# cluster manager hangs on shutdown
4589+cman
4590+
4591+# Conflicts/uninstallable packages in Oneiric
4592+libgladeui-doc
4593+mythes-it
4594+amavisd-new
4595+grub-legacy-ec2
4596+
4597+# LP:#901638
4598+tdsodbc
4599+
4600+# Only useful on livecd
4601+casper
4602+ubiquity
4603+
4604+# No need for so many kernels
4605+linux-image-.*
4606+
4607+# Failed to install
4608+bacula-director-mysql
4609+dovecot-common
4610+rabbitmq-server
4611+
4612+# cloud/ec2 no fun
4613+cloud-init
4614+ec2-init
4615+linux-image-ec2
4616+linux-image-2.6.31-302-ec2
4617+
4618+# not installable on a regular machine
4619+ltsp-client
4620+ltsp-client-core
4621
4622=== added file 'AutoUpgradeTester/profile/lts-main-all/pkgs.cfg'
4623--- AutoUpgradeTester/profile/lts-main-all/pkgs.cfg 1970-01-01 00:00:00 +0000
4624+++ AutoUpgradeTester/profile/lts-main-all/pkgs.cfg 2012-05-22 15:21:19 +0000
4625@@ -0,0 +1,3 @@
4626+python-apt
4627+python-gnupginterface
4628+grub-pc
4629
4630=== added file 'AutoUpgradeTester/profile/lts-main-all/prerequists-sources.list'
4631--- AutoUpgradeTester/profile/lts-main-all/prerequists-sources.list 1970-01-01 00:00:00 +0000
4632+++ AutoUpgradeTester/profile/lts-main-all/prerequists-sources.list 2012-05-22 15:21:19 +0000
4633@@ -0,0 +1,5 @@
4634+# sources.list fragment for pre-requists (one with countrymirror, one fallback)
4635+deb http://archive.ubuntu.com/ubuntu dapper-backports main/debian-installer
4636+#deb http://archive.ubuntu.com/ubuntu feisty-backports main/debian-installer
4637+# below is just for testing
4638+#deb http://archive.dogfood.launchpad.net/ubuntu feisty-backports main/debian-installer
4639
4640=== added file 'AutoUpgradeTester/profile/lts-main-all/removal_blacklist.cfg'
4641--- AutoUpgradeTester/profile/lts-main-all/removal_blacklist.cfg 1970-01-01 00:00:00 +0000
4642+++ AutoUpgradeTester/profile/lts-main-all/removal_blacklist.cfg 2012-05-22 15:21:19 +0000
4643@@ -0,0 +1,11 @@
4644+# blacklist of packages that should never be removed
4645+ubuntu-standard
4646+ubuntu-minimal
4647+ubuntu-desktop
4648+kubuntu-desktop
4649+edubuntu-desktop
4650+gobuntu-desktop
4651+# never remove nvidia-glx and friends
4652+^nvidia-glx$
4653+^nvidia-glx-new$
4654+^nvidia-glx-legacy$
4655
4656=== added symlink 'AutoUpgradeTester/profile/lts-main-all/ssh-key'
4657=== target is u'../../jeos/ssh-key'
4658=== added directory 'AutoUpgradeTester/profile/lts-mythbuntu'
4659=== added file 'AutoUpgradeTester/profile/lts-mythbuntu/DistUpgrade.cfg'
4660--- AutoUpgradeTester/profile/lts-mythbuntu/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4661+++ AutoUpgradeTester/profile/lts-mythbuntu/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4662@@ -0,0 +1,8 @@
4663+[DEFAULT]
4664+SourceRelease=lucid
4665+
4666+[NonInteractive]
4667+ProfileName=lts-mythbuntu
4668+BasePkg = mythbuntu-desktop
4669+Components=main,restricted,universe,multiverse
4670+Pockets=security,updates
4671
4672=== added directory 'AutoUpgradeTester/profile/lts-server'
4673=== added directory 'AutoUpgradeTester/profile/lts-server-amd64'
4674=== added file 'AutoUpgradeTester/profile/lts-server-amd64/DistUpgrade.cfg'
4675--- AutoUpgradeTester/profile/lts-server-amd64/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4676+++ AutoUpgradeTester/profile/lts-server-amd64/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4677@@ -0,0 +1,9 @@
4678+[DEFAULT]
4679+SourceRelease=lucid
4680+
4681+[NonInteractive]
4682+ProfileName=lts-server-amd64
4683+AdditionalPkgs = pkgs.cfg
4684+
4685+[KVM]
4686+Arch=amd64
4687
4688=== added file 'AutoUpgradeTester/profile/lts-server-amd64/pkgs.cfg'
4689--- AutoUpgradeTester/profile/lts-server-amd64/pkgs.cfg 1970-01-01 00:00:00 +0000
4690+++ AutoUpgradeTester/profile/lts-server-amd64/pkgs.cfg 2012-05-22 15:21:19 +0000
4691@@ -0,0 +1,3 @@
4692+grub-pc
4693+python-apt
4694+python-gnupginterface
4695
4696=== added symlink 'AutoUpgradeTester/profile/lts-server-amd64/ssh-key'
4697=== target is u'../../jeos/ssh-key'
4698=== added directory 'AutoUpgradeTester/profile/lts-server-tasks'
4699=== added file 'AutoUpgradeTester/profile/lts-server-tasks/DistUpgrade.cfg'
4700--- AutoUpgradeTester/profile/lts-server-tasks/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4701+++ AutoUpgradeTester/profile/lts-server-tasks/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4702@@ -0,0 +1,6 @@
4703+[DEFAULT]
4704+SourceRelease=lucid
4705+
4706+[NonInteractive]
4707+ProfileName = lts-server-tasks
4708+AdditionalPkgs = pkgs.cfg
4709
4710=== added file 'AutoUpgradeTester/profile/lts-server-tasks/pkgs.cfg'
4711--- AutoUpgradeTester/profile/lts-server-tasks/pkgs.cfg 1970-01-01 00:00:00 +0000
4712+++ AutoUpgradeTester/profile/lts-server-tasks/pkgs.cfg 2012-05-22 15:21:19 +0000
4713@@ -0,0 +1,10 @@
4714+grub-pc
4715+python-apt
4716+python-gnupginterface
4717+dns-server^
4718+lamp-server^
4719+mail-server^
4720+openssh-server^
4721+postgresql-server^
4722+print-server^
4723+samba-server^
4724
4725=== added file 'AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg'
4726--- AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4727+++ AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4728@@ -0,0 +1,7 @@
4729+[DEFAULT]
4730+SourceRelease=lucid
4731+
4732+[NonInteractive]
4733+ProfileName=lts-server
4734+AdditionalPkgs = pkgs.cfg
4735+;UseUpgraderFromBzr=true
4736\ No newline at end of file
4737
4738=== added file 'AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg.dapper'
4739--- AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg.dapper 1970-01-01 00:00:00 +0000
4740+++ AutoUpgradeTester/profile/lts-server/DistUpgrade.cfg.dapper 2012-05-22 15:21:19 +0000
4741@@ -0,0 +1,53 @@
4742+[View]
4743+#View=DistUpgradeViewGtk
4744+View=DistUpgradeViewNonInteractive
4745+Depends=python-gnupginterface
4746+
4747+# Distro contains global information about the upgrade
4748+[Distro]
4749+# the meta-pkgs we support
4750+MetaPkgs=ubuntu-standard
4751+BaseMetaPkgs=ubuntu-minimal
4752+Demotions=demotions.cfg
4753+RemoveEssentialOk=sysvinit
4754+AllowUnauthenticated=yes
4755+
4756+[Files]
4757+BackupExt=distUpgrade
4758+
4759+[ubuntu-standard]
4760+KeyDependencies=w3m, wget
4761+
4762+[Sources]
4763+From=dapper
4764+To=hardy
4765+ValidOrigin=Ubuntu
4766+ValidMirrors = mirrors.cfg
4767+
4768+[Network]
4769+MaxRetries=3
4770+
4771+[PreRequists]
4772+Packages=release-upgrader-apt,release-upgrader-dpkg
4773+SourcesList=prerequists-sources.dapper.list
4774+SourcesList-ia64=prerequists-sources.dapper-ports.list
4775+SourcesList-hppa=prerequists-sources.dapper-ports.list
4776+
4777+[NonInteractive]
4778+ProfileName=server
4779+BasePkg = ubuntu-standard
4780+AdditionalPkgs = pkgs.cfg
4781+Mirror = http://archive.ubuntu.com/ubuntu
4782+Proxy=http://192.168.1.1:3128/
4783+ForceOverwrite=no
4784+SSHKey=ssh-key
4785+BaseImage=jeos/dapper-i386.qcow2
4786+SwapImage=jeos/swap.qcow2
4787+Components=main,restricted
4788+Pockets=security,updates
4789+UpgradeFromDistOnBoostrap=true
4790+CacheBaseImage=yes
4791+RealReboot=yes
4792+; WARNING: if AddRepo is used, remember to set Distro/AllowUnauthenticted too
4793+;AddRepo=local_testing.list
4794+;PreRequistsFiles=backports/release-upgrader-apt_0.7.9ubuntu1_i386.udeb, backports/release-upgrader-dpkg_1.14.5ubuntu11.6_i386.udeb
4795
4796=== added file 'AutoUpgradeTester/profile/lts-server/local_testing.list'
4797--- AutoUpgradeTester/profile/lts-server/local_testing.list 1970-01-01 00:00:00 +0000
4798+++ AutoUpgradeTester/profile/lts-server/local_testing.list 2012-05-22 15:21:19 +0000
4799@@ -0,0 +1,1 @@
4800+deb http://ppa.launchpad.net/mvo/apt-lucid-chris/ubuntu lucid main
4801
4802=== added file 'AutoUpgradeTester/profile/lts-server/pkgs.cfg'
4803--- AutoUpgradeTester/profile/lts-server/pkgs.cfg 1970-01-01 00:00:00 +0000
4804+++ AutoUpgradeTester/profile/lts-server/pkgs.cfg 2012-05-22 15:21:19 +0000
4805@@ -0,0 +1,3 @@
4806+grub-pc
4807+python-apt
4808+python-gnupginterface
4809
4810=== added symlink 'AutoUpgradeTester/profile/lts-server/prerequists-sources.dapper.list'
4811=== target is u'../../DistUpgrade/prerequists-sources.dapper.list'
4812=== added symlink 'AutoUpgradeTester/profile/lts-server/ssh-key'
4813=== target is u'../../jeos/ssh-key'
4814=== added directory 'AutoUpgradeTester/profile/lts-ubuntu'
4815=== added directory 'AutoUpgradeTester/profile/lts-ubuntu-amd64'
4816=== added file 'AutoUpgradeTester/profile/lts-ubuntu-amd64/DistUpgrade.cfg'
4817--- AutoUpgradeTester/profile/lts-ubuntu-amd64/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4818+++ AutoUpgradeTester/profile/lts-ubuntu-amd64/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4819@@ -0,0 +1,13 @@
4820+[DEFAULT]
4821+SourceRelease=lucid
4822+
4823+[NonInteractive]
4824+ProfileName=lts-ubuntu-amd64
4825+BasePkg = ubuntu-desktop
4826+AdditionalPkgs = pkgs.cfg
4827+PostBootstrapData = /usr/share/pyshared/AutoUpgradeTester/prepare_lts_user
4828+PostBootstrapScript = /usr/share/pyshared/AutoUpgradeTester/prepare_lts_desktop
4829+
4830+[KVM]
4831+Arch=amd64
4832+
4833
4834=== added file 'AutoUpgradeTester/profile/lts-ubuntu-amd64/pkgs.cfg'
4835--- AutoUpgradeTester/profile/lts-ubuntu-amd64/pkgs.cfg 1970-01-01 00:00:00 +0000
4836+++ AutoUpgradeTester/profile/lts-ubuntu-amd64/pkgs.cfg 2012-05-22 15:21:19 +0000
4837@@ -0,0 +1,3 @@
4838+ubuntu-minimal
4839+ubuntu-standard
4840+grub-pc
4841
4842=== added symlink 'AutoUpgradeTester/profile/lts-ubuntu-amd64/ssh-key'
4843=== target is u'../../jeos/ssh-key'
4844=== added file 'AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg'
4845--- AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4846+++ AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4847@@ -0,0 +1,10 @@
4848+[DEFAULT]
4849+SourceRelease=lucid
4850+
4851+[NonInteractive]
4852+ProfileName=lts-ubuntu
4853+BasePkg = ubuntu-desktop
4854+AdditionalPkgs = pkgs.cfg
4855+PostBootstrapData = /usr/share/pyshared/AutoUpgradeTester/prepare_lts_user
4856+PostBootstrapScript = /usr/share/pyshared/AutoUpgradeTester/prepare_lts_desktop
4857+;UseUpgraderFromBzr=true
4858
4859=== added file 'AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg.dapper'
4860--- AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg.dapper 1970-01-01 00:00:00 +0000
4861+++ AutoUpgradeTester/profile/lts-ubuntu/DistUpgrade.cfg.dapper 2012-05-22 15:21:19 +0000
4862@@ -0,0 +1,67 @@
4863+[View]
4864+#View=DistUpgradeViewGtk
4865+View=DistUpgradeViewNonInteractive
4866+
4867+# Distro contains global information about the upgrade
4868+[Distro]
4869+# the meta-pkgs we support
4870+MetaPkgs=ubuntu-desktop, kubuntu-desktop, edubuntu-desktop, xubuntu-desktop
4871+BaseMetaPkgs=ubuntu-minimal, ubuntu-standard
4872+PostUpgradePurge=xorg-common, libgl1-mesa
4873+Demotions=demoted.cfg
4874+RemoveEssentialOk=sysvinit
4875+RemovalBlacklistFile=removal_blacklist.cfg
4876+AllowUnauthenticated=yes
4877+PostInstallScripts=/usr/lib/udev/migrate-fstab-to-uuid.sh
4878+
4879+# information about the individual meta-pkgs
4880+[ubuntu-desktop]
4881+KeyDependencies=gdm, gnome-panel, ubuntu-artwork
4882+# those pkgs will be marked remove right after the distUpgrade in the cache
4883+PostUpgradeRemove=xchat, xscreensaver
4884+
4885+[kubuntu-desktop]
4886+KeyDependencies=kdm, kicker, kubuntu-artwork-usplash
4887+# those packages are marked as obsolete right after the upgrade
4888+ForcedObsoletes=ivman
4889+
4890+[edubuntu-desktop]
4891+KeyDependencies=edubuntu-artwork, tuxpaint
4892+
4893+[xubuntu-desktop]
4894+KeyDependencies=xubuntu-artwork-usplash, xubuntu-default-settings, xfce4
4895+
4896+
4897+[Files]
4898+BackupExt=distUpgrade
4899+
4900+[PreRequists]
4901+Packages=release-upgrader-apt,release-upgrader-dpkg
4902+SourcesList=prerequists-sources.dapper.list
4903+
4904+[Sources]
4905+From=dapper
4906+To=hardy
4907+ValidOrigin=Ubuntu
4908+ValidMirrors = mirrors.cfg
4909+
4910+[Network]
4911+MaxRetries=3
4912+
4913+[NonInteractive]
4914+ProfileName = ubuntu
4915+BasePkg = ubuntu-desktop
4916+AdditionalPkgs = pkgs.cfg
4917+Mirror = http://archive.ubuntu.com/ubuntu
4918+Proxy=http://192.168.1.1:3128/
4919+ForceOverwrite=yes
4920+Components=main,restricted
4921+Pockets=security,updates
4922+SSHKey=ssh-key
4923+BaseImage=jeos/dapper-i386.qcow2
4924+CacheBaseImage=yes
4925+SwapImage=jeos/swap.qcow2
4926+UpgradeFromDistOnBootstrap=true
4927+WorkaroundNetworkManager=true
4928+; WARNING: if AddRepo is used, remember to set Distro/AllowUnauthenticted too
4929+AddRepo=local_testing.list
4930
4931=== added file 'AutoUpgradeTester/profile/lts-ubuntu/pkgs.cfg'
4932--- AutoUpgradeTester/profile/lts-ubuntu/pkgs.cfg 1970-01-01 00:00:00 +0000
4933+++ AutoUpgradeTester/profile/lts-ubuntu/pkgs.cfg 2012-05-22 15:21:19 +0000
4934@@ -0,0 +1,3 @@
4935+ubuntu-minimal
4936+ubuntu-standard
4937+grub-pc
4938
4939=== added symlink 'AutoUpgradeTester/profile/lts-ubuntu/prerequists-sources.dapper.list'
4940=== target is u'../../DistUpgrade/prerequists-sources.dapper.list'
4941=== added symlink 'AutoUpgradeTester/profile/lts-ubuntu/ssh-key'
4942=== target is u'../../jeos/ssh-key'
4943=== added directory 'AutoUpgradeTester/profile/lts-universe-amd64'
4944=== added file 'AutoUpgradeTester/profile/lts-universe-amd64/DistUpgrade.cfg'
4945--- AutoUpgradeTester/profile/lts-universe-amd64/DistUpgrade.cfg 1970-01-01 00:00:00 +0000
4946+++ AutoUpgradeTester/profile/lts-universe-amd64/DistUpgrade.cfg 2012-05-22 15:21:19 +0000
4947@@ -0,0 +1,12 @@
4948+[DEFAULT]
4949+SourceRelease=lucid
4950+
4951+[NonInteractive]
4952+ProfileName = lts-universe-amd64
4953+AdditionalPkgs = pkgs.cfg
4954+Components=main,restricted,universe
4955+PostBootstrapScript=/home/upgrade-tester/update-manager/AutoUpgradeTester/install_universe
4956+
4957+[KVM]
4958+Arch = amd64
4959+VirtualRam = 3072
4960
4961=== added symlink 'AutoUpgradeTester/profile/lts-universe-amd64/demoted.cfg'
4962=== target is u'../../DistUpgrade/demoted.cfg'
4963=== added file 'AutoUpgradeTester/profile/lts-universe-amd64/install_blacklist.cfg'
4964--- AutoUpgradeTester/profile/lts-universe-amd64/install_blacklist.cfg 1970-01-01 00:00:00 +0000
4965+++ AutoUpgradeTester/profile/lts-universe-amd64/install_blacklist.cfg 2012-05-22 15:21:19 +0000
4966@@ -0,0 +1,40 @@
4967+# jaunty: endless loop with DEBIAN_FRONTEND=noninteractive
4968+moodle
4969+# has a funny "can not be upgraded automatically" policy
4970+# see debian #368226
4971+quagga
4972+# not installable on a regular machine (preinst error)
4973+ltsp-client
4974+# gwenview-i18n has some file conflicts
4975+gwenview-i18n
4976+# ipppd needs MAKEDEV
4977+ipppd
4978+# cmake has incorrect emacs dependencies
4979+cmake
4980+# cluster manager hangs on shutdown
4981+cman
4982+
4983+# Conflicts/uninstallable packages in Oneiric
4984+libgladeui-doc
4985+mythes-it
4986+amavisd-new
4987+grub-legacy-ec2
4988+
4989+# LP:#901638
4990+tdsodbc
4991+
4992+# Only useful on livecd
4993+casper
4994+ubiquity
4995+
4996+# Breaks apache
4997+lwat
4998+
4999+# Broken on collectd
5000+kcollectd
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches

to status/vote changes: