summaryrefslogtreecommitdiff
path: root/packages/suse/cloud-init.spec.in
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2018-05-23 14:41:11 -0400
committerScott Moser <smoser@brickies.net>2018-05-23 14:41:11 -0400
commit2ab8960402677ab66583d56dcb7704369a1256f5 (patch)
treeddbd76c22add1121a81cfdccc418b21eefe4bc59 /packages/suse/cloud-init.spec.in
parenta821cde1722b18ec54279a5fbfb5da96032ef95e (diff)
downloadcloud-init-git-2ab8960402677ab66583d56dcb7704369a1256f5.tar.gz
packages: Make rpm spec files patch in package version like in debs.
This makes the necessary changes to patch the full packaged version into the trunk maintained redhat and suse spec files.
Diffstat (limited to 'packages/suse/cloud-init.spec.in')
-rw-r--r--packages/suse/cloud-init.spec.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/suse/cloud-init.spec.in b/packages/suse/cloud-init.spec.in
index bbb965a7..366a78c5 100644
--- a/packages/suse/cloud-init.spec.in
+++ b/packages/suse/cloud-init.spec.in
@@ -102,6 +102,13 @@ done
mkdir -p %{buildroot}/var/lib/cloud
+# patch in the full version to version.py
+version_pys=$(cd "%{buildroot}" && find . -name version.py -type f)
+[ -n "$version_pys" ] ||
+ { echo "failed to find 'version.py' to patch with version." 1>&2; exit 1; }
+( cd "%{buildroot}" &&
+ sed -i "s,@@PACKAGED_VERSION@@,%{version}-%{release}," $version_pys )
+
%postun
%insserv_cleanup