libpurple 32409:d099a04c0207: ChangeLog Thijs's SASL fix.

commits at adium.im commits at adium.im
Sat Sep 29 13:52:19 UTC 2012


details:	http://hg.adium.im/libpurple/rev/d099a04c0207
revision:	32409:d099a04c0207
branch:		release-2.x.y
author:		Ethan Blanton <elb at pidgin.im>
date:		Tue Sep 25 20:45:03 2012 -0400

ChangeLog Thijs's SASL fix.
Subject: libpurple 32410:be46dd6ba024: Fix win32 build for IRC SASL.

details:	http://hg.adium.im/libpurple/rev/be46dd6ba024
revision:	32410:be46dd6ba024
branch:		release-2.x.y
author:		Daniel Atallah <datallah at pidgin.im>
date:		Wed Sep 19 22:57:46 2012 -0400

Fix win32 build for IRC SASL.
Subject: libpurple 32411:8003b9b9e602: Fix a few warnings in the IRC SASL code

details:	http://hg.adium.im/libpurple/rev/8003b9b9e602
revision:	32411:8003b9b9e602
branch:		release-2.x.y
author:		Daniel Atallah <datallah at pidgin.im>
date:		Wed Sep 19 22:57:46 2012 -0400

Fix a few warnings in the IRC SASL code
Subject: libpurple 32412:8e037a7b4ccd: Update various win32 dependencies - the new GTK+ bundle will be called 2.16.6.1

details:	http://hg.adium.im/libpurple/rev/8e037a7b4ccd
revision:	32412:8e037a7b4ccd
branch:		release-2.x.y
author:		Daniel Atallah <datallah at pidgin.im>
date:		Wed Sep 26 18:35:46 2012 -0400

Update various win32 dependencies - the new GTK+ bundle will be called 2.16.6.1
Thanks goes to Dieter Verfaillie for helping get the GTK+ dependencies updated.
Fixes #14571, #15285, #15286

 * ATK 1.32.0-2
 * expat 2.1.0-1
 * freetype 2.4.10-1
 * gettext 0.18.1.1-2
 * Glib 2.28.8-1
 * libpng 1.4.12-1
 * Pango 1.29.4-1
 * libxml2 2.9.0-1
 * zlib 1.2.5-2
Subject: libpurple 32413:fb9fe934688e: Use the gpg signature, if available to validate downloaded GTK+ components

details:	http://hg.adium.im/libpurple/rev/fb9fe934688e
revision:	32413:fb9fe934688e
branch:		release-2.x.y
author:		Daniel Atallah <datallah at pidgin.im>
date:		Thu Sep 27 00:23:57 2012 -0400

Use the gpg signature, if available to validate downloaded GTK+ components

diffs (264 lines):

