From: Yang Zhang Date: Tue, 12 Aug 2008 20:01:45 +0000 (-0400) Subject: * added `mako` program for processing templates in invirt packages X-Git-Tag: sipb-xen-base/8.17~3 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-base.git/commitdiff_plain/39e68aef3d431f5479cc601152d80d8016e066dd * added `mako` program for processing templates in invirt packages svn path=/trunk/packages/sipb-xen-base/; revision=882 --- diff --git a/debian/changelog b/debian/changelog index 105376b..d90eab5 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-base (8.16) unstable; urgency=low + + * added `mako` program for processing templates in invirt packages + + -- Yang Zhang Tue, 12 Aug 2008 16:00:43 -0400 + sipb-xen-base (8.15) unstable; urgency=low * put invirt-getconf in /usr/bin diff --git a/debian/control b/debian/control index 59fea99..bf21250 100644 --- a/debian/control +++ b/debian/control @@ -7,7 +7,7 @@ Standards-Version: 3.7.2 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. diff --git a/files/usr/bin/mako b/files/usr/bin/mako new file mode 100755 index 0000000..f83af5b --- /dev/null +++ b/files/usr/bin/mako @@ -0,0 +1,9 @@ +#!/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()