ports/112651: Pidgen-OTR Port

Mike Smith perlfu at gmail.com
Mon May 14 10:50:03 UTC 2007


>Number:         112651
>Category:       ports
>Synopsis:       Pidgen-OTR Port
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 14 10:50:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Mike Smith
>Release:        
>Organization:
>Environment:
>Description:
Off-the-Record (OTR) Messaging allows you to have private 
conversations over instant messaging by providing:

* Encryption
        No one else can read your instant messages.
* Authentication
        You are assured the correspondent is who you think it is. 
* Deniability
        The messages you send do not have digital signatures that
        are checkable by a third party. Anyone can forge messages
        after a conversation to make them look like they came from
        you. However, during a conversation, your correspondent is
        assured the messages he sees are authentic and unmodified. 
* Perfect forward secrecy
        If you lose control of your private keys, no previous 
        conversation is compromised.

WWW: http://www.cypherpunks.ca/otr/

>How-To-Repeat:

>Fix:
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#       /usr/ports/security/pidgin-otr
#       /usr/ports/security/pidgin-otr/files
#       /usr/ports/security/pidgin-otr/files/gaim2b2-otr.diff
#       /usr/ports/security/pidgin-otr/Makefile
#       /usr/ports/security/pidgin-otr/distinfo
#       /usr/ports/security/pidgin-otr/pkg-descr
#       /usr/ports/security/pidgin-otr/pkg-plist
#
echo c - /usr/ports/security/pidgin-otr
mkdir -p /usr/ports/security/pidgin-otr > /dev/null 2>&1
echo c - /usr/ports/security/pidgin-otr/files
mkdir -p /usr/ports/security/pidgin-otr/files > /dev/null 2>&1
echo x - /usr/ports/security/pidgin-otr/files/gaim2b2-otr.diff
sed 's/^X//' >/usr/ports/security/pidgin-otr/files/gaim2b2-otr.diff << 'END-of-/usr/ports/security/pidgin-otr/files/gaim2b2-otr.diff'
XIndex: ChangeLog
X===================================================================
XRCS file: /cvsroot/otr/gaim-otr/ChangeLog,v
Xretrieving revision 1.13
Xretrieving revision 1.15
Xdiff -u -r1.13 -r1.15
X--- ChangeLog  2 Nov 2005 22:04:47 -0000       1.13
X+++ ChangeLog  20 Jan 2006 15:22:06 -0000      1.15
X@@ -1,3 +1,13 @@
X+2006-01-20
X+
X+      * otr-plugin.c: Track the gaim-2 API changes.
X+
X+2005-12-18
X+
X+      * gtk-dialog.c:
X+      * otr-plugin.c: Compile against either gaim-1.x or gaim-2.x,
X+      based on a patch from Dustin Howett <alaricx at gmail.com>.
X+
X 2005-11-02
X 
X       * INSTALL: Add instruction for doing autoreconf from CVS
XIndex: gtk-dialog.c
X===================================================================
XRCS file: /cvsroot/otr/gaim-otr/gtk-dialog.c,v
Xretrieving revision 1.9
Xretrieving revision 1.10
Xdiff -u -r1.9 -r1.10
X--- gtk-dialog.c       28 Oct 2005 03:38:21 -0000      1.9
X+++ gtk-dialog.c       18 Dec 2005 18:33:48 -0000      1.10
X@@ -26,7 +26,12 @@
X #include <gcrypt.h>
X 
X /* gaim headers */
X+#include "version.h"
X+#if GAIM_MAJOR_VERSION < 2
X #include "stock.h"
X+#else
X+#include "gtkstock.h"
X+#endif
X #include "plugin.h"
X #include "notify.h"
X #include "gtkconv.h"
X@@ -779,7 +784,11 @@
X     account = gaim_accounts_find(accountname, protocol);
X     if (!account) return -1;
X 
X+#if GAIM_MAJOR_VERSION < 2
X     conv = gaim_find_conversation_with_account(username, account);
X+#else
X+    conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account);
X+#endif
X     if (!conv) return -1;
X 
X     gaim_conversation_write(conv, NULL, msg, GAIM_MESSAGE_SYSTEM, time(NULL));
X@@ -908,7 +917,11 @@
X     GtkWidget *menuquerylabel;
X     GtkWidget *menuview;
X     GtkWidget *menuverf;
X+#if GAIM_MAJOR_VERSION < 2
X+    /* gaim-2.0.0 no longer has the row of buttons, so it doesn't have
X+     * the button_type pref */
X     GaimButtonStyle buttonstyle;
X+#endif
X     GaimGtkConversation *gtkconv = GAIM_GTK_CONVERSATION(conv);
X     label = gaim_conversation_get_data(conv, "otr-label");
X     icon = gaim_conversation_get_data(conv, "otr-icon");
X@@ -919,7 +932,9 @@
X     menuend = gaim_conversation_get_data(conv, "otr-menuend");
X     menuview = gaim_conversation_get_data(conv, "otr-menuview");
X     menuverf = gaim_conversation_get_data(conv, "otr-menuverf");
X+#if GAIM_MAJOR_VERSION < 2
X     buttonstyle = gaim_prefs_get_int("/gaim/gtk/conversations/button_type");
X+#endif
X 
X     /* Set the button's icon, label and tooltip. */
X     otr_icon(icon, level);
X@@ -948,6 +963,7 @@
X 
X     /* Set the appropriate visibility */
X     gtk_widget_show_all(button);
X+#if GAIM_MAJOR_VERSION < 2
X     if (buttonstyle == GAIM_BUTTON_IMAGE) {
X       /* Hide the text */
X       gtk_widget_hide(icontext);
X@@ -958,6 +974,7 @@
X       gtk_widget_hide(icontext);
X       gtk_widget_hide(icon);
X     }
X+#endif
X }
X 
X static void dialog_update_label(ConnContext *context)
X@@ -968,7 +985,11 @@
X 
X     account = gaim_accounts_find(context->accountname, context->protocol);
X     if (!account) return;
X+#if GAIM_MAJOR_VERSION < 2
X     conv = gaim_find_conversation_with_account(context->username, account);
X+#else
X+    conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, context->username, account);
X+#endif
X     if (!conv) return;
X     dialog_update_label_conv(conv, level);
X }
X@@ -1252,7 +1273,11 @@
X     account = gaim_accounts_find(accountname, protocol);
X     if (!account) return;
X 
X+#if GAIM_MAJOR_VERSION < 2
X     conv = gaim_find_conversation_with_account(username, account);
X+#else
X+    conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, username, account);
X+#endif
X     if (!conv) return;
X 
X     buf = g_strdup_printf("%s has ended his private conversation with you; "
X@@ -1406,9 +1431,13 @@
X     GtkWidget *whatsthis;
X 
X     /* Do nothing if this isn't an IM conversation */
X+#if GAIM_MAJOR_VERSION < 2
X     if (gaim_conversation_get_type(conv) != GAIM_CONV_IM) return;
X-
X     bbox = gtkconv->bbox;
X+#else
X+    if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM) return;
X+    bbox = gtkconv->lower_hbox;
X+#endif
X 
X     context = otrg_plugin_conv_to_context(conv);
X 
X@@ -1515,7 +1544,11 @@
X     GtkWidget *button;
X 
X     /* Do nothing if this isn't an IM conversation */
X+#if GAIM_MAJOR_VERSION < 2
X     if (gaim_conversation_get_type(conv) != GAIM_CONV_IM) return;
X+#else
X+    if (gaim_conversation_get_type(conv) != GAIM_CONV_TYPE_IM) return;
X+#endif
X 
X     button = gaim_conversation_get_data(conv, "otr-button");
X     if (button) gtk_object_destroy(GTK_OBJECT(button));
X@@ -1531,7 +1564,11 @@
X     OtrlPolicy policy;
X 
X     /* Do nothing if this isn't an IM conversation */
X+#if GAIM_MAJOR_VERSION < 2
X     if (gaim_conversation_get_type(conv) != GAIM_CONV_IM) return;
X+#endif
X 
X     account = gaim_conversation_get_account(conv);
X     name = gaim_conversation_get_name(conv);
XIndex: otr-plugin.c
X===================================================================
XRCS file: /cvsroot/otr/gaim-otr/otr-plugin.c,v
Xretrieving revision 1.10
Xretrieving revision 1.12
Xdiff -u -r1.10 -r1.12
X--- otr-plugin.c       27 Oct 2005 16:01:59 -0000      1.10
X+++ otr-plugin.c       20 Jan 2006 15:22:06 -0000      1.12
X@@ -32,11 +32,11 @@
X 
X /* gaim headers */
X #include "gaim.h"
X-#include "core.h"
X #include "notify.h"
X #include "version.h"
X #include "util.h"
X #include "debug.h"
X+#include "core.h"
X 
X #ifdef USING_GTK
X /* gaim GTK headers */
X@@ -156,7 +156,11 @@
X     buddy = gaim_find_buddy(account, recipient);
X     if (!buddy) return -1;
X 
X+#if GAIM_MAJOR_VERSION < 2
X     return (buddy->present == GAIM_BUDDY_ONLINE);
X+#else
X+    return (GAIM_BUDDY_IS_ONLINE(buddy));
X+#endif
X }
X 
X static void inject_message_cb(void *opdata, const char *accountname,
X@@ -395,6 +399,8 @@
X     otrg_dialog_resensitize_all();
X }
X 
X+#if GAIM_MAJOR_VERSION < 2
X+/* gaim-2.0.0 no longer has the row of buttons in question */
X static void process_button_type_change(const char *name, GaimPrefType type,
X       gpointer value, gpointer data)
X {
X@@ -404,6 +410,7 @@
X      * buttons as well. */
X     otrg_dialog_resensitize_all();
X }
X+#endif
X 
X static void otr_options_cb(GaimBlistNode *node, gpointer user_data)
X {
X@@ -416,7 +423,11 @@
X 
X static void supply_extended_menu(GaimBlistNode *node, GList **menu)
X {
X+#if GAIM_MAJOR_VERSION < 2
X     GaimBlistNodeAction *act;
X+#else
X+    GaimMenuAction *act;
X+#endif
X     GaimBuddy *buddy;
X     GaimAccount *acct;
X     const char *proto;
X@@ -430,7 +441,12 @@
X     proto = gaim_account_get_protocol_id(acct);
X     if (!otrg_plugin_proto_supports_otr(proto)) return;
X 
X+#if GAIM_MAJOR_VERSION < 2
X     act = gaim_blist_node_action_new("OTR Settings", otr_options_cb, NULL);
X+#else
X+    act = gaim_menu_action_new("OTR Settings", (GaimCallback)otr_options_cb,
X+          NULL, NULL);
X+#endif
X     *menu = g_list_append(*menu, act);
X }
X 
X@@ -482,9 +498,17 @@
X     account = gaim_accounts_find(context->accountname, context->protocol);
X     if (account == NULL) return NULL;
X 
X+#if GAIM_MAJOR_VERSION < 2
X     conv = gaim_find_conversation_with_account(context->username, account);
X+#else
X+    conv = gaim_find_conversation_with_account(GAIM_CONV_TYPE_IM, context->username, account);
X+#endif
X     if (conv == NULL && force_create) {
X+#if GAIM_MAJOR_VERSION < 2
X       conv = gaim_conversation_new(GAIM_CONV_IM, account, context->username);
X+#else
X+      conv = gaim_conversation_new(GAIM_CONV_TYPE_IM, account, context->username);
X+#endif
X     }
X 
X     return conv;
X@@ -523,7 +547,10 @@
X     }
X }
X 
X+#if GAIM_MAJOR_VERSION < 2
X+/* gaim-2.0.0 no longer has the row of buttons in question */
X static guint button_type_cbid;
X+#endif
X 
X static gboolean otr_plugin_load(GaimPlugin *handle)
X {
X@@ -567,9 +594,11 @@
X           GAIM_CALLBACK(process_connection_change), NULL);
X     gaim_signal_connect(blist_handle, "blist-node-extended-menu",
X           otrg_plugin_handle, GAIM_CALLBACK(supply_extended_menu), NULL);
X+#if GAIM_MAJOR_VERSION < 2
X     button_type_cbid = gaim_prefs_connect_callback(
X           "/gaim/gtk/conversations/button_type",
X           process_button_type_change, NULL);
X+#endif
X 
X     gaim_conversation_foreach(otrg_dialog_new_conv);
X 
X@@ -601,7 +630,9 @@
X           GAIM_CALLBACK(process_connection_change));
X     gaim_signal_disconnect(blist_handle, "blist-node-extended-menu",
X           otrg_plugin_handle, GAIM_CALLBACK(supply_extended_menu));
X+#if GAIM_MAJOR_VERSION < 2
X     gaim_prefs_disconnect_callback(button_type_cbid);
X+#endif
X 
X     gaim_conversation_foreach(otrg_dialog_remove_conv);
X 
X@@ -640,10 +671,16 @@
X {
X       GAIM_PLUGIN_MAGIC,
X 
X+#if GAIM_MAJOR_VERSION < 2
X       /* We stick with the functions in the gaim 1.0.x API for
X        * compatibility. */
X-      1,                                                /* major version  */
X+        1,                                                /* major version  */
X       0,                                                /* minor version  */
X+#else
X+        /* Use the 2.0.x API */
X+        2,                                                /* major version  */
X+      0,                                                /* minor version  */
X+#endif
X 
X       GAIM_PLUGIN_STANDARD,                             /* type           */
X       PLUGIN_TYPE,                                      /* ui_requirement */
END-of-/usr/ports/security/pidgin-otr/files/gaim2b2-otr.diff
echo x - /usr/ports/security/pidgin-otr/Makefile
sed 's/^X//' >/usr/ports/security/pidgin-otr/Makefile << 'END-of-/usr/ports/security/pidgin-otr/Makefile'
X# Ports collection Makefile for:       Pidgen-OTR
X# Date created:                                May 13. 2007
X# Whom:                                        Mike Smith <perlfu at gmail.com?
X#
X# $FreeBSD$
X#
X
XPORTNAME=      otr
XPORTVERSION=   3.0.0
XPORTREVISION=  1
XCATEGORIES=    security net
XMASTER_SITES=  http://www.cyberdyne.org/~icebrkr/files/
XPKGNAMEPREFIX= pidgin-
XDISTNAME=      ${PKGNAMEPREFIX}${PORTNAME}-${PORTVERSION}
X
XMAINTAINER=    perlfu at gmail.com
XCOMMENT=       Allows deniable private conversations using Pidgin
X
XRUN_DEPENDS=   pidgin:${PORTSDIR}/net-im/pidgin
XLIB_DEPENDS=   otr:${PORTSDIR}/security/libotr \
X               gcrypt:${PORTSDIR}/security/libgcrypt \
X               purple.0:${PORTSDIR}/net-im/libpurple
X
XUSE_XLIB=      yes
XGNU_CONFIGURE= yes
X
XCONFIGURE_ENV=  CPPFLAGS="${PTHREAD_CFLAGS} -I${LOCALBASE}/include" \
X               LDFLAGS="-L${LOCALBASE}/lib ${PTHREAD_LIBS}"
XCONFIGURE_ARGS= --with-libotr-prefix=${LOCALBASE}/lib \
X               --with-libotr-inc-prefix=${LOCALBASE}/include
X
Xpost-patch:
X       @${REINPLACE_CMD} -e 's|echo aout|echo elf|' ${WRKSRC}/configure
X
X.include <bsd.port.mk>
END-of-/usr/ports/security/pidgin-otr/Makefile
echo x - /usr/ports/security/pidgin-otr/distinfo
sed 's/^X//' >/usr/ports/security/pidgin-otr/distinfo << 'END-of-/usr/ports/security/pidgin-otr/distinfo'
XMD5 (pidgin-otr-3.0.0.tar.gz) = 8e775a4085746347941fcb6e655d90a8
XSHA256 (pidgin-otr-3.0.0.tar.gz) = 4e61eebeb2b8698f501c210bb8e4a4e327c51d6066473778b83a96447176ad8e
XSIZE (pidgin-otr-3.0.0.tar.gz) = 567459
END-of-/usr/ports/security/pidgin-otr/distinfo
echo x - /usr/ports/security/pidgin-otr/pkg-descr
sed 's/^X//' >/usr/ports/security/pidgin-otr/pkg-descr << 'END-of-/usr/ports/security/pidgin-otr/pkg-descr'
XOff-the-Record (OTR) Messaging allows you to have private 
Xconversations over instant messaging by providing:
X
X* Encryption
X       No one else can read your instant messages.
X* Authentication
X       You are assured the correspondent is who you think it is. 
X* Deniability
X       The messages you send do not have digital signatures that
X       are checkable by a third party. Anyone can forge messages
X       after a conversation to make them look like they came from
X       you. However, during a conversation, your correspondent is
X       assured the messages he sees are authentic and unmodified. 
X* Perfect forward secrecy
X       If you lose control of your private keys, no previous 
X       conversation is compromised.
X
XWWW: http://www.cypherpunks.ca/otr/
END-of-/usr/ports/security/pidgin-otr/pkg-descr
echo x - /usr/ports/security/pidgin-otr/pkg-plist
sed 's/^X//' >/usr/ports/security/pidgin-otr/pkg-plist << 'END-of-/usr/ports/security/pidgin-otr/pkg-plist'
Xlib/pidgin/pidgin-otr.la
Xlib/pidgin/pidgin-otr.so
X at dirrm lib/pidgin
END-of-/usr/ports/security/pidgin-otr/pkg-plist
exit

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list