diff -r bbd52f93184e -r fb9fe934688e ChangeLog
--- a/ChangeLog	Tue Sep 25 22:58:51 2012 +0200
+++ b/ChangeLog	Thu Sep 27 00:23:57 2012 -0400
@@ -8,6 +8,9 @@
 	* Fix a crash at startup with large contact list. Avatar support for
 	  buddies will be disabled till 3.0.0. (#15226, #14305)
 
+	IRC:
+	* Support for SASL authentication.  (Thijs Alkemade) (#13270)
+
 	MSN:
 	* Fix a crash when removing a user before its icon is loaded. (Mark
 	  Barfield) (#15217)
diff -r bbd52f93184e -r fb9fe934688e Makefile.mingw
--- a/Makefile.mingw	Tue Sep 25 22:58:51 2012 +0200
+++ b/Makefile.mingw	Thu Sep 27 00:23:57 2012 -0400
@@ -31,7 +31,7 @@
     exit; \
 }' VERSION)
 
-GTK_INSTALL_VERSION = 2.16.6.0
+GTK_INSTALL_VERSION = 2.16.6.1
 
 STRIPPED_RELEASE_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-win32bin
 DEBUG_SYMBOLS_DIR = $(PIDGIN_TREE_TOP)/pidgin-$(PIDGIN_VERSION)-dbgsym
diff -r bbd52f93184e -r fb9fe934688e libpurple/Makefile.mingw
--- a/libpurple/Makefile.mingw	Tue Sep 25 22:58:51 2012 +0200
+++ b/libpurple/Makefile.mingw	Thu Sep 27 00:23:57 2012 -0400
@@ -10,6 +10,19 @@
 TARGET = libpurple
 NEEDED_DLLS = $(LIBXML2_TOP)/bin/libxml2-2.dll
 
+ifeq ($(CYRUS_SASL), 1)
+NEEDED_DLLS += $(CYRUS_SASL_TOP)/bin/libsasl.dll
+
+CYRUS_SASL_PLUGINS = \
+                        $(CYRUS_SASL_TOP)/bin/sasl2/saslANONYMOUS.dll \
+                        $(CYRUS_SASL_TOP)/bin/sasl2/saslCRAMMD5.dll \
+                        $(CYRUS_SASL_TOP)/bin/sasl2/saslDIGESTMD5.dll \
+                        $(CYRUS_SASL_TOP)/bin/sasl2/saslGSSAPI.dll \
+                        $(CYRUS_SASL_TOP)/bin/sasl2/saslLOGIN.dll \
+                        $(CYRUS_SASL_TOP)/bin/sasl2/saslPLAIN.dll
+
+endif
+
 ##
 ## INCLUDE PATHS
 ##
@@ -126,6 +139,10 @@
 install_shallow: $(PURPLE_INSTALL_DIR) $(TARGET).dll
 	cp $(TARGET).dll $(PURPLE_INSTALL_DIR)
 	cp $(NEEDED_DLLS) $(PURPLE_INSTALL_DIR)
+ifeq ($(CYRUS_SASL), 1)
+	mkdir -p $(PURPLE_INSTALL_DIR)/sasl2
+	cp $(CYRUS_SASL_PLUGINS) $(PURPLE_INSTALL_DIR)/sasl2
+endif
 
 install: install_shallow all
 	$(MAKE) -C $(PURPLE_PROTOS_TOP) -f $(MINGW_MAKEFILE) install
diff -r bbd52f93184e -r fb9fe934688e libpurple/protocols/irc/Makefile.mingw
--- a/libpurple/protocols/irc/Makefile.mingw	Tue Sep 25 22:58:51 2012 +0200
+++ b/libpurple/protocols/irc/Makefile.mingw	Thu Sep 27 00:23:57 2012 -0400
@@ -54,6 +54,13 @@
 			-lintl \
 			-lpurple
 
+
+ifeq ($(CYRUS_SASL), 1)
+INCLUDE_PATHS += -I$(CYRUS_SASL_TOP)/include
+LIB_PATHS += -L$(CYRUS_SASL_TOP)/bin
+LIBS += -llibsasl
+endif
+
 include $(PIDGIN_COMMON_RULES)
 
 ##
diff -r bbd52f93184e -r fb9fe934688e libpurple/protocols/irc/msgs.c
--- a/libpurple/protocols/irc/msgs.c	Tue Sep 25 22:58:51 2012 +0200
+++ b/libpurple/protocols/irc/msgs.c	Thu Sep 27 00:23:57 2012 -0400
@@ -1439,6 +1439,7 @@
 irc_sasl_cb_secret(sasl_conn_t *conn, void *ctx, int id, sasl_secret_t **secret)
 {
 	struct irc_conn *irc = ctx;
+	sasl_secret_t *sasl_secret;
 	const char *pw;
 	size_t len;
 
@@ -1450,7 +1451,7 @@
 	len = strlen(pw);
 	/* Not an off-by-one because sasl_secret_t defines char data[1] */
 	/* TODO: This can probably be moved to glib's allocator */
-	sasl_secret_t *sasl_secret = malloc(sizeof(sasl_secret_t) + len);
+	sasl_secret = malloc(sizeof(sasl_secret_t) + len);
 	if (!sasl_secret)
 		return SASL_NOMEM;
 
@@ -1603,21 +1604,18 @@
 	if (!args[1] || !args[2] || strncmp(args[2], "sasl ", 6))
 		return;
 	if (strncmp(args[1], "ACK", 4)) {
-
-		gchar *tmp = g_strdup_printf(_("SASL authentication failed: Server does not support SASL authentication."));
+		const char *tmp = _("SASL authentication failed: Server does not support SASL authentication.");
 		purple_connection_error_reason (gc,
 			PURPLE_CONNECTION_ERROR_AUTHENTICATION_IMPOSSIBLE, tmp);
-		g_free(tmp);
 
 		irc_sasl_finish(irc);
 		return;
 	}
 
 	if ((ret = sasl_client_init(NULL)) != SASL_OK) {
-		gchar *tmp = g_strdup_printf(_("SASL authentication failed: Initializing SASL failed."));
+		const char *tmp = _("SASL authentication failed: Initializing SASL failed.");
 		purple_connection_error_reason (gc,
 			PURPLE_CONNECTION_ERROR_OTHER_ERROR, tmp);
-		g_free(tmp);
 		return;
 	}
 
diff -r bbd52f93184e -r fb9fe934688e libpurple/protocols/jabber/Makefile.mingw
--- a/libpurple/protocols/jabber/Makefile.mingw	Tue Sep 25 22:58:51 2012 +0200
+++ b/libpurple/protocols/jabber/Makefile.mingw	Thu Sep 27 00:23:57 2012 -0400
@@ -105,21 +105,9 @@
 			-lpurple
 
 ifeq ($(CYRUS_SASL), 1)
-CYRUS_SASL_TOP := $(WIN32_DEV_TOP)/cyrus-sasl-2.1.25
 INCLUDE_PATHS += -I$(CYRUS_SASL_TOP)/include
 LIB_PATHS += -L$(CYRUS_SASL_TOP)/bin
 LIBS += -llibsasl
-CYRUS_SASL_DLLS = \
-			$(CYRUS_SASL_TOP)/bin/libsasl.dll
-
-CYRUS_SASL_PLUGINS = \
-			$(CYRUS_SASL_TOP)/bin/sasl2/saslANONYMOUS.dll \
-			$(CYRUS_SASL_TOP)/bin/sasl2/saslCRAMMD5.dll \
-			$(CYRUS_SASL_TOP)/bin/sasl2/saslDIGESTMD5.dll \
-			$(CYRUS_SASL_TOP)/bin/sasl2/saslGSSAPI.dll \
-			$(CYRUS_SASL_TOP)/bin/sasl2/saslLOGIN.dll \
-			$(CYRUS_SASL_TOP)/bin/sasl2/saslPLAIN.dll
-
 endif
 
 include $(PIDGIN_COMMON_RULES)
@@ -134,11 +122,6 @@
 install: all $(DLL_INSTALL_DIR)
 	cp $(XMPP_TARGET).dll $(DLL_INSTALL_DIR)
 	cp $(TARGET).dll $(PURPLE_INSTALL_DIR)
-ifeq ($(CYRUS_SASL), 1)
-	mkdir -p $(PURPLE_INSTALL_DIR)/sasl2
-	cp $(CYRUS_SASL_DLLS) $(PURPLE_INSTALL_DIR)
-	cp $(CYRUS_SASL_PLUGINS) $(PURPLE_INSTALL_DIR)/sasl2
-endif
 
 $(OBJECTS): $(PURPLE_CONFIG_H)
 
diff -r bbd52f93184e -r fb9fe934688e libpurple/win32/global.mak
--- a/libpurple/win32/global.mak	Tue Sep 25 22:58:51 2012 +0200
+++ b/libpurple/win32/global.mak	Thu Sep 27 00:23:57 2012 -0400
@@ -15,7 +15,7 @@
 GTK_TOP ?= $(WIN32_DEV_TOP)/gtk_2_0-2.14
 GTK_BIN ?= $(GTK_TOP)/bin
 BONJOUR_TOP ?= $(WIN32_DEV_TOP)/Bonjour_SDK
-LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.7.4
+LIBXML2_TOP ?= $(WIN32_DEV_TOP)/libxml2-2.9.0
 MEANWHILE_TOP ?= $(WIN32_DEV_TOP)/meanwhile-1.0.2_daa2
 NSS_TOP ?= $(WIN32_DEV_TOP)/nss-3.13.6-nspr-4.9.2
 PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.10.0
@@ -23,6 +23,7 @@
 TCL_LIB_TOP ?= $(WIN32_DEV_TOP)/tcl-8.4.5
 GSTREAMER_TOP ?= $(WIN32_DEV_TOP)/gstreamer-0.10.13
 GCC_SSP_TOP ?= $(WIN32_DEV_TOP)/gcc-core-4.4.0-mingw32-dll
+CYRUS_SASL_TOP ?= $(WIN32_DEV_TOP)/cyrus-sasl-2.1.25
 
 # Where we installing this stuff to?
 PIDGIN_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
diff -r bbd52f93184e -r fb9fe934688e pidgin/win32/nsis/generate_gtk_zip.sh
--- a/pidgin/win32/nsis/generate_gtk_zip.sh	Tue Sep 25 22:58:51 2012 +0200
+++ b/pidgin/win32/nsis/generate_gtk_zip.sh	Thu Sep 27 00:23:57 2012 -0400
@@ -8,25 +8,27 @@
 	exit 1
 fi
 
-STAGE_DIR=$PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage
+STAGE_DIR=`readlink -f $PIDGIN_BASE/pidgin/win32/nsis/gtk_runtime_stage`
 #Subdirectory of $STAGE_DIR
 INSTALL_DIR=Gtk
 CONTENTS_FILE=$INSTALL_DIR/CONTENTS
 
 #This needs to be changed every time there is any sort of change.
-BUNDLE_VERSION=2.16.6.0
+BUNDLE_VERSION=2.16.6.1
 
-ATK="http://ftp.acc.umu.se/pub/gnome/binaries/win32/atk/1.26/atk_1.26.0-1_win32.zip ATK 1.26.0-1 97efc4c2640e7bae38f672c5e1ff66542a202756"
-CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1 a08476cccd807943958610977a138c4d6097c7b8"
-EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip Expat 2.0.1-1 f47790b9e324cd8613acc9a17fd56bf2c14745fc"
-FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2 37a3117ea6cc50c8a88fba9b6018f35a04fa71ce"
-FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.11-2_win32.zip Freetype 2.3.11-2 4d40ac1a44d818ac6720c2e93503346b91e99561"
-GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip Gettext 0.17-1 ad486eed8a531fba1d3cc7ad2f04e8e03367a962"
-GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip Glib 2.20.5-1 b670b37559ef4d088153f77960c6e24a2747efe7"
-GTK="http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.6-2_win32.zip GTK+ 2.16.6-2 012853e6de814ebda0cc4459f9eed8ae680e6d17"
-LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip libpng 1.4.0-1 9f08167d43a19e4e2efac458f776f64d61544cb5"
-PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.26/pango_1.26.2-1_win32.zip Pango 1.26.2-1 f0e70127f7bb7a784a66d406cabf244da8316d31"
-ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib 1.2.3 0ee1e581e99fb761a5b2d46c534c861ca0f58175"
+ATK="http://ftp.gnome.org/pub/gnome/binaries/win32/atk/1.32/atk_1.32.0-2_win32.zip ATK 1.32.0-2 sha1sum:3c31c9d6b19af840e2bd8ccbfef4072a6548dc4e"
+#Cairo 1.10.2 has a bug that can be seen when selecting text
+#CAIRO="http://ftp.gnome.org/pub/GNOME/binaries/win32/dependencies/cairo_1.10.2-2_win32.zip Cairo 1.10.2-2 sha1sum:d44cd66a9f4d7d29a8f2c28d1c1c5f9b0525ba44"
+CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1 sha1sum:a08476cccd807943958610977a138c4d6097c7b8"
+EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.1.0-1_win32.zip Expat 2.1.0-1 gpg:0x71D4DDE53F188CBE"
+FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2 sha1sum:37a3117ea6cc50c8a88fba9b6018f35a04fa71ce"
+FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.4.10-1_win32.zip Freetype 2.4.10-1 gpg:0x71D4DDE53F188CBE"
+GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime_0.18.1.1-2_win32.zip Gettext 0.18.1.1-2 sha1sum:a7cc1ce2b99b408d1bbea9a3b4520fcaf26783b3"
+GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.28/glib_2.28.8-1_win32.zip Glib 2.28.8-1 sha1sum:5d158f4c77ca0b5508e1042955be573dd940b574"
+GTK="http://ftp.acc.umu.se/pub/gnome/binaries/win32/gtk+/2.16/gtk+_2.16.6-2_win32.zip GTK+ 2.16.6-2 sha1sum:012853e6de814ebda0cc4459f9eed8ae680e6d17"
+LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.12-1_win32.zip libpng 1.4.12-1 gpg:0x71D4DDE53F188CBE"
+PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.29/pango_1.29.4-1_win32.zip Pango 1.29.4-1 sha1sum:3959319bd04fbce513458857f334ada279b8cdd4"
+ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib_1.2.5-2_win32.zip zlib 1.2.5-2 sha1sum:568907188761df2d9309196e447d91bbc5555d2b"
 
 ALL="ATK CAIRO EXPAT FONTCONFIG FREETYPE GETTEXT GLIB GTK LIBPNG PANGO ZLIB"
 
@@ -41,7 +43,7 @@
 
 function download_and_extract {
 	URL=${1%%\ *}
-	SHA1SUM=${1##*\ }
+	VALIDATION=${1##*\ }
 	NAME=${1%\ *}
 	NAME=${NAME#*\ }
 	FILE=$(basename $URL)
@@ -49,10 +51,29 @@
 		echo Downloading $NAME
 		wget $URL || exit 1
 	fi
-	CHECK_SHA1SUM=`sha1sum $FILE`
-	CHECK_SHA1SUM=${CHECK_SHA1SUM%%\ *}
-	if [ "$CHECK_SHA1SUM" != "$SHA1SUM" ]; then
-		echo "sha1sum ($CHECK_SHA1SUM) for $FILE doesn't match expected value of $SHA1SUM"
+	VALIDATION_TYPE=${VALIDATION%%:*}
+	VALIDATION_VALUE=${VALIDATION##*:}
+	if [ $VALIDATION_TYPE == 'sha1sum' ]; then
+		CHECK_SHA1SUM=`sha1sum $FILE`
+		CHECK_SHA1SUM=${CHECK_SHA1SUM%%\ *}
+		if [ "$CHECK_SHA1SUM" != "$VALIDATION_VALUE" ]; then
+			echo "sha1sum ($CHECK_SHA1SUM) for $FILE doesn't match expected value of $VALIDATION_VALUE"
+			exit 1
+		fi
+	elif [ $VALIDATION_TYPE == 'gpg' ]; then
+		if [ ! -e "$FILE.asc" ]; then
+			echo Downloading GPG key for $NAME
+			wget "$URL.asc" || exit 1
+		fi
+		#Use our own keyring to avoid adding stuff to the main keyring
+		GPG="gpg -q --keyring $VALIDATION_VALUE-keyring.gpg"
+		$GPG --list-keys "$VALIDATION_VALUE" > /dev/null
+		if [ $? -ne 0 ]; then
+		       	$GPG --keyserver pgp.mit.edu --recv-key "$VALIDATION_VALUE" || exit 1
+		fi
+		$GPG --verify "$FILE.asc" || (echo "$FILE failed signature verification"; exit 1) || exit 1
+	else
+		echo "Unrecognized validation type of $VALIDATION_TYPE"
 		exit 1
 	fi
 	EXTENSION=${FILE##*.}




More information about the commits mailing list