Merge lp:~zulcss/vmbuilder/vm--jaunty into lp:vmbuilder/trunk

Proposed by Chuck Short
Status: Needs review
Proposed branch: lp:~zulcss/vmbuilder/vm--jaunty
Merge into: lp:vmbuilder/trunk
Diff against target: None lines
To merge this branch: bzr merge lp:~zulcss/vmbuilder/vm--jaunty
Reviewer Review Type Date Requested Status
Ubuntu Virtualisation team Pending
Review via email: mp+5039@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Chuck Short (zulcss) wrote :

Please merge this branch, it contains the following:

- Various bug fixes
- Transition to python2.6
- Updated ec2 plugin.

lp:~zulcss/vmbuilder/vm--jaunty updated
322. By Chuck Short

Dont install the ec2-api-tools after all

323. By Chuck Short

Add apt-key

324. By Chuck Short

Add ubuntu-on-ec2 ppa key

325. By Chuck Short

Remove appt-key

326. By Chuck Short

Update i386 AKI and ARI for hardy

327. By Chuck Short

Clean up intrepid

328. By Chuck Short

Add landscape-client support for ec2

329. By Chuck Short

Update AKI and ARI for hardy again *sigh*

330. By Chuck Short

Added warning about out dated AKI and ARI

331. By Chuck Short

juanty needs hvc0

332. By Chuck Short

Update aki/ari for jaunty

Unmerged revisions

332. By Chuck Short

Update aki/ari for jaunty

331. By Chuck Short

juanty needs hvc0

330. By Chuck Short

Added warning about out dated AKI and ARI

329. By Chuck Short

Update AKI and ARI for hardy again *sigh*

328. By Chuck Short

Add landscape-client support for ec2

327. By Chuck Short

Clean up intrepid

326. By Chuck Short

Update i386 AKI and ARI for hardy

325. By Chuck Short

Remove appt-key

324. By Chuck Short

Add ubuntu-on-ec2 ppa key

323. By Chuck Short

