[Pkg-voip-commits] r6494 - in /dahdi-tools/trunk/debian: README.Debian changelog control copyright dahdi.dirs dahdi.postinst dahdi.postrm dahdi.prerm patches/init_lsb patches/series rules zaptel.doc-base.astribank zaptel.init zaptel.postinst zaptel.postrm

tzafrir-guest at alioth.debian.org tzafrir-guest at alioth.debian.org
Wed Nov 19 21:26:10 UTC 2008


Author: tzafrir-guest
Date: Wed Nov 19 21:26:10 2008
New Revision: 6494

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=6494
Log:
* Use upstream init.d script.
* Thus we also need postint, prerm and postrm.
* Patch init_lsb: LSB init.d section.
* No more 'zaptel' files: thrown away or renamed.
* README.Debian is mostly done.
* The copyrights file is hopefully OK?

Added:
    dahdi-tools/trunk/debian/dahdi.postinst   (contents, props changed)
      - copied, changed from r6490, dahdi-tools/trunk/debian/zaptel.postinst
    dahdi-tools/trunk/debian/dahdi.postrm   (contents, props changed)
      - copied, changed from r6490, dahdi-tools/trunk/debian/zaptel.postrm
    dahdi-tools/trunk/debian/dahdi.prerm
    dahdi-tools/trunk/debian/patches/init_lsb
Removed:
    dahdi-tools/trunk/debian/zaptel.doc-base.astribank
    dahdi-tools/trunk/debian/zaptel.init
    dahdi-tools/trunk/debian/zaptel.postinst
    dahdi-tools/trunk/debian/zaptel.postrm
Modified:
    dahdi-tools/trunk/debian/README.Debian
    dahdi-tools/trunk/debian/changelog
    dahdi-tools/trunk/debian/control
    dahdi-tools/trunk/debian/copyright
    dahdi-tools/trunk/debian/dahdi.dirs
    dahdi-tools/trunk/debian/patches/series
    dahdi-tools/trunk/debian/rules

