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