From 39e68aef3d431f5479cc601152d80d8016e066dd Mon Sep 17 00:00:00 2001 From: Yang Zhang Date: Tue, 12 Aug 2008 16:01:45 -0400 Subject: [PATCH] * added `mako` program for processing templates in invirt packages svn path=/trunk/packages/sipb-xen-base/; revision=882 --- debian/changelog | 6 ++++++ debian/control | 2 +- files/usr/bin/mako | 9 +++++++++ 3 files changed, 16 insertions(+), 1 deletion(-) create mode 100755 files/usr/bin/mako 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() -- 1.7.9.5