From 75c7cc1fc336d56edcbbf0406d65951aa2b5c4ed Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Thu, 17 Apr 2014 17:27:32 -0700 Subject: [PATCH 01/47] Move over latest changes from f20. --- esc-1.0.1-misc.patch | 85 -------------------- esc-1.1.0-fix18.patch | 82 ++++++++++++++++++++ esc.spec | 6 +- firefox-1.1-nss-system-nspr.patch | 124 ------------------------------ 4 files changed, 87 insertions(+), 210 deletions(-) delete mode 100644 esc-1.0.1-misc.patch create mode 100644 esc-1.1.0-fix18.patch delete mode 100644 firefox-1.1-nss-system-nspr.patch diff --git a/esc-1.0.1-misc.patch b/esc-1.0.1-misc.patch deleted file mode 100644 index 6d75e35..0000000 --- a/esc-1.0.1-misc.patch +++ /dev/null @@ -1,85 +0,0 @@ ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix8 2008-01-18 10:05:09.000000000 -0800 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2008-01-18 10:05:47.000000000 -0800 -@@ -817,7 +817,7 @@ - NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN(PRUint32 aKeyType, const char *aKeyID, const char *aScreenName, const char *aPIN, const char *aScreenNamePwd) - { - char tBuff[56]; -- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key PIN, ID: %s \n",GetTStamp(tBuff,56),aKeyID); -+ ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key Password, ID: %s \n",GetTStamp(tBuff,56),aKeyID); - CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); - - if (!node) ---- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix8 2008-01-18 10:06:00.000000000 -0800 -+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2008-01-18 10:06:09.000000000 -0800 -@@ -49,9 +49,15 @@ - char tBuff[56]; - GtkWidget *icon_box_widget = GTK_WIDGET(user_data); - -+ - if(icon_box_widget) - { -+ GdkScreen* gscreen = gdk_screen_get_default(); - GdkWindow* window = icon_box_widget->window; -+ -+ if(!window) -+ return; -+ - - gint width; - gint height; -@@ -59,20 +65,37 @@ - gint px; - gint py; - -+ gint screen_width = 0; -+ gint screen_height = 0; -+ -+ if(gscreen) -+ { -+ screen_width = gdk_screen_get_width(gscreen); -+ screen_height = gdk_screen_get_height(gscreen); -+ } -+ - gdk_drawable_get_size(window,&width,&height); - -- gdk_window_get_position(window, -+ gdk_window_get_origin(window, - &px, - &py); - -- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d \n",GetTStamp(tBuff,56),width,height,px,py)); -+ PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d *x %d *y %d screen_w %d screen_h %d \n",GetTStamp(tBuff,56),width,height,px,py,*x,*y,screen_width, screen_height)); -+ -+ // Are we close to the bottom of the screen? - -+ if( screen_width > 0 && screen_height > 0 -+ && ( screen_height - py) < (height * 3)) -+ { -+ height = height* -2 ; -+ } - - gint x_coord = px; - gint y_coord = (py + height); - - *x = x_coord; - *y = y_coord; -+ *push_in = TRUE; - - } - ---- ./esc/src/app/xul/esc/application.ini.fix8 2008-01-18 10:04:33.000000000 -0800 -+++ ./esc/src/app/xul/esc/application.ini 2008-01-18 10:04:43.000000000 -0800 -@@ -25,11 +25,11 @@ - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.0.1-7 -+Version=1.0.1-8 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. --BuildID=0000001011 -+BuildID=0000001012 - ; - ; This ID is just an example. Every XUL app ought to have it's own unique ID. - ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on diff --git a/esc-1.1.0-fix18.patch b/esc-1.1.0-fix18.patch new file mode 100644 index 0000000..3975f5e --- /dev/null +++ b/esc-1.1.0-fix18.patch @@ -0,0 +1,82 @@ +diff -up ./esc/src/app/xpcom/Makefile.sdk.fix18 ./esc/src/app/xpcom/Makefile.sdk +--- ./esc/src/app/xpcom/Makefile.sdk.fix18 2014-04-17 11:34:54.889316425 -0700 ++++ ./esc/src/app/xpcom/Makefile.sdk 2014-04-17 11:39:32.903840765 -0700 +@@ -113,7 +113,7 @@ ifeq ($(OS_ARCH),Linux) + CPPFLAGS += -g -fno-rtti \ + -DXPCOM_GLUE_USE_NSPR -fno-exceptions \ + -fshort-wchar -fPIC -std=gnu++0x +-GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L$(GECKO_SDK_PATH)/lib -lxpcomglue_s -lxpcom ++GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L$(GECKO_SDK_PATH)/lib -lxpcomglue_s + endif + + ifeq ($(OS_ARCH),WINNT) +@@ -127,7 +127,7 @@ endif + # #include "mozilla-config.h" to each of your .cpp files. + #GECKO_CONFIG_INCLUDE = -include mozilla-config.h + +-GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_CLIENT ++GECKO_DEFINES = -DMOZILLA_CLIENT + + ifdef ESC_VERSION + GECKO_DEFINES += -DESC_VERSION=$(ESC_VERSION) +diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix18 ./esc/src/app/xpcom/rhCoolKey.h +--- ./esc/src/app/xpcom/rhCoolKey.h.fix18 2014-04-17 15:48:24.466170548 -0700 ++++ ./esc/src/app/xpcom/rhCoolKey.h 2014-04-17 15:49:25.319409778 -0700 +@@ -17,7 +17,7 @@ + + #ifndef RH_COOLKEY_H + #define RH_COOLKEY_H +- ++#include + #include "rhICoolKey.h" + /*#include "nsIGenericFactory.h" */ + #include "mozilla/ModuleUtils.h" +diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix18 ./esc/src/app/xpcom/tray/Makefile.sdk +--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix18 2014-04-17 11:24:58.080777558 -0700 ++++ ./esc/src/app/xpcom/tray/Makefile.sdk 2014-04-17 11:34:28.394647654 -0700 +@@ -167,7 +167,7 @@ endif + # #include "mozilla-config.h" to each of your .cpp files. + #GECKO_CONFIG_INCLUDE = -include mozilla-config.h + +-GECKO_DEFINES = -DMOZILLA_CLIENT -DXPCOM_GLUE ++GECKO_DEFINES = -DMOZILLA_CLIENT + + NSS_INCLUDE = /usr/include/nss3 + NSPR_INCLUDE = /usr/include/nspr4 +diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix18 ./esc/src/app/xpcom/tray/rhTray.h +--- ./esc/src/app/xpcom/tray/rhTray.h.fix18 2014-04-17 11:04:33.578085948 -0700 ++++ ./esc/src/app/xpcom/tray/rhTray.h 2014-04-17 11:05:10.798620628 -0700 +@@ -17,7 +17,7 @@ + + #ifndef RH_TRAY_H + #define RH_TRAY_H +- ++#include + #include "rhITray.h" + //#include "nsIGenericFactory.h" + //#include mozilla/ModuleUtils.h +diff -up ./esc/src/app/xul/esc/application.ini.fix18 ./esc/src/app/xul/esc/application.ini +--- ./esc/src/app/xul/esc/application.ini.fix18 2014-04-17 15:35:13.854054559 -0700 ++++ ./esc/src/app/xul/esc/application.ini 2014-04-17 15:35:45.278661698 -0700 +@@ -25,11 +25,11 @@ Vendor=RedHat + Name=ESC + ; + ; This field specifies your application's version. This field is optional. +-Version=1.1.0-19 ++Version=1.1.0-23 + ; + ; This field specifies your application's build ID (timestamp). This field is + ; required. +-BuildID=0000001019 ++BuildID=0000001023 + ; + ; This ID is just an example. Every XUL app ought to have it's own unique ID. + ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on +@@ -47,6 +47,6 @@ MinVersion=6.0.0 + ; application requires. It should be specified if your application uses + ; unfrozen interfaces. Specifying 1.8 matches all releases with a version + ; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2). +-MaxVersion=22.0.0 ++MaxVersion=50.0.0 + + [Shell] diff --git a/esc.spec b/esc.spec index 4e35db5..e30449d 100644 --- a/esc.spec +++ b/esc.spec @@ -33,6 +33,7 @@ Patch14: esc-1.1.0-fix14.patch Patch15: esc-1.1.0-fix15.patch Patch16: esc-1.1.0-fix16.patch Patch17: esc-1.1.0-fix17.patch +Patch18: esc-1.1.0-fix18.patch BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1 BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel @@ -69,7 +70,7 @@ AutoReqProv: 0 %define escxuldir src/app/xul/esc %define escxulchromeicons %{escxuldir}/chrome/icons/default %define escdaemon escd -%define geckoversion 22.0 +%define geckoversion 27.0 Source0: http://pki.fedoraproject.org/pki/sources/%name/%{escname}.tar.bz2 Source1: http://pki.fedoraproject.org/pki/sources/%name/esc @@ -104,6 +105,7 @@ cryptographic smartcards. %patch15 -p1 -b .fix15 %patch16 -p1 -b .fix16 %patch17 -p1 -b .fix17 +%patch18 -p1 -b .fix18 r=$(uname -r | sed -e 's/\(^[^.]*\.[^.]*\).*/\1/') [ -f esc/coreconf/Linux$r.mk ] || ln -s Linux3.5.mk esc/coreconf/Linux$r.mk @@ -232,6 +234,8 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Thu Apr 17 2014 Jack Maghe =1.1.0-23 +- Appease more xulrunner changes. * Sat Aug 03 2013 Fedora Release Engineering - 1.1.0-23 - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild diff --git a/firefox-1.1-nss-system-nspr.patch b/firefox-1.1-nss-system-nspr.patch deleted file mode 100644 index f92abe7..0000000 --- a/firefox-1.1-nss-system-nspr.patch +++ /dev/null @@ -1,124 +0,0 @@ -Index: mozilla/security/coreconf/location.mk -=================================================================== -RCS file: /cvsroot/mozilla/security/coreconf/location.mk,v -retrieving revision 1.9 -diff -u -r1.9 location.mk ---- mozilla/security/coreconf/location.mk 25 Apr 2004 15:02:17 -0000 1.9 -+++ mozilla/security/coreconf/location.mk 11 Apr 2005 20:21:57 -0000 -@@ -61,6 +61,8 @@ - - DIST = $(SOURCE_PREFIX)/$(PLATFORM) - -+NSPR_LIBDIR = $(DIST)/lib -+ - ifdef BUILD_DEBUG_GC - DEFINES += -DDEBUG_GC - endif -Index: mozilla/security/manager/Makefile.in -=================================================================== -RCS file: /cvsroot/mozilla/security/manager/Makefile.in,v -retrieving revision 1.56 -diff -u -r1.56 Makefile.in ---- mozilla/security/manager/Makefile.in 14 Mar 2005 10:00:58 -0000 1.56 -+++ mozilla/security/manager/Makefile.in 11 Apr 2005 20:21:57 -0000 -@@ -76,12 +76,23 @@ - endif - endif - -+ABS_DIST := $(shell cd $(DIST) && pwd) -+ifeq ($(OS_ARCH),WINNT) -+ABS_DIST := $(shell cygpath -w $(ABS_DIST) | sed -e 's|\\\\|/|g') -+endif -+NSPR_LIBDIR = $(firstword $(filter -L%,$(NSPR_LIBS))) -+ifneq (,$(strip $(NSPR_LIBDIR))) -+NSPR_LIBDIR := $(subst -L,,$(subst -L$(DIST),-L$(ABS_DIST),$(NSPR_LIBDIR))) -+else -+NSPR_LIBDIR = $(ABS_DIST)/lib -+endif - # NSS makefiles are not safe for parallel execution. - DEFAULT_GMAKE_FLAGS = MAKE="$(MAKE) -j1" -j1 - DEFAULT_GMAKE_FLAGS += CC="$(CC)" --DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="-I$(MOZ_BUILD_ROOT)/dist/include/nspr -I$(MOZ_BUILD_ROOT)/dist/include/dbm" --DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(MOZ_BUILD_ROOT)/dist --DEFAULT_GMAKE_FLAGS += DIST=$(MOZ_BUILD_ROOT)/dist -+DEFAULT_GMAKE_FLAGS += MOZILLA_INCLUDES="$(subst -I$(DIST),-I$(ABS_DIST),$(NSPR_CFLAGS) -I$(DIST)/include/dbm)" -+DEFAULT_GMAKE_FLAGS += SOURCE_MD_DIR=$(ABS_DIST) -+DEFAULT_GMAKE_FLAGS += DIST=$(ABS_DIST) -+DEFAULT_GMAKE_FLAGS += NSPR_LIBDIR=$(NSPR_LIBDIR) - DEFAULT_GMAKE_FLAGS += MOZILLA_CLIENT=1 - DEFAULT_GMAKE_FLAGS += NO_MDUPDATE=1 - ABS_topsrcdir := $(shell cd $(topsrcdir); pwd) -Index: mozilla/security/nss/lib/ckfw/builtins/Makefile -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/ckfw/builtins/Makefile,v -retrieving revision 1.14 -diff -u -r1.14 Makefile ---- mozilla/security/nss/lib/ckfw/builtins/Makefile 20 Jan 2005 02:25:46 -0000 1.14 -+++ mozilla/security/nss/lib/ckfw/builtins/Makefile 11 Apr 2005 20:21:57 -0000 -@@ -53,23 +53,23 @@ - # This is merely an expedient hack and not the right solution. - ifdef NS_USE_GCC - EXTRA_LIBS += \ -- -L$(DIST)/lib \ -+ -L$(NSPR_LIBDIR) \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ - $(NULL) - else - EXTRA_LIBS += \ -- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \ -- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \ -+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \ -+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \ - $(NULL) - endif - - else - - EXTRA_LIBS += \ -- $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \ -- $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \ -+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \ -+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \ - $(NULL) - - endif -Index: mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile -=================================================================== -RCS file: /cvsroot/mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile,v -retrieving revision 1.18 -diff -u -r1.18 Makefile ---- mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile 25 Apr 2004 15:03:08 -0000 1.18 -+++ mozilla/security/nss/lib/fortcrypt/swfort/pkcs11/Makefile 11 Apr 2005 20:21:57 -0000 -@@ -63,7 +63,7 @@ - $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \ - $(CRYPTO_LIB) \ - $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \ -- -L$(DIST)/lib \ -+ -L$(NSPR_LIBDIR) \ - -lplc4 \ - -lplds4 \ - -lnspr4 \ -@@ -76,8 +76,8 @@ - $(DIST)/lib/softokn.lib \ - $(CRYPTO_LIB) \ - $(DIST)/lib/secutil.lib \ -- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plc4_s.lib \ -- $(DIST)/lib/$(NSPR31_LIB_PREFIX)plds4_s.lib \ -+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plc4_s.lib \ -+ $(NSPR_LIBDIR)/$(NSPR31_LIB_PREFIX)plds4_s.lib \ - wsock32.lib \ - winmm.lib \ - $(NULL) -@@ -98,8 +98,8 @@ - $(DIST)/lib/$(LIB_PREFIX)softokn.$(LIB_SUFFIX) \ - $(CRYPTO_LIB) \ - $(DIST)/lib/$(LIB_PREFIX)secutil.$(LIB_SUFFIX) \ -- $(DIST)/lib/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \ -- $(DIST)/lib/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \ -+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plc4.$(LIB_SUFFIX) \ -+ $(NSPR_LIBDIR)/$(LIB_PREFIX)plds4.$(LIB_SUFFIX) \ - $(NULL) - - endif From 856e0127d6b1d6c58d6ce06da36fec0588be638d Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Wed, 23 Apr 2014 16:57:59 -0700 Subject: [PATCH 02/47] Fix #1090680, Http client doesn't provide standard intro string to server. --- esc-1.1.0-fix19.patch | 79 +++++++++++++++++++++++++++++++++++++++++++ esc.spec | 6 +++- 2 files changed, 84 insertions(+), 1 deletion(-) create mode 100644 esc-1.1.0-fix19.patch diff --git a/esc-1.1.0-fix19.patch b/esc-1.1.0-fix19.patch new file mode 100644 index 0000000..acf7010 --- /dev/null +++ b/esc-1.1.0-fix19.patch @@ -0,0 +1,79 @@ +diff -up ./esc/src/app/xul/esc/application.ini.fix19 ./esc/src/app/xul/esc/application.ini +--- ./esc/src/app/xul/esc/application.ini.fix19 2014-04-23 14:42:02.644058331 -0700 ++++ ./esc/src/app/xul/esc/application.ini 2014-04-23 14:42:22.990803962 -0700 +@@ -25,11 +25,11 @@ Vendor=RedHat + Name=ESC + ; + ; This field specifies your application's version. This field is optional. +-Version=1.1.0-23 ++Version=1.1.0-24 + ; + ; This field specifies your application's build ID (timestamp). This field is + ; required. +-BuildID=0000001023 ++BuildID=0000001024 + ; + ; This ID is just an example. Every XUL app ought to have it's own unique ID. + ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on +diff -up ./esc/src/lib/NssHttpClient/Util.cpp.fix19 ./esc/src/lib/NssHttpClient/Util.cpp +--- ./esc/src/lib/NssHttpClient/Util.cpp.fix19 2014-04-23 14:40:14.001416551 -0700 ++++ ./esc/src/lib/NssHttpClient/Util.cpp 2014-04-23 14:41:19.864593148 -0700 +@@ -49,3 +49,26 @@ NSAPI_PUBLIC int Util::ascii2numeric (ch + } + return num; + } ++ ++// Remove stray trailing CRLF chars, replace with provided char. ++NSAPI_PUBLIC void Util::stripTrailingCRLF(char *buff, char replaceWith) ++{ ++ if(buff == NULL) ++ return; ++ ++ if(replaceWith == 0) ++ return; ++ ++ int buffLen = strlen(buff); ++ ++ if(buffLen == 0) ++ return; ++ ++ int buffLenMinusOne = buffLen - 1; ++ ++ for(int i = buffLenMinusOne; i >= 0; i--) { ++ if(buff[i] == 0x0d || buff[i] == 0x0a) { ++ buff[i] = replaceWith; ++ } ++ } ++} +diff -up ./esc/src/lib/NssHttpClient/Util.h.fix19 ./esc/src/lib/NssHttpClient/Util.h +--- ./esc/src/lib/NssHttpClient/Util.h.fix19 2014-04-23 14:40:20.020341304 -0700 ++++ ./esc/src/lib/NssHttpClient/Util.h 2014-04-23 14:41:30.120464932 -0700 +@@ -34,6 +34,7 @@ class Util + ~Util(); + public: + NSAPI_PUBLIC static int ascii2numeric(char ch); ++ NSAPI_PUBLIC static void stripTrailingCRLF(char *buff, char replaceWith); + /* static char *Buffer2String (Buffer &data); + static Buffer *Str2Buf (const char *s); + static char *URLEncode (Buffer &data); +diff -up ./esc/src/lib/NssHttpClient/request.cpp.fix19 ./esc/src/lib/NssHttpClient/request.cpp +--- ./esc/src/lib/NssHttpClient/request.cpp.fix19 2014-04-23 14:40:27.207251455 -0700 ++++ ./esc/src/lib/NssHttpClient/request.cpp 2014-04-23 14:41:38.935354731 -0700 +@@ -25,6 +25,7 @@ + #include "engine.h" + #include + #include ++#include "Util.h" + PRLogModuleInfo *httpLog = PR_NewLogModule("coolKeyHttpReq"); + + /** +@@ -283,6 +284,9 @@ PRBool PSHttpRequest::send( PRFileDesc * + if (strlen(_proxy_uri)) + path = _proxy_uri; + ++ //check for and replace stray line feed chars in path only. ++ Util::stripTrailingCRLF(path,' '); ++ + data = PR_smprintf( "%s %s %s\r\n", _method, path, + HttpProtocolToString(_proto) ); + diff --git a/esc.spec b/esc.spec index e30449d..038afeb 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 23%{?dist} +Release: 24%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -34,6 +34,7 @@ Patch15: esc-1.1.0-fix15.patch Patch16: esc-1.1.0-fix16.patch Patch17: esc-1.1.0-fix17.patch Patch18: esc-1.1.0-fix18.patch +Patch19: esc-1.1.0-fix19.patch BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1 BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel @@ -106,6 +107,7 @@ cryptographic smartcards. %patch16 -p1 -b .fix16 %patch17 -p1 -b .fix17 %patch18 -p1 -b .fix18 +%patch19 -p1 -b .fix19 r=$(uname -r | sed -e 's/\(^[^.]*\.[^.]*\).*/\1/') [ -f esc/coreconf/Linux$r.mk ] || ln -s Linux3.5.mk esc/coreconf/Linux$r.mk @@ -234,6 +236,8 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Wed Apr 23 2014 Jack Magne =1.1.0-24 +- Fix minor http client error. * Thu Apr 17 2014 Jack Maghe =1.1.0-23 - Appease more xulrunner changes. * Sat Aug 03 2013 Fedora Release Engineering - 1.1.0-23 From e527b752d3ce70ebc0d2a7fe6118343fd6865dea Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sat, 7 Jun 2014 05:59:41 -0500 Subject: [PATCH 03/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index 038afeb..1d49f62 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 24%{?dist} +Release: 25%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -236,6 +236,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Sat Jun 07 2014 Fedora Release Engineering - 1.1.0-25 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + * Wed Apr 23 2014 Jack Magne =1.1.0-24 - Fix minor http client error. * Thu Apr 17 2014 Jack Maghe =1.1.0-23 From a50d5db22023e3b022cdb2986afcfcae89c9c010 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Mon, 9 Jun 2014 11:36:29 -0700 Subject: [PATCH 04/47] Address build failure: #1106233. --- esc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index 1d49f62..d18ec4a 100644 --- a/esc.spec +++ b/esc.spec @@ -71,7 +71,7 @@ AutoReqProv: 0 %define escxuldir src/app/xul/esc %define escxulchromeicons %{escxuldir}/chrome/icons/default %define escdaemon escd -%define geckoversion 27.0 +%define geckoversion 30.0 Source0: http://pki.fedoraproject.org/pki/sources/%name/%{escname}.tar.bz2 Source1: http://pki.fedoraproject.org/pki/sources/%name/esc From 277406e5963b33d252844b850a217757f90bf606 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sat, 16 Aug 2014 11:28:50 +0000 Subject: [PATCH 05/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index d18ec4a..9e5316d 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 25%{?dist} +Release: 26%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -236,6 +236,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Sat Aug 16 2014 Fedora Release Engineering - 1.1.0-26 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + * Sat Jun 07 2014 Fedora Release Engineering - 1.1.0-25 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild From d26bd9f634c6eff75115d4d8e1e168d6ee092b3f Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 17 Jun 2015 05:45:36 +0000 Subject: [PATCH 06/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index 9e5316d..77305cb 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 26%{?dist} +Release: 27%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -236,6 +236,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Wed Jun 17 2015 Fedora Release Engineering - 1.1.0-27 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + * Sat Aug 16 2014 Fedora Release Engineering - 1.1.0-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From c37e6755d5c8ae122788c70bcd2518a65cf0d13f Mon Sep 17 00:00:00 2001 From: Michael Schwendt Date: Sat, 12 Dec 2015 02:11:22 +0100 Subject: [PATCH 07/47] No build, because it fails in Rawhide: python: can't open file '/usr/lib64/xulrunner-devel-30.0/sdk/bin/header.py': [Errno 2] No such file or directory - Include several missing directories. - BuildRequires nss-static for -lcrmf (#717241) --- esc.spec | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/esc.spec b/esc.spec index 77305cb..100b45f 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 27%{?dist} +Release: 28%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -39,7 +39,7 @@ Patch19: esc-1.1.0-fix19.patch BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1 BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel BuildRequires: pango-devel libpng-devel pkgconfig zlib-devel -BuildRequires: nspr-devel nss-devel +BuildRequires: nspr-devel nss-devel nss-static BuildRequires: autoconf213 libX11-devel libXt-devel BuildRequires: xulrunner xulrunner-devel @@ -196,19 +196,24 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) +%dir %{escdir} %{escdir}/esc %{escdir}/escd %{escbindir}/esc %{escdir}/application.ini %{escdir}/chrome.manifest +%dir %{escdir}/chrome %{escdir}/chrome/chrome.manifest -%{escdir}/chrome/content -%{escdir}/chrome/locale -%{escdir}/chrome/icons/default -%{escdir}/components +%{escdir}/chrome/content/ +%{escdir}/chrome/locale/ +%dir %{escdir}/chrome/icons +%{escdir}/chrome/icons/default/ +%{escdir}/components/ +%dir %{escdir}/defaults +%dir %{escdir}/defaults/preferences %{escdir}/defaults/preferences/esc-prefs.js #%{escdir}/xulrunner @@ -236,6 +241,10 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Sat Dec 12 2015 Michael Schwendt - 1.1.0-28 +- Include several missing directories. +- BuildRequires nss-static for -lcrmf (#717241) + * Wed Jun 17 2015 Fedora Release Engineering - 1.1.0-27 - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild From bdb75acd0862474bc29e7f7f3e9dc57f866a910a Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Wed, 3 Feb 2016 20:03:19 +0000 Subject: [PATCH 08/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index 100b45f..2394b64 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 28%{?dist} +Release: 29%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -241,6 +241,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Wed Feb 03 2016 Fedora Release Engineering - 1.1.0-29 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + * Sat Dec 12 2015 Michael Schwendt - 1.1.0-28 - Include several missing directories. - BuildRequires nss-static for -lcrmf (#717241) From 5be5f4beae702c4458c111e11ad4c3df51fc4c83 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Mon, 8 Feb 2016 14:28:44 -0800 Subject: [PATCH 09/47] More xulrunner appeasment. --- esc-1.1.0-fix20.patch | 396 ++++++++++++++++++++++++++++++++++++++++++ esc-1.1.0-fix21.patch | 21 +++ esc.spec | 35 ++-- 3 files changed, 433 insertions(+), 19 deletions(-) create mode 100644 esc-1.1.0-fix20.patch create mode 100644 esc-1.1.0-fix21.patch diff --git a/esc-1.1.0-fix20.patch b/esc-1.1.0-fix20.patch new file mode 100644 index 0000000..11b670e --- /dev/null +++ b/esc-1.1.0-fix20.patch @@ -0,0 +1,396 @@ +diff -up ./esc/src/app/xpcom/Makefile.sdk.fix20 ./esc/src/app/xpcom/Makefile.sdk +--- ./esc/src/app/xpcom/Makefile.sdk.fix20 2015-04-07 17:29:25.406955513 -0700 ++++ ./esc/src/app/xpcom/Makefile.sdk 2015-04-07 18:32:07.330144841 -0700 +@@ -195,13 +195,13 @@ all:: export libs + + libs:: + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhIKeyNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/header.py --cachedir /tmp -o rhIKeyNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhIKeyNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir /tmp -o rhIKeyNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhICoolKey.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/header.py --cachedir /tmp -o rhICoolKey.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhICoolKey.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir /tmp -o rhICoolKey.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl + + ifeq ($(OS_ARCH),Darwin) + $(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES) +@@ -257,7 +257,7 @@ $(DEPLOY_OBJDIR): + mkdir $(DEPLOY_OBJDIR) + + cd $(CORE_DEPTH)/$(DEPLOY_OFFSET)/app/xul/esc; zip -r test.zip * -x *\CVS\* \*.fix*; unzip -d esc test.zip ; rm -f test.zip +- $(XUL_FRAMEWORK_BIN_PATH)/$(XULRUNNER_EXEC) --install-app $(CORE_DEPTH)$(DEPLOY_OFFSET)/app/xul/esc/esc $(DEPLOY_OBJDIR) ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/install_app.py $(CORE_DEPTH)$(DEPLOY_OFFSET)/app/xul/esc/esc $(DEPLOY_OBJDIR)/esc --appName esc + + ifeq ($(OS_ARCH), Darwin) + mkdir $(DEPLOY_OBJDIR)/$(XULRUNNER_FRAME_BASE) +diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix20 ./esc/src/app/xpcom/rhCoolKey.cpp +--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix20 2015-04-07 17:31:15.166792191 -0700 ++++ ./esc/src/app/xpcom/rhCoolKey.cpp 2015-04-07 18:24:16.454130223 -0700 +@@ -106,21 +106,23 @@ class CoolKeyShutdownObserver : public n + NS_DECL_ISUPPORTS + NS_DECL_NSIOBSERVER + +- ~CoolKeyShutdownObserver(); ++ private: ++ ~CoolKeyShutdownObserver(); + }; + +- NS_IMPL_ISUPPORTS1(CoolKeyShutdownObserver, nsIObserver) ++ NS_IMPL_ISUPPORTS(CoolKeyShutdownObserver, nsIObserver) + + CoolKeyShutdownObserver::~CoolKeyShutdownObserver() + { + char tBuff[56]; + PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyShutdownObserver::~CoolKeyShutdownObserver \n",GetTStamp(tBuff,56))); + } +- ++ ++ + NS_IMETHODIMP + CoolKeyShutdownObserver::Observe(nsISupports *aSubject, + const char *aTopic, +- const PRUnichar *someData) ++ const char16_t *someData) + { + char tBuff[56]; + if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) +@@ -1793,5 +1795,5 @@ static const mozilla::Module kCoolKeyMod + NSMODULE_DEFN(rhCoolKeyModule) = &kCoolKeyModule; + // + +-NS_IMPL_ISUPPORTS1(rhCoolKey,rhICoolKey) ++NS_IMPL_ISUPPORTS(rhCoolKey,rhICoolKey) + +diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix20 ./esc/src/app/xpcom/rhCoolKey.h +--- ./esc/src/app/xpcom/rhCoolKey.h.fix20 2015-04-07 18:03:46.544134629 -0700 ++++ ./esc/src/app/xpcom/rhCoolKey.h 2015-04-07 18:25:33.828309642 -0700 +@@ -93,6 +93,7 @@ public: + rhCoolKey(); + + void ShutDownInstance(); ++private: + ~rhCoolKey(); + private: + static HRESULT Dispatch( rhICoolKey *listener, +diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix20 ./esc/src/app/xpcom/tray/Makefile.sdk +--- ./esc/src/app/xpcom/tray/Makefile.sdk.fix20 2015-04-02 15:09:32.327346359 -0700 ++++ ./esc/src/app/xpcom/tray/Makefile.sdk 2015-04-02 15:12:17.987617741 -0700 +@@ -230,13 +230,13 @@ all:: export libs + libs:: + echo "PPC_BUILD $(PPC_BUILD)" + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITray.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/header.py --cachedir=/tmp -o rhITray.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITray.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir=/tmp -o rhITray.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITrayWindNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)//header.py --cachedir=/tmp -o rhITrayWindNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl + +- $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITrayWindNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl ++ $(PYTHON_BIN) $(GECKO_BIN_PATH)/typelib.py --cachedir=/tmp -o rhITrayWindNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl + + ifeq ($(OS_ARCH),Darwin) + $(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES) +diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix20 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp +--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix20 2015-04-07 16:15:16.840118695 -0700 ++++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2015-04-07 16:15:39.047883270 -0700 +@@ -898,5 +898,5 @@ static const mozilla::Module kCoolKeyTra + // shared library. + NSMODULE_DEFN(rhCoolKeyTrayModule) = &kCoolKeyTrayModule; + +-NS_IMPL_ISUPPORTS1(rhTray,rhITray) ++NS_IMPL_ISUPPORTS(rhTray,rhITray) + +diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix20 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js +--- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix20 2015-04-09 17:58:37.203518142 -0700 ++++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2015-04-09 18:00:19.302492123 -0700 +@@ -57,6 +57,7 @@ const ESC_SECURITY_URL="esc.security.ur + const ESC_SECURE_URL="esc.secure.url"; + const ESC_GLOBAL_PHONE_HOME_URL= "esc.global.phone.home.url"; + const ESC_HIDE_FORMAT="esc.hide.format"; ++const ESC_ALLOW_NOTIFICATIONS="esc.allow.notifications"; + + const CLEAN_TOKEN = "cleanToken"; + const UNINITIALIZED = 1; +@@ -76,6 +77,7 @@ const ENROLL_WINDOW = "esc.xul"; + const ADMIN_WINDOW = "settings.xul"; + const HIDDEN_WINDOW = "hiddenWindow.xul"; + const SECURITY_WINDOW = "security.xul"; ++const PHONE_WINDOW = "config.xul"; + + + //Log level constants +@@ -230,10 +232,14 @@ var Status_Messages = new Array( + function DoPhoneHome(keyType,keyID) + { + CoolKeyLogMsg(PR_LOG_ALWAYS,"Attempting to phone home for Key " + keyID); ++ var allowNotify = null; + var callback = function (aResult) { + + recordMessage("In DoPhoneHome callback"); + ++ var allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS); ++ ++ + var issuer = ""; + if(aResult == true) + { +@@ -241,7 +247,10 @@ function DoPhoneHome(keyType,keyID) + if(!issuer) + issuer = getBundleString("unknownIssuer"); + recordMessage("In DoPhoneHome callback success issuer " + issuer); +- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ ++ if(allowNotify == "yes") { ++ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ } + LogKeyInfo(keyType,keyID,"Key Inserted ..."); + UpdateRowWithPhoneHomeData(keyType,keyID); + recordMessage("cached issuer " + issuer); +@@ -262,7 +271,9 @@ function DoPhoneHome(keyType,keyID) + if(!issuer) + issuer = getBundleString("unknownIssuer"); + recordMessage("Phone home callback failed , issuer " + issuer); +- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ if (allowNotify == "yes") { ++ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ } + LogKeyInfo(keyType,keyID,"Key Inserted ..."); + } + } +@@ -271,6 +282,7 @@ function DoPhoneHome(keyType,keyID) + + var home = DoCoolKeyGetIssuerUrl(keyType,keyID); + ++ //home = null; + recordMessage("Returned IssuerURL " + home); + + if(IsPhoneHomeCached(keyID) && home) +@@ -279,7 +291,12 @@ function DoPhoneHome(keyType,keyID) + + recordMessage("Phone home info cached..."); + issuer = GetCoolKeyIssuer(keyType,keyID); +- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ ++ allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS); ++ if (allowNotify == "yes") { ++ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ } ++ + LogKeyInfo(keyType,keyID,"Key Inserted ..."); + + var launchBrowserURL = GetCachedEnrolledTokenBrowserURL(keyID); +@@ -534,7 +551,11 @@ function GetAuthDataFromPopUp(aKeyType,a + keyUITable[aKeyID] = aUiData; + keyTypeTable[aKeyID] = aKeyType; + +- var child = window.open("chrome://esc/content/GenericAuth.xul", aKeyID, "chrome,centerscreen,width=400,height=250"); ++ var child = window.open("chrome://esc/content/GenericAuth.xul", aKeyID, "chrome,centerscreen,width=400,height=250,dialog"); ++ ++ if (child) { ++ child.setTimeout("focus()", 1000); ++ } + + curChildWindow = child; + } +@@ -1275,7 +1296,7 @@ function UpdateEnrollmentArea(keyType,ke + + var numUnenrolledKeys = DoGetNumUnenrolledCoolKeys(); + +- //alert("inserted " + inserted + " showFulUI " + showFullUI + " showExternalUI " + showExternalUI + " already enrolled " + alreadyEnrolled + " numUnenrolledKeys " + numUnenrolledKeys); ++ // alert("inserted " + inserted + " showFulUI " + showFullUI + " showExternalUI " + showExternalUI + " already enrolled " + alreadyEnrolled + " numUnenrolledKeys " + numUnenrolledKeys); + + + var ui_id = document.getElementById("esc-ui"); +@@ -1290,7 +1311,7 @@ function UpdateEnrollmentArea(keyType,ke + { + if(!numUnenrolledKeys) + { +- ui_id.setAttribute("src",null); ++ ui_id.setAttribute("src",""); + } + else + { +@@ -1427,14 +1448,19 @@ function UpdateEnrollmentArea(keyType,ke + HideItem(no_key_area); + } + ++ + if(!alreadyEnrolled && inserted && showExternalUI) + { + UpdateESCSize(); ++ gEnrollmentPage.setTimeout("focus();",3500); + return; + } + + if(!showExternalUI) + UpdateESCSize(); ++ ++ gEnrollmentPage.setTimeout("focus();",3500); ++ + } + + //Evaulate Password Quality +@@ -2006,7 +2032,7 @@ function SelectESCPage(keyType,keyID,pho + break; + } + +- //alert("SelectESCPage initialized " + keyUninitialized + " gEnrollmentPage " + gEnrollmentPage + " gFactoryMode " + gFactoryMode + " gHiddenPage " + gHiddenPage); ++ //alert("SelectESCPage uninitialized " + keyUninitialized + " gEnrollmentPage " + gEnrollmentPage + " gFactoryMode " + gFactoryMode + " gHiddenPage " + gHiddenPage + " phoneHomeFailed " + phoneHomeFailed + " no_launch_external_ui " + no_launch_external_ui); + + //Get the primary page windows if present + +@@ -2022,14 +2048,7 @@ function SelectESCPage(keyType,keyID,pho + + if(keyUninitialized == UNINITIALIZED && !phoneHomeFailed && !no_launch_external_ui ) //formatted uninitialized card + { +- if(enrollWnd) //Enrollment window is already up +- { +- enrollWnd.focus(); +- } +- else +- { +- launchESC(); +- } ++ launchESC(); + } + else + { +@@ -2975,8 +2994,9 @@ function OnCoolKeyInserted(keyType, keyI + + var uninitialized = 0; + +- recordMessage("Key inserted!" + "Window " + IdentifyWindow()); ++ var allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS); + ++ recordMessage("Key inserted!" + "Window " + IdentifyWindow()); + if(gHiddenPage) + { + TrayShowNotificationIcon(); +@@ -2993,6 +3013,7 @@ function OnCoolKeyInserted(keyType, keyI + + gCurrentSelectedRow = row; + UpdateEnrollmentArea(keyType,keyID,1); ++ + } + + if(gAdminPage) +@@ -3017,7 +3038,9 @@ function OnCoolKeyInserted(keyType, keyI + if(!issuer ) + issuer = getBundleString("unknownIssuer"); + +- TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ if( allowNotify) { ++ TraySendNotificationMessage(getBundleString("keyInserted"),"\"" + issuer +"\"" + " " + getBundleString("keyInsertedComputer"),3,4000,GetESCNotifyIconPath(keyType,keyID)); ++ } + + } + +@@ -3037,6 +3060,8 @@ function OnCoolKeyRemoved(keyType, keyID + + var row = GetRowForKey(keyType, keyID); + ++ var allowNotify = DoCoolKeyGetConfigValue(ESC_ALLOW_NOTIFICATIONS); ++ + if(gHiddenPage) + { + if(curChildWindow) +@@ -3047,7 +3072,9 @@ function OnCoolKeyRemoved(keyType, keyID + var issuer = GetCoolKeyIssuer(keyType,keyID); + if(!issuer) + issuer = getBundleString("unknownIssuer"); +- TraySendNotificationMessage(getBundleString("keyRemoved"),"\"" + issuer + "\"" + " " + getBundleString("keyRemovedComputer"),1,4000,GetESCNotifyIconPath(keyType,keyID)); ++ if (allowNotify == "yes") { ++ TraySendNotificationMessage(getBundleString("keyRemoved"),"\"" + issuer + "\"" + " " + getBundleString("keyRemovedComputer"),1,4000,GetESCNotifyIconPath(keyType,keyID)); ++ } + LogKeyInfo(keyType,keyID, "Key Removed ..."); + + } +@@ -3345,6 +3372,7 @@ uiListener = + + if(url != esc_enroll_uri) + { ++ + MyAlert(getBundleString("errorEnrollmentUI")); + + if(uiListener) +@@ -3978,17 +4006,24 @@ function launchCONFIG(keyType,keyID) + platform = "mac"; + } + +- var wind = null; ++ var wind = IsPageWindowPresent(PHONE_WINDOW); + +- if(platform == "mac") +- { +- wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable,modal=no"); +- } +- else +- { +- wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable,modal=yes"); ++ if (!wind) { ++ if(platform == "mac") ++ { ++ wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable,modal=no"); ++ } ++ else ++ { ++ wind = window.openDialog("chrome://esc/content/config.xul",keyID,"chrome,centerscreen,resizable"); ++ ++ } ++ } + ++ if(wind) { ++ wind.setTimeout("focus();",1500); + } ++ + } + + //Launch cert viewer if key has certs +@@ -4021,7 +4056,7 @@ function launchCertViewerIfCerts() + //Launch page to view card's certificates + function launchCertViewer() + { +- var wind = window.openDialog("chrome://esc/content/certManager.xul", "","chrome,centerscreen,modal=yes"); ++ var wind = window.openDialog("chrome://pippki/content/certManager.xul", "","chrome,centerscreen,modal=yes"); + } + + //Launch ESC admin page window +@@ -4046,12 +4081,12 @@ function launchESC() + + if(!enrollWnd) + { +- var wind = window.open("chrome://esc/content/esc.xul","","chrome,resizable,centerscreen,dialog"); ++ enrollWnd = window.open("chrome://esc/content/esc.xul","","chrome,resizable,centerscreen,dialog"); + + } +- else +- { +- enrollWnd.focus(); ++ ++ if(enrollWnd) { ++ enrollWnd.setTimeout("focus();",1500); + } + + } +diff -up ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js.fix20 ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js +--- ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js.fix20 2015-04-09 18:01:00.074082399 -0700 ++++ ./esc/src/app/xul/esc/defaults/preferences/esc-prefs.js 2015-04-09 18:03:45.160423403 -0700 +@@ -29,6 +29,10 @@ pref("esc.tps.message.timeout","90"); + + pref("esc.windows.do.capi","yes"); + ++#Do we allow card notifications? Default no. ++ ++pref("esc.allow.notifications", "yes"); ++ + + #Sample Security Officer Enrollment UI + diff --git a/esc-1.1.0-fix21.patch b/esc-1.1.0-fix21.patch new file mode 100644 index 0000000..2be5f75 --- /dev/null +++ b/esc-1.1.0-fix21.patch @@ -0,0 +1,21 @@ +diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix21 ./esc/src/app/xpcom/rhCoolKey.cpp +--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix21 2016-02-08 14:21:39.963531067 -0800 ++++ ./esc/src/app/xpcom/rhCoolKey.cpp 2016-02-08 14:22:04.811322599 -0800 +@@ -1237,7 +1237,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertN + char **array = NULL; + int num = nicknames.size(); + +- array = (char **) nsMemory::Alloc((sizeof(char *) *num)); ++ array = (char **) NS_Alloc((sizeof(char *) *num)); + + if(!array) + { +@@ -1291,7 +1291,7 @@ NS_IMETHODIMP rhCoolKey::GetAvailableCoo + return NS_OK; + } + +- array = (char **) nsMemory::Alloc((sizeof(char *) * numKeys)); ++ array = (char **) NS_Alloc((sizeof(char *) * numKeys)); + + if(!array) + { diff --git a/esc.spec b/esc.spec index 2394b64..d27b859 100644 --- a/esc.spec +++ b/esc.spec @@ -35,6 +35,8 @@ Patch16: esc-1.1.0-fix16.patch Patch17: esc-1.1.0-fix17.patch Patch18: esc-1.1.0-fix18.patch Patch19: esc-1.1.0-fix19.patch +Patch20: esc-1.1.0-fix20.patch +Patch21: esc-1.1.0-fix21.patch BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1 BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel @@ -71,7 +73,6 @@ AutoReqProv: 0 %define escxuldir src/app/xul/esc %define escxulchromeicons %{escxuldir}/chrome/icons/default %define escdaemon escd -%define geckoversion 30.0 Source0: http://pki.fedoraproject.org/pki/sources/%name/%{escname}.tar.bz2 Source1: http://pki.fedoraproject.org/pki/sources/%name/esc @@ -108,12 +109,17 @@ cryptographic smartcards. %patch17 -p1 -b .fix17 %patch18 -p1 -b .fix18 %patch19 -p1 -b .fix19 +%patch20 -p1 -b .fix20 +%patch21 -p1 -b .fix21 r=$(uname -r | sed -e 's/\(^[^.]*\.[^.]*\).*/\1/') [ -f esc/coreconf/Linux$r.mk ] || ln -s Linux3.5.mk esc/coreconf/Linux$r.mk %build +%define geckoversion `rpm -qi xulrunner | grep Version | sed 's/[\t ]//g;/^$/d' | sed 's/Version://'` + + GECKO_SDK_PATH=%{_libdir}/xulrunner-devel-%{geckoversion}/sdk GECKO_BIN_PATH=%{_libdir}/xulrunner GECKO_INCLUDE_PATH=%{_includedir}/xulrunner-%{geckoversion} @@ -180,6 +186,7 @@ cd %{_builddir} cp %{escname}/esc/LICENSE $RPM_BUILD_ROOT/%{docdir} rm -f $RPM_BUILD_ROOT/%{escdir}/esc +rm -rf $RPM_BUILD_ROOT/%{escdir}/xulrunner echo "xulrunner ./application.ini \$* &" > $RPM_BUILD_ROOT/%{escdir}/esc @@ -196,24 +203,19 @@ rm -rf $RPM_BUILD_ROOT %files %defattr(-,root,root,-) -%dir %{escdir} %{escdir}/esc %{escdir}/escd %{escbindir}/esc %{escdir}/application.ini %{escdir}/chrome.manifest -%dir %{escdir}/chrome %{escdir}/chrome/chrome.manifest -%{escdir}/chrome/content/ -%{escdir}/chrome/locale/ -%dir %{escdir}/chrome/icons -%{escdir}/chrome/icons/default/ -%{escdir}/components/ +%{escdir}/chrome/content +%{escdir}/chrome/locale +%{escdir}/chrome/icons/default +%{escdir}/components -%dir %{escdir}/defaults -%dir %{escdir}/defaults/preferences %{escdir}/defaults/preferences/esc-prefs.js #%{escdir}/xulrunner @@ -241,16 +243,11 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog -* Wed Feb 03 2016 Fedora Release Engineering - 1.1.0-29 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - -* Sat Dec 12 2015 Michael Schwendt - 1.1.0-28 -- Include several missing directories. -- BuildRequires nss-static for -lcrmf (#717241) - -* Wed Jun 17 2015 Fedora Release Engineering - 1.1.0-27 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild +* Mon Feb 08 2016 Jack Magne =1.1.0-29 +- Apease latest xullrunner api changes. +* Thu Apr 09 2015 Jack Magne =1.1.0-27 +- More xulrunner adjustments. * Sat Aug 16 2014 Fedora Release Engineering - 1.1.0-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From 61e6bb68f94f91530257a798319ff7a4dedb5b24 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Mon, 8 Feb 2016 16:36:06 -0800 Subject: [PATCH 10/47] Fixes to appeas xulrunners new logging api. --- esc-1.1.0-fix22.patch | 1124 +++++++++++++++++++++++++++++++++++++++++ esc.spec | 2 + 2 files changed, 1126 insertions(+) create mode 100644 esc-1.1.0-fix22.patch diff --git a/esc-1.1.0-fix22.patch b/esc-1.1.0-fix22.patch new file mode 100644 index 0000000..c27a924 --- /dev/null +++ b/esc-1.1.0-fix22.patch @@ -0,0 +1,1124 @@ +diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix22 ./esc/src/app/xpcom/rhCoolKey.cpp +--- ./esc/src/app/xpcom/rhCoolKey.cpp.fix22 2016-02-08 15:47:47.267977290 -0800 ++++ ./esc/src/app/xpcom/rhCoolKey.cpp 2016-02-08 16:23:44.573047791 -0800 +@@ -15,7 +15,7 @@ + * All rights reserved. + * END COPYRIGHT BLOCK **/ + +-#define FORCE_PR_LOG 1 ++#define FORCE_MOZ_LOG 1 + #define nsnull NULL + #include + #include "rhCoolKey.h" +@@ -23,6 +23,7 @@ + #include "nsMemory.h" + + #include "nsXPCOM.h" ++#include "mozilla/Logging.h" + #include "nsIComponentManager.h" + #include "nsIComponentRegistrar.h" + #ifdef XP_MACOSX +@@ -45,6 +46,7 @@ + #include + #include + ++using namespace mozilla; + + #define STRINGIFY(x) #x + #define GETSTRING(x) STRINGIFY(x) +@@ -115,7 +117,7 @@ class CoolKeyShutdownObserver : public n + CoolKeyShutdownObserver::~CoolKeyShutdownObserver() + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyShutdownObserver::~CoolKeyShutdownObserver \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s CoolKeyShutdownObserver::~CoolKeyShutdownObserver \n",GetTStamp(tBuff,56))); + } + + +@@ -127,7 +129,7 @@ class CoolKeyShutdownObserver : public n + char tBuff[56]; + if (!strcmp(aTopic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) + { +- PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyShutdownObserver::Observe shutting down",GetTStamp(tBuff,56))); ++ MOZ_LOG(coolKeyLog, LogLevel::Debug, ("%s CoolKeyShutdownObserver::Observe shutting down",GetTStamp(tBuff,56))); + if(single) + { + single->ShutDownInstance(); +@@ -171,7 +173,7 @@ public: + ~CoolKeyResultTask() { + + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s ~CoolKeyResultTask thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s ~CoolKeyResultTask thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + if (mKeyID) { + free(mKeyID); +@@ -204,7 +206,7 @@ public: + + char tBuff[56]; + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyResultTask::CoolKeyResultTask thread: %p keyID %s \n",GetTStamp(tBuff,56),PR_GetCurrentThread(),mKeyID)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s CoolKeyResultTask::CoolKeyResultTask thread: %p keyID %s \n",GetTStamp(tBuff,56),PR_GetCurrentThread(),mKeyID)); + + } + +@@ -213,7 +215,7 @@ public: + MOZ_ASSERT(NS_IsMainThread()); + + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyResultTask::Run thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s CoolKeyResultTask::Run thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + if (mListener != NULL) { + mListener->RhNotifyKeyStateChange(mKeyType, mKeyID, mKeyState, +@@ -244,7 +246,7 @@ rhCoolKey::rhCoolKey() + :mJsNotify(nsnull),mProxy(nsnull) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::rhCoolKey: %p \n",GetTStamp(tBuff,56),this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::rhCoolKey: %p \n",GetTStamp(tBuff,56),this)); + + if(!single) + { +@@ -263,14 +265,14 @@ rhCoolKey::rhCoolKey() + certCBLock = PR_NewLock(); + + if(!certCBLock) { +- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Failed to create lock exiting! \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s Failed to create lock exiting! \n",GetTStamp(tBuff,56))); + exit(1); + } + + eventLock = PR_NewLock(); + + if(!eventLock) { +- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Failed to create event lock exiting! \n", GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Error, ("%s Failed to create event lock exiting! \n", GetTStamp(tBuff,56))); + exit(1); + } + +@@ -279,7 +281,7 @@ rhCoolKey::rhCoolKey() + + if(res == PR_FALSE) + { +- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s ESC InitInstance failed,exiting. CoolKey instance %p\n",GetTStamp(tBuff,56),coolKey_instance)); ++ MOZ_LOG( coolKeyLog, LogLevel::Error, ("%s ESC InitInstance failed,exiting. CoolKey instance %p\n",GetTStamp(tBuff,56),coolKey_instance)); + exit(1); + } + +@@ -291,7 +293,7 @@ rhCoolKey::~rhCoolKey() + /* destructor code */ + + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::~rhCoolKey: %p \n",GetTStamp(tBuff,56),this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::~rhCoolKey: %p \n",GetTStamp(tBuff,56),this)); + + if(certCBLock) { + PR_DestroyLock(certCBLock); +@@ -305,11 +307,11 @@ rhCoolKey::~rhCoolKey() + void rhCoolKey::ShutDownInstance() + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ShutDownInstance. %p \n",GetTStamp(tBuff,56),this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ShutDownInstance. %p \n",GetTStamp(tBuff,56),this)); + + if (mProxy) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ShutDownInstance: About to dereference Proxy Object. Proxy %p \n",GetTStamp(tBuff,56),mProxy)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ShutDownInstance: About to dereference Proxy Object. Proxy %p \n",GetTStamp(tBuff,56),mProxy)); + + CoolKeyUnregisterListener(mProxy); + +@@ -338,7 +340,7 @@ HRESULT rhCoolKey::Dispatch( rhICoolKey + char tBuff[56]; + + PR_Lock(eventLock); +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::Dispatch: thead: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::Dispatch: thead: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + nsCOMPtr result = new CoolKeyResultTask(keyType, keyID,keyState, data, strData, listener); + + NS_DispatchToMainThread(result); +@@ -448,7 +450,7 @@ SECStatus rhCoolKey::badCertHandler(void + return secStatus; + } + +- PR_LOG(coolKeyLog, PR_LOG_DEBUG, ++ MOZ_LOG(coolKeyLog, LogLevel::Debug, + ("%s rhCoolKey::badCertHandler enter: error: %d url: %s port: %d \n", + GetTStamp(tBuff,56),err,host,port) + ); +@@ -474,7 +476,7 @@ SECStatus rhCoolKey::badCertHandler(void + &isTemporaryOverride,&overrideResult + ); + if(nsrv == NS_OK) { +- PR_LOG(coolKeyLog, PR_LOG_DEBUG, ++ MOZ_LOG(coolKeyLog, LogLevel::Debug, + ("%s rhCoolKey::badCertHandler res %d print %s len %d bits %u temp %d alg: %s \n", + GetTStamp(tBuff,56),overrideResult,fingerPrint.get(), + fingerPrint.Length(),overrideBits, isTemporaryOverride,hashAlg.get()) +@@ -530,7 +532,7 @@ SECStatus rhCoolKey::badCertHandler(void + if(!PL_strcmp(formattedPrint, inputPrint)) + certMatches = PR_TRUE; + } +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s certMatches: %d \n", ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s certMatches: %d \n", + GetTStamp(tBuff,56),certMatches) + ); + +@@ -539,7 +541,7 @@ SECStatus rhCoolKey::badCertHandler(void + formattedPrint = NULL; + } + } else { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s override test failed. \n", ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s override test failed. \n", + GetTStamp(tBuff,56)) + ); + } +@@ -622,7 +624,7 @@ PRBool rhCoolKey::InitInstance() + char tBuff[56]; + PRBool ret = PR_TRUE; + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InitInstance %p \n",GetTStamp(tBuff,56),this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::InitInstance %p \n",GetTStamp(tBuff,56),this)); + + nssComponent + = do_GetService(PSM_COMPONENT_CONTRACTID); +@@ -637,7 +639,7 @@ PRBool rhCoolKey::InitInstance() + } + else + { +- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Can't create Proxy Object for ESC. \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s Can't create Proxy Object for ESC. \n",GetTStamp(tBuff,56))); + } + + #ifdef XP_WIN32 +@@ -691,7 +693,7 @@ PRBool rhCoolKey::InitInstance() + + observerService->AddObserver(observer, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_FALSE); + } else { +- PR_LOG(coolKeyLog,PR_LOG_ERROR,("%s Could not get an observer service. We will leak on shutdown.",GetTStamp(tBuff,56))); ++ MOZ_LOG(coolKeyLog,LogLevel::Error,("%s Could not get an observer service. We will leak on shutdown.",GetTStamp(tBuff,56))); + } + + return ret; +@@ -707,12 +709,12 @@ rhICoolKey* rhCoolKey::CreateProxyObject + CoolKeyNode* rhCoolKey::GetCoolKeyInfo(unsigned long aKeyType, const char * aKeyID) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyInfo: gASCAvailableKeys %p looking for key %s type %d \n",GetTStamp(tBuff,56),&gASCAvailableKeys,aKeyID,aKeyType)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyInfo: gASCAvailableKeys %p looking for key %s type %d \n",GetTStamp(tBuff,56),&gASCAvailableKeys,aKeyID,aKeyType)); + + std::list::const_iterator it; + for(it=gASCAvailableKeys.begin(); it!=gASCAvailableKeys.end(); ++it) { + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyInfo: current key %s type %d, looking for key %s type %d \n",GetTStamp(tBuff,56),(*it)->mKeyID.get(),(*it)->mKeyType,aKeyID,aKeyType)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyInfo: current key %s type %d, looking for key %s type %d \n",GetTStamp(tBuff,56),(*it)->mKeyID.get(),(*it)->mKeyType,aKeyID,aKeyType)); + + if ((*it)->mKeyType == aKeyType && !strcmp((*it)->mKeyID.get(), aKeyID)) + return *it; +@@ -726,7 +728,7 @@ CoolKeyNode* rhCoolKey::GetCoolKeyInfo(u + PRBool rhCoolKey::ASCCoolKeyIsAvailable(unsigned long aKeyType, char * aKeyID) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCCoolKeyIsAvailable type %d id %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ASCCoolKeyIsAvailable type %d id %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID)); + return GetCoolKeyInfo(aKeyType, aKeyID) ? PR_TRUE : PR_FALSE; + } + +@@ -735,7 +737,7 @@ HRESULT rhCoolKey::ASCGetAvailableCoolK + nsEmbedCString *aKeyID) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCGetAvailableCoolKeyAt: index %d type %d id %s \n",GetTStamp(tBuff,56),aIndex,aKeyType,aKeyID)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ASCGetAvailableCoolKeyAt: index %d type %d id %s \n",GetTStamp(tBuff,56),aIndex,aKeyType,aKeyID)); + if (!aKeyType || !aKeyID) + return E_FAIL; + +@@ -762,7 +764,7 @@ int rhCoolKey::ASCGetNumAvailableCoolK + { + char tBuff[56]; + int size = (int) gASCAvailableKeys.size(); +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCGetNumAvailableCoolKeys %d \n",GetTStamp(tBuff,56),size)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ASCGetNumAvailableCoolKeys %d \n",GetTStamp(tBuff,56),size)); + return size; + + } +@@ -776,21 +778,21 @@ int rhCoolKey::GetNotifyKeyListenerListS + rhIKeyNotify* rhCoolKey::GetNotifyKeyListener(rhIKeyNotify *listener){ + + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: %p size %d \n",GetTStamp(tBuff,56),listener,gNotifyListeners.size() )); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetNotifyKeyListener: %p size %d \n",GetTStamp(tBuff,56),listener,gNotifyListeners.size() )); + + std::list >::const_iterator it; + for(it=gNotifyListeners.begin(); it!=gNotifyListeners.end(); ++it) { + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: cur %p looking for %p \n",GetTStamp(tBuff,56),(*it).get(),listener)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetNotifyKeyListener: cur %p looking for %p \n",GetTStamp(tBuff,56),(*it).get(),listener)); + + if((*it) == listener) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning %p \n",GetTStamp(tBuff,56),listener,(*it).get())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning %p \n",GetTStamp(tBuff,56),listener,(*it).get())); + return (*it); + } + } + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",GetTStamp(tBuff,56),listener)); + + return nsnull; + } +@@ -798,11 +800,11 @@ rhIKeyNotify* rhCoolKey::GetNotifyKeyLis + void rhCoolKey::AddNotifyKeyListener(rhIKeyNotify *listener) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::AddNotifyKeyListener: %p \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::AddNotifyKeyListener: %p \n",GetTStamp(tBuff,56),listener)); + + if(GetNotifyKeyListener(listener )) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::AddNotifyKeyListener: %p listener already in list. \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::AddNotifyKeyListener: %p listener already in list. \n",GetTStamp(tBuff,56),listener)); + + return ; + } +@@ -813,11 +815,11 @@ void rhCoolKey::AddNotifyKeyListener(rhI + void rhCoolKey::RemoveNotifyKeyListener(rhIKeyNotify *listener) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RemoveNotifyKeyListener: %p \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RemoveNotifyKeyListener: %p \n",GetTStamp(tBuff,56),listener)); + + if(!GetNotifyKeyListener(listener )) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RemoveNotifyKeyListener: %p trying to remove listener not in list \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RemoveNotifyKeyListener: %p trying to remove listener not in list \n",GetTStamp(tBuff,56),listener)); + + return ; + } +@@ -830,7 +832,7 @@ void rhCoolKey::RemoveNotifyKeyListener( + void rhCoolKey::ClearNotifyKeyList() + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ClearNotifyKeyList: \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ClearNotifyKeyList: \n",GetTStamp(tBuff,56))); + + while (gNotifyListeners.size() > 0) { + rhIKeyNotify * node = (gNotifyListeners.front()).get(); +@@ -845,10 +847,10 @@ void rhCoolKey::ClearNotifyKeyList() + void rhCoolKey::InsertKeyIntoAvailableList(unsigned long aKeyType, const char * aKeyID,CoolKeyStatus aStatus) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InsertKeyIntoAvailableList: \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::InsertKeyIntoAvailableList: \n",GetTStamp(tBuff,56))); + if (ASCCoolKeyIsAvailable(aKeyType, (char *)aKeyID)) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InsertKeyIntoAvailableList: Key Not Available \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::InsertKeyIntoAvailableList: Key Not Available \n",GetTStamp(tBuff,56))); + + return; + } +@@ -857,7 +859,7 @@ void rhCoolKey::InsertKeyIntoAvailableLi + + if (!node) + { +- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Can't create new CoolKey Data Structure. \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Error, ("%s Can't create new CoolKey Data Structure. \n",GetTStamp(tBuff,56))); + return; + } + +@@ -868,7 +870,7 @@ void rhCoolKey::InsertKeyIntoAvailableLi + void rhCoolKey::RemoveKeyFromAvailableList(unsigned long aKeyType, const char * aKeyID) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RemoveKeyFromAvailableList type %d id %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RemoveKeyFromAvailableList type %d id %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID)); + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + + if (!node) +@@ -881,7 +883,7 @@ void rhCoolKey::RemoveKeyFromAvailableLi + void rhCoolKey::ClearAvailableList() + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ClearAvailableList \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ClearAvailableList \n",GetTStamp(tBuff,56))); + while (gASCAvailableKeys.size() > 0) { + CoolKeyNode *node = gASCAvailableKeys.front(); + delete node; +@@ -892,7 +894,7 @@ void rhCoolKey::ClearAvailableList() + HRESULT rhCoolKey::ASCSetCoolKeyPin(unsigned long aKeyType, const char * aKeyID, const char * aPin) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::ASCSetCoolKeyPin type %d id %s pin %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID,aPin)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::ASCSetCoolKeyPin type %d id %s pin %s \n",GetTStamp(tBuff,56),aKeyType,aKeyID,aPin)); + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + if (!node) + return E_FAIL; +@@ -906,7 +908,7 @@ HRESULT rhCoolKey::ASCSetCoolKeyPin(unsi + NS_IMETHODIMP rhCoolKey::RhNotifyKeyStateChange(PRUint32 aKeyType,const char *aKeyID, PRUint32 aKeyState, PRUint32 aData,const char* strData) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhNotifyKeyStateChange: id: %s type: %d state %d data: %d \n",GetTStamp(tBuff,56),aKeyID,aKeyType, aKeyState,aData)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhNotifyKeyStateChange: id: %s type: %d state %d data: %d \n",GetTStamp(tBuff,56),aKeyID,aKeyType, aKeyState,aData)); + + CoolKeyNode tempKey(aKeyType, aKeyID,(CoolKeyStatus) aKeyState); + CoolKeyNode *node = NULL; +@@ -924,12 +926,12 @@ NS_IMETHODIMP rhCoolKey::RhNotifyKeyStat + if (CoolKeyIsEnrolled(&key)) + keyStatus = eAKS_Available; else if (CoolKeyHasApplet(&key)) keyStatus = eAKS_Uninitialized; + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Key Inserted. ID %s \n",GetTStamp(tBuff,56),aKeyID)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s Key Inserted. ID %s \n",GetTStamp(tBuff,56),aKeyID)); + InsertKeyIntoAvailableList(tempKey.mKeyType,aKeyID ,(CoolKeyStatus) keyStatus); + break; + } + case eCKState_KeyRemoved: +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Key Removed. ID %s \n",GetTStamp(tBuff,56),aKeyID)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s Key Removed. ID %s \n",GetTStamp(tBuff,56),aKeyID)); + RemoveKeyFromAvailableList(tempKey.mKeyType, aKeyID); + break; + case eCKState_EnrollmentComplete: +@@ -968,7 +970,7 @@ NS_IMETHODIMP rhCoolKey::RhNotifyKeyStat + + ((rhIKeyNotify *) (*it))->RhNotifyKeyStateChange(aKeyType,aKeyID,aKeyState,aData,strData); + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhNotifyKeyStateChange after call to RhNotifyKeyStateChange listener: %p",GetTStamp(tBuff,56),(*it).get())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhNotifyKeyStateChange after call to RhNotifyKeyStateChange listener: %p",GetTStamp(tBuff,56),(*it).get())); + + } + +@@ -978,15 +980,15 @@ NS_IMETHODIMP rhCoolKey::RhNotifyKeyStat + NS_IMETHODIMP rhCoolKey::RhCoolKeyUnSetNotifyCallback(rhIKeyNotify *jsNotify) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p \n",GetTStamp(tBuff,56),jsNotify,this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p \n",GetTStamp(tBuff,56),jsNotify,this)); + + RemoveNotifyKeyListener(jsNotify); + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: removed listener, size now %d \n",GetTStamp(tBuff,56),GetNotifyKeyListenerListSize())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: removed listener, size now %d \n",GetTStamp(tBuff,56),GetNotifyKeyListenerListSize())); + + if(GetNotifyKeyListenerListSize() == 0) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p Listener size 0. \n",GetTStamp(tBuff,56),jsNotify,this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCoolKeyUnSetNotifyCallback Object: input %p this %p Listener size 0. \n",GetTStamp(tBuff,56),jsNotify,this)); + } + + return NS_OK; +@@ -995,7 +997,7 @@ NS_IMETHODIMP rhCoolKey::RhCoolKeyUnSetN + NS_IMETHODIMP rhCoolKey::RhCoolKeySetNotifyCallback(rhIKeyNotify *jsNotify) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeySetNotifyCallback Object: %p this %p\n",GetTStamp(tBuff,56),jsNotify,this)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCoolKeySetNotifyCallback Object: %p this %p\n",GetTStamp(tBuff,56),jsNotify,this)); + + AddNotifyKeyListener(jsNotify); + +@@ -1012,14 +1014,14 @@ NS_IMETHODIMP rhCoolKey::CoolKeyInitiali + } + + /* void CoolKeyLogMsg (in unsigned long aLogLevel, in string aMessage); */ +-NS_IMETHODIMP rhCoolKey::CoolKeyLogMsg(PRUint32 aLogLevel, const char *aMessage) ++NS_IMETHODIMP rhCoolKey::CoolKeyLogMsg(unsigned int aLogLevel, const char *aMessage) + { + char tBuff[56]; + +- if(aMessage && ((PRLogModuleLevel) aLogLevel >= PR_LOG_NONE && aLogLevel <= PR_LOG_MAX)) ++ if(aMessage ) + { +- ::CoolKeyLogMsg((PRLogModuleLevel) aLogLevel, "%s %s \n",GetTStamp(tBuff,56),aMessage); +- PR_LOG( coolKeyLog, (PRLogModuleLevel) aLogLevel, ("%s %s",GetTStamp(tBuff,56),aMessage)); ++ ///::CoolKeyLogMsg(Level, "%s %s \n",GetTStamp(tBuff,56),aMessage); ++ MOZ_LOG( coolKeyLog, LogLevel::Error, ("%s %s",GetTStamp(tBuff,56),aMessage)); + } + + return NS_OK; +@@ -1028,13 +1030,13 @@ NS_IMETHODIMP rhCoolKey::CoolKeyLogMsg(P + NS_IMETHODIMP rhCoolKey::BlinkCoolKey(PRUint32 aKeyType, const char *aKeyID, PRUint32 aRate, PRUint32 aDuration) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhBlinkCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhBlinkCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + + if (!node) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhBlinkCoolKey: GetCoolKeyInfo failed. \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhBlinkCoolKey: GetCoolKeyInfo failed. \n",GetTStamp(tBuff,56))); + return NS_ERROR_FAILURE; + } + +@@ -1062,7 +1064,7 @@ NS_IMETHODIMP rhCoolKey::EnrollCoolKey(P + { + + char tBuff[56]; +- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Enroll Key ,ID: %s \n",GetTStamp(tBuff,56),aKeyID); ++ ::CoolKeyLogMsg(1, "%s Attempting to Enroll Key ,ID: %s \n",GetTStamp(tBuff,56),aKeyID); + + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + +@@ -1094,12 +1096,12 @@ NS_IMETHODIMP rhCoolKey::EnrollCoolKey(P + NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN(PRUint32 aKeyType, const char *aKeyID, const char *aScreenName, const char *aPIN, const char *aScreenNamePwd) + { + char tBuff[56]; +- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Reset Key Password, ID: %s \n",GetTStamp(tBuff,56),aKeyID); ++ ::CoolKeyLogMsg( 1, "%s Attempting to Reset Key Password, ID: %s \n",GetTStamp(tBuff,56),aKeyID); + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + + if (!node) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhResetCoolKeyPIN no node: thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhResetCoolKeyPIN no node: thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + return NS_ERROR_FAILURE; + } + +@@ -1114,7 +1116,7 @@ NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN + + if (node->mStatus != eAKS_Available) + { +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhResetCoolKeyPIN thread: token unavailable %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhResetCoolKeyPIN thread: token unavailable %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + return NS_ERROR_FAILURE; + } + +@@ -1136,7 +1138,7 @@ NS_IMETHODIMP rhCoolKey::ResetCoolKeyPIN + NS_IMETHODIMP rhCoolKey::RenewCoolKey(PRUint32 aKeyType, const char *aKeyID) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s rhCoolKey::RhRenewCoolKey (not implemented) thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Error, ("%s rhCoolKey::RhRenewCoolKey (not implemented) thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + return NS_ERROR_NOT_IMPLEMENTED; + } + +@@ -1145,7 +1147,7 @@ NS_IMETHODIMP rhCoolKey::RenewCoolKey(PR + NS_IMETHODIMP rhCoolKey::FormatCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aEnrollmentType, const char *aScreenName, const char *aPIN, const char *aScreenNamePWord, const char *aTokenCode) + { + char tBuff[56]; +- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to Format Key, ID: %s. ",GetTStamp(tBuff,56),aKeyID); ++ ::CoolKeyLogMsg( 1, "%s Attempting to Format Key, ID: %s. ",GetTStamp(tBuff,56),aKeyID); + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + + if (!node) +@@ -1193,7 +1195,7 @@ NS_IMETHODIMP rhCoolKey::CancelCoolKeyOp + if (!node) + return NS_ERROR_FAILURE; + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCancelCoolKeyOperation type %d id %s status %d: \n",GetTStamp(tBuff,56),aKeyType,aKeyID,node->mStatus)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCancelCoolKeyOperation type %d id %s status %d: \n",GetTStamp(tBuff,56),aKeyType,aKeyID,node->mStatus)); + + // If the key isn't busy, then there's nothing to do. + +@@ -1250,7 +1252,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertN + { + char *tName = (char *) (*i).c_str(); + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyCertNicknames name %s \n",GetTStamp(tBuff,56),tName)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyCertNicknames name %s \n",GetTStamp(tBuff,56),tName)); + + array[j] = NULL; + if(tName) +@@ -1273,7 +1275,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertN + NS_IMETHODIMP rhCoolKey::GetAvailableCoolKeys(PRUint32 *count, char ***str) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetAvailableCoolKeys thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhGetAvailableCoolKeys thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + if(!count || !str) + { +@@ -1284,7 +1286,7 @@ NS_IMETHODIMP rhCoolKey::GetAvailableCoo + + long numKeys = ASCGetNumAvailableCoolKeys(); + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get number of keys. Value: %d \n",GetTStamp(tBuff,56),numKeys)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s Attempting to get number of keys. Value: %d \n",GetTStamp(tBuff,56),numKeys)); + + if(numKeys == 0) + { +@@ -1334,7 +1336,7 @@ NS_IMETHODIMP rhCoolKey::GetAvailableCoo + NS_IMETHODIMP rhCoolKey::GetCoolKeyStatus(PRUint32 aKeyType, const char *aKeyID, PRUint32 *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyStatus thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhGetCoolKeyStatus thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + + if(node) +@@ -1346,7 +1348,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyStatu + *_retval = eAKS_Unavailable; + } + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyStatus retval: %d \n",GetTStamp(tBuff,56),*_retval)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhGetCoolKeyStatus retval: %d \n",GetTStamp(tBuff,56),*_retval)); + + return NS_OK; + } +@@ -1358,13 +1360,13 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyStatu + NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, bool *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + if (aKeyType && aKeyID && ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) { + if (aKeyID) { + AutoCoolKey key(aKeyType, aKeyID); + PRBool isCool = CoolKeyIsReallyCoolKey(&key); +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey isCool: %d \n",GetTStamp(tBuff,56),(int) isCool)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey isCool: %d \n",GetTStamp(tBuff,56),(int) isCool)); + *_retval= isCool; + return NS_OK; + } +@@ -1377,7 +1379,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIsRea + NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID, bool aIsMajor, PRInt32 *_retval) + { + char tBuff[56]; +- PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyAppletVer thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG(coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyAppletVer thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + AutoCoolKey key(aKeyType, aKeyID); + +@@ -1393,7 +1395,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAp + NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID, bool *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyIsEnrolled thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCoolKeyIsEnrolled thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + if (ASCCoolKeyIsAvailable(aKeyType, (char *) aKeyID)) { + + if (aKeyID) { +@@ -1416,7 +1418,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertI + string certInfo = ""; + *aCertInfo = NULL; + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyCertInfo thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyCertInfo thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + AutoCoolKey key(aKeyType, aKeyID); + +@@ -1441,7 +1443,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertI + AutoCoolKey key(aKeyType, aKeyID); + char atr[128]; + HRESULT res = CoolKeyGetATR(&key, (char *)&atr,sizeof(atr)); +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s Attempting to get the key's ATR: Key: %s, ATR %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) atr)); + if(res == S_OK) + { + char *temp = (char *) nsMemory::Clone(atr,sizeof(char) * strlen((char *)atr) + 1); +@@ -1466,7 +1468,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertI + + tokenName = (char *) CoolKeyGetTokenName(&key); + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyTokenName %s \n",GetTStamp(tBuff,56),tokenName)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyTokenName %s \n",GetTStamp(tBuff,56),tokenName)); + if(tokenName) + { + char *temp = (char *) nsMemory::Clone(tokenName,sizeof(char) * strlen((char *)tokenName) + 1); +@@ -1489,7 +1491,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertI + + HRESULT res = CoolKeyGetIssuerInfo(&key, (char *)&issuerInfo,256); + +- ::CoolKeyLogMsg( PR_LOG_ALWAYS, "%s Attempting to get the key's Issuer: Key: %s, Issuer %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) issuerInfo); ++ ::CoolKeyLogMsg( 1, "%s Attempting to get the key's Issuer: Key: %s, Issuer %s. \n",GetTStamp(tBuff,56),aKeyID, (char *) issuerInfo); + + if(res == S_OK) + { +@@ -1505,7 +1507,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyCertI + NS_IMETHODIMP rhCoolKey::GetCoolKeyPolicy(PRUint32 aKeyType, const char *aKeyID, char **policy) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyPolicy thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhGetCoolKeyPolicy thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + if (!aKeyID) { + return NS_ERROR_FAILURE; +@@ -1517,14 +1519,14 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyPolic + AutoCoolKey key(aKeyType, aKeyID); + HRESULT hres = CoolKeyGetPolicy(&key, policyChar, MAX_STR_LEN); + +- PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyPolicy hres: %d \n",GetTStamp(tBuff,56),hres)); ++ MOZ_LOG(coolKeyLog,LogLevel::Debug,("%s rhCoolKey::RhGetCoolKeyPolicy hres: %d \n",GetTStamp(tBuff,56),hres)); + if (hres == E_FAIL) + { + return NS_ERROR_FAILURE; + + } + +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyPolicy policy: %s \n",GetTStamp(tBuff,56),policyChar)); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhGetCoolKeyPolicy policy: %s \n",GetTStamp(tBuff,56),policyChar)); + + char *temp = (char *) nsMemory::Clone(policyChar,sizeof(char) * strlen(policyChar) + 1); + +@@ -1554,7 +1556,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyUID(P + return NS_OK; + } + +- PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetUID %s \n",GetTStamp(tBuff,56),(char *) buff)); ++ MOZ_LOG(coolKeyLog,LogLevel::Debug,("%s rhCoolKey::RhGetCoolKeyGetUID %s \n",GetTStamp(tBuff,56),(char *) buff)); + + char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1); + +@@ -1588,7 +1590,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssue + return NS_OK; + } + +- PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuedTo %s \n",GetTStamp(tBuff,56),(char *) buff)); ++ MOZ_LOG(coolKeyLog,LogLevel::Debug,("%s rhCoolKey::RhGetCoolKeyGetIssuedTo %s \n",GetTStamp(tBuff,56),(char *) buff)); + + char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1); + +@@ -1621,7 +1623,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssue + return NS_OK; + } + +- PR_LOG(coolKeyLog,PR_LOG_DEBUG,("%s rhCoolKey::RhGetCoolKeyGetIssuer %s \n",GetTStamp(tBuff,56),(char *) buff)); ++ MOZ_LOG(coolKeyLog,LogLevel::Debug,("%s rhCoolKey::RhGetCoolKeyGetIssuer %s \n",GetTStamp(tBuff,56),(char *) buff)); + + char *temp = (char *) nsMemory::Clone(buff,sizeof(char) * strlen(buff) + 1); + +@@ -1635,7 +1637,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssue + NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, bool *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::SetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("rhCoolKey::SetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + if(!aName || !aValue) + { + *_retval = 0; +@@ -1651,7 +1653,7 @@ NS_IMETHODIMP rhCoolKey::SetCoolKeyConfi + NS_IMETHODIMP rhCoolKey::GetCoolKeyConfigValue(const char *aName, char **_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + + if(!aName) + { +@@ -1669,7 +1671,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyConfi + NS_IMETHODIMP rhCoolKey::GetCoolKeyRequiresAuthentication(PRUint32 aKeyType, const char *aKeyID, bool *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyRequiresAuthentication thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhCoolKeyRequiresAuthentication thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + PRBool requiresAuth = PR_FALSE; + + *_retval = PR_TRUE; +@@ -1689,7 +1691,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyRequi + NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAuthenticated(PRUint32 aKeyType, const char *aKeyID, bool *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyIsAuthenticated thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhGetCoolKeyIsAuthenticated thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + PRBool isAuthed = PR_FALSE; + + *_retval = PR_TRUE; +@@ -1709,7 +1711,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAut + NS_IMETHODIMP rhCoolKey::AuthenticateCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aPIN, bool *_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhAuthenticateCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::RhAuthenticateCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); + *_retval = PR_FALSE; + + if(!aKeyID || !aPIN) +@@ -1734,7 +1736,7 @@ NS_IMETHODIMP rhCoolKey::AuthenticateCoo + NS_IMETHODIMP rhCoolKey::SetCoolKeyDataValue(PRUint32 aKeyType, const char *aKeyID, const char *name, const char *value) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::SetCoolKeyDataValue \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::SetCoolKeyDataValue \n",GetTStamp(tBuff,56))); + CoolKeyNode *node = GetCoolKeyInfo(aKeyType, aKeyID); + + if (!node) +@@ -1751,7 +1753,7 @@ NS_IMETHODIMP rhCoolKey::SetCoolKeyDataV + NS_IMETHODIMP rhCoolKey::GetCoolKeyVersion(char **_retval) + { + char tBuff[56]; +- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyVersion \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( coolKeyLog, LogLevel::Debug, ("%s rhCoolKey::GetCoolKeyVersion \n",GetTStamp(tBuff,56))); + + char *version = (char *) GETSTRING(ESC_VERSION); + +diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix22 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp +--- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix22 2016-02-08 15:39:12.496938735 -0800 ++++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2016-02-08 16:31:09.875529737 -0800 +@@ -24,11 +24,13 @@ + #include "nsIStringBundle.h" + #include + #include ++#include "mozilla/Logging.h" + + #define RH_COOLKEY_TRAY_CONTRACTID "@redhat.com/rhTray;1" + + static const nsCID kCoolKeyTrayCID = RH_TRAY_CID; + ++using namespace mozilla; + + GtkWidget* rhTray::mWnd = NULL; + GtkWidget* rhTray::mIconMenu = NULL; +@@ -84,7 +86,7 @@ static void popup_position(GtkMenu *menu + &px, + &py); + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s popup_position width %d height %d px %d py %d *x %d *y %d screen_w %d screen_h %d \n",GetTStamp(tBuff,56),width,height,px,py,*x,*y,screen_width, screen_height)); ++ //MOZ_LOG( trayLog, LogLevel::Debug, ("%s popup_position width %d height %d px %d py %d *x %d *y %d screen_w %d screen_h %d \n",GetTStamp(tBuff,56),width,height,px,py,*x,*y,screen_width, screen_height)); + + // Are we close to the bottom of the screen? + +@@ -115,7 +117,7 @@ rhTray::~rhTray() + { + + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::~rhTray\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::~rhTray\n",GetTStamp(tBuff,56))); + + + Cleanup(); +@@ -126,7 +128,7 @@ NS_IMETHODIMP rhTray::Setwindnotifycallb + { + + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Setwindnotifycallback\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Setwindnotifycallback\n",GetTStamp(tBuff,56))); + + if(jsNotify) + AddTrayWindNotifyListener(jsNotify); +@@ -140,7 +142,7 @@ NS_IMETHODIMP rhTray::Unsetwindnotifycal + { + char tBuff[56]; + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Unsetwindnotifycallback\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Unsetwindnotifycallback\n",GetTStamp(tBuff,56))); + + if(jsNotify) + RemoveTrayWindNotifyListener(jsNotify); +@@ -157,10 +159,10 @@ NS_IMETHODIMP rhTray::Add(nsIBaseWindow + return NS_ERROR_FAILURE; + } + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Add %p \n",GetTStamp(tBuff,56),aWindow)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Add %p \n",GetTStamp(tBuff,56),aWindow)); + HRESULT res = Initialize(); + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Add Initialize res %d \n",GetTStamp(tBuff,56),res)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Add Initialize res %d \n",GetTStamp(tBuff,56),res)); + + if(res != S_OK) + { +@@ -179,7 +181,7 @@ NS_IMETHODIMP rhTray::Add(nsIBaseWindow + NS_IMETHODIMP rhTray::Remove(nsIBaseWindow *aWindow) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Remove window %p \n",GetTStamp(tBuff,56),aWindow)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Remove window %p \n",GetTStamp(tBuff,56),aWindow)); + + if(!aWindow) + return NS_OK; +@@ -284,14 +286,14 @@ NS_IMETHODIMP rhTray::Showicon(void) + HRESULT rhTray::Initialize() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Initialize entering... mInitialized: %d \n",GetTStamp(tBuff,56),mInitialized)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Initialize entering... mInitialized: %d \n",GetTStamp(tBuff,56),mInitialized)); + + if(mInitialized) + { + return S_OK; + } + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Initialize \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Initialize \n",GetTStamp(tBuff,56))); + g_set_print_handler(rhTray::TrayPrintHandler); + notify_icon_create_with_image_file((char *)COOLKEY_ICON); + +@@ -312,7 +314,7 @@ HRESULT rhTray::Initialize() + + res = CreateEventWindow(); + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Initialize result of CreateIconMenu %d \n",GetTStamp(tBuff,56),res)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Initialize result of CreateIconMenu %d \n",GetTStamp(tBuff,56),res)); + + if(res != S_OK) + { +@@ -332,7 +334,7 @@ HRESULT rhTray::RemoveIcon() + HRESULT rhTray::Cleanup() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Cleanup.\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Cleanup.\n",GetTStamp(tBuff,56))); + + RemoveAllListeners(); + DestroyEventWindow(); +@@ -344,7 +346,7 @@ HRESULT rhTray::Cleanup() + void rhTray::ShowAllListeners() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::ShowAllListeners.\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::ShowAllListeners.\n",GetTStamp(tBuff,56))); + map< nsIBaseWindow *, rhTrayWindowListener *>::iterator i; + + rhTrayWindowListener *cur = NULL; +@@ -363,7 +365,7 @@ void rhTray::ShowAllListeners() + void rhTray::HideAllListeners() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::HideAllListeners.\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::HideAllListeners.\n",GetTStamp(tBuff,56))); + + map< nsIBaseWindow *, rhTrayWindowListener *>::iterator i; + +@@ -383,7 +385,7 @@ void rhTray::HideAllListeners() + HRESULT rhTray::DestroyEventWindow() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::DestroyEventWindow \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::DestroyEventWindow \n",GetTStamp(tBuff,56))); + + rhTray::mWnd = 0; + return S_OK; +@@ -392,7 +394,7 @@ HRESULT rhTray::DestroyEventWindow() + void rhTray::IconMenuCBProc(GtkWidget *widget, gpointer data) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::IconMenuCBProc data %s \n",GetTStamp(tBuff,56),data)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::IconMenuCBProc data %s \n",GetTStamp(tBuff,56),data)); + + if(!strcmp((char *)data,"icon.min")) + { +@@ -414,7 +416,7 @@ void rhTray::IconMenuCBProc(GtkWidget *w + HRESULT rhTray::CreateIconMenu() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::CreateIconMenu \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::CreateIconMenu \n",GetTStamp(tBuff,56))); + + if(mIconMenu) + return E_FAIL; +@@ -462,7 +464,7 @@ HRESULT rhTray::CreateIconMenu() + void rhTray::IconCBProc(GtkWidget *button, GdkEventButton *event, void *data) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::IconCBProc \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::IconCBProc \n",GetTStamp(tBuff,56))); + + if(event->type != GDK_BUTTON_PRESS) + { +@@ -471,7 +473,7 @@ void rhTray::IconCBProc(GtkWidget *butto + + if(event->button == 1) + { +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::IconCBProc Clicked!\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::IconCBProc Clicked!\n",GetTStamp(tBuff,56))); + + NotifyTrayWindListeners(MENU_EVT,MENU_SHOW); + rhTray::ShowAllListeners(); +@@ -500,7 +502,7 @@ void rhTray::IconCBProc(GtkWidget *butto + HRESULT rhTray::CreateEventWindow() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::CreateEventWindow \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::CreateEventWindow \n",GetTStamp(tBuff,56))); + + HRESULT res = CreateIconMenu(); + return res; +@@ -511,7 +513,7 @@ HRESULT rhTray::AddListener(nsIBaseWindo + char tBuff[56]; + nsresult rv; + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddListener %p \n",GetTStamp(tBuff,56),aWindow)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddListener %p \n",GetTStamp(tBuff,56),aWindow)); + //NS_ENSURE_ARG(aWindow); + + nativeWindow aNativeWindow; +@@ -527,7 +529,7 @@ HRESULT rhTray::AddListener(nsIBaseWindo + + gdk_window_get_user_data (gWnd,(void **)&hWnd); + +- PR_LOG(trayLog,PR_LOG_DEBUG, ("%s rhTray::AddListener is widget %p .\n",GetTStamp(tBuff,56),hWnd)); ++ MOZ_LOG(trayLog,LogLevel::Debug, ("%s rhTray::AddListener is widget %p .\n",GetTStamp(tBuff,56),hWnd)); + if(!hWnd) + { + return E_FAIL; +@@ -540,20 +542,20 @@ HRESULT rhTray::AddListener(nsIBaseWindo + + if(already) + { +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddWindowListener Window already registered %p \n",GetTStamp(tBuff,56),aWindow)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddWindowListener Window already registered %p \n",GetTStamp(tBuff,56),aWindow)); + return S_OK; + + } + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddWindowListener current level widget %p \n",GetTStamp(tBuff,56),hWnd)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddWindowListener current level widget %p \n",GetTStamp(tBuff,56),hWnd)); + + hWnd = gtk_widget_get_toplevel( hWnd); + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddWindowListener top level widget %p \n",GetTStamp(tBuff,56),hWnd)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddWindowListener top level widget %p \n",GetTStamp(tBuff,56),hWnd)); + + if (GTK_WIDGET_TOPLEVEL (hWnd)) + { +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddWindowListener is really a top level widget %p \n",GetTStamp(tBuff,56),hWnd)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddWindowListener is really a top level widget %p \n",GetTStamp(tBuff,56),hWnd)); + } + rhTrayWindowListener *create = new rhTrayWindowListener(hWnd); + +@@ -582,7 +584,7 @@ HRESULT rhTray::ShowPopupMenu () + HRESULT rhTray::RemoveListener(nsIBaseWindow *aBaseWindow) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::RemoveWindowListener %p \n",GetTStamp(tBuff,56),aBaseWindow)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::RemoveWindowListener %p \n",GetTStamp(tBuff,56),aBaseWindow)); + + if(!aBaseWindow) + return S_OK; +@@ -610,7 +612,7 @@ HRESULT rhTray::RemoveListener(nsIBaseWi + HRESULT rhTray::RemoveAllListeners() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::RemoveAllListenesr\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::RemoveAllListenesr\n",GetTStamp(tBuff,56))); + map< nsIBaseWindow *, rhTrayWindowListener *>::iterator i; + + rhTrayWindowListener *cur = NULL; +@@ -635,7 +637,7 @@ HRESULT rhTray::RemoveAllListeners() + NS_IMETHODIMP rhTray::Setmenuitemtext(PRUint32 aIndex, const char *aText) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Setmenuitemtext: index: %d text %s. \n",GetTStamp(tBuff,56),aIndex,aText)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Setmenuitemtext: index: %d text %s. \n",GetTStamp(tBuff,56),aIndex,aText)); + + if(!aText) + return NS_OK; +@@ -653,10 +655,10 @@ NS_IMETHODIMP rhTray::Setmenuitemtext(PR + unsigned int i = 0; + for (iterate = children; iterate; iterate=iterate->next) + { +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Setmenuitemtext: index: %d \n",GetTStamp(tBuff,56),i)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Setmenuitemtext: index: %d \n",GetTStamp(tBuff,56),i)); + if(aIndex == i) + { +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::Setmenuitemtext: About to reset text of item %p. \n",GetTStamp(tBuff,56),(void *) iterate->data)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::Setmenuitemtext: About to reset text of item %p. \n",GetTStamp(tBuff,56),(void *) iterate->data)); + if(iterate->data) + { + GtkWidget *label = gtk_bin_get_child(GTK_BIN(iterate->data)); +@@ -691,7 +693,7 @@ rhITrayWindNotify* rhTray::GetTrayWindNo + } + } + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhCoolKey::GetNotifyKeyListener: looking for %p returning NULL. \n",GetTStamp(tBuff,56),listener)); + + return NULL; + } +@@ -704,12 +706,12 @@ int rhTray::GetTrayWindNotifyListSize() + void rhTray::AddTrayWindNotifyListener(rhITrayWindNotify *listener) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddTrayWindNotifyListener: %p \n", GetTStamp(tBuff,56), ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddTrayWindNotifyListener: %p \n", GetTStamp(tBuff,56), + listener)); + + if(GetTrayWindNotifyListener(listener )) + { +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::AddTrayWindNotifyListener: %p listener already in list. \n",GetTStamp(tBuff,56),listener)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::AddTrayWindNotifyListener: %p listener already in list. \n",GetTStamp(tBuff,56),listener)); + return ; + + } +@@ -745,7 +747,7 @@ void rhTray::NotifyTrayWindListeners(PRU + { + + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray::NotifyTrayWindListeners \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray::NotifyTrayWindListeners \n",GetTStamp(tBuff,56))); + + //Now notify all the listeners of the event + +@@ -754,7 +756,7 @@ void rhTray::NotifyTrayWindListeners(PRU + + bool claimed = 0; + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s NotifyTrayWindListeners about to notify \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s NotifyTrayWindListeners about to notify \n",GetTStamp(tBuff,56))); + ((rhITrayWindNotify *) (*it))->RhTrayWindEventNotify(aEvent,aEventData, aKeyData, aData1, aData2, &claimed); + + } +@@ -765,7 +767,7 @@ void rhTray::NotifyTrayWindListeners(PRU + void rhTray::TrayPrintHandler(const gchar *string) + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTray:TrayPrintHandler. : %s \n",GetTStamp(tBuff,56),(char *) string)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTray:TrayPrintHandler. : %s \n",GetTStamp(tBuff,56),(char *) string)); + } + //rhTrayWindowListener Methods + +@@ -777,13 +779,13 @@ rhTrayWindowListener::rhTrayWindowListen + rhTrayWindowListener::~rhTrayWindowListener() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTrayWindowListener::rhTrayWindowListener.\n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTrayWindowListener::rhTrayWindowListener.\n",GetTStamp(tBuff,56))); + } + + HRESULT rhTrayWindowListener::Initialize() + { + char tBuff[56]; +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTrayWindowListener::Initialize \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTrayWindowListener::Initialize \n",GetTStamp(tBuff,56))); + + if(mWnd) + { +@@ -821,7 +823,7 @@ void rhTrayWindowListener::ShowWindow() + } + } + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTrayWindowListener:: ShowWindow \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTrayWindowListener:: ShowWindow \n",GetTStamp(tBuff,56))); + } + } + +@@ -831,7 +833,7 @@ void rhTrayWindowListener::HideWindow() + if(mWnd) + { + gtk_widget_hide(mWnd); +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTrayWindowListener:: Hide Window %p\n",GetTStamp(tBuff,56),mWnd)); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTrayWindowListener:: Hide Window %p\n",GetTStamp(tBuff,56),mWnd)); + } + } + +@@ -841,7 +843,7 @@ void rhTrayWindowListener::WndDestroyCBP + char tBuff[56]; + g_print("WndDestroyCBProc \n"); + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTrayWindowListener::WndDestroyCBProc \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTrayWindowListener::WndDestroyCBProc \n",GetTStamp(tBuff,56))); + + } + +@@ -852,7 +854,7 @@ gboolean rhTrayWindowListener::WndDelete + char tBuff[56]; + g_print("WndDeleteCBProc\n"); + +- PR_LOG( trayLog, PR_LOG_DEBUG, ("%s rhTrayWindowListener::WndDeleteCBProc \n",GetTStamp(tBuff,56))); ++ MOZ_LOG( trayLog, LogLevel::Debug, ("%s rhTrayWindowListener::WndDeleteCBProc \n",GetTStamp(tBuff,56))); + + rhTrayWindowListener *me = (rhTrayWindowListener *) data; + +diff -up ./esc/src/app/xpcom/tray/rhTray.h.fix22 ./esc/src/app/xpcom/tray/rhTray.h +--- ./esc/src/app/xpcom/tray/rhTray.h.fix22 2016-02-08 15:31:00.552718187 -0800 ++++ ./esc/src/app/xpcom/tray/rhTray.h 2016-02-08 15:35:54.810459583 -0800 +@@ -25,7 +25,7 @@ + #include + #include "nsCOMPtr.h" + #include "nsIBaseWindow.h" +-#include "nsIWidget.h" ++//#include "nsIWidget.h" + #include + + extern "C" { diff --git a/esc.spec b/esc.spec index d27b859..d65d101 100644 --- a/esc.spec +++ b/esc.spec @@ -37,6 +37,7 @@ Patch18: esc-1.1.0-fix18.patch Patch19: esc-1.1.0-fix19.patch Patch20: esc-1.1.0-fix20.patch Patch21: esc-1.1.0-fix21.patch +Patch22: esc-1.1.0-fix22.patch BuildRequires: doxygen fontconfig-devel freetype-devel >= 2.1 BuildRequires: glib2-devel libIDL-devel atk-devel gtk2-devel libjpeg-devel @@ -111,6 +112,7 @@ cryptographic smartcards. %patch19 -p1 -b .fix19 %patch20 -p1 -b .fix20 %patch21 -p1 -b .fix21 +%patch22 -p1 -b .fix22 r=$(uname -r | sed -e 's/\(^[^.]*\.[^.]*\).*/\1/') [ -f esc/coreconf/Linux$r.mk ] || ln -s Linux3.5.mk esc/coreconf/Linux$r.mk From 662e4a437a3ced332f2c4fd0dc0bcfb1b65f8276 Mon Sep 17 00:00:00 2001 From: Peter Robinson Date: Sun, 8 May 2016 12:23:30 +0100 Subject: [PATCH 11/47] Secondary arch fixes, Use %%license --- esc.spec | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/esc.spec b/esc.spec index d65d101..99e9707 100644 --- a/esc.spec +++ b/esc.spec @@ -1,13 +1,11 @@ Name: esc Version: 1.1.0 -Release: 29%{?dist} +Release: 30%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey Group: Applications/Internet -BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) - #Fix to build against XUlrunner SDK. Patch1: esc-1.1.0-fix1.patch #Fix to the smart card handling thread @@ -127,7 +125,7 @@ GECKO_BIN_PATH=%{_libdir}/xulrunner GECKO_INCLUDE_PATH=%{_includedir}/xulrunner-%{geckoversion} GECKO_IDL_PATH=/usr/share/idl/xulrunner-%{geckoversion} -%ifarch x86_64 ppc64 ia64 +%ifarch x86_64 %{power64} ia64 aarch64 USE_64=1 export USE_64 %endif @@ -166,7 +164,7 @@ chmod 755 $RPM_BUILD_ROOT/%{escbindir}/esc mkdir -p $RPM_BUILD_ROOT/%{escdir} -%ifarch x86_64 ppc64 ia64 +%ifarch x86_64 %{power64} ia64 aarch64 USE_64=1 export USE_64 %endif @@ -198,12 +196,10 @@ chmod 755 -R $RPM_BUILD_ROOT/%{escdir}/defaults chmod 755 $RPM_BUILD_ROOT/%{escdir}/application.ini -%clean - -rm -rf $RPM_BUILD_ROOT %files -%defattr(-,root,root,-) +%{!?_licensedir:%global license %%doc} +%license %{docdir}/LICENSE %{escdir}/esc %{escdir}/escd @@ -225,7 +221,6 @@ rm -rf $RPM_BUILD_ROOT %{pixmapdir}/esc.png %{autostartdir}/esc.desktop %{_datadir}/%{appdir}/esc.desktop -%doc %{docdir}/LICENSE %post touch --no-create %{_datadir}/icons/hicolor || : @@ -245,10 +240,14 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog -* Mon Feb 08 2016 Jack Magne =1.1.0-29 +* Sun May 8 2016 Peter Robinson 1.1.0-30 +- Secondary arch fixes +- Use %%license + +* Mon Feb 08 2016 Jack Magne 1.1.0-29 - Apease latest xullrunner api changes. -* Thu Apr 09 2015 Jack Magne =1.1.0-27 +* Thu Apr 09 2015 Jack Magne 1.1.0-27 - More xulrunner adjustments. * Sat Aug 16 2014 Fedora Release Engineering - 1.1.0-26 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild From e658852015f8faf1ff6e39e7de77be8d13ffe379 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Fri, 10 Feb 2017 09:25:10 +0000 Subject: [PATCH 12/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index 99e9707..fce6109 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 30%{?dist} +Release: 31%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -240,6 +240,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Fri Feb 10 2017 Fedora Release Engineering - 1.1.0-31 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + * Sun May 8 2016 Peter Robinson 1.1.0-30 - Secondary arch fixes - Use %%license From 4295b786fad22dfb81d23ed65c88a173e20c0bad Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 26 Jul 2017 07:47:43 +0000 Subject: [PATCH 13/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index fce6109..fd70911 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 31%{?dist} +Release: 32%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -240,6 +240,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Wed Jul 26 2017 Fedora Release Engineering - 1.1.0-32 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + * Fri Feb 10 2017 Fedora Release Engineering - 1.1.0-31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild From 99f187ef667fd306c93f0da0bb79072da7f17b78 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Wed, 2 Aug 2017 20:18:34 +0000 Subject: [PATCH 14/47] - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild --- esc.spec | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index fd70911..2a499e2 100644 --- a/esc.spec +++ b/esc.spec @@ -1,6 +1,6 @@ Name: esc Version: 1.1.0 -Release: 32%{?dist} +Release: 33%{?dist} Summary: Enterprise Security Client Smart Card Client License: GPL+ URL: http://directory.fedora.redhat.com/wiki/CoolKey @@ -240,6 +240,9 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog +* Wed Aug 02 2017 Fedora Release Engineering - 1.1.0-33 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + * Wed Jul 26 2017 Fedora Release Engineering - 1.1.0-32 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild From 68c2f3438a75e325352ba4940714d2d5d4c71a64 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Mon, 7 Aug 2017 17:32:40 -0700 Subject: [PATCH 15/47] Rebuild with loacl xulrunner instead of the removed system xulrunner. --- .gitignore | 1 + esc | 2 +- esc-1.1.0-fix1.patch | 38 -- esc-1.1.0-fix10.patch | 29 -- esc-1.1.0-fix11.patch | 93 ---- esc-1.1.0-fix12.patch | 50 -- esc-1.1.0-fix13.patch | 273 ---------- esc-1.1.0-fix14.patch | 458 ----------------- esc-1.1.0-fix15.patch | 724 -------------------------- esc-1.1.0-fix16.patch | 423 ---------------- esc-1.1.0-fix17.patch | 126 ----- esc-1.1.0-fix18.patch | 82 --- esc-1.1.0-fix19.patch | 79 --- esc-1.1.0-fix2.patch | 51 -- esc-1.1.0-fix20.patch | 396 --------------- esc-1.1.0-fix21.patch | 21 - esc-1.1.0-fix22.patch | 1124 ----------------------------------------- esc-1.1.0-fix3.patch | 22 - esc-1.1.0-fix4.patch | 22 - esc-1.1.0-fix5.patch | 218 -------- esc-1.1.0-fix6.patch | 884 -------------------------------- esc-1.1.0-fix7.patch | 69 --- esc-1.1.0-fix8.patch | 76 --- esc-1.1.0-fix9.patch | 772 ---------------------------- esc.spec | 147 +++--- sources | 2 +- 26 files changed, 79 insertions(+), 6103 deletions(-) delete mode 100644 esc-1.1.0-fix1.patch delete mode 100644 esc-1.1.0-fix10.patch delete mode 100644 esc-1.1.0-fix11.patch delete mode 100644 esc-1.1.0-fix12.patch delete mode 100644 esc-1.1.0-fix13.patch delete mode 100644 esc-1.1.0-fix14.patch delete mode 100755 esc-1.1.0-fix15.patch delete mode 100644 esc-1.1.0-fix16.patch delete mode 100644 esc-1.1.0-fix17.patch delete mode 100644 esc-1.1.0-fix18.patch delete mode 100644 esc-1.1.0-fix19.patch delete mode 100644 esc-1.1.0-fix2.patch delete mode 100644 esc-1.1.0-fix20.patch delete mode 100644 esc-1.1.0-fix21.patch delete mode 100644 esc-1.1.0-fix22.patch delete mode 100644 esc-1.1.0-fix3.patch delete mode 100644 esc-1.1.0-fix4.patch delete mode 100644 esc-1.1.0-fix5.patch delete mode 100644 esc-1.1.0-fix6.patch delete mode 100644 esc-1.1.0-fix7.patch delete mode 100644 esc-1.1.0-fix8.patch delete mode 100644 esc-1.1.0-fix9.patch diff --git a/.gitignore b/.gitignore index 6615204..b2e9761 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ esc-1.1.0.tar.bz2 +/esc-1.1.1.tar.bz2 diff --git a/esc b/esc index cb0d44d..34b5c9a 100755 --- a/esc +++ b/esc @@ -26,7 +26,7 @@ ESC_ARGS= ESC_PROFILE_BASE=~/.redhat/esc ESC_LOG_FILE=esc.log -ESC_PATH=$LIBDIR/esc-1.1.0 +ESC_PATH=$LIBDIR/esc-1.1.1 ESC_BIN_PATH=/usr/bin ESC_EXEC=esc ESCD_EXEC=escd diff --git a/esc-1.1.0-fix1.patch b/esc-1.1.0-fix1.patch deleted file mode 100644 index c7b631c..0000000 --- a/esc-1.1.0-fix1.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- ./esc/src/app/xpcom/tray/Makefile.sdk.fix1 2009-04-17 13:39:58.000000000 -0700 -+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2009-04-17 14:18:17.000000000 -0700 -@@ -23,20 +23,20 @@ - include $(CORE_DEPTH)/coreconf/rules.mk - - ifeq ($(OS_ARCH),Linux) --CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC - endif - - - # Change this to point at your Gecko SDK directory. - ifndef GECKO_SDK_PATH --GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9pre/sdk -+GECKO_SDK_PATH =/usr/lib/xulrunner-sdk-1.9/sdk - endif - GECKO_SDK_INCLUDE_PATH=$(GECKO_SDK_PATH)/include - ifndef GECKO_INCLUDE_PATH --GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9pre -+GECKO_INCLUDE_PATH=/usr/include/xulrunner-sdk-1.9 - endif - ifndef GECKO_BIN_PATH --GECKO_BIN_PATH=/usr/lib/xulrunner-1.9pre -+GECKO_BIN_PATH=/usr/lib/xulrunner-1.9 - endif - - ifeq ($(OS_ARCH),Darwin) -@@ -148,6 +148,10 @@ - - endif - -+ifeq ($(OS_ARCH),Linux) -+GECKO_LD_LIBS= -L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue_s.a -+endif -+ - - # GCC only define which allows us to not have to #include mozilla-config - # in every .cpp file. If your not using GCC remove this line and add diff --git a/esc-1.1.0-fix10.patch b/esc-1.1.0-fix10.patch deleted file mode 100644 index f6eda05..0000000 --- a/esc-1.1.0-fix10.patch +++ /dev/null @@ -1,29 +0,0 @@ -diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix10 ./esc/src/app/xpcom/rhCoolKey.cpp ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix10 2011-07-19 03:47:15.264254844 -0700 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-07-19 03:47:30.224254842 -0700 -@@ -542,7 +542,7 @@ PRBool rhCoolKey::InitInstance() - static const GREVersionRange greVersion = - { - "1.9", PR_TRUE, -- "2", PR_TRUE -+ "9.9", PR_TRUE - }; - - nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcom_path, 4096); -diff -up ./esc/src/app/xul/esc/application.ini.fix10 ./esc/src/app/xul/esc/application.ini ---- ./esc/src/app/xul/esc/application.ini.fix10 2011-07-19 03:42:23.368254822 -0700 -+++ ./esc/src/app/xul/esc/application.ini 2011-07-19 03:42:40.531254827 -0700 -@@ -25,11 +25,11 @@ Vendor=RedHat - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-13 -+Version=1.1.0-15 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. --BuildID=0000001013 -+BuildID=0000001015 - ; - ; This ID is just an example. Every XUL app ought to have it's own unique ID. - ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on diff --git a/esc-1.1.0-fix11.patch b/esc-1.1.0-fix11.patch deleted file mode 100644 index bd6110e..0000000 --- a/esc-1.1.0-fix11.patch +++ /dev/null @@ -1,93 +0,0 @@ -diff -up ./esc/src/app/xpcom/Makefile.sdk.fix11 ./esc/src/app/xpcom/Makefile.sdk ---- ./esc/src/app/xpcom/Makefile.sdk.fix11 2011-09-16 11:28:43.413286053 -0700 -+++ ./esc/src/app/xpcom/Makefile.sdk 2011-09-16 11:28:43.529286053 -0700 -@@ -108,7 +108,7 @@ endif - ifeq ($(OS_ARCH),Linux) - CPPFLAGS += -fno-rtti \ - -fno-exceptions \ -- -fshort-wchar -fPIC -+ -fshort-wchar -fPIC -std=gnu++0x - GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue.a -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl - endif - -@@ -129,6 +129,10 @@ ifdef ESC_VERSION - GECKO_DEFINES += -DESC_VERSION=$(ESC_VERSION) - endif - -+ifdef GECKO_BIN_PATH -+GECKO_DEFINES += -DGECKO_BIN_PATH=$(GECKO_BIN_PATH) -+endif -+ - NSS_INCLUDE = /usr/include/nss3 - NSPR_INCLUDE = /usr/include/nspr4 - -diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix11 ./esc/src/app/xpcom/rhCoolKey.cpp ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix11 2011-09-16 11:28:43.510286053 -0700 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-09-16 11:28:43.530286053 -0700 -@@ -538,7 +538,7 @@ PRBool rhCoolKey::InitInstance() - - char xpcom_path[4096]; - xpcom_path[0] = 0; -- -+/* - static const GREVersionRange greVersion = - { - "1.9", PR_TRUE, -@@ -550,6 +550,13 @@ PRBool rhCoolKey::InitInstance() - return PR_FALSE; - } - -+*/ -+ -+ char *grePath = (char *) GETSTRING(GECKO_BIN_PATH); -+ -+ -+ snprintf(xpcom_path,4096,grePath); -+ - char *lib_name =(char *) XPCOM_LIB_NAME ; - - -diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix11 ./esc/src/app/xpcom/tray/Makefile.sdk ---- ./esc/src/app/xpcom/tray/Makefile.sdk.fix11 2011-09-16 11:31:59.645286087 -0700 -+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2011-09-16 11:32:10.859286088 -0700 -@@ -23,7 +23,7 @@ include $(CORE_DEPTH)/coreconf/config.mk - include $(CORE_DEPTH)/coreconf/rules.mk - - ifeq ($(OS_ARCH),Linux) --CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC -+CXXFLAGS += $(MOZ_GTK_CFLAGS) $(MOZ_GTK2_CFLAGS) $(NOTIFY_CXX_FLAGS) -fPIC -std=gnu++0x - endif - - -diff -up ./esc/src/app/xul/esc/application.ini.fix11 ./esc/src/app/xul/esc/application.ini ---- ./esc/src/app/xul/esc/application.ini.fix11 2011-09-16 11:28:43.511286053 -0700 -+++ ./esc/src/app/xul/esc/application.ini 2011-09-16 11:28:43.532286053 -0700 -@@ -25,11 +25,11 @@ Vendor=RedHat - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-15 -+Version=1.1.0-16 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. --BuildID=0000001015 -+BuildID=0000001016 - ; - ; This ID is just an example. Every XUL app ought to have it's own unique ID. - ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on -@@ -41,12 +41,12 @@ ID={6380471b-1924-4b48-b652-49f42951af86 - ; This field is required. It specifies the minimum Gecko version that this - ; application requires. Specifying 1.8 matches all releases with a version - ; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2). --MinVersion=1.99 -+MinVersion=6.0.0 - ; - ; This field is optional. It specifies the maximum Gecko version that this - ; application requires. It should be specified if your application uses - ; unfrozen interfaces. Specifying 1.8 matches all releases with a version - ; prefixed by 1.8 (e.g., 1.8a4, 1.8b, 1.8.2). --MaxVersion=2.99 -+MaxVersion=20.0.0 - - [Shell] diff --git a/esc-1.1.0-fix12.patch b/esc-1.1.0-fix12.patch deleted file mode 100644 index d40be5f..0000000 --- a/esc-1.1.0-fix12.patch +++ /dev/null @@ -1,50 +0,0 @@ -diff -up ./esc/coreconf/Linux3.1.mk.fix12 ./esc/coreconf/Linux3.1.mk ---- ./esc/coreconf/Linux3.1.mk.fix12 2011-11-28 13:55:27.623816205 -0800 -+++ ./esc/coreconf/Linux3.1.mk 2011-11-28 13:56:11.119536737 -0800 -@@ -0,0 +1,35 @@ -+# BEGIN COPYRIGHT BLOCK -+# This Program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU General Public License as published by the Free Software -+# Foundation; version 2 of the License. -+# -+# This Program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along with -+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple -+# Place, Suite 330, Boston, MA 02111-1307 USA. -+# -+# Copyright (C) 2005 Red Hat, Inc. -+# All rights reserved. -+# END COPYRIGHT BLOCK -+ -+# -+# Config stuff for Linux 3.1 (ELF) -+# -+ -+include $(CORE_DEPTH)/coreconf/Linux.mk -+ -+OS_REL_CFLAGS += -DLINUX2_1 -+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) -+ifdef BUILD_OPT -+ OPTIMIZER = -O2 -+endif -+ -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ -+ -diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix12 ./esc/src/app/xpcom/rhCoolKey.cpp ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix12 2011-11-28 19:29:53.894102752 -0800 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2011-11-28 19:30:46.003028405 -0800 -@@ -41,7 +41,6 @@ - #include "prlink.h" - #include "prthread.h" - #include "nscore.h" --#include "nsCopySupport.h" - #include - #include - #include diff --git a/esc-1.1.0-fix13.patch b/esc-1.1.0-fix13.patch deleted file mode 100644 index 94f9728..0000000 --- a/esc-1.1.0-fix13.patch +++ /dev/null @@ -1,273 +0,0 @@ -diff -up ./esc/coreconf/Linux3.2.mk.fix13 ./esc/coreconf/Linux3.2.mk ---- ./esc/coreconf/Linux3.2.mk.fix13 2012-02-20 18:08:55.637187190 -0800 -+++ ./esc/coreconf/Linux3.2.mk 2012-02-20 18:09:16.296139174 -0800 -@@ -0,0 +1,35 @@ -+# BEGIN COPYRIGHT BLOCK -+# This Program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU General Public License as published by the Free Software -+# Foundation; version 2 of the License. -+# -+# This Program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along with -+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple -+# Place, Suite 330, Boston, MA 02111-1307 USA. -+# -+# Copyright (C) 2005 Red Hat, Inc. -+# All rights reserved. -+# END COPYRIGHT BLOCK -+ -+# -+# Config stuff for Linux 3.2 (ELF) -+# -+ -+include $(CORE_DEPTH)/coreconf/Linux.mk -+ -+OS_REL_CFLAGS += -DLINUX2_1 -+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) -+ifdef BUILD_OPT -+ OPTIMIZER = -O2 -+endif -+ -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ -+ -diff -up ./esc/src/app/xpcom/Makefile.sdk.fix13 ./esc/src/app/xpcom/Makefile.sdk ---- ./esc/src/app/xpcom/Makefile.sdk.fix13 2012-02-20 18:01:49.522177961 -0800 -+++ ./esc/src/app/xpcom/Makefile.sdk 2012-02-20 18:01:49.526177952 -0800 -@@ -35,7 +35,12 @@ ifndef GECKO_BIN_PATH - GECKO_BIN_PATH=/usr/lib/xulrunner-1.9pre - endif - XUL_FRAMEWORK_BIN_PATH=$(GECKO_BIN_PATH) -- -+ifndef GECKO_IDL_PATH -+GECKO_IDL_PATH=/usr/share/idl/xulrunner-2 -+endif -+ifndef PYTHON_BIN_PATH -+PYTHON_BIN=python -+endif - - ifeq ($(OS_ARCH),Darwin) - ifndef GECKO_SDK_PATH -@@ -190,13 +195,14 @@ endif - all:: export libs - - libs:: -- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhIKeyNotify.idl - -- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhIKeyNotify.idl -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhIKeyNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl -+ -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhIKeyNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhIKeyNotify.idl - -- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhICoolKey.idl -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir /tmp -o rhICoolKey.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl - -- $(GECKO_BIN_PATH)/xpidl -v -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhICoolKey.idl -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir /tmp -o rhICoolKey.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhICoolKey.idl - - ifeq ($(OS_ARCH),Darwin) - $(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES) -diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix13 ./esc/src/app/xpcom/rhCoolKey.cpp ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix13 2012-02-20 18:01:49.524177956 -0800 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2012-02-20 18:01:49.526177952 -0800 -@@ -98,6 +98,7 @@ static PRLogModuleInfo *coolKeyLog = PR_ - - rhCoolKey *single = NULL; - -+ - class CoolKeyShutdownObserver : public nsIObserver - { - public: -@@ -364,9 +365,9 @@ SECStatus rhCoolKey::badCertHandler(void - GetTStamp(tBuff,56),err,host,port) - ); - -- PRBool isTemporaryOverride = PR_FALSE; -+ bool isTemporaryOverride = PR_FALSE; - PRUint32 overrideBits = 0; -- PRBool overrideResult = PR_FALSE; -+ bool overrideResult = PR_FALSE; - - // Use the nsICertOverrideService to see if we have - // previously trusted this certificate. -@@ -554,14 +555,14 @@ PRBool rhCoolKey::InitInstance() - char *grePath = (char *) GETSTRING(GECKO_BIN_PATH); - - -- snprintf(xpcom_path,4096,grePath); -+ snprintf(xpcom_path,4096,"%s%s",grePath,"libxpcom.so"); - - char *lib_name =(char *) XPCOM_LIB_NAME ; - - - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::xpcom_path %s \n",GetTStamp(tBuff,56),xpcom_path)); - -- XPCOMGlueStartup(xpcom_path); -+ XPCOMGlueStartup("/usr/lib/xulrunner-2/libxpcom.so"); - - nssComponent - = do_GetService(PSM_COMPONENT_CONTRACTID); -@@ -1309,7 +1310,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyStatu - /* boolean GetCoolKeyIsReallyCoolKey (in unsigned long aKeyType, in string aKeyID); */ - - --NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval) -+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsReallyCoolKey(PRUint32 aKeyType, const char *aKeyID, bool *_retval) - { - char tBuff[56]; - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyIsReallyCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -@@ -1328,7 +1329,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIsRea - } - - /* long GetCoolKeyGetAppletVer (in unsigned long aKeyType, in string aKeyID, in boolean aIsMajor); */ --NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID, PRBool aIsMajor, PRInt32 *_retval) -+NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAppletVer(PRUint32 aKeyType, const char *aKeyID, bool aIsMajor, PRInt32 *_retval) - { - char tBuff[56]; - PR_LOG(coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::GetCoolKeyAppletVer thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -@@ -1344,7 +1345,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyGetAp - - /* boolean rhCoolKeyIsEnrolled (in unsigned long aKeyType, in string aKeyID); */ - --NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval) -+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsEnrolled(PRUint32 aKeyType, const char *aKeyID, bool *_retval) - { - char tBuff[56]; - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyIsEnrolled thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -@@ -1586,7 +1587,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIssue - } - - /* boolean SetCoolKeyConfigValue (in string aName, in string aValue); */ --NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, PRBool *_retval) -+NS_IMETHODIMP rhCoolKey::SetCoolKeyConfigValue(const char *aName, const char *aValue, bool *_retval) - { - char tBuff[56]; - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("rhCoolKey::SetCoolKeyConfigValue thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -@@ -1620,7 +1621,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyConfi - - /* boolean rhCoolKeyRequiresAuthentication (in unsigned long aKeyType, in string aKeyID); */ - --NS_IMETHODIMP rhCoolKey::GetCoolKeyRequiresAuthentication(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval) -+NS_IMETHODIMP rhCoolKey::GetCoolKeyRequiresAuthentication(PRUint32 aKeyType, const char *aKeyID, bool *_retval) - { - char tBuff[56]; - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhCoolKeyRequiresAuthentication thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -@@ -1640,7 +1641,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyRequi - - /* boolean rhGetCoolKeyIsAuthenticated (in unsigned long aKeyType, in string aKeyID); */ - --NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAuthenticated(PRUint32 aKeyType, const char *aKeyID, PRBool *_retval) -+NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAuthenticated(PRUint32 aKeyType, const char *aKeyID, bool *_retval) - { - char tBuff[56]; - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhGetCoolKeyIsAuthenticated thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -@@ -1660,7 +1661,7 @@ NS_IMETHODIMP rhCoolKey::GetCoolKeyIsAut - - /* boolean rhAuthenticateCoolKey (in unsigned long aKeyType, in string aKeyID, in string aPIN); */ - --NS_IMETHODIMP rhCoolKey::AuthenticateCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aPIN, PRBool *_retval) -+NS_IMETHODIMP rhCoolKey::AuthenticateCoolKey(PRUint32 aKeyType, const char *aKeyID, const char *aPIN, bool *_retval) - { - char tBuff[56]; - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::RhAuthenticateCoolKey thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -diff -up ./esc/src/app/xpcom/tray/Makefile.sdk.fix13 ./esc/src/app/xpcom/tray/Makefile.sdk ---- ./esc/src/app/xpcom/tray/Makefile.sdk.fix13 2012-02-20 18:01:49.522177961 -0800 -+++ ./esc/src/app/xpcom/tray/Makefile.sdk 2012-02-20 18:01:49.526177952 -0800 -@@ -39,6 +39,15 @@ ifndef GECKO_BIN_PATH - GECKO_BIN_PATH=/usr/lib/xulrunner-1.9 - endif - -+ifndef GECKO_IDL_PATH -+GECKO_IDL_PATH=/usr/share/idl/xulrunner-2 -+endif -+ -+ifndef PYTHON_BIN_PATH -+PYTHON_BIN=python -+endif -+ -+ - ifeq ($(OS_ARCH),Darwin) - ifndef GECKO_SDK_PATH - GECKO_SDK_PATH =/Users/jmagne/Desktop/gecko-sdk-mac-universal -@@ -220,13 +229,14 @@ all:: export libs - - libs:: - echo "PPC_BUILD $(PPC_BUILD)" -- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhITray.idl - -- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhITray.idl -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITray.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl -+ -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITray.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITray.idl - -- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m header rhITrayWindNotify.idl -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/header.py --cachedir=/tmp -o rhITrayWindNotify.h -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl - -- $(GECKO_BIN_PATH)/xpidl -I $(GECKO_SDK_PATH)/idl -I $(NSPR_INCLUDE) -m typelib rhITrayWindNotify.idl -+ $(PYTHON_BIN) $(GECKO_SDK_PATH)/bin/typelib.py --cachedir=/tmp -o rhITrayWindNotify.xpt -I $(GECKO_IDL_PATH) -I $(NSPR_INCLUDE) rhITrayWindNotify.idl - - ifeq ($(OS_ARCH),Darwin) - $(CXX) $(CPPFLAGS) -c -o $(OBJECT) $(GECKO_CONFIG_INCLUDE) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(COOL_INCLUDES) $(CXXFLAGS) $(FILES) -diff -up ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix13 ./esc/src/app/xpcom/tray/rhLinuxTray.cpp ---- ./esc/src/app/xpcom/tray/rhLinuxTray.cpp.fix13 2012-02-20 18:01:49.512177984 -0800 -+++ ./esc/src/app/xpcom/tray/rhLinuxTray.cpp 2012-02-20 18:01:49.526177952 -0800 -@@ -215,7 +215,7 @@ NS_IMETHODIMP rhTray::Show(nsIBaseWindow - return NS_OK; - } - --NS_IMETHODIMP rhTray::IsInitializedAlready(PRBool *_retval) -+NS_IMETHODIMP rhTray::IsInitializedAlready(bool *_retval) - { - *_retval = 0; - -@@ -749,7 +749,7 @@ void rhTray::NotifyTrayWindListeners(PRU - std::list< nsCOMPtr >::const_iterator it; - for(it=gTrayWindNotifyListeners.begin(); it!=gTrayWindNotifyListeners.end(); ++it) { - -- PRBool claimed = 0; -+ bool claimed = 0; - - PR_LOG( trayLog, PR_LOG_DEBUG, ("%s NotifyTrayWindListeners about to notify \n",GetTStamp(tBuff,56))); - ((rhITrayWindNotify *) (*it))->RhTrayWindEventNotify(aEvent,aEventData, aKeyData, aData1, aData2, &claimed); -diff -up ./esc/src/app/xul/esc/application.ini.fix13 ./esc/src/app/xul/esc/application.ini ---- ./esc/src/app/xul/esc/application.ini.fix13 2012-02-20 18:01:49.523177958 -0800 -+++ ./esc/src/app/xul/esc/application.ini 2012-02-20 18:01:49.527177950 -0800 -@@ -25,7 +25,7 @@ Vendor=RedHat - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-16 -+Version=1.1.0-15 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. -diff -up ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix13 ./esc/src/app/xul/esc/chrome/content/esc/ESC.js ---- ./esc/src/app/xul/esc/chrome/content/esc/ESC.js.fix13 2012-02-20 18:01:49.514177980 -0800 -+++ ./esc/src/app/xul/esc/chrome/content/esc/ESC.js 2012-02-20 18:01:49.527177950 -0800 -@@ -118,7 +118,7 @@ jsNotify.prototype = { - if(!iid.equals(Components.interfaces.rhIKeyNotify) && - !iid.equals(Components.interfaces.nsISupports)) - { -- MyAlert(getBundleString("errorJsNotifyInterface")); -+ //MyAlert(getBundleString("errorJsNotifyInterface")); - throw Components.results.NS_ERROR_NO_INTERFACE; - } - return this; -diff -up ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix13 ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js ---- ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js.fix13 2012-02-20 18:01:49.515177978 -0800 -+++ ./esc/src/app/xul/esc/chrome/content/esc/TRAY.js 2012-02-20 18:01:49.528177948 -0800 -@@ -49,7 +49,7 @@ jsWindNotify.prototype = { - if(!iid.equals(Components.interfaces.rhITrayWindNotify) && - !iid.equals(Components.interfaces.nsISupports)) - { -- MyAlert(getBundleString("errorJsNotifyInterface")); -+ //MyAlert(getBundleString("errorJsNotifyInterface")); - throw Components.results.NS_ERROR_NO_INTERFACE; - } - return this; diff --git a/esc-1.1.0-fix14.patch b/esc-1.1.0-fix14.patch deleted file mode 100644 index f3c048d..0000000 --- a/esc-1.1.0-fix14.patch +++ /dev/null @@ -1,458 +0,0 @@ -diff -up ./esc/coreconf/Linux3.3.mk.fix14 ./esc/coreconf/Linux3.3.mk ---- ./esc/coreconf/Linux3.3.mk.fix14 2012-05-10 15:09:37.298143842 -0700 -+++ ./esc/coreconf/Linux3.3.mk 2012-05-10 15:09:37.298143842 -0700 -@@ -0,0 +1,35 @@ -+# BEGIN COPYRIGHT BLOCK -+# This Program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU General Public License as published by the Free Software -+# Foundation; version 2 of the License. -+# -+# This Program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along with -+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple -+# Place, Suite 330, Boston, MA 02111-1307 USA. -+# -+# Copyright (C) 2005 Red Hat, Inc. -+# All rights reserved. -+# END COPYRIGHT BLOCK -+ -+# -+# Config stuff for Linux 3.3 (ELF) -+# -+ -+include $(CORE_DEPTH)/coreconf/Linux.mk -+ -+OS_REL_CFLAGS += -DLINUX2_1 -+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) -+ifdef BUILD_OPT -+ OPTIMIZER = -O2 -+endif -+ -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ -+ -diff -up ./esc/coreconf/Linux3.4.mk.fix14 ./esc/coreconf/Linux3.4.mk ---- ./esc/coreconf/Linux3.4.mk.fix14 2012-05-10 15:09:37.298143842 -0700 -+++ ./esc/coreconf/Linux3.4.mk 2012-05-10 15:09:37.298143842 -0700 -@@ -0,0 +1,35 @@ -+# BEGIN COPYRIGHT BLOCK -+# This Program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU General Public License as published by the Free Software -+# Foundation; version 2 of the License. -+# -+# This Program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along with -+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple -+# Place, Suite 330, Boston, MA 02111-1307 USA. -+# -+# Copyright (C) 2005 Red Hat, Inc. -+# All rights reserved. -+# END COPYRIGHT BLOCK -+ -+# -+# Config stuff for Linux 3.4 (ELF) -+# -+ -+include $(CORE_DEPTH)/coreconf/Linux.mk -+ -+OS_REL_CFLAGS += -DLINUX2_1 -+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) -+ifdef BUILD_OPT -+ OPTIMIZER = -O2 -+endif -+ -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ -+ -diff -up ./esc/coreconf/Linux3.5.mk.fix14 ./esc/coreconf/Linux3.5.mk ---- ./esc/coreconf/Linux3.5.mk.fix14 2012-05-10 15:09:37.299143830 -0700 -+++ ./esc/coreconf/Linux3.5.mk 2012-05-10 15:09:37.298143842 -0700 -@@ -0,0 +1,35 @@ -+# BEGIN COPYRIGHT BLOCK -+# This Program is free software; you can redistribute it and/or modify it under -+# the terms of the GNU General Public License as published by the Free Software -+# Foundation; version 2 of the License. -+# -+# This Program is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS -+# FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. -+# -+# You should have received a copy of the GNU General Public License along with -+# this Program; if not, write to the Free Software Foundation, Inc., 59 Temple -+# Place, Suite 330, Boston, MA 02111-1307 USA. -+# -+# Copyright (C) 2005 Red Hat, Inc. -+# All rights reserved. -+# END COPYRIGHT BLOCK -+ -+# -+# Config stuff for Linux 3.5 (ELF) -+# -+ -+include $(CORE_DEPTH)/coreconf/Linux.mk -+ -+OS_REL_CFLAGS += -DLINUX2_1 -+MKSHLIB = $(CC) -shared -Wl,-soname -Wl,$(@:$(OBJDIR)/%.so=%.so) -+ifdef BUILD_OPT -+ OPTIMIZER = -O2 -+endif -+ -+ifdef MAPFILE -+ MKSHLIB += -Wl,--version-script,$(MAPFILE) -+endif -+PROCESS_MAP_FILE = grep -v ';-' $(LIBRARY_NAME).def | \ -+ sed -e 's,;+,,' -e 's; DATA ;;' -e 's,;;,,' -e 's,;.*,;,' > $@ -+ -diff -up ./esc/src/app/xpcom/Makefile.sdk.fix14 ./esc/src/app/xpcom/Makefile.sdk ---- ./esc/src/app/xpcom/Makefile.sdk.fix14 2012-05-10 15:09:37.293143904 -0700 -+++ ./esc/src/app/xpcom/Makefile.sdk 2012-05-10 15:25:17.138394220 -0700 -@@ -106,15 +106,14 @@ endif - endif - - ifeq ($(OS_ARCH),Darwin) --GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -W1, $(GECKO_SDK_PATH)/lib/libxpcomglue.a -L$(XUL_FRAMEWORK_BIN_PATH) -lnss3 -lssl3 -lsoftokn3 -lplds4 -lplc4 -lnssutil3 -+GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -W1, $(GECKO_SDK_PATH)/lib/libxpcomglue.a -L$(XUL_FRAMEWORK_BIN_PATH) -lnss3 -lssl3 -lsoftokn3 -lplds4 -lplc4 -lnssutil3 - endif - -- - ifeq ($(OS_ARCH),Linux) --CPPFLAGS += -fno-rtti \ -- -fno-exceptions \ -- -fshort-wchar -fPIC -std=gnu++0x --GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib $(GECKO_SDK_PATH)/lib/libxpcomglue.a -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -+CPPFLAGS += -g -fno-rtti \ -+ -DXPCOM_GLUE_USE_NSPR -fno-exceptions \ -+ -fshort-wchar -fPIC -std=gnu++0x -+GECKO_LD_LIBS=-L$(GECKO_SDK_PATH)/lib -lnssutil3 -lnss3 -lcrmf -lssl3 -lsmime3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl -L$(GECKO_SDK_PATH)/lib -lxpcomglue_s -lxpcom - endif - - ifeq ($(OS_ARCH),WINNT) -@@ -128,15 +127,15 @@ endif - # #include "mozilla-config.h" to each of your .cpp files. - #GECKO_CONFIG_INCLUDE = -include mozilla-config.h - --GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_CLIENT -+GECKO_DEFINES = -DXPCOM_GLUE -DMOZILLA_CLIENT - - ifdef ESC_VERSION - GECKO_DEFINES += -DESC_VERSION=$(ESC_VERSION) - endif - --ifdef GECKO_BIN_PATH --GECKO_DEFINES += -DGECKO_BIN_PATH=$(GECKO_BIN_PATH) --endif -+#ifdef GECKO_BIN_PATH -+#GECKO_DEFINES += -DGECKO_BIN_PATH=$(GECKO_BIN_PATH) -+#endif - - NSS_INCLUDE = /usr/include/nss3 - NSPR_INCLUDE = /usr/include/nspr4 -@@ -162,7 +161,7 @@ COOL_LDFLAGS += -lsystemStubs -framewor - endif - - GECKO_LDFLAGS= -lnspr4 \ -- -lplds4 -lplc4 -ldl -lpthread -Wl -z \ -+ -lplds4 -lplc4 -ldl -lpthread -z \ - $(GECKO_LD_LIBS) - - ifeq ($(OS_ARCH),WINNT) -@@ -215,7 +214,7 @@ ifeq ($(OS_ARCH),Linux) - - $(CXX) $(CPPFLAGS) -shared -o $(TARGET) $(OBJECT) $(GECKO_DEFINES) $(GECKO_INCLUDES) $(GECKO_LDFLAGS) $(COOL_LDFLAGS) - chmod +x $(TARGET) -- strip $(TARGET) -+ #strip $(TARGET) - endif - - ifeq ($(OS_ARCH),WINNT) -diff -up ./esc/src/app/xpcom/rhCoolKey.cpp.fix14 ./esc/src/app/xpcom/rhCoolKey.cpp ---- ./esc/src/app/xpcom/rhCoolKey.cpp.fix14 2012-05-10 15:09:37.294143891 -0700 -+++ ./esc/src/app/xpcom/rhCoolKey.cpp 2012-05-10 15:09:37.300143818 -0700 -@@ -16,7 +16,6 @@ - * END COPYRIGHT BLOCK **/ - - #define FORCE_PR_LOG 1 -- - #include - #include "rhCoolKey.h" - #include "CoolKey.h" -@@ -34,7 +33,7 @@ - #include "nsIPrefBranch.h" - #include "nsIPrefService.h" - #include "nsCOMPtr.h" --#include "nsIProxyObjectManager.h" -+#include "nsThreadUtils.h" - #include "nsIObserver.h" - #include "nsIObserverService.h" - #include "nsXPCOMGlue.h" -@@ -91,6 +90,7 @@ std::listrhCoolKey::gASCAv - std::list< nsCOMPtr > rhCoolKey::gNotifyListeners; - - PRLock* rhCoolKey::certCBLock=NULL; -+PRLock* rhCoolKey::eventLock= NULL; - - PRBool rhCoolKey::gAutoEnrollBlankTokens = PR_FALSE; - -@@ -162,6 +162,70 @@ ASCCalcBase64DecodedLength(const char *a - - return ((numValidChars / 4) * 3) - numEqualSigns; - } -+class CoolKeyResultTask : public nsRunnable -+{ -+public: -+ ~CoolKeyResultTask() { -+ -+ char tBuff[56]; -+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s ~CoolKeyResultTask thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -+ -+ if (mKeyID) { -+ free(mKeyID); -+ } -+ -+ if (mStrData) { -+ free(mStrData); -+ } -+ -+ } -+ -+ CoolKeyResultTask(unsigned long keyType, const char *keyID, unsigned long keyState, -+ unsigned long data, const char *strData, rhICoolKey *listener) -+ : mKeyType(keyType), mKeyState(keyState), -+ mData(data), mListener(listener) -+ { -+ -+ mStrData = NULL; -+ mKeyID = NULL; -+ -+ MOZ_ASSERT(!NS_IsMainThread()); -+ -+ if (keyID) { -+ mKeyID = strdup(keyID); -+ } -+ -+ if (strData) { -+ mStrData = strdup(strData); -+ } -+ -+ char tBuff[56]; -+ -+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyResultTask::CoolKeyResultTask thread: %p keyID %s \n",GetTStamp(tBuff,56),PR_GetCurrentThread(),mKeyID)); -+ -+ } -+ -+ -+ NS_IMETHOD Run() { -+ MOZ_ASSERT(NS_IsMainThread()); -+ -+ char tBuff[56]; -+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s CoolKeyResultTask::Run thread: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -+ -+ if (mListener != NULL) { -+ mListener->RhNotifyKeyStateChange(mKeyType, mKeyID, mKeyState, -+ mData, mStrData); -+ } -+ } -+ -+private: -+ unsigned long mKeyType; -+ char *mKeyID; -+ unsigned long mKeyState; -+ unsigned long mData; -+ char *mStrData; -+ rhICoolKey *mListener; -+}; - - unsigned int - ASCCalcBase64EncodedLength(unsigned int aDataLength) -@@ -200,6 +264,14 @@ rhCoolKey::rhCoolKey() - exit(1); - } - -+ eventLock = PR_NewLock(); -+ -+ if(!eventLock) { -+ PR_LOG( coolKeyLog, PR_LOG_ERROR, ("%s Failed to create event lock exiting! \n", GetTStamp(tBuff,56))); -+ exit(1); -+ } -+ -+ - PRBool res = InitInstance(); - - if(res == PR_FALSE) -@@ -221,6 +293,10 @@ rhCoolKey::~rhCoolKey() - if(certCBLock) { - PR_DestroyLock(certCBLock); - } -+ -+ if(eventLock) { -+ PR_DestroyLock(eventLock); -+ } - } - - void rhCoolKey::ShutDownInstance() -@@ -255,8 +331,17 @@ HRESULT rhCoolKey::Dispatch( rhICoolKey - unsigned long keyType, const char *keyID, unsigned long keyState, - unsigned long data, const char *strData) - { -- return listener->RhNotifyKeyStateChange(keyType,keyID, keyState, -- data, strData); -+ -+ char tBuff[56]; -+ -+ PR_Lock(eventLock); -+ PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::Dispatch: thead: %p \n",GetTStamp(tBuff,56),PR_GetCurrentThread())); -+ nsCOMPtr result = new CoolKeyResultTask(keyType, keyID,keyState, data, strData, listener); -+ -+ NS_DispatchToMainThread(result); -+ -+ PR_Unlock(eventLock); -+ return 1; - } - - HRESULT rhCoolKey::Reference( rhICoolKey *listener ) -@@ -536,34 +621,6 @@ PRBool rhCoolKey::InitInstance() - - PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::InitInstance %p \n",GetTStamp(tBuff,56),this)); - -- char xpcom_path[4096]; -- xpcom_path[0] = 0; --/* -- static const GREVersionRange greVersion = -- { -- "1.9", PR_TRUE, -- "9.9", PR_TRUE -- }; -- -- nsresult rv = GRE_GetGREPathWithProperties(&greVersion, 1, nsnull, 0, xpcom_path, 4096); -- if (NS_FAILED(rv)) { -- return PR_FALSE; -- } -- --*/ -- -- char *grePath = (char *) GETSTRING(GECKO_BIN_PATH); -- -- -- snprintf(xpcom_path,4096,"%s%s",grePath,"libxpcom.so"); -- -- char *lib_name =(char *) XPCOM_LIB_NAME ; -- -- -- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::xpcom_path %s \n",GetTStamp(tBuff,56),xpcom_path)); -- -- XPCOMGlueStartup("/usr/lib/xulrunner-2/libxpcom.so"); -- - nssComponent - = do_GetService(PSM_COMPONENT_CONTRACTID); - -@@ -640,23 +697,8 @@ PRBool rhCoolKey::InitInstance() - - rhICoolKey* rhCoolKey::CreateProxyObject() - { -- char tBuff[56]; -- rhICoolKey *proxyObject = NULL; -- -- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::CreateProxyObject: \n",GetTStamp(tBuff,56))); -- -- nsCOMPtr manager = -- do_GetService(NS_XPCOMPROXY_CONTRACTID); -- -- PR_ASSERT(manager); -- -- -- manager->GetProxyForObject(NULL, NS_GET_IID(rhICoolKey), this, NS_PROXY_SYNC | NS_PROXY_ALWAYS, (void**)&proxyObject); -- -- PR_LOG( coolKeyLog, PR_LOG_DEBUG, ("%s rhCoolKey::CreateProxyObject: original: %p proxy %p \n",GetTStamp(tBuff,56),this,proxyObject)); -- -- return proxyObject; -- -+ // Now we are using nsRunnable, no more proxy object manager. -+ return this; - } - - CoolKeyNode* rhCoolKey::GetCoolKeyInfo(unsigned long aKeyType, const char * aKeyID) -diff -up ./esc/src/app/xpcom/rhCoolKey.h.fix14 ./esc/src/app/xpcom/rhCoolKey.h ---- ./esc/src/app/xpcom/rhCoolKey.h.fix14 2012-05-10 15:09:37.274144142 -0700 -+++ ./esc/src/app/xpcom/rhCoolKey.h 2012-05-10 15:09:37.300143818 -0700 -@@ -120,6 +120,7 @@ protected: - static std::list< nsCOMPtr > gNotifyListeners; - - static PRLock* certCBLock; -+ static PRLock* eventLock; - - rhICoolKey* mProxy; - -diff -up ./esc/src/app/xul/esc/application.ini.fix14 ./esc/src/app/xul/esc/application.ini ---- ./esc/src/app/xul/esc/application.ini.fix14 2012-05-10 15:09:37.295143878 -0700 -+++ ./esc/src/app/xul/esc/application.ini 2012-05-10 15:09:37.300143818 -0700 -@@ -25,11 +25,11 @@ Vendor=RedHat - Name=ESC - ; - ; This field specifies your application's version. This field is optional. --Version=1.1.0-15 -+Version=1.1.0-16 - ; - ; This field specifies your application's build ID (timestamp). This field is - ; required. --BuildID=0000001016 -+BuildID=0000001017 - ; - ; This ID is just an example. Every XUL app ought to have it's own unique ID. - ; You can use the microsoft "guidgen" or "uuidgen" tools, or go on -diff -up ./esc/src/app/xul/esc/chrome/content/esc/password.xul.fix14 ./esc/src/app/xul/esc/chrome/content/esc/password.xul ---- ./esc/src/app/xul/esc/chrome/content/esc/password.xul.fix14 2012-05-10 15:09:37.251144429 -0700 -+++ ./esc/src/app/xul/esc/chrome/content/esc/password.xul 2012-05-10 15:09:37.301143805 -0700 -@@ -27,7 +27,6 @@ - - -