~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[alpine-devel] [PATCH] kamailio - version bump to 4.2.0

Nathan Angelacos <nangel@alpinelinux.org>
Details
Message ID
<1413941396-14974-1-git-send-email-nangel@alpinelinux.org>
Sender timestamp
1413941396
DKIM signature
missing
Download raw message
Patch: +158 -315
new in sub-packages:

 kamailio:        rtpproxy-ng renamed to rtpengine
 kamailio-extras: tsilo jsonrpc-s
 kamailio-uuid:   new (uuid module)
 kamailio-ev:     new (evapi module)
---
 main/kamailio/0001-musl-fixes.patch                |  63 +++++++++
 ...-websocket-remove-libunistring-dependency.patch | 141 ---------------------
 .../0002-fix_180_replies_in_sca_call_info.patch    |  14 --
 main/kamailio/APKBUILD                             |  69 +++++-----
 main/kamailio/kamailio-4.1-backslash.patch         |  55 --------
 main/kamailio/kamailio-4.2-backslash.patch         |  55 ++++++++
 main/kamailio/musl-fixes.patch                     |  76 -----------
 7 files changed, 158 insertions(+), 315 deletions(-)
 create mode 100644 main/kamailio/0001-musl-fixes.patch
 delete mode 100644 main/kamailio/0001-websocket-remove-libunistring-dependency.patch
 delete mode 100644 main/kamailio/0002-fix_180_replies_in_sca_call_info.patch
 delete mode 100644 main/kamailio/kamailio-4.1-backslash.patch
 create mode 100644 main/kamailio/kamailio-4.2-backslash.patch
 delete mode 100644 main/kamailio/musl-fixes.patch

diff --git a/main/kamailio/0001-musl-fixes.patch b/main/kamailio/0001-musl-fixes.patch
new file mode 100644
index 0000000..752469e
--- /dev/null
+++ b/main/kamailio/0001-musl-fixes.patch
@@ -0,0 +1,63 @@
diff --git a/modules/ldap/ld_session.h b/modules/ldap/ld_session.h
index 03a4ea5..de7bc0b 100644
--- a/modules/ldap/ld_session.h
+++ b/modules/ldap/ld_session.h
@@ -33,6 +33,7 @@
 #ifndef LD_SESSION_H
 #define LD_SESSION_H
 
+#include <sys/time.h>
 #include <ldap.h>
 
 #include "iniparser.h"
diff --git a/modules/seas/event_dispatcher.c b/modules/seas/event_dispatcher.c
index d10cffe..8e1a56a 100644
--- a/modules/seas/event_dispatcher.c
+++ b/modules/seas/event_dispatcher.c
@@ -25,7 +25,7 @@
 #include <string.h>/*strcmp,memset*/
 #include <errno.h>/*errno*/
 #include <unistd.h>/*close(),read(),pipe,fork,pid_t*/
-#include <sys/poll.h>/*poll*/
+#include <poll.h>/*poll*/
 #include <signal.h>/*signal*/
 #include <time.h>/*time*/
 #include <string.h>/*memcmp*/
diff --git a/modules/tls/tls_server.c b/modules/tls/tls_server.c
index cfd09c4..0a27433 100644
--- a/modules/tls/tls_server.c
+++ b/modules/tls/tls_server.c
@@ -33,7 +33,7 @@
  */
 
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 #include "../../dprint.h"
diff --git a/tsend.c b/tsend.c
index 3a18502..99f0c21 100644
--- a/tsend.c
+++ b/tsend.c
@@ -43,7 +43,7 @@
 
 #include <string.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/utils/sercmd/sercmd.c b/utils/sercmd/sercmd.c
index fb9c0a3..717a78d 100644
--- a/utils/sercmd/sercmd.c
+++ b/utils/sercmd/sercmd.c
@@ -49,6 +49,7 @@
 #include <netdb.h> /* gethostbyname */
 #include <fcntl.h>
 #include <time.h> /* time */
+#include <sys/time.h>
 
 #ifdef USE_READLINE
 #include <readline/readline.h>
