Comment 1 for bug 1999159

Revision history for this message
Chad Smith (chad.smith) wrote (last edit ):

In discussion with @vorlon. general sentiment for making debhelper compat version changes in stable releases is a no-no because of this type of bug being introduced by automated debhelper injected content in the binary package. In order to verify that we don't have a potential to regress something else by moving back from debhelper-compat 10 to debhelper-compat 9 we need to also analyze a diff of any debian control files that are automatically generated.

the diff of such control files is here and obtained by the following procedure.

```
lxc launch ubuntu-dev-tools sru-f;
lxc exec sru-f bash
$ apt install ubuntu-dev-tools -y;
$ pull-lp-debs cloud-init 22.4.2-0ubuntu0~20.04.1;
$ add-apt-repository ppa:chad.smith/cloud-init-uploads -y;
$ pull-ppa-debs ppa:chad.smith/cloud-init-uploads cloud-init 22.4.2-0ubuntu0~20.04.2

$ dpkg-deb -R cloud-init_22.4.2-0ubuntu0~20.04.1_all.deb 20.04.1
$ dpkg-deb -R cloud-init_22.4.2-0ubuntu0~20.04.2_all.deb 20.04.2
$ diff -urN 20.04.1 20.04.2 | pastebinit
```

Resulting pastebin of that effort on focal:

https://paste.ubuntu.com/p/pCWx2tCNVq/

Analysis on the potential downgrade exposure paths for debhelper compat 10 back to 9 to ensure no dragons lurk in the debhelper compat downgrade path for any control scripts.

== debian/control
 version changes and a Installed Size increase
 -Version: 22.4.2-0ubuntu0~20.04.1
+Version: 22.4.2-0ubuntu0~20.04.2

== DEBIAN/md5sums deltas:
   usr/lib/python3/dist-packages/cloudinit/version.py # changed due to .2 vs .1 in pkg'd version string
   usr/share/doc/cloud-init/changelog.Debian.gz

== DEBIAN/postinst
-- postinst.1 dropped the try-restart section which caused the original restart of services across package upgrade here when we moved to debhelper-compat 10

-# Automatically added by dh_systemd_start/12.10ubuntu1
-if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
- if [ -d /run/systemd/system ]; then
- systemctl --system daemon-reload >/dev/null || true
- if [ -n "$2" ]; then
- deb-systemd-invoke try-restart 'cloud-config.service' 'cloud-config.target' 'cloud-final.service' 'cloud-init-hotplugd.service' 'cloud-init-hotplugd.socket' 'cloud-init-local.service' 'cloud-init.service' 'cloud-init.target' >/dev/null || true
- fi
- fi
-fi

-- postinst.2: identical dh_python3 section is a little earlier in the file in deb compat level 9

+
+# Automatically added by dh_python3:
+if which py3compile >/dev/null 2>&1; then
+ py3compile -p cloud-init
+fi
+if which pypy3compile >/dev/null 2>&1; then
+ pypy3compile -p cloud-init || true
+fi
+
+# End automatically added section

-- postinst.3: remove escaping of tilde '\~' in all rm_conffile lines in debhelper-compat when moving back to compat level 9

compat lvl 10: dpkg-maintscript-helper rm_conffile /etc/init/cloud-config.conf 0.7.9-243-ge74d775-0ubuntu2\~ -- "$@"

compat lvl 9: dpkg-maintscript-helper rm_conffile /etc/init/cloud-config.conf 0.7.9-243-ge74d775-0ubuntu2~ -- "$@"

--- postinst.4: Additional bookend comments around each rm_conffile line

+# Automatically added by dh_installdeb/12.10ubuntu1
..... rm_conffile
+# End automatically added section

== DEBIAN/postrm and preinst and prerm
--- 1: Additional bookend comments around each rm_conffile line
--- 2: Drop the escaping of tilde '\~' for each rm_conffile line