tags 473704 + patch thanks Two alternate patches are attached - the first fixes this problem by introducing a patch system (quilt), the second fixes the problem by patching the files directly.
Regards,
--
Chris Lamb, UK [EMAIL PROTECTED]
GPG: 0x634F9A20
diff -urNad ser-0.9.7.orig/debian/control ser-0.9.7/debian/control --- ser-0.9.7.orig/debian/control 2008-04-08 08:52:51.000000000 +0100 +++ ser-0.9.7/debian/control 2008-04-08 09:03:02.000000000 +0100 @@ -3,7 +3,7 @@ Priority: optional Maintainer: Debian VoIP Team <[EMAIL PROTECTED]> Uploaders: Mark Purcell <[EMAIL PROTECTED]>, Andrei Pelinescu-Onciul <[EMAIL PROTECTED]>, Jan Janak <[EMAIL PROTECTED]>, Kilian Krause <[EMAIL PROTECTED]> -Build-Depends: debhelper (>= 4), libmysqlclient15-dev | libmysqlclient-dev, libexpat1-dev, libradiusclient-ng-dev, libxml2-dev, libpq-dev, bison, flex, dpkg-dev (>= 1.13.19) +Build-Depends: debhelper (>= 4), libmysqlclient15-dev | libmysqlclient-dev, libexpat1-dev, libradiusclient-ng-dev, libxml2-dev, libpq-dev, bison, flex, dpkg-dev (>= 1.13.19), quilt Standards-Version: 3.5.2 Homepage: http://www.iptel.org/ser/ Vcs-Svn: svn://svn.debian.org/pkg-voip/ser/trunk/ diff -urNad ser-0.9.7.orig/debian/patches/01-bashisms.diff ser-0.9.7/debian/patches/01-bashisms.diff --- ser-0.9.7.orig/debian/patches/01-bashisms.diff 1970-01-01 01:00:00.000000000 +0100 +++ ser-0.9.7/debian/patches/01-bashisms.diff 2008-04-08 09:04:05.000000000 +0100 @@ -0,0 +1,55 @@ + + * Fix bashisms + + -- Chris Lamb <[EMAIL PROTECTED]> Tue, 08 Apr 2008 09:03:41 +0100 + +diff -urNad ser-0.9.7.orig/debian/ser.init ser-0.9.7/debian/ser.init +--- ser-0.9.7.orig/debian/ser.init 2008-04-08 08:52:51.000000000 +0100 ++++ ser-0.9.7/debian/ser.init 2008-04-08 08:58:54.000000000 +0100 +@@ -71,8 +71,11 @@ + (($DAEMON -c 2>&1) | grep "config file ok, exiting") > /dev/null + if [ $? -ne 0 ]; then + ($DAEMON -c 2>&1) +- echo -e "\nThere are errors in the configuration file. Please fix them first" +- echo -e "\n$out\n" ++ echo ++ echo "There are errors in the configuration file. Please fix them first" ++ echo ++ echo "$out" ++ echo + exit 0 + fi + echo -n "Restarting $DESC: $NAME" +diff -urNad ser-0.9.7.orig/scripts/sc ser-0.9.7/scripts/sc +--- ser-0.9.7.orig/scripts/sc 2008-04-08 08:52:51.000000000 +0100 ++++ ser-0.9.7/scripts/sc 2008-04-08 08:59:31.000000000 +0100 +@@ -562,7 +562,7 @@ + add|rm) + MODE=$1; + +- if [ "$MODE" == "add" ] ; then ++ if [ "$MODE" = "add" ] ; then + ARG_NUM=3; + else + ARG_NUM=2; +@@ -914,7 +914,7 @@ + chmod a+w $path + trap "rm $path; clear; echo 'sc monitor ^C-ed'; exit 1" 2 + attempt=0 +- if [ "$2" == "" ]; then ++ if [ -z "$2" ]; then + loops=-1; + else + loops=$2; +diff -urNad ser-0.9.7.orig/scripts/ser_mysql.sh ser-0.9.7/scripts/ser_mysql.sh +--- ser-0.9.7.orig/scripts/ser_mysql.sh 2008-04-08 08:52:51.000000000 +0100 ++++ ser-0.9.7/scripts/ser_mysql.sh 2008-04-08 08:57:27.000000000 +0100 +@@ -170,7 +170,7 @@ + + #PHPLIB_ID of users should be difficulty to guess for security reasons + NOW=`date`; +- PHPLIB_ID=`$GENHA1 "$RANDOM" "$NOW" $SIP_DOMAIN` ++ PHPLIB_ID=`$GENHA1 "$(dd if=/dev/urandom count=1 2>/dev/null | cksum | cut -b-5)" "$NOW" $SIP_DOMAIN` + if [ $? -ne 0 ] ; then + echo "PHPLIB_ID calculation failed" + exit 1 diff -urNad ser-0.9.7.orig/debian/patches/series ser-0.9.7/debian/patches/series --- ser-0.9.7.orig/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ ser-0.9.7/debian/patches/series 2008-04-08 09:03:25.000000000 +0100 @@ -0,0 +1 @@ +01-bashisms.diff diff -urNad ser-0.9.7.orig/debian/rules ser-0.9.7/debian/rules --- ser-0.9.7.orig/debian/rules 2008-04-08 08:52:51.000000000 +0100 +++ ser-0.9.7/debian/rules 2008-04-08 09:03:00.000000000 +0100 @@ -18,6 +18,7 @@ # 2005-06-23 added cpl-c, pa & re-enabled radius (with libradiusclient-ng) # (andrei) +include /usr/share/quilt/quilt.make DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH) DEBVERSION:=$(shell head -n 1 debian/changelog \ @@ -77,7 +78,7 @@ export CFLAGS -configure: configure-stamp +configure: patch configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. @@ -103,7 +104,7 @@ #/usr/bin/docbook-to-man debian/ser.sgml > ser.1 touch build-stamp -clean: +clean: unpatch dh_testdir dh_testroot rm -f build-stamp configure-stamp
diff -urNad ser-0.9.7.orig/debian/ser.init ser-0.9.7/debian/ser.init
--- ser-0.9.7.orig/debian/ser.init 2008-04-08 08:52:51.000000000 +0100
+++ ser-0.9.7/debian/ser.init 2008-04-08 08:58:54.000000000 +0100
@@ -71,8 +71,11 @@
(($DAEMON -c 2>&1) | grep "config file ok, exiting") > /dev/null
if [ $? -ne 0 ]; then
($DAEMON -c 2>&1)
- echo -e "\nThere are errors in the configuration file. Please fix
them first"
- echo -e "\n$out\n"
+ echo
+ echo "There are errors in the configuration file. Please fix them
first"
+ echo
+ echo "$out"
+ echo
exit 0
fi
echo -n "Restarting $DESC: $NAME"
diff -urNad ser-0.9.7.orig/scripts/sc ser-0.9.7/scripts/sc
--- ser-0.9.7.orig/scripts/sc 2008-04-08 08:52:51.000000000 +0100
+++ ser-0.9.7/scripts/sc 2008-04-08 08:59:31.000000000 +0100
@@ -562,7 +562,7 @@
add|rm)
MODE=$1;
- if [ "$MODE" == "add" ] ; then
+ if [ "$MODE" = "add" ] ; then
ARG_NUM=3;
else
ARG_NUM=2;
@@ -914,7 +914,7 @@
chmod a+w $path
trap "rm $path; clear; echo 'sc monitor ^C-ed'; exit 1" 2
attempt=0
- if [ "$2" == "" ]; then
+ if [ -z "$2" ]; then
loops=-1;
else
loops=$2;
diff -urNad ser-0.9.7.orig/scripts/ser_mysql.sh ser-0.9.7/scripts/ser_mysql.sh
--- ser-0.9.7.orig/scripts/ser_mysql.sh 2008-04-08 08:52:51.000000000 +0100
+++ ser-0.9.7/scripts/ser_mysql.sh 2008-04-08 08:57:27.000000000 +0100
@@ -170,7 +170,7 @@
#PHPLIB_ID of users should be difficulty to guess for security reasons
NOW=`date`;
- PHPLIB_ID=`$GENHA1 "$RANDOM" "$NOW" $SIP_DOMAIN`
+ PHPLIB_ID=`$GENHA1 "$(dd if=/dev/urandom count=1 2>/dev/null | cksum | cut
-b-5)" "$NOW" $SIP_DOMAIN`
if [ $? -ne 0 ] ; then
echo "PHPLIB_ID calculation failed"
exit 1
signature.asc
Description: PGP signature

