[Pkg-voip-commits] r8572 - in /yxa/trunk/debian: ./ patches/ patches/t/ patches/t/feature/ patches/t/fix/

mikma-guest at alioth.debian.org mikma-guest at alioth.debian.org
Mon Jul 19 16:33:26 UTC 2010


Author: mikma-guest
Date: Mon Jul 19 16:33:24 2010
New Revision: 8572

URL: http://svn.debian.org/wsvn/pkg-voip/?sc=1&rev=8572
Log:
Update yxa release, upstream changed to git

Added:
    yxa/trunk/debian/patches/series
    yxa/trunk/debian/patches/t/
    yxa/trunk/debian/patches/t/feature/
    yxa/trunk/debian/patches/t/feature/yxa_yaws.diff
    yxa/trunk/debian/patches/t/feature/yxa_yaws_makefile.diff
    yxa/trunk/debian/patches/t/fix/
    yxa/trunk/debian/patches/t/fix/init_start.diff
    yxa/trunk/debian/patches/t/fix/net_util.diff
Removed:
    yxa/trunk/debian/patches/00list
    yxa/trunk/debian/patches/autoconf.dpatch
    yxa/trunk/debian/patches/autoconf_gen.dpatch
    yxa/trunk/debian/patches/config.dpatch
    yxa/trunk/debian/patches/erlang-auto-rel.dpatch
    yxa/trunk/debian/patches/fix_via_sentby_proto.dpatch
    yxa/trunk/debian/patches/inet_dns.dpatch
    yxa/trunk/debian/patches/init_start.dpatch
    yxa/trunk/debian/patches/loop_fix_orig_uri.dpatch
    yxa/trunk/debian/patches/net_util.dpatch
    yxa/trunk/debian/patches/ssl_util.dpatch
    yxa/trunk/debian/patches/yxa_yaws.dpatch
    yxa/trunk/debian/patches/yxa_yaws_makefile.dpatch
Modified:
    yxa/trunk/debian/changelog
    yxa/trunk/debian/compat
    yxa/trunk/debian/control
    yxa/trunk/debian/get-orig-source.sh
    yxa/trunk/debian/rules
    yxa/trunk/debian/yxa.init

