[Pkg-voip-commits] r2889 - in zaptel/branches/experimental/debian: . patches

Tzafrir Cohen tzafrir-guest at alioth.debian.org
Tue Jan 2 00:07:51 CET 2007


Author: tzafrir-guest
Date: 2007-01-02 00:07:50 +0100 (Tue, 02 Jan 2007)
New Revision: 2889

Added:
   zaptel/branches/experimental/debian/TODO.Debian
Modified:
   zaptel/branches/experimental/debian/changelog
   zaptel/branches/experimental/debian/libtonezone-dev.install
   zaptel/branches/experimental/debian/patches/00list
   zaptel/branches/experimental/debian/patches/bristuff.dpatch
   zaptel/branches/experimental/debian/rules
   zaptel/branches/experimental/debian/watch
Log:
 * Upgrading to 1.4.
 * Watch for 1.4.x tarballs, rather than 1.2.x tarballs.
 * Disable most patches:
 - ukcid fails to apply.
 - bristuff fails to apply.
 - No point in patching the Makefile.
 * Saving my attempts to apply bristuff.
 * .h files moved to /usr/include/zaptel


Added: zaptel/branches/experimental/debian/TODO.Debian
===================================================================
--- zaptel/branches/experimental/debian/TODO.Debian	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/TODO.Debian	2007-01-01 23:07:50 UTC (rev 2889)
@@ -0,0 +1,4 @@
+* Set the list of utilities to build. Probably through some menuselect var.
+* Rename sethdlc-new to sethdlc.
+* Use proper man pages.
+* lsb header for init.d script.

Modified: zaptel/branches/experimental/debian/changelog
===================================================================
--- zaptel/branches/experimental/debian/changelog	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/changelog	2007-01-01 23:07:50 UTC (rev 2889)
@@ -1,3 +1,16 @@
+zaptel (1:1.4.0~dfsg-1) UNRELEASED; urgency=low
+
+  * Upgrading to 1.4.
+  * Watch for 1.4.x tarballs, rather than 1.2.x tarballs.
+  * Disable most patches:
+  - ukcid fails to apply.
+  - bristuff fails to apply.
+  - No point in patching the Makefile.
+  * Saving my attempts to apply bristuff.
+  * .h files moved to /usr/include/zaptel
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Mon,  1 Jan 2007 21:31:18 +0200
+
 zaptel (1:1.2.12~dfsg-2) UNRELEASED; urgency=low
 
   * NOT RELEASED YET

