diff options
Diffstat (limited to 'tools/gator/debian')
-rw-r--r-- | tools/gator/debian/changelog | 128 | ||||
-rw-r--r-- | tools/gator/debian/compat | 1 | ||||
-rw-r--r-- | tools/gator/debian/control | 38 | ||||
-rw-r--r-- | tools/gator/debian/copyright | 15 | ||||
-rw-r--r-- | tools/gator/debian/dkms.conf.in | 7 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.install | 1 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.postrm | 41 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.preinst | 36 | ||||
-rw-r--r-- | tools/gator/debian/gator-daemon.upstart | 10 | ||||
-rwxr-xr-x | tools/gator/debian/gator-module-dkms.install.in | 2 | ||||
-rwxr-xr-x | tools/gator/debian/gator-module-dkms.postinst | 49 | ||||
-rwxr-xr-x | tools/gator/debian/gator-module-dkms.prerm | 29 | ||||
-rwxr-xr-x | tools/gator/debian/rules | 15 | ||||
-rwxr-xr-x | tools/gator/debian/scripts/do-packaging | 104 |
14 files changed, 476 insertions, 0 deletions
diff --git a/tools/gator/debian/changelog b/tools/gator/debian/changelog new file mode 100644 index 00000000000..ba76cd4a897 --- /dev/null +++ b/tools/gator/debian/changelog @@ -0,0 +1,128 @@ +gator (5.14.0) quantal; urgency=low + + * New release from ARM. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 3 Apr 2013 14:34:18 +0100 + +gator (5.13.0) quantal; urgency=low + + * New release from ARM. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Mon, 14 Jan 2013 10:04:42 +0000 + +gator (5.12.0) precise; urgency=low + + * New release from ARM. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 24 Oct 2012 17:08:17 +0000 + +gator (5.11.0) precise; urgency=low + + * New release from ARM. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Fri, 10 Aug 2012 14:34:23 +0000 + +gator (5.10.1) precise; urgency=low + + * Add gator-module-dkms package. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Mon, 21 May 2012 15:59:10 +0000 + +gator (5.10.0) precise; urgency=low + + * New release from ARM. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Thu, 10 May 2012 16:47:32 +0000 + +gator (5.9.7) precise; urgency=low + + * New source and binary package layout with automated packaging scripts. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 2 May 2012 17:01:18 +0000 + +gator-daemon (5.9-6) precise; urgency=low + + * Remove Depends: gator-module* as Linaro kernels should + now all contain the required module. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 25 Apr 2012 18:06:28 +0000 + +gator-daemon (5.9-5) precise; urgency=low + + * Move to armhf and Precise + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 25 Apr 2012 10:16:00 +0000 + +gator-daemon (5.9-4) oneiric; urgency=low + + * Add alternative Depends on gator-module-in-tree. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Fri, 16 Mar 2012 18:24:27 +0000 + +gator-daemon (5.9-3) oneiric; urgency=low + + * Add missing build depends: 'quilt'. + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Thu, 23 Feb 2012 13:59:08 +0000 + +gator-daemon (5.9-2) oneiric; urgency=low + + [ Wade Cherry ] + * Fix counters initialisation + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Thu, 23 Feb 2012 12:06:33 +0000 + +gator-daemon (5.9-1) oneiric; urgency=low + + * New upstream release (DS-5.9) + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Mon, 20 Feb 2012 10:35:47 +0000 + +gator-daemon (5.9~rc1-1) oneiric; urgency=low + + * New upstream release (DS-5.9) + + -- Jon Medhurst (Tixy) <jon.medhurst@linaro.org> Wed, 15 Feb 2012 14:38:26 +0000 + +gator-daemon (5.8-1) oneiric; urgency=low + + * New upstream release + + -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Fri, 25 Nov 2011 12:41:57 -0200 + +gator-daemon (5.8~rc2-1) oneiric; urgency=low + + * New upstream version (DS-5.8~rc2) + + -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Wed, 16 Nov 2011 15:30:07 -0200 + +gator-daemon (5.7-2) natty; urgency=low + + * Package now depends on the new gator-module meta package + + -- Ricardo Salveti de Araujo <ricardo.salveti@linaro.org> Mon, 10 Oct 2011 23:39:34 -0300 + +gator-daemon (5.7-1) natty; urgency=low + + * Updated to DS-5.7 release + * Added sources (GPLv2) + + -- Pawel Moll <pawel.moll@arm.com> Fri, 30 Sep 2011 16:02:05 +0100 + +gator-daemon (5.6-2) natty; urgency=low + + * Added dependency on 5.6 version of the gator-module[-dkms] + + -- Pawel Moll <pawel.moll@arm.com> Tue, 13 Sep 2011 15:59:37 +0100 + +gator-daemon (5.6-1) natty; urgency=low + + * Updated to DS-5.6 release + + -- Pawel Moll <pawel.moll@arm.com> Wed, 03 Aug 2011 11:54:40 +0100 + +gator-daemon (5.5-1) natty; urgency=low + + * Initial release + + -- Pawel Moll <pawel.moll@arm.com> Mon, 06 Jun 2011 18:42:31 +0100 diff --git a/tools/gator/debian/compat b/tools/gator/debian/compat new file mode 100644 index 00000000000..45a4fb75db8 --- /dev/null +++ b/tools/gator/debian/compat @@ -0,0 +1 @@ +8 diff --git a/tools/gator/debian/control b/tools/gator/debian/control new file mode 100644 index 00000000000..f20a736e5e7 --- /dev/null +++ b/tools/gator/debian/control @@ -0,0 +1,38 @@ +Source: gator +Section: devel +Priority: extra +Maintainer: Pawel Moll <pawel.moll@arm.com> +Build-Depends: debhelper (>= 7.0.5), vim-common +Standards-Version: 3.9.2 +Homepage: http://www.arm.com/ds-5 + +Package: gator +Architecture: armhf +Depends: ${misc:Depends}, gator-daemon (>= 5.9.0) +Description: ARM Streamline gator + This meta-package depends on gator target packages required to use + ARM Streamline Performance Analyzer. + +Package: gator-daemon +Architecture: armhf +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: ARM Streamline gator daemon + The target-side daemon gathering data for ARM Streamline + Performance Analyzer. + +Package: arm-ds5-target +Architecture: armhf +Depends: ${misc:Depends}, gdbserver (>= 6.8), openssh-server | ssh-server, gator (>= 5.9.0) +Description: ARM DS-5 target dependencies + This meta-package depends on all components required to receive + full ARM DS-5 experience. + +Package: gator-module-dkms +Architecture: armhf +Section: kernel +Depends: ${misc:Depends}, dkms (>= 1.95), make +Description: ARM Streamline gator module - dkms version + The target-side kernel module gathering data for ARM Streamline + Performance Analyzer. + . + This package contains the source to be built with dkms. diff --git a/tools/gator/debian/copyright b/tools/gator/debian/copyright new file mode 100644 index 00000000000..3ed568c02e8 --- /dev/null +++ b/tools/gator/debian/copyright @@ -0,0 +1,15 @@ +Files: * +Copyright: 2010-2012 ARM Ltd. +License: GPL-2 + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License. + . + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + . + You should have received a copy of the GNU General Public License + with your system, in /usr/share/common-licenses/GPL-2. If not, see + <http://www.gnu.org/licenses/>. diff --git a/tools/gator/debian/dkms.conf.in b/tools/gator/debian/dkms.conf.in new file mode 100644 index 00000000000..5cb51e58a5e --- /dev/null +++ b/tools/gator/debian/dkms.conf.in @@ -0,0 +1,7 @@ +PACKAGE_NAME="gator-module" +PACKAGE_VERSION="__VERSION__" +MAKE[0]="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build" +CLEAN="make -C ${kernel_source_dir} M=${dkms_tree}/${PACKAGE_NAME}/${PACKAGE_VERSION}/build clean" +BUILT_MODULE_NAME[0]="gator" +DEST_MODULE_LOCATION[0]="/extra" +AUTOINSTALL=yes diff --git a/tools/gator/debian/gator-daemon.install b/tools/gator/debian/gator-daemon.install new file mode 100644 index 00000000000..7b0d218c425 --- /dev/null +++ b/tools/gator/debian/gator-daemon.install @@ -0,0 +1 @@ +daemon/gatord /usr/sbin/ diff --git a/tools/gator/debian/gator-daemon.postrm b/tools/gator/debian/gator-daemon.postrm new file mode 100644 index 00000000000..97518f4e1a1 --- /dev/null +++ b/tools/gator/debian/gator-daemon.postrm @@ -0,0 +1,41 @@ +#!/bin/sh +# postrm script for gator-daemon +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <postrm> `remove' +# * <postrm> `purge' +# * <old-postrm> `upgrade' <new-version> +# * <new-postrm> `failed-upgrade' <old-version> +# * <new-postrm> `abort-install' +# * <new-postrm> `abort-install' <old-version> +# * <new-postrm> `abort-upgrade' <old-version> +# * <disappearer's-postrm> `disappear' <overwriter> +# <overwriter-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + purge) + rm -rf /var/lib/gatord/ + ;; + + remove|upgrade|failed-upgrade|abort-install|abort-upgrade|disappear) + ;; + + *) + echo "postrm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/tools/gator/debian/gator-daemon.preinst b/tools/gator/debian/gator-daemon.preinst new file mode 100644 index 00000000000..bb2dc7e5fe7 --- /dev/null +++ b/tools/gator/debian/gator-daemon.preinst @@ -0,0 +1,36 @@ +#!/bin/sh +# preinst script for gator-daemon +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * <new-preinst> `install' +# * <new-preinst> `install' <old-version> +# * <new-preinst> `upgrade' <old-version> +# * <old-preinst> `abort-upgrade' <new-version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + install|upgrade) + mkdir -p /var/lib/gatord/ + ;; + + abort-upgrade) + ;; + + *) + echo "preinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/tools/gator/debian/gator-daemon.upstart b/tools/gator/debian/gator-daemon.upstart new file mode 100644 index 00000000000..1564efc5339 --- /dev/null +++ b/tools/gator/debian/gator-daemon.upstart @@ -0,0 +1,10 @@ +description "Load gator driver module and launch gator daemon" +author "Pawel Moll <pawel.moll@arm.com>" + +start on filesystem + +exec /usr/sbin/gatord -c /var/lib/gatord/configuration.xml + +pre-start script + modprobe -q gator || true +end script diff --git a/tools/gator/debian/gator-module-dkms.install.in b/tools/gator/debian/gator-module-dkms.install.in new file mode 100755 index 00000000000..4691ff78575 --- /dev/null +++ b/tools/gator/debian/gator-module-dkms.install.in @@ -0,0 +1,2 @@ +module/* /usr/src/gator-module-__VERSION__/ +debian/dkms.conf /usr/src/gator-module-__VERSION__/
\ No newline at end of file diff --git a/tools/gator/debian/gator-module-dkms.postinst b/tools/gator/debian/gator-module-dkms.postinst new file mode 100755 index 00000000000..b3de65e5b06 --- /dev/null +++ b/tools/gator/debian/gator-module-dkms.postinst @@ -0,0 +1,49 @@ +#!/bin/sh +# Copyright (C) 2002-2005 Flavio Stanchina +# Copyright (C) 2005-2006 Aric Cyr +# Copyright (C) 2007 Mario Limonciello +# Copyright (C) 2009 Alberto Milone +# Copyright (C) 2010 Ricardo Salveti de Araujo + +set -e + +NAME=gator-module +PACKAGE_NAME=$NAME-dkms +CVERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` +ARCH=`dpkg --print-architecture` + +dkms_configure () { + for POSTINST in /usr/lib/dkms/common.postinst "/usr/share/$PACKAGE_NAME/postinst"; do + if [ -f "$POSTINST" ]; then + "$POSTINST" "$NAME" "$CVERSION" "/usr/share/$PACKAGE_NAME" "$ARCH" "$2" + return $? + fi + echo "WARNING: $POSTINST does not exist." >&2 + done + echo "ERROR: DKMS version is too old and $PACKAGE_NAME was not" >&2 + echo "built with legacy DKMS support." >&2 + echo "You must either rebuild $PACKAGE_NAME with legacy postinst" >&2 + echo "support or upgrade DKMS to a more current version." >&2 + return 1 +} + +case "$1" in + configure) + dkms_configure + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 diff --git a/tools/gator/debian/gator-module-dkms.prerm b/tools/gator/debian/gator-module-dkms.prerm new file mode 100755 index 00000000000..cf0b5f99da7 --- /dev/null +++ b/tools/gator/debian/gator-module-dkms.prerm @@ -0,0 +1,29 @@ +#!/bin/sh + +NAME=gator-module +PACKAGE_NAME=$NAME-dkms +VERSION=`dpkg-query -W -f='${Version}' $PACKAGE_NAME | awk -F "-" '{print $1}' | cut -d\: -f2` + +set -e + +case "$1" in + remove|upgrade|deconfigure) + if [ "`dkms status -m $NAME`" ]; then + dkms remove -m $NAME -v $VERSION --all + fi + ;; + + failed-upgrade) + ;; + + *) + echo "prerm called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + +exit 0 + + diff --git a/tools/gator/debian/rules b/tools/gator/debian/rules new file mode 100755 index 00000000000..c747748ff83 --- /dev/null +++ b/tools/gator/debian/rules @@ -0,0 +1,15 @@ +#!/usr/bin/make -f + +DEB_HOST_GNU_TYPE = $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +DEB_BUILD_GNU_TYPE = $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +ifneq ($(DEB_BUILD_GNU_TYPE),$(DEB_HOST_GNU_TYPE)) + CROSS_COMPILE ?= $(DEB_HOST_GNU_TYPE)- +endif + +export CROSS_COMPILE + +export DH_OPTIONS + +%: + dh $@ diff --git a/tools/gator/debian/scripts/do-packaging b/tools/gator/debian/scripts/do-packaging new file mode 100755 index 00000000000..1573d7e22f3 --- /dev/null +++ b/tools/gator/debian/scripts/do-packaging @@ -0,0 +1,104 @@ +#!/bin/bash + +set -e + +while [ $1 ] +do + OPT=$1 + shift + if [ "$OPT" == "--commit" ] + then + OPT_COMMIT=y + continue + fi + if [ "$OPT" == "--sign" ] + then + OPT_SIGN=y + continue + fi + if [ "$OPT" == "--no-git-clean" ] + then + OPT_NO_GIT_CLEAN=y + continue + fi + echo $0: Unknown option: "$OPT" 1>&2 + exit 1 +done + + +# +# Clean working dirctory +# + +if [ ! $OPT_NO_GIT_CLEAN ] +then + git reset --hard HEAD + git clean -dfx ../.. +fi +git checkout debian/changelog + +if [ ! -d module ] +then + mkdir module + cp -a ../../drivers/gator/* module/ +fi + +# +# Update changelog +# + +if [ "$DEBEMAIL" == "" -o "$DEBFULLNAME" == "" ] +then + export DEBEMAIL='jon.medhurst@linaro.org' + export DEBFULLNAME='Jon Medhurst (Tixy)' +fi +dch -i -c debian/changelog CHANGE_MSG +dch -r -c debian/changelog "" + +TIMESTAMP="$(date -u +%Y%m%d%H%M%S)" +sed -i -e "1 s/ubuntu1/-$TIMESTAMP/" debian/changelog + +GIT_COMMIT="$(git rev-parse HEAD)" +GIT_REMOTE_AND_BRANCH="$(git show-ref | sed -n 's,'$GIT_COMMIT'.*refs/remotes/\(.*\),\1,p' | sed -n 1p)" +GIT_REMOTE=$(echo $GIT_REMOTE_AND_BRANCH | awk -F/ '{print $1}') +GIT_BRANCH=$(echo $GIT_REMOTE_AND_BRANCH | awk -F/ '{print $2}') +GIT_URL="$(git remote -v show $GIT_REMOTE | sed -n 's/.*Fetch URL: \(.*\)/\1/p')" +GIT_TAG="$(git describe --exact-match --tags $GIT_COMMIT 2>/dev/null || echo "")" + +CHANGE_MSG="Automatically packaged from git repository:\n" +CHANGE_MSG="$CHANGE_MSG URL: $GIT_URL\n" +CHANGE_MSG="$CHANGE_MSG Tag: $GIT_TAG\n" +CHANGE_MSG="$CHANGE_MSG Branch: $GIT_BRANCH\n" +CHANGE_MSG="$CHANGE_MSG Commit: $GIT_COMMIT" +sed -i -e "s%CHANGE_MSG%$CHANGE_MSG%" debian/changelog + +echo $CHANGE_MSG + +FULL_VERSION="$(sed -n '1s/.*(\(.*\)).*/\1/p' debian/changelog)" +VERSION="$(echo $FULL_VERSION | sed 's/\([0-9.]*\).*/\1/')" +sed "s/__VERSION__/$VERSION/g" debian/dkms.conf.in > debian/dkms.conf +sed "s/__VERSION__/$VERSION/g" debian/gator-module-dkms.install.in > debian/gator-module-dkms.install + + +# +# Commit changes +# + +if [ $OPT_COMMIT ] +then + git add debian/changelog + git commit -s -m "gator-$FULL_VERSION: Automated packaging" +fi + + +# +# Build packages +# + +if [ ! $OPT_SIGN ] +then + DEBUILD_SIGN="-us -uc" +fi + +debuild $DEBUILD_SIGN -aarmhf -b +debuild --no-tgz-check $DEBUILD_SIGN -S |