diff --git a/debian/apply b/debian/apply deleted file mode 100644 index d4113f0..0000000 --- a/debian/apply +++ /dev/null @@ -1,250 +0,0 @@ -#!/bin/sh -# Apply script for managing patches for debian builts -# Taken from debian kernel-source-2.4.27 package -# Original Author: Herbert Xu - -set -e - -length=50 - -die() { - echo "E: $@" >&2 - exit 1 -} - -warn() { - echo "W: $@" >&2 -} - -uncompress_patch() { - patch=$1 - case "$patch" in - *.bz2) bzcat $patch ;; - *.gz) zcat $patch ;; - *) cat $patch ;; - esac -} - -find_patch() { - patch=$1 - - if [ -f "$patch" ]; then - echo "$patch" - elif [ -f "$patch.bz2" ]; then - echo "$patch.bz2" - elif [ -f "$patch.gz" ]; then - echo "$patch.gz" - else - die "$patch is in the series, but doesn't exist!" - fi -} - -apply_patch() { - patch=$(find_patch $home/$1) - base=$1 - if uncompress_patch "$patch" | patch -p1 -s -t --no-backup-if-mismatch; then - printf "%-${length}s\tOK (+)\n" "$base" - else - printf "%-${length}s\tFAIL (+)\n" "$base" - exit 1 - fi -} - -deapply_patch() { - patch=$(find_patch $home/$1) - base=$1 - if uncompress_patch "$patch" | patch -p1 -s -t -R --no-backup-if-mismatch; then - printf "%-${length}s\tOK (-)\n" "$base" - else - printf "%-${length}s\tFAIL (-)\n" "$base" - exit 1 - fi -} - -unpatch_series() { - series=$1 - [ -f "$series" ] || die "I wasn't passed a series!" - - tac $series | while read action patch; do - case "$action" in - +) deapply_patch $patch ;; - -) apply_patch $patch ;; - X) - bakfile="$(dirname $patch)/.$(basename $patch).bak" - if [ -f "$bakfile" ]; then - mv -f "$bakfile" "$patch" - printf "%-${length}s\tRESTORED (X)\n" "$patch" - else - printf "%-${length}s\tNO BACKUP (X)\n" "$patch" - fi - ;; - esac - done - echo "--> $(basename $series) fully unapplied." -} - -patch_series() { - series=$1 - [ -f "$series" ] || die "I wasn't passed a series!" - - while read action patch; do - case "$action" in - +) apply_patch $patch ;; - -) deapply_patch $patch ;; - X) - bakfile="$(dirname $patch)/.$(basename $patch).bak" - if [ -f "$patch" ]; then - mv -f "$patch" "$bakfile" - printf "%-${length}s\tREMOVED (X)\n" "$patch" - else - printf "%-${length}s\tNO FILE (X)\n" "$patch" - fi - ;; - esac - done < $series - echo "--> $(basename $series) fully applied." -} - -bubble_sort () -{ - DIR=$1 - shift - SORTED=$@ - - SWAPED=1 - while [ $SWAPED = 1 ]; do - X=0 - A="" - SWAPED=0 - NEW="" - for i in $SORTED; do - if [ -z "$A" ]; then - A="$i" - continue - fi - B="$i" - - if dpkg --compare-versions "$A" "$DIR" "$B"; then - SWAPED=1 - NEW="$NEW $B" - else - NEW="$NEW $A" - A="$B" - fi - - X=$(($X + 1)) - done - SORTED="$NEW $A" - done - - echo $SORTED -} - -bubble_sort_fwd () -{ - bubble_sort "lt" $@ -} - -bubble_sort_rev () -{ - bubble_sort "gt" $@ -} - - -if ! [ -d heartbeat ]; then - die 'Not in heartbeat top level directory. Exiting' - exit 1 -fi - -# for THIS particular version of the source package -#deb_version=$(sed -ne "/^heartbeat/ { s/.*(\([^)]*\)).*/\1/ p" -e "q}" \ -# ${PWD}/debian/changelog) -deb_version=$(dpkg-parsechangelog | awk '/^Version: / { print $2 }') -version=${override_version:-$deb_version} -upstream=${version%-*} -revision=${version#*-} - -home="$PWD/debian/patches" - - -if [ -f version.Debian ]; then - current=$(cat version.Debian) - current_rev=${current#*-} - current_up=${current%-*} - - if [ "$current" = "$upstream" ]; then - current_rev=0 - fi -else - warn "No version.Debian file, assuming pristine heartbeat $upstream" - current=$upstream - current_rev=0 -fi - -target=${1:-$version} - -target_rev=${target#*-} -target_up=${target%-*} - -# Sanity checks -if [ "$target_up" != "$upstream" ]; then - die "Upstream $target_up doesn't match $upstream!" -# We don't have that version out yet! -elif [ ! -n "$target_rev" ] || ( [ "$target_rev" != "$target" ] && dpkg --compare-versions $target_rev gt $revision ); then - year=$(($(date +%Y) + 1)) - die "Can't patch to nonexistent revision $target_rev (wait until $year)" -fi - -# At this point, we must handle three cases. -# 1. $target_rev is greater than $current_rev. We must patch forward for this. -# 2. $target_rev is less than $current_rev. We must reverse the list of series, -# reverse each used series (tac) and unapply applied patches and vice versa. -# 3. $target_rev is undefined, and $target is $upstream. - -# Revert to upstream. -if [ "$target_rev" = "$target" ]; then - # already reverted - if [ "$current" = "$target" ]; then - echo "Nothing to do, exiting." - exit 0 - fi - - for base in $(cd $home/series/ && bubble_sort_fwd $(ls -d *-*)); do - srev=${base#*-} - if [ -n "$srev" ]; then - if dpkg --compare-versions $srev le $current_rev; then - unpatch_series $home/series/$base - fi - else - die "Series doesn't have a revision!" - fi - done -elif [ "$current_rev" = "$upstream" ] || dpkg --compare-versions $target_rev gt $current_rev; then - for base in $(cd $home/series/ && bubble_sort_rev $(ls -d *-*)); do - srev=${base#*-} - if [ -n "$srev" ]; then - if dpkg --compare-versions $srev gt $current_rev && dpkg --compare-versions $srev le $target_rev; then - patch_series $home/series/$base - fi - else - die "Series doesn't have a revision!" - fi - done -elif [ $target_rev = $current_rev ]; then - echo "Nothing to do, exiting." - exit 0 -elif dpkg --compare-versions $target_rev lt $current_rev; then - for base in $(cd $home/series/ && bubble_sort_fwd $(ls -d *-*)); do - srev=${base#*-} - if [ -n "$srev" ]; then - # gt because you don't want to unapply the target series - if dpkg --compare-versions $srev le $current_rev && dpkg --compare-versions $srev gt $target_rev; then - unpatch_series $home/series/$base - fi - else - die "Series doesn't have a revision!" - fi - done -fi - -echo $target > version.Debian diff --git a/debian/changelog b/debian/changelog index 943d4aa..768030b 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,4 +1,4 @@ -heartbeat-2 (2.1.3+ngcp.1) unstable; urgency=low +heartbeat-2 (2.1.3+1ngcp.1) unstable; urgency=low * Non-maintainer upload, adjusting package version for native packaging in Git. diff --git a/debian/control b/debian/control index 092b269..4ac602d 100644 --- a/debian/control +++ b/debian/control @@ -3,7 +3,7 @@ Section: admin Priority: optional Maintainer: Simon Horman Uploaders: Michael Prokop -Build-Depends: debhelper (>= 5.0.37.2), libsnmp-dev, libglib2.0-dev, perl, net-tools, iputils-ping, python, psmisc, libnet1-dev, iproute, libtool, libcurl4-openssl-dev | libcurl3-openssl-dev, libxml2-dev, bison, flex, uuid-dev, lynx, libbz2-dev, zlib1g-dev, uuid-dev, libsensors4-dev, libltdl3-dev, swig, openssh-client, libgnutls-dev, python-central (>= 0.5), python-dev, libpam0g-dev, libncurses5-dev, psmisc, libopenhpi-dev +Build-Depends: debhelper (>= 5.0.37.2), libsnmp-dev, libglib2.0-dev, perl, net-tools, iputils-ping, python, psmisc, libnet1-dev, iproute, libtool, libcurl4-openssl-dev | libcurl3-openssl-dev, libxml2-dev, bison, flex, uuid-dev, lynx, libbz2-dev, zlib1g-dev, uuid-dev, libsensors4-dev, libltdl3-dev, swig, openssh-client, libgnutls-dev, python-central (>= 0.5), python-dev, libpam0g-dev, libncurses5-dev, psmisc, libopenhpi-dev, quilt Standards-Version: 3.9.3 XS-Python-Version: current diff --git a/debian/patches/series b/debian/patches/series new file mode 100644 index 0000000..22e7fe9 --- /dev/null +++ b/debian/patches/series @@ -0,0 +1,16 @@ +ipv6-check.patch +init-remote_fs.patch +init-openhpid.patch +init-ntp.patch +SphinxSearchDaemon.patch +SphinxSearchDaemon.install.patch +bashisms.patch +ldirectord-fix-sql-select-queries.patch +ldirectord-clear-config-in-memory-on-reload.patch +lrm-dont-revise-op_status.patch +ldirectord-init-lsb.patch +ldirectord-rows.patch +dopd-fix-basic-failover-fix-hb-message-corruption-by-fprintf_stderr_.patch +IPv6addr-64.patch +o2cb-INITDIR.patch +IPv6addr-background-UA.patch diff --git a/debian/patches/series/2.1.3-1 b/debian/patches/series/2.1.3-1 deleted file mode 100644 index bd090d2..0000000 --- a/debian/patches/series/2.1.3-1 +++ /dev/null @@ -1 +0,0 @@ -+ ipv6-check.patch diff --git a/debian/patches/series/2.1.3-2 b/debian/patches/series/2.1.3-2 deleted file mode 100644 index c710145..0000000 --- a/debian/patches/series/2.1.3-2 +++ /dev/null @@ -1,5 +0,0 @@ -+ init-remote_fs.patch -+ init-openhpid.patch -+ init-ntp.patch -+ SphinxSearchDaemon.patch -+ SphinxSearchDaemon.install.patch diff --git a/debian/patches/series/2.1.3-3 b/debian/patches/series/2.1.3-3 deleted file mode 100644 index 86c57b8..0000000 --- a/debian/patches/series/2.1.3-3 +++ /dev/null @@ -1,4 +0,0 @@ -+ bashisms.patch -+ ldirectord-fix-sql-select-queries.patch -+ ldirectord-clear-config-in-memory-on-reload.patch -+ lrm-dont-revise-op_status.patch diff --git a/debian/patches/series/2.1.3-4 b/debian/patches/series/2.1.3-4 deleted file mode 100644 index c3136b2..0000000 --- a/debian/patches/series/2.1.3-4 +++ /dev/null @@ -1 +0,0 @@ -+ ldirectord-init-lsb.patch diff --git a/debian/patches/series/2.1.3-5 b/debian/patches/series/2.1.3-5 deleted file mode 100644 index d6a8729..0000000 --- a/debian/patches/series/2.1.3-5 +++ /dev/null @@ -1 +0,0 @@ -+ ldirectord-rows.patch diff --git a/debian/patches/series/2.1.3-6lenny1 b/debian/patches/series/2.1.3-6lenny1 deleted file mode 100644 index 1ed5a90..0000000 --- a/debian/patches/series/2.1.3-6lenny1 +++ /dev/null @@ -1 +0,0 @@ -+ dopd-fix-basic-failover-fix-hb-message-corruption-by-fprintf_stderr_.patch diff --git a/debian/patches/series/2.1.3-6lenny2 b/debian/patches/series/2.1.3-6lenny2 deleted file mode 100644 index 5c315a0..0000000 --- a/debian/patches/series/2.1.3-6lenny2 +++ /dev/null @@ -1 +0,0 @@ -+ IPv6addr-64.patch diff --git a/debian/patches/series/2.1.3-6lenny3 b/debian/patches/series/2.1.3-6lenny3 deleted file mode 100644 index 4dda0c9..0000000 --- a/debian/patches/series/2.1.3-6lenny3 +++ /dev/null @@ -1 +0,0 @@ -+ o2cb-INITDIR.patch diff --git a/debian/patches/series/2.1.3-7~sipwise1 b/debian/patches/series/2.1.3-7~sipwise1 deleted file mode 100644 index 1a2e4c1..0000000 --- a/debian/patches/series/2.1.3-7~sipwise1 +++ /dev/null @@ -1 +0,0 @@ -+ IPv6addr-background-UA.patch diff --git a/debian/rules b/debian/rules index caf48d4..d5dc664 100755 --- a/debian/rules +++ b/debian/rules @@ -43,14 +43,11 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS))) endif DTMP:=`pwd`/debian/tmp -RELEASE := $(shell dpkg-parsechangelog | awk '/^Version: / { print $$2 }') -UPSTREAM := $(shell echo "$(RELEASE)" | sed 's/:\?\([0-9\.]\+\)-[0-9].*/\1/') - patch: - override_version=$(RELEASE) sh debian/apply + dh_quilt_patch unpatch: - override_version=$(RELEASE) sh debian/apply $(UPSTREAM) + dh_quilt_unpatch configure: checkbuild patch dh_testdir diff --git a/ldirectord/init.d/ldirectord.debian b/ldirectord/init.d/ldirectord.debian index 9b84c91..094f380 100644 --- a/ldirectord/init.d/ldirectord.debian +++ b/ldirectord/init.d/ldirectord.debian @@ -1,13 +1,4 @@ #!/bin/sh -# -### BEGIN INIT INFO -# Provides: ldirectord -# Required-Start: $remote_fs $syslog -# Required-Stop: $remote_fs $syslog -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -### END INIT INFO -# # Author: Horms # # Debian init script for ldirectord