Modified: yxa/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/changelog?rev=8572&op=diff
==============================================================================
--- yxa/trunk/debian/changelog (original)
+++ yxa/trunk/debian/changelog Mon Jul 19 16:33:24 2010
@@ -1,15 +1,10 @@
-yxa (1.0+20090827-1~1) UNRELEASED; urgency=low
+yxa (1.0+git5aeee79-1~1) UNRELEASED; urgency=low
   * Initial release (Closes: #377617)
-  * Auto-detect SSL-PKIX.hrl renamed to OTP-PKIX.hrl in OTP R12B-0.
   * Start applications using -s switch to erl instead of using custom boot
     file, except when running distribution over ssl.
   * Add LSB keyword section to init file, and return proper exit status
     codes.
   * Updated to policy version 3.7.3. No changes required.
   * Fixed lintian warning: debian-rules-ignores-make-clean-error.
-  * Fixed loop detection.
-  * Fix CANCEL Via transport matching.
-  * Update test case after changes of loop detection.
-  * Update test cases after changes of Via transport matching.
 
- -- Mikael Magnusson <mikma at users.sourceforge.net>  Thu, 16 Jul 2009 22:59:12 +0200
+ -- Mikael Magnusson <mikma at users.sourceforge.net>  Thu, 01 Jul 2010 00:21:12 +0200

Modified: yxa/trunk/debian/compat
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/compat?rev=8572&op=diff
==============================================================================
--- yxa/trunk/debian/compat (original)
+++ yxa/trunk/debian/compat Mon Jul 19 16:33:24 2010
@@ -1,1 +1,1 @@
-5
+7

Modified: yxa/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/control?rev=8572&op=diff
==============================================================================
--- yxa/trunk/debian/control (original)
+++ yxa/trunk/debian/control Mon Jul 19 16:33:24 2010
@@ -3,8 +3,9 @@
 Priority: optional
 Maintainer: Debian VoIP Team <pkg-voip-maintainers at lists.alioth.debian.org>
 Uploaders: Kilian Krause <kilian at debian.org>, Jose Carlos Garcia Sogo <jsogo at debian.org>, Mark Purcell <msp at debian.org>, Mikael Magnusson <mikma at users.sourceforge.net>
-Build-Depends: debhelper (>= 5), dpatch, autotools-dev, erlang-base
- | erlang-base-hipe, erlang-dev, erlang-nox, yaws
+Build-Depends: debhelper (>= 7), autotools-dev, automake (>=
+ 2.64), erlang-base | erlang-base-hipe, erlang-dev, erlang-nox,
+ erlang-src, yaws, cdbs, topgit, quilt
 Standards-Version: 3.7.3
 Homepage: http://www.stacken.kth.se/project/yxa/
 Vcs-Svn: svn://svn.debian.org/pkg-voip/yxa/trunk/

Modified: yxa/trunk/debian/get-orig-source.sh
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/get-orig-source.sh?rev=8572&op=diff
==============================================================================
--- yxa/trunk/debian/get-orig-source.sh (original)
+++ yxa/trunk/debian/get-orig-source.sh Mon Jul 19 16:33:24 2010
@@ -1,6 +1,8 @@
-#!/bin/sh
+#!/bin/bash
 
 set -e
+
+pkg_name=yxa
 
 function get_svn
 {
@@ -9,7 +11,7 @@
     local filename=$3
     local svnrev=$4
 
-    local srcdir=yxa-${upversion}.orig
+    local srcdir=${pkg_name}-${upversion}.orig
 
     echo Downloading ${filename} from ${url} rev ${svnrev}
     svn export -q -r$svnrev --non-interactive $url ../tarballs/${srcdir}
@@ -21,6 +23,32 @@
     GZIP=-9 tar -b1 -czf ../tarballs/${filename} -C ../tarballs ${srcdir}
     echo Cleaning up
     rm -rf ../tarballs/${srcdir}
+}
+
+function get_github
+{
+    echo get_github
+    local upversion=$1
+    local url=$2
+    local filename=$3
+    local rev=$4
+    local tmpname=${filename}.tmp
+    local gituser=$(echo ${url} | sed -e 's|http://[^/]*/\([^/]*\)/.*|\1|')
+    local gitrepo=$(echo ${url} | sed -e 's|http://[^/]*/[^/]*/\([^/]*\)/.*|\1|')
+    local revprefix=$(echo ${rev} | sed -e 's/^\(.......\).*$/\1/')
+    local srcdir="${gituser}-${gitrepo}-${revprefix}"
+
+    echo Downloading ${filename} from ${url} rev ${rev}
+    wget -nv -T10 -t3 -O ../tarballs/${tmpname} ${url}
+    (cd ../tarballs && tar xzf ${tmpname})
+    echo Autoconf
+    (cd ../tarballs/${srcdir} && ./bootstrap)
+    echo Clean up snapshot
+    rm -rf ../tarballs/${srcdir}/autom4te.cache
+    echo Building snapshot tarball
+    GZIP=-9 tar -b1 -czf ../tarballs/${filename} -C ../tarballs ${srcdir}
+    echo Cleaning up
+    rm -rf ../tarballs/${srcdir} ../tarballs/${tmpname}
 }
 
 function get_http
@@ -49,7 +77,7 @@
 upversion=$1
 url=$2
 
-filename=yxa_${upversion}.orig.tar.gz
+filename=${pkg_name}_${upversion}.orig.tar.gz
 
 if echo $url | grep ^svn ; then
     if [ -z "$3" ]; then
@@ -59,6 +87,14 @@
     fi
     svnrev=$3
     get_svn $upversion $url $filename $svnrev
+elif echo $url | grep github.com ; then
+    if [ -z "$3" ]; then
+	echo Missing parameter revision
+	usage
+	exit 1
+    fi
+    rev=$3
+    get_github $upversion $url $filename $rev
 else
     echo not svn
     get_http $url $filename

Added: yxa/trunk/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/patches/series?rev=8572&op=file
==============================================================================
--- yxa/trunk/debian/patches/series (added)
+++ yxa/trunk/debian/patches/series Mon Jul 19 16:33:24 2010
@@ -1,0 +1,4 @@
+t/feature/yxa_yaws.diff -p1
+t/feature/yxa_yaws_makefile.diff -p1
+t/fix/init_start.diff -p1
+t/fix/net_util.diff -p1

Added: yxa/trunk/debian/patches/t/feature/yxa_yaws.diff
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/patches/t/feature/yxa_yaws.diff?rev=8572&op=file
==============================================================================
--- yxa/trunk/debian/patches/t/feature/yxa_yaws.diff (added)
+++ yxa/trunk/debian/patches/t/feature/yxa_yaws.diff Mon Jul 19 16:33:24 2010
@@ -1,0 +1,328 @@
+From: Mikael Magnusson <mikma264 at gmail.com>
+Subject: [PATCH] t/feature/yxa_yaws
+
+YXA embedded Yaws web server application.
+
+Signed-off-by: Mikael Magnusson <mikma at users.sourceforge.net>
+
+---
+ yaws/src/yxa_yaws.app-in  |   13 ++++
+ yaws/src/yxa_yaws.rel-in  |    6 ++
+ yaws/src/yxa_yaws_app.erl |  134 +++++++++++++++++++++++++++++++++++++++++++++
+ yaws/src/yxa_yaws_ctl.erl |  100 +++++++++++++++++++++++++++++++++
+ yaws/src/yxa_yaws_sup.erl |   28 +++++++++
+ 5 files changed, 281 insertions(+), 0 deletions(-)
+
+diff --git a/yaws/src/yxa_yaws.app-in b/yaws/src/yxa_yaws.app-in
+new file mode 100644
+index 0000000..6dc79f0
+--- /dev/null
++++ b/yaws/src/yxa_yaws.app-in
+@@ -0,0 +1,13 @@
++{application, yxa_yaws,
++ [{description, "YXA Yaws server"},
++  {vsn,"0.0"},
++  {modules, [
++	     yxa_yaws_app,
++	     yxa_yaws_ctl
++	    ]},
++  {registered, [
++	       ]},
++%%  {mod, {yxa_yaws_app, []}},
++  {env, []},
++  {applications,
++        [kernel, stdlib, yaws]}]}.
+diff --git a/yaws/src/yxa_yaws.rel-in b/yaws/src/yxa_yaws.rel-in
+new file mode 100644
+index 0000000..88b5442
+--- /dev/null
++++ b/yaws/src/yxa_yaws.rel-in
+@@ -0,0 +1,6 @@
++%% Erlang OTP R11B-1 library versions
++{release, {"YXA embedded Yaws web server","0.0"}, {erts, "5.2"},
++ [{kernel,"@ERLANG_LIB_VER_kernel@"},
++  {stdlib,"@ERLANG_LIB_VER_stdlib@"},
++  {yaws, "@ERLANG_LIB_VER_yaws@"},
++  {yxa_yaws, "0.0"}]}.
+diff --git a/yaws/src/yxa_yaws_app.erl b/yaws/src/yxa_yaws_app.erl
+new file mode 100644
+index 0000000..f7b2180
+--- /dev/null
++++ b/yaws/src/yxa_yaws_app.erl
+@@ -0,0 +1,134 @@
++%%%-------------------------------------------------------------------
++%%% File    : yxa_yaws_app.erl
++%%% Author  : Mikael Magnusson <mikma at users.sourceforge.net>
++%%% Descrip.: YXA embedded Yaws web server application.
++%%% Created : 1 Aug 2006
++%%%           by Mikael Magnusson <mikma at users.sourceforge.net>
++%%%-------------------------------------------------------------------
++-module(yxa_yaws_app).
++
++-behaviour(application).
++
++%% application callbacks
++-export([start/2, stop/1]).
++
++%% api:s
++-export([start/0, reload/0, stop/0, restart/0, status/0]).
++
++-include_lib("yaws/include/yaws.hrl").
++
++%% application callbacks
++start(normal, []) ->
++    ok = start_yaws(),
++    yxa_yaws_sup:start_link().
++
++stop(_State) ->
++    ok.
++
++%%--------------------------------------------------------------------
++%% Function: start
++%% Descrip.: Start and configure the yaws web server application
++%% Returns : ok
++%%--------------------------------------------------------------------
++start() ->
++    start_yaws().
++
++start_yaws() ->
++    ok = application:set_env(yaws, embedded, true),
++%%    yaws:start(),
++    set_yaws_config().
++
++
++%%--------------------------------------------------------------------
++%% Function: reload
++%% Descrip.: Reload configuration of the yaws web server application
++%% Returns : ok
++%%--------------------------------------------------------------------
++reload() ->
++    set_yaws_config().
++
++
++set_yaws_config() ->
++    {ok, DefaultIncdir} = inc_dir(?MODULE),
++    Includedir = get_env_default(includedir, DefaultIncdir),
++    Docroot = get_env_default(docroot, ?DOCROOT),
++    Tmpdir = get_env_default(tmpdir, ?CACHEDIR),
++    Logdir = get_env_default(logdir, ?LOGDIR),
++    GC = yaws_config:make_default_gconf(false, "yxa"),
++    SC = #sconf{port = 8888,
++		servername = "localhost",
++		listen = {127,0,0,1},
++		docroot = Docroot},
++    MyGC = GC#gconf{logdir=Logdir,
++		    include_dir=GC#gconf.include_dir ++ [Includedir]},
++    ok = yaws_api:setconf(MyGC, [[SC]]).
++
++get_env_default(Param, Default) ->
++    case application:get_env(yxa_yaws, Param) of
++	{ok, Value} ->
++	    Value;
++	undefined ->
++	    Default
++    end.
++
++inc_dir(Module) ->
++    Filename = code:which(Module),
++    Dir = filename:dirname(Filename),
++    IncDir = filename:join(Dir, "include"),
++    case filelib:is_dir(IncDir) of
++	true ->
++	    {ok, IncDir};
++	false ->
++	    {ok, filename:join(filename:dirname(Dir), "include")}
++    end.
++
++
++%%--------------------------------------------------------------------
++%% Function: stop
++%% Descrip.: Stop yaws web server application and terminate system
++%% Returns : void
++%%--------------------------------------------------------------------
++stop() ->
++    %%stop_yaws(),
++    %% Need to stop yxa_yaws_app manually
++    %%application:stop(yxa_yaws_app),
++    init:stop().
++
++%% stop_yaws() ->
++%%    application:stop(yaws).
++
++
++%%--------------------------------------------------------------------
++%% Function: restart()
++%% Descrip.: restart application.
++%% Returns : does not return
++%%--------------------------------------------------------------------
++restart() ->
++    %%    logger:log(normal, "yxa_yaws: restarting"),
++    init:restart().
++
++
++%%--------------------------------------------------------------------
++%% Function: status
++%% Descrip.: Check if yaws is running
++%% Returns : ok | {error, {not_started, yaws}}
++%%--------------------------------------------------------------------
++status() ->
++    check_running(yaws).
++
++
++%%--------------------------------------------------------------------
++%% Function: check_running(AppName)
++%%           AppName = atom(), Application name
++%% Descrip.: Check if an application is running
++%% Returns : ok | {error, {not_started, AppName}}
++%%--------------------------------------------------------------------
++check_running(AppName) ->
++    check_running(AppName, application:which_applications()).
++
++check_running(AppName, [{AppName, _Desc, _Vsn}|_R]) ->
++    ok;
++check_running(AppName, []) ->
++    {error, {not_started, AppName}};
++check_running(_AppName, [_AppName2|R]) ->
++    check_running(_AppName, R).
+diff --git a/yaws/src/yxa_yaws_ctl.erl b/yaws/src/yxa_yaws_ctl.erl
+new file mode 100644
+index 0000000..843094d
+--- /dev/null
++++ b/yaws/src/yxa_yaws_ctl.erl
+@@ -0,0 +1,100 @@
++%%%-------------------------------------------------------------------
++%%% File    : yxa_yaws_ctl.erl
++%%% Author  : Mikael Magnusson <mikma at users.sourceforge.net>
++%%% Descrip.: YXA embedded Yaws web server control
++%%% Created : 1 Aug 2006
++%%%           by Mikael Magnusson <mikma at users.sourceforge.net>
++%%%           based on yxa_ctl.erl
++%%%-------------------------------------------------------------------
++
++-module(yxa_yaws_ctl).
++
++%% api:s
++-export([start/0]).
++
++%%--------------------------------------------------------------------
++%% Macros
++%%--------------------------------------------------------------------
++-define(EXIT_OK, 0).
++-define(EXIT_ERROR, 1).
++-define(EXIT_NODEDOWN, 2).
++-define(EXIT_USAGE, 3).
++
++process(Node, ["start"]) ->
++        case rpc:call(Node, yxa_yaws_app, start, []) of
++	ok ->
++	    io:format("Node ~p started~n", [Node]),
++	    ok;
++	Res ->
++	    Res
++    end;
++
++process(Node, ["reload"]) ->
++    case rpc:call(Node, yxa_yaws_app, reload, []) of
++	ok ->
++	    io:format("Node ~p reloaded~n", [Node]),
++	    ok;
++	Res ->
++	    Res
++    end;
++
++process(Node, ["stop"]) ->
++        case rpc:call(Node, yxa_yaws_app, stop, []) of
++	ok ->
++	    io:format("Node ~p stopped~n", [Node]),
++	    ok;
++	Res ->
++	    Res
++    end;
++
++process(Node, ["restart"]) ->
++    case rpc:call(Node, yxa_yaws_app, restart, []) of
++	ok ->
++	    io:format("Node ~p restarted~n", [Node]),
++	    ok;
++	Res ->
++	    Res
++    end;
++
++process(Node, ["status"]) ->
++        case rpc:call(Node, yxa_yaws_app, status, []) of
++	ok ->
++	    io:format("Node ~p running~n", [Node]),
++	    ok;
++	Res ->
++	    Res
++    end;
++
++process(_Node, [Cmd]) ->
++    io:format("Invalid command ~p~n", [Cmd]),
++    error.
++
++
++start() ->
++    case init:get_plain_arguments() of
++	[NodeStr | Args] ->
++	    Node = list_to_atom(NodeStr),
++	    try process(Node, Args) of
++		ok ->
++		    erlang:halt(?EXIT_OK);
++		error ->
++		    erlang:halt(?EXIT_ERROR);
++		{badrpc, nodedown} ->
++		    io:format("Error: Node ~p not responding~n", [Node]),
++		    erlang:halt(?EXIT_NODEDOWN);
++		Unknown ->
++		    io:format("Yxa_yaws_app RPC returned unknown result : ~p~n", [Unknown]),
++		    erlang:halt(?EXIT_ERROR)
++	    catch
++		error: Y ->
++		    ST = erlang:get_stacktrace(),
++		    io:format("Yxa_yaws_ctl failed : error ~p ~p~n", [Y, ST]),
++		    erlang:halt(?EXIT_ERROR);
++		X: Y ->
++		    io:format("Yxa_yaws_ctl failed : ~p ~p~n", [X, Y]),
++		    erlang:halt(?EXIT_ERROR)
++	    end;
++	_ ->
++	    io:format("Invalid arguments~n"),
++	    erlang:halt(?EXIT_USAGE)
++    end.
+diff --git a/yaws/src/yxa_yaws_sup.erl b/yaws/src/yxa_yaws_sup.erl
+new file mode 100644
+index 0000000..180dc7f
+--- /dev/null
++++ b/yaws/src/yxa_yaws_sup.erl
+@@ -0,0 +1,28 @@
++%%%-------------------------------------------------------------------
++%%% File    : yxa_yaws_sup.erl
++%%% Author  : Mikael Magnusson <mikma at users.sourceforge.net>
++%%% Descrip.: YXA embedded Yaws web server supervisor
++%%% Created : 5 Aug 2006
++%%%           by Mikael Magnusson <mikma at users.sourceforge.net>
++%%%-------------------------------------------------------------------
++-module(yxa_yaws_sup).
++
++-behaviour(supervisor).
++
++%% supervisor callbacks
++-export([init/1]).
++
++%% api:s
++-export([start_link/0]).
++
++-define(SERVER, ?MODULE).
++
++%%--------------------------------------------------------------------
++%% Function: start_link
++%% Description: Starts the supervisor
++%%--------------------------------------------------------------------
++start_link() ->
++    supervisor:start_link({local, ?SERVER}, ?MODULE, []).
++
++init([]) ->
++    {ok, {{one_for_one, 20, 60}, []}}.
+-- 
+tg: (4b19956..) t/feature/yxa_yaws (depends on: upstream)