Modified: dahdi-tools/trunk/debian/README.Debian
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/README.Debian?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/README.Debian (original)
+++ dahdi-tools/trunk/debian/README.Debian Wed Nov 19 21:26:10 2008
@@ -1,51 +1,4 @@
-Building kernel modules
------------------------
-First, install zaptel-source package if you have not yet done so.
-
-You can build and install the modules package (as root) with the 
-following command:
-# module-assistant a-i zaptel
-
-It may be handy (for e.g., testing purposes) to build the module packages
-for all of the kernel-header packages installed on your system. Something 
-in the lines of:
-
-  m-a -u . -t -i -f -k "`echo usr/src/kernel-headers-*`" build zaptel
-
-You can also use the environment variable TARBALL to build the modules 
-with a custom zaptel.tar.bz2 tarball with some local modifications.
-
-At the moment the 'clean' operation gives there the following error,
-which is known, and is harmless (happens after cleaning the kernel dir),
-so ignore it for now:
-
-  make: *** menuselect: No such file or directory.  Stop.
-  make[1]: [clean] Error 2 (ignored)
-  make: *** ppp: No such file or directory.  Stop.
-  make[1]: *** [clean] Error 2
-
-
-Using udev
-----------
-If you are using udev, zaptel devices will be created when kernel modules 
-are loaded by using modprobe, or devices are detected by hotplug at boot time.
-
-If you cannot access the zap/ctl device, check which user asterisk is 
-running as and add these permissions to your permissions file
-(i.e. /etc/udev/permissions.d/50-udev.permissions):
-# zaptel devices -- asterisk is expected to be part of 'dialout' group
-zap/*:root:dialout:660
-
-Note, however, that beginning with Sarge, the default udev settings should 
-include those lines.
-
-
-Bristuff
---------
-The dahdi-linux package includes support for bristuff drivers. However 
-ztpty that has been part of our patch to Zaptel has been removed. It may 
-be added if someone actively uses it and helps testing that it works.
-
+FIXME: README is still incomplete.
 
 FXOTune
 -------
@@ -78,83 +31,24 @@
 defaultzone=us
 
 
-Echo Canceller
---------------
-Open Source Line Echo Canceller (OSLEC) is an alternative echo canceller 
-developed outside the main Zaptel tree. It is currently labelled "Beta".
-For more information see http://www.rowetel.com/ucasterisk/oslec.html .
-It generally works much better than the default upstream echo canceller
-(MG2). On the downside, it has a higher CPU consumption.
+Blacklisting modules
+--------------------
+DAHDI, As Zaptel before it, has an inherent problem with the dependency 
+on the order of loading of modules (strictly speaking: of order of 
+registration with DAHDI, but in most cases it's the same). The long term
+solution for that would require some changes to both DAHDI and
+Asterisk's chan_dahdi.
 
-We now include OSLEC and make it our default echo canceller. Unlike the
-original distribution of oslec, we include it as part of the Zaptel
-package. It will get built unless we set an alternative echo canceller.
-If you still want to use the original echo MG2 echo canceller, build 
-the zaptel-modules package using:
+In the mean time, upstream has resorted to blacklist all the DAHDI
+modules through modprobe.conf(5) configuration in order to give explicit
+control of their load order in /etc/dahdi/modules . However in Debian
+(at least as of Lenny) the init scripts are run with
+MODPROBE_OPTIONS=-qb . This means that all the blacklisted modules will
+be silently refused to load. See
+http://bugs.digium.com/view.php?id=13910 .
 
-  ECHO_CAN_NAME=MG2 m-a a-i zaptel
-
-The oslec code is the package required some minor changes to the code in
-from the oslec repository. Specifically, I have not included the full copy 
-of spandsp here. Instead I picked only the relevant parts. I also placed 
-all the files in the directory oslec/ except the changes required to the
-zaptel sources and makefiles. I have also separated the implementation
-of the zaptap device to a separate patch, as it has a better chances of
-failing to apply with upcoming version of Zaptel and its functionality
-seems to me less important and not as clean.
-
-The oslec echo canceller can be controlled at runtime through files
-under /proc/oslec . A dialg-based interface is available under
-/usr/share/zaptel/examples/oslec-ctrl-panel.sh .
-
-According to early tests by OSLEC users, the default Asterisk echo
-canceller size of 128 taps (16ms) should be good enough for most
-installations, and 256 taps (32 ms) should cover just about any case. 
-For phones connected to FXS ports you can use substatially lower values
-in order to reduce CPU consumption. e.g: 8ms or even 4 ms (64 taps or 32
-taps).
-
-Setting the number of taps for a channel in Asterisk's chan_zap is done
-using the following in Asterisk's zapata.conf: 
-
-  echocancell=NNN
-
-where NNN is the number of taps. See Asterisk sample zapata.conf .
-
-
-Build-time Tests
-----------------
-One sanity check to run when making changes in the package is to make
-(besides the usual lintian/linda) is to make sure that the modules
-packages still builds.
-
-For this to work you should first have a version of zaptel-source
-installed (any version. modules-assitant needs a few files from it in
-place). This allows you to use the script debian/modulestest as a
-post-build hook:
-
-  svn-buildpackage --svn-postbuild='debian/modulestest -r' --svn-ignore-new -uc -us 
-
-This will rebuild the zaptel-modules for your current kernel, or spend
-much more time with:
-
-  svn-buildpackage --svn-postbuild='debian/modulestest -a' --svn-ignore-new -uc -us 
-
-to build zaptel-modules for all of your currently-installed
-zaptel-modules packages. The log from the build will go to the file
-zaptel-modules-build-<version>.log in the build-area directory. e.g:  
-zaptel-modules-build-1.4.7~dfsg-1.log . 
-
-The script should also run ls for the module packages built. You should 
-chack that all packages were indeed built and that their size looks sane
-(no driver was left unbuilt).
-
-
-If you get the "error":
-  
-  zconfig.h:91:41: error: missing binary operator before token "(" 
-
-It is probably harmless. See http://bugs.digium.com/12426 .
-
-
--- Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>  16 June 2007
+While this can be trivially patched in the init script, I feel
+uncomfortable to fix it in order to allow a workaround to work. Another
+way to explicitly control the order of modules load is using
+/etc/modules . You'll probably need to write the same list of modules in
+/etc/modules and /etc/dahdi/modules .

Modified: dahdi-tools/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/changelog?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/changelog (original)
+++ dahdi-tools/trunk/debian/changelog Wed Nov 19 21:26:10 2008
@@ -6,8 +6,11 @@
   * New libtonezone version: 2.0 due to its usage of DAHDI.
   * Programs renamed. E.g. dahdi_cfg instead of ztcfg.
   * Configurations files are now under /etc/dahdi .
-
- -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Tue, 26 Aug 2008 10:04:39 +0300
+  * Using the upstream init.d script. This script is responsible for 
+    loading modules unlike the Zaptel one.
+  * Patch init_lsb: Added LSB comments to init script.
+
+ -- Tzafrir Cohen <tzafrir.cohen at xorcom.com>  Wed, 19 Nov 2008 21:29:21 +0200
 
 zaptel (1:1.4.11~dfsg-3) unstable; urgency=low
 

Modified: dahdi-tools/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/control?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/control (original)
+++ dahdi-tools/trunk/debian/control Wed Nov 19 21:26:10 2008
@@ -14,6 +14,7 @@
 Architecture: any
 Depends: ${shlibs:Depends}, procps, fxload
 Conflicts: zaptel
+Replaces: zaptel
 Description: utilities for using the DAHDI kernel modules
  Userspace utilities for configuring the Zapata telephony kernel driver, 
  which supports various telephony hardware, such as Wildcard series of

Modified: dahdi-tools/trunk/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/copyright?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/copyright (original)
+++ dahdi-tools/trunk/debian/copyright Wed Nov 19 21:26:10 2008
@@ -3,9 +3,6 @@
 
 It was downloaded from
   http://downloads.digium.com/pub/telephony/dahdi-tools/
-
-FIXME: UPDATE THIS FILE. Make Lintian remind that:
-Upstream Author(s):
 
 Copyright: (from dahdi_cfg.c)
 

Modified: dahdi-tools/trunk/debian/dahdi.dirs
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/dahdi.dirs?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/dahdi.dirs (original)
+++ dahdi-tools/trunk/debian/dahdi.dirs Wed Nov 19 21:26:10 2008
@@ -1,3 +1,1 @@
-etc/modprobe.d
-etc/udev/rules.d
-usr/share/lintian/overrides
+etc/init.d

Copied: dahdi-tools/trunk/debian/dahdi.postinst (from r6490, dahdi-tools/trunk/debian/zaptel.postinst)
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/dahdi.postinst?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/zaptel.postinst (original)
+++ dahdi-tools/trunk/debian/dahdi.postinst Wed Nov 19 21:26:10 2008
@@ -33,17 +33,17 @@
         #MAKEDEV zaptel
 
 	if [ ! chrooted -a ! -e /dev/.devfsd -a ! -e /dev/.udevdb -a ! -e /dev/.udev ]; then
-        	mkdir -p /dev/zap
-	        mknod_safe /dev/zap/ctl c 196 0
-        	mknod_safe /dev/zap/transcode c 196 250
-        	mknod_safe /dev/zap/timer c 196 253
-	        mknod_safe /dev/zap/channel c 196 254
-        	mknod_safe /dev/zap/pseudo c 196 255
+        	mkdir -p /dev/dahdi
+	        mknod_safe /dev/dahdi/ctl c 196 0
+        	mknod_safe /dev/dahdi/transcode c 196 250
+        	mknod_safe /dev/dahdi/timer c 196 253
+	        mknod_safe /dev/dahdi/channel c 196 254
+        	mknod_safe /dev/dahdi/pseudo c 196 255
 		for N in `seq 249`; do
-	                mknod_safe /dev/zap/$N c 196 $N
+	                mknod_safe /dev/dahdi/$N c 196 $N
         	done
-		chown 0:dialout /dev/zap/ -R
-		chmod 0660 /dev/zap/*
+		chown 0:dialout /dev/dahdi/ -R
+		chmod 0660 /dev/dahdi/*
 	fi
 
     ;;

Propchange: dahdi-tools/trunk/debian/dahdi.postinst
------------------------------------------------------------------------------
    svn:mergeinfo = 

Copied: dahdi-tools/trunk/debian/dahdi.postrm (from r6490, dahdi-tools/trunk/debian/zaptel.postrm)
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/dahdi.postrm?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/zaptel.postrm (original)
+++ dahdi-tools/trunk/debian/dahdi.postrm Wed Nov 19 21:26:10 2008
@@ -1,11 +1,3 @@
 #! /bin/sh -e
 
-if [ "$1" = 'purge' ]; then
-	# leftovers from the Sarge:
-        rm -f /etc/modutils/zaptel /etc/udev/rules.d/zaptel.perms
-
-	# leftovers from Etch:
-	rm -f /etc/zaptel.conf
-fi
-
 #DEBHELPER#

Propchange: dahdi-tools/trunk/debian/dahdi.postrm
------------------------------------------------------------------------------
    svn:mergeinfo = 

Added: dahdi-tools/trunk/debian/dahdi.prerm
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/dahdi.prerm?rev=6494&op=file
==============================================================================
--- dahdi-tools/trunk/debian/dahdi.prerm (added)
+++ dahdi-tools/trunk/debian/dahdi.prerm Wed Nov 19 21:26:10 2008
@@ -1,0 +1,3 @@
+#! /bin/sh -e
+
+#DEBHELPER#

Added: dahdi-tools/trunk/debian/patches/init_lsb
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/patches/init_lsb?rev=6494&op=file
==============================================================================
--- dahdi-tools/trunk/debian/patches/init_lsb (added)
+++ dahdi-tools/trunk/debian/patches/init_lsb Wed Nov 19 21:26:10 2008
@@ -1,0 +1,24 @@
+Add LSB comments to the init script.
+
+Should be included in next upstream release (2.1.0 final or so).
+
+--- a/dahdi.init
++++ b/dahdi.init
+@@ -8,6 +8,17 @@
+ #
+ # config: /etc/dahdi/init.conf
+ 
++### BEGIN INIT INFO
++# Provides:        dahdi
++# Required-Start:  $local_fs $remote_fs
++# Required-Stop:
++# Should-Start:    $network $syslog
++# Should-Stop:
++# Default-Start:   2 3 4 5
++# Default-Stop:    0 1 6
++# Description:     dahdi - load and configure DAHDI modules
++### END INIT INFO
++
+ initdir=/etc/init.d
+ 
+ # Don't edit the following values. Edit /etc/dahdi/init.conf instead.

Modified: dahdi-tools/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/patches/series?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/patches/series (original)
+++ dahdi-tools/trunk/debian/patches/series Wed Nov 19 21:26:10 2008
@@ -1,3 +1,4 @@
 # Patch needs to be revised anyway:
 #ztcfg-start_stop
 zaptel_perl
+init_lsb

Modified: dahdi-tools/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/dahdi-tools/trunk/debian/rules?rev=6494&op=diff
==============================================================================
--- dahdi-tools/trunk/debian/rules (original)
+++ dahdi-tools/trunk/debian/rules Wed Nov 19 21:26:10 2008
@@ -71,9 +71,6 @@
 
 	dh_install -a --sourcedir=$(CURDIR)/debian/tmp 
 
-	cp debian/$(PREFIX).lintian \
-	  $(CURDIR)/debian/$(PREFIX)/usr/share/lintian/overrides/$(PREFIX)
-
 install-indep: build-stamp
 	dh_testdir
 	dh_testroot
@@ -102,12 +99,12 @@
 	dh_testdir
 	dh_testroot
 	
-	#install -m644 debian/$(PREFIX).modprobe.d debian/$(PREFIX)/etc/modprobe.d/$(PREFIX)
+	install $(PREFIX).init debian/$(PREFIX)/etc/init.d/$(PREFIX)
 	
 	dh_installdocs -a
 	
 	# should be removed, eventually. Still left for compatibility
-	dh_installinit --update-rcd-params="defaults 15 30"
+	dh_installinit -a -o --update-rcd-params="defaults 15 30"
 	dh_installexamples -a *.conf.sample
 
 	




More information about the Pkg-voip-commits mailing list