Hi Probably too late to go in now but will bump after unlock Version 3.2.2 (released 2014-07-05) hilights:
libotr 4.0 compatibility fixes. Twitter Unicode fixes. Small other bugfixes. Cheers Tom Index: Makefile =================================================================== RCS file: /cvs/ports/net/bitlbee/Makefile,v retrieving revision 1.54 diff -u -p -u -r1.54 Makefile --- Makefile 10 Jul 2014 13:09:06 -0000 1.54 +++ Makefile 28 Jul 2014 14:18:56 -0000 @@ -2,9 +2,8 @@ COMMENT= IRC proxy to connect to AIM, ICQ, Jabber, MSN and Yahoo -DISTNAME= bitlbee-3.2.1 +DISTNAME= bitlbee-3.2.2 CATEGORIES= net -REVISION= 0 HOMEPAGE= http://bitlbee.org/ Index: distinfo =================================================================== RCS file: /cvs/ports/net/bitlbee/distinfo,v retrieving revision 1.25 diff -u -p -u -r1.25 distinfo --- distinfo 2 Jan 2014 13:04:34 -0000 1.25 +++ distinfo 28 Jul 2014 14:18:56 -0000 @@ -1,2 +1,2 @@ -SHA256 (bitlbee-3.2.1.tar.gz) = APQR3X1tKPMPDnPkbJy+iLQAbn8Drf4HuQqXKAopD1k= -SIZE (bitlbee-3.2.1.tar.gz) = 657595 +SHA256 (bitlbee-3.2.2.tar.gz) = ujiTkoHyPooOcQIse+DLaPZUQkhAQ2LF4gJF+npnVY4= +SIZE (bitlbee-3.2.2.tar.gz) = 661757 Index: patches/patch-configure =================================================================== RCS file: patches/patch-configure diff -N patches/patch-configure --- patches/patch-configure 2 Jan 2014 13:04:34 -0000 1.10 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,28 +0,0 @@ -$OpenBSD: patch-configure,v 1.10 2014/01/02 13:04:34 landry Exp $ ---- configure.orig Tue Dec 31 21:40:21 2013 -+++ configure Tue Dec 31 21:42:26 2013 -@@ -344,6 +344,24 @@ detect_resolv_dynamic() - FreeBSD ) - # In FreeBSD res_* routines are present in libc.so - LIBRESOLV=;; -+ OpenBSD ) -+ # In OpenBSD res_* routines are present in libc.so, -+ # and there are no ns_*() functions, thus the special -+ # RESOLV_TESTCODE. -+ LIBRESOLV= -+ RESOLV_TESTCODE=' -+#include <netinet/in.h> -+#include <arpa/nameser.h> -+#include <resolv.h> -+ -+int main() -+{ -+ res_query( NULL, 0, 0, NULL, 0 ); -+ dn_expand( NULL, NULL, NULL, NULL, 0 ); -+} -+' -+;; -+ - * ) - LIBRESOLV=-lresolv;; - esac Index: patches/patch-lib_misc_c =================================================================== RCS file: patches/patch-lib_misc_c diff -N patches/patch-lib_misc_c --- patches/patch-lib_misc_c 2 Jan 2014 13:04:34 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,117 +0,0 @@ -$OpenBSD: patch-lib_misc_c,v 1.2 2014/01/02 13:04:34 landry Exp $ -http://bugs.bitlbee.org/bitlbee/ticket/421 -needed until ns_parse family of functions are added to lib/libc/asr ---- lib/misc.c.orig Wed Nov 27 22:54:54 2013 -+++ lib/misc.c Tue Dec 31 21:52:54 2013 -@@ -44,7 +44,10 @@ - #ifdef HAVE_RESOLV_A - #include <arpa/nameser.h> - #include <resolv.h> -+#if defined (__OpenBSD__) -+#include <netinet/in.h> - #endif -+#endif - - #include "md5.h" - #include "ssl_client.h" -@@ -522,19 +525,90 @@ struct ns_srv_reply **srv_lookup( char *service, char - char name[1024]; - unsigned char querybuf[1024]; - const unsigned char *buf; -+ int i, n, len, size; -+#if defined (__OpenBSD__) -+ char uncomp[MAXDNAME]; -+ int complen = -1; -+ unsigned int qdcount = 0, ancount = 0; -+ -+ const unsigned char *comp = NULL; -+ unsigned char *end = NULL; -+ HEADER *head = NULL; -+ -+ int ns_c_in = C_IN, ns_t_srv = T_SRV; -+ int prio = -1, weight = -1, port = -1; -+#else - ns_msg nsh; - ns_rr rr; -- int i, n, len, size; -+#endif - - g_snprintf( name, sizeof( name ), "_%s._%s.%s", service, protocol, domain ); - - if( ( size = res_query( name, ns_c_in, ns_t_srv, querybuf, sizeof( querybuf ) ) ) <= 0 ) - return NULL; -+ -+ n = 0; -+ -+#if defined (__OpenBSD__) -+ head = (HEADER *)querybuf; -+ comp = querybuf + HFIXEDSZ; -+ end = querybuf + size; -+ -+ ancount = ntohs(head->ancount); -+ -+ /* Skip over the Query part */ -+ for (qdcount = ntohs(head->qdcount); qdcount--; comp += size + QFIXEDSZ) -+ if ((size = dn_skipname(comp, end)) < 0) -+ return NULL; -+ -+ -+ /* Get the answers */ -+ while (ancount > 0 && comp < end) { -+ /* Skip the owner name, to which this resource record pertains. */ -+ complen = dn_expand(querybuf, end, comp, uncomp, sizeof(uncomp)); -+ if (complen < 0) -+ return NULL; -+ -+ comp += complen; -+ -+ -+ /* Get the useful answers. */ -+ /* GETSHORT(type, comp); */ -+ comp += INT16SZ; -+ /* GETSHORT(class, comp); */ -+ comp += INT16SZ; -+ /* GETLONG(ttl, comp); */ -+ comp += INT32SZ; -+ /* GETSHORT(complen, comp); */ -+ comp += INT16SZ; -+ -+ GETSHORT(prio , comp); -+ GETSHORT(weight , comp); -+ GETSHORT(port , comp); -+ complen = dn_expand(querybuf, end, comp, uncomp, sizeof(uncomp)); -+ if (complen < 0) -+ return NULL; -+ -+ comp += complen; -+ -+ reply = g_malloc( sizeof( struct ns_srv_reply ) + strlen(uncomp) + 1 ); -+ -+ reply->prio = prio; -+ reply->weight = weight; -+ reply->port = port; -+ strlcpy( reply->name, uncomp, strlen(uncomp) + 1 ); -+ -+ n++; -+ replies = g_renew( struct ns_srv_reply *, replies, n + 1 ); -+ replies[n-1] = reply; -+ -+ ancount--; -+ } -+#else - - if( ns_initparse( querybuf, size, &nsh ) != 0 ) - return NULL; - -- n = 0; - while( ns_parserr( &nsh, ns_s_an, n, &rr ) == 0 ) - { - size = ns_rr_rdlen( rr ); -@@ -567,6 +641,7 @@ struct ns_srv_reply **srv_lookup( char *service, char - replies = g_renew( struct ns_srv_reply *, replies, n + 1 ); - replies[n-1] = reply; - } -+#endif - if( replies ) - replies[n] = NULL; - #endif Index: patches/patch-otr_c =================================================================== RCS file: patches/patch-otr_c diff -N patches/patch-otr_c --- patches/patch-otr_c 4 Jan 2014 16:42:46 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,211 +0,0 @@ -$OpenBSD: patch-otr_c,v 1.3 2014/01/04 16:42:46 naddy Exp $ -http://bugs.bitlbee.org/bitlbee/ticket/1004 ---- otr.c.orig Wed Nov 27 22:54:54 2013 -+++ otr.c Sat Jan 4 12:40:49 2014 -@@ -7,8 +7,8 @@ - /* - OTR support (cf. http://www.cypherpunks.ca/otr/) - -- (c) 2008-2011 Sven Moritz Hallberg <pe...@khjk.org> -- (c) 2008 funded by stonedcoder.org -+ (c) 2008-2011,2013 Sven Moritz Hallberg <pe...@khjk.org> -+ funded by stonedcoder.org - - files used to store OTR data: - <configdir>/<nick>.otr_keys -@@ -207,21 +207,30 @@ void init_plugin(void) - otr_ops.create_privkey = &op_create_privkey; - otr_ops.is_logged_in = &op_is_logged_in; - otr_ops.inject_message = &op_inject_message; -- otr_ops.notify = NULL; -- otr_ops.display_otr_message = &op_display_otr_message; -+ //XXX otr_ops.display_otr_message = &op_display_otr_message; - otr_ops.update_context_list = NULL; -- otr_ops.protocol_name = NULL; -- otr_ops.protocol_name_free = NULL; - otr_ops.new_fingerprint = &op_new_fingerprint; - otr_ops.write_fingerprints = &op_write_fingerprints; - otr_ops.gone_secure = &op_gone_secure; - otr_ops.gone_insecure = &op_gone_insecure; - otr_ops.still_secure = &op_still_secure; -- otr_ops.log_message = &op_log_message; -+ //XXX otr_ops.log_message = &op_log_message; - otr_ops.max_message_size = &op_max_message_size; - otr_ops.account_name = &op_account_name; - otr_ops.account_name_free = NULL; -- -+ -+ /* stuff added with libotr 4.0.0 */ -+ otr_ops.received_symkey = NULL; /* we don't use the extra key */ -+ otr_ops.otr_error_message = NULL; // TODO? -+ otr_ops.otr_error_message_free = NULL; -+ otr_ops.resent_msg_prefix = NULL; // XXX don't need? -+ otr_ops.resent_msg_prefix_free = NULL; -+ otr_ops.handle_smp_event = NULL; // XXX replace smp state machine w/this -+ otr_ops.handle_msg_event = NULL; // XXX -+ otr_ops.create_instag = NULL; // XXX -+ otr_ops.convert_msg = NULL; // XXX other plugins? de/htmlize? -+ otr_ops.timer_control = NULL; // XXX call otrl_message_poll reg'ly -+ - root_command_add( "otr", 1, cmd_otr, 0 ); - register_irc_plugin( &otr_plugin ); - } -@@ -385,7 +394,7 @@ char *otr_filter_msg_in(irc_user_t *iu, char *msg, int - - ignore_msg = otrl_message_receiving(irc->otr->us, &otr_ops, ic, - ic->acc->user, ic->acc->prpl->name, iu->bu->handle, msg, &newmsg, -- &tlvs, NULL, NULL); -+ &tlvs, NULL, NULL, NULL); - - otr_handle_smp(ic, iu->bu->handle, tlvs); - -@@ -396,9 +405,11 @@ char *otr_filter_msg_in(irc_user_t *iu, char *msg, int - /* this was a non-OTR message */ - return msg; - } else { -+ /* XXX move this to convert callback */ -+ - /* OTR has processed this message */ - ConnContext *context = otrl_context_find(irc->otr->us, iu->bu->handle, -- ic->acc->user, ic->acc->prpl->name, 0, NULL, NULL, NULL); -+ ic->acc->user, ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); - - /* we're done with the original msg, which will be caller-freed. */ - /* NB: must not change the newmsg pointer, since we free it. */ -@@ -458,6 +469,7 @@ char *otr_filter_msg_out(irc_user_t *iu, char *msg, in - ConnContext *ctx = NULL; - irc_t *irc = iu->irc; - struct im_connection *ic = iu->bu->ic; -+ otrl_instag_t instag = OTRL_INSTAG_MASTER; // XXX? - - /* don't do OTR on certain (not classic IM) protocols, e.g. twitter */ - if(ic->acc->prpl->options & OPT_NOOTR) { -@@ -466,7 +478,7 @@ char *otr_filter_msg_out(irc_user_t *iu, char *msg, in - - ctx = otrl_context_find(irc->otr->us, - iu->bu->handle, ic->acc->user, ic->acc->prpl->name, -- 1, NULL, NULL, NULL); -+ instag, 1, NULL, NULL, NULL); - - /* HTML encoding */ - /* consider OTR plaintext to be HTML if otr_does_html is set */ -@@ -477,8 +489,8 @@ char *otr_filter_msg_out(irc_user_t *iu, char *msg, in - } - - st = otrl_message_sending(irc->otr->us, &otr_ops, ic, -- ic->acc->user, ic->acc->prpl->name, iu->bu->handle, -- emsg, NULL, &otrmsg, NULL, NULL); -+ ic->acc->user, ic->acc->prpl->name, iu->bu->handle, instag, -+ emsg, NULL, &otrmsg, OTRL_FRAGMENT_SEND_SKIP, NULL, NULL, NULL); - if(emsg != msg) { - g_free(emsg); /* we're done with this one */ - } -@@ -491,8 +503,8 @@ char *otr_filter_msg_out(irc_user_t *iu, char *msg, in - otrl_message_free(otrmsg); - return NULL; - } -- st = otrl_message_fragment_and_send(&otr_ops, ic, ctx, -- otrmsg, OTRL_FRAGMENT_SEND_ALL, NULL); -+ otr_ops.inject_message(ic, ctx->accountname, -+ ctx->protocol, ctx->username, otrmsg); - otrl_message_free(otrmsg); - } else { - /* note: otrl_message_sending handles policy, so that if REQUIRE_ENCRYPTION is set, -@@ -773,19 +785,24 @@ void cmd_otr_disconnect(irc_t *irc, char **args) - return; - } - -- otrl_message_disconnect(irc->otr->us, &otr_ops, -+ /* XXX we disconnect all instances; is that what we want? */ -+ otrl_message_disconnect_all_instances(irc->otr->us, &otr_ops, - u->bu->ic, u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, u->bu->handle); - -- /* for some reason, libotr (3.1.0) doesn't do this itself: */ -- if(u->flags & IRC_USER_OTR_ENCRYPTED) { -- ConnContext *ctx; -- ctx = otrl_context_find(irc->otr->us, u->bu->handle, u->bu->ic->acc->user, -- u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL); -- if(ctx) -- op_gone_insecure(u->bu->ic, ctx); -- else /* huh? */ -- u->flags &= ( IRC_USER_OTR_ENCRYPTED | IRC_USER_OTR_TRUSTED ); -+ /* for some reason, libotr (4.0.0) doesn't do this itself: */ -+ if(!(u->flags & IRC_USER_OTR_ENCRYPTED)) -+ return; -+ -+ ConnContext *ctx, *p; -+ ctx = otrl_context_find(irc->otr->us, u->bu->handle, u->bu->ic->acc->user, -+ u->bu->ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); -+ if(!ctx) { /* huh? */ -+ u->flags &= ( IRC_USER_OTR_ENCRYPTED | IRC_USER_OTR_TRUSTED ); -+ return; - } -+ -+ for(p=ctx; p && p->m_context == ctx->m_context; p=p->next) -+ op_gone_insecure(u->bu->ic, p); - } - - void cmd_otr_connect(irc_t *irc, char **args) -@@ -830,7 +847,7 @@ void cmd_otr_trust(irc_t *irc, char **args) - } - - ctx = otrl_context_find(irc->otr->us, u->bu->handle, -- u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL); -+ u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); // XXX - if(!ctx) { - irc_rootmsg(irc, "%s: no otr context with user", args[1]); - return; -@@ -894,7 +911,7 @@ void cmd_otr_info(irc_t *irc, char **args) - if(protocol && myhandle) { - *(myhandle++) = '\0'; - handle = arg; -- ctx = otrl_context_find(irc->otr->us, handle, myhandle, protocol, 0, NULL, NULL, NULL); -+ ctx = otrl_context_find(irc->otr->us, handle, myhandle, protocol, 0, OTRL_INSTAG_MASTER, NULL, NULL, NULL); // XXX - if(!ctx) { - irc_rootmsg(irc, "no such context"); - g_free(arg); -@@ -908,7 +925,7 @@ void cmd_otr_info(irc_t *irc, char **args) - return; - } - ctx = otrl_context_find(irc->otr->us, u->bu->handle, u->bu->ic->acc->user, -- u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL); -+ u->bu->ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); // XXX - if(!ctx) { - irc_rootmsg(irc, "no otr context with %s", args[1]); - g_free(arg); -@@ -1027,7 +1044,7 @@ void cmd_otr_forget(irc_t *irc, char **args) - } - - ctx = otrl_context_find(irc->otr->us, u->bu->handle, u->bu->ic->acc->user, -- u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL); -+ u->bu->ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); // XXX - if(!ctx) { - irc_rootmsg(irc, "no otr context with %s", args[2]); - return; -@@ -1070,7 +1087,7 @@ void cmd_otr_forget(irc_t *irc, char **args) - } - - ctx = otrl_context_find(irc->otr->us, u->bu->handle, u->bu->ic->acc->user, -- u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL); -+ u->bu->ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); // XXX - if(!ctx) { - irc_rootmsg(irc, "no otr context with %s", args[2]); - return; -@@ -1133,7 +1150,7 @@ void otr_handle_smp(struct im_connection *ic, const ch - bu = bee_user_by_handle(ic->bee, ic, handle); - if(!bu || !(u = bu->ui_data)) return; - context = otrl_context_find(us, handle, -- ic->acc->user, ic->acc->prpl->name, 1, NULL, NULL, NULL); -+ ic->acc->user, ic->acc->prpl->name, OTRL_INSTAG_MASTER, 1, NULL, NULL, NULL); - if(!context) { - /* huh? out of memory or what? */ - irc_rootmsg(irc, "smp: failed to get otr context for %s", u->nick); -@@ -1265,7 +1282,7 @@ void otr_smp_or_smpq(irc_t *irc, const char *nick, con - } - - ctx = otrl_context_find(irc->otr->us, u->bu->handle, -- u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, 0, NULL, NULL, NULL); -+ u->bu->ic->acc->user, u->bu->ic->acc->prpl->name, OTRL_INSTAG_MASTER, 0, NULL, NULL, NULL); - if(!ctx || ctx->msgstate != OTRL_MSGSTATE_ENCRYPTED) { - irc_rootmsg(irc, "smp: otr inactive with %s, try \x02otr connect" - " %s\x02", nick, nick);