← Back to team overview

cloud-init-dev team mailing list archive

[Merge] ~smoser/cloud-init:ubuntu/devel-1770712-full-pkg-version into cloud-init:ubuntu/devel

 

Scott Moser has proposed merging ~smoser/cloud-init:ubuntu/devel-1770712-full-pkg-version into cloud-init:ubuntu/devel.

Commit message:
debian/rules: update version.version_string to contain packaged version.

This is the debian packaging portion of upstream commit 5446c7881604.

The end result is that we will see the debian package and full upstream
version wherever cloud-init reports its version.

LP: #1770712


Requested reviews:
  cloud-init commiters (cloud-init-dev)
Related bugs:
  Bug #1770712 in cloud-init: "It would be nice if cloud-init provides full version in logs"
  https://bugs.launchpad.net/cloud-init/+bug/1770712

For more details, see:
https://code.launchpad.net/~smoser/cloud-init/+git/cloud-init/+merge/347380

see commit message
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:ubuntu/devel-1770712-full-pkg-version into cloud-init:ubuntu/devel.
diff --git a/debian/changelog b/debian/changelog
index b9cadef..a78aae3 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cloud-init (18.2-59-gcd1de5f4-0ubuntu2) UNRELEASED; urgency=medium
+
+  * debian/rules: update version.version_string to contain packaged version.
+    (LP: #1770712)
+
+ -- Scott Moser <smoser@xxxxxxxxxx>  Mon, 04 Jun 2018 10:00:57 -0400
+
 cloud-init (18.2-59-gcd1de5f4-0ubuntu1) cosmic; urgency=medium
 
   * New upstream snapshot.
diff --git a/debian/rules b/debian/rules
index 3e03fed..c5c873d 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,6 +1,7 @@
 #!/usr/bin/make -f
 INIT_SYSTEM ?= systemd
 export PYBUILD_INSTALL_ARGS=--init-system=$(INIT_SYSTEM)
+DEB_VERSION := $(shell dpkg-parsechangelog --show-field=Version)
 
 %:
 	dh $@ --with python3,systemd --buildsystem pybuild
@@ -21,3 +22,4 @@ override_dh_auto_install:
 	install -D ./tools/Z99-cloud-locale-test.sh debian/cloud-init/etc/profile.d/Z99-cloud-locale-test.sh
 	install -D ./tools/Z99-cloudinit-warnings.sh debian/cloud-init/etc/profile.d/Z99-cloudinit-warnings.sh
 	install -m 0644 -D debian/apport-launcher.py debian/cloud-init/usr/share/apport/package-hooks/cloud-init.py
+	flist=$$(find $(CURDIR)/debian/ -type f -name version.py) && sed -i 's,@@PACKAGED_VERSION@@,$(DEB_VERSION),' $${flist:-did-not-find-version-py-for-replacement}

Follow ups