/pidgin/main: b907c906b8d9: Merge revision 33399 from release-2.x.y
Richard Laager
rlaager at pidgin.im
Sun Jan 13 17:02:39 EST 2013
Changeset: b907c906b8d9affd64d26d7cde013a1209544a8d
Author: Richard Laager <rlaager at pidgin.im>
Date: 2013-01-13 14:36 -0600
Branch: default
URL: http://hg.pidgin.im/pidgin/main/rev/b907c906b8d9
Description:
Merge revision 33399 from release-2.x.y
diffstat:
Makefile.mingw | 2 +
libpurple/plugins/perl/common/Makefile.mingw | 2 +-
libpurple/win32/global.mak | 12 +-
pidgin/Makefile.mingw | 4 +-
pidgin/gtkmain.c | 4 +-
pidgin/plugins/perl/common/Makefile.mingw | 2 +-
pidgin/plugins/relnot.c | 2 +-
pidgin/win32/gtkwin32dep.c | 9 +-
pidgin/win32/nsis/generate_gtk_zip.sh | 38 +++++---
pidgin/win32/nsis/pidgin-installer.nsi | 117 +++++++++++++++++++-------
pidgin/win32/winpidgin.c | 48 ++++++----
11 files changed, 161 insertions(+), 79 deletions(-)
diffs (truncated from 562 to 300 lines):
diff --git a/Makefile.mingw b/Makefile.mingw
--- a/Makefile.mingw
+++ b/Makefile.mingw
@@ -55,6 +55,7 @@ EXTERNAL_DLLS = \
libplc4.dll \
libplds4.dll \
libsasl.dll \
+ libssp-0.dll \
libxml2-2.dll \
nss3.dll \
nssckbi.dll \
@@ -99,6 +100,7 @@ endif
cp $(ENCHANT_TOP)/bin/libenchant.dll $(PIDGIN_INSTALL_DIR)/spellcheck
cp -R $(ENCHANT_TOP)/lib/enchant/*.dll $(PIDGIN_INSTALL_DIR)/spellcheck/lib/enchant
cp $(WIN32_DEV_TOP)/pidgin-inst-deps-20100315/exchndl.dll $(PIDGIN_INSTALL_DIR)
+ cp $(GCC_SSP_TOP)/bin/libssp-0.dll $(PIDGIN_INSTALL_DIR)
pidgin/win32/nsis/gtk-runtime-$(GTK_BUNDLE_VERSION).zip:
pidgin/win32/nsis/generate_gtk_zip.sh `pwd`
diff --git a/libpurple/plugins/perl/common/Makefile.mingw b/libpurple/plugins/perl/common/Makefile.mingw
--- a/libpurple/plugins/perl/common/Makefile.mingw
+++ b/libpurple/plugins/perl/common/Makefile.mingw
@@ -112,7 +112,7 @@ install: all
$(PERL) -MAutoSplit -e 'autosplit("lib/Purple.pm")'
$(TARGET).dll: $(PURPLE_DLL).a $(PURPLE_PERL_DLL).a $(FALLBACKS) $(OBJECTS)
- $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) -o $(TARGET).dll
+ $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) $(DLL_LD_FLAGS) -o $(TARGET).dll
##
## CLEAN
diff --git a/libpurple/win32/global.mak b/libpurple/win32/global.mak
--- a/libpurple/win32/global.mak
+++ b/libpurple/win32/global.mak
@@ -22,6 +22,7 @@ PERL_LIB_TOP ?= $(WIN32_DEV_TOP)/perl-5.
SILC_TOOLKIT ?= $(WIN32_DEV_TOP)/silc-toolkit-1.1.10
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
# Where we installing this stuff to?
PIDGIN_INSTALL_DIR := $(PIDGIN_TREE_TOP)/win32-install-dir
@@ -57,6 +58,10 @@ PIDGIN_PORTABLE_EXE := $(PIDGIN_TOP)/pid
GCCWARNINGS ?= -Waggregate-return -Wcast-align -Wdeclaration-after-statement -Werror-implicit-function-declaration -Wextra -Wno-sign-compare -Wno-unused-parameter -Winit-self -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wundef
+CC_HARDENING_OPTIONS ?= -Wstack-protector -fwrapv -fno-strict-overflow -Wno-missing-field-initializers -Wformat-security -fstack-protector-all --param ssp-buffer-size=1
+LD_HARDENING_OPTIONS ?= -Wl,--dynamicbase -Wl,--nxcompat
+
+
# parse the version number from the configure.ac file if it is newer
#m4_define([purple_major_version], [2])
#m4_define([purple_minor_version], [0])
@@ -84,17 +89,14 @@ endif
DEFINES += -DHAVE_CONFIG_H -DWIN32_LEAN_AND_MEAN
-# Use -g flag when building debug version of Pidgin (including plugins).
-# Use -fnative-struct instead of -mms-bitfields when using mingw 1.1
-# (gcc 2.95)
-CFLAGS += -O2 -Wall $(GCCWARNINGS) -pipe -mno-cygwin -mms-bitfields -g
+CFLAGS += -O2 -Wall $(GCCWARNINGS) $(CC_HARDENING_OPTIONS) -pipe -mno-cygwin -mms-bitfields -g
# If not specified, dlls are built with the default base address of 0x10000000.
# When loaded into a process address space a dll will be rebased if its base
# address colides with the base address of an existing dll. To avoid rebasing
# we do the following. Rebasing can slow down the load time of dlls and it
# also renders debug info useless.
-DLL_LD_FLAGS += -Wl,--enable-auto-image-base
+DLL_LD_FLAGS += -Wl,--enable-auto-image-base -Wl,--enable-auto-import $(LD_HARDENING_OPTIONS) -lssp
# Build programs
ifeq "$(origin CC)" "default"
diff --git a/pidgin/Makefile.mingw b/pidgin/Makefile.mingw
--- a/pidgin/Makefile.mingw
+++ b/pidgin/Makefile.mingw
@@ -18,7 +18,7 @@ EXE_NAME := $(EXE_TARGET).exe
WINAPP := -mwindows
-LDFLAGS := $(WINAPP)
+LDFLAGS := $(WINAPP) $(LD_HARDENING_OPTIONS) -Wl,--enable-auto-import -lssp
##
## INCLUDE PATHS
@@ -163,7 +163,7 @@ win32/pidgin_dll_rc.rc: win32/pidgin_dll
$(CC) -shared $(PIDGIN_OBJECTS) $(LIB_PATHS) $(PIDGIN_LIBS) $(DLL_LD_FLAGS) -Wl,--output-def,$(PIDGIN_TARGET).def,--out-implib,$(PIDGIN_TARGET).dll.a -o $(PIDGIN_TARGET).dll
$(EXE_TARGET).exe: $(PIDGIN_CONFIG_H) $(PIDGIN_DLL).a $(EXE_OBJECTS) $(PIDGIN_TARGET).dll
- $(CC) $(LDFLAGS) $(EXE_OBJECTS) -o $(EXE_TARGET).exe
+ $(CC) $(EXE_OBJECTS) $(LDFLAGS) -o $(EXE_TARGET).exe
##
## CLEAN RULES
diff --git a/pidgin/gtkmain.c b/pidgin/gtkmain.c
--- a/pidgin/gtkmain.c
+++ b/pidgin/gtkmain.c
@@ -413,8 +413,8 @@ show_usage(const char *name, gboolean te
/* FUCKING GET ME A TOWEL! */
#ifdef _WIN32
/* suppress gcc "no previous prototype" warning */
-int pidgin_main(HINSTANCE hint, int argc, char *argv[]);
-int pidgin_main(HINSTANCE hint, int argc, char *argv[])
+int __cdecl pidgin_main(HINSTANCE hint, int argc, char *argv[]);
+int __cdecl pidgin_main(HINSTANCE hint, int argc, char *argv[])
#else
int main(int argc, char *argv[])
#endif
diff --git a/pidgin/plugins/perl/common/Makefile.mingw b/pidgin/plugins/perl/common/Makefile.mingw
--- a/pidgin/plugins/perl/common/Makefile.mingw
+++ b/pidgin/plugins/perl/common/Makefile.mingw
@@ -102,7 +102,7 @@ install: all $(PURPLE_INSTALL_PERL_DIR)/
$(C_FILES): $(PIDGIN_CONFIG_H)
$(TARGET).dll: $(PIDGIN_DLL).a $(PURPLE_PERL_DLL).a $(OBJECTS)
- $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(LIBS) -o $(TARGET).dll
+ $(CC) -shared $(OBJECTS) $(LIB_PATHS) $(DLL_LD_FLAGS) $(LIBS) -o $(TARGET).dll
##
## CLEAN
diff --git a/pidgin/plugins/relnot.c b/pidgin/plugins/relnot.c
--- a/pidgin/plugins/relnot.c
+++ b/pidgin/plugins/relnot.c
@@ -113,7 +113,7 @@ do_check(void)
gchar *url;
const char *host = "pidgin.im";
- url = g_strdup_printf("http://%s/version.php?version=%s&build=%s",
+ url = g_strdup_printf("https://%s/version.php?version=%s&build=%s",
host,
purple_core_get_version(),
#ifdef _WIN32
diff --git a/pidgin/win32/gtkwin32dep.c b/pidgin/win32/gtkwin32dep.c
--- a/pidgin/win32/gtkwin32dep.c
+++ b/pidgin/win32/gtkwin32dep.c
@@ -377,7 +377,8 @@ winpidgin_conv_im_blink(PurpleAccount *a
}
void winpidgin_init(HINSTANCE hint) {
- FARPROC proc;
+ typedef void (__cdecl* LPFNSETLOGFILE)(const LPCSTR);
+ LPFNSETLOGFILE MySetLogFile;
gchar *exchndl_dll_path;
purple_debug_info("winpidgin", "winpidgin_init start\n");
@@ -385,10 +386,10 @@ void winpidgin_init(HINSTANCE hint) {
exe_hInstance = hint;
exchndl_dll_path = g_build_filename(wpurple_install_dir(), "exchndl.dll", NULL);
- proc = wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile");
+ MySetLogFile = (LPFNSETLOGFILE) wpurple_find_and_loadproc(exchndl_dll_path, "SetLogFile");
g_free(exchndl_dll_path);
exchndl_dll_path = NULL;
- if (proc) {
+ if (MySetLogFile) {
gchar *debug_dir, *locale_debug_dir;
debug_dir = g_build_filename(purple_user_dir(), "pidgin.RPT", NULL);
@@ -396,7 +397,7 @@ void winpidgin_init(HINSTANCE hint) {
purple_debug_info("winpidgin", "Setting exchndl.dll LogFile to %s\n", debug_dir);
- (proc)(locale_debug_dir);
+ MySetLogFile(locale_debug_dir);
g_free(debug_dir);
g_free(locale_debug_dir);
diff --git a/pidgin/win32/nsis/generate_gtk_zip.sh b/pidgin/win32/nsis/generate_gtk_zip.sh
--- a/pidgin/win32/nsis/generate_gtk_zip.sh
+++ b/pidgin/win32/nsis/generate_gtk_zip.sh
@@ -16,17 +16,17 @@ CONTENTS_FILE=$INSTALL_DIR/CONTENTS
#This needs to be changed every time there is any sort of change.
BUNDLE_VERSION=2.16.6.0
-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"
-CAIRO="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/cairo_1.8.10-1_win32.zip Cairo 1.8.10-1"
-EXPAT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/expat_2.0.1-1_win32.zip Expat 2.0.1-1"
-FONTCONFIG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/fontconfig_2.8.0-2_win32.zip Fontconfig 2.8.0-2"
-FREETYPE="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/freetype_2.3.11-2_win32.zip Freetype 2.3.11-2"
-GETTEXT="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/gettext-runtime-0.17-1.zip Gettext 0.17-1"
-GLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/glib/2.20/glib_2.20.5-1_win32.zip Glib 2.20.5-1"
-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"
-LIBPNG="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/libpng_1.4.0-1_win32.zip libpng 1.4.0-1"
-PANGO="http://ftp.gnome.org/pub/gnome/binaries/win32/pango/1.26/pango_1.26.2-1_win32.zip Pango 1.26.2-1"
-ZLIB="http://ftp.gnome.org/pub/gnome/binaries/win32/dependencies/zlib-1.2.3.zip zlib 1.2.3"
+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"
ALL="ATK CAIRO EXPAT FONTCONFIG FREETYPE GETTEXT GLIB GTK LIBPNG PANGO ZLIB"
@@ -41,11 +41,19 @@ echo Bundle Version $BUNDLE_VERSION > $C
function download_and_extract {
URL=${1%%\ *}
- NAME=${1#*\ }
+ SHA1SUM=${1##*\ }
+ NAME=${1%\ *}
+ NAME=${NAME#*\ }
FILE=$(basename $URL)
if [ ! -e $FILE ]; then
echo Downloading $NAME
- wget $URL || return 1
+ 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"
+ exit 1
fi
EXTENSION=${FILE##*.}
#This is an OpenSuSE build service RPM
@@ -77,7 +85,9 @@ do
done
#Generate zip file to be included in installer
-zip -9 -r ../gtk-runtime-$BUNDLE_VERSION.zip Gtk
+ZIPFILE=../gtk-runtime-$BUNDLE_VERSION.zip
+rm -f $ZIPFILE
+zip -9 -r $ZIPFILE Gtk
exit 0
diff --git a/pidgin/win32/nsis/pidgin-installer.nsi b/pidgin/win32/nsis/pidgin-installer.nsi
--- a/pidgin/win32/nsis/pidgin-installer.nsi
+++ b/pidgin/win32/nsis/pidgin-installer.nsi
@@ -34,7 +34,6 @@ RequestExecutionLevel highest
!include "MUI.nsh"
!include "Sections.nsh"
-!include "WinVer.nsh"
!include "LogicLib.nsh"
!include "Memento.nsh"
@@ -71,7 +70,7 @@ RequestExecutionLevel highest
!define PERL_REG_KEY "SOFTWARE\Perl"
!define PERL_DLL "perl510.dll"
-!define DOWNLOADER_URL "http://pidgin.im/win32/download_redir.php?version=${PIDGIN_VERSION}"
+!define DOWNLOADER_URL "https://pidgin.im/win32/download_redir.php?version=${PIDGIN_VERSION}"
!define MEMENTO_REGISTRY_ROOT HKLM
!define MEMENTO_REGISTRY_KEY "${PIDGIN_UNINSTALL_KEY}"
@@ -93,6 +92,7 @@ VIAddVersionKey "FileDescription" "Pidgi
;Reserve files used in .onInit
;for faster start-up
ReserveFile "${NSISDIR}\Plugins\System.dll"
+ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
!insertmacro MUI_RESERVEFILE_LANGDLL
@@ -118,8 +118,8 @@ ReserveFile "${NSISDIR}\Plugins\System.d
;Finish Page config
!define MUI_FINISHPAGE_NOAUTOCLOSE
- !define MUI_FINISHPAGE_RUN "$INSTDIR\pidgin.exe"
- !define MUI_FINISHPAGE_RUN_NOTCHECKED
+ ;!define MUI_FINISHPAGE_RUN "$INSTDIR\pidgin.exe"
+ ;!define MUI_FINISHPAGE_RUN_NOTCHECKED
!define MUI_FINISHPAGE_LINK $(PIDGINFINISHVISITWEBSITE)
!define MUI_FINISHPAGE_LINK_LOCATION "http://pidgin.im"
@@ -148,13 +148,6 @@ ReserveFile "${NSISDIR}\Plugins\System.d
!include "${PIDGIN_NSIS_INCLUDE_PATH}\langmacros.nsh"
;--------------------------------
-;Reserve Files
- ; Only need this if using bzip2 compression
-
- !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
- !insertmacro MUI_RESERVEFILE_LANGDLL
- ReserveFile "${NSISDIR}\Plugins\UserInfo.dll"
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Start Install Sections ;;
@@ -262,15 +255,29 @@ Section $(GTKSECTIONTITLE) SecGtk
!else
; We need to download the GTK+ runtime
+ StrCpy $R3 "${DOWNLOADER_URL}>k_version=${GTK_INSTALL_VERSION}&dl_pkg=gtk"
retry:
- StrCpy $R2 "${DOWNLOADER_URL}>k_version=${GTK_INSTALL_VERSION}&dl_pkg=gtk"
+ StrCpy $R2 "$R3" ;$R2 is the current URL for error messages
DetailPrint "Downloading GTK+ Runtime ... ($R2)"
NSISdl::download /TIMEOUT=10000 $R2 $R1
Pop $R0
;StrCmp $R0 "cancel" done
- StrCmp $R0 "success" +2
+ StrCmp $R0 "success" 0 prompt_retry
+
More information about the Commits
mailing list