~ubuntu-branches/ubuntu/trusty/isdnutils/trusty

« back to all changes in this revision

Viewing changes to debian/patches/isdnlog-diffs.dpatch

  • Committer: Package Import Robot
  • Author(s): Steve Langasek
  • Date: 2013-11-15 00:02:58 UTC
  • mfrom: (1.1.8) (31.1.1 trusty-proposed)
  • Revision ID: package-import@ubuntu.com-20131115000258-tt9v3gasgrdml07k
Tags: 1:3.25+dfsg1-3.3ubuntu1
* Merge from Debian unstable:
  - resolves licensing issues with package contents.  LP: #511988.
  - includes proper upstream fix for ipppd on ARM.  LP: #453159.
  - resolves isdnutils-base removal failures.  LP: #813771.
  - fixes capiutils init script to not try to mount obsolete capifs.
    LP: #1064347.
* Remaining changes:
  - Switch libreadline5-dev to libreadline-gplv2-dev since this package
    appears to be GPLv2
  - debian/patches/no-imake.patch: Don't build xisdnload/xmonisdn using
    xmkmf/imake.  This patch was dropped in Debian without explanation;
    it still applies and seems to still be a good idea for eventual
    upstreaming, since imake is quite obsolete.
  - capi.conf: Fix typo for fcdsl2 firmware. LP: #189132.
  - Remove dependencies on /etc/inittab.
    - Disable the installation code to modify /etc/inittab.
    - isdnutils-base: Add ttyI0 example script, which needs to be installed
      in /etc/event.d/ttyI0.
    - isdnvboxserver: Add ttyI1 example script, which needs to be installed
      in /etc/event.d/ttyI1.
    - The two upstart scripts need to be edited.
    - Further improvements and documentation welcome.
* Changes included in Debian:
  - replace calls to ./MAKEDEV with /sbin/MAKEDEV
  - Build-depend on ppp-dev.
  - Switch to newer tcl -dev.
  - update to newer automake
  - debian/rules: use autoreconf to update the autotools in the capi20
    directory
  - debian/{compat,rules,*.files,.dirs}: Convert to Multi-arch.
  - debian/libcapi20-dev.install: Remove .la files (no builds use them).
* Changes included upstream:
  - fix for ARM FTBFS.
  - fix bashisms in vboxplay.
  - debian/patches/{config_libdir,toplevel-make}.patch: add CONFIG_LIBDIR
    override to upstream build system to support Multi-arch.
* Dropped changes:
  - kick dpatch to the curb.
* Handle migrating the blacklist file from
  /etc/modprobe.d/blacklist-capiutils.conf to the path used in Debian,
  /etc/modprobe.d/capiutils.conf.
* Handle rename of /etc/ppp/ip-down.d/99-ipppd and /etc/ppp/ip-up.d/00-ipppd
  to /etc/ppp/ip-down.d/ipppd and /etc/ppp/ip-up.d/ipppd
* Handle rename of /etc/init.d/isdnutils to /etc/init.d/isdnutils-base
* Restore standard.tcl to /usr/share/isdnvboxserver/default; maintainer
  scripts must not depend on contents of /usr/share/doc.
* Apply patches that were preserved in the 3.0 (quilt) migration, but
  were inadvertently not applied:
  - debian/patches/capifax.additional_error_codes.patch
  - debian/patches/capifax.3_1kHz_audio.patch
* Drop debian/isdnutils-base.cron.d, which isn't a cronjob example at all
  but an inittab example gone astray.
* debian/dotconfig*: don't use embedded quotes for paths; this confuses
  vbox's Makefiles something fierce, and causes files to be missed from
  debian/tmp'/usr/share/man/' at install time.
* Fix isdnlog and ipppd to not ship files used in the postinst under
  /usr/share/doc.
* Modernize the upstart examples.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#! /bin/sh -e
2
 
 
3
 
# DP: all diffs to the isdnlog directory
4
 
 
5
 
dir=
6
 
