oversip 0.9.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/debian/control CHANGED
@@ -8,7 +8,7 @@ Standards-Version: 3.9.3
8
8
 
9
9
  Package: oversip
10
10
  Architecture: all
11
- Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.9.1, ruby1.9.1-dev, make, g++, libssl-dev, libev-dev
11
+ Pre-Depends: ${shlibs:Depends}, ${misc:Depends}, ruby1.9.1, ruby1.9.1-dev, make, g++, libssl-dev, libev-dev
12
12
  Recommends: unbound
13
13
  Description: OverSIP (the SIP dreams factory) is an async SIP proxy/server programmable in Ruby language.
14
14
  Some features of OverSIP are:
data/debian/oversip.init CHANGED
@@ -29,54 +29,45 @@ UBUNTU_LOGGING=0
29
29
 
30
30
  [ -r /etc/default/$NAME ] && . /etc/default/$NAME
31
31
 
32
- # Ensure Ruby executable is installed.
33
- which $RUBY_EXE >/dev/null
34
- if [ $? -ne 0 ] ; then
35
- log_failure_msg "ruby1.9.1 is not installed, exiting."
36
- log_end_msg 5
37
- exit 5
38
- fi
39
32
 
40
- # Check whether OverSIP Ruby Gem is installed and get the executable location.
41
- DAEMON=$(which $NAME)
42
- if [ $? -ne 0 ] ; then
43
- log_failure_msg "$DESC ($NAME): Ruby Gem '$RUBY_GEM' is not installed, exiting."
33
+ # Checks for the start action.
34
+ if [ "$1" == "start" ] ; then
44
35
 
45
- case "$1" in
46
- status)
47
- # LSB - 4: program or service status is unknown.
48
- log_end_msg 4
49
- exit 4
50
- ;;
51
- *)
52
- # LSB - 5: program is not installed.
36
+ # Ensure that the admin has set RUN=yes in /etc/default/$NAME file.
37
+ if [ "$RUN" != "yes" ] ; then
38
+ log_failure_msg "$DESC ($NAME) not yet configured. Set RUN=yes in /etc/default/$NAME."
39
+ exit 0
40
+ fi
41
+
42
+ # Ensure Ruby executable is installed.
43
+ which $RUBY_EXE >/dev/null
44
+ if [ $? -ne 0 ] ; then
45
+ log_failure_msg "ruby1.9.1 is not installed, exiting."
53
46
  log_end_msg 5
54
47
  exit 5
55
- ;;
56
- esac
57
- fi
48
+ fi
58
49
 
59
- if [ ! -x $DAEMON ]; then
60
- log_failure_msg "$DESC ($NAME): executable '$DAEMON' does not exist or has not execution access. It should be provided by Ruby Gem '$RUBY_GEM'."
50
+ # Check whether OverSIP Ruby Gem is installed and get the executable location.
51
+ DAEMON=$(which $NAME)
52
+ if [ $? -ne 0 ] ; then
53
+ log_failure_msg "$DESC ($NAME): Ruby Gem '$RUBY_GEM' is not installed, exiting."
54
+
55
+ case "$1" in
56
+ status)
57
+ # LSB - 4: program or service status is unknown.
58
+ log_end_msg 4
59
+ exit 4
60
+ ;;
61
+ *)
62
+ # LSB - 5: program is not installed.
63
+ log_end_msg 5
64
+ exit 5
65
+ ;;
66
+ esac
67
+ fi
61
68
 
62
- case "$1" in
63
- status)
64
- # LSB - 4: program or service status is unknown.
65
- log_end_msg 4
66
- exit 4
67
- ;;
68
- *)
69
- # LSB - 5: program is not installed.
70
- log_end_msg 5
71
- exit 5
72
- ;;
73
- esac
74
69
  fi
75
70
 
76
- if [ "$RUN" != "yes" ] ; then
77
- log_failure_msg "$DESC ($NAME) not yet configured. Set RUN=yes in /etc/default/$NAME."
78
- exit 0
79
- fi
80
71
 
81
72
  PIDFILE="${HOMEDIR}/${PIDFILE_NAME}"
82
73
  OPTIONS="-P ${PIDFILE}"
@@ -147,14 +138,13 @@ case "$1" in
147
138
  --name $NAME
148
139
  res=$?
149
140
 
150
- # Posix MQueue for syslogging is created with owner root (to ensure
151
- # rlimits and so) so it cannot be deleted by $USER when stopping the
152
- # server. This command removes the mqueue when performing the "stop"
153
- # action.
154
- $DAEMON --remove-mqueue "/${NAME}_syslogger"
155
-
156
141
  if [ $res -eq 0 ] ; then
157
142
  log_end_msg 0
143
+ # Posix MQueue for syslogging is created with owner root (to ensure
144
+ # rlimits and so) so it cannot be deleted by a non root user when
145
+ # stopping the server. This command removes the mqueue when performing
146
+ # the "stop" action.
147
+ $DAEMON --remove-mqueue "/${NAME}_syslogger" 2>/dev/null
158
148
  exit 0
159
149
  else
160
150
  log_failure_msg "error, failed to stop."
@@ -200,4 +190,5 @@ case "$1" in
200
190
  log_failure_msg "Usage: /etc/init.d/$NAME {start|stop|restart|force-reload|status}."
201
191
  exit 1
202
192
  ;;
193
+
203
194
  esac
data/debian/postinst CHANGED
@@ -1,7 +1,12 @@
1
- #!/bin/sh
1
+ #!/bin/bash
2
2
 
3
3
  set -e
4
4
 
5
+
6
+ #DEBHELPER#
7
+
8
+ OVERSIP_GEM_VERSION="~>1.0.0"
9
+
5
10
  # summary of how this script can be called:
6
11
  # * <postinst> `configure' <most-recently-configured-version>
7
12
  # * <old-postinst> `abort-upgrade' <new version>
@@ -21,19 +26,26 @@ set -e
21
26
  # `abort-remove' or `abort-deconfigure'.
22
27
 
23
28
  case "$1" in
24
- configure)
25
- adduser --quiet --system --group --disabled-password \
26
- --shell /bin/false --gecos "OverSIP" \
27
- --home /var/run/oversip oversip || true
28
- ;;
29
-
30
- abort-upgrade|abort-remove|abort-deconfigure)
31
- ;;
32
-
33
- *)
34
- echo "postinst called with unknown argument \`$1'" >&2
35
- exit 1
36
- ;;
29
+ configure)
30
+ # Add a Debian system user/group called "oversip".
31
+ adduser --quiet --system --group --disabled-password \
32
+ --shell /bin/false --gecos "OverSIP" \
33
+ --home /var/run/oversip oversip || true
34
+
35
+ # Install the Ruby gem.
36
+ echo "installing 'oversip' Ruby Gem (version $OVERSIP_GEM_VERSION)..."
37
+ gem1.9.1 install oversip --no-rdoc --no-ri --conservative -v $OVERSIP_GEM_VERSION
38
+ ;;
39
+
40
+ abort-upgrade|abort-remove|abort-deconfigure)
41
+ ;;
42
+
43
+ *)
44
+ echo "postinst called with unknown argument \`$1'" >&2
45
+ exit 1
46
+ ;;
37
47
  esac
38
48
 
49
+ exit 0
50
+
39
51
  #DEBHELPER#
data/debian/postrm CHANGED
@@ -1,10 +1,16 @@
1
- #!/bin/sh
1
+ #!/bin/bash
2
2
 
3
3
  #DEBHELPER#
4
4
 
5
5
  if [ "$1" = "purge" ] ; then
6
- # remove user/group on purge
6
+ # Remove the Debian system user/group.
7
7
  deluser --quiet --remove-home oversip &>/dev/null || true
8
+
9
+ # Remove the Ruby gem.
10
+ echo "uninstalling 'oversip' Ruby Gem..."
11
+ gem1.9.1 uninstall oversip -a -x
8
12
  fi
9
13
 
10
14
  exit 0
15
+
16
+ #DEBHELPER#
data/etc/oversip.conf CHANGED
@@ -19,7 +19,7 @@ core:
19
19
  # - _null_: nameservers in /etc/resolv.conf are used.
20
20
  # Default value is _null_.
21
21
  #
22
- nameservers: 127.0.0.1
22
+ nameservers: null
23
23
 
24
24
  # Syslog facility. Can be "user", "local0"..."local7".
25
25
  # By default "user".
@@ -12,7 +12,6 @@ require "openssl"
12
12
 
13
13
  gem "eventmachine-le", ">= 1.1.0"
14
14
  require "eventmachine-le"
15
-
16
15
  gem "iobuffer", ">= 1.1.2"
17
16
  require "iobuffer"
18
17
  gem "em-udns", ">= 0.3.6"
@@ -7,10 +7,10 @@ require "syslog"
7
7
 
8
8
  gem "eventmachine-le", ">= 1.1.0"
9
9
  require "eventmachine-le"
10
-
11
10
  gem "em-posixmq", ">= 0.2.3"
12
11
  require "em-posixmq"
13
12
 
13
+
14
14
  # OverSIP libraries.
15
15
  # (not required to be loaded as needed ones have been already
16
16
  # loaded before forking).
@@ -3,9 +3,9 @@
3
3
  module OverSIP
4
4
 
5
5
  module Version
6
- MAJOR = 0
7
- MINOR = 9
8
- TINY = 1
6
+ MAJOR = 1
7
+ MINOR = 0
8
+ TINY = 0
9
9
  end
10
10
 
11
11
  PROGRAM_NAME = "OverSIP"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: oversip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-11 00:00:00.000000000 Z
12
+ date: 2012-07-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: eventmachine-le
16
- requirement: &13397980 !ruby/object:Gem::Requirement
16
+ requirement: &18605540 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *13397980
24
+ version_requirements: *18605540
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: iobuffer
27
- requirement: &13397340 !ruby/object:Gem::Requirement
27
+ requirement: &18605080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.1.2
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *13397340
35
+ version_requirements: *18605080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: em-posixmq
38
- requirement: &13396680 !ruby/object:Gem::Requirement
38
+ requirement: &18604620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: 0.2.3
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *13396680
46
+ version_requirements: *18604620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: em-udns
49
- requirement: &13396180 !ruby/object:Gem::Requirement
49
+ requirement: &18604160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 0.3.6
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *13396180
57
+ version_requirements: *18604160
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: escape_utils
60
- requirement: &13395700 !ruby/object:Gem::Requirement
60
+ requirement: &18603700 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 0.2.4
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *13395700
68
+ version_requirements: *18603700
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: term-ansicolor
71
- requirement: &13395320 !ruby/object:Gem::Requirement
71
+ requirement: &18603320 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *13395320
79
+ version_requirements: *18603320
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: posix-spawn
82
- requirement: &13394720 !ruby/object:Gem::Requirement
82
+ requirement: &18602860 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,7 +87,7 @@ dependencies:
87
87
  version: '0'
88
88
  type: :runtime
89
89
  prerelease: false
90
- version_requirements: *13394720
90
+ version_requirements: *18602860
91
91
  description: ! "OverSIP is an async SIP server. Built on top of Ruby EventMachine\n
92
92
  \ library it follows the Reactor Pattern, allowing thousands of concurrent connections
93
93
  and requests\n handled by a single processor in a never-blocking fashion. It