mirror of
https://github.com/xen-project/xen.git
synced 2026-10-28 18:21:39 +01:00
- Remove version from installed package name, to make "upgrades" work - Add conffiles to manage files in /etc on package install/update/remove - Added in description that this is a .deb for testing only Signed-off-by: Fabio Fantoni <fabio.fantoni@m2r.biz> Acked-by: George Dunlap <george.dunlap@eu.citrix.com> Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com> Acked-by: Ian Jackson <ian.jackson@eu.citrix.com>
60 lines
1.3 KiB
Bash
60 lines
1.3 KiB
Bash
#!/bin/sh
|
|
#
|
|
# mkdeb: package the dist/install output of a Xen build in a .deb
|
|
#
|
|
# Takes 2 arguments, the path to the dist directory and the version
|
|
|
|
set -e
|
|
|
|
if test -z "$1" -o -z "$2" ; then
|
|
echo "usage: $0 path-to-XEN_ROOT xen-version"
|
|
exit 1
|
|
fi
|
|
|
|
cd $1
|
|
version=$2
|
|
if test "$XEN_TARGET_ARCH" = "x86_32"; then
|
|
arch=i386
|
|
else
|
|
arch=amd64
|
|
fi
|
|
|
|
# Prepare the directory to package
|
|
cd dist
|
|
rm -rf deb
|
|
cp -a install deb
|
|
|
|
# Debian doesn't use /usr/lib64 for 64-bit libraries
|
|
if test -d deb/usr/lib64 ; then
|
|
cp -a deb/usr/lib64/* deb/usr/lib/
|
|
rm -rf deb/usr/lib64
|
|
fi
|
|
|
|
# Fill in the debian boilerplate
|
|
mkdir -p deb/DEBIAN
|
|
cat >deb/DEBIAN/control <<EOF
|
|
Package: xen-upstream
|
|
Source: xen-upstream
|
|
Version: $version
|
|
Architecture: $arch
|
|
Maintainer: Unmaintained snapshot
|
|
Section: admin
|
|
Priority: optional
|
|
Installed-Size: $(du -ks deb | cut -f1)
|
|
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
|
|
# Find all /etc files and add them to conffiles
|
|
find deb/etc -type f -printf /etc/%P\\n >deb/DEBIAN/conffiles
|
|
|
|
|
|
# Package it up
|
|
chown -R root:root deb
|
|
dpkg --build deb xen-upstream-$version.deb
|
|
|
|
# Tidy up after ourselves
|
|
rm -rf deb
|