← Back to team overview

cloud-init-dev team mailing list archive

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

 

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

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/347382

see commit message
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:ubuntu/artful-1770712-full-pkg-version into cloud-init:ubuntu/artful.
diff --git a/debian/changelog b/debian/changelog
index c438253..57c4454 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cloud-init (18.2-4-g05926e48-0ubuntu1~17.10.3) UNRELEASED; urgency=medium
+
+  * debian/rules: update version.version_string to contain packaged version.
+    (LP: #1770712)
+
+ -- Scott Moser <smoser@xxxxxxxxxx>  Mon, 04 Jun 2018 10:14:17 -0400
+
 cloud-init (18.2-4-g05926e48-0ubuntu1~17.10.2) artful-proposed; urgency=medium
 
   * cherry-pick 11172924: IBMCloud: Disable config-drive and nocloud
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