svn path=/trunk/packages/sipb-xen-base/; revision=882
+sipb-xen-base (8.16) unstable; urgency=low
+
+ * added `mako` program for processing templates in invirt packages
+
+ -- Yang Zhang <y_z@mit.edu> Tue, 12 Aug 2008 16:00:43 -0400
+
sipb-xen-base (8.15) unstable; urgency=low
* put invirt-getconf in /usr/bin
Package: sipb-xen-base
Architecture: all
-Depends: ${misc:Depends}, python-json (>= 3.4-2), python-yaml (>= 3.05)
+Depends: ${misc:Depends}, python-json (>= 3.4-2), python-yaml (>= 3.05), python-mako (>= 0.2.2)
Description: Base configuration required for all SIPB xen servers
This package includes apt configuration, .k5login and other files that
should be synchronized among all our servers.
--- /dev/null
+#!/usr/bin/env python
+
+from sys import argv
+from mako.template import Template
+from invirt.common import with_closing
+
+for inpath in argv:
+ @with_closing(file(splitext(inpath)[0], 'w'))
+ def render(f): print >> f, Template(filename = inpath).render()