if [ $# -eq 3 -a "$2" = '-d' ]; then
7
 
    pdir="-d $3"
8
 
    dir="$3/"
9
 
elif [ $# -ne 1 ]; then
10
 
    echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
11
 
    exit 1
12
 
fi
13
 
case "$1" in
14
 
    -patch)
15
 
        patch $pdir -f --no-backup-if-mismatch -p1 < $0
16
 
        #cd ${dir}gcc && autoconf
17
 
        ;;
18
 
    -unpatch)
19
 
        patch $pdir -f --no-backup-if-mismatch -R -p1 < $0
20
 
        #rm ${dir}gcc/configure
21
 
        ;;
22
 
    *)
23
 
        echo >&2 "usage: `basename $0`: -patch|-unpatch [-d <srcdir>]"
24
 
        exit 1
25
 
esac
26
 
exit 0
27
 
 
28
 
--- isdnutils-3.3.orig/isdnlog/isdnrep/isdnbill.c
29
 
+++ isdnutils-3.3/isdnlog/isdnrep/isdnbill.c
30
 
@@ -856,7 +856,7 @@
31
 
 #ifdef AK
32
 
   auto     FILE    *f = fopen("/www/log/isdn.log", "r");
33
 
 #else
34
 
-  auto     FILE    *f = fopen("/var/log/isdn.log", "r");
35
 
+  auto     FILE    *f = fopen("/var/lib/isdn/calls", "r");
36
 
 #endif
37
 
   auto     char     s[BUFSIZ], sx[BUFSIZ];
38
 
   auto     int      i, l, col, day, lday = UNKNOWN, month, lmonth = UNKNOWN;
39
 
--- isdnutils-3.3.orig/isdnlog/samples/stop
40
 
+++ isdnutils-3.3/isdnlog/samples/stop
41
 
@@ -1,37 +1,53 @@
42
 
 #!/bin/sh
43
 
 
44
 
-# very simple reload-example for the new chargemax feature of isdnlog
45
 
-# this is called by isdnlog every time we get a AOCD and chargesum of
46
 
-# active device is greater then CHARGEMAX.
47
 
-# there are three parameter available:
48
 
+# Very simple reload default for the chargemax feature of isdnlog.
49
 
+# This is called by isdnlog every time we get a AOCD and chargesum of
50
 
+# active device is greater than CHARGEMAX.
51
 
+# there are three parameters available:
52
 
 #
53
 
 #  first ($1) is chargesum-CHARGEMAX
54
 
 # second ($2) is ALIAS as defined in ISDNLOG.CONF
55
 
 #  third ($3) is total chargesum for active device
56
 
 
57
 
+msg=`tempfile -p isdn`
58
 
+
59
 
+myecho() {
60
 
+    echo "$@" >> $msg
61
 
+}
62
 
+
63
 
 case "$1" in
64
 
 5\.*)
65
 
-        echo "WARNING, charge-limit set by CHARGEMAX is reached!" >> /dev/console
66
 
-        echo "$2 is talking to much!" >> /dev/console
67
 
-#        /bin/aplay /usr/sounds/attention.au
68
 
+        myecho "WARNING, charge-limit set by CHARGEMAX is reached!"
69
 
+        myecho "$2 is talking too much!"
70
 
+#        /bin/play /usr/sounds/attention.au
71
 
         ;;
72
 
 
73
 
 10\.* | 11\.* )
74
 
-        echo "WARNING, $2 got charge-overflow == $1, total chargesum == $3" >> /dev/console
75
 
-        echo "next chargeint will cause i4l to stop" >> /dev/console
76
 
-#        /bin/aplay /usr/sounds/earthdestruction.au
77
 
+        myecho "WARNING, $2 got charge-overflow == $1, total chargesum == $3"
78
 
+        myecho "next chargeint will cause i4l to stop"
79
 
+#        /bin/play /usr/sounds/earthdestruction.au
80
 
         ;;
81
 
 
82
 
 20\.* | 21\.* )
83
 
-        echo "reload got charge-overflow == $1, now i4l will be stopped!" >> /dev/console
84
 
-        /sbin/init.d/i4l stop
85
 
+        myecho "reload got charge-overflow == $1, now ipppd will be stopped!"
86
 
+        /sbin/init.d/isdnutils stop ipppd
87
 
         ;;
