>From 49c7a1335efce1c0df766dfac572d37bdada4e59 Mon Sep 17 00:00:00 2001
From: Ian Jackson <ian.jackson@citrix.com>
Date: Wed, 27 Feb 2019 16:37:32 +0000
Subject: [PATCH] /etc/default/xen: Handle with ucf

We reintroduced this file in
  "d/xen-utils-common.install: ship /etc/default/xen"
  eg 2f34db35dd27abb4280d38ebc4464c21f64df8c9

But I had forgotten that this file was previously shipped and handled
by ucf; and we have machinery to try to remove it.

This leaves the following possible cases:
(a) stretch: file handled by ucf
(b) older buster: file not shipped, ucf postinst action not done
   | file remains recorded by ucf and ucfr, but that the original
   | version of the file is no longer present on the user's machine
(c) newer buster: file shipped, file recorded by ucf with one
   old version and as dpkg conffile by newer version

(a) and (b) will be handled correctly by just using ucf in the normal
way.

(c) xxx needs testing

So:
 * Drop the special call to ucf-remove-fixup; retain the call to ucf
 * Switch to shipping the file in /usr/share as expected by ucf
 * Remove the file's entry from not-installed
---
 debian/not-installed            | 1 -
 debian/rules                    | 1 -
 debian/xen-utils-common.install | 2 +-
 3 files changed, 1 insertion(+), 3 deletions(-)

diff --git a/debian/not-installed b/debian/not-installed
index 5ffa447587..7888222c55 100644
--- a/debian/not-installed
+++ b/debian/not-installed
@@ -7,7 +7,6 @@ etc/init.d/xendriverdomain
 etc/init.d/xencommons
 etc/init.d/xen-watchdog
 etc/init.d/xendomains
-etc/default/xencommons
 
 # This is all handled by debian/shuffle-boot-files,
 # which dh_missing does not know about.
diff --git a/debian/rules b/debian/rules
index 4d3ff89219..23c982eb41 100755
--- a/debian/rules
+++ b/debian/rules
@@ -320,4 +320,3 @@ override_dh_missing:
 # earlier versions.  See ./ucf-remove-fixup for more details.
 override_dh_ucf:
 	dh_ucf
-	debian/ucf-remove-fixup xen-utils-common /etc/default/xen
diff --git a/debian/xen-utils-common.install b/debian/xen-utils-common.install
index 60642c9a9c..71254213bc 100755
--- a/debian/xen-utils-common.install
+++ b/debian/xen-utils-common.install
@@ -5,7 +5,7 @@ etc/xen/xl*
 etc/bash_completion.d/xl.sh => usr/share/bash-completion/completions/xl
 
 etc/default/xendomains
-etc/default/xencommons => /etc/default/xen
+etc/default/xencommons => usr/share/xen-utils-common/default.xen
 etc/xen/oxenstored.conf
 
 usr/bin
-- 
2.11.0

