* Tue Oct 18 2012 Martin Stransky <stransky@redhat.com> - 7.0.1-3
- Added NM patches (mozbz#627672, mozbz#639959)
This commit is contained in:
parent
77af11c19b
commit
c42ede5927
@ -7,6 +7,7 @@ pref("general.useragent.vendorSub", "THUNDERBIRD_RPM_VR");
|
||||
pref("intl.locale.matchOS", true);
|
||||
pref("mail.shell.checkDefaultClient", false);
|
||||
pref("toolkit.networkmanager.disable", false);
|
||||
pref("offline.autoDetect", true);
|
||||
|
||||
# Disable global indexing by default
|
||||
pref("mailnews.database.global.indexer.enabled", false);
|
||||
|
@ -34,7 +34,7 @@
|
||||
Summary: Mozilla Thunderbird mail/newsgroup client
|
||||
Name: thunderbird
|
||||
Version: 7.0.1
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
URL: http://www.mozilla.org/projects/thunderbird/
|
||||
License: MPLv1.1 or GPLv2+ or LGPLv2+
|
||||
Group: Applications/Internet
|
||||
@ -60,8 +60,11 @@ Patch0: thunderbird-install-dir.patch
|
||||
Patch7: crashreporter-remove-static.patch
|
||||
Patch8: xulrunner-6.0-secondary-ipc.patch
|
||||
Patch9: mozilla-670719.patch
|
||||
Patch10: xulrunner-2.0-network-link-service.patch
|
||||
Patch11: xulrunner-2.0-NetworkManager09.patch
|
||||
|
||||
# backport from 8.0beta
|
||||
Patch10: xulrunner-7.0.1-yarr-jit.patch
|
||||
Patch100: xulrunner-7.0.1-yarr-jit.patch
|
||||
|
||||
%if %{official_branding}
|
||||
# Required by Mozilla Corporation
|
||||
@ -141,7 +144,9 @@ cd mozilla
|
||||
%patch7 -p2 -b .static
|
||||
%patch8 -p2 -b .secondary-ipc
|
||||
%patch9 -p1 -b .moz670719
|
||||
%patch10 -p2 -b .yarr-jit
|
||||
%patch10 -p1 -b .link-service
|
||||
%patch11 -p1 -b .NetworkManager09
|
||||
%patch100 -p2 -b .yarr-jit
|
||||
cd ..
|
||||
|
||||
%if %{official_branding}
|
||||
@ -181,16 +186,17 @@ export CXXFLAGS=$MOZ_OPT_FLAGS
|
||||
export PREFIX='%{_prefix}'
|
||||
export LIBDIR='%{_libdir}'
|
||||
|
||||
%define moz_make_flags -j1
|
||||
%ifarch ppc ppc64 s390 s390x
|
||||
%define moz_make_flags -j1
|
||||
%else
|
||||
%define moz_make_flags %{?_smp_mflags}
|
||||
MOZ_SMP_FLAGS=-j1
|
||||
# On x86 architectures, Mozilla can build up to 4 jobs at once in parallel,
|
||||
# however builds tend to fail on other arches when building in parallel.
|
||||
%ifarch %{ix86} x86_64
|
||||
[ -z "$RPM_BUILD_NCPUS" ] && \
|
||||
RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`"
|
||||
[ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2
|
||||
[ "$RPM_BUILD_NCPUS" -ge 4 ] && MOZ_SMP_FLAGS=-j4
|
||||
%endif
|
||||
|
||||
export LDFLAGS="-Wl,-rpath,%{mozappdir}"
|
||||
export MAKE="gmake %{moz_make_flags}"
|
||||
make -f client.mk build
|
||||
make -f client.mk build STRIP="/bin/true" MOZ_MAKE_FLAGS="$MOZ_SMP_FLAGS"
|
||||
|
||||
# create debuginfo for crash-stats.mozilla.com
|
||||
%if %{enable_mozilla_crashreporter}
|
||||
@ -347,6 +353,9 @@ gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
|
||||
#===============================================================================
|
||||
|
||||
%changelog
|
||||
* Tue Oct 18 2012 Martin Stransky <stransky@redhat.com> - 7.0.1-3
|
||||
- Added NM patches (mozbz#627672, mozbz#639959)
|
||||
|
||||
* Wed Oct 12 2011 Dan Horák <dan[at]danny.cz> - 7.0.1-2
|
||||
- fix build on secondary arches (copied from xulrunner)
|
||||
|
||||
|
51
xulrunner-2.0-NetworkManager09.patch
Normal file
51
xulrunner-2.0-NetworkManager09.patch
Normal file
@ -0,0 +1,51 @@
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=639959
|
||||
|
||||
--- source/toolkit/system/dbus/nsNetworkManagerListener.cpp.foo 2011-03-08 14:26:28.167074923 -0600
|
||||
+++ source/toolkit/system/dbus/nsNetworkManagerListener.cpp 2011-03-08 14:30:54.260748294 -0600
|
||||
@@ -51,15 +51,13 @@
|
||||
#define NM_DBUS_SERVICE "org.freedesktop.NetworkManager"
|
||||
#define NM_DBUS_PATH "/org/freedesktop/NetworkManager"
|
||||
#define NM_DBUS_INTERFACE "org.freedesktop.NetworkManager"
|
||||
-#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange"
|
||||
-typedef enum NMState
|
||||
-{
|
||||
- NM_STATE_UNKNOWN = 0,
|
||||
- NM_STATE_ASLEEP,
|
||||
- NM_STATE_CONNECTING,
|
||||
- NM_STATE_CONNECTED,
|
||||
- NM_STATE_DISCONNECTED
|
||||
-} NMState;
|
||||
+#define NM_DBUS_SIGNAL_STATE_CHANGE "StateChange" /* Deprecated in 0.7.x */
|
||||
+#define NM_DBUS_SIGNAL_STATE_CHANGED "StateChanged"
|
||||
+
|
||||
+#define NM_STATE_CONNECTED_OLD 3
|
||||
+#define NM_STATE_CONNECTED_LOCAL 50
|
||||
+#define NM_STATE_CONNECTED_SITE 60
|
||||
+#define NM_STATE_CONNECTED_GLOBAL 70
|
||||
|
||||
nsNetworkManagerListener::nsNetworkManagerListener() :
|
||||
mLinkUp(PR_TRUE), mNetworkManagerActive(PR_FALSE),
|
||||
@@ -174,7 +172,9 @@
|
||||
PRBool
|
||||
nsNetworkManagerListener::HandleMessage(DBusMessage* message) {
|
||||
if (dbus_message_is_signal(message, NM_DBUS_INTERFACE,
|
||||
- NM_DBUS_SIGNAL_STATE_CHANGE)) {
|
||||
+ NM_DBUS_SIGNAL_STATE_CHANGE) ||
|
||||
+ dbus_message_is_signal(message, NM_DBUS_INTERFACE,
|
||||
+ NM_DBUS_SIGNAL_STATE_CHANGED)) {
|
||||
UpdateNetworkStatus(message);
|
||||
return PR_TRUE;
|
||||
}
|
||||
@@ -191,7 +191,10 @@
|
||||
mNetworkManagerActive = PR_TRUE;
|
||||
|
||||
PRBool wasUp = mLinkUp;
|
||||
- mLinkUp = result == NM_STATE_CONNECTED;
|
||||
+ mLinkUp = (result == NM_STATE_CONNECTED_OLD) ||
|
||||
+ (result == NM_STATE_CONNECTED_LOCAL) ||
|
||||
+ (result == NM_STATE_CONNECTED_SITE) ||
|
||||
+ (result == NM_STATE_CONNECTED_GLOBAL);
|
||||
if (wasUp == mLinkUp)
|
||||
return;
|
||||
|
||||
|
274
xulrunner-2.0-network-link-service.patch
Normal file
274
xulrunner-2.0-network-link-service.patch
Normal file
@ -0,0 +1,274 @@
|
||||
# HG changeset patch
|
||||
# Parent 31879b88cc82c1f44e6a6c25a05aa2c70af22d7e
|
||||
# User Martin Stransky <stransky@redhat.com>
|
||||
Bug 627672 - XPCOM component (libdbusservice.so) is not registered although it should be; r=cbiesinger
|
||||
|
||||
|
||||
|
||||
diff --git a/netwerk/base/src/nsIOService.cpp b/netwerk/base/src/nsIOService.cpp
|
||||
--- a/netwerk/base/src/nsIOService.cpp
|
||||
+++ b/netwerk/base/src/nsIOService.cpp
|
||||
@@ -160,31 +160,33 @@ PRInt16 gBadPortList[] = {
|
||||
2049, // nfs
|
||||
4045, // lockd
|
||||
6000, // x11
|
||||
0, // This MUST be zero so that we can populating the array
|
||||
};
|
||||
|
||||
static const char kProfileChangeNetTeardownTopic[] = "profile-change-net-teardown";
|
||||
static const char kProfileChangeNetRestoreTopic[] = "profile-change-net-restore";
|
||||
+static const char kStartupTopic[] = "profile-after-change";
|
||||
|
||||
// Necko buffer cache
|
||||
nsIMemory* nsIOService::gBufferCache = nsnull;
|
||||
PRUint32 nsIOService::gDefaultSegmentSize = 4096;
|
||||
PRUint32 nsIOService::gDefaultSegmentCount = 24;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
nsIOService::nsIOService()
|
||||
: mOffline(PR_TRUE)
|
||||
, mOfflineForProfileChange(PR_FALSE)
|
||||
, mManageOfflineStatus(PR_TRUE)
|
||||
, mSettingOffline(PR_FALSE)
|
||||
, mSetOfflineValue(PR_FALSE)
|
||||
, mShutdown(PR_FALSE)
|
||||
+ , mNetworkLinkServiceInitialized(PR_FALSE)
|
||||
, mChannelEventSinks(NS_CHANNEL_EVENT_SINK_CATEGORY)
|
||||
, mContentSniffers(NS_CONTENT_SNIFFER_CATEGORY)
|
||||
, mAutoDialEnabled(PR_FALSE)
|
||||
{
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsIOService::Init()
|
||||
@@ -230,16 +232,17 @@ nsIOService::Init()
|
||||
}
|
||||
|
||||
// Register for profile change notifications
|
||||
nsCOMPtr<nsIObserverService> observerService =
|
||||
mozilla::services::GetObserverService();
|
||||
if (observerService) {
|
||||
observerService->AddObserver(this, kProfileChangeNetTeardownTopic, PR_TRUE);
|
||||
observerService->AddObserver(this, kProfileChangeNetRestoreTopic, PR_TRUE);
|
||||
+ observerService->AddObserver(this, kStartupTopic, PR_TRUE);
|
||||
observerService->AddObserver(this, NS_XPCOM_SHUTDOWN_OBSERVER_ID, PR_TRUE);
|
||||
observerService->AddObserver(this, NS_NETWORK_LINK_TOPIC, PR_TRUE);
|
||||
}
|
||||
else
|
||||
NS_WARNING("failed to get observer service");
|
||||
|
||||
NS_TIME_FUNCTION_MARK("Registered observers");
|
||||
|
||||
@@ -258,29 +261,19 @@ nsIOService::Init()
|
||||
NS_WARN_IF_FALSE(NS_SUCCEEDED(rv), "Was unable to allocate. No gBufferCache.");
|
||||
CallQueryInterface(recyclingAllocator, &gBufferCache);
|
||||
}
|
||||
|
||||
NS_TIME_FUNCTION_MARK("Set up the recycling allocator");
|
||||
|
||||
gIOService = this;
|
||||
|
||||
- // go into managed mode if we can, and chrome process
|
||||
- if (XRE_GetProcessType() == GeckoProcessType_Default)
|
||||
- mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID);
|
||||
-
|
||||
- if (!mNetworkLinkService)
|
||||
- // We can't really determine if the machine has a usable network connection,
|
||||
- // so let's cross our fingers!
|
||||
- mManageOfflineStatus = PR_FALSE;
|
||||
-
|
||||
- if (mManageOfflineStatus)
|
||||
- TrackNetworkLinkStatusForOffline();
|
||||
- else
|
||||
- SetOffline(PR_FALSE);
|
||||
+ // We can't really determine if the machine has a usable network connection,
|
||||
+ // (mNetworkLinkService will be initialized later) so let's cross our fingers!
|
||||
+ SetOffline(PR_FALSE);
|
||||
|
||||
NS_TIME_FUNCTION_MARK("Set up network link service");
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
||||
nsIOService::~nsIOService()
|
||||
@@ -306,16 +299,57 @@ nsIOService::InitializeSocketTransportSe
|
||||
rv = mSocketTransportService->Init();
|
||||
NS_ASSERTION(NS_SUCCEEDED(rv), "socket transport service init failed");
|
||||
mSocketTransportService->SetAutodialEnabled(mAutoDialEnabled);
|
||||
}
|
||||
|
||||
return rv;
|
||||
}
|
||||
|
||||
+nsresult
|
||||
+nsIOService::InitializeNetworkLinkService()
|
||||
+{
|
||||
+ NS_TIME_FUNCTION;
|
||||
+
|
||||
+ nsresult rv = NS_OK;
|
||||
+
|
||||
+ if (mNetworkLinkServiceInitialized)
|
||||
+ return rv;
|
||||
+
|
||||
+#if defined(MOZ_PLATFORM_MAEMO)
|
||||
+ // libdbusservice fails to initialize on Maemo platform, see Bug 627672
|
||||
+ mNetworkLinkService = NULL;
|
||||
+#else
|
||||
+ // go into managed mode if we can, and chrome process
|
||||
+ if (XRE_GetProcessType() == GeckoProcessType_Default)
|
||||
+ {
|
||||
+ mNetworkLinkService = do_GetService(NS_NETWORK_LINK_SERVICE_CONTRACTID, &rv);
|
||||
+ if (NS_FAILED(rv)) {
|
||||
+ NS_WARNING("failed to get network link service");
|
||||
+ return rv;
|
||||
+ }
|
||||
+ }
|
||||
+#endif
|
||||
+
|
||||
+ mNetworkLinkServiceInitialized = PR_TRUE;
|
||||
+
|
||||
+ if (!mNetworkLinkService) {
|
||||
+ // We can't really determine if the machine has a usable network connection,
|
||||
+ // so let's cross our fingers!
|
||||
+ mManageOfflineStatus = PR_FALSE;
|
||||
+ }
|
||||
+
|
||||
+ if (mManageOfflineStatus)
|
||||
+ TrackNetworkLinkStatusForOffline();
|
||||
+ else
|
||||
+ SetOffline(PR_FALSE);
|
||||
+
|
||||
+ return rv;
|
||||
+}
|
||||
+
|
||||
nsIOService*
|
||||
nsIOService::GetInstance() {
|
||||
if (!gIOService) {
|
||||
gIOService = new nsIOService();
|
||||
if (!gIOService)
|
||||
return nsnull;
|
||||
NS_ADDREF(gIOService);
|
||||
|
||||
@@ -689,16 +723,19 @@ nsIOService::NewChannel(const nsACString
|
||||
if (NS_FAILED(rv)) return rv;
|
||||
|
||||
return NewChannelFromURI(uri, result);
|
||||
}
|
||||
|
||||
PRBool
|
||||
nsIOService::IsLinkUp()
|
||||
{
|
||||
+ NS_ASSERTION(mNetworkLinkServiceInitialized,
|
||||
+ "network link service should be initialized");
|
||||
+
|
||||
if (!mNetworkLinkService) {
|
||||
// We cannot decide, assume the link is up
|
||||
return PR_TRUE;
|
||||
}
|
||||
|
||||
PRBool isLinkUp;
|
||||
nsresult rv;
|
||||
rv = mNetworkLinkService->GetIsLinkUp(&isLinkUp);
|
||||
@@ -968,16 +1005,20 @@ nsIOService::Observe(nsISupports *subjec
|
||||
if (mOfflineForProfileChange) {
|
||||
mOfflineForProfileChange = PR_FALSE;
|
||||
if (!mManageOfflineStatus ||
|
||||
NS_FAILED(TrackNetworkLinkStatusForOffline())) {
|
||||
SetOffline(PR_FALSE);
|
||||
}
|
||||
}
|
||||
}
|
||||
+ else if (!strcmp(topic, kStartupTopic)) {
|
||||
+ // Lazy initialization of network link service (see bug 620472)
|
||||
+ InitializeNetworkLinkService();
|
||||
+ }
|
||||
else if (!strcmp(topic, NS_XPCOM_SHUTDOWN_OBSERVER_ID)) {
|
||||
// Remember we passed XPCOM shutdown notification to prevent any
|
||||
// changes of the offline status from now. We must not allow going
|
||||
// online after this point.
|
||||
mShutdown = PR_TRUE;
|
||||
|
||||
SetOffline(PR_TRUE);
|
||||
|
||||
@@ -1085,32 +1126,40 @@ nsIOService::NewSimpleNestedURI(nsIURI*
|
||||
NS_IF_ADDREF(*aResult = new nsSimpleNestedURI(safeURI));
|
||||
return *aResult ? NS_OK : NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIOService::SetManageOfflineStatus(PRBool aManage) {
|
||||
PRBool wasManaged = mManageOfflineStatus;
|
||||
mManageOfflineStatus = aManage;
|
||||
+
|
||||
+ if (!mNetworkLinkServiceInitialized) {
|
||||
+ InitializeNetworkLinkService();
|
||||
+ }
|
||||
+
|
||||
if (mManageOfflineStatus && !wasManaged)
|
||||
return TrackNetworkLinkStatusForOffline();
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
NS_IMETHODIMP
|
||||
nsIOService::GetManageOfflineStatus(PRBool* aManage) {
|
||||
*aManage = mManageOfflineStatus;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsresult
|
||||
nsIOService::TrackNetworkLinkStatusForOffline()
|
||||
{
|
||||
NS_ASSERTION(mManageOfflineStatus,
|
||||
"Don't call this unless we're managing the offline status");
|
||||
+ NS_ASSERTION(mNetworkLinkServiceInitialized,
|
||||
+ "network link service should be set up");
|
||||
+
|
||||
if (!mNetworkLinkService)
|
||||
return NS_ERROR_FAILURE;
|
||||
|
||||
if (mShutdown)
|
||||
return NS_ERROR_NOT_AVAILABLE;
|
||||
|
||||
// check to make sure this won't collide with Autodial
|
||||
if (mSocketTransportService) {
|
||||
diff --git a/netwerk/base/src/nsIOService.h b/netwerk/base/src/nsIOService.h
|
||||
--- a/netwerk/base/src/nsIOService.h
|
||||
+++ b/netwerk/base/src/nsIOService.h
|
||||
@@ -129,16 +129,17 @@ private:
|
||||
nsIProtocolHandler* hdlr);
|
||||
|
||||
// Prefs wrangling
|
||||
NS_HIDDEN_(void) PrefsChanged(nsIPrefBranch *prefs, const char *pref = nsnull);
|
||||
NS_HIDDEN_(void) GetPrefBranch(nsIPrefBranch2 **);
|
||||
NS_HIDDEN_(void) ParsePortList(nsIPrefBranch *prefBranch, const char *pref, PRBool remove);
|
||||
|
||||
nsresult InitializeSocketTransportService();
|
||||
+ nsresult InitializeNetworkLinkService();
|
||||
|
||||
private:
|
||||
PRPackedBool mOffline;
|
||||
PRPackedBool mOfflineForProfileChange;
|
||||
PRPackedBool mManageOfflineStatus;
|
||||
|
||||
// Used to handle SetOffline() reentrancy. See the comment in
|
||||
// SetOffline() for more details.
|
||||
@@ -146,16 +147,17 @@ private:
|
||||
PRPackedBool mSetOfflineValue;
|
||||
|
||||
PRPackedBool mShutdown;
|
||||
|
||||
nsCOMPtr<nsPISocketTransportService> mSocketTransportService;
|
||||
nsCOMPtr<nsPIDNSService> mDNSService;
|
||||
nsCOMPtr<nsIProtocolProxyService2> mProxyService;
|
||||
nsCOMPtr<nsINetworkLinkService> mNetworkLinkService;
|
||||
+ PRPackedBool mNetworkLinkServiceInitialized;
|
||||
|
||||
// Cached protocol handlers
|
||||
nsWeakPtr mWeakHandler[NS_N(gScheme)];
|
||||
|
||||
// cached categories
|
||||
nsCategoryCache<nsIChannelEventSink> mChannelEventSinks;
|
||||
nsCategoryCache<nsIContentSniffer> mContentSniffers;
|
||||
|
Loading…
Reference in New Issue
Block a user