diff --git a/main/kamailio/0001-websocket-remove-libunistring-dependency.patch b/main/kamailio/0001-websocket-remove-libunistring-dependency.patch
deleted file mode 100644
index 9b84eba..0000000
--- a/main/kamailio/0001-websocket-remove-libunistring-dependency.patch
@@ -1,141 +0,0 @@
From 7cf956836dc20a8f8354e25d018cb5c4eb386187 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras@iki.fi>
Date: Fri, 20 Dec 2013 11:53:50 +0200
Subject: [PATCH 1/1] websocket: remove libunistring dependency

libunistring is old, slow, messy code and uncompilable on new systems.
remove the sole user of it, and replace it with inline utf8 decoder
implementation from http://bjoern.hoehrmann.de/utf-8/decoder/dfa/.

improves performance and portability as libunistring is not needed.
---
 modules/websocket/Makefile                |  2 +-
 modules/websocket/README                  |  1 -
 modules/websocket/doc/websocket_admin.xml |  3 --
 modules/websocket/utf8_decode.h           | 52 +++++++++++++++++++++++++++++++
 modules/websocket/ws_frame.c              |  4 +--
 5 files changed, 55 insertions(+), 7 deletions(-)
 create mode 100644 modules/websocket/utf8_decode.h

diff --git a/modules/websocket/Makefile b/modules/websocket/Makefile
index bb7c809..c686a82 100644
--- a/modules/websocket/Makefile
+++ b/modules/websocket/Makefile
@@ -27,7 +27,7 @@ else
 	#       E.g.: make TLS_HOOKS=1 TLS_EXTRA_LIBS="-lz -lkrb5"
 endif
 
-LIBS+= $(TLS_EXTRA_LIBS) -lunistring
+LIBS+= $(TLS_EXTRA_LIBS)
 
 # Static linking, if you'd like to use TLS and WEBSOCKET at the same time
 #