Modified: zaptel/branches/experimental/debian/libtonezone-dev.install
===================================================================
--- zaptel/branches/experimental/debian/libtonezone-dev.install	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/libtonezone-dev.install	2007-01-01 23:07:50 UTC (rev 2889)
@@ -1,3 +1,3 @@
-usr/include/*.h
+usr/include/zaptel/tonezone.h
 usr/lib/lib*.a
 usr/lib/lib*.so

Modified: zaptel/branches/experimental/debian/patches/00list
===================================================================
--- zaptel/branches/experimental/debian/patches/00list	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/patches/00list	2007-01-01 23:07:50 UTC (rev 2889)
@@ -1,15 +1,15 @@
-Makefile_deps_utils
-Makefile_uname
-Makefile_targets
-Makefile_kbuild
+#Makefile_deps_utils
+#Makefile_uname
+#Makefile_targets
+#Makefile_kbuild
 # probably depends on previus Makefile_* patches (specifically: Makefile_targets)
-Makefile_bristuff
+#Makefile_bristuff
 # touches the Makefile as well:
 #echocan_env
-ukcid
-bristuff
-bristuff_local_zaptelh
-Makefile_vzaphfc.dpatch
+#ukcid
+#bristuff
+#bristuff_local_zaptelh
+#Makefile_vzaphfc.dpatch
 wct4xxp-dfsg.dpatch
-dbug391840.dpatch
-Makefile_hostcc
+#dbug391840.dpatch
+#Makefile_hostcc

Modified: zaptel/branches/experimental/debian/patches/bristuff.dpatch
===================================================================
--- zaptel/branches/experimental/debian/patches/bristuff.dpatch	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/patches/bristuff.dpatch	2007-01-01 23:07:50 UTC (rev 2889)
@@ -4,6 +4,9 @@
 ## All lines beginning with `## DP:' are a description of the patch.
 ## DP: This is the patch zaptel.patch from bristuff, with the Makefile
 ## DP: patch removed. Version: bristuff-0.3.0-PRE-1w
+## DP: removed setting of echo canceller.
+## DP: Fixed zaptel.c patch.
+## DP: removed ztcfg.c patch until I figure how to fix it.
 
 @DPATCH@
 diff -urN zaptel-1.2.10.orig/zaptel.c zaptel-1.2.10/zaptel.c
@@ -107,15 +110,6 @@
  #ifdef CONFIG_ZAPATA_NET
  				if (ms->flags & ZT_FLAG_NETDEV)
  					netif_wake_queue(ztchan_to_dev(ms));
-@@ -4987,7 +5052,7 @@
- 					tasklet_schedule(&ms->ppp_calls);
- 				}
- #endif
--			}
-+			} 
- 		} else if (ms->curtone && !(ms->flags & ZT_FLAG_PSEUDO)) {
- 			left = ms->curtone->tonesamples - ms->tonep;
- 			if (left > bytes)
 @@ -5033,6 +5098,10 @@
  				memset(txb, 0xFF, bytes);
  			}
@@ -127,10 +121,10 @@
  		} else {
  			memset(txb, ZT_LIN2X(0, ms), bytes);	/* Lastly we use silence on telephony channels */
  			bytes = 0;
-@@ -5758,6 +5827,13 @@
- 	int left, x;
+@@ -5758,6 +5827,14 @@
+ 	int bytes = ZT_CHUNKSIZE, left;
+ 	int x;
  
- 	int bytes = ZT_CHUNKSIZE;
 +#if defined(CONFIG_ZAPATA_BRI_DCHANS)	
 +	if (ms->flags & ZT_FLAG_BRIDCHAN) {
 +	    bytes = ms->bytes2receive;
@@ -138,9 +132,10 @@
 +//	    printk(KERN_CRIT "bytes2receive %d\n",ms->bytes2receive);
 +	}
 +#endif
- 
- 	while(bytes) {
- #if defined(CONFIG_ZAPATA_NET)  || defined(CONFIG_ZAPATA_PPP)
++
+	/* Let's pick something to transmit.  First source to
+	   try is our write-out buffer.  Always check it first because
+	   its our 'fast path' for whatever that's worth. */
 @@ -5816,6 +5892,19 @@
  						}
  					}
@@ -202,20 +197,6 @@
 diff -urN zaptel-1.2.10.orig/zconfig.h zaptel-1.2.10/zconfig.h
 --- zaptel-1.2.10.orig/zconfig.h	2005-11-29 19:42:08.000000000 +0100
 +++ zaptel-1.2.10/zconfig.h	2006-10-19 11:16:47.000000000 +0200
-@@ -49,11 +49,11 @@
- /* #define ECHO_CAN_MARK */
- /* #define ECHO_CAN_MARK2 */
- /* #define ECHO_CAN_MARK3 */
--#define ECHO_CAN_KB1
-+/* #define ECHO_CAN_KB1 */
- /* MG2 is a version of KB1 that has some changes to it that are
-  * supposed to improve how it performs.  If you have echo problems,
-  * try it out! */
--/* #define ECHO_CAN_MG2 */
-+#define ECHO_CAN_MG2
- 
- /*
-  * Uncomment for aggressive residual echo supression under 
 @@ -152,4 +152,10 @@
   */
  /* #define FXSFLASH */
@@ -227,229 +208,3 @@
 +#define CONFIG_ZAPATA_BRI_DCHANS
 +
  #endif
