From d881d9905146609b4a4f0dc5e716f484715f1d83 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Thu, 17 Apr 2014 16:09:23 -0700 Subject: [PATCH 1/6] Fixes to adjust for latest xulrunner sdk. --- esc-1.1.0-fix18.patch | 82 +++++++++++++++++++++++++++++++++++++++++++ esc.spec | 6 +++- 2 files changed, 87 insertions(+), 1 deletion(-) create mode 100644 esc-1.1.0-fix18.patch 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 From b9f088915ec922518eca75ba767f2a84d06ced31 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Wed, 23 Apr 2014 16:17:11 -0700 Subject: [PATCH 2/6] Fix for #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..f7d2aff 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 +* Mon 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 cf2c625b101f828553ffb2980cbf75780c494866 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Wed, 23 Apr 2014 16:47:00 -0700 Subject: [PATCH 3/6] Fix bogus changelog date. --- esc.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/esc.spec b/esc.spec index f7d2aff..038afeb 100644 --- a/esc.spec +++ b/esc.spec @@ -236,7 +236,7 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog -* Mon Apr 23 2014 Jack Magne =1.1.0-24 +* 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. From aa71639ebbcbbc0c7ff407c9e5d42bdd03dc70b0 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Tue, 9 Sep 2014 14:32:10 -0700 Subject: [PATCH 4/6] Fix yet another xulrunner build/run issue. --- esc.spec | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/esc.spec b/esc.spec index 038afeb..38ce951 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 @@ -41,14 +41,16 @@ 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: autoconf213 libX11-devel libXt-devel -BuildRequires: xulrunner xulrunner-devel +BuildRequires: xulrunner-devel >= 25.0 +BuildRequires: xulrunner-devel < 25.1 BuildRequires: pcsc-lite-devel coolkey-devel BuildRequires: desktop-file-utils zip binutils libnotify-devel BuildRequires: dbus-devel Requires: pcsc-lite coolkey nss nspr Requires: zip dbus >= 0.90 libnotify >= 0.4.2 -Requires: xulrunner +Requires: xulrunner <= 25.0 +Requires: xulrunner < 25.1 # 390 does not have coolkey or smartCards ExcludeArch: s390 s390x @@ -71,7 +73,7 @@ AutoReqProv: 0 %define escxuldir src/app/xul/esc %define escxulchromeicons %{escxuldir}/chrome/icons/default %define escdaemon escd -%define geckoversion 27.0 +%define geckoversion 25.0 Source0: http://pki.fedoraproject.org/pki/sources/%name/%{escname}.tar.bz2 Source1: http://pki.fedoraproject.org/pki/sources/%name/esc @@ -236,7 +238,10 @@ if [ -x %{_bindir}/gtk-update-icon-cache ]; then fi %changelog -* Wed Apr 23 2014 Jack Magne =1.1.0-24 +* Tue Sep 09 2014 Jack Magne =1.1.0-25 +- Adjust spec file only to restrict xulrunner-devel and xulrunner version. +- We have no choice since the latest devel package has no way to install an app. +* Mon 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. From 2a90d0ee6b0f6742507d45ecad56489aacea9ca8 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Tue, 9 Sep 2014 15:11:50 -0700 Subject: [PATCH 5/6] More xulrunner fun. --- esc.spec | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/esc.spec b/esc.spec index 38ce951..187afdc 100644 --- a/esc.spec +++ b/esc.spec @@ -41,8 +41,7 @@ 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: autoconf213 libX11-devel libXt-devel -BuildRequires: xulrunner-devel >= 25.0 -BuildRequires: xulrunner-devel < 25.1 +BuildRequires: xulrunner-devel = 25.0-1 BuildRequires: pcsc-lite-devel coolkey-devel BuildRequires: desktop-file-utils zip binutils libnotify-devel From a3fe2dd6adf127df4b9bf7a088aae8716527e535 Mon Sep 17 00:00:00 2001 From: Jack Magne Date: Tue, 9 Sep 2014 17:44:56 -0700 Subject: [PATCH 6/6] Xulrunner. --- esc.spec | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/esc.spec b/esc.spec index 187afdc..aa9d9b8 100644 --- a/esc.spec +++ b/esc.spec @@ -41,15 +41,14 @@ 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: autoconf213 libX11-devel libXt-devel -BuildRequires: xulrunner-devel = 25.0-1 +BuildRequires: xulrunner-devel <= 27.0 BuildRequires: pcsc-lite-devel coolkey-devel BuildRequires: desktop-file-utils zip binutils libnotify-devel BuildRequires: dbus-devel Requires: pcsc-lite coolkey nss nspr Requires: zip dbus >= 0.90 libnotify >= 0.4.2 -Requires: xulrunner <= 25.0 -Requires: xulrunner < 25.1 +Requires: xulrunner # 390 does not have coolkey or smartCards ExcludeArch: s390 s390x @@ -72,7 +71,7 @@ AutoReqProv: 0 %define escxuldir src/app/xul/esc %define escxulchromeicons %{escxuldir}/chrome/icons/default %define escdaemon escd -%define geckoversion 25.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 @@ -238,7 +237,7 @@ fi %changelog * Tue Sep 09 2014 Jack Magne =1.1.0-25 -- Adjust spec file only to restrict xulrunner-devel and xulrunner version. +- Adjust spec file only to restrict xulrunner-devel version. - We have no choice since the latest devel package has no way to install an app. * Mon Apr 23 2014 Jack Magne =1.1.0-24 - Fix minor http client error.