From 68a99cc65e1527fad7d558d334bd154600b94de4 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Sun, 10 Feb 2013 08:25:24 +0100 Subject: Enigmail 1.5.1 --- mozilla-746112.patch | 86 +++++++++++++++++++++++++++++++++++++++++++++++ mozilla-791626.patch | 46 +++++++++++++++++++++++++ thunderbird-enigmail.spec | 30 +++++++++++------ 3 files changed, 152 insertions(+), 10 deletions(-) create mode 100644 mozilla-746112.patch create mode 100644 mozilla-791626.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch new file mode 100644 index 0000000..01f6e16 --- /dev/null +++ b/mozilla-746112.patch @@ -0,0 +1,86 @@ +diff -up xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h +--- xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h.746112 2012-10-17 16:32:43.000000000 +0200 ++++ xulrunner-17.0/mozilla-beta/js/src/gc/Heap.h 2012-10-24 14:48:12.186640489 +0200 +@@ -103,26 +103,31 @@ struct Cell + }; + + /* +- * Page size is 4096 by default, except for SPARC, where it is 8192. ++ * Page size must be static to support our arena pointer optimizations, so we ++ * are forced to support each platform with non-4096 pages as a special case. ++ * Note: The freelist supports a maximum arena shift of 15. + * Note: Do not use JS_CPU_SPARC here, this header is used outside JS. + * Bug 692267: Move page size definition to gc/Memory.h and include it + * directly once jsgc.h is no longer an installed header. + */ + #if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9)) + const size_t PageShift = 13; ++const size_t ArenaShift = PageShift; ++#elif defined(__powerpc__) ++const size_t PageShift = 16; ++const size_t ArenaShift = 12; + #else + const size_t PageShift = 12; ++const size_t ArenaShift = PageShift; + #endif + const size_t PageSize = size_t(1) << PageShift; ++const size_t ArenaSize = size_t(1) << ArenaShift; ++const size_t ArenaMask = ArenaSize - 1; + + const size_t ChunkShift = 20; + const size_t ChunkSize = size_t(1) << ChunkShift; + const size_t ChunkMask = ChunkSize - 1; + +-const size_t ArenaShift = PageShift; +-const size_t ArenaSize = PageSize; +-const size_t ArenaMask = ArenaSize - 1; +- + /* + * This is the maximum number of arenas we allow in the FreeCommitted state + * before we trigger a GC_SHRINK to release free arenas to the OS. +diff -up xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp +--- xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp.746112 2012-10-17 16:32:44.000000000 +0200 ++++ xulrunner-17.0/mozilla-beta/js/src/jsgc.cpp 2012-10-24 14:46:28.253638095 +0200 +@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] + sizeof(BackgroundPhaseStrings) / sizeof(AllocKind) + }; + ++/* Unused memory decommiting requires the arena size match the page size. */ ++static bool ++DecommitEnabled() ++{ ++ return PageSize == ArenaSize; ++} ++ + #ifdef DEBUG + void + ArenaHeader::checkSynchronizedWithFreeList() const +@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ if (DecommitEnabled()) ++ MarkPagesInUse(arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntim + chunk->removeFromAvailableList(); + + size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress()); +- bool ok; ++ bool ok = true; + { + /* + * If the main thread waits for the decommit to finish, skip +@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntim + Maybe maybeUnlock; + if (!rt->isHeapBusy()) + maybeUnlock.construct(rt); +- ok = MarkPagesUnused(aheader->getArena(), ArenaSize); ++ if (DecommitEnabled()) ++ ok = MarkPagesUnused(aheader->getArena(), ArenaSize); + } + + if (ok) { diff --git a/mozilla-791626.patch b/mozilla-791626.patch new file mode 100644 index 0000000..c2e77ab --- /dev/null +++ b/mozilla-791626.patch @@ -0,0 +1,46 @@ +# HG changeset patch +# Parent 3523e7f7a89d7933c5f1dc8f5f22559b48ec44c4 +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 +@@ -818,17 +818,18 @@ nsIOService::PrefsChanged(nsIPrefBranch + if (NS_SUCCEEDED(rv)) { + if (mSocketTransportService) + mSocketTransportService->SetAutodialEnabled(enableAutodial); + } + } + + if (!pref || strcmp(pref, MANAGE_OFFLINE_STATUS_PREF) == 0) { + bool manage; +- if (NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, ++ if (mNetworkLinkServiceInitialized && ++ NS_SUCCEEDED(prefs->GetBoolPref(MANAGE_OFFLINE_STATUS_PREF, + &manage))) + SetManageOfflineStatus(manage); + } + + if (!pref || strcmp(pref, NECKO_BUFFER_CACHE_COUNT_PREF) == 0) { + int32_t count; + if (NS_SUCCEEDED(prefs->GetIntPref(NECKO_BUFFER_CACHE_COUNT_PREF, + &count))) +@@ -928,16 +929,20 @@ nsIOService::Observe(nsISupports *subjec + } + else if (!strcmp(topic, kProfileDoChange)) { + if (data && NS_LITERAL_STRING("startup").Equals(data)) { + // Lazy initialization of network link service (see bug 620472) + InitializeNetworkLinkService(); + // Set up the initilization flag regardless the actuall result. + // If we fail here, we will fail always on. + mNetworkLinkServiceInitialized = true; ++ // And now reflect the preference setting ++ nsCOMPtr prefBranch; ++ GetPrefBranch(getter_AddRefs(prefBranch)); ++ PrefsChanged(prefBranch, MANAGE_OFFLINE_STATUS_PREF); + } + } + 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 = true; + diff --git a/thunderbird-enigmail.spec b/thunderbird-enigmail.spec index af9ad71..dc03e44 100644 --- a/thunderbird-enigmail.spec +++ b/thunderbird-enigmail.spec @@ -27,7 +27,7 @@ %if %{?system_nss} %global nspr_version 4.9.2 -%global nss_version 3.13.3 +%global nss_version 3.13.6 %endif %if %{?system_cairo} %global cairo_version 1.10.0 @@ -45,7 +45,7 @@ %global thunderbird_app_id \{3550f703-e582-4d05-9a08-453d09bdfdc6\} %global enimail_app_id \{847b3a00-7ab1-11d4-8f02-006008948af5\} -%global thunver 17.0 +%global thunver 17.0.2 %global thunmax 18.0 # The tarball is pretty inconsistent with directory structure. @@ -64,7 +64,7 @@ Summary: Authentication and encryption extension for Mozilla Thunderbird Name: thunderbird-enigmail -Version: 1.5.0 +Version: 1.5.1 Release: 1%{?dist} URL: http://enigmail.mozdev.org/ # All files licensed under MPL 1.1/GPL 2.0/LGPL 2.1 @@ -83,6 +83,7 @@ Source100: http://www.mozilla-enigmail.org/download/source/enigmail-%{versi # Mozilla (XULRunner) patches Patch0: thunderbird-install-dir.patch Patch8: xulrunner-10.0-secondary-ipc.patch +Patch9: mozilla-791626.patch # Build patches Patch104: xulrunner-10.0-gcc47.patch @@ -93,6 +94,7 @@ Patch200: thunderbird-8.0-enable-addons.patch # PPC fixes Patch300: xulrunner-16.0-jemalloc-ppc.patch Patch301: rhbz-855923.patch +Patch302: mozilla-746112.patch # Enigmail patch @@ -177,7 +179,9 @@ cd %{tarballdir} # Mozilla (XULRunner) patches cd mozilla %patch8 -p3 -b .secondary-ipc +%patch9 -p1 -b .791626 %patch104 -p1 -b .gcc47 +%patch302 -p2 -b .746112 cd .. %patch200 -p1 -b .addons @@ -242,6 +246,10 @@ echo "ac_add_options --enable-optimize" >> .mozconfig echo "ac_add_options --disable-elf-hack" >> .mozconfig %endif +%ifnarch %{ix86} x86_64 +echo "ac_add_options --disable-webrtc" >> .mozconfig +%endif + # ===== Enigmail work ===== %if 0%{?CVS} mkdir mailnews/extensions/enigmail @@ -254,7 +262,7 @@ pushd mailnews/extensions/enigmail # All tarballs (as well as CVS) will *always* report as 1.4a1pre (or whatever # the next major version would be). This is because I create builds from trunk # and simply label the result as 1.3.x. -sed -i -e '/em:version/s/1.5/%{version}/' package/install.rdf +sed -i -e '/em:version/s/1.6a1pre/%{version}/' package/install.rdf grep '%{version}' package/install.rdf || exit 1 # Apply Enigmail patch here popd @@ -280,20 +288,19 @@ cd %{tarballdir} # # Disable C++ exceptions since Mozilla code is not exception-safe # -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ - %{__sed} -e 's/-Wall//') +MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-Wall//') %if %{?debug_build} MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-O2//') %endif %ifarch s390 -MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') +MOZ_OPT_FLAGS=$(echo "$MOZ_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" %endif export CFLAGS=$MOZ_OPT_FLAGS -export CXXFLAGS=$MOZ_OPT_FLAGS +export CXXFLAGS="$MOZ_OPT_FLAGS -fpermissive" export LDFLAGS=$MOZ_LINK_FLAGS export PREFIX='%{_prefix}' @@ -302,7 +309,7 @@ export LIBDIR='%{_libdir}' 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 +%ifarch %{ix86} x86_64 ppc ppc64 [ -z "$RPM_BUILD_NCPUS" ] && \ RPM_BUILD_NCPUS="`/usr/bin/getconf _NPROCESSORS_ONLN`" [ "$RPM_BUILD_NCPUS" -ge 2 ] && MOZ_SMP_FLAGS=-j2 @@ -341,6 +348,9 @@ unzip -q objdir/mozilla/dist/bin/enigmail-*-linux-*.xpi -d $RPM_BUILD_ROOT%{enig #=============================================================================== %changelog +* Sun Feb 10 2013 Remi Collet 1.5.1-1 +- Enigmail 1.5.1 for Thunderbird 17.0.2 + * Sun Dec 30 2012 Remi Collet 1.5.0-1 - Enigmail 1.5.0 for Thunderbird 17 @@ -360,7 +370,7 @@ unzip -q objdir/mozilla/dist/bin/enigmail-*-linux-*.xpi -d $RPM_BUILD_ROOT%{enig * Mon Aug 27 2012 Remi Collet 1.4.4-2 - Enigmail 1.4.4 for Thunderbird 15.0 -* Wed Aug 21 2012 Remi Collet 1.4.4-1 +* Tue Aug 21 2012 Remi Collet 1.4.4-1 - Enigmail 1.4.4 for Thunderbird 14.0 * Sat Jul 21 2012 Remi Collet 1.4.3-1 -- cgit