-diff -urN zaptel-1.2.10.orig/ztcfg.c zaptel-1.2.10/ztcfg.c
---- zaptel-1.2.10.orig/ztcfg.c	2006-02-01 03:33:54.000000000 +0100
-+++ zaptel-1.2.10/ztcfg.c	2006-12-05 12:37:31.536696070 +0100
-@@ -90,6 +90,10 @@
- 
- static int stopmode = 0;
- 
-+static int stopwhich = -1;
-+
-+static int startwhich = -1;
-+
- static int numdynamic = 0;
- 
- static char zonestoload[ZT_TONE_ZONE_MAX][10];
-@@ -1141,7 +1145,8 @@
- 		"  -d [level]        -- Generate debugging output. (Default level is 1.)\n"
- 		"  -f                -- Always reconfigure every channel\n"
- 		"  -h                -- Generate this help statement\n"
--		"  -s                -- Shutdown spans only\n"
-+		"  -s[span]          -- Deactivate/shutdown span [span]. Deactivates all spans if no [span] is given.\n"
-+		"  -a[span]          -- Activate/start span [span]. Activates all spans if no [span] is given.\n"
- 		"  -t                -- Test mode only, do not apply\n"
- 		"  -v                -- Verbose (more -v's means more verbose)\n"
- 	,c);
-@@ -1154,7 +1159,7 @@
- 	char *buf;
- 	char *key, *value;
- 	int x,found;
--	while((c = getopt(argc, argv, "fthc:vsd::")) != -1) {
-+	while((c = getopt(argc, argv, "fthc:vs::a::d::")) != -1) {
- 		switch(c) {
- 		case 'c':
- 			filename=optarg;
-@@ -1175,8 +1180,20 @@
- 			fo_real = 0;
- 			break;
- 		case 's':
-+			if (optarg) {
-+			    stopwhich = atoi(optarg);
-+			} else {
-+			    stopwhich = -1;
-+			}
- 			stopmode = 1;
- 			break;
-+		case 'a':
-+			if (optarg) {
-+			    startwhich = atoi(optarg);
-+			} else {
-+			    startwhich = -1;
-+			}
-+			break;
- 		case 'd':
- 			if (optarg)
- 				debug = atoi(optarg);
-@@ -1242,14 +1259,27 @@
- 					ioctl(fd, ZT_DYNAMIC_DESTROY, &zds[x]);
- 				}
- 				if (stopmode) {
--					for (x=0;x<spans;x++) {
-+					if (stopwhich > 0){
-+					    if ((stopwhich > spans) || (ioctl(fd, ZT_SHUTDOWN, &lc[stopwhich - 1].span))) {
-+						fprintf(stderr, "Zaptel shutdown failed: %s\n", strerror(errno));
-+						close(fd);
-+						exit(1);						
-+					    } else {
-+						if (verbose) {
-+						    printf("Deactivated span %d\n", stopwhich);
-+						}
-+					    }					    
-+					} else {
-+					    for (x=0;x<spans;x++) {
- 						if (ioctl(fd, ZT_SHUTDOWN, &lc[x].span)) {
- 							fprintf(stderr, "Zaptel shutdown failed: %s\n", strerror(errno));
- 							close(fd);
- 							exit(1);
- 						}
-+					    }
- 					}
- 				} else {
-+				    if (startwhich == -1) {
- 					for (x=0;x<spans;x++) {
- 						if (ioctl(fd, ZT_SPANCONFIG, lc + x)) {
- 							fprintf(stderr, "ZT_SPANCONFIG failed on span %d: %s (%d)\n", lc[x].span, strerror(errno), errno);
-@@ -1348,12 +1378,25 @@
- 							exit(1);
- 						}
- 					}
--					for (x=0;x<spans;x++) {
-+				    }
-+					if (startwhich > 0) {
-+					    if ((startwhich > spans) || (ioctl(fd, ZT_STARTUP, &lc[startwhich - 1].span))) {
-+						fprintf(stderr, "Zaptel startup failed: %s\n", strerror(errno));
-+						close(fd);
-+						exit(1);
-+					    } else {
-+						if (verbose) {
-+						    printf("Activated span %d\n", startwhich);
-+						}
-+					    }
-+					} else {
-+					    for (x=0;x<spans;x++) {
- 						if (ioctl(fd, ZT_STARTUP, &lc[x].span)) {
- 							fprintf(stderr, "Zaptel startup failed: %s\n", strerror(errno));
- 							close(fd);
- 							exit(1);
- 						}
-+					    }
- 					}
- 				}
- 			}
-diff -urN zaptel-1.2.10.orig/ztpty.c zaptel-1.2.10/ztpty.c
---- zaptel-1.2.10.orig/ztpty.c	1970-01-01 01:00:00.000000000 +0100
-+++ zaptel-1.2.10/ztpty.c	2006-10-19 11:16:47.000000000 +0200
-@@ -0,0 +1,112 @@
-+#include <stdio.h>
-+#include <stdlib.h>
-+#include <unistd.h>
-+#include <errno.h>
-+#include <string.h>
-+#include <fcntl.h>
-+#include <sys/time.h>
-+#include <sys/signal.h>
-+#include <sys/select.h>
-+#include <math.h>
-+#include "zaptel.h"
-+
-+#define SIZE 8000
-+
-+
-+
-+void doit(int fd, int stdinfd) {
-+    fd_set fds;
-+    char inbuffer[4096];
-+    char outbuffer[4096];
-+    int res = 0;
-+    int i = 0;
-+
-+//    fprintf(stderr, "fd %d stdin fd %d\n", fd, stdinfd);
-+
-+    for (;;) {
-+	FD_ZERO(&fds);
-+        FD_SET(fd, &fds);
-+	FD_SET(stdinfd, &fds);
-+        /* Wait for *some* sort of I/O */
-+        res = select(stdinfd + 1, &fds, NULL, NULL, NULL);
-+        if (res < 0) {
-+                fprintf(stderr, "Error in select: %s\n", strerror(errno));
-+                return;
-+        }
-+        if (FD_ISSET(stdinfd, &fds)) {
-+            res = read(stdinfd, inbuffer, sizeof(inbuffer));
-+	    if (res > 0) {
-+//		fprintf(stderr, "read %d bytes from stdin\n", res);
-+		if (res > 0) {
-+		    for (i=0; i < res ; i++) {
-+			if (inbuffer[i] == '\n') {
-+			    if ((i > 0) && (inbuffer[i-1] == ' ')) {
-+				inbuffer[i-1] = 0x1a;
-+			    }
-+			    inbuffer[i] = 0xd;
-+			}
-+		    }
-+		res = write(fd, inbuffer, res+2);
-+//		res = write(STDOUT_FILENO, inbuffer, res);
-+//		fprintf(stderr, "wrote %d bytes to stdout\n", res);
-+		}
-+	    }
-+        }
-+        if (FD_ISSET(fd, &fds)) {
-+            res = read(fd, outbuffer, sizeof(outbuffer));
-+//	    fprintf(stderr, "read %d bytes from fd\n", res);
-+	    if (res > 0) {
-+		res = write(STDOUT_FILENO, outbuffer, res);
-+//		fprintf(stderr, "wrote %d bytes to stdout\n", res);
-+	    }
-+        }
-+    }
-+
-+
-+}
-+
-+int main(int argc, char *argv[])
-+{
-+	int fd;
-+	int stdinfd;
-+	struct zt_params p;
-+	struct zt_bufferinfo bi;
-+	int blocksize=0;
-+	fd = open(argv[1], O_RDWR | O_NONBLOCK);
-+	if (fd < 0) {
-+		fprintf(stderr, "Unable to open zap interface: %s\n", strerror(errno));
-+		exit(1);
-+	}
-+	if (ioctl(fd, ZT_GET_PARAMS, &p)) {
-+		fprintf(stderr, "Unable to get parameters on '%s': %s\n", argv[1], strerror(errno));
-+		exit(1);
-+	}
-+	if ((p.sigtype != ZT_SIG_HDLCRAW) && (p.sigtype != ZT_SIG_HDLCFCS)) {
-+		fprintf(stderr, "%s is in %d signalling, not FCS HDLC or RAW HDLC mode\n", argv[1], p.sigtype);
-+		exit(1);
-+	}
-+
-+	if (ioctl(fd, ZT_GET_BLOCKSIZE, &blocksize)) {
-+		fprintf(stderr, "Unable to get blocksize on '%s': %s\n", argv[1], strerror(errno));
-+		exit(1);
-+	} else {
-+//		fprintf(stderr, "blocksize %d\n", blocksize);
-+	}
-+	
-+	bi.txbufpolicy = ZT_POLICY_IMMEDIATE;
-+        bi.rxbufpolicy = ZT_POLICY_IMMEDIATE;
-+	bi.numbufs = 16;
-+	bi.bufsize = 1024;
-+	if (ioctl(fd, ZT_SET_BUFINFO, &bi)) {
-+		fprintf(stderr, "Unable to set buffer info on '%s': %s\n", argv[1], strerror(errno));
-+		exit(1);
-+	}
-+
-+	stdinfd = open("/dev/stdin", O_RDONLY | O_NONBLOCK);
-+
-+	
-+	doit(fd, stdinfd);
-+	close(stdinfd);
-+	close(fd);
-+	return 0;
-+}

Modified: zaptel/branches/experimental/debian/rules
===================================================================
--- zaptel/branches/experimental/debian/rules	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/rules	2007-01-01 23:07:50 UTC (rev 2889)
@@ -49,6 +49,7 @@
 	dh_testdir
 	dh_testroot
 	dh_clean -k
+	./configure
 	make modules KERNEL_SOURCES=$(KSRC) MODVERSIONS=detect KERNEL=linux-$(KVERS)
 	make install-modules KERNELRELEASE=$(KVERS) INSTALL_PREFIX=$(CURDIR)/debian/$(PKGNAME)
 ifeq (2.6,$(shell echo $(KVERS) | cut -d. -f1-2))
@@ -71,6 +72,7 @@
 build-stamp: patch-stamp
 	dh_testdir
 	
+	./configure
 	$(MAKE) programs
 	$(MAKE) -C xpp/utils
 	touch $@
@@ -121,11 +123,11 @@
 	
 	# driver source code
 	mkdir -p $(TARDIR)/debian
-	cp Makefile .version *.c *.h *.rbt $(TARDIR)/
+	cp Makefile configure install-sh makeopts.in .version *.c *.h *.rbt $(TARDIR)/
 	for dir in build_tools include cwain qozap vzaphfc oct612x wct4xxp xpp zaphfc ztgsm; do \
 	  if [ -d $$dir ]; then cp -r $$dir $(TARDIR); fi; \
 	done
-	dh_install -i zaptel.h torisa.h usr/include/linux/
+	dh_install -i zaptel.h usr/include/zaptel/
 	
 	# Packaging infrastructure
 	cp -r debian/*-modules.* debian/rules debian/changelog debian/copyright\

Modified: zaptel/branches/experimental/debian/watch
===================================================================
--- zaptel/branches/experimental/debian/watch	2007-01-01 19:14:49 UTC (rev 2888)
+++ zaptel/branches/experimental/debian/watch	2007-01-01 23:07:50 UTC (rev 2889)
@@ -5,4 +5,4 @@
 #opts=pasv ftp://ftp.asterisk.org/pub/telephony/zaptel/ zaptel-(.*)\.tar\.gz \
 #	debian  svn-upgrade
 opts=dversionmangle=s/\.dfsg// \
-	http://ftp.digium.com/pub/zaptel/ zaptel-(1.2.*)\.tar\.gz debian svn-upgrade
+	http://ftp.digium.com/pub/zaptel/ zaptel-(1.4.*)\.tar\.gz debian svn-upgrade




More information about the Pkg-voip-commits mailing list