Add apt-key

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'VMBuilder/plugins/ec2/__init__.py'
2--- VMBuilder/plugins/ec2/__init__.py 2008-11-28 11:18:43 +0000
3+++ VMBuilder/plugins/ec2/__init__.py 2009-03-30 16:33:41 +0000
4@@ -36,6 +36,7 @@
5 group.add_option('--ec2-secret-key', metavar='SECRET_ID', help='AWS secret access key.')
6 group.add_option('--ec2-kernel','--ec2-aki', metavar='AKI', help='EC2 AKI (kernel) to use.')
7 group.add_option('--ec2-ramdisk','--ec2-ari', metavar='ARI', help='EC2 ARI (ramdisk) to use.')
8+ group.add_option('--ec2-version',metavar='EC2_VER',help='Specifity the EC2 image version.')
9 self.vm.register_setting_group(group)
10
11 def preflight_check(self):
12@@ -59,17 +60,43 @@
13
14 if not self.vm.ec2_kernel:
15 logging.debug('No ec2-aki choosen setting to default. Use --ec2-kernel to change this')
16- if self.vm.arch == 'amd64':
17- self.vm.ec2_kernel = 'aki-d314f0ba'
18- else:
19- self.vm.ec2_kernel = 'aki-af14f0c6'
20+ if self.vm.suite == 'hardy':
21+ if self.vm.arch == 'amd64':
22+ self.vm.ec2_kernel = 'aki-5012f539'
23+ else:
24+ self.vm.ec2_kernel = 'aki-7e17f017'
25+ elif self.vm.suite == 'intrepid':
26+ if self.vm.arch == 'amd64':
27+ self.vm.ec2_kernel = 'aki-20c12649'
28+ else:
29+ self.vm.ec2_kernel = 'aki-20c12649'
30+ elif self.vm.suite == 'jaunty':
31+ if self.vm.arch == 'amd64':
32+ self.vm.ec2_kernel = 'aki-6507e00c'
33+ else:
34+ self.vm.ec2_kernel = 'aki-6407e00d'
35+
36+ logging.info('%s - AKI to be used.' %(self.vm.ec2_kernel))
37
38 if not self.vm.ec2_ramdisk:
39 logging.debug('No ec2-ari choosen setting to default. Use --ec2-ramdisk to change this.')
40- if self.vm.arch == 'amd64':
41- self.vm.ec2_ramdisk = 'ari-d014f0b9'
42- else:
43- self.vm.ec2_ramdisk = 'ari-ac14f0c5'
44+ if self.vm.suite == 'hardy':
45+ if self.vm.arch == 'amd64':
46+ self.vm.ec2_ramdisk = 'ari-5512f53c'
47+ else:
48+ self.vm.ec2_ramdisk = 'ari-7d17f014'
49+ elif self.vm.suite == 'intrepid':
50+ if self.vm.arch == 'amd64':
51+ self.vm.ec2_ramdisk = 'ari-0ac12663'
52+ else:
53+ self.vm.ec2_ramdisk = 'ari-21c12648'
54+ elif self.vm.suite == 'jaunty':
55+ if self.vm.arch == 'amd64':
56+ self.vm.ec2_ramdisk = 'ari-6307e00a'
57+ else:
58+ self.vm.ec2_ramdisk = 'ari-6207e00b'
59+
60+ logging .info('%s - ARI to be used.'%(self.vm.ec2_ramdisk))
61
62 if not self.vm.ec2_bucket:
63 raise VMBuilderUserError('When building for EC2 you must provide an S3 bucket to hold the AMI')
64@@ -80,29 +107,28 @@
65 if not self.vm.ec2_secret_key:
66 raise VMBuilderUserError('When building for EC2 you must provide your AWS secret access key.')
67
68-
69- if not self.vm.addpkg:
70- self.vm.addpkg = []
71-
72- self.vm.addpkg += ['openssh-server']
73- self.vm.addpkg += ['ec2-init']
74- self.vm.addpkg += ['openssh-server']
75- self.vm.addpkg += ['ec2-modules']
76- self.vm.addpkg += ['server^']
77- self.vm.addpkg += ['standard^']
78-
79- if not self.vm.ppa:
80- self.vm.ppa = []
81-
82- self.vm.ppa += ['ubuntu-ec2']
83+ logging.info('Installing common software')
84+ self.install_common()
85+ if self.vm.suite == 'hardy':
86+ self.install_hardy()
87+ elif self.vm.suite == 'intrepid':
88+ self.install_intrepid()
89+ elif self.vm.suite == 'jaunty':
90+ self.install_jaunty()
91
92 def post_install(self):
93 if not self.vm.ec2:
94 return
95
96 logging.info("Running ec2 postinstall")
97- self.install_from_template('/etc/event.d/xvc0', 'upstart')
98- self.run_in_target('passwd', '-l', self.vm.user)
99+ logging.info("Running common post install")
100+ if self.vm.suite == 'hardy':
101+ self.postinstall_hardy()
102+ elif self.vm.suite == 'intrepid':
103+ self.postinstall_intrepid()
104+ elif self.vm.suite == 'jaunty':
105+ self.postinstall_jaunty()
106+ self.postinstall_common()
107
108 def deploy(self):
109 if not self.vm.ec2:
110@@ -121,4 +147,113 @@
111
112 return True
113
114+ def install_common(self):
115+ if not self.vm.ec2:
116+ return False
117+
118+ if not self.vm.addpkg:
119+ self.vm.addpkg = []
120+
121+ logging.info('Installing common software.')
122+ self.vm.addpkg += ['openssh-server',
123+ 'ec2-init',
124+ 'standard^',
125+ 'ec2-ami-tools',
126+ 'update-motd',
127+ 'curl',
128+ 'screen',
129+ 'screen-profiles']
130+
131+ if not self.vm.ppa:
132+ self.vm.ppa = []
133+
134+ self.vm.ppa += ['ubuntu-on-ec2']
135+
136+ def install_hardy(self):
137+ if not self.vm.ec2:
138+ return False
139+
140+ logging.info('Installing software for hardy.')
141+ self.vm.addpkg += ['ruby',
142+ 'libc6-xen',
143+ 'libopenssl-ruby']
144+
145+
146+ def postinstall_hardy(self):
147+ if not self.vm.ec2:
148+ return False
149+
150+ logging.info('Running post-install for hardy')
151+ # work around for libc6/xen bug in hardy.
152+ self.install_from_template('/etc/ld.so.conf.d/libc6-xen.conf', 'xen-ld-so-conf')
153+ self.run_in_target('apt-get', 'remove', '-y', 'libc6-i686')
154+
155+ self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-hardy')
156+ self.install_from_template('/etc/event.d/xvc0', 'xvc0')
157+ self.run_in_target('update-rc.d', '-f', 'hwclockfirst.sh', 'remove')
158+
159+ def install_intrepid(self):
160+ if not self.vm.ec2:
161+ return False
162+
163+ logging.info('Installing software for intrepid')
164+ self.vm.addpkg += ['ec2-modules',
165+ 'ruby',
166+ 'libopenssl-ruby',
167+ 'server^',
168+ 'policykit',
169+ 'landscape-client',
170+ 'ec2-api-tools']
171+
172+ def postinstall_intrepid(self):
173+ if not self.vm.ec2:
174+ return False
175+
176+ logging.info('Running post-install for intrepid')
177+ self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-intrepid')
178+
179+ def install_jaunty(self):
180+ if not self.vm.ec2:
181+ return False
182+
183+ logging.info('Installing software for jaunty')
184+ self.vm.addpkg += ['ec2-modules',
185+ 'ruby1.8',
186+ 'server^',
187+ 'libopenssl-ruby1.8']
188+
189+ def postinall_jaunty(self):
190+ if not self.vm.ec2:
191+ return False
192+
193+ logging.info('Running post-install for jaunty')
194+ self.install_from_template('/etc/update-motd.d/51_update-motd', '51_update-motd-intrepid')
195+
196+ def postinstall_common(self):
197+ if not self.vm.ec2:
198+ return False
199+
200+ logging.info('Running common post-install')
201+ self.install_from_template('/etc/ssh/sshd_config', 'sshd_config')
202+ self.run_in_target('chpasswd', '-e', stdin='ubuntu:!\n')
203+ # this makes my skin crawl
204+ self.install_from_template('/etc/sudoers', 'sudoers')
205+ # this doesnt
206+ self.run_in_target('chmod', '755', '/etc/update-motd.d/51_update-motd')
207+ self.install_from_template('/etc/ec2_version', 'ec2_version', { 'version' : self.vm.ec2_version })
208+
209+ self.run_in_target('rm', '-f', '/etc/localtime')
210+ self.run_in_target('ln', '-s', '/usr/share/zoneinfo/UTC', '/etc/localtime')
211+
212+ self.run_in_target('usermod', '-u', '135', 'ubuntu')
213+ self.run_in_target('chown', '-R', 'ubuntu', '/home/ubuntu')
214+
215+ self.run_in_target('update-rc.d', '-f', 'hwclock.sh', 'remove')
216+
217+ # jdk needs /proc to be mount in order to be installed
218+ run_cmd('mount', '-o', 'bind', '/proc', '%s/proc' %self.vm.installdir)
219+ self.run_in_target('apt-get', 'install', '-y','--force-yes', 'openjdk-6-jre-headless')
220+ self.run_in_target('apt-get', 'install', '-y', '--force-yes', 'ec2-api-tools')
221+ run_cmd('umount', '-l', '%s/proc' %self.vm.installdir)
222+
223 register_plugin(EC2)
224
225=== added file 'VMBuilder/plugins/ec2/templates/51_update-motd-hardy.tmpl'
226--- VMBuilder/plugins/ec2/templates/51_update-motd-hardy.tmpl 1970-01-01 00:00:00 +0000
227+++ VMBuilder/plugins/ec2/templates/51_update-motd-hardy.tmpl 2009-03-24 16:33:47 +0000
228@@ -0,0 +1,10 @@
229+#!/bin/sh
230+
231+echo "---------------------------------------------------------------------"
232+echo "At the moment, only the core of the system is installed. To tune the "
233+echo "system to your needs, you can choose to install one or more "
234+echo "predefined collections of software by running the following "
235+echo "command: "
236+echo " "
237+echo " sudo tasksel "
238+echo "---------------------------------------------------------------------"
239
240=== added file 'VMBuilder/plugins/ec2/templates/51_update-motd-intrepid.tmpl'
241--- VMBuilder/plugins/ec2/templates/51_update-motd-intrepid.tmpl 1970-01-01 00:00:00 +0000
242+++ VMBuilder/plugins/ec2/templates/51_update-motd-intrepid.tmpl 2009-03-24 16:33:47 +0000
243@@ -0,0 +1,10 @@
244+#!/bin/sh
245+
246+echo "---------------------------------------------------------------------"
247+echo "At the moment, only the core of the system is installed. To tune the "
248+echo "system to your needs, you can choose to install one or more "
249+echo "predefined collections of software by running the following "
250+echo "command: "
251+echo " "
252+echo " sudo tasksel --section server "
253+echo "---------------------------------------------------------------------"
254
255=== added file 'VMBuilder/plugins/ec2/templates/51_update-motd-jaunty.tmpl'
256--- VMBuilder/plugins/ec2/templates/51_update-motd-jaunty.tmpl 1970-01-01 00:00:00 +0000
257+++ VMBuilder/plugins/ec2/templates/51_update-motd-jaunty.tmpl 2009-03-24 16:33:47 +0000
258@@ -0,0 +1,10 @@
259+#!/bin/sh
260+
261+echo "---------------------------------------------------------------------"
262+echo "At the moment, only the core of the system is installed. To tune the "
263+echo "system to your needs, you can choose to install one or more "
264+echo "predefined collections of software by running the following "
265+echo "command: "
266+echo " "
267+echo " sudo tasksel --section server "
268+echo "---------------------------------------------------------------------"
269
270=== added file 'VMBuilder/plugins/ec2/templates/ec2_version.tmpl'
271--- VMBuilder/plugins/ec2/templates/ec2_version.tmpl 1970-01-01 00:00:00 +0000
272+++ VMBuilder/plugins/ec2/templates/ec2_version.tmpl 2009-03-24 16:33:47 +0000
273@@ -0,0 +1,1 @@
274+$version
275
276=== added file 'VMBuilder/plugins/ec2/templates/hvc0.tmpl'
277--- VMBuilder/plugins/ec2/templates/hvc0.tmpl 1970-01-01 00:00:00 +0000
278+++ VMBuilder/plugins/ec2/templates/hvc0.tmpl 2009-03-26 17:13:31 +0000
279@@ -0,0 +1,16 @@
280+# hvc0 - getty
281+#
282+# This service maintains a getty on tty1 from the point the system is
283+# started until it is shut down again.
284+
285+start on stopped rc2
286+start on stopped rc3
287+start on stopped rc4
288+start on stopped rc5
289+
290+stop on runlevel 0
291+stop on runlevel 1
292+stop on runlevel 6
293+
294+respawn
295+exec /sbin/getty 38400 hvc0
296
297=== added file 'VMBuilder/plugins/ec2/templates/sshd_config.tmpl'
298--- VMBuilder/plugins/ec2/templates/sshd_config.tmpl 1970-01-01 00:00:00 +0000
299+++ VMBuilder/plugins/ec2/templates/sshd_config.tmpl 2009-03-24 16:33:47 +0000
300@@ -0,0 +1,77 @@
301+# Package generated configuration file
302+# See the sshd(8) manpage for details
303+
304+# What ports, IPs and protocols we listen for
305+Port 22
306+# Use these options to restrict which interfaces/protocols sshd will bind to
307+#ListenAddress ::
308+#ListenAddress 0.0.0.0
309+Protocol 2
310+# HostKeys for protocol version 2
311+HostKey /etc/ssh/ssh_host_rsa_key
312+HostKey /etc/ssh/ssh_host_dsa_key
313+#Privilege Separation is turned on for security
314+UsePrivilegeSeparation yes
315+
316+# Lifetime and size of ephemeral version 1 server key
317+KeyRegenerationInterval 3600
318+ServerKeyBits 768
319+
320+# Logging
321+SyslogFacility AUTH
322+LogLevel INFO
323+
324+# Authentication:
325+LoginGraceTime 120
326+PermitRootLogin yes
327+StrictModes yes
328+
329+RSAAuthentication yes
330+PubkeyAuthentication yes
331+#AuthorizedKeysFile %h/.ssh/authorized_keys
332+
333+# Don't read the user's ~/.rhosts and ~/.shosts files
334+IgnoreRhosts yes
335+# For this to work you will also need host keys in /etc/ssh_known_hosts
336+RhostsRSAAuthentication no
337+# similar for protocol version 2
338+HostbasedAuthentication no
339+# Uncomment if you don't trust ~/.ssh/known_hosts for RhostsRSAAuthentication
340+#IgnoreUserKnownHosts yes
341+
342+# To enable empty passwords, change to yes (NOT RECOMMENDED)
343+PermitEmptyPasswords no
344+
345+# Change to yes to enable challenge-response passwords (beware issues with
346+# some PAM modules and threads)
347+ChallengeResponseAuthentication no
348+
349+# Change to no to disable tunnelled clear text passwords
350+PasswordAuthentication no
351+
352+# Kerberos options
353+#KerberosAuthentication no
354+#KerberosGetAFSToken no
355+#KerberosOrLocalPasswd yes
356+#KerberosTicketCleanup yes
357+
358+# GSSAPI options
359+#GSSAPIAuthentication no
360+#GSSAPICleanupCredentials yes
361+
362+X11Forwarding yes
363+X11DisplayOffset 10
364+PrintMotd no
365+PrintLastLog yes
366+TCPKeepAlive yes
367+#UseLogin no
368+
369+#MaxStartups 10:30:60
370+#Banner /etc/issue.net
371+
372+# Allow client to pass locale environment variables
373+AcceptEnv LANG LC_*
374+
375+Subsystem sftp /usr/lib/openssh/sftp-server
376+
377+UsePAM yes
378
379=== added file 'VMBuilder/plugins/ec2/templates/sudoers.tmpl'
380--- VMBuilder/plugins/ec2/templates/sudoers.tmpl 1970-01-01 00:00:00 +0000
381+++ VMBuilder/plugins/ec2/templates/sudoers.tmpl 2009-03-24 16:33:47 +0000
382@@ -0,0 +1,23 @@
383+# /etc/sudoers
384+#
385+# This file MUST be edited with the 'visudo' command as root.
386+#
387+# See the man page for details on how to write a sudoers file.
388+#
389+
390+Defaults env_reset
391+
392+# Uncomment to allow members of group sudo to not need a password
393+# %sudo ALL=NOPASSWD: ALL
394+
395+# Host alias specification
396+
397+# User alias specification
398+
399+# Cmnd alias specification
400+
401+# User privilege specification
402+root ALL=(ALL) ALL
403+ubuntu ALL=(ALL) NOPASSWD:ALL
404+
405+# Members of the admin group may gain root privileges
406
407=== removed file 'VMBuilder/plugins/ec2/templates/upstart.tmpl'
408--- VMBuilder/plugins/ec2/templates/upstart.tmpl 2008-11-11 18:28:57 +0000
409+++ VMBuilder/plugins/ec2/templates/upstart.tmpl 1970-01-01 00:00:00 +0000
410@@ -1,16 +0,0 @@
411-# tty1 - getty
412-#
413-# This service maintains a getty on tty1 from the point the system is
414-# started until it is shut down again.
415-
416-start on stopped rc2
417-start on stopped rc3
418-start on stopped rc4
419-start on stopped rc5
420-
421-stop on runlevel 0
422-stop on runlevel 1
423-stop on runlevel 6
424-
425-respawn
426-exec /sbin/getty 38400 xvc0
427
428=== added file 'VMBuilder/plugins/ec2/templates/xen-ld-so-conf.tmpl'
429--- VMBuilder/plugins/ec2/templates/xen-ld-so-conf.tmpl 1970-01-01 00:00:00 +0000
430+++ VMBuilder/plugins/ec2/templates/xen-ld-so-conf.tmpl 2009-03-24 16:33:47 +0000
431@@ -0,0 +1,1 @@
432+hwcap 0 nosegneg
433
434=== added file 'VMBuilder/plugins/ec2/templates/xvc0.tmpl'
435--- VMBuilder/plugins/ec2/templates/xvc0.tmpl 1970-01-01 00:00:00 +0000
436+++ VMBuilder/plugins/ec2/templates/xvc0.tmpl 2009-03-26 17:13:31 +0000
437@@ -0,0 +1,16 @@
438+# xvc0 - getty
439+#
440+# This service maintains a getty on tty1 from the point the system is
441+# started until it is shut down again.
442+
443+start on stopped rc2
444+start on stopped rc3
445+start on stopped rc4
446+start on stopped rc5
447+
448+stop on runlevel 0
449+stop on runlevel 1
450+stop on runlevel 6
451+
452+respawn
453+exec /sbin/getty 38400 xvc0
454
455=== modified file 'VMBuilder/plugins/firstscripts/__init__.py'
456--- VMBuilder/plugins/firstscripts/__init__.py 2008-09-30 13:01:58 +0000
457+++ VMBuilder/plugins/firstscripts/__init__.py 2009-03-24 13:22:36 +0000
458@@ -41,11 +41,17 @@
459
460 if self.vm.firstboot:
461 logging.debug("Checking if firstboot script %s exists" % (self.vm.firstboot,))
462+ if not(os.access(self.vm.firstboot, os.X_OK)):
463+ raise MBuilderUserError("The first-boot script is not executable")
464+
465 if not(os.path.isfile(self.vm.firstboot)):
466 raise VMBuilderUserError('The path to the first-boot script is invalid: %s. Make sure you are providing a full path.' % self.vm.firstboot)
467
468 if self.vm.firstlogin:
469 logging.debug("Checking if first login script %s exists" % (self.vm.firstlogin,))
470+ if not(os.access(self.vm.firstlogin, os.X_OK)):
471+ raise VMBuilderUserError("The first-login script is not executable")
472+
473 if not(os.path.isfile(self.vm.firstlogin)):
474 raise VMBuilderUserError('The path to the first-login script is invalid: %s. Make sure you are providing a full path.' % self.vm.firstlogin)
475
476
477=== modified file 'VMBuilder/plugins/ubuntu/dapper.py'
478--- VMBuilder/plugins/ubuntu/dapper.py 2008-12-16 15:29:50 +0000
479+++ VMBuilder/plugins/ubuntu/dapper.py 2009-03-24 13:30:11 +0000
480@@ -81,6 +81,9 @@
481 logging.debug("Installing ssh keys")
482 self.install_authorized_keys()
483
484+ logging.debug("Install xen kernel")
485+ self.install_xen_kernel()
486+
487 logging.debug("Installing extra packages")
488 self.install_extras()
489
490
491=== modified file 'VMBuilder/plugins/ubuntu/hardy.py'
492--- VMBuilder/plugins/ubuntu/hardy.py 2008-11-06 15:36:18 +0000
493+++ VMBuilder/plugins/ubuntu/hardy.py 2009-03-24 15:28:46 +0000
494@@ -18,13 +18,30 @@
495 # along with this program. If not, see <http://www.gnu.org/licenses/>.
496 #
497 import suite
498+import logging
499+import VMBuilder
500+from VMBuilder.util import run_cmd
501 from VMBuilder.plugins.ubuntu.gutsy import Gutsy
502
503 class Hardy(Gutsy):
504 virtio_net = True
505
506 def xen_kernel_path(self):
507- return '/boot/vmlinuz-2.6.24-19-xen'
508+ rcmd = run_cmd('chroot', self.destdir, 'dpkg', '-S', 'xen')
509+ temp = rcmd[0].split(": ")
510+ xen_kernel = temp[0].split("linux-image-")
511+ path = '/boot/vmlinuz-%s' %xen_kernel
512+ return path
513
514 def xen_ramdisk_path(self):
515- return '/boot/initrd.img-2.6.24-19-xen'
516+ rcmd = run_cmd('chroot', self.destdir, 'dpkg', '-S', 'xen')
517+ temp = rcmd[0].split(": ")
518+ xen_ramdisk = temp[0].split("linux-image-")
519+ path = '/boot/initrd.img-%s' %xen_ramdisk
520+ return path
521+
522+ def install_xen_kernel(self):
523+ import VMBuilder.plugins.xen
524+
525+ if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
526+ self.run_in_target('apt-get', '-y', '--force-yes', 'install', 'linux-image-xen')
527
528=== modified file 'VMBuilder/plugins/ubuntu/intrepid.py'
529--- VMBuilder/plugins/ubuntu/intrepid.py 2009-02-17 14:39:16 +0000
530+++ VMBuilder/plugins/ubuntu/intrepid.py 2009-03-24 15:28:46 +0000
531@@ -35,3 +35,8 @@
532 run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
533 run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
534 run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)
535+ def install_xen_kernel(self):
536+ import VMBuilder.plugins.xen
537+
538+ if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
539+ logging.info('Skipping Xen kernel installation.')
540
541=== modified file 'VMBuilder/plugins/ubuntu/jaunty.py'
542--- VMBuilder/plugins/ubuntu/jaunty.py 2008-12-04 16:27:22 +0000
543+++ VMBuilder/plugins/ubuntu/jaunty.py 2009-03-24 15:28:46 +0000
544@@ -31,3 +31,9 @@
545 run_cmd('sed', '-ie', 's/^# kopt=root=\([^ ]*\)\(.*\)/# kopt=root=UUID=%s\\2/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
546 run_cmd('sed', '-ie', 's/^# groot.*/# groot=%s/g' % bootdev.fs.uuid, '%s/boot/grub/menu.lst' % self.destdir)
547 run_cmd('sed', '-ie', '/^# kopt_2_6/ d', '%s/boot/grub/menu.lst' % self.destdir)
548+
549+ def install_xen_kernel(self):
550+ import VMBuilder.plugins.xen
551+
552+ if isinstance(self.vm.hypervisor, VMBuilder.plugins.xen.Xen):
553+ logging.info('Skipping Xen kernel installation.')
554
555=== modified file 'VMBuilder/plugins/ubuntu/templates/sources.list.tmpl'
556--- VMBuilder/plugins/ubuntu/templates/sources.list.tmpl 2008-11-28 09:59:59 +0000
557+++ VMBuilder/plugins/ubuntu/templates/sources.list.tmpl 2009-03-24 13:15:03 +0000
558@@ -9,7 +9,7 @@
559
560 #if $ppa
561 #for $p in $ppa
562-deb http://ppa.launchpad.net/$p/ubuntu $suite #slurp
563+deb http://ppa.launchpad.net/$p/ppa/ubuntu $suite #slurp
564 #echo ' '.join($components)
565
566 #end for
567
568=== modified file 'debian/control'
569--- debian/control 2008-12-16 13:39:21 +0000
570+++ debian/control 2009-03-24 13:17:11 +0000
571@@ -9,7 +9,7 @@
572
573 Package: python-vm-builder
574 Architecture: all
575-Depends: kvm (>= 1:69) | qemu, debootstrap (>= 1.0.9), parted, kpartx, ubuntu-keyring, ${python:Depends}, python-cheetah, devscripts
576+Depends: kvm (>= 1:69) | qemu, debootstrap (>= 1.0.9), parted, kpartx, ubuntu-keyring, ${python:Depends}, python-cheetah, devscripts, rsync
577 Recommends: python-libvirt
578 XB-Python-Version: ${python:Versions}
579 Description: VM builder
580
581=== modified file 'debian/python-vm-builder-ec2.install'
582--- debian/python-vm-builder-ec2.install 2008-10-20 22:09:39 +0000
583+++ debian/python-vm-builder-ec2.install 2009-03-24 14:03:02 +0000
584@@ -1,1 +1,1 @@
585-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/ec2
586+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/ec2
587
588=== modified file 'debian/python-vm-builder.install'
589--- debian/python-vm-builder.install 2008-10-21 08:14:00 +0000
590+++ debian/python-vm-builder.install 2009-03-24 14:15:32 +0000
591@@ -1,12 +1,12 @@
592 debian/tmp/etc
593 debian/tmp/usr/bin/vmbuilder
594-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/*.py
595-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/*.py
596-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/cli
597-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/firstscripts
598-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/kvm
599-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/libvirt
600-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/postinst
601-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/ubuntu
602-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/xen
603-debian/tmp/usr/lib/python2.5/site-packages/VMBuilder/plugins/vmware
604+debian/tmp/usr/lib/python*/*-packages/VMBuilder/*.py
605+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/*.py
606+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/cli
607+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/firstscripts
608+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/kvm
609+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/libvirt
610+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/postinst
611+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/ubuntu
612+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/xen
613+debian/tmp/usr/lib/python*/*-packages/VMBuilder/plugins/vmware

Subscribers

People subscribed via source and target branches