tools: Improve make deb
PATCH v3 1/1 tools: Improve make deb
From: Fabio Fantoni <[email protected]>
- Remove version from installed package name for correct update
- Add conffiles to manage main config files on package update
- Add/remove/stop of main services (xencommons, xendomains)
- Added on description that this make a build for testing only.
Changes from v2:
- Improved description.
- Improved add/remove of main service and added the stop.
--- tools/misc/mkdeb | 39 +++++++++++++++++++++++++++++++++------ 1 file changed, 33 insertions(+), 6 deletions(-)
tools/misc/mkdeb +33 -6
@@ -33,7 +33,7 @@ fi # Fill in the debian boilerplate mkdir -p deb/DEBIAN cat >deb/DEBIAN/control <<EOF -Package: xen-upstream-$version +Package: xen-upstream Source: xen-upstream Version: $version Architecture: $arch
@@ -41,15 +41,42 @@ Maintainer: Unmaintained snapshot Section: admin Priority: optional Installed-Size: $(du -ks deb | cut -f1) -Description: Xen hypervisor and tools, version $version - This package contains the Xen hypervisor and associated tools, built - from a source tree. It is not a fully packaged and supported Xen, just - the output of a xen "make dist" wrapped in a .deb to make it easy to - uninstall. +Description: Xen upstream testing build snapshot + Warning: This is a custom testing build of Xen; it is not an + officially supported Debian package. Please not distribute. + It is just the output of a xen "make dist" wrapped in a .deb + to make it easy to update and uninstall. +EOF +cat >deb/DEBIAN/conffiles <<EOF +/etc/xen/xl.conf +/etc/xen/xend-config.sxp +/etc/default/xendomains +/etc/default/xencommons +EOF +cat >deb/DEBIAN/postinst <<EOF +#!/bin/bash +set -e +update-rc.d xencommons defaults >/dev/null +update-rc.d xendomains defaults >/dev/null +EOF +cat >deb/DEBIAN/prerm <<EOF +#!/bin/bash +set -e +invoke-rc.d xendomains stop || exit $? +invoke-rc.d xencommons stop || exit $? +EOF +cat >deb/DEBIAN/postrm <<EOF +#!/bin/bash +set -e +update-rc.d xendomains remove >/dev/null +update-rc.d xencommons remove >/dev/null EOF # Package it up chown -R root:root deb +chmod +x deb/DEBIAN/postinst +chmod +x deb/DEBIAN/prerm +chmod +x deb/DEBIAN/postrm dpkg --build deb xen-upstream-$version.deb # Tidy up after ourselves
Signature · 1 line
1.7.9.5
[email protected] writes ("[PATCH v3] tools: Improve make deb"):
Quoted 10 lines
From: Fabio Fantoni <[email protected]>
- Remove version from installed package name for correct update
- Add conffiles to manage main config files on package update
- Add/remove/stop of main services (xencommons, xendomains)
- Added on description that this make a build for testing only.Changes from v2:
- Improved description.
- Improved add/remove of main service and added the stop.
Um,
We're still discussing this, but I think we have rough agreement that this isn't the right way forward. We certainly don't want our debball target to start and stop daemons.
Thanks,
Ian.