88
 
 
89
 
 25\.* | 26\.* )
90
 
-        echo "aeh, still alive?! so we'll do a reboot!!" >> /dev/console
91
 
-#        /bin/aplay /usr/sounds/crash.au
92
 
-        /sbin/reboot
93
 
+#        echo "aeh, still alive?! so we'll do a reboot!!" >> /dev/console
94
 
+#        /bin/play /usr/sounds/crash.au
95
 
+#        /sbin/reboot
96
 
+        myecho "still alive?! Stopping ISDN subsystem!"
97
 
+        /usr/sbin/isdnctrl system off
98
 
         ;;
99
 
 esac
100
 
 
101
 
-echo "got charge_ov=$1 dev=$2 scharge=$3 " >> /dev/console
102
 
+myecho "got charge_ov=$1 dev=$2 scharge=$3 "
103
 
+
104
 
+if [ -s "$msg" ]; then
105
 
+    logger -f $msg -p daemon.notice -t isdnlog
106
 
+    cat $msg >> /dev/console
107
 
+fi
108
 
+rm -f $msg
109
 
+
110
 
+exit 0
111
 
--- isdnutils-3.3.orig/isdnlog/samples/rate.conf.default
112
 
+++ isdnutils-3.3/isdnlog/samples/rate.conf.default
113
 
@@ -0,0 +1 @@
114
 
+P:10
115
 
--- isdnutils-3.3.orig/isdnlog/tools/cdb/Makefile.in
116
 
+++ isdnutils-3.3/isdnlog/tools/cdb/Makefile.in
117
 
@@ -43,15 +43,15 @@
118
 
        -rm config.{status,log,h,cache} Makefile .depend
119
 
 
120
 
 install-dirs:
121
 
-       install -d -m0755 $(MAN1DIR) $(MAN3DIR) $(LIBDIR) $(BINDIR) \
122
 
-               $(INCDIR)
123
 
+       install -d -m0755 $(MAN1DIR) $(MAN3DIR) $(LIBDIR) $(BINDIR) $(INCDIR)
124
 
 
125
 
 install:
126
 
-       install -m0755 $(BINS) $(BINDIR)
127
 
-       install -m0644 $(MAN1) $(MAN1DIR)
128
 
-       install -m0644 $(MAN3) $(MAN3DIR)
129
 
-       install -m0644 $(LIBS) $(LIBDIR)
130
 
-       install -m0644 freecdb.h freecdbmake.h $(INCDIR)
131
 
+       true
132
 
+       # install -m0755 $(BINS) $(BINDIR)
133
 
+       # install -m0644 $(MAN1) $(MAN1DIR)
134
 
+       # install -m0644 $(MAN3) $(MAN3DIR)
135
 
+       # install -m0644 $(LIBS) $(LIBDIR)
136
 
+       # install -m0644 freecdb.h freecdbmake.h $(INCDIR)
137
 
 
138
 
 cdbdump: cdbdump.o cdb_unpack.o
139
 
 
140
 
--- isdnutils-3.3.orig/isdnlog/tools/isdnrate.man
141
 
+++ isdnutils-3.3/isdnlog/tools/isdnrate.man
142
 
@@ -136,8 +136,9 @@
143
 
 .P
144
 
 .B \-D
145
 
 Start as a daemon, waiting for connections from a client. The socket
146
 
-.I /tmp/isdnrate
147
 
-is created, which clients can connect to.
148
 
+.I /var/run/isdnrate/socket
149
 
+is created, which clients can connect to
150
 
+(the socket can be changed by using the -O option).
151
 
 .P
152
 
 .B \-D2
153
 
 Start as a daemon and go background.
154
 
@@ -162,8 +163,8 @@
155
 
 provider is used.
156
 
 .P
157
 
 .BI \-O socketfile
158
 
-Write socket to given filename on start of daemon. Default is
159
 
-.IR tmp/isdnrate .
160
 
+Use given filename as the socket on start of daemon. Default is
161
 
+.IR /var/run/isdnrate/socket .
162
 
 .P
163
 
 .BI \-P piddir
164
 
 Write own PID to
165
 
