← Back to team overview

cloud-init-dev team mailing list archive

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

 

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

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

see commit message
-- 
Your team cloud-init commiters is requested to review the proposed merge of ~smoser/cloud-init:ubuntu/bionic-1770712-full-pkg-version into cloud-init:ubuntu/bionic.
diff --git a/debian/changelog b/debian/changelog
index 0989d73..49d7a49 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+cloud-init (18.2-27-g6ef92c98-0ubuntu1~18.04.2) UNRELEASED; urgency=medium
+
+  * debian/rules: update version.version_string to contain packaged version.
+    (LP: #1770712)
+
+ -- Scott Moser <smoser@xxxxxxxxxx>  Mon, 04 Jun 2018 10:10:59 -0400
+
 cloud-init (18.2-27-g6ef92c98-0ubuntu1~18.04.1) bionic; urgency=medium
 
   * debian/control: add missing dependency on iproute2. (LP: #1766711)
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