Hi, On 5/26/20 12:44 PM, Ian Jackson wrote: > Hans van Kranenburg writes ("[PATCH 2/2] debian/rules: --no-start for xen > dh_installinit"): >> When debugging the xen-utils postinst/prerm to find the cause of the >> mysteriously disappearing xenconsoled processes, I discovered that the >> xen-utils-common postinst and prerm stop and start the xen init script >> as well! >> >> These commands are not visible in the packaging code, but they are added >> by dh_installdeb into the postinst and prerm during package build time. >> >> We only want to call the script from xen-utils-V, so disable this >> behavior by using --no-start >> >> Closes: #932759 (2/2) >> Signed-off-by: Hans van Kranenburg <h...@knorrie.org> > > Reviewed-by: Ian Jackson <ijack...@chiark.greenend.org.uk>
Thanks. > I think it would be wise to look at the generated .debs and see that > they contain (only) the expected pieces in their maintscripts. Yes, I did this while testing by diffing the files installed in /var/lib/dpkg/info with the old ones and verifying that exactly that part went away. (for 4.11:) -$ diff -u ~/xen-utils-common.postinst xen-utils-common.postinst --- /home/beheer/xen-utils-common.postinst 2020-05-26 13:08:45.738926207 +0200 +++ xen-utils-common.postinst 2020-05-25 14:14:28.000000000 +0200 @@ -31,13 +31,7 @@ # Automatically added by dh_installinit/13.1 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then if [ -x "/etc/init.d/xen" ]; then - update-rc.d xen defaults 20 21 >/dev/null - if [ -n "$2" ]; then - _dh_action=restart - else - _dh_action=start - fi - invoke-rc.d xen $_dh_action || exit 1 + update-rc.d xen defaults 20 21 >/dev/null || exit 1 fi fi # End automatically added section -$ diff -u ~/xen-utils-common.prerm xen-utils-common.prerm --- /home/beheer/xen-utils-common.prerm 2020-05-26 13:09:01.570617331 +0200 +++ xen-utils-common.prerm 2020-05-25 14:14:28.000000000 +0200 @@ -1,10 +1,5 @@ #!/bin/sh set -e -# Automatically added by dh_installinit/13.1 -if [ -x "/etc/init.d/xen" ] && [ "$1" = remove ]; then - invoke-rc.d xen stop || exit 1 -fi -# End automatically added section # Automatically added by dh_installdeb/13.1 dpkg-maintscript-helper rm_conffile /etc/default/xend 4.11.1-2\~ -- "$@" dpkg-maintscript-helper rm_conffile /etc/xen/xend-config.sxp 4.11.1-2\~ -- "$@" Hans