gnugk/asterisk needs prerm

Mark Purcell msp@debian.org
Tue, 10 Aug 2004 23:27:28 +1000


On Tue, Aug 10, 2004 at 02:27:12PM +0200, Kilian Krause wrote:
> What's the problem you have with "cd asterisk/trunk;svn-buildpackage"?
> Maybe i can help explaning.

Hmm, It seems to be working fine now, so I don't know what the issue
was.  Seems to be working fine now.   :-(

ANy hints on making patch'es easy.  I have tried to copy the sip patch
but am having problems getting svn-buildpackage to apply it. When I
build asterisk:

Thanks,
Mark

[...]
dpkg-source: building asterisk using existing
asterisk_0.9.1+1.0RC1.orig.tar.gz
dpkg-source: building asterisk in asterisk_0.9.1+1.0RC1-6.diff.gz
dpkg-source: building asterisk in asterisk_0.9.1+1.0RC1-6.dsc
 debian/rules build
 test -d debian/patched || install -d debian/patched
 dpatch  apply-all
 applying patch 10_rollup-1.0-1 to ./ ... ok.
 applying patch 20_chan_sip to ./ ... failed.
 make: *** [patch-stamp] Error 1
 build command failed in
 /var/lib/mythtv/mnt/home/msp/src/pkg-voip/pkg-voip/asterisk/build-area/asterisk-0.9.1+1.0RC1
 Aborting.
 W: build directory not purged!
 msp@debian:~/src/pkg-voip/pkg-voip/asterisk/trunk$
ource: building asterisk in asterisk_0.9.1+1.0RC1-6.diff.gz
dpkg-source: building asterisk in asterisk_0.9.1+1.0RC1-6.dsc
 debian/rules build
 test -d debian/patched || install -d debian/patched
 dpatch  apply-all
 applying patch 10_rollup-1.0-1 to ./ ... ok.
 applying patch 20_chan_sip to ./ ... failed.
 make: *** [patch-stamp] Error 1
 build command failed in
 /var/lib/mythtv/mnt/home/msp/src/pkg-voip/pkg-voip/asterisk/build-area/asterisk-0.9.1+1.0RC1
 Aborting.
 W: build directory not purged!

!!
::::::::::::::
/home/msp/src/pkg-voip/pkg-voip/asterisk/trunk/debian/patches/20_chan_sip.dpatch
::::::::::::::
#! /bin/sh -e
## 20_sep.dpatch by  <msp@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.

if [ $# -lt 1 ]; then
    echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
    exit 1
fi

[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
patch_opts="${patch_opts:--f --no-backup-if-mismatch} ${2:+-d $2}"

case "$1" in
    -patch) patch -p1 ${patch_opts} < $0;;
    -unpatch) patch -R -p1 ${patch_opts} < $0;;
    *)
        echo "`basename $0`: script expects -patch|-unpatch as argument" >&2
        exit 1;;
esac

exit 0

@DPATCH@


--- asterisk-0.9.1+1.0RC1.orig/channels/chan_sip.c
+++ asterisk-0.9.1+1.0RC1/channels/chan_sip.c
@@ -3107,4 +3107,6 @@ static int reqprep(struct sip_request *r
        }
-
-       if (!ast_strlen_zero(p->uri)) {
+       if (!strcasecmp(msg, "CANCEL")) {
+               /* MUST use original URI */
+               c = p->initreq.rlPart2;
+       } else if (!ast_strlen_zero(p->uri)) {
                c = p->uri;