summaryrefslogtreecommitdiff
path: root/packages/redhat
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/redhat
parenta821cde1722b18ec54279a5fbfb5da96032ef95e (diff)
downloadvyos-cloud-init-2ab8960402677ab66583d56dcb7704369a1256f5.tar.gz
vyos-cloud-init-2ab8960402677ab66583d56dcb7704369a1256f5.zip
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/redhat')
-rw-r--r--packages/redhat/cloud-init.spec.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/redhat/cloud-init.spec.in b/packages/redhat/cloud-init.spec.in
index 91faf3c6..a3a6d1e0 100644
--- a/packages/redhat/cloud-init.spec.in
+++ b/packages/redhat/cloud-init.spec.in
@@ -115,6 +115,13 @@ rm -rf $RPM_BUILD_ROOT%{python_sitelib}/tests
mkdir -p $RPM_BUILD_ROOT/%{_sharedstatedir}/cloud
mkdir -p $RPM_BUILD_ROOT/%{_libexecdir}/%{name}
+# patch in the full version to version.py
+version_pys=$(cd "$RPM_BUILD_ROOT" && find . -name version.py -type f)
+[ -n "$version_pys" ] ||
+ { echo "failed to find 'version.py' to patch with version." 1>&2; exit 1; }
+( cd "$RPM_BUILD_ROOT" &&
+ sed -i "s,@@PACKAGED_VERSION@@,%{version}-%{release}," $version_pys )
+
%clean
rm -rf $RPM_BUILD_ROOT