[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/firefox/devel firefox-1.0-nspr-config.patch, NONE, 1.1 firefox-1.0-useragent.patch, 1.1, 1.2 firefox.spec, 1.59, 1.60



Update of /cvs/dist/rpms/firefox/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv11443

Modified Files:
	firefox-1.0-useragent.patch firefox.spec 
Added Files:
	firefox-1.0-nspr-config.patch 
Log Message:
* Tue Apr 12 2005 Christopher Aillon <caillon redhat com> 0:1.0.2-4
- Update useragent patch to match upstream.
- Add nspr-config 64 bit patch from rstrode redhat com


firefox-1.0-nspr-config.patch:
 nspr-config.in |    3 ++-
 1 files changed, 2 insertions(+), 1 deletion(-)

--- NEW FILE firefox-1.0-nspr-config.patch ---
? nsprpub/config/system_wrappers
Index: nsprpub/config/nspr-config.in
===================================================================
RCS file: /cvsroot/mozilla/nsprpub/config/nspr-config.in,v
retrieving revision 1.2.2.2
diff -d -u -p -r1.2.2.2 nspr-config.in
--- nsprpub/config/nspr-config.in	28 Feb 2003 01:52:53 -0000	1.2.2.2
+++ nsprpub/config/nspr-config.in	4 Apr 2005 21:33:29 -0000
@@ -3,6 +3,7 @@
 prefix= prefix@
 exec_prefix= exec_prefix@
 exec_prefix_set=no
+libdir= libdir@
 
 major_version= MOD_MAJOR_VERSION@
 minor_version= MOD_MINOR_VERSION@
@@ -95,7 +96,7 @@ if test "$echo_cflags" = "yes"; then
 fi
 
 if test "$echo_libs" = "yes"; then
-      libdirs=-L${exec_prefix}/lib
+      libdirs=-L${libdir}
       if test -n "$lib_plds"; then
 	libdirs="$libdirs -lplds${major_version}"
       fi

firefox-1.0-useragent.patch:
 browser/app/Makefile.in                     |    2 -
 browser/app/nsBrowserApp.cpp                |    3 +
 browser/app/profile/firefox.js              |   10 +----
 netwerk/protocol/http/src/nsHttpHandler.cpp |   47 ++++++++++++++++++++++++++++
 netwerk/protocol/http/src/nsHttpHandler.h   |    1 
 xpcom/base/nscore.h                         |    6 +++
 6 files changed, 60 insertions(+), 9 deletions(-)

Index: firefox-1.0-useragent.patch
===================================================================
RCS file: /cvs/dist/rpms/firefox/devel/firefox-1.0-useragent.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- firefox-1.0-useragent.patch	16 Dec 2004 21:33:48 -0000	1.1
+++ firefox-1.0-useragent.patch	12 Apr 2005 19:47:15 -0000	1.2
@@ -1,229 +1,213 @@
-? browser/app/firefox
-? browser/app/firefox-bin
-? browser/app/profile/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}/install.rdf
-? browser/components/build/dependentLibs.h
-Index: netwerk/protocol/http/public/nsIHttpProtocolHandler.idl
-===================================================================
-RCS file: /cvsroot/mozilla/netwerk/protocol/http/public/nsIHttpProtocolHandler.idl,v
-retrieving revision 1.7
-diff -d -u -p -6 -r1.7 nsIHttpProtocolHandler.idl
---- netwerk/protocol/http/public/nsIHttpProtocolHandler.idl	14 Nov 2003 20:51:55 -0000	1.7
-+++ netwerk/protocol/http/public/nsIHttpProtocolHandler.idl	15 Dec 2004 02:17:14 -0000
-@@ -99,12 +99,22 @@ interface nsIHttpProtocolHandler : nsIPr
-     attribute ACString language;
- 
-     /**
-      * Get/Set the application comment misc portion.
-      */
-     attribute ACString misc;
-+
-+    /**
-+     * The application string (e.g. "Firefox")
-+     */
-+    attribute ACString app;
-+
-+    /**
-+     * The application sub string (e.g. "1.0")
-+     */
-+    attribute ACString appSub;
- };
- 
- %{C++
- /**
-  * At initialization time, the HTTP handler will initialize each service
-  * registered under this category:
 Index: netwerk/protocol/http/src/nsHttpHandler.cpp
 ===================================================================
 RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHttpHandler.cpp,v
 retrieving revision 1.94.2.1.2.3
-diff -d -u -p -6 -r1.94.2.1.2.3 nsHttpHandler.cpp
+diff -d -u -p -r1.94.2.1.2.3 nsHttpHandler.cpp
 --- netwerk/protocol/http/src/nsHttpHandler.cpp	15 Sep 2004 19:43:43 -0000	1.94.2.1.2.3
-+++ netwerk/protocol/http/src/nsHttpHandler.cpp	15 Dec 2004 02:17:15 -0000
-@@ -214,12 +214,14 @@ nsHttpHandler::Init()
-     LOG(("> app-version = %s\n", mAppVersion.get()));
-     LOG(("> platform = %s\n", mPlatform.get()));
-     LOG(("> oscpu = %s\n", mOscpu.get()));
-     LOG(("> security = %s\n", mSecurity.get()));
-     LOG(("> language = %s\n", mLanguage.get()));
-     LOG(("> misc = %s\n", mMisc.get()));
-+    LOG(("> app = %s\n", mApp.get()));
-+    LOG(("> app-sub = %s\n", mAppSub.get()));
++++ netwerk/protocol/http/src/nsHttpHandler.cpp	12 Apr 2005 05:15:35 -0000
+@@ -55,6 +55,7 @@
+ #include "nsAutoLock.h"
+ #include "prprf.h"
+ #include "nsReadableUtils.h"
++#include "nsQuickSort.h"
+ 
+ #if defined(XP_UNIX) || defined(XP_BEOS)
+ #include <sys/utsname.h>
+@@ -220,6 +221,7 @@ nsHttpHandler::Init()
      LOG(("> vendor = %s\n", mVendor.get()));
      LOG(("> vendor-sub = %s\n", mVendorSub.get()));
      LOG(("> vendor-comment = %s\n", mVendorComment.get()));
++    LOG(("> extra = %s\n", mExtraUA.get()));
      LOG(("> product = %s\n", mProduct.get()));
      LOG(("> product-sub = %s\n", mProductSub.get()));
      LOG(("> product-comment = %s\n", mProductComment.get()));
-@@ -520,12 +522,14 @@ nsHttpHandler::BuildUserAgent()
-                            mOscpu.Length() +
-                            mLanguage.Length() +
-                            mMisc.Length() +
-                            mProduct.Length() +
-                            mProductSub.Length() +
-                            mProductComment.Length() +
-+                           mApp.Length() +
-+                           mAppSub.Length() +
+@@ -526,6 +528,7 @@ nsHttpHandler::BuildUserAgent()
                             mVendor.Length() +
                             mVendorSub.Length() +
                             mVendorComment.Length() +
++                           mExtraUA.Length() +
                             22);
  
      // Application portion
-@@ -563,12 +567,22 @@ nsHttpHandler::BuildUserAgent()
-             mUserAgent += " (";
-             mUserAgent += mProductComment;
+@@ -580,6 +583,11 @@ nsHttpHandler::BuildUserAgent()
              mUserAgent += ')';
          }
      }
- 
-+    // App portion
-+    if (!mApp.IsEmpty()) {
-+        mUserAgent += ' ';
-+        mUserAgent += mApp;
-+        if (!mAppSub.IsEmpty()) {
-+            mUserAgent += '/';
-+            mUserAgent += mAppSub;
-+        }
-+    }
 +
-     // Vendor portion
-     if (!mVendor.IsEmpty()) {
-         mUserAgent += ' ';
-         mUserAgent += mVendor;
-         if (!mVendorSub.IsEmpty()) {
-             mUserAgent += '/';
-@@ -704,12 +718,23 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
-         prefs->GetCharPref(UA_PREF("appVersion"),
-             getter_Copies(mAppVersion));
-         if (mAppVersion.IsEmpty())
-             mAppVersion.Adopt(nsCRT::strdup(UA_APPVERSION));
-         mUserAgentIsDirty = PR_TRUE;
-     }
-+    if (PREF_CHANGED(UA_PREF("app"))) {
-+        prefs->GetCharPref(UA_PREF("app"),
-+            getter_Copies(mApp));
-+        mUserAgentIsDirty = PR_TRUE;
-+    }
-+    if (PREF_CHANGED(UA_PREF("appSub"))) {
-+        prefs->GetCharPref(UA_PREF("appSub"),
-+            getter_Copies(mAppSub));
-+        mUserAgentIsDirty = PR_TRUE;
-+    }
++    if (!mExtraUA.IsEmpty())
++        mUserAgent += mExtraUA;
 +
++    printf("UA: %s:, extra: %s\n", mUserAgent.get(), mExtraUA.get());
+ }
  
-     // Gather vendor values.
-     if (PREF_CHANGED(UA_PREF("vendor"))) {
-         prefs->GetCharPref(UA_PREF("vendor"),
-             getter_Copies(mVendor));
-         mUserAgentIsDirty = PR_TRUE;
-@@ -1448,18 +1473,50 @@ NS_IMETHODIMP
- nsHttpHandler::GetAppVersion(nsACString &value)
- {
-     value = mAppVersion;
-     return NS_OK;
+ void
+@@ -678,6 +686,12 @@ nsHttpHandler::InitUserAgentComponents()
+     mUserAgentIsDirty = PR_TRUE;
  }
  
-+
-+NS_IMETHODIMP
-+nsHttpHandler::GetApp(nsACString &value)
-+{
-+    value = mApp;
-+    return NS_OK;
-+}
-+
-+NS_IMETHODIMP
-+nsHttpHandler::GetAppSub(nsACString &value)
++static int StringCompare(const void* s1, const void* s2, void*)
 +{
-+    value = mAppSub;
-+    return NS_OK;
++    return nsCRT::strcmp(*NS_STATIC_CAST(const char *const *, s1),
++                         *NS_STATIC_CAST(const char *const *, s2));
 +}
 +
-+NS_IMETHODIMP
-+nsHttpHandler::SetApp(const nsACString &value)
-+{
-+    mApp = value;
-+    mUserAgentIsDirty = PR_TRUE;
-+    return NS_OK;
-+}
+ void
+ nsHttpHandler::PrefsChanged(nsIPrefBranch *prefs, const char *pref)
+ {
+@@ -687,6 +701,8 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
+     LOG(("nsHttpHandler::PrefsChanged [pref=%s]\n", pref));
+ 
+ #define PREF_CHANGED(p) ((pref == nsnull) || !PL_strcmp(pref, p))
++#define MULTI_PREF_CHANGED(p) \
++  ((pref == nsnull) || !PL_strncmp(pref, p, sizeof(p) - 1))
+ 
+     //
+     // UA components
+@@ -725,6 +741,36 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
+         mUserAgentIsDirty = PR_TRUE;
+     }
+ 
++    if (MULTI_PREF_CHANGED(UA_PREF("extra."))) {
++        mExtraUA.Truncate();
 +
-+NS_IMETHODIMP
-+nsHttpHandler::SetAppSub(const nsACString &value)
-+{
-+    mAppSub = value;
-+    mUserAgentIsDirty = PR_TRUE;
-+    return NS_OK;
-+}
++        // Unfortunately, we can't do this using the pref branch.
++        nsCOMPtr<nsIPrefService> service =
++            do_GetService(NS_PREFSERVICE_CONTRACTID);
++        nsCOMPtr<nsIPrefBranch> branch;
++        service->GetBranch(UA_PREF("extra."), getter_AddRefs(branch));
++        if (branch) {
++            PRUint32 extraCount;
++            char **extraItems;
++            rv = branch->GetChildList("", &extraCount, &extraItems);
++            if (NS_SUCCEEDED(rv) && extraItems) {
++                NS_QuickSort(extraItems, extraCount, sizeof(extraItems[0]),
++                             StringCompare, nsnull);
++                for (char **item = extraItems,
++                      **item_end = extraItems + extraCount;
++                     item < item_end; ++item) {
++                    nsXPIDLCString valStr;
++                    branch->GetCharPref(*item, getter_Copies(valStr));
++                    if (!valStr.IsEmpty())
++                        mExtraUA += NS_LITERAL_CSTRING(" ") + valStr;
++                }
++                NS_FREE_XPCOM_ALLOCATED_POINTER_ARRAY(extraCount, extraItems);
++            }
++        }
 +
- NS_IMETHODIMP
- nsHttpHandler::GetVendor(nsACString &value)
- {
-     value = mVendor;
-     return NS_OK;
- }
++        mUserAgentIsDirty = PR_TRUE;
++    }
 +
- NS_IMETHODIMP
- nsHttpHandler::SetVendor(const nsACString &value)
- {
-     mVendor = value;
-     mUserAgentIsDirty = PR_TRUE;
-     return NS_OK;
-@@ -1468,12 +1525,13 @@ nsHttpHandler::SetVendor(const nsACStrin
- NS_IMETHODIMP
- nsHttpHandler::GetVendorSub(nsACString &value)
- {
-     value = mVendorSub;
-     return NS_OK;
+     // Gather product values.
+     if (PREF_CHANGED(UA_PREF("product"))) {
+         prefs->GetCharPref(UA_PREF_PREFIX "product",
+@@ -1065,6 +1111,7 @@ nsHttpHandler::PrefsChanged(nsIPrefBranc
+     }
+ 
+ #undef PREF_CHANGED
++#undef MULTI_PREF_CHANGED
  }
-+
- NS_IMETHODIMP
- nsHttpHandler::SetVendorSub(const nsACString &value)
- {
-     mVendorSub = value;
-     mUserAgentIsDirty = PR_TRUE;
-     return NS_OK;
+ 
+ /**
 Index: netwerk/protocol/http/src/nsHttpHandler.h
 ===================================================================
 RCS file: /cvsroot/mozilla/netwerk/protocol/http/src/nsHttpHandler.h,v
 retrieving revision 1.37.2.1
-diff -d -u -p -6 -r1.37.2.1 nsHttpHandler.h
+diff -d -u -p -r1.37.2.1 nsHttpHandler.h
 --- netwerk/protocol/http/src/nsHttpHandler.h	8 May 2004 00:37:08 -0000	1.37.2.1
-+++ netwerk/protocol/http/src/nsHttpHandler.h	15 Dec 2004 02:17:15 -0000
-@@ -264,12 +264,14 @@ private:
-     nsXPIDLCString mVendor;
-     nsXPIDLCString mVendorSub;
-     nsXPIDLCString mVendorComment;
++++ netwerk/protocol/http/src/nsHttpHandler.h	12 Apr 2005 05:15:35 -0000
+@@ -267,6 +267,7 @@ private:
      nsXPIDLCString mProduct;
      nsXPIDLCString mProductSub;
      nsXPIDLCString mProductComment;
-+    nsXPIDLCString mApp;
-+    nsXPIDLCString mAppSub;
++    nsCString      mExtraUA;
  
      nsCString      mUserAgent;
      nsXPIDLCString mUserAgentOverride;
-     PRPackedBool   mUserAgentIsDirty; // true if mUserAgent should be rebuilt
- 
-     PRPackedBool   mUseCache;
+Index: xpcom/base/nscore.h
+===================================================================
+RCS file: /cvsroot/mozilla/xpcom/base/nscore.h,v
+retrieving revision 1.68
+diff -d -u -p -r1.68 nscore.h
+--- xpcom/base/nscore.h	25 Mar 2004 19:55:16 -0000	1.68
++++ xpcom/base/nscore.h	12 Apr 2005 05:15:39 -0000
+@@ -369,6 +369,12 @@ typedef PRUint32 nsresult;
+ #define NS_INT32_TO_PTR(x) ((void *)((char *)0 + (x)))
+ 
+ /*
++ * Use NS_STRINGIFY to form a string literal from the value of a macro.
++ */
++#define NS_STRINGIFY_HELPER(x_) #x_
++#define NS_STRINGIFY(x_) NS_STRINGIFY_HELPER(x_)
++
++/*
+  * These macros allow you to give a hint to the compiler about branch
+  * probability so that it can better optimize.  Use them like this:
+  *
+Index: browser/app/Makefile.in
+===================================================================
+RCS file: /cvsroot/mozilla/browser/app/Makefile.in,v
+retrieving revision 1.52.2.2.2.19
+diff -d -u -p -r1.52.2.2.2.19 Makefile.in
+--- browser/app/Makefile.in	7 Nov 2004 00:33:34 -0000	1.52.2.2.2.19
++++ browser/app/Makefile.in	12 Apr 2005 05:15:39 -0000
+@@ -159,7 +159,7 @@ include $(topsrcdir)/config/static-rules
+ endif
+ 
+ APP_VERSION = $(shell cat $(srcdir)/../config/version.txt)
+-DEFINES += -DAPP_VERSION=\"$(APP_VERSION)\"
++DEFINES += -DAPP_VERSION=$(APP_VERSION)
+ 
+ BUILD_ID = $(shell cat $(DEPTH)/config/build_number)
+ DEFINES += -DBUILD_ID=\"$(BUILD_ID)\"
+Index: browser/app/nsBrowserApp.cpp
+===================================================================
+RCS file: /cvsroot/mozilla/browser/app/nsBrowserApp.cpp,v
+retrieving revision 1.10.4.3
+diff -d -u -p -r1.10.4.3 nsBrowserApp.cpp
+--- browser/app/nsBrowserApp.cpp	4 Jun 2004 00:06:12 -0000	1.10.4.3
++++ browser/app/nsBrowserApp.cpp	12 Apr 2005 05:15:39 -0000
+@@ -42,11 +42,12 @@
+ #include <stdlib.h>
+ #endif
+ #include "nsBuildID.h"
++#include "nscore.h"
+ 
+ static const nsXREAppData kAppData = {
+   "Mozilla",
+   "Firefox",
+-  APP_VERSION,
++  NS_STRINGIFY(APP_VERSION),
+   BUILD_ID,
+   "Copyright (c) 2004 mozilla.org",
+   PR_FALSE
 Index: browser/app/profile/firefox.js
 ===================================================================
 RCS file: /cvsroot/mozilla/browser/app/profile/firefox.js,v
-retrieving revision 1.7.4.40
-diff -d -u -p -6 -r1.7.4.40 firefox.js
---- browser/app/profile/firefox.js	5 Nov 2004 09:10:05 -0000	1.7.4.40
-+++ browser/app/profile/firefox.js	15 Dec 2004 02:17:15 -0000
-@@ -119,14 +119,14 @@ pref("update.severity", 0); 
- pref("xpinstall.whitelist.add", "update.mozilla.org");
- 
- pref("keyword.enabled", true);
+retrieving revision 1.7.4.40.2.1
+diff -d -u -p -r1.7.4.40.2.1 firefox.js
+--- browser/app/profile/firefox.js	4 Feb 2005 03:03:07 -0000	1.7.4.40.2.1
++++ browser/app/profile/firefox.js	12 Apr 2005 05:15:39 -0000
+@@ -53,9 +53,8 @@ pref("xpinstall.dialog.progress.type.chr
+ // this application as an extension target, and by the SmartUpdate system to identify
+ // this application to the Update server.
+ pref("app.id", "{ec8030f7-c20a-464f-9b0e-13a3a9e97384}");
+-pref("app.version", 
+-#expand __APP_VERSION__
+-);
++#expand pref("app.version", "__APP_VERSION__");
++
+ pref("app.extensions.version", "1.0");
+ pref("app.build_id", 
+ #expand __BUILD_ID__
+@@ -122,10 +121,7 @@ pref("keyword.enabled", true);
  pref("keyword.URL", "http://www.google.com/search?btnI=I%27m+Feeling+Lucky&ie=UTF-8&oe=UTF-8&q=";);
  
  pref("general.skins.selectedSkin", "classic/1.0");
 -pref("general.useragent.vendor", "Firefox");
 -pref("general.useragent.vendorSub", 
-+pref("general.useragent.app", "Firefox");
-+pref("general.useragent.appSub", 
- #expand __APP_VERSION__
- );
+-#expand __APP_VERSION__
+-);
++#expand pref("general.useragent.extra.firefox", "Firefox/__APP_VERSION__");
  
  pref("general.smoothScroll", false);
  #ifdef XP_UNIX
- pref("general.autoScroll", false);


Index: firefox.spec
===================================================================
RCS file: /cvs/dist/rpms/firefox/devel/firefox.spec,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -r1.59 -r1.60
--- firefox.spec	28 Mar 2005 19:47:04 -0000	1.59
+++ firefox.spec	12 Apr 2005 19:47:15 -0000	1.60
@@ -10,7 +10,7 @@
 Summary:        Mozilla Firefox Web browser.
 Name:           firefox
 Version:        1.0.2
-Release:        3
+Release:        4
 Epoch:          0
 URL:            http://www.mozilla.org/projects/firefox/
 License:        MPL/LGPL
@@ -36,6 +36,7 @@
 Patch2:         firefox-1.0-prdtoa.patch
 Patch3:         firefox-1.0-gcc4-compile.patch
 Patch4:         firefox-1.0-recv-fortify.patch
+Patch5:         firefox-1.0-nspr-config.patch
 
 # customization patches
 Patch20:        firefox-redhat-homepage.patch
@@ -116,6 +117,7 @@
 %patch2  -p0
 %patch3  -p0
 %patch4  -p0
+%patch5  -p0
 %patch20 -p0
 %patch21 -p1
 %patch22 -p1
@@ -330,6 +332,10 @@
 #---------------------------------------------------------------------
 
 %changelog
+* Tue Apr 12 2005 Christopher Aillon <caillon redhat com> 0:1.0.2-4
+- Update useragent patch to match upstream.
+- Add nspr-config 64 bit patch from rstrode redhat com
+
 * Mon Mar 28 2005 Christopher Aillon <caillon redhat com> 0:1.0.2-3
 - Updated firefox icon (https://bugzilla.mozilla.org/show_bug.cgi?id=261679)
 - Fix for some more cursor issues in textareas (149991, 150002, 152089)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]