[arch-commits] Commit in pidgin/repos (10 files)
Evangelos Foutras
foutrelis at nymeria.archlinux.org
Fri Jan 31 12:35:17 UTC 2014
Date: Friday, January 31, 2014 @ 13:35:17
Author: foutrelis
Revision: 204922
archrelease: copy trunk to extra-i686, extra-x86_64
Added:
pidgin/repos/extra-i686/PKGBUILD
(from rev 204921, pidgin/trunk/PKGBUILD)
pidgin/repos/extra-i686/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch
(from rev 204921, pidgin/trunk/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch)
pidgin/repos/extra-i686/pidgin.install
(from rev 204921, pidgin/trunk/pidgin.install)
pidgin/repos/extra-x86_64/PKGBUILD
(from rev 204921, pidgin/trunk/PKGBUILD)
pidgin/repos/extra-x86_64/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch
(from rev 204921, pidgin/trunk/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch)
pidgin/repos/extra-x86_64/pidgin.install
(from rev 204921, pidgin/trunk/pidgin.install)
Deleted:
pidgin/repos/extra-i686/PKGBUILD
pidgin/repos/extra-i686/pidgin.install
pidgin/repos/extra-x86_64/PKGBUILD
pidgin/repos/extra-x86_64/pidgin.install
-----------------------------------------------------------------------------+
/PKGBUILD | 212 ++++++++++
/pidgin.install | 22 +
extra-i686/PKGBUILD | 98 ----
extra-i686/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch | 145 ++++++
extra-i686/pidgin.install | 11
extra-x86_64/PKGBUILD | 98 ----
extra-x86_64/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch | 145 ++++++
extra-x86_64/pidgin.install | 11
8 files changed, 524 insertions(+), 218 deletions(-)
Deleted: extra-i686/PKGBUILD
===================================================================
--- extra-i686/PKGBUILD 2014-01-31 12:35:03 UTC (rev 204921)
+++ extra-i686/PKGBUILD 2014-01-31 12:35:17 UTC (rev 204922)
@@ -1,98 +0,0 @@
-# $Id$
-# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
-# Contributor: Ionut Biru <ibiru at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-# Contributor: Alexander Fehr <pizzapunk gmail com>
-# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
-
-pkgname=('pidgin' 'libpurple' 'finch')
-pkgver=2.10.8
-pkgrel=1
-arch=('i686' 'x86_64')
-url="http://pidgin.im/"
-license=('GPL')
-makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
- 'libidn' 'python2' 'hicolor-icon-theme' 'farstream-0.1' 'avahi'
- 'tk' 'ca-certificates' 'intltool' 'networkmanager')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2{,.asc})
-sha256sums=('b633367e3588ff3e615d68e812302dfdbe32e73693cbe42a0d827b7aed7a8227'
- 'SKIP')
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # Use Python 2
- sed -i 's/env python$/&2/' */plugins/*.py \
- libpurple/purple-{remote,notifications-example,url-handler}
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --disable-schemas-install \
- --disable-meanwhile \
- --disable-gnutls \
- --enable-cyrus-sasl \
- --disable-doxygen \
- --enable-nm \
- --with-python=/usr/bin/python2 \
- --with-system-ssl-certs=/etc/ssl/certs
- make
-}
-
-package_pidgin(){
- pkgdesc="Multi-protocol instant messaging client"
- depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
- 'hicolor-icon-theme')
- optdepends=('aspell: for spelling correction')
- install=pidgin.install
-
- cd "$srcdir/pidgin-$pkgver"
-
- # For linking
- make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
-
- make -C pidgin DESTDIR="$pkgdir" install
- make -C doc DESTDIR="$pkgdir" install
-
- # Remove files that are packaged in libpurle
- make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
-
- install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop
-
- rm "$pkgdir/usr/share/man/man1/finch.1"
-}
-
-package_libpurple(){
- pkgdesc="IM library extracted from Pidgin"
- depends=('farstream-0.1' 'libsasl' 'libidn' 'dbus-glib' 'nss')
- optdepends=('avahi: Bonjour protocol support'
- 'ca-certificates: SSL CA certificates'
- 'python2-dbus: for purple-remote and purple-url-handler'
- 'tk: Tcl/Tk scripting support')
-
- cd "$srcdir/pidgin-$pkgver"
-
- for _dir in libpurple share/sounds share/ca-certs m4macros po; do
- make -C "$_dir" DESTDIR="$pkgdir" install
- done
-}
-
-package_finch(){
- pkgdesc="A ncurses-based messaging client"
- depends=("libpurple=$pkgver-$pkgrel" 'libx11' 'python2')
-
- cd "$srcdir/pidgin-$pkgver"
-
- # For linking
- make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
-
- make -C finch DESTDIR="$pkgdir" install
- make -C doc DESTDIR="$pkgdir" install
-
- # Remove files that are packaged in libpurle
- make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
-
- rm "$pkgdir"/usr/share/man/man1/pidgin.1
-}
-
-# vim:set ts=2 sw=2 et:
Copied: pidgin/repos/extra-i686/PKGBUILD (from rev 204921, pidgin/trunk/PKGBUILD)
===================================================================
--- extra-i686/PKGBUILD (rev 0)
+++ extra-i686/PKGBUILD 2014-01-31 12:35:17 UTC (rev 204922)
@@ -0,0 +1,106 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
+
+pkgname=('pidgin' 'libpurple' 'finch')
+pkgver=2.10.8
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://pidgin.im/"
+license=('GPL')
+makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
+ 'libidn' 'python2' 'hicolor-icon-theme' 'farstream-0.1' 'avahi'
+ 'tk' 'ca-certificates' 'intltool' 'networkmanager')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2{,.asc}
+ pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch)
+sha256sums=('b633367e3588ff3e615d68e812302dfdbe32e73693cbe42a0d827b7aed7a8227'
+ 'SKIP'
+ '4b4cc2d0816bbc7de83d34de6880935163007193a36dcc13afc89fc1ffacc5d2')
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # https://developer.pidgin.im/ticket/15879
+ patch -Np1 -i "$srcdir/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch"
+
+ # Use Python 2
+ sed -i 's/env python$/&2/' */plugins/*.py \
+ libpurple/purple-{remote,notifications-example,url-handler}
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-schemas-install \
+ --disable-meanwhile \
+ --disable-gnutls \
+ --enable-cyrus-sasl \
+ --disable-doxygen \
+ --enable-nm \
+ --with-python=/usr/bin/python2 \
+ --with-system-ssl-certs=/etc/ssl/certs
+ make
+}
+
+package_pidgin(){
+ pkgdesc="Multi-protocol instant messaging client"
+ depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
+ 'hicolor-icon-theme')
+ optdepends=('aspell: for spelling correction')
+ install=pidgin.install
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ # For linking
+ make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
+
+ make -C pidgin DESTDIR="$pkgdir" install
+ make -C doc DESTDIR="$pkgdir" install
+
+ # Remove files that are packaged in libpurle
+ make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
+
+ install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop
+
+ rm "$pkgdir/usr/share/man/man1/finch.1"
+}
+
+package_libpurple(){
+ pkgdesc="IM library extracted from Pidgin"
+ depends=('farstream-0.1' 'libsasl' 'libidn' 'dbus-glib' 'nss')
+ optdepends=('avahi: Bonjour protocol support'
+ 'ca-certificates: SSL CA certificates'
+ 'python2-dbus: for purple-remote and purple-url-handler'
+ 'tk: Tcl/Tk scripting support')
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ for _dir in libpurple share/sounds share/ca-certs m4macros po; do
+ make -C "$_dir" DESTDIR="$pkgdir" install
+ done
+}
+
+package_finch(){
+ pkgdesc="A ncurses-based messaging client"
+ depends=("libpurple=$pkgver-$pkgrel" 'libx11' 'python2')
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ # For linking
+ make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
+
+ make -C finch DESTDIR="$pkgdir" install
+ make -C doc DESTDIR="$pkgdir" install
+
+ # Remove files that are packaged in libpurle
+ make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
+
+ rm "$pkgdir"/usr/share/man/man1/pidgin.1
+}
+
+# vim:set ts=2 sw=2 et:
Copied: pidgin/repos/extra-i686/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch (from rev 204921, pidgin/trunk/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch)
===================================================================
--- extra-i686/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch (rev 0)
+++ extra-i686/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch 2014-01-31 12:35:17 UTC (rev 204922)
@@ -0,0 +1,145 @@
+
+# HG changeset patch
+# User Mark Doliner <mark at kingant.net>
+# Date 1391153359 28800
+# Node ID b8e2a5fbffd3052ccba7160b56eac70f8e19c49a
+# Parent e733020a9d3840275ffa931a9aeefe4d8befc08e
+Fix problems logging into some servers including jabber.org and
+chat.facebook.com.
+
+See my length comment in iq.c for details.
+
+diff --git a/libpurple/protocols/jabber/iq.c b/libpurple/protocols/jabber/iq.c
+--- a/libpurple/protocols/jabber/iq.c
++++ b/libpurple/protocols/jabber/iq.c
+@@ -283,6 +283,52 @@
+ g_hash_table_remove(js->iq_callbacks, id);
+ }
+
++/**
++ * Verify that the 'from' attribute of an IQ reply is a valid match for
++ * a given IQ request. The expected behavior is outlined in section
++ * 8.1.2.1 of the XMPP CORE spec (RFC 6120). We consider the reply to
++ * be a valid match if any of the following is true:
++ * - Request 'to' matches reply 'from' (including the case where
++ * neither are set).
++ * - Request 'to' was empty and reply 'from' is server JID.
++ * - Request 'to' was empty and reply 'from' is my JID. The spec says
++ * we should only allow bare JID, but we also allow full JID for
++ * compatibility with some servers.
++ *
++ * These rules should allow valid IQ replies while preventing spoofed
++ * ones.
++ *
++ * For more discussion see the "Spoofing of iq ids and misbehaving
++ * servers" email thread from January 2014 on the jdev and security
++ * mailing lists.
++ *
++ * @return TRUE if this reply is valid for the given request.
++ */
++static gboolean does_reply_from_match_request_to(JabberStream *js, JabberID *to, JabberID *from)
++{
++ if (jabber_id_equal(to, from)) {
++ /* Request 'to' matches reply 'from' */
++ return TRUE;
++ }
++
++ if (!to && purple_strequal(from->domain, js->user->domain)) {
++ /* Request 'to' is empty and reply 'from' domain matches our domain */
++
++ if (!from->node && !from->resource) {
++ /* Reply 'from' is server bare JID */
++ return TRUE;
++ }
++
++ if (purple_strequal(from->node, js->user->node)
++ && (!from->resource || purple_strequal(from->resource, js->user->resource))) {
++ /* Reply 'from' is my full or bare JID */
++ return TRUE;
++ }
++ }
++
++ return FALSE;
++}
++
+ void jabber_iq_parse(JabberStream *js, xmlnode *packet)
+ {
+ JabberIqCallbackData *jcd;
+@@ -377,8 +423,9 @@
+
+ /* First, lets see if a special callback got registered */
+ if(type == JABBER_IQ_RESULT || type == JABBER_IQ_ERROR) {
+- if((jcd = g_hash_table_lookup(js->iq_callbacks, id))) {
+- if(jabber_id_equal(js, jcd->to, from_id)) {
++ jcd = g_hash_table_lookup(js->iq_callbacks, id);
++ if (jcd) {
++ if (does_reply_from_match_request_to(js, jcd->to, from_id)) {
+ jcd->callback(js, from, type, id, packet, jcd->data);
+ jabber_iq_remove_callback_by_id(js, id);
+ jabber_id_free(from_id);
+diff --git a/libpurple/protocols/jabber/jutil.c b/libpurple/protocols/jabber/jutil.c
+--- a/libpurple/protocols/jabber/jutil.c
++++ b/libpurple/protocols/jabber/jutil.c
+@@ -510,30 +510,21 @@
+
+
+ gboolean
+-jabber_id_equal(JabberStream *js, const JabberID *jid1, const JabberID *jid2)
++jabber_id_equal(const JabberID *jid1, const JabberID *jid2)
+ {
+- const JabberID *j1, *j2;
+- JabberID *bare_user_jid;
+- gboolean equal;
++ if (!jid1 && !jid2) {
++ /* Both are null therefore equal */
++ return TRUE;
++ }
+
+- /* If an outgoing stanza has no 'to', or an incoming has no 'from',
+- * then those are "the server acting as my account". This function will
+- * handle that correctly.
+- */
+- if (!jid1 && !jid2)
+- return TRUE;
++ if (!jid1 || !jid2) {
++ /* One is null, other is non-null, therefore not equal */
++ return FALSE;
++ }
+
+- bare_user_jid = jabber_id_to_bare_jid(js->user);
+- j1 = jid1 ? jid1 : bare_user_jid;
+- j2 = jid2 ? jid2 : bare_user_jid;
+-
+- equal = purple_strequal(j1->node, j2->node) &&
+- purple_strequal(j1->domain, j2->domain) &&
+- purple_strequal(j1->resource, j2->resource);
+-
+- jabber_id_free(bare_user_jid);
+-
+- return equal;
++ return purple_strequal(jid1->node, jid2->node) &&
++ purple_strequal(jid1->domain, jid2->domain) &&
++ purple_strequal(jid1->resource, jid2->resource);
+ }
+
+ char *jabber_get_domain(const char *in)
+diff --git a/libpurple/protocols/jabber/jutil.h b/libpurple/protocols/jabber/jutil.h
+--- a/libpurple/protocols/jabber/jutil.h
++++ b/libpurple/protocols/jabber/jutil.h
+@@ -46,12 +46,10 @@
+ JabberID* jabber_id_new(const char *str);
+
+ /**
+- * Compare two JIDs for equality.
+- *
+- * Warning: If either JID is NULL then this function uses the user's
+- * bare JID, instead!
++ * Compare two JIDs for equality. In addition to the node and domain,
++ * the resources of the two JIDs must also be equal (or both absent).
+ */
+-gboolean jabber_id_equal(JabberStream *js, const JabberID *jid1, const JabberID *jid2);
++gboolean jabber_id_equal(const JabberID *jid1, const JabberID *jid2);
+
+ void jabber_id_free(JabberID *jid);
+
+
Deleted: extra-i686/pidgin.install
===================================================================
--- extra-i686/pidgin.install 2014-01-31 12:35:03 UTC (rev 204921)
+++ extra-i686/pidgin.install 2014-01-31 12:35:17 UTC (rev 204922)
@@ -1,11 +0,0 @@
-post_install() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
Copied: pidgin/repos/extra-i686/pidgin.install (from rev 204921, pidgin/trunk/pidgin.install)
===================================================================
--- extra-i686/pidgin.install (rev 0)
+++ extra-i686/pidgin.install 2014-01-31 12:35:17 UTC (rev 204922)
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
Deleted: extra-x86_64/PKGBUILD
===================================================================
--- extra-x86_64/PKGBUILD 2014-01-31 12:35:03 UTC (rev 204921)
+++ extra-x86_64/PKGBUILD 2014-01-31 12:35:17 UTC (rev 204922)
@@ -1,98 +0,0 @@
-# $Id$
-# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
-# Contributor: Ionut Biru <ibiru at archlinux.org>
-# Contributor: Andrea Scarpino <andrea at archlinux.org>
-# Contributor: Alexander Fehr <pizzapunk gmail com>
-# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
-
-pkgname=('pidgin' 'libpurple' 'finch')
-pkgver=2.10.8
-pkgrel=1
-arch=('i686' 'x86_64')
-url="http://pidgin.im/"
-license=('GPL')
-makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
- 'libidn' 'python2' 'hicolor-icon-theme' 'farstream-0.1' 'avahi'
- 'tk' 'ca-certificates' 'intltool' 'networkmanager')
-source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2{,.asc})
-sha256sums=('b633367e3588ff3e615d68e812302dfdbe32e73693cbe42a0d827b7aed7a8227'
- 'SKIP')
-
-build() {
- cd "$srcdir/$pkgname-$pkgver"
-
- # Use Python 2
- sed -i 's/env python$/&2/' */plugins/*.py \
- libpurple/purple-{remote,notifications-example,url-handler}
-
- ./configure \
- --prefix=/usr \
- --sysconfdir=/etc \
- --disable-schemas-install \
- --disable-meanwhile \
- --disable-gnutls \
- --enable-cyrus-sasl \
- --disable-doxygen \
- --enable-nm \
- --with-python=/usr/bin/python2 \
- --with-system-ssl-certs=/etc/ssl/certs
- make
-}
-
-package_pidgin(){
- pkgdesc="Multi-protocol instant messaging client"
- depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
- 'hicolor-icon-theme')
- optdepends=('aspell: for spelling correction')
- install=pidgin.install
-
- cd "$srcdir/pidgin-$pkgver"
-
- # For linking
- make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
-
- make -C pidgin DESTDIR="$pkgdir" install
- make -C doc DESTDIR="$pkgdir" install
-
- # Remove files that are packaged in libpurle
- make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
-
- install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop
-
- rm "$pkgdir/usr/share/man/man1/finch.1"
-}
-
-package_libpurple(){
- pkgdesc="IM library extracted from Pidgin"
- depends=('farstream-0.1' 'libsasl' 'libidn' 'dbus-glib' 'nss')
- optdepends=('avahi: Bonjour protocol support'
- 'ca-certificates: SSL CA certificates'
- 'python2-dbus: for purple-remote and purple-url-handler'
- 'tk: Tcl/Tk scripting support')
-
- cd "$srcdir/pidgin-$pkgver"
-
- for _dir in libpurple share/sounds share/ca-certs m4macros po; do
- make -C "$_dir" DESTDIR="$pkgdir" install
- done
-}
-
-package_finch(){
- pkgdesc="A ncurses-based messaging client"
- depends=("libpurple=$pkgver-$pkgrel" 'libx11' 'python2')
-
- cd "$srcdir/pidgin-$pkgver"
-
- # For linking
- make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
-
- make -C finch DESTDIR="$pkgdir" install
- make -C doc DESTDIR="$pkgdir" install
-
- # Remove files that are packaged in libpurle
- make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
-
- rm "$pkgdir"/usr/share/man/man1/pidgin.1
-}
-
-# vim:set ts=2 sw=2 et:
Copied: pidgin/repos/extra-x86_64/PKGBUILD (from rev 204921, pidgin/trunk/PKGBUILD)
===================================================================
--- extra-x86_64/PKGBUILD (rev 0)
+++ extra-x86_64/PKGBUILD 2014-01-31 12:35:17 UTC (rev 204922)
@@ -0,0 +1,106 @@
+# $Id$
+# Maintainer: Evangelos Foutras <evangelos at foutrelis.com>
+# Contributor: Ionut Biru <ibiru at archlinux.org>
+# Contributor: Andrea Scarpino <andrea at archlinux.org>
+# Contributor: Alexander Fehr <pizzapunk gmail com>
+# Contributor: Lucien Immink <l.immink at student.fnt.hvu.nl>
+
+pkgname=('pidgin' 'libpurple' 'finch')
+pkgver=2.10.8
+pkgrel=2
+arch=('i686' 'x86_64')
+url="http://pidgin.im/"
+license=('GPL')
+makedepends=('startup-notification' 'gtkspell' 'libxss' 'nss' 'libsasl' 'libsm'
+ 'libidn' 'python2' 'hicolor-icon-theme' 'farstream-0.1' 'avahi'
+ 'tk' 'ca-certificates' 'intltool' 'networkmanager')
+source=(http://downloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.bz2{,.asc}
+ pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch)
+sha256sums=('b633367e3588ff3e615d68e812302dfdbe32e73693cbe42a0d827b7aed7a8227'
+ 'SKIP'
+ '4b4cc2d0816bbc7de83d34de6880935163007193a36dcc13afc89fc1ffacc5d2')
+prepare() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ # https://developer.pidgin.im/ticket/15879
+ patch -Np1 -i "$srcdir/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch"
+
+ # Use Python 2
+ sed -i 's/env python$/&2/' */plugins/*.py \
+ libpurple/purple-{remote,notifications-example,url-handler}
+}
+
+build() {
+ cd "$srcdir/$pkgname-$pkgver"
+
+ ./configure \
+ --prefix=/usr \
+ --sysconfdir=/etc \
+ --disable-schemas-install \
+ --disable-meanwhile \
+ --disable-gnutls \
+ --enable-cyrus-sasl \
+ --disable-doxygen \
+ --enable-nm \
+ --with-python=/usr/bin/python2 \
+ --with-system-ssl-certs=/etc/ssl/certs
+ make
+}
+
+package_pidgin(){
+ pkgdesc="Multi-protocol instant messaging client"
+ depends=('libpurple' 'startup-notification' 'gtkspell' 'libxss' 'libsm'
+ 'hicolor-icon-theme')
+ optdepends=('aspell: for spelling correction')
+ install=pidgin.install
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ # For linking
+ make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
+
+ make -C pidgin DESTDIR="$pkgdir" install
+ make -C doc DESTDIR="$pkgdir" install
+
+ # Remove files that are packaged in libpurle
+ make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
+
+ install -Dm644 pidgin.desktop "$pkgdir"/usr/share/applications/pidgin.desktop
+
+ rm "$pkgdir/usr/share/man/man1/finch.1"
+}
+
+package_libpurple(){
+ pkgdesc="IM library extracted from Pidgin"
+ depends=('farstream-0.1' 'libsasl' 'libidn' 'dbus-glib' 'nss')
+ optdepends=('avahi: Bonjour protocol support'
+ 'ca-certificates: SSL CA certificates'
+ 'python2-dbus: for purple-remote and purple-url-handler'
+ 'tk: Tcl/Tk scripting support')
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ for _dir in libpurple share/sounds share/ca-certs m4macros po; do
+ make -C "$_dir" DESTDIR="$pkgdir" install
+ done
+}
+
+package_finch(){
+ pkgdesc="A ncurses-based messaging client"
+ depends=("libpurple=$pkgver-$pkgrel" 'libx11' 'python2')
+
+ cd "$srcdir/pidgin-$pkgver"
+
+ # For linking
+ make -C libpurple DESTDIR="$pkgdir" install-libLTLIBRARIES
+
+ make -C finch DESTDIR="$pkgdir" install
+ make -C doc DESTDIR="$pkgdir" install
+
+ # Remove files that are packaged in libpurle
+ make -C libpurple DESTDIR="$pkgdir" uninstall-libLTLIBRARIES
+
+ rm "$pkgdir"/usr/share/man/man1/pidgin.1
+}
+
+# vim:set ts=2 sw=2 et:
Copied: pidgin/repos/extra-x86_64/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch (from rev 204921, pidgin/trunk/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch)
===================================================================
--- extra-x86_64/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch (rev 0)
+++ extra-x86_64/pidgin-2.10.8-fix-login-issues-with-certain-xmpp-servers.patch 2014-01-31 12:35:17 UTC (rev 204922)
@@ -0,0 +1,145 @@
+
+# HG changeset patch
+# User Mark Doliner <mark at kingant.net>
+# Date 1391153359 28800
+# Node ID b8e2a5fbffd3052ccba7160b56eac70f8e19c49a
+# Parent e733020a9d3840275ffa931a9aeefe4d8befc08e
+Fix problems logging into some servers including jabber.org and
+chat.facebook.com.
+
+See my length comment in iq.c for details.
+
+diff --git a/libpurple/protocols/jabber/iq.c b/libpurple/protocols/jabber/iq.c
+--- a/libpurple/protocols/jabber/iq.c
++++ b/libpurple/protocols/jabber/iq.c
+@@ -283,6 +283,52 @@
+ g_hash_table_remove(js->iq_callbacks, id);
+ }
+
++/**
++ * Verify that the 'from' attribute of an IQ reply is a valid match for
++ * a given IQ request. The expected behavior is outlined in section
++ * 8.1.2.1 of the XMPP CORE spec (RFC 6120). We consider the reply to
++ * be a valid match if any of the following is true:
++ * - Request 'to' matches reply 'from' (including the case where
++ * neither are set).
++ * - Request 'to' was empty and reply 'from' is server JID.
++ * - Request 'to' was empty and reply 'from' is my JID. The spec says
++ * we should only allow bare JID, but we also allow full JID for
++ * compatibility with some servers.
++ *
++ * These rules should allow valid IQ replies while preventing spoofed
++ * ones.
++ *
++ * For more discussion see the "Spoofing of iq ids and misbehaving
++ * servers" email thread from January 2014 on the jdev and security
++ * mailing lists.
++ *
++ * @return TRUE if this reply is valid for the given request.
++ */
++static gboolean does_reply_from_match_request_to(JabberStream *js, JabberID *to, JabberID *from)
++{
++ if (jabber_id_equal(to, from)) {
++ /* Request 'to' matches reply 'from' */
++ return TRUE;
++ }
++
++ if (!to && purple_strequal(from->domain, js->user->domain)) {
++ /* Request 'to' is empty and reply 'from' domain matches our domain */
++
++ if (!from->node && !from->resource) {
++ /* Reply 'from' is server bare JID */
++ return TRUE;
++ }
++
++ if (purple_strequal(from->node, js->user->node)
++ && (!from->resource || purple_strequal(from->resource, js->user->resource))) {
++ /* Reply 'from' is my full or bare JID */
++ return TRUE;
++ }
++ }
++
++ return FALSE;
++}
++
+ void jabber_iq_parse(JabberStream *js, xmlnode *packet)
+ {
+ JabberIqCallbackData *jcd;
+@@ -377,8 +423,9 @@
+
+ /* First, lets see if a special callback got registered */
+ if(type == JABBER_IQ_RESULT || type == JABBER_IQ_ERROR) {
+- if((jcd = g_hash_table_lookup(js->iq_callbacks, id))) {
+- if(jabber_id_equal(js, jcd->to, from_id)) {
++ jcd = g_hash_table_lookup(js->iq_callbacks, id);
++ if (jcd) {
++ if (does_reply_from_match_request_to(js, jcd->to, from_id)) {
+ jcd->callback(js, from, type, id, packet, jcd->data);
+ jabber_iq_remove_callback_by_id(js, id);
+ jabber_id_free(from_id);
+diff --git a/libpurple/protocols/jabber/jutil.c b/libpurple/protocols/jabber/jutil.c
+--- a/libpurple/protocols/jabber/jutil.c
++++ b/libpurple/protocols/jabber/jutil.c
+@@ -510,30 +510,21 @@
+
+
+ gboolean
+-jabber_id_equal(JabberStream *js, const JabberID *jid1, const JabberID *jid2)
++jabber_id_equal(const JabberID *jid1, const JabberID *jid2)
+ {
+- const JabberID *j1, *j2;
+- JabberID *bare_user_jid;
+- gboolean equal;
++ if (!jid1 && !jid2) {
++ /* Both are null therefore equal */
++ return TRUE;
++ }
+
+- /* If an outgoing stanza has no 'to', or an incoming has no 'from',
+- * then those are "the server acting as my account". This function will
+- * handle that correctly.
+- */
+- if (!jid1 && !jid2)
+- return TRUE;
++ if (!jid1 || !jid2) {
++ /* One is null, other is non-null, therefore not equal */
++ return FALSE;
++ }
+
+- bare_user_jid = jabber_id_to_bare_jid(js->user);
+- j1 = jid1 ? jid1 : bare_user_jid;
+- j2 = jid2 ? jid2 : bare_user_jid;
+-
+- equal = purple_strequal(j1->node, j2->node) &&
+- purple_strequal(j1->domain, j2->domain) &&
+- purple_strequal(j1->resource, j2->resource);
+-
+- jabber_id_free(bare_user_jid);
+-
+- return equal;
++ return purple_strequal(jid1->node, jid2->node) &&
++ purple_strequal(jid1->domain, jid2->domain) &&
++ purple_strequal(jid1->resource, jid2->resource);
+ }
+
+ char *jabber_get_domain(const char *in)
+diff --git a/libpurple/protocols/jabber/jutil.h b/libpurple/protocols/jabber/jutil.h
+--- a/libpurple/protocols/jabber/jutil.h
++++ b/libpurple/protocols/jabber/jutil.h
+@@ -46,12 +46,10 @@
+ JabberID* jabber_id_new(const char *str);
+
+ /**
+- * Compare two JIDs for equality.
+- *
+- * Warning: If either JID is NULL then this function uses the user's
+- * bare JID, instead!
++ * Compare two JIDs for equality. In addition to the node and domain,
++ * the resources of the two JIDs must also be equal (or both absent).
+ */
+-gboolean jabber_id_equal(JabberStream *js, const JabberID *jid1, const JabberID *jid2);
++gboolean jabber_id_equal(const JabberID *jid1, const JabberID *jid2);
+
+ void jabber_id_free(JabberID *jid);
+
+
Deleted: extra-x86_64/pidgin.install
===================================================================
--- extra-x86_64/pidgin.install 2014-01-31 12:35:03 UTC (rev 204921)
+++ extra-x86_64/pidgin.install 2014-01-31 12:35:17 UTC (rev 204922)
@@ -1,11 +0,0 @@
-post_install() {
- gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
-}
-
-post_upgrade() {
- post_install
-}
-
-post_remove() {
- post_install
-}
Copied: pidgin/repos/extra-x86_64/pidgin.install (from rev 204921, pidgin/trunk/pidgin.install)
===================================================================
--- extra-x86_64/pidgin.install (rev 0)
+++ extra-x86_64/pidgin.install 2014-01-31 12:35:17 UTC (rev 204922)
@@ -0,0 +1,11 @@
+post_install() {
+ gtk-update-icon-cache -q -t -f usr/share/icons/hicolor
+}
+
+post_upgrade() {
+ post_install
+}
+
+post_remove() {
+ post_install
+}
More information about the arch-commits
mailing list