diff --git a/modules/websocket/README b/modules/websocket/README
index 49d8693..bdba3e4 100644
--- a/modules/websocket/README
+++ b/modules/websocket/README
@@ -316,7 +316,6 @@ onreply_route[WS_REPLY] {
    The following libraries must be installed before running Kamailio with
    this module loaded:
      * OpenSSL.
-     * GNU libunistring.
 
 4. Parameters
 
diff --git a/modules/websocket/doc/websocket_admin.xml b/modules/websocket/doc/websocket_admin.xml
index fa7d300..e40dc09 100644
--- a/modules/websocket/doc/websocket_admin.xml
+++ b/modules/websocket/doc/websocket_admin.xml
@@ -262,9 +262,6 @@ onreply_route[WS_REPLY] {
 		<listitem>
 		<para><emphasis>OpenSSL</emphasis>.</para>
 		</listitem>
-		<listitem>
-		<para><emphasis>GNU libunistring</emphasis>.</para>
-		</listitem>
 		</itemizedlist>
 		</para>
 	</section>
diff --git a/modules/websocket/utf8_decode.h b/modules/websocket/utf8_decode.h
new file mode 100644
index 0000000..b274fe7
--- /dev/null
+++ b/modules/websocket/utf8_decode.h
@@ -0,0 +1,52 @@
+#include <stdint.h>
+#include <stddef.h>
+
+// Copyright (c) 2008-2010 Bjoern Hoehrmann <bjoern@hoehrmann.de>
+// See http://bjoern.hoehrmann.de/utf-8/decoder/dfa/ for details.
+
+#define UTF8_ACCEPT 0
+#define UTF8_REJECT 12
+
+static const uint8_t utf8d[] = {
+  // The first part of the table maps bytes to character classes that
+  // to reduce the size of the transition table and create bitmasks.
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+   0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,  0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+   1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,  9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,9,
+   7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,  7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,7,
+   8,8,2,2,2,2,2,2,2,2,2,2,2,2,2,2,  2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,
+  10,3,3,3,3,3,3,3,3,3,3,3,3,4,3,3, 11,6,6,6,5,8,8,8,8,8,8,8,8,8,8,8,
+
+  // The second part is a transition table that maps a combination
+  // of a state of the automaton and a character class to a state.
+   0,12,24,36,60,96,84,12,12,12,48,72, 12,12,12,12,12,12,12,12,12,12,12,12,
+  12, 0,12,12,12,12,12, 0,12, 0,12,12, 12,24,12,12,12,12,12,24,12,24,12,12,
+  12,12,12,12,12,12,12,24,12,12,12,12, 12,24,12,12,12,12,12,12,12,24,12,12,
+  12,12,12,12,12,12,12,36,12,36,12,12, 12,36,12,12,12,12,12,36,12,36,12,12,
+  12,36,12,12,12,12,12,12,12,12,12,12,
+};
+
+static inline uint32_t decode(uint32_t* state, uint32_t* codep, uint32_t byte)
+{
+  uint32_t type = utf8d[byte];
+
+  *codep = (*state != UTF8_ACCEPT) ?
+    (byte & 0x3fu) | (*codep << 6) :
+    (0xff >> type) & (byte);
+
+  *state = utf8d[256 + *state + type];
+  return *state;
+}
+
+static inline int IsUTF8(uint8_t* s, size_t len)
+{
+  uint32_t codepoint, state = 0;
+
+  while (len--)
+    decode(&state, &codepoint, *s++);
+
+  return state == UTF8_ACCEPT;
+}
+
diff --git a/modules/websocket/ws_frame.c b/modules/websocket/ws_frame.c
index a3a4cef..3562437 100644
--- a/modules/websocket/ws_frame.c
+++ b/modules/websocket/ws_frame.c
@@ -22,7 +22,7 @@
  */
 
 #include <limits.h>
-#include <unistr.h>
+#include "utf8_decode.h"
 #include "../../events.h"
 #include "../../receive.h"
 #include "../../stats.h"
@@ -695,7 +695,7 @@ int ws_frame_transmit(void *data)
 	frame.fin = 1;
 	/* Can't be sure whether this message is UTF-8 or not so check to see
 	   if it "might" be UTF-8 and send as binary if it definitely isn't */
-	frame.opcode = (u8_check((uint8_t *) wsev->buf, wsev->len) == NULL) ?
+	frame.opcode = IsUTF8((uint8_t *) wsev->buf, wsev->len) ?
 				OPCODE_TEXT_FRAME : OPCODE_BINARY_FRAME;
 	frame.payload_len = wsev->len;
 	frame.payload_data = wsev->buf;
--- 
1.8.5.1

diff --git a/main/kamailio/0002-fix_180_replies_in_sca_call_info.patch b/main/kamailio/0002-fix_180_replies_in_sca_call_info.patch
deleted file mode 100644
index d5905d1..0000000
--- a/main/kamailio/0002-fix_180_replies_in_sca_call_info.patch
@@ -1,14 +0,0 @@
diff --git a/modules/sca/sca_call_info.c b/modules/sca/sca_call_info.c
index 1e5bbfd..f8c4169 100644
--- a/modules/sca/sca_call_info.c
+++ b/modules/sca/sca_call_info.c
@@ -1072,9 +1072,6 @@ sca_call_info_invite_reply_18x_handler( sip_msg_t *msg,
 
     switch ( msg->REPLY_STATUS ) {
     case 180:
-	state = SCA_APPEARANCE_STATE_ALERTING;
-	break;
--
     case 183:
 	state = SCA_APPEARANCE_STATE_PROGRESSING;
 	break;
diff --git a/main/kamailio/APKBUILD b/main/kamailio/APKBUILD
index d1d4e64..59e3cbd 100644
--- a/main/kamailio/APKBUILD
+++ b/main/kamailio/APKBUILD
@@ -1,8 +1,8 @@
# Contributor: Michael Mason <ms13sp@gmail.com>
# Maintainer: Nathan Angelacos <nangel@alpinelinux.org>
pkgname=kamailio
pkgver=4.1.5
pkgrel=2
pkgver=4.2.0
pkgrel=0
pkgdesc="Open Source SIP Server"
url="http://www.kamailio.org/"
arch="all"
@@ -13,7 +13,7 @@ license="GPL2+"
depends=""
makedepends="bison flex expat-dev postgresql-dev pcre-dev mysql-dev
	libxml2-dev curl-dev unixodbc-dev confuse-dev ncurses-dev sqlite-dev
	lua-dev openldap-dev openssl-dev net-snmp-dev"
	lua-dev openldap-dev openssl-dev net-snmp-dev libuuid libev-dev"
install="$pkgname.pre-install $pkgname.pre-upgrade"

# See Makefile.groups for the list of recommended modules for
@@ -34,12 +34,12 @@ _mod_list_basic="avp async auth benchmark blst cfg_rpc cfgutils corex counters \
		maxfwd mediaproxy mi_datagram mi_fifo mi_rpc mqueue \
		nat_traversal nathelper path pike pv ratelimit rr rtimer \
		rtpproxy sanity sdpops siputils sl statistics textops \
		textopsx tm tmx topoh xlog rtpproxy-ng stun sipt"
		textopsx tm tmx topoh xlog rtpengine stun sipt"

# - extra used modules, with no extra dependency
_mod_list_extras="auth_diameter call_control cnxcc dmq domainpolicy msrp pdb \
		qos sca seas sms sst timer tmrec uac_redirect xhttp \
		xhttp_rpc xprint"
		qos sca seas sms sst timer tmrec tsilo uac_redirect xhttp \
		xhttp_rpc xprint jsonrpc-s nosip"

# - common modules depending on database
_mod_list_db="acc alias_db auth_db avpops cfg_db db_flatstore \
@@ -74,7 +74,7 @@ _mod_list_postgres="db_postgres"
_mod_list_unixodbc="db_unixodbc"

# - modules depending on mysql cassandra library
_mod_list_cassandra="db_cassandra"
_mod_list_cassandra="db_cassandra ndb_cassandra"

# - modules depending on xml2 library
_mod_list_cpl="cpl-c"
@@ -115,9 +115,6 @@ _mod_list_outbound="outbound"
# - modules depending on unistring library
_mod_list_websocket="websocket"

# - modules depending on openssl library
_mod_list_stun="stun"

# - modules depending on libval-threads libcrypto libsres libpthread
_mod_list_dnssec="dnssec"

@@ -176,6 +173,19 @@ _mod_list_java="app_java"
# - modules depending on iptables library
_mod_list_iptrtpproxy="iptrtpproxy"

# - modules depending on uuid library
_mod_list_uuid="uuid"

# - modules depending on ev library
_mod_list_ev="evapi"

# - modules depending on kazoo/rabbitmq
_mod_list_kazoo="kazoo"

# - modules depending on mongodb
_mod_list_mongodb="db_mongodb ndb_mongodb"


# Alpine Specific
_mod_list_debugger="$_mod_list_devel benchmark debugger"

@@ -189,18 +199,15 @@ _modules="$_module_group_kstandard"
for _i in db postgres sqlite dbtext mysql \
	cpl xml unixodbc snmpstats xmpp carrierroute \
	ldap utils tls presence lua ims outbound debugger \
	extras websocket authephemeral; do
	extras websocket authephemeral ev uuid; do

   subpackages="$subpackages $pkgname-$_i"
   eval "_modules=\"\$_modules \$_mod_list_$_i\""
done

source="http://www.kamailio.org/pub/kamailio/$pkgver/src/kamailio-${pkgver}_src.tar.gz
	kamailio-4.1-backslash.patch
	0001-websocket-remove-libunistring-dependency.patch
	0002-fix_180_replies_in_sca_call_info.patch 
	musl-fixes.patch

	kamailio-4.2-backslash.patch
	0001-musl-fixes.patch
	kamailio.cfg
	kamailio.initd
	"
@@ -240,7 +247,7 @@ prepare() {

build() {
	cd "$_builddir"
	make FLAVOUR=kamailio STUN=1 \
	make FLAVOUR=kamailio STUN=1 EMBEDDED_UTF_DECODE=1\
		PREFIX=/usr \
		CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \
		cfg_target=/etc/kamailio/ \
@@ -414,24 +421,28 @@ authephemeral() {
		"$_mod_list_authephemeral"
}

md5sums="623b46e969445494655b1aa5ab5ad4b0  kamailio-4.1.5_src.tar.gz
ev() {
	_generic_pkg "Network event broadcast API" \
		"$_mod_list_ev"
}

uuid() {
	_generic_pkg "UUID generator using libuuid" \
		"$_mod_list_uuid"
}

md5sums="6b5dc98be07a5d68b3701d7955102d34  kamailio-4.2.0_src.tar.gz
bad1ac2d4c95043df271d2ea6d37627a  kamailio-4.1-backslash.patch
6251a5c33373c5276897c8abbbecc619  0001-websocket-remove-libunistring-dependency.patch
018ce30f5169866d12b395ba30bf3263  0002-fix_180_replies_in_sca_call_info.patch
558aa761bddb6ac85c152bd767670fcc  musl-fixes.patch
4685288dc54680597b00f956dc95d4d6  0001-musl-fixes.patch
a3c959ec568c43a905710e7d25cd8c25  kamailio.cfg
0e0a271fd3ddb7e87c01c26c7d041d59  kamailio.initd"
sha256sums="e24d078aa2a8500f7cf75120628140218241b1faf9f40ece118f4e6a5ca3b3d3  kamailio-4.1.5_src.tar.gz
sha256sums="617423cedf740719c21f4731094f1e0b755ae65952979eeea3e8e229a8da21a4  kamailio-4.2.0_src.tar.gz
d7e59be721ed0ad4621d404493b9a519708d801e9d4914b0164b819fa1abcd13  kamailio-4.1-backslash.patch
bbc06f9ae62b2e8df2c58f9a171f0408e075d5a51e2457e85ef3ca01aa972df9  0001-websocket-remove-libunistring-dependency.patch
e7217f214c4bdd8c2dbccfa1036a68749b2e7c0dbad0b10a44a84709e1660a99  0002-fix_180_replies_in_sca_call_info.patch
4f316e4c1617833111b86aad1e8878b62599e42bb229fe1ef7eee1d4438471e2  musl-fixes.patch
b98555ff304b51b82c6cf7e01d757b15ea4f05bd2e603c84d4384df6a6be62b6  0001-musl-fixes.patch
8024266849033a917147827c3579a382f10f3796989bebc6de3d7c80c965fb72  kamailio.cfg
a90d3ab09a3ed58892e94710a1f80492a61ffad1ccf7ccb5b851bb8f538d32c4  kamailio.initd"
sha512sums="578870f96d9251e676c2689d7a48d2a0a4fd37e5bfde0d145adfcffea1470d618f1eb0e5012ffe2c63d1b2c9e659128e3cbe50403c94499951b75e59bb223f0e  kamailio-4.1.5_src.tar.gz
sha512sums="811c19bf55000905a827f6ea956cd1c445fe1522c69b8eaf83d5a5dc5fba250fe84c6841e3e8d0769f225bc94c87f2fdf6349ed0f2521395a52b609bf55842e7  kamailio-4.2.0_src.tar.gz
a9bb1e8f9f373264b8351ddae099a36a46ddd46fdec09e468d297ba4f64bb4896e7d6e599da70a424e8a28695ab3f3b4ac940afab534593a6b9d08ae462f001a  kamailio-4.1-backslash.patch
a972e57d8d64c104cb3df329442c746588818ed7f148a409d6050bcbbbb021cc1eeb970b59924e0ffb7f9487faacb99cada0dbfb19b0b87f66ca6b2bcf8b8345  0001-websocket-remove-libunistring-dependency.patch
558a4dbd2c84a6d0208c5e0a65eacc6241ad20948a5882834d40106f6f1d4b40ec139bf8b513e6e7cb7afee71823f1811d85e2904f9b06720383b5581a1e9aca  0002-fix_180_replies_in_sca_call_info.patch
9afb7191541b40678ede6dd1bb034b2a6a704659acb54e156096fe0660e08358b0691028b1facfb50608ca2d25714962c92ede62e1f95cb53475c89d96bd33e4  musl-fixes.patch
dea7ef2ccf01357576045ba375d41301e2447b4454324007c7ca1862322835c57045852017192ca5434b32dd1b7a2e9669209b7111889dab335b74f042d0f11f  0001-musl-fixes.patch
0b666bfa10fd0af97b62749f8691cb3f76d9b40d1abe0a33e810e367bd733d2e8189c89f7f23010ec591116aada6e1a8a403b17449fe775038917617f281ad4d  kamailio.cfg
5ddaa059cdef10462c904f061f7bb085e62ad7501e2ed41f797d9e68822bce4e0e5ca09c1586c3901c920f8ce563c8c3ede860752c2b9bdb8f09908388ef337f  kamailio.initd"
diff --git a/main/kamailio/kamailio-4.1-backslash.patch b/main/kamailio/kamailio-4.1-backslash.patch
deleted file mode 100644
index 52d04ef..0000000
--- a/main/kamailio/kamailio-4.1-backslash.patch
@@ -1,55 +0,0 @@
diff --git a/utils/kamctl/kamdbctl.base b/utils/kamctl/kamdbctl.base
index b4ed9ad..9552e91 100644
--- a/utils/kamctl/kamdbctl.base
+++ b/utils/kamctl/kamdbctl.base
@@ -33,18 +33,18 @@ INSTALL_DBUID_TABLES=${INSTALL_DBUID_TABLES:-ask}
 
 # Used by dbtext and db_berkeley to define tables to be created, used by
 # postgres to do the grants
-STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain domain_attrs
-		grp uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber
-		location location_attrs re_grp trusted address missed_calls
-		usr_preferences aliases silo dialog dialog_vars dispatcher dialplan
+STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain domain_attrs \
+		grp uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber \
+		location location_attrs re_grp trusted address missed_calls \
+		usr_preferences aliases silo dialog dialog_vars dispatcher dialplan \
 		acc_cdrs}
-EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy
-		carrierroute carrier_name domain_name carrierfailureroute userblacklist
-		globalblacklist htable purplemap uacreg pl_pipes mtree mtrees
+EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy \
+		carrierroute carrier_name domain_name carrierfailureroute userblacklist \
+		globalblacklist htable purplemap uacreg pl_pipes mtree mtrees \
 		sca_subscriptions mohqcalls mohqueues rtpproxy}
-PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap 
+PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap \
 		pua rls_presentity rls_watchers}
-DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs
+DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs \
 		uid_global_attrs uid_uri uid_uri_attrs uid_user_attrs}
 
 # SQL definitions
@@ -74,17 +74,17 @@ GREP=${GREP:-grep}
 SED=${SED:-sed}
 
 # define what modules should be installed
-STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group
-		permissions registrar usrloc msilo alias_db uri_db speeddial
+STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group \
+		permissions registrar usrloc msilo alias_db uri_db speeddial \
 		avpops auth_db pdt dialog dispatcher dialplan}
 
 PRESENCE_MODULES=${PRESENCE_MODULES:-presence rls}
 
-EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute
-		userblacklist htable purple uac pipelimit mtree sca mohqueue
+EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute \
+		userblacklist htable purple uac pipelimit mtree sca mohqueue \
 		rtpproxy}
 
