[Pkg-voip-commits] r3950 - in rate-engine/trunk/debian: . patches
paravoid at alioth.debian.org
paravoid at alioth.debian.org
Tue Aug 7 06:10:25 UTC 2007
Author: paravoid
Date: 2007-08-07 06:10:24 +0000 (Tue, 07 Aug 2007)
New Revision: 3950
Added:
rate-engine/trunk/debian/patches/
rate-engine/trunk/debian/patches/00list
rate-engine/trunk/debian/patches/fix-ftbfs.dpatch
Modified:
rate-engine/trunk/debian/changelog
rate-engine/trunk/debian/compat
rate-engine/trunk/debian/control
rate-engine/trunk/debian/rules
Log:
* NOT RELEASED YET
- still doesn't compile! Needs to be ported to asterisk 1.4 or may be
depend on asterisk1.2 and build-depend on asterisk1.2-dev?
* Add myself to Uploaders.
* Change debhelper compatibility level and build-dependency to 5.
* Bump Standards-Version to 3.7.2, no changes needed.
* Don't ignore make clean's exit code (fixes a lintian warning).
* Add dpatch patch management system.
* Add fix-ftbfs patch which fixes compilation, written by Barry deFreese for
Ubuntu. Thanks!
Modified: rate-engine/trunk/debian/changelog
===================================================================
--- rate-engine/trunk/debian/changelog 2007-08-07 01:37:34 UTC (rev 3949)
+++ rate-engine/trunk/debian/changelog 2007-08-07 06:10:24 UTC (rev 3950)
@@ -1,9 +1,23 @@
rate-engine (0.5.5-2) UNRELEASED; urgency=low
+ * NOT RELEASED YET
+ - still doesn't compile! Needs to be ported to asterisk 1.4 or may be
+ depend on asterisk1.2 and build-depend on asterisk1.2-dev?
+
+ [ Kilian Krause ]
* Upgrade build-depends to libmysqlclient15-dev. (Closes: #356756)
- -- Kilian Krause <kilian at debian.org> Wed, 15 Mar 2006 11:01:11 +0100
+ [ Faidon Liambotis ]
+ * Add myself to Uploaders.
+ * Change debhelper compatibility level and build-dependency to 5.
+ * Bump Standards-Version to 3.7.2, no changes needed.
+ * Don't ignore make clean's exit code (fixes a lintian warning).
+ * Add dpatch patch management system.
+ * Add fix-ftbfs patch which fixes compilation, written by Barry deFreese for
+ Ubuntu. Thanks!
+ -- Faidon Liambotis <paravoid at debian.org> Tue, 07 Aug 2007 09:08:35 +0300
+
rate-engine (0.5.5-1) unstable; urgency=low
* New upstream release
Modified: rate-engine/trunk/debian/compat
===================================================================
--- rate-engine/trunk/debian/compat 2007-08-07 01:37:34 UTC (rev 3949)
+++ rate-engine/trunk/debian/compat 2007-08-07 06:10:24 UTC (rev 3950)
@@ -1 +1 @@
-4
+5
Modified: rate-engine/trunk/debian/control
===================================================================
--- rate-engine/trunk/debian/control 2007-08-07 01:37:34 UTC (rev 3949)
+++ rate-engine/trunk/debian/control 2007-08-07 06:10:24 UTC (rev 3950)
@@ -2,9 +2,9 @@
Section: comm
Priority: optional
Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
-Uploaders: Mark Purcell <msp at debian.org>, Kilian Krause <kilian at debian.org>
-Build-Depends: debhelper (>= 4.0.0), libpcre3-dev, libmysqlclient15-dev, asterisk-dev
-Standards-Version: 3.6.0
+Uploaders: Mark Purcell <msp at debian.org>, Kilian Krause <kilian at debian.org>, Faidon Liambotis
+Build-Depends: debhelper (>= 5), dpatch, libpcre3-dev, libmysqlclient15-dev, asterisk-dev
+Standards-Version: 3.7.2
XS-Vcs-Svn: svn://svn.debian.org/pkg-voip/
XS-Vcs-Browser: http://svn.debian.org/wsvn/pkg-voip/
Added: rate-engine/trunk/debian/patches/00list
===================================================================
--- rate-engine/trunk/debian/patches/00list (rev 0)
+++ rate-engine/trunk/debian/patches/00list 2007-08-07 06:10:24 UTC (rev 3950)
@@ -0,0 +1 @@
+fix-ftbfs
Added: rate-engine/trunk/debian/patches/fix-ftbfs.dpatch
===================================================================
--- rate-engine/trunk/debian/patches/fix-ftbfs.dpatch (rev 0)
+++ rate-engine/trunk/debian/patches/fix-ftbfs.dpatch 2007-08-07 06:10:24 UTC (rev 3950)
@@ -0,0 +1,221 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## fix-ftbfs.dpatch by Barry deFreese <bddebian at comcast.net>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Fix several compilation problems.
+
+ at DPATCH@
+diff -urNad rate-engine-0.5.5~/rate_engine.c rate-engine-0.5.5/rate_engine.c
+--- rate-engine-0.5.5~/rate_engine.c 2005-11-04 00:00:59.000000000 +0200
++++ rate-engine-0.5.5/rate_engine.c 2007-08-07 09:00:05.000000000 +0300
+@@ -15,10 +15,12 @@
+ #endif
+
+ #include <stdlib.h>
++#include <stdio.h>
+ #include <string.h>
+ #include <unistd.h>
+
+-#include <pthread.h>
++/* Now included by asterisk/lock.h */
++/* #include <pthread.h> */
+
+ #include <mysql.h>
+
+@@ -36,6 +38,7 @@
+ #include <asterisk/manager.h>
+ #include <asterisk/utils.h>
+ #include <asterisk/term.h>
++#include <asterisk/lock.h>
+
+ static char *tdesc = "Call Routing and Rating Application";
+ static char *cdr_name = "ratecall";
+@@ -66,8 +69,8 @@
+
+ static pthread_t poster_thread;
+ static int cancel_poster = 0;
+-static pthread_mutex_t poster_lock = PTHREAD_MUTEX_INITIALIZER;
+-static pthread_cond_t poster_cond = PTHREAD_COND_INITIALIZER;
++static ast_mutex_t poster_lock;
++static ast_cond_t poster_cond;
+
+ static int warn_threshold = 500; /* Start giving warnings if CDR queue is this long */
+ static int drop_threshold = 1000; /* Start dropping entries if CDR queue is this long */
+@@ -255,7 +258,7 @@
+ /*
+ * Jump to priority + 101, since we got an error
+ */
+- if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
++ if (ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_dnid))
+ chan->priority += 100;
+ else
+ res = -1;
+@@ -511,7 +514,7 @@
+ /*
+ * Jump to priority + 101, since we got an error
+ */
+- if (res == 0 && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->callerid))
++ if (res == 0 && ast_exists_extension(chan, chan->context, chan->exten, chan->priority + 101, chan->cid.cid_dnid))
+ chan->priority += 100;
+ else
+ res = -1;
+@@ -593,9 +596,9 @@
+ /*
+ * Try to pick up real ANI if that exists
+ */
+- if (chan && chan->ani) {
+- if ((ani = alloca((len = strlen(chan->ani)) * 2 + 1)) != NULL)
+- mysql_real_escape_string(&mysql, ani, chan->ani, len);
++ if (chan && chan->cid.cid_ani) {
++ if ((ani = alloca((len = strlen(chan->cid.cid_ani)) * 2 + 1)) != NULL)
++ mysql_real_escape_string(&mysql, ani, chan->cid.cid_ani, len);
+ }
+ else
+ ani = src;
+@@ -702,7 +705,7 @@
+ /*
+ * Acquire shared data lock
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ /*
+ * Only add to queue if we are below the maximum threshold
+@@ -735,12 +738,12 @@
+ /*
+ * Signal worker thread that there is data available
+ */
+- pthread_cond_signal(&poster_cond);
++ ast_cond_signal(&poster_cond);
+
+ /*
+ * Release shared data lock
+ */
+- pthread_mutex_unlock(&poster_lock);
++ ast_mutex_unlock(&poster_lock);
+
+ return 0;
+ }
+@@ -763,7 +766,7 @@
+ /*
+ * Get lock on shared data
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ /*
+ * We need a timeout if there is something on the queue
+@@ -786,8 +789,8 @@
+ * Wait for [more] data to be available
+ */
+ for (;; (queue_head ?
+- (ts.tv_sec = time(NULL) + 30, ts.tv_nsec = 0, pthread_cond_timedwait(&poster_cond, &poster_lock, &ts)) :
+- pthread_cond_wait(&poster_cond, &poster_lock))) {
++ (ts.tv_sec = time(NULL) + 30, ts.tv_nsec = 0, ast_cond_timedwait(&poster_cond, &poster_lock, &ts)) :
++ ast_cond_wait(&poster_cond, &poster_lock))) {
+
+ ast_log(LOG_DEBUG, "Rating Engine poster thread processing\n");
+
+@@ -804,7 +807,7 @@
+ * take a little while, so release the lock while we do
+ * that
+ */
+- pthread_mutex_unlock(&poster_lock);
++ ast_mutex_unlock(&poster_lock);
+
+ /*
+ * If we are not connected to a database, try to connect
+@@ -818,7 +821,7 @@
+ /*
+ * Reacquire the lock before we restart loop
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ continue;
+ }
+@@ -835,7 +838,7 @@
+ /*
+ * Reacquire the lock before we restart loop
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ continue;
+ }
+@@ -844,7 +847,7 @@
+ * We do have to reacquire the lock before we can actually
+ * touch the queue, however...
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ /*
+ * Process CDR records on queue
+@@ -864,7 +867,7 @@
+ /*
+ * Release the lock before doing potentially long operation
+ */
+- pthread_mutex_unlock(&poster_lock);
++ ast_mutex_unlock(&poster_lock);
+
+ /*
+ * Perform query
+@@ -879,7 +882,7 @@
+ /*
+ * Re-acquire the lock
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ /*
+ * If we errored out of sending the CDR entry, put it back
+@@ -911,7 +914,7 @@
+ /*
+ * Release the lock before exiting thread
+ */
+- pthread_mutex_unlock(&poster_lock);
++ ast_mutex_unlock(&poster_lock);
+
+ /*
+ * Close connection if it is open
+@@ -940,7 +943,7 @@
+ */
+ ast_mutex_lock(&ratelock);
+
+- cfg = ast_load("rate_engine.conf");
++ cfg = ast_config_load("rate_engine.conf");
+ if (cfg) {
+ cat = ast_category_browse(cfg, NULL);
+ while (cat) {
+@@ -1150,7 +1153,7 @@
+ cat = ast_category_browse(cfg, cat);
+ }
+ }
+- ast_destroy(cfg);
++ ast_config_destroy(cfg);
+
+ /*
+ * Do some quick sanity checks
+@@ -2089,18 +2092,18 @@
+ /*
+ * Get lock on shared data
+ */
+- pthread_mutex_lock(&poster_lock);
++ ast_mutex_lock(&poster_lock);
+
+ /*
+ * Tell posting thread to exit and signal a change
+ */
+ cancel_poster = 1;
+- pthread_cond_signal(&poster_cond);
++ ast_cond_signal(&poster_cond);
+
+ /*
+ * Release lock on shared data
+ */
+- pthread_mutex_unlock(&poster_lock);
++ ast_mutex_unlock(&poster_lock);
+
+ /*
+ * Wait for posting thread to exit
Modified: rate-engine/trunk/debian/rules
===================================================================
--- rate-engine/trunk/debian/rules 2007-08-07 01:37:34 UTC (rev 3949)
+++ rate-engine/trunk/debian/rules 2007-08-07 06:10:24 UTC (rev 3950)
@@ -1,14 +1,13 @@
#!/usr/bin/make -f
# -*- makefile -*-
-# Sample debian/rules that uses debhelper.
# GNU copyright 1997 to 1999 by Joey Hess.
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
+include /usr/share/dpatch/dpatch.make
-
CFLAGS = -Wall -g
ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
@@ -27,17 +26,9 @@
FILENAME := rate-engine_$(UPVERSION).orig.tar.gz
URL := http://www.trollphone.org/files/rate-engine-$(UPVERSION).tar.gz
-configure: configure-stamp
-configure-stamp:
- dh_testdir
- # Add here commands to configure the package.
-
- touch configure-stamp
-
-
build: build-stamp
-build-stamp: configure-stamp
+build-stamp: patch-stamp
dh_testdir
# Add here commands to compile the package.
@@ -46,13 +37,13 @@
touch build-stamp
-clean:
+clean: unpatch
dh_testdir
dh_testroot
- rm -f build-stamp configure-stamp
+ rm -f build-stamp
# Add here commands to clean up after the build process.
- -$(MAKE) clean
+ $(MAKE) clean
dh_clean
@@ -99,4 +90,4 @@
@@wget -N -nv -T10 -t3 -O ../tarballs/$(FILENAME) $(URL)
binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install configure
+.PHONY: build clean binary-indep binary-arch binary install unpatch patch
More information about the Pkg-voip-commits
mailing list