summaryrefslogtreecommitdiff
path: root/packages/brpm
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-09-25 18:12:26 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-09-25 18:12:26 -0700
commit018ec6faa0a9d0c8aa584bae2e0798ed7e3e021a (patch)
treed7a35d2067d1652561acbd6864746bf224708101 /packages/brpm
parentca9251d74a18b47abacff2b63328061b9e484246 (diff)
downloadvyos-cloud-init-018ec6faa0a9d0c8aa584bae2e0798ed7e3e021a.tar.gz
vyos-cloud-init-018ec6faa0a9d0c8aa584bae2e0798ed7e3e021a.zip
Add a top_dir define.
Diffstat (limited to 'packages/brpm')
-rwxr-xr-xpackages/brpm5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/brpm b/packages/brpm
index 3870e188..e344926f 100755
--- a/packages/brpm
+++ b/packages/brpm
@@ -91,7 +91,7 @@ def format_change_line(ds, who, comment=None):
return "* %s" % (d)
-def generate_spec_contents(args, tmpl_fn, arc_fn):
+def generate_spec_contents(args, tmpl_fn, top_dir, arc_fn):
# Figure out the version and revno
cmd = [util.abs_join(find_root(), 'tools', 'read-version')]
@@ -148,6 +148,7 @@ def generate_spec_contents(args, tmpl_fn, arc_fn):
else:
subs['systemd'] = False
+ subs['defines'] = ["_topdir %s" % (top_dir)]
subs['init_sys'] = args.boot
subs['patches'] = [os.path.basename(p) for p in args.patches]
return templater.render_from_file(tmpl_fn, params=subs)
@@ -197,7 +198,7 @@ def main():
# Form the spec file to be used
tmpl_fn = util.abs_join(find_root(), 'packages',
'redhat', 'cloud-init.spec.in')
- contents = generate_spec_contents(args, tmpl_fn,
+ contents = generate_spec_contents(args, tmpl_fn, root_dir,
os.path.basename(archive_fn))
spec_fn = util.abs_join(root_dir, 'cloud-init.spec')
util.write_file(spec_fn, contents)