--- isdnutils-3.3.orig/isdnlog/tools/tools.h
166
 
+++ isdnutils-3.3/isdnlog/tools/tools.h
167
 
@@ -586,6 +586,13 @@
168
 
 
169
 
 #define _GNU_SOURCE 1
170
 
 
171
 
+#include <sys/types.h>
172
 
+#include <sys/time.h>
173
 
+#include <sys/times.h>
174
 
+#include <sys/stat.h>
175
 
+#include <sys/resource.h>
176
 
+#include <sys/wait.h>
177
 
+#include <sys/socket.h>
178
 
 #include <stdio.h>
179
 
 #include <string.h>
180
 
 #include <errno.h>
181
 
@@ -594,12 +601,6 @@
182
 
 #include <stdlib.h>
183
 
 #include <stdarg.h>
184
 
 #include <unistd.h>
185
 
-#include <sys/time.h>
186
 
-#include <sys/times.h>
187
 
-#include <sys/types.h>
188
 
-#include <sys/stat.h>
189
 
-#include <sys/wait.h>
190
 
-#include <sys/socket.h>
191
 
 #include <netdb.h>
192
 
 #include <netinet/in.h>
193
 
 #include <arpa/inet.h>
194
 
--- isdnutils-3.3.orig/isdnlog/tools/zone.c
195
 
+++ isdnutils-3.3/isdnlog/tools/zone.c
196
 
@@ -523,7 +523,8 @@
197
 
                from=sto;
198
 
                sto=temp;
199
 
        }
200
 
-       strncpy(newfrom, from, LENGTH-1);
201
 
+       if (newfrom != from)
202
 
+            memmove(newfrom, from, LENGTH-1);
203
 
        while (strlen(newfrom)) {
204
 
                UL lifrom = (UL) atol(newfrom); /* keys could be long */
205
 
                US ifrom = (US) lifrom;
206
 
--- isdnutils-3.3.orig/isdnlog/holiday-default.dat
207
 
+++ isdnutils-3.3/isdnlog/holiday-default.dat
208
 
@@ -0,0 +1,18 @@
209
 
+V:-0.1 default [2001/10/10]
210
 
+
211
 
+W:1            Monday
212
 
+W:2            Tuesday
213
 
+W:3            Wednesday
214
 
+W:4            Thursday
215
 
+W:5            Friday
216
 
+W:6            Saturday
217
 
+W:7            Sunday
218
 
+W:W            weekday
219
 
+W:E            weekend
220
 
+W:H            holiday
221
 
+W:*            everyday
222
 
+
223
 
+D:1.1          New Year's Day
224
 
+D:easter       Easter
225
 
+D:1.5          May Day
226
 
+D:25.12                Christmas
227
 
--- isdnutils-3.3.orig/isdnlog/rate-default.dat
228
 
+++ isdnutils-3.3/isdnlog/rate-default.dat
229
 
@@ -0,0 +1,12 @@
230
 
+V:0.01-default [2001/10/10]
231
 
+
232
 
+U:%.3f UNITS
233
 
+
234
 
+P:10            .
235
 
+B:1234
236
 
+D:x
237
 
+
238
 
+# 1 currency unit per minute
239
 
+Z:1            .
240
 
+A:*
241
 
+T:*/*=1.00/60
242
 
--- ./isdnlog/Makefile.in~      2004-07-24 14:03:36.000000000 +0200
243
 
+++ ./isdnlog/Makefile.in       2004-08-24 19:51:57.000000000 +0200
244
 
@@ -2011,7 +2011,7 @@
245
 
                  $(INSTALL_DATA) $$f $(DESTDIR)$(DATADIR); \
246
 
                  echo Installing $(DESTDIR)$(DATADIR)/$$f; \
247
 
                done
248
 
-               @(grep isdnlog $(SERVICEFILE) >/dev/null) || \
249
 
+               -@(grep isdnlog $(SERVICEFILE) >/dev/null) || \
250
 
                (echo "";echo "";echo "Add a line to the file $(SERVICEFILE)" ;echo "";echo ""; \
251
 
                echo "isdnlog $(SERV_PORT)/tcp        isdnlog" >> $(SERVICEFILE))
252