Added: yxa/trunk/debian/patches/t/feature/yxa_yaws_makefile.diff
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/patches/t/feature/yxa_yaws_makefile.diff?rev=8572&op=file
==============================================================================
--- yxa/trunk/debian/patches/t/feature/yxa_yaws_makefile.diff (added)
+++ yxa/trunk/debian/patches/t/feature/yxa_yaws_makefile.diff Mon Jul 19 16:33:24 2010
@@ -1,0 +1,92 @@
+From: Mikael Magnusson <mikma264 at gmail.com>
+Subject: [PATCH] t/feature/yxa_yaws_makefile
+
+YXA embedded Yaws web server application makefile.
+
+Signed-off-by: Mikael Magnusson <mikma at users.sourceforge.net>
+
+---
+ yaws/src/Makefile.in |   43 +++++++++++++++++++++++++++++++++++++++----
+ 1 files changed, 39 insertions(+), 4 deletions(-)
+
+diff --git a/yaws/src/Makefile.in b/yaws/src/Makefile.in
+index f14785c..09f5f90 100644
+--- a/yaws/src/Makefile.in
++++ b/yaws/src/Makefile.in
+@@ -18,6 +18,21 @@ exec_prefix=${prefix}
+ builddir = @builddir@
+ local_file = @local_file@
+ 
++datadir = @datadir@
++localstatedir = @localstatedir@
++
++ERLANG_LIB_VER_asn1 = @ERLANG_LIB_VER_asn1@
++ERLANG_LIB_VER_kernel = @ERLANG_LIB_VER_kernel@
++ERLANG_LIB_VER_mnesia = @ERLANG_LIB_VER_mnesia@
++ERLANG_LIB_VER_ssl = @ERLANG_LIB_VER_ssl@
++ERLANG_LIB_VER_stdlib = @ERLANG_LIB_VER_stdlib@
++ERLANG_LIB_VER_yaws = @ERLANG_LIB_VER_yaws@
++ERLANG_LIB_VER_SUBST = @ERLANG_LIB_VER_SUBST@
++
++docrootdir = $(datadir)/yxa/docroot
++tmpdir = $(localstatedir)/run/yxa
++logdir = $(localstatedir)/log/yxa
++
+ ERLC = @ERLC@
+ ERL = @ERL@
+ 
+@@ -30,7 +45,13 @@ doc_dir = ../../doc
+ 
+ mkinstalldirs = $(SHELL) $(top_srcdir)/scripts/mkinstalldirs
+ 
++systools_make_script = \
++	$(ERLC) -pa $(ebin_dir) -I$(srcdir) $(ebin_dir)/$*.rel
++
+ erl_FILES = \
++	yxa_yaws_app.erl \
++	yxa_yaws_ctl.erl \
++	yxa_yaws_sup.erl \
+ 	yxa_yaws_util.erl
+ 
+ imported_hrl_FILES = \
+@@ -46,14 +67,20 @@ yxa_hrl_FILES = $(imported_hrl_FILES) $(hrl_FILES)
+ CC = gcc
+ CFLAGS = -Wall
+ 
++EFLAGS = -W +debug_info -DDOCROOT=\"$(docrootdir)\" -DCACHEDIR=\"$(tmpdir)\" -DLOGDIR=\"$(logdir)\"
++
+ beam_FILES = $(addprefix $(ebin_dir)/, $(erl_FILES:.erl=.beam))
+ 
+-all: $(beam_FILES)
++boot_FILES = yxa_yaws.boot
+ 
+-install: $(beam_FILES) $(hrl_FILES)
++app_FILES = $(addprefix $(ebin_dir)/, $(boot_FILES:.boot=.app))
++
++all: $(beam_FILES) $(app_FILES) $(boot_FILES)
++
++install: $(beam_FILES) $(hrl_FILES) $(boot_FILES)
+ 	$(mkinstalldirs) $(DESTDIR)$(beamdir)
+ 	$(mkinstalldirs) $(DESTDIR)$(includedir)
+-	for p in $(beam_FILES); do \
++	for p in $(beam_FILES) $(app_FILES) $(boot_FILES); do \
+ 	  $(install_DATA) $$p $(DESTDIR)$(beamdir)/$$f ; \
+ 	done
+ 	for p in $(hrl_FILES); do \
+@@ -87,5 +114,13 @@ SUFFIXES = .c .o .hrl .beam .erl .boot .rel .rel-in .app .app-in
+ .SUFFIXES: .c .o .hrl .beam .erl .boot .rel .rel-in .app .app-in
+ 
+ $(ebin_dir)/%.beam:	$(srcdir)/%.erl
+-	$(ERLC) -o $(ebin_dir) -I$(srcdir) -I$(top_srcdir)/src/include/ -W +debug_info $<
++	$(ERLC) -o $(ebin_dir) -I$(srcdir) -I$(top_srcdir)/src/include/ $(EFLAGS) $<
++
++$(ebin_dir)/%.app:	$(srcdir)/%.app-in
++	cp $< $@
++
++$(ebin_dir)/%.rel:	$(srcdir)/%.rel-in
++	sed $(ERLANG_LIB_VER_SUBST) $< > $@
+ 
++yxa_yaws.boot: $(ebin_dir)/yxa_yaws.app $(ebin_dir)/yxa_yaws.rel
++	$(systools_make_script)
+-- 
+tg: (5aeee79..) t/feature/yxa_yaws_makefile (depends on: upstream)

Added: yxa/trunk/debian/patches/t/fix/init_start.diff
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/patches/t/fix/init_start.diff?rev=8572&op=file
==============================================================================
--- yxa/trunk/debian/patches/t/fix/init_start.diff (added)
+++ yxa/trunk/debian/patches/t/fix/init_start.diff Mon Jul 19 16:33:24 2010
@@ -1,0 +1,173 @@
+From: Mikael Magnusson <mikma264 at gmail.com>
+Subject: [PATCH] t/fix/init_start
+
+Start applications using -s switch to erl instead of using custom
+boot file.
+
+Signed-off-by: Mikael Magnusson <mikma at users.sourceforge.net>
+
+---
+ scripts/init.sh.in        |    2 +-
+ src/appserver.erl         |   10 ++++++++++
+ src/event/eventserver.erl |   10 ++++++++++
+ src/incomingproxy.erl     |   10 ++++++++++
+ src/outgoingproxy.erl     |   11 +++++++++++
+ src/pstnproxy.erl         |   10 ++++++++++
+ 6 files changed, 52 insertions(+), 1 deletions(-)
+
+diff --git a/scripts/init.sh.in b/scripts/init.sh.in
+index 305f74a..8d0c3ae 100644
+--- a/scripts/init.sh.in
++++ b/scripts/init.sh.in
+@@ -320,7 +320,7 @@ else
+ 		    fi
+ 		fi
+ 	    fi
+-	    ${erl} -boot "$bootfile" -pz ${beamdir} \
++	    ${erl} $boot_start_ssl -s ${PROGRAMNAME} -pz ${beamdir} \
+ 		$EXTRA_ERL_ARGUMENTS \
+ 		-name $name \
+ 		-yxa_config $configpath \
+diff --git a/src/appserver.erl b/src/appserver.erl
+index 43f30e8..66758d1 100644
+--- a/src/appserver.erl
++++ b/src/appserver.erl
+@@ -24,6 +24,11 @@
+ 
+ -export([test/0]).
+ 
++-export([
++	 start/0,
++	 stop/0
++	]).
++
+ %%--------------------------------------------------------------------
+ %%% Application specific exports, exported for CPL subsystem
+ %%--------------------------------------------------------------------
+@@ -49,6 +54,11 @@
+ -define(APPSERVER_GLUE_TIMEOUT, 1200 * 1000).
+ -define(SIPPIPE_TIMEOUT, 900).
+ 
++start() ->
++    application:start(?MODULE).
++
++stop() ->
++    application:stop(?MODULE).
+ 
+ %%====================================================================
+ %% Behaviour functions
+diff --git a/src/event/eventserver.erl b/src/event/eventserver.erl
+index fc451ca..ba6cff6 100644
+--- a/src/event/eventserver.erl
++++ b/src/event/eventserver.erl
+@@ -23,6 +23,11 @@
+ 
+ -export([test/0]).
+ 
++-export([
++	 start/0,
++	 stop/0
++	]).
++
+ %%--------------------------------------------------------------------
+ %%% Application specific exports
+ %%--------------------------------------------------------------------
+@@ -43,6 +48,11 @@
+ -define(EVENTSERVER_T, eventserver_t).
+ -define(SHUTDOWN_TIMEOUT, 10).
+ 
++start() ->
++    application:start(?MODULE).
++
++stop() ->
++    application:stop(?MODULE).
+ 
+ %%====================================================================
+ %% Behaviour functions
+diff --git a/src/incomingproxy.erl b/src/incomingproxy.erl
+index 511bd66..5fc8aa9 100644
+--- a/src/incomingproxy.erl
++++ b/src/incomingproxy.erl
+@@ -25,6 +25,11 @@
+ 
+ -export([test/0]).
+ 
++-export([
++	 start/0,
++	 stop/0
++	]).
++
+ %%--------------------------------------------------------------------
+ %% Include files
+ %%--------------------------------------------------------------------
+@@ -32,6 +37,11 @@
+ -include("sipsocket.hrl").
+ -include("yxa_config.hrl").
+ 
++start() ->
++    application:start(?MODULE).
++
++stop() ->
++    application:stop(?MODULE).
+ 
+ %%====================================================================
+ %% Behaviour functions
+diff --git a/src/outgoingproxy.erl b/src/outgoingproxy.erl
+index a5ce107..d2bf5ca 100644
+--- a/src/outgoingproxy.erl
++++ b/src/outgoingproxy.erl
+@@ -27,6 +27,11 @@
+ 
+ -export([test/0]).
+ 
++-export([
++	 start/0,
++	 stop/0
++	]).
++
+ %%--------------------------------------------------------------------
+ %% Include files
+ %%--------------------------------------------------------------------
+@@ -34,6 +39,12 @@
+ -include("sipsocket.hrl").
+ -include("yxa_config.hrl").
+ 
++start() ->
++    application:start(?MODULE).
++
++stop() ->
++    application:stop(?MODULE).
++
+ %%====================================================================
+ %% Behaviour functions
+ %% Standard YXA SIP-application callback functions
+diff --git a/src/pstnproxy.erl b/src/pstnproxy.erl
+index c5ebd75..5218403 100644
+--- a/src/pstnproxy.erl
++++ b/src/pstnproxy.erl
+@@ -28,6 +28,11 @@
+ 
+ -export([test/0]).
+ 
++-export([
++	 start/0,
++	 stop/0
++	]).
++
+ %%--------------------------------------------------------------------
+ %% Include files
+ %%--------------------------------------------------------------------
+@@ -36,6 +41,11 @@
+ -include("pstnproxy.hrl").
+ -include("yxa_config.hrl").
+ 
++start() ->
++    application:start(?MODULE).
++
++stop() ->
++    application:stop(?MODULE).
+ 
+ %%====================================================================
+ %% Behaviour functions
+-- 
+tg: (5aeee79..) t/fix/init_start (depends on: upstream)

Added: yxa/trunk/debian/patches/t/fix/net_util.diff
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/patches/t/fix/net_util.diff?rev=8572&op=file
==============================================================================
--- yxa/trunk/debian/patches/t/fix/net_util.diff (added)
+++ yxa/trunk/debian/patches/t/fix/net_util.diff Mon Jul 19 16:33:24 2010
@@ -1,0 +1,146 @@
+From: Mikael Magnusson <mikma264 at gmail.com>
+Subject: [PATCH] t/fix/net_util
+
+Wait 5s for database nodes (incomingproxy) to start before timeout.
+
+Signed-off-by: Mikael Magnusson <mikma at users.sourceforge.net>
+
+---
+ src/Makefile.in   |    1 +
+ src/net_util.erl  |  101 +++++++++++++++++++++++++++++++++++++++++++++++++++++
+ src/sipserver.erl |    1 +
+ 3 files changed, 103 insertions(+), 0 deletions(-)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 6f9d1d1..c6e7215 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -67,6 +67,7 @@ erl_FILES = \
+ 	local.erl \
+ 	logger.erl \
+ 	lookup.erl \
++	net_util.erl \
+ 	outgoingproxy.erl \
+ 	outgoingproxy_test.erl \
+ 	pstnproxy.erl \
+diff --git a/src/net_util.erl b/src/net_util.erl
+new file mode 100644
+index 0000000..6745577
+--- /dev/null
++++ b/src/net_util.erl
+@@ -0,0 +1,101 @@
++%%%-------------------------------------------------------------------
++%%% File    : net_util.erl
++%%% Author  : Mikael Magnusson <mikma at users.sourceforge.net>
++%%% Descrip.: Connect to Erlang nodes
++%%%
++%%% Created : 31 July 2006
++%%%           by Mikael Magnusson <mikma at users.sourceforge.net>
++%%%-------------------------------------------------------------------
++
++-module(net_util).
++
++-behaviour(gen_server).
++
++%% gen_server
++-export([
++	 init/1,
++	 code_change/3,
++	 handle_call/3,
++	 handle_cast/2,
++	 handle_info/2,
++	 terminate/2
++	]).
++
++%% api
++-export([
++	 connect/1, connect/2
++	]).
++
++-record(state, {pending_nodes}).
++
++%%--------------------------------------------------------------------
++%% Function: connect(Nodes, Timeout)
++%%           Nodes = list() of atom(), node names
++%% Descrip.: Tries to connect to each node using ping for Timeout 
++%%           milliseconds.
++%% Returns : ok | {error, timeout}
++%%--------------------------------------------------------------------
++connect(Nodes, Timeout) ->
++    {ok, Pid} = gen_server:start(?MODULE, [], []),
++    gen_server:call(Pid, {connect, Nodes, Timeout}, Timeout + 1000).
++
++connect(Nodes) ->
++    connect(Nodes, 5000).
++
++%%
++%% Implementation of gen_server callbacks
++%%
++init([]) ->
++    {ok, #state{}}.
++
++code_change(_OldVsn, State, _Extra) ->
++    {ok, State}.
++
++do_ping([], PendingNodes) ->
++    {ok, PendingNodes};
++do_ping([Node|Nodes], PendingNodes) ->
++    case net_adm:ping(Node) of
++	pong ->
++	    {ok, []};
++	pang ->
++	    NewPendingNodes = PendingNodes ++ [Node],
++	    do_ping(Nodes, NewPendingNodes)
++    end.
++
++handle_call({connect, Nodes, Timeout}, From, State) ->
++    {ok, PendingNodes} = do_ping(Nodes, []),
++    NewState = State#state{pending_nodes=PendingNodes},
++    case PendingNodes of
++	[] ->
++	    {reply, ok, NewState};
++	_Any ->
++	    {ok, _PingTimer} = timer:send_interval(500, {send_ping, From}),
++	    {ok, _Timer} = timer:send_after(Timeout, {timeout, From}),
++	    {noreply, NewState}
++    end;
++handle_call(_Request, _From, State) ->
++    {reply, ok, State}.
++
++handle_cast(stop, State) ->
++    {stop, normal, State};
++handle_cast(_Request, State) ->
++    {noreply, State}.
++
++handle_info({send_ping, From}, State) ->
++    {ok, PendingNodes} = do_ping(State#state.pending_nodes, []),
++    NewState = State#state{pending_nodes=PendingNodes},
++    case PendingNodes of
++	[] ->
++	    gen_server:reply(From, ok),
++	    {stop, normal, NewState};
++	_Any ->
++	    {noreply, NewState}
++    end;
++handle_info({timeout, From}, State) ->
++    gen_server:reply(From, {error, timeout}),
++    {stop, normal, State};
++handle_info(_Info, State) ->
++    {noreply, State}.
++
++terminate(_Reason, _State) ->
++    terminated.
+diff --git a/src/sipserver.erl b/src/sipserver.erl
+index 309c3be..a2810d5 100644
+--- a/src/sipserver.erl
++++ b/src/sipserver.erl
+@@ -155,6 +155,7 @@ init_mnesia(Tables) when is_list(Tables) ->
+ 	    case yxa_config:get_env(databaseservers) of
+ 		{ok, DbNodes} ->
+ 		    logger:log(debug, "Mnesia extra db nodes : ~p (needed for tables ~p)", [DbNodes, RemoteTables]),
++		    ok = net_util:connect(DbNodes),
+ 		    case mnesia:change_config(extra_db_nodes, DbNodes) of
+ 			{error, Reason} ->
+ 			    logger:log(error, "Startup problem: Could not add configured databaseservers: ~p",
+-- 
+tg: (5aeee79..) t/fix/net_util (depends on: upstream)

Modified: yxa/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/rules?rev=8572&op=diff
==============================================================================
--- yxa/trunk/debian/rules (original)
+++ yxa/trunk/debian/rules Mon Jul 19 16:33:24 2010
@@ -1,15 +1,20 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
-# Sample debian/rules that uses debhelper.
-# This file was originally written by Joey Hess and Craig Small.
-# As a special exception, when this file is copied by dh-make into a
-# dh-make output file, you may use that output file without restriction.
-# This special exception was added by Craig Small in version 0.37 of dh-make.
+
+QUILT_PATCH_DIR ?= debian/patches
+
+TG_BRANCHES := t/feature/yxa_yaws,t/feature/yxa_yaws_makefile,t/fix/net_util
+
+# Ensure aclocal.m4 exists before requesting cdbs to update it.
+common-configure-arch common-configure-indep:: aclocal.m4
+
+include /usr/share/cdbs/1/rules/debhelper.mk
+include /usr/share/cdbs/1/class/autotools.mk
+include /usr/share/cdbs/1/rules/patchsys-quilt.mk
+include /usr/share/topgit/tg2quilt.mk
 
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
-
-include /usr/share/dpatch/dpatch.make
 
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
@@ -31,15 +36,20 @@
 # 1. Release:               1.0~rc1
 # 2. Snapshot:              0.91+20061205
 # 3. Subversion trunk date: 0.91+20070220svn-1
+# 4. Git revision:          1.0+git5aeee79
 #
 
 DEBVERSION:=$(shell head -n 1 debian/changelog \
                     | sed -e 's/^[^(]*(\([^)]*\)).*/\1/')
 UPVERSION:=$(shell echo $(DEBVERSION) | sed -e 's/^.*://' -e 's/-[0-9.~]*$$//' -e 's/.dfsg$$//')
 
+ifeq (git,$(findstring git,$(UPVERSION)))
+VCSREV := $(shell echo $(DEBVERSION) | sed -e 's/^.*+//' | sed -e 's/-.*//' | sed -e 's/^git//')
+URL := http://github.com/fredrikt/yxa/tarball/$(VCSREV)
+else
 ifeq (+20,$(findstring +20,$(UPVERSION)))
 URL := svn://anonsvn.it.su.se/yxa/trunk
-SVNREV := {$(shell echo $(DEBVERSION) | sed -e 's/^.*+//' | sed -e 's/-.*//')}
+VCSREV := {$(shell echo $(DEBVERSION) | sed -e 's/^.*+//' | sed -e 's/-.*//')}
 else
 ifeq (,$(findstring +2,$(UPVERSION)))
 TARVERSION:=$(shell echo $(UPVERSION) | sed -e 's/~//')
@@ -49,100 +59,34 @@
 URL := http://www.stacken.kth.se/project/yxa/download/snapshots/yxa-$(TARVERSION).tar.gz
 endif
 endif
+endif
 
 FILENAME := yxa_$(UPVERSION).orig.tar.gz
 SHA1SUM := 72c54db19a02e8b888fe991139746bd55da176c4
 
-autoreconf:
-	dh_testdir
-	aclocal -I m4
-	autoconf
-	rm -rf autom4te.cache
-
-config: patch config-stamp
-config-stamp: configure
-	dh_testdir
-
-	./configure \
+DEB_CONFIGURE_EXTRA_FLAGS := \
 		--host=$(DEB_HOST_GNU_TYPE) \
-		--build=$(DEB_BUILD_GNU_TYPE) \
-		--prefix=/usr \
 		--sysconfdir=/etc/yxa \
-		--mandir=\$${prefix}/share/man \
-		--infodir=\$${prefix}/share/info \
-		--localstatedir=/var \
 		--with-mnesiadir=/var/lib/yxa/db \
 		--disable-erlang-version-check \
-		CFLAGS="$(CFLAGS)" \
 		LDFLAGS="-Wl,-z,defs"
-	touch $@
 
-build: build-stamp
+DEB_AUTO_UPDATE_ACLOCAL := 1.11
+DEB_AUTO_UPDATE_AUTOCONF := ' '
 
-build-stamp: config
-	dh_testdir
+DEB_DESTDIR = $(CURDIR)/debian/tmp/
 
-	$(MAKE)
-
-	touch $@
-
-clean: clean-stamp unpatch
-clean-stamp:
-	dh_testdir
-	dh_testroot
-	rm -f build-stamp config-stamp
-
-	[ ! -f Makefile ] || $(MAKE) distclean
-
-	dh_clean 
-
-install: build
-	dh_testdir
-	dh_testroot
-	dh_clean -k 
-	dh_installdirs
-
-	$(MAKE) install DESTDIR=$(CURDIR)/debian/tmp
-
-
-# Build architecture-independent files here.
-binary-indep: build install
-# We have nothing to do by default.
-
-# Build architecture-dependent files here.
-binary-arch: build install
-	dh_testdir
-	dh_testroot
-	dh_installchangelogs CHANGES
-	dh_installdocs
-	chmod a+x $(CURDIR)/debian/yxa_yaws
-	dh_install
-#	dh_installdebconf	
-	dh_installlogrotate
-	dh_installinit
-	dh_installman
-	dh_installexamples
-	dh_link
-	dh_strip
-	dh_compress
-	dh_fixperms
-	dh_installdeb
-	dh_shlibdeps
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
-
-binary: binary-indep binary-arch
-.PHONY: build clean binary-indep binary-arch binary install patch unpatch
+aclocal.m4:
+	touch aclocal.m4
 
 print-version:
 	@@echo "Debian version:          $(DEBVERSION)"
 	@@echo "Upstream version:        $(UPVERSION)"
 	@@echo "URL:                     $(URL)"
-	@@echo "SVN revision:            $(SVNREV)"
+	@@echo "VCS revision:            $(VCSREV)"
 
 get-orig-source:
 	@@dh_testdir
 	@@[ -d ../tarballs/. ]||mkdir -p ../tarballs
 	@@chmod +x debian/get-orig-source.sh
-	debian/get-orig-source.sh $(UPVERSION) $(URL) $(SVNREV)
+	debian/get-orig-source.sh $(UPVERSION) $(URL) $(VCSREV)

Modified: yxa/trunk/debian/yxa.init
URL: http://svn.debian.org/wsvn/pkg-voip/yxa/trunk/debian/yxa.init?rev=8572&op=diff
==============================================================================
--- yxa/trunk/debian/yxa.init (original)
+++ yxa/trunk/debian/yxa.init Mon Jul 19 16:33:24 2010
@@ -1,14 +1,10 @@
-#! /bin/sh
-#
-# skeleton	example file to build /etc/init.d/ scripts.
-#		This file should be used to construct scripts for /etc/init.d.
+#!/bin/bash
 #
 #		Written by Miquel van Smoorenburg <miquels at cistron.nl>.
 #		Modified for Debian 
 #		by Ian Murdock <imurdock at gnu.ai.mit.edu>.
 #		Modified for yxa
 #		by Mikael Magnusson <mikma at users.sourceforge.net>
-# Version:	@(#)skeleton  1.9  26-Feb-2001  miquels at cistron.nl
 #
 
 ### BEGIN INIT INFO




More information about the Pkg-voip-commits mailing list