Move grub config into xen-utils-common
authorHans van Kranenburg <hans@knorrie.org>
Sun, 17 Dec 2017 16:42:59 +0000 (17:42 +0100)
committerHans van Kranenburg <hans@knorrie.org>
Wed, 20 Dec 2017 21:11:48 +0000 (22:11 +0100)
The grub config snippet is not arch dependent, neither version
dependent, so it has to move into a 'common' package.

The packages with a version number in their name only have contents that
do not conflict with a previous or next version. Having this file in the
version dependent xen-hypervisor package currently prevents us from
being able to co-install the current and next version of Xen.

So, I can do this here for new packages in unstable but that will only
fix upgrades from xen 4.9 to 4.10. The same change still needs to go
into a stable update to solve the problem for upgrades from Stretch to
Buster.

Also see https://bugs.debian.org/852545

debian/rules.real
debian/templates/control.hypervisor.in
debian/templates/control.main.in
debian/tree/xen-utils-common/etc/default/grub.d/xen.cfg [new file with mode: 0644]
debian/xen-hypervisor-4.8.xen.cfg [deleted file]

index 1ed72005b278c017aaa7ac7e97a3f9ca201b4a38..a617cefa4020cb3c539394bf0a556cd14c731559 100644 (file)
@@ -159,10 +159,6 @@ install-hypervisor_$(ARCH)_$(FLAVOUR): $(STAMPS_DIR)/build-hypervisor_$(ARCH)_$(
        dh_testroot
        dh_prep
        dh_installdirs boot
-       # FIXME: Think of better solution (grub used for other arches?)
-       dh_installdirs etc/default/grub.d
-       install -D -m644 debian/xen-hypervisor-$(VERSION).xen.cfg \
-               debian/$(PACKAGE_NAME)/etc/default/grub.d/xen.cfg
        dh_install debian/templates/xen-hypervisor.bug/* usr/share/bug/$(PACKAGE_NAME)
        cp $(DIR)/xen/xen$(IMAGE_SUFFIX) debian/$(PACKAGE_NAME)/boot/xen-$(VERSION)-$(FLAVOUR)$(IMAGE_SUFFIX)
 ifeq ($(ARCH),amd64)
index 51a47f100d2e544be0db8d04a9677352192a81d8..e7ca119c81c2f4507b12247978465c08e386eb5e 100644 (file)
@@ -1,5 +1,6 @@
 Package: xen-hypervisor-@version@@localversion@
 Depends: ${misc:Depends}
+Breaks: xen-utils-common (<< 4.8.3~)
 Provides: xen-hypervisor, xen-hypervisor-@version@, xen-hypervisor@localversion@
 Recommends: xen-utils-@version@
 Description: Xen Hypervisor on @class@
index 94f6e49814d91e1e0e89f606b76a13fe66a72a2e..edb05408ed12380f792e06a71750d86e44e71a76 100644 (file)
@@ -53,6 +53,8 @@ Description: Xenstore command line utilities for Xen
 Package: xen-utils-common
 Architecture: all
 Depends: lsb-base, python, udev, xenstore-utils, ${misc:Depends}
+Replaces: xen-hypervisor-4.8-amd64 (<< 4.8.3~), xen-hypervisor-4.8-arm64 (<< 4.8.3~), xen-hypervisor-4.8-armhf (<< 4.8.3~)
+Breaks: xen-hypervisor-4.8-amd64 (<< 4.8.3~), xen-hypervisor-4.8-arm64 (<< 4.8.3~), xen-hypervisor-4.8-armhf (<< 4.8.3~)
 Description: Xen administrative tools - common files
  The userspace tools to manage a system virtualized through the Xen virtual
  machine monitor.
diff --git a/debian/tree/xen-utils-common/etc/default/grub.d/xen.cfg b/debian/tree/xen-utils-common/etc/default/grub.d/xen.cfg
new file mode 100644 (file)
index 0000000..b2d2f6e
--- /dev/null
@@ -0,0 +1,54 @@
+#
+# Uncomment the following variable and set to 0 or 1 to avoid warning.
+#
+#XEN_OVERRIDE_GRUB_DEFAULT=0
+
+echo "Including Xen overrides from /etc/default/grub.d/xen.cfg"
+
+#
+# When running update-grub with the Xen hypervisor installed, there are
+# some additional variables that can be used to pass options to the
+# hypervisor or the dom0 kernel.
+
+# The following two are used to generate arguments for the hypervisor:
+#
+#GRUB_CMDLINE_XEN_DEFAULT=""
+#GRUB_CMDLINE_XEN=""
+#
+# For example:
+#
+# dom0_mem=<size>[M]:max=<size>[M]
+#   Sets the amount of memory dom0 uses (max prevents balloning for more)
+# com[12]=<speed>,<data bits><parity><stopbits>
+#   Initialize a serial console from in the hypervisor (eg. 115200,8n1)
+#   Note that com1 would be ttyS0 in Linux.
+# console=<dev>[,<dev> ...]
+#   Redirects Xen hypervisor console (eg. com1,vga)
+
+#
+# The next two lines are used for creating kernel arguments for the dom0
+# kernel. This allows to have different options for the same kernel used
+# natively or as dom0 kernel.
+#
+#GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT"
+#GRUB_CMDLINE_LINUX_XEN_REPLACE="$GRUB_CMDLINE_LINUX"
+#
+# For example:
+#
+# earlyprintk=xenboot
+#   Allows to send early printk messages to the Xen hypervisor console
+# console=hvc0
+#   Redirects the Linux console to the hypervisor console
+
+#
+# Make booting into Xen the default if not changed above. Finding the
+# current string for it always has been a problem.
+#
+if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "" ]; then
+       echo "WARNING: GRUB_DEFAULT changed to boot into Xen by default!"
+       echo "         Edit /etc/default/grub.d/xen.cfg to avoid this warning."
+       XEN_OVERRIDE_GRUB_DEFAULT=1
+fi
+if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then
+       GRUB_DEFAULT="Debian GNU/Linux, with Xen hypervisor"
+fi
diff --git a/debian/xen-hypervisor-4.8.xen.cfg b/debian/xen-hypervisor-4.8.xen.cfg
deleted file mode 100644 (file)
index b2d2f6e..0000000
+++ /dev/null
@@ -1,54 +0,0 @@
-#
-# Uncomment the following variable and set to 0 or 1 to avoid warning.
-#
-#XEN_OVERRIDE_GRUB_DEFAULT=0
-
-echo "Including Xen overrides from /etc/default/grub.d/xen.cfg"
-
-#
-# When running update-grub with the Xen hypervisor installed, there are
-# some additional variables that can be used to pass options to the
-# hypervisor or the dom0 kernel.
-
-# The following two are used to generate arguments for the hypervisor:
-#
-#GRUB_CMDLINE_XEN_DEFAULT=""
-#GRUB_CMDLINE_XEN=""
-#
-# For example:
-#
-# dom0_mem=<size>[M]:max=<size>[M]
-#   Sets the amount of memory dom0 uses (max prevents balloning for more)
-# com[12]=<speed>,<data bits><parity><stopbits>
-#   Initialize a serial console from in the hypervisor (eg. 115200,8n1)
-#   Note that com1 would be ttyS0 in Linux.
-# console=<dev>[,<dev> ...]
-#   Redirects Xen hypervisor console (eg. com1,vga)
-
-#
-# The next two lines are used for creating kernel arguments for the dom0
-# kernel. This allows to have different options for the same kernel used
-# natively or as dom0 kernel.
-#
-#GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="$GRUB_CMDLINE_LINUX_DEFAULT"
-#GRUB_CMDLINE_LINUX_XEN_REPLACE="$GRUB_CMDLINE_LINUX"
-#
-# For example:
-#
-# earlyprintk=xenboot
-#   Allows to send early printk messages to the Xen hypervisor console
-# console=hvc0
-#   Redirects the Linux console to the hypervisor console
-
-#
-# Make booting into Xen the default if not changed above. Finding the
-# current string for it always has been a problem.
-#
-if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "" ]; then
-       echo "WARNING: GRUB_DEFAULT changed to boot into Xen by default!"
-       echo "         Edit /etc/default/grub.d/xen.cfg to avoid this warning."
-       XEN_OVERRIDE_GRUB_DEFAULT=1
-fi
-if [ "$XEN_OVERRIDE_GRUB_DEFAULT" = "1" ]; then
-       GRUB_DEFAULT="Debian GNU/Linux, with Xen hypervisor"
-fi