From 62c994864309c3db6024437364469d6945918329 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Thu, 1 Nov 2012 10:32:59 +0100 Subject: rename from xulrunner16 to xulrunner-last, sync with rawhide --- mozilla-746112.patch | 121 +++++++++++++++++++++++++++++++------------- rhbz-855919.patch | 19 ------- xulrunner-install-dir.patch | 23 +++++++++ xulrunner-version.patch | 13 ----- xulrunner.sh.in | 10 ++-- xulrunner.spec | 47 ++++++++--------- 6 files changed, 138 insertions(+), 95 deletions(-) delete mode 100644 rhbz-855919.patch create mode 100644 xulrunner-install-dir.patch delete mode 100644 xulrunner-version.patch diff --git a/mozilla-746112.patch b/mozilla-746112.patch index 765f993..0370f3c 100644 --- a/mozilla-746112.patch +++ b/mozilla-746112.patch @@ -1,35 +1,86 @@ -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrInterpreter.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrInterpreter.h -@@ -167,7 +167,7 @@ struct ByteTerm { - inputPosition = inputPos; - } - -- ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, ByteDisjunction* parenthesesInfo, bool capture, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(false) -@@ -188,7 +188,7 @@ struct ByteTerm { - atom.quantityCount = 1; - } - -- ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) -+ ByteTerm(Type type, unsigned subpatternId, bool capture, bool invert, int inputPos) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) -Index: xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -=================================================================== ---- xulrunner-10.0.1.orig/mozilla-release/js/src/yarr/YarrPattern.h -+++ xulrunner-10.0.1/mozilla-release/js/src/yarr/YarrPattern.h -@@ -171,7 +171,7 @@ struct PatternTerm { - quantityCount = 1; - } - -- PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) -+ PatternTerm(Type type, unsigned subpatternId, PatternDisjunction* disjunction, bool capture = false, bool invert = false) __attribute__((noinline)) - : type(type) - , m_capture(capture) - , m_invert(invert) +diff -up mozilla-release/js/src/gc/Heap.h.746112 mozilla-release/js/src/gc/Heap.h +--- mozilla-release/js/src/gc/Heap.h.746112 2012-10-24 16:32:52.000000000 +0200 ++++ mozilla-release/js/src/gc/Heap.h 2012-10-31 12:44:02.400733198 +0100 +@@ -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 mozilla-release/js/src/jsgc.cpp.746112 mozilla-release/js/src/jsgc.cpp +--- mozilla-release/js/src/jsgc.cpp.746112 2012-10-24 16:32:54.000000000 +0200 ++++ mozilla-release/js/src/jsgc.cpp 2012-10-31 12:42:50.681735540 +0100 +@@ -194,6 +194,13 @@ const uint32_t Arena::FirstThingOffsets[ + + #undef OFFSET + ++/* Unused memory decommiting requires the arena size match the page size. */ ++static bool ++DecommitEnabled() ++{ ++ return PageSize == ArenaSize; ++} ++ + #ifdef DEBUG + void + ArenaHeader::checkSynchronizedWithFreeList() const +@@ -677,7 +684,8 @@ Chunk::fetchNextDecommittedArena() + decommittedArenas.unset(offset); + + Arena *arena = &arenas[offset]; +- MarkPagesInUse(arena, ArenaSize); ++ if (DecommitEnabled()) ++ MarkPagesInUse(arena, ArenaSize); + arena->aheader.setAsNotAllocated(); + + return &arena->aheader; +@@ -2634,7 +2642,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 +@@ -2644,7 +2652,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/rhbz-855919.patch b/rhbz-855919.patch deleted file mode 100644 index 5315f57..0000000 --- a/rhbz-855919.patch +++ /dev/null @@ -1,19 +0,0 @@ -Index: mozilla-release/js/src/gc/Memory.cpp -=================================================================== ---- mozilla-release.orig/js/src/gc/Memory.cpp -+++ mozilla-release/js/src/gc/Memory.cpp -@@ -348,9 +348,14 @@ UnmapPages(void *p, size_t size) - bool - MarkPagesUnused(void *p, size_t size) - { -+// A workaround for Bug 746112 - endless loop on ppc64 -+#if !(defined(__powerpc__)) - JS_ASSERT(uintptr_t(p) % PageSize == 0); - int result = madvise(p, size, MADV_DONTNEED); - return result != -1; -+#else -+ return true; -+#endif - } - - bool diff --git a/xulrunner-install-dir.patch b/xulrunner-install-dir.patch new file mode 100644 index 0000000..ba95923 --- /dev/null +++ b/xulrunner-install-dir.patch @@ -0,0 +1,23 @@ +diff -up mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/config/baseconfig.mk 2012-09-26 10:13:45.258240426 +0200 +@@ -2,7 +2,7 @@ INCLUDED_AUTOCONF_MK = 1 + + includedir := $(includedir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) + idldir = $(datadir)/idl/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME)-last + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + DIST = $(DEPTH)/dist + +diff -up mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk +--- mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk.dir 2012-09-13 14:18:35.000000000 +0200 ++++ mozilla-aurora-7676a9a06403/js/src/config/baseconfig.mk 2012-09-26 10:14:07.353351833 +0200 +@@ -1,6 +1,6 @@ + INCLUDED_AUTOCONF_MK = 1 + +-installdir = $(libdir)/$(MOZ_APP_NAME)-$(MOZ_APP_VERSION) ++installdir = $(libdir)/$(MOZ_APP_NAME)-last + sdkdir = $(libdir)/$(MOZ_APP_NAME)-devel-$(MOZ_APP_VERSION) + + ifneq (,$(filter /%,$(TOP_DIST))) diff --git a/xulrunner-version.patch b/xulrunner-version.patch deleted file mode 100644 index d08bde9..0000000 --- a/xulrunner-version.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff -up mozilla/toolkit/mozapps/update/src/updater/module.ver mozilla/toolkit/mozapps/update/src/updater/module -diff -up mozilla/xulrunner/installer/Makefile.in.ver mozilla/xulrunner/installer/Makefile.in ---- mozilla/xulrunner/installer/Makefile.in.ver 2007-12-14 09:51:34.000000000 +0100 -+++ mozilla/xulrunner/installer/Makefile.in 2007-12-14 09:52:03.000000000 +0100 -@@ -44,6 +44,8 @@ VPATH = @srcdir@ - - include $(DEPTH)/config/autoconf.mk - -+MOZ_APP_VERSION="__RPM_VERSION_INTERNAL__" -+ - NO_PKG_FILES = \ - xulrunner-config \ - regchrome* \ diff --git a/xulrunner.sh.in b/xulrunner.sh.in index 8f76b27..afe843c 100644 --- a/xulrunner.sh.in +++ b/xulrunner.sh.in @@ -46,17 +46,17 @@ case $XUL_ARCH in ;; esac -if [ ! -x $XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner ]; then - if [ ! -x $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner ]; then - echo "Error: $XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found" +if [ ! -x $XUL_LIB_DIR/xulrunner-last/xulrunner ]; then + if [ ! -x $SECONDARY_LIB_DIR/xulrunner-last/xulrunner ]; then + echo "Error: $XUL_LIB_DIR/xulrunner-last/xulrunner not found" if [ -d $SECONDARY_LIB_DIR ]; then - echo " $SECONDARY_LIB_DIR/xulrunner-XULRUNNER_VERSION/xulrunner not found" + echo " $SECONDARY_LIB_DIR/xulrunner-last/xulrunner not found" fi exit 1 fi XUL_LIB_DIR="$SECONDARY_LIB_DIR" fi -XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner-XULRUNNER_VERSION" +XUL_DIST_BIN="$XUL_LIB_DIR/xulrunner-last" XUL_PROGRAM="$XUL_DIST_BIN/xulrunner" ## diff --git a/xulrunner.spec b/xulrunner.spec index 9e223e1..5ab07fd 100644 --- a/xulrunner.spec +++ b/xulrunner.spec @@ -50,12 +50,12 @@ # alpha_version should be set to the alpha number if using an alpha, 0 otherwise # beta_version should be set to the beta number if using a beta, 0 otherwise # rc_version should be set to the RC number if using an RC, 0 otherwise -%global gecko_dir_ver 16 +%global gecko_dir_ver %{version} %global alpha_version 0 %global beta_version 0 %global rc_version 0 -%global mozappdir %{_libdir}/%{shortname}-%{gecko_dir_ver} +%global mozappdir %{_libdir}/%{name} %global tarballdir mozilla-release # no crash reporter for remi repo @@ -82,7 +82,7 @@ %endif Summary: XUL Runtime for Gecko Applications -Name: %{shortname}%{gecko_dir_ver} +Name: %{shortname}-last Version: 16.0.2 Release: 1%{?dist} URL: http://developer.mozilla.org/En/XULRunner @@ -97,8 +97,8 @@ Source12: %{shortname}-redhat-default-prefs.js Source21: %{shortname}.sh.in # build patches -Patch0: xulrunner-version.patch Patch1: mozilla-build.patch +Patch2: xulrunner-install-dir.patch Patch14: xulrunner-2.0-chromium-types.patch Patch17: xulrunner-15.0-gcc47.patch # https://bugzilla.redhat.com/show_bug.cgi?id=814879#c3 @@ -110,7 +110,6 @@ Patch20: mozilla-193-pkgconfig.patch # Upstream patches Patch49: mozilla-746112.patch Patch51: mozilla-709732-gfx-icc-profile-fix.patch -Patch52: rhbz-855919.patch # --------------------------------------------------- @@ -157,10 +156,10 @@ Requires: nss >= %{nss_build_version} %endif Provides: gecko-libs = %{gecko_verrel} Provides: gecko-libs%{?_isa} = %{gecko_verrel} -Obsoletes: xulrunner12 Obsoletes: xulrunner13 Obsoletes: xulrunner14 Obsoletes: xulrunner15 +Obsoletes: xulrunner16 %if %{?system_sqlite} BuildRequires: sqlite-devel >= %{sqlite_version} @@ -180,10 +179,10 @@ Group: Development/Libraries Obsoletes: mozilla-devel < 1.9 Obsoletes: firefox-devel < 2.1 Obsoletes: xulrunner-devel-unstable -Obsoletes: xulrunner12-devel Obsoletes: xulrunner13-devel Obsoletes: xulrunner14-devel Obsoletes: xulrunner15-devel +Obsoletes: xulrunner16-devel Provides: gecko-devel = %{gecko_verrel} Provides: gecko-devel%{?_isa} = %{gecko_verrel} Provides: gecko-devel-unstable = %{gecko_verrel} @@ -256,22 +255,16 @@ echo TARGET = %{name}-%{version}-%{release} GECKO = %{gecko_verrel} %setup -q -c cd %{tarballdir} -sed -e 's/__RPM_VERSION_INTERNAL__/%{gecko_dir_ver}/' %{P:%%PATCH0} \ - > version.patch -%{__patch} -p1 -b --suffix .version --fuzz=0 < version.patch - %patch1 -p1 -b .build +%patch2 -p1 %patch14 -p1 -b .chromium-types %patch17 -p2 -b .gcc47 %patch18 -p2 -b .jemalloc-ppc %patch20 -p2 -b .pk -%ifarch ppc ppc64 -%patch49 -p2 -b .746112 -%endif +%patch49 -p1 -b .746112 %patch51 -p1 -b .709732 -%patch52 -p1 -b .855919 %{__rm} -f .mozconfig %{__cat} %{SOURCE10} \ @@ -376,7 +369,7 @@ MOZ_OPT_FLAGS=$(echo "$RPM_OPT_FLAGS -fpermissive" | \ 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 "$RPM_OPT_FLAGS" | %{__sed} -e 's/-g/-g1/') %endif %ifarch s390 %{arm} ppc MOZ_LINK_FLAGS="-Wl,--no-keep-memory -Wl,--reduce-memory-overheads" @@ -449,7 +442,7 @@ EOF INTERNAL_APP_NAME=%{shortname}-%{gecko_dir_ver} -pushd $RPM_BUILD_ROOT/%{_includedir}/%{shortname}-%{version} +pushd $RPM_BUILD_ROOT/%{_includedir}/${INTERNAL_APP_NAME} install_file "mozilla-config" install_file "js-config" popd @@ -472,7 +465,7 @@ popd LD_SO_CONF_D=%{_sysconfdir}/ld.so.conf.d LD_CONF_FILE=xulrunner-%{__isa_bits}.conf -%if %{name} == %{shortname} +%if "%{name}" == "%{shortname}" %{__mkdir_p} ${RPM_BUILD_ROOT}${LD_SO_CONF_D} %{__cat} > ${RPM_BUILD_ROOT}${LD_SO_CONF_D}/${LD_CONF_FILE} << EOF %{mozappdir} @@ -509,7 +502,7 @@ touch $RPM_BUILD_ROOT%{mozappdir}/components/xpti.dat %postun -p /sbin/ldconfig -%if %{name} == %{shortname} +%if "%{name}" == "%{shortname}" %preun # is it a final removal? if [ $1 -eq 0 ]; then @@ -540,7 +533,7 @@ fi %{mozappdir}/xulrunner-stub %{mozappdir}/platform.ini %{mozappdir}/dependentlibs.list -%if %{name} == %{shortname} +%if "%{name}" == "%{shortname}" %{_sysconfdir}/ld.so.conf.d/xulrunner*.conf %endif %{mozappdir}/plugin-container @@ -555,16 +548,24 @@ fi %files devel %defattr(-,root,root,-) -#%dir %{_libdir}/%{shortname}-devel-* +%dir %{_libdir}/%{shortname}-devel-* %{_datadir}/idl/%{shortname}*%{gecko_dir_ver} -%{_includedir}/%{shortname}*%{version} -%{_libdir}/%{shortname}-devel-* +%{_includedir}/%{shortname}*%{gecko_dir_ver} +%{_libdir}/%{shortname}-devel-*/* %{_libdir}/pkgconfig/*.pc %{mozappdir}/xpcshell #--------------------------------------------------------------------- %changelog +* Thu Nov 1 2012 Remi Collet - 16.0.2-1 +- sync patch with rawhide +- rename to xulrunner-last + +* Wed Oct 31 2012 Martin Stransky - 16.0.2-1 +- Updated mozilla-746112.patch for second arches +- Removed unused one (rhbz#855919) + * Fri Oct 26 2012 Remi Collet - 16.0.2-1 - Sync with rawhide, update to 16.0.2 -- cgit