dot

packages and services management
Log | Files | Refs | README

commit e020fe9ad928a26a5821d37059eb80171d01b4a2
parent 754c592044d3a15b73752ce458373658f8c033c5
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 15 Dec 2018 22:39:40 +0100

sqlite database backend for kamailio

Diffstat:
Mpack/kamailio/build | 14++++++--------
Apack/kamailio/dependencies/libressl | 2++
Apack/kamailio/dependencies/sqlite | 2++
Apack/kamailio/modules.lst | 24++++++++++++++++++++++++
Rs6/kamailio/x/conf/module/db_text.so -> s6/kamailio/mysql/conf/module/db_mysql.so | 0
As6/kamailio/sqlite/conf/define/DBURL | 1+
Cs6/kamailio/x/conf/module/db_text.so -> s6/kamailio/sqlite/conf/module/db_sqlite.so | 0
Ds6/kamailio/x/conf/define/DBURL | 1-
Ms6/kamailio/x/conf/module/usrloc.so | 1+
Ms6/kamailio/x/setup | 1+
Ms6/kamailio/x/setup-dep | 9+++------
11 files changed, 40 insertions(+), 15 deletions(-)

diff --git a/pack/kamailio/build b/pack/kamailio/build @@ -1,12 +1,10 @@ #!/bin/sh -e -make -make PREFIX="$PREFIX" install - -for script in src/kamcmd; do - sed '1 s,#!/bin/bash,#!/bin/sh,' "$script" >$$ - mv "$$" "$script" - chmod +x "$script" -done +cp "${DEF}/modules.lst" src + +export CC="cc -I${sqlite}/include -I${libressl}/include" +export LD="cc -L${sqlite}/lib -L${libressl}/lib" + +make CC="${CC}" LD="${LD}" PREFIX="${PREFIX}" install mv "$PREFIX/sbin" "$PREFIX/bin" diff --git a/pack/kamailio/dependencies/libressl b/pack/kamailio/dependencies/libressl @@ -0,0 +1 @@ +../../libressl/version+ \ No newline at end of file diff --git a/pack/kamailio/dependencies/sqlite b/pack/kamailio/dependencies/sqlite @@ -0,0 +1 @@ +../../sqlite/version+ \ No newline at end of file diff --git a/pack/kamailio/modules.lst b/pack/kamailio/modules.lst @@ -0,0 +1,24 @@ +# this file is autogenerated by make modules-cfg + +# the list of sub-directories with modules +modules_dirs:=modules + +# the list of module groups to compile +cfg_group_include= + +# the list of extra modules to compile +include_modules= db_sqlite tls + +# the list of static modules +static_modules= + +# the list of modules to skip from compile list +skip_modules= + +# the list of modules to exclude from compile list +exclude_modules= acc_json acc_radius app_java app_lua app_mono app_perl app_python app_python3 app_ruby app_sqlang auth_ephemeral auth_identity auth_radius cdp cdp_avp cnxcc cplc crypto db2_ldap db_berkeley db_cassandra db_mongodb db_mysql db_oracle db_perlvdb db_postgres db_redis db_unixodbc dialplan dnssec erlang evapi geoip geoip2 gzcompress h350 http_async_client http_client ims_auth ims_charging ims_dialog ims_diameter_server ims_icscf ims_ipsec_pcscf ims_isc ims_ocs ims_qos ims_registrar_pcscf ims_registrar_scscf ims_usrloc_pcscf ims_usrloc_scscf jansson janssonrpcc json jsonrpcc kazoo lcr ldap log_systemd memcached misc_radius ndb_cassandra ndb_mongodb ndb_redis nsq osp outbound peering phonenum presence presence_conference presence_dialoginfo presence_mwi presence_profile presence_reginfo presence_xml pua pua_bla pua_dialoginfo pua_json pua_reginfo pua_rpc pua_usrloc pua_xmpp rabbitmq regex rls sctp snmpstats topos_redis utils uuid websocket xcap_client xcap_server xhttp_pi xmlops xmlrpc xmpp $(skip_modules) + +modules_all= $(filter-out modules/CVS,$(wildcard modules/*)) +modules_noinc= $(filter-out $(addprefix modules/, $(exclude_modules) $(static_modules)), $(modules_all)) +modules= $(filter-out $(modules_noinc), $(addprefix modules/, $(include_modules) )) $(modules_noinc) +modules_configured:=1 diff --git a/s6/kamailio/x/conf/module/db_text.so b/s6/kamailio/mysql/conf/module/db_mysql.so diff --git a/s6/kamailio/sqlite/conf/define/DBURL b/s6/kamailio/sqlite/conf/define/DBURL @@ -0,0 +1 @@ +"sqlite:////var/kamailio/sqlite.db" diff --git a/s6/kamailio/x/conf/module/db_text.so b/s6/kamailio/sqlite/conf/module/db_sqlite.so diff --git a/s6/kamailio/x/conf/define/DBURL b/s6/kamailio/x/conf/define/DBURL @@ -1 +0,0 @@ -"text:///var/kamailio/db.txt" diff --git a/s6/kamailio/x/conf/module/usrloc.so b/s6/kamailio/x/conf/module/usrloc.so @@ -0,0 +1 @@ +db_sqlite.so diff --git a/s6/kamailio/x/setup b/s6/kamailio/x/setup @@ -1,5 +1,6 @@ #!/usr/bin/env execlineb +if { chown -R kamailio /var/kamailio } if { mkdir -p data /var/kamailio } redirfd -w 1 data/conf diff --git a/s6/kamailio/x/setup-dep b/s6/kamailio/x/setup-dep @@ -1,11 +1,8 @@ #!/usr/bin/env execlineb elgetpositionals -forx -o 0 x { ${@} } -importas module x - -redirfd -r 0 ${module} -withstdinas x +if -tn { test ${#} = 0 } +backtick x { cat ${@} } importas -s -d "\n" dependencies x if { ../../setup-dep ${dependencies} } -echo ${module} +printf "%s\n" ${@}