Get the new builddeb working and fix the rules file

This commit is contained in:
Joshua Harlow 2012-06-25 21:51:36 -07:00
parent bcc896deae
commit 832c511e0f
2 changed files with 13 additions and 3 deletions

View File

@ -15,7 +15,8 @@ def tmpdir():
try:
yield t
finally:
shutil.rmtree(t)
pass
#shutil.rmtree(t)
def join(*paths):
@ -56,6 +57,10 @@ def archive_code():
def main():
# cmd = ['apt-get', 'install', 'python-nose',
#'pyflakes', 'python-mocker', 'cdbs', 'debhelper']
# tiny_p(cmd)
with tmpdir() as td:
(revno, version, bname, archive_fn) = archive_code()
real_archive_fn = os.path.join(td, os.path.basename(archive_fn))
@ -68,12 +73,18 @@ def main():
edir = join(td, bname)
shutil.move(edir, join(td, 'cloud-init'))
shutil.copytree('debian.trunk', join(td, 'cloud-init', 'debian'))
cmd = ['sed', '-i', '-e',"s,VERSION,%s," %(version),
'-e', "s,REVNO,bzr%s," % (revno),
join(td, 'cloud-init', 'debian', 'changelog')]
tiny_p(cmd)
# Seems to want an original tar ball
o_tar = "cloud-init_%s~bzr%s.orig.tar.gz" % (version, revno)
cmd = ['tar', '-czf', join(td, o_tar), '-C', join(td, 'cloud-init')]
cmd.extend(os.listdir(join(td, 'cloud-init')))
tiny_p(cmd)
ocwd = os.getcwd()
os.chdir(join(td, 'cloud-init'))
cmd = ['debuild']

View File

@ -10,7 +10,6 @@ include /usr/share/cdbs/1/class/python-distutils.mk
DEB_DH_INSTALL_SOURCEDIR := debian/tmp
cloud-init-fixups:
for x in $(DEB_DESTDIR)/usr/bin/*.py; do mv "$$x" "$${x%.py}"; done
install -d $(DEB_DESTDIR)/etc/rsyslog.d
cp tools/21-cloudinit.conf $(DEB_DESTDIR)/etc/rsyslog.d/21-cloudinit.conf