-DBUID_MODULES=${UID_MODULES:-uid_auth_db uid_avp_db uid_domain uid_gflags
+DBUID_MODULES=${UID_MODULES:-uid_auth_db uid_avp_db uid_domain uid_gflags \
 		uid_uri_db}
 
 ############################################################
diff --git a/main/kamailio/kamailio-4.2-backslash.patch b/main/kamailio/kamailio-4.2-backslash.patch
new file mode 100644
index 0000000..52d04ef
--- /dev/null
+++ b/main/kamailio/kamailio-4.2-backslash.patch
@@ -0,0 +1,55 @@
diff --git a/utils/kamctl/kamdbctl.base b/utils/kamctl/kamdbctl.base
index b4ed9ad..9552e91 100644
--- a/utils/kamctl/kamdbctl.base
+++ b/utils/kamctl/kamdbctl.base
@@ -33,18 +33,18 @@ INSTALL_DBUID_TABLES=${INSTALL_DBUID_TABLES:-ask}
 
 # Used by dbtext and db_berkeley to define tables to be created, used by
 # postgres to do the grants
-STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain domain_attrs
-		grp uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber
-		location location_attrs re_grp trusted address missed_calls
-		usr_preferences aliases silo dialog dialog_vars dispatcher dialplan
+STANDARD_TABLES=${STANDARD_TABLES:-version acc dbaliases domain domain_attrs \
+		grp uri speed_dial lcr_gw lcr_rule lcr_rule_target pdt subscriber \
+		location location_attrs re_grp trusted address missed_calls \
+		usr_preferences aliases silo dialog dialog_vars dispatcher dialplan \
 		acc_cdrs}
-EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy
-		carrierroute carrier_name domain_name carrierfailureroute userblacklist
-		globalblacklist htable purplemap uacreg pl_pipes mtree mtrees
+EXTRA_TABLES=${EXTRA_TABLES:-imc_members imc_rooms cpl sip_trace domainpolicy \
+		carrierroute carrier_name domain_name carrierfailureroute userblacklist \
+		globalblacklist htable purplemap uacreg pl_pipes mtree mtrees \
 		sca_subscriptions mohqcalls mohqueues rtpproxy}
-PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap 
+PRESENCE_TABLES=${PRESENCE_TABLES:-presentity active_watchers watchers xcap \
 		pua rls_presentity rls_watchers}
-DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs
+DBUID_TABLES=${UID_TABLES:-uid_credentials uid_domain uid_domain_attrs \
 		uid_global_attrs uid_uri uid_uri_attrs uid_user_attrs}
 
 # SQL definitions
@@ -74,17 +74,17 @@ GREP=${GREP:-grep}
 SED=${SED:-sed}
 
 # define what modules should be installed
-STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group
-		permissions registrar usrloc msilo alias_db uri_db speeddial
+STANDARD_MODULES=${STANDARD_MODULES:-standard acc lcr domain group \
+		permissions registrar usrloc msilo alias_db uri_db speeddial \
 		avpops auth_db pdt dialog dispatcher dialplan}
 
 PRESENCE_MODULES=${PRESENCE_MODULES:-presence rls}
 
-EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute
-		userblacklist htable purple uac pipelimit mtree sca mohqueue
+EXTRA_MODULES=${EXTRA_MODULES:-imc cpl siptrace domainpolicy carrierroute \
+		userblacklist htable purple uac pipelimit mtree sca mohqueue \
 		rtpproxy}
 
-DBUID_MODULES=${UID_MODULES:-uid_auth_db uid_avp_db uid_domain uid_gflags
+DBUID_MODULES=${UID_MODULES:-uid_auth_db uid_avp_db uid_domain uid_gflags \
 		uid_uri_db}
 
 ############################################################
diff --git a/main/kamailio/musl-fixes.patch b/main/kamailio/musl-fixes.patch
deleted file mode 100644
index 28df55f..0000000
--- a/main/kamailio/musl-fixes.patch
@@ -1,76 +0,0 @@
diff --git a/modules/ldap/ld_session.h b/modules/ldap/ld_session.h
index 03a4ea5..de7bc0b 100644
--- a/modules/ldap/ld_session.h
+++ b/modules/ldap/ld_session.h
@@ -33,6 +33,7 @@
 #ifndef LD_SESSION_H
 #define LD_SESSION_H
 
+#include <sys/time.h>
 #include <ldap.h>
 
 #include "iniparser.h"
diff --git a/modules/seas/event_dispatcher.c b/modules/seas/event_dispatcher.c
index d10cffe..8e1a56a 100644
--- a/modules/seas/event_dispatcher.c
+++ b/modules/seas/event_dispatcher.c
@@ -25,7 +25,7 @@
 #include <string.h>/*strcmp,memset*/
 #include <errno.h>/*errno*/
 #include <unistd.h>/*close(),read(),pipe,fork,pid_t*/
-#include <sys/poll.h>/*poll*/
+#include <poll.h>/*poll*/
 #include <signal.h>/*signal*/
 #include <time.h>/*time*/
 #include <string.h>/*memcmp*/
diff --git a/modules/tls/tls_server.c b/modules/tls/tls_server.c
index cfd09c4..0a27433 100644
--- a/modules/tls/tls_server.c
+++ b/modules/tls/tls_server.c
@@ -33,7 +33,7 @@
  */
 
 
-#include <sys/poll.h>
+#include <poll.h>
 #include <openssl/err.h>
 #include <openssl/ssl.h>
 #include "../../dprint.h"
diff --git a/modules/xhttp_pi/xhttp_pi_fnc.c b/modules/xhttp_pi/xhttp_pi_fnc.c
index 5602429..2f8e1f7 100644
--- a/modules/xhttp_pi/xhttp_pi_fnc.c
+++ b/modules/xhttp_pi/xhttp_pi_fnc.c
@@ -885,7 +885,7 @@ int ph_getColVals(ph_mod_t *module, ph_cmd_t *cmd,
 			if(vals==NULL||ids==NULL) {LM_ERR("oom\n"); return -1;}
 			col_vals = vals; col_ids = ids;
 			vals = &col_vals[size]; ids = &col_ids[size];
-			memset(vals, 0, sizeof(str*)); memset(ids, 0, sizeof(str*));
+			memset(vals, 0, sizeof(str)); memset(ids, 0, sizeof(str));
 			/* Retrieve the node attribute */
 			attr.s = ph_xmlNodeGetAttrContentByName(node,
 							XHTTP_PI_XML_ID_ATTR);
diff --git a/tsend.c b/tsend.c
index 3a18502..99f0c21 100644
--- a/tsend.c
+++ b/tsend.c
@@ -43,7 +43,7 @@
 
 #include <string.h>
 #include <errno.h>
-#include <sys/poll.h>
+#include <poll.h>
 
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/utils/sercmd/sercmd.c b/utils/sercmd/sercmd.c
index fb9c0a3..717a78d 100644
--- a/utils/sercmd/sercmd.c
+++ b/utils/sercmd/sercmd.c
@@ -49,6 +49,7 @@
 #include <netdb.h> /* gethostbyname */
 #include <fcntl.h>
 #include <time.h> /* time */
+#include <sys/time.h>
 
 #ifdef USE_READLINE
 #include <readline/readline.h>
-- 
2.0.0



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20141022091404.1221ae92@ncopa-desktop.alpinelinux.org>
In-Reply-To
<1413941396-14974-1-git-send-email-nangel@alpinelinux.org> (view parent)
Sender timestamp
1413962044
DKIM signature
missing
Download raw message
On Wed, 22 Oct 2014 01:29:56 +0000
Nathan Angelacos <nangel@alpinelinux.org> wrote:

> new in sub-packages:
> 
>  kamailio:        rtpproxy-ng renamed to rtpengine
>  kamailio-extras: tsilo jsonrpc-s
>  kamailio-uuid:   new (uuid module)
>  kamailio-ev:     new (evapi module)

Thanks!

I had some problems building it

problem 1: checksum missing for kamailio-4.2-backslash.patch. 'abuild checksum' fixed that

problem 2:

ws_frame.c:34:20: fatal error: unistr.h: No such file or directory
 #include <unistr.h>
                    ^
compilation terminated.
../../Makefile.rules:114: recipe for target 'ws_frame.o' failed


> @@ -240,7 +247,7 @@ prepare() {
>  
>  build() {
>  	cd "$_builddir"
> -	make FLAVOUR=kamailio STUN=1 \
> +	make FLAVOUR=kamailio STUN=1 EMBEDDED_UTF_DECODE=1\
>  		PREFIX=/usr \
>  		CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \
>  		cfg_target=/etc/kamailio/ \



Seems the define is EMBEDDED_UTF8_DECODE but I don't get how we are
supposed to pass it since just passing it to 'make cfg' does not make
it stick.

adding EMBEDDED_UTF8_DECODE:=1 in config.mak does not either work.

I believe this should be reported upstream.

As a workaround I have added it to 'make all' and 'make install':
@@ -247,7 +247,7 @@ prepare() {
 
 build() {
        cd "$_builddir"
-       make FLAVOUR=kamailio STUN=1 EMBEDDED_UTF_DECODE=1\
+       make FLAVOUR=kamailio STUN=1 \
                PREFIX=/usr \
                CC_EXTRA_OPTS="$CFLAGS -D_GNU_SOURCE" \
                cfg_target=/etc/kamailio/ \
@@ -256,12 +256,12 @@ build() {
                DESTDIR="$pkgdir" \
                cfg_prefix="$pkgdir" \
                cfg
-       make all || return 1
+       make all EMBEDDED_UTF8_DECODE=1 || return 1
 }
 
 package() {
        cd "$_builddir"
-       make  -j1 install || return 1
+       make  -j1 install EMBEDDED_UTF8_DECODE=1 || return 1
 
        # move default config to -doc package and use our own default config
 


-nc


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)