diff options
Diffstat (limited to 'packages')
-rwxr-xr-x | packages/brpm | 9 | ||||
-rw-r--r-- | packages/redhat/cloud-init.spec.in | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/packages/brpm b/packages/brpm index 14d75f2b..89696ab8 100755 --- a/packages/brpm +++ b/packages/brpm @@ -90,6 +90,15 @@ def generate_spec_contents(args, version_data, tmpl_fn, top_dir, arc_fn): subs['source_name'] = os.path.basename(arc_fn).replace('.tar.gz', '') subs.update(version_data) + # rpm does not like '-' in the Version, so change + # X.Y.Z-N-gHASH to X.Y.Z+N.gHASH + if "-" in version_data.get('version'): + ver, commits, ghash = version_data['version'].split("-") + rpm_upstream_version = "%s+%s.%s" % (ver, commits, ghash) + else: + rpm_upstream_version = version_data['version'] + subs['rpm_upstream_version'] = rpm_upstream_version + # Map to known packages python_deps = read_dependencies() package_deps = translate_dependencies(python_deps, args.distro) diff --git a/packages/redhat/cloud-init.spec.in b/packages/redhat/cloud-init.spec.in index 2f02f017..d0ae048f 100644 --- a/packages/redhat/cloud-init.spec.in +++ b/packages/redhat/cloud-init.spec.in @@ -6,7 +6,7 @@ # Or: http://www.rpm.org/max-rpm/ch-rpm-inside.html Name: cloud-init -Version: ${version_long} +Version: ${rpm_upstream_version} Release: 1${subrelease}%{?dist} Summary: